Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
runtime_entry.cc File Reference
#include "vm/runtime_entry.h"
#include <memory>
#include "platform/memory_sanitizer.h"
#include "platform/thread_sanitizer.h"
#include "vm/code_descriptors.h"
#include "vm/code_patcher.h"
#include "vm/compiler/api/deopt_id.h"
#include "vm/compiler/api/type_check_mode.h"
#include "vm/compiler/jit/compiler.h"
#include "vm/dart_api_impl.h"
#include "vm/dart_api_state.h"
#include "vm/dart_entry.h"
#include "vm/debugger.h"
#include "vm/double_conversion.h"
#include "vm/exceptions.h"
#include "vm/ffi_callback_metadata.h"
#include "vm/flags.h"
#include "vm/heap/verifier.h"
#include "vm/instructions.h"
#include "vm/kernel_isolate.h"
#include "vm/message.h"
#include "vm/message_handler.h"
#include "vm/object_store.h"
#include "vm/parser.h"
#include "vm/resolver.h"
#include "vm/service_isolate.h"
#include "vm/stack_frame.h"
#include "vm/symbols.h"
#include "vm/thread.h"
#include "vm/type_testing_stubs.h"
#include "vm/zone_text_buffer.h"
#include "vm/deopt_instructions.h"

Go to the source code of this file.

Classes

class  dart::PatchableCallHandler
 

Namespaces

namespace  dart
 

Macros

#define DEOPT_REASON_TO_TEXT(name)
 

Typedefs

typedef double(* dart::UnaryMathCFunction) (double x)
 
typedef double(* dart::BinaryMathCFunction) (double x, double y)
 
typedef void *(* dart::MemMoveCFunction) (void *dest, const void *src, size_t n)
 

Enumerations

enum class  dart::MissHandler { dart::kInlineCacheMiss , dart::kSwitchableCallMiss , dart::kFixCallersTargetMonomorphic }
 

Functions

 dart::DEFINE_FLAG (int, max_subtype_cache_entries, kDefaultMaxSubtypeCacheEntries, "Maximum number of subtype cache entries (number of checks cached).")
 
 dart::DEFINE_FLAG (int, regexp_optimization_counter_threshold, 1000, "RegExp's usage-counter value before it is optimized, -1 means never")
 
 dart::DEFINE_FLAG (int, reoptimization_counter_threshold, 4000, "Counter threshold before a function gets reoptimized.")
 
 dart::DEFINE_FLAG (bool, runtime_allocate_old, false, "Use old-space for allocation via runtime calls.")
 
 dart::DEFINE_FLAG (bool, runtime_allocate_spill_tlab, false, "Ensure results of allocation via runtime calls are not in an " "active TLAB.")
 
 dart::DEFINE_FLAG (bool, trace_deoptimization, false, "Trace deoptimization")
 
 dart::DEFINE_FLAG (bool, trace_deoptimization_verbose, false, "Trace deoptimization verbose")
 
 dart::DECLARE_FLAG (int, max_deoptimization_counter_threshold)
 
 dart::DECLARE_FLAG (bool, trace_compiler)
 
 dart::DECLARE_FLAG (bool, trace_optimizing_compiler)
 
 dart::DECLARE_FLAG (int, max_polymorphic_checks)
 
 dart::DEFINE_FLAG (bool, trace_osr, false, "Trace attempts at on-stack replacement.")
 
 dart::DEFINE_FLAG (int, gc_every, 0, "Run major GC on every N stack overflow checks")
 
 dart::DEFINE_FLAG (int, stacktrace_every, 0, "Compute debugger stacktrace on every N stack overflow checks")
 
 dart::DEFINE_FLAG (charp, stacktrace_filter, nullptr, "Compute stacktrace in named function on stack overflow checks")
 
 dart::DEFINE_FLAG (charp, deoptimize_filter, nullptr, "Deoptimize in named function on stack overflow checks")
 
 dart::DEFINE_FLAG (charp, deoptimize_on_runtime_call_name_filter, nullptr, "Runtime call name filter for --deoptimize-on-runtime-call-every.")
 
 dart::DEFINE_FLAG (bool, unopt_monomorphic_calls, true, "Enable specializing monomorphic calls from unoptimized code.")
 
 dart::DEFINE_FLAG (bool, unopt_megamorphic_calls, true, "Enable specializing megamorphic calls from unoptimized code.")
 
 dart::DEFINE_FLAG (bool, verbose_stack_overflow, false, "Print additional details about stack overflow.")
 
 dart::DECLARE_FLAG (int, reload_every)
 
 dart::DECLARE_FLAG (bool, reload_every_optimized)
 
 dart::DECLARE_FLAG (bool, reload_every_back_off)
 
 dart::DEFINE_RUNTIME_ENTRY (RangeError, 2)
 
 dart::DEFINE_RUNTIME_ENTRY (RangeErrorUnboxedInt64, 0)
 
 dart::DEFINE_RUNTIME_ENTRY (WriteError, 2)
 
static void dart::NullErrorHelper (Zone *zone, const String &selector, bool is_param_name=false)
 
static void dart::DoThrowNullError (Isolate *isolate, Thread *thread, Zone *zone, bool is_param)
 
 dart::DEFINE_RUNTIME_ENTRY (NullError, 0)
 
void dart::ReportImpossibleNullError (intptr_t cid, StackFrame *caller_frame, Thread *thread)
 
 dart::DEFINE_RUNTIME_ENTRY (DispatchTableNullError, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (NullErrorWithSelector, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (NullCastError, 0)
 
 dart::DEFINE_RUNTIME_ENTRY (ArgumentNullError, 0)
 
 dart::DEFINE_RUNTIME_ENTRY (ArgumentError, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (ArgumentErrorUnboxedInt64, 0)
 
 dart::DEFINE_RUNTIME_ENTRY (DoubleToInteger, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (IntegerDivisionByZeroException, 0)
 
static Heap::Space dart::SpaceForRuntimeAllocation ()
 
static void dart::RuntimeAllocationEpilogue (Thread *thread)
 
 dart::DEFINE_RUNTIME_ENTRY (AllocateArray, 2)
 
 dart::DEFINE_RUNTIME_ENTRY_NO_LAZY_DEOPT (AllocateDouble, 0)
 
 dart::DEFINE_RUNTIME_ENTRY_NO_LAZY_DEOPT (BoxDouble, 0)
 
 dart::DEFINE_RUNTIME_ENTRY_NO_LAZY_DEOPT (BoxFloat32x4, 0)
 
 dart::DEFINE_RUNTIME_ENTRY_NO_LAZY_DEOPT (BoxFloat64x2, 0)
 
 dart::DEFINE_RUNTIME_ENTRY_NO_LAZY_DEOPT (AllocateMint, 0)
 
 dart::DEFINE_RUNTIME_ENTRY_NO_LAZY_DEOPT (AllocateFloat32x4, 0)
 
 dart::DEFINE_RUNTIME_ENTRY_NO_LAZY_DEOPT (AllocateFloat64x2, 0)
 
 dart::DEFINE_RUNTIME_ENTRY_NO_LAZY_DEOPT (AllocateInt32x4, 0)
 
 dart::DEFINE_RUNTIME_ENTRY (AllocateTypedData, 2)
 
static TokenPosition dart::GetCallerLocation ()
 
static void dart::ThrowIfError (const Object &result)
 
 dart::DEFINE_RUNTIME_ENTRY (AllocateObject, 2)
 
 dart::DEFINE_LEAF_RUNTIME_ENTRY (uword, EnsureRememberedAndMarkingDeferred, 2, uword object_in, Thread *thread)
 
END_LEAF_RUNTIME_ENTRY dart::DEFINE_RUNTIME_ENTRY (InstantiateType, 3)
 
 dart::DEFINE_RUNTIME_ENTRY (InstantiateTypeArguments, 3)
 
static void dart::PrintSubtypeCheck (const AbstractType &subtype, const AbstractType &supertype, const bool result)
 
 dart::DEFINE_RUNTIME_ENTRY (SubtypeCheck, 5)
 
 dart::DEFINE_RUNTIME_ENTRY (AllocateClosure, 4)
 
 dart::DEFINE_RUNTIME_ENTRY (AllocateContext, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (CloneContext, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (AllocateRecord, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (AllocateSmallRecord, 4)
 
 dart::DEFINE_RUNTIME_ENTRY (AllocateSuspendState, 2)
 
 dart::DEFINE_RUNTIME_ENTRY (CloneSuspendState, 1)
 
static void dart::PrintTypeCheck (const char *message, const Instance &instance, const AbstractType &type, const TypeArguments &instantiator_type_arguments, const TypeArguments &function_type_arguments, const Bool &result)
 
static void dart::UpdateTypeTestCache (Zone *zone, Thread *thread, const Instance &instance, const AbstractType &destination_type, const TypeArguments &instantiator_type_arguments, const TypeArguments &function_type_arguments, const Bool &result, const SubtypeTestCache &new_cache)
 
 dart::DEFINE_RUNTIME_ENTRY (Instanceof, 5)
 
 dart::DEFINE_RUNTIME_ENTRY (TypeCheck, 7)
 
 dart::DEFINE_RUNTIME_ENTRY (NonBoolTypeError, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (Throw, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (ReThrow, 3)
 
 dart::DEFINE_RUNTIME_ENTRY (PatchStaticCall, 0)
 
 dart::DEFINE_RUNTIME_ENTRY (BreakpointRuntimeHandler, 0)
 
 dart::DEFINE_RUNTIME_ENTRY (SingleStepHandler, 0)
 
static bool dart::ResolveCallThroughGetter (const Class &receiver_class, const String &target_name, const String &demangled, const Array &arguments_descriptor, Function *result)
 
FunctionPtr dart::InlineCacheMissHelper (const Class &receiver_class, const Array &args_descriptor, const String &target_name)
 
static void dart::TrySwitchInstanceCall (Thread *thread, StackFrame *caller_frame, const Code &caller_code, const Function &caller_function, const ICData &ic_data, const Function &target_function)
 
static FunctionPtr dart::ComputeTypeCheckTarget (const Instance &receiver, const AbstractType &type, const ArgumentsDescriptor &desc)
 
static FunctionPtr dart::Resolve (Thread *thread, Zone *zone, const GrowableArray< const Instance * > &caller_arguments, const Class &receiver_class, const String &name, const Array &descriptor)
 
 dart::DEFINE_RUNTIME_ENTRY (StaticCallMissHandlerOneArg, 2)
 
 dart::DEFINE_RUNTIME_ENTRY (StaticCallMissHandlerTwoArgs, 3)
 
static void dart::InlineCacheMissHandler (Thread *thread, Zone *zone, const GrowableArray< const Instance * > &args, const ICData &ic_data, NativeArguments native_arguments)
 
 dart::DEFINE_RUNTIME_ENTRY (InlineCacheMissHandlerOneArg, 2)
 
 dart::DEFINE_RUNTIME_ENTRY (InlineCacheMissHandlerTwoArgs, 3)
 
 dart::DEFINE_RUNTIME_ENTRY (SwitchableCallMiss, 2)
 
static ObjectPtr dart::InvokeCallThroughGetterOrNoSuchMethod (Thread *thread, Zone *zone, const Instance &receiver, const String &target_name, const Array &orig_arguments, const Array &orig_arguments_desc)
 
 dart::DEFINE_RUNTIME_ENTRY (NoSuchMethodFromCallStub, 4)
 
 dart::DEFINE_RUNTIME_ENTRY (NoSuchMethodFromPrologue, 4)
 
static void dart::HandleStackOverflowTestCases (Thread *thread)
 
static void dart::HandleOSRRequest (Thread *thread)
 
 dart::DEFINE_RUNTIME_ENTRY (InterruptOrStackOverflow, 0)
 
 dart::DEFINE_RUNTIME_ENTRY (TraceICCall, 2)
 
 dart::DEFINE_RUNTIME_ENTRY (OptimizeInvokedFunction, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (FixCallersTarget, 0)
 
 dart::DEFINE_RUNTIME_ENTRY (FixCallersTargetMonomorphic, 2)
 
 dart::DEFINE_RUNTIME_ENTRY (FixAllocationStubTarget, 0)
 
const char * dart::DeoptReasonToCString (ICData::DeoptReasonId deopt_reason)
 
static bool dart::IsSuspendedFrame (Zone *zone, const Function &function, StackFrame *frame)
 
void dart::DeoptimizeAt (Thread *mutator_thread, const Code &optimized_code, StackFrame *frame)
 
void dart::DeoptimizeFunctionsOnStack ()
 
static void dart::DeoptimizeLastDartFrameIfOptimized ()
 
static void dart::CopySavedRegisters (uword saved_registers_address, fpu_register_t **fpu_registers, intptr_t **cpu_registers)
 
 dart::DEFINE_LEAF_RUNTIME_ENTRY (bool, TryDoubleAsInteger, 1, Thread *thread)
 
END_LEAF_RUNTIME_ENTRY dart::DEFINE_LEAF_RUNTIME_ENTRY (intptr_t, DeoptimizeCopyFrame, 2, uword saved_registers_address, uword is_lazy_deopt)
 
END_LEAF_RUNTIME_ENTRY dart::DEFINE_LEAF_RUNTIME_ENTRY (void, DeoptimizeFillFrame, 1, uword last_fp)
 
END_LEAF_RUNTIME_ENTRY dart::DEFINE_RUNTIME_ENTRY (DeoptimizeMaterialize, 0)
 
 dart::DEFINE_RUNTIME_ENTRY (RewindPostDeopt, 0)
 
 dart::DEFINE_RUNTIME_ENTRY (ResumeFrame, 2)
 
void dart::OnEveryRuntimeEntryCall (Thread *thread, const char *runtime_call_name, bool can_lazy_deopt)
 
double dart::DartModulo (double left, double right)
 
 dart::DEFINE_RUNTIME_ENTRY (UpdateFieldCid, 2)
 
 dart::DEFINE_RUNTIME_ENTRY (InitInstanceField, 2)
 
 dart::DEFINE_RUNTIME_ENTRY (InitStaticField, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (LateFieldAssignedDuringInitializationError, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (LateFieldNotInitializedError, 1)
 
 dart::DEFINE_RUNTIME_ENTRY (NotLoaded, 0)
 
 dart::DEFINE_RUNTIME_ENTRY (FfiAsyncCallbackSend, 1)
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcPow, 2, true, static_cast< BinaryMathCFunction >(pow))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (DartModulo, 2, true, static_cast< BinaryMathCFunction >(DartModulo))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcAtan2, 2, true, static_cast< BinaryMathCFunction >(atan2_ieee))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcFloor, 1, true, static_cast< UnaryMathCFunction >(floor))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcCeil, 1, true, static_cast< UnaryMathCFunction >(ceil))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcTrunc, 1, true, static_cast< UnaryMathCFunction >(trunc))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcRound, 1, true, static_cast< UnaryMathCFunction >(round))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcCos, 1, true, static_cast< UnaryMathCFunction >(cos))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcSin, 1, true, static_cast< UnaryMathCFunction >(sin))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcAsin, 1, true, static_cast< UnaryMathCFunction >(asin))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcAcos, 1, true, static_cast< UnaryMathCFunction >(acos))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcTan, 1, true, static_cast< UnaryMathCFunction >(tan))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcAtan, 1, true, static_cast< UnaryMathCFunction >(atan))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcExp, 1, true, static_cast< UnaryMathCFunction >(exp))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (LibcLog, 1, true, static_cast< UnaryMathCFunction >(log))
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (MemoryMove, 3, false, static_cast< MemMoveCFunction >(memmove))
 
void dart::DFLRT_EnterSafepoint (NativeArguments __unusable_)
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (EnterSafepoint, 0, false, DFLRT_EnterSafepoint)
 
void dart::DFLRT_ExitSafepoint (NativeArguments __unusable_)
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (ExitSafepoint, 0, false, DFLRT_ExitSafepoint)
 
void dart::DFLRT_ExitSafepointIgnoreUnwindInProgress (NativeArguments __unusable_)
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (ExitSafepointIgnoreUnwindInProgress, 0, false, DFLRT_ExitSafepointIgnoreUnwindInProgress)
 
Threaddart::DLRT_GetFfiCallbackMetadata (FfiCallbackMetadata::Trampoline trampoline, uword *out_entry_point, uword *out_trampoline_type)
 
void dart::DLRT_ExitTemporaryIsolate ()
 
ApiLocalScopedart::DLRT_EnterHandleScope (Thread *thread)
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (EnterHandleScope, 1, false, DLRT_EnterHandleScope)
 
void dart::DLRT_ExitHandleScope (Thread *thread)
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (ExitHandleScope, 1, false, DLRT_ExitHandleScope)
 
LocalHandledart::DLRT_AllocateHandle (ApiLocalScope *scope)
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (AllocateHandle, 1, false, DLRT_AllocateHandle)
 
void dart::DLRT_PropagateError (Dart_Handle handle)
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (PropagateError, 1, false, DLRT_PropagateError)
 
void dart::__msan_unpoison (const volatile void *, size_t)
 
void dart::__msan_unpoison_param (size_t)
 
void dart::__tsan_acquire (void *addr)
 
void dart::__tsan_release (void *addr)
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (MsanUnpoison, 2, false, __msan_unpoison)
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (MsanUnpoisonParam, 1, false, __msan_unpoison_param)
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (TsanLoadAcquire, 1, false, __tsan_acquire)
 
 dart::DEFINE_RAW_LEAF_RUNTIME_ENTRY (TsanStoreRelease, 1, false, __tsan_release)
 

Variables

static constexpr intptr_t dart::kDefaultMaxSubtypeCacheEntries
 
static constexpr intptr_t dart::kNumberOfSavedCpuRegisters = kNumberOfCpuRegisters
 
static constexpr intptr_t dart::kNumberOfSavedFpuRegisters = kNumberOfFpuRegisters
 

Macro Definition Documentation

◆ DEOPT_REASON_TO_TEXT

#define DEOPT_REASON_TO_TEXT (   name)
Value:
case ICData::kDeopt##name: \
return #name;
const char * name
Definition fuchsia.cc:50