5#ifndef RUNTIME_VM_COMPILER_STUB_CODE_COMPILER_H_
6#define RUNTIME_VM_COMPILER_STUB_CODE_COMPILER_H_
8#if defined(DART_PRECOMPILED_RUNTIME)
9#error "AOT runtime should not use compiler sources (including header files)"
41 intptr_t
offset()
const {
return offset_; }
46 const intptr_t offset_;
48 const bool is_tail_call_;
56 :
assembler(assembler_), pc_descriptors_list_(pc_descriptors_list) {}
65#define STUB_CODE_GENERATE(name) void Generate##name##Stub();
67#undef STUB_CODE_GENERATE
73 const dart::Code& allocat_object_parametrized);
116#if !defined(TARGET_ARCH_IA32)
123#if !defined(TARGET_ARCH_IA32)
171 static void GenerateSubtypeTestCacheSearch(
194 void GenerateInitLateStaticFieldStub(
bool is_final,
bool is_shared);
198 void GenerateInitLateInstanceFieldStub(
bool is_final);
201 void GenerateAllocateClosureStub(
bool has_instantiator_type_args,
205 void GenerateAllocateTypedDataArrayStub(intptr_t
cid);
207 void GenerateAllocateSmallRecordStub(intptr_t num_fields,
208 bool has_named_fields);
210 void GenerateSharedStubGeneric(
bool save_fpu_registers,
211 intptr_t self_code_stub_offset_from_thread,
219 void GenerateSharedStub(
bool save_fpu_registers,
221 intptr_t self_code_stub_offset_from_thread,
223 bool store_runtime_result_in_result_register =
false);
225 void GenerateLateInitializationError(
bool with_fpu_regs);
227 void GenerateRangeError(
bool with_fpu_regs);
228 void GenerateWriteError(
bool with_fpu_regs);
230 void GenerateSuspendStub(
bool call_suspend_function,
231 bool pass_type_arguments,
232 intptr_t suspend_entry_point_offset_in_thread,
233 intptr_t suspend_function_offset_in_object_store);
234 void GenerateInitSuspendableFunctionStub(
235 intptr_t init_entry_point_offset_in_thread,
236 intptr_t init_function_offset_in_object_store);
237 void GenerateReturnStub(intptr_t return_entry_point_offset_in_thread,
238 intptr_t return_function_offset_in_object_store,
239 intptr_t return_stub_offset_in_thread);
246 void GenerateLoadFfiCallbackMetadataRuntimeFunction(
uword function_index,
void GenerateNArgsCheckInlineCacheStub(intptr_t num_args, const RuntimeEntry &handle_ic_miss, Token::Kind kind, Optimized optimized, CallType type, Exactness exactness)
static ArrayPtr BuildStaticCallsTable(Zone *zone, compiler::UnresolvedPcRelativeCalls *unresolved_calls)
void EnsureIsNewOrRemembered()
std::function< void(Assembler *, int)> STCSearchExitGenerator
void GenerateUsageCounterIncrement(Register temp_reg)
void GenerateAllocationStubForClass(UnresolvedPcRelativeCalls *unresolved_calls, const Class &cls, const dart::Code &allocate_object, const dart::Code &allocat_object_parametrized)
void GenerateNArgsCheckInlineCacheStubForEntryKind(intptr_t num_args, const RuntimeEntry &handle_ic_miss, Token::Kind kind, Optimized optimized, CallType type, Exactness exactness, CodeEntryKind entry_kind)
void GenerateOptimizedUsageCounterIncrement()
static intptr_t WordOffsetFromFpToCpuRegister(Register cpu_register)
StubCodeCompiler(Assembler *assembler_, DescriptorList *pc_descriptors_list)
UnresolvedPcRelativeCall(intptr_t offset, const dart::Code &target, bool is_tail_call)
const dart::Code & target() const
bool is_tail_call() const
Dart_NativeFunction function
static constexpr uword kZapReturnAddress
static constexpr uword kZapCodeReg
#define STUB_CODE_GENERATE(name)
#define VM_STUB_CODE_LIST(V)