Flutter Engine
The Flutter Engine
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

Thread * dart::DLRT_GetFfiCallbackMetadata (FfiCallbackMetadata::Trampoline trampoline, uword *out_entry_point, uword *out_trampoline_type)
 
void dart::DLRT_ExitTemporaryIsolate ()
 
ApiLocalScope * dart::DLRT_EnterHandleScope (Thread *thread)
 
void dart::DLRT_ExitHandleScope (Thread *thread)
 
LocalHandle * dart::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__);
GLenum type
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

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__) { \
CHECK_STACK_ALIGNMENT; \
NoSafepointScope no_safepoint_scope;
int argument_count
Definition: fuchsia.cc:52

Definition at line 134 of file runtime_entry.h.

◆ 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)
static bool is_float(const Type &type)

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) { \
CHECK_STACK_ALIGNMENT; \
/* 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.

◆ 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.