Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Functions
runtime_entry.h File Reference
#include "vm/allocation.h"
#include "vm/compiler/runtime_api.h"
#include "vm/flags.h"
#include "vm/heap/safepoint.h"
#include "vm/log.h"
#include "vm/native_arguments.h"
#include "vm/runtime_entry_list.h"

Go to the source code of this file.

Classes

class  dart::RuntimeEntry
 

Namespaces

namespace  dart
 

Macros

#define TRACE_RUNTIME_CALL(format, name)
 
#define CHECK_SIMULATOR_STACK_OVERFLOW()
 
#define DEFINE_RUNTIME_ENTRY_IMPL(name, argument_count, can_lazy_deopt)
 
#define DEFINE_RUNTIME_ENTRY(name, argument_count)    DEFINE_RUNTIME_ENTRY_IMPL(name, argument_count, /*can_lazy_deopt=*/true)
 
#define DEFINE_RUNTIME_ENTRY_NO_LAZY_DEOPT(name, argument_count)    DEFINE_RUNTIME_ENTRY_IMPL(name, argument_count, /*can_lazy_deopt=*/false)
 
#define DECLARE_RUNTIME_ENTRY(name)
 
#define DEFINE_LEAF_RUNTIME_ENTRY(type, name, argument_count, ...)
 
#define END_LEAF_RUNTIME_ENTRY   }
 
#define DEFINE_RAW_LEAF_RUNTIME_ENTRY(name, argument_count, is_float, func)
 
#define DECLARE_LEAF_RUNTIME_ENTRY(type, name, ...)
 

Typedefs

typedef void(* dart::RuntimeFunction) (NativeArguments arguments)
 
using dart::BaseRuntimeEntry = compiler::RuntimeEntry
 

Functions

Threaddart::DLRT_GetFfiCallbackMetadata (FfiCallbackMetadata::Trampoline trampoline, uword *out_entry_point, uword *out_trampoline_type)
 
void dart::DLRT_ExitTemporaryIsolate ()
 
ApiLocalScopedart::DLRT_EnterHandleScope (Thread *thread)
 
void dart::DLRT_ExitHandleScope (Thread *thread)
 
LocalHandledart::DLRT_AllocateHandle (ApiLocalScope *scope)
 
const char * dart::DeoptReasonToCString (ICData::DeoptReasonId deopt_reason)
 
void dart::OnEveryRuntimeEntryCall (Thread *thread, const char *runtime_call_name, bool can_lazy_deopt)
 
void dart::DeoptimizeAt (Thread *mutator_thread, const Code &optimized_code, StackFrame *frame)
 
void dart::DeoptimizeFunctionsOnStack ()
 
double dart::DartModulo (double left, double right)
 

Macro Definition Documentation

◆ CHECK_SIMULATOR_STACK_OVERFLOW

#define CHECK_SIMULATOR_STACK_OVERFLOW ( )

Definition at line 87 of file runtime_entry.h.

◆ DECLARE_LEAF_RUNTIME_ENTRY

#define DECLARE_LEAF_RUNTIME_ENTRY (   type,
  name,
  ... 
)
Value:
extern const RuntimeEntry k##name##RuntimeEntry; \
extern "C" type DLRT_##name(__VA_ARGS__);
const char * name
Definition fuchsia.cc:50

Definition at line 152 of file runtime_entry.h.

◆ DECLARE_RUNTIME_ENTRY

#define DECLARE_RUNTIME_ENTRY (   name)
Value:
extern const RuntimeEntry k##name##RuntimeEntry; \
extern void DRT_##name(NativeArguments arguments);

Definition at line 130 of file runtime_entry.h.

◆ DEFINE_LEAF_RUNTIME_ENTRY

#define DEFINE_LEAF_RUNTIME_ENTRY (   type,
  name,
  argument_count,
  ... 
)
Value:
extern "C" type DLRT_##name(__VA_ARGS__); \
extern const RuntimeEntry k##name##RuntimeEntry( \
"DLRT_" #name, reinterpret_cast<const void*>(DLRT_##name), \
argument_count, true, false, /*can_lazy_deopt=*/false); \
type DLRT_##name(__VA_ARGS__) { \
NoSafepointScope no_safepoint_scope;
int argument_count
Definition fuchsia.cc:52
#define CHECK_STACK_ALIGNMENT

Definition at line 134 of file runtime_entry.h.

139 { \
141 NoSafepointScope no_safepoint_scope;

◆ DEFINE_RAW_LEAF_RUNTIME_ENTRY

#define DEFINE_RAW_LEAF_RUNTIME_ENTRY (   name,
  argument_count,
  is_float,
  func 
)
Value:
extern const RuntimeEntry k##name##RuntimeEntry( \
"DFLRT_" #name, reinterpret_cast<const void*>(func), argument_count, \
true, is_float, /*can_lazy_deopt=*/false)

Definition at line 147 of file runtime_entry.h.

◆ DEFINE_RUNTIME_ENTRY

#define DEFINE_RUNTIME_ENTRY (   name,
  argument_count 
)     DEFINE_RUNTIME_ENTRY_IMPL(name, argument_count, /*can_lazy_deopt=*/true)

Definition at line 124 of file runtime_entry.h.

◆ DEFINE_RUNTIME_ENTRY_IMPL

#define DEFINE_RUNTIME_ENTRY_IMPL (   name,
  argument_count,
  can_lazy_deopt 
)
Value:
extern void DRT_##name(NativeArguments arguments); \
extern const RuntimeEntry k##name##RuntimeEntry( \
"DRT_" #name, reinterpret_cast<const void*>(DRT_##name), argument_count, \
false, false, can_lazy_deopt); \
static void DRT_Helper##name(Isolate* isolate, Thread* thread, Zone* zone, \
NativeArguments arguments); \
void DRT_##name(NativeArguments arguments) { \
/* Tell MemorySanitizer 'arguments' is initialized by generated code. */ \
MSAN_UNPOISON(&arguments, sizeof(arguments)); \
ASSERT(arguments.ArgCount() == argument_count); \
TRACE_RUNTIME_CALL("%s", "" #name); \
{ \
Thread* thread = arguments.thread(); \
ASSERT(thread == Thread::Current()); \
RuntimeCallDeoptScope runtime_call_deopt_scope( \
thread, can_lazy_deopt ? RuntimeCallDeoptAbility::kCanLazyDeopt \
: RuntimeCallDeoptAbility::kCannotLazyDeopt); \
Isolate* isolate = thread->isolate(); \
TransitionGeneratedToVM transition(thread); \
StackZone zone(thread); \
CHECK_SIMULATOR_STACK_OVERFLOW(); \
if (FLAG_deoptimize_on_runtime_call_every > 0) { \
OnEveryRuntimeEntryCall(thread, "" #name, can_lazy_deopt); \
} \
DRT_Helper##name(isolate, thread, zone.GetZone(), arguments); \
} \
} \
static void DRT_Helper##name(Isolate* isolate, Thread* thread, Zone* zone, \
NativeArguments arguments)

Definition at line 92 of file runtime_entry.h.

99 { \
101 /* Tell MemorySanitizer 'arguments' is initialized by generated code. */ \
102 MSAN_UNPOISON(&arguments, sizeof(arguments)); \
103 ASSERT(arguments.ArgCount() == argument_count); \
104 TRACE_RUNTIME_CALL("%s", "" #name); \
105 { \
106 Thread* thread = arguments.thread(); \
107 ASSERT(thread == Thread::Current()); \
108 RuntimeCallDeoptScope runtime_call_deopt_scope( \
109 thread, can_lazy_deopt ? RuntimeCallDeoptAbility::kCanLazyDeopt \
111 Isolate* isolate = thread->isolate(); \
112 TransitionGeneratedToVM transition(thread); \
113 StackZone zone(thread); \
114 CHECK_SIMULATOR_STACK_OVERFLOW(); \
115 if (FLAG_deoptimize_on_runtime_call_every > 0) { \
116 OnEveryRuntimeEntryCall(thread, "" #name, can_lazy_deopt); \
117 } \
118 DRT_Helper##name(isolate, thread, zone.GetZone(), arguments); \
119 } \
120 } \
121 static void DRT_Helper##name(Isolate* isolate, Thread* thread, Zone* zone, \
122 NativeArguments arguments)
RuntimeCallDeoptAbility
Definition thread.h:276

◆ DEFINE_RUNTIME_ENTRY_NO_LAZY_DEOPT

#define DEFINE_RUNTIME_ENTRY_NO_LAZY_DEOPT (   name,
  argument_count 
)     DEFINE_RUNTIME_ENTRY_IMPL(name, argument_count, /*can_lazy_deopt=*/false)

Definition at line 127 of file runtime_entry.h.

◆ END_LEAF_RUNTIME_ENTRY

#define END_LEAF_RUNTIME_ENTRY   }

Definition at line 143 of file runtime_entry.h.

◆ TRACE_RUNTIME_CALL

#define TRACE_RUNTIME_CALL (   format,
  name 
)
Value:
do { \
} while (0)

Definition at line 76 of file runtime_entry.h.

77 { \
78 } while (0)