5#ifndef RUNTIME_VM_TYPE_TESTING_STUBS_H_
6#define RUNTIME_VM_TYPE_TESTING_STUBS_H_
10#if !defined(DART_PRECOMPILED_RUNTIME)
39 mutable intptr_t nonce_ = 0;
48 bool lazy_specialize =
true);
50#if !defined(DART_PRECOMPILED_RUNTIME)
61#if !defined(TARGET_ARCH_IA32)
62#if !defined(DART_PRECOMPILED_RUNTIME)
64 static void BuildOptimizedTypeTestStub(
67 const Code& slow_type_test_stub,
71 static void BuildOptimizedTypeTestStubFastCases(
82 static void BuildOptimizedSubclassRangeCheckWithTypeArguments(
86 const Class& type_class);
88 static void BuildOptimizedRecordSubtypeRangeCheck(
103 static bool BuildLoadInstanceTypeArguments(
107 const Class& type_class,
109 const Register instance_type_args_reg,
113 static void BuildOptimizedTypeParameterArgumentValueCheck(
117 intptr_t type_param_value_offset_i,
120 static void BuildOptimizedTypeArgumentValueCheck(
124 intptr_t type_param_value_offset_i,
142 if (handles_count_ < handles_.
length()) {
143 handle = handles_[handles_count_];
145 handle = &T::ZoneHandle(zone_);
146 handles_.
Add(handle);
152 void Release(
T* handle) {
154 ASSERT(handles_count_ >= 0);
155 ASSERT(handles_[handles_count_] == handle);
160 intptr_t handles_count_;
161 MallocGrowableArray<T*> handles_;
163 template <
typename U>
171 : stack_(stack), handle_(stack_->Obtain()) {}
201 template <
typename T>
202 class ObjectSetTrait {
205 typedef const T*
Key;
207 typedef const T*
Pair;
209 static Key KeyOf(
Pair kv) {
return kv; }
210 static Value ValueOf(
Pair kv) {
return kv; }
214 class TypeSetTrait :
public ObjectSetTrait<const AbstractType> {
222 class TypeArgumentsSetTrait :
public ObjectSetTrait<const TypeArguments> {
226 return pair->
ptr() ==
key->ptr();
230 class TypeParameterSetTrait :
public ObjectSetTrait<const TypeParameter> {
234 return pair->
ptr() ==
key->ptr();
247 void UpdateAssertAssignableTypes(
ClassTable* class_table,
257 TypeSet assert_assignable_types_;
263#if !defined(DART_PRECOMPILED_RUNTIME)
270#if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
virtual bool Equals(const Instance &other) const
ReusableHandleStack(Zone *zone)
ScopedHandle(ReusableHandleStack< T > *stack)
static CodePtr DefaultCodeForType(const AbstractType &type, bool lazy_specialize=true)
CodePtr OptimizedCodeForType(const AbstractType &type)
static CodePtr SpecializeStubFor(Thread *thread, const AbstractType &type)
TypeTestingStubGenerator()
void WriteStubNameForTypeTo(BaseTextBuffer *buffer, const AbstractType &type) const
const char * StubNameForType(const AbstractType &type) const
bool IsUsedInTypeTest(const AbstractType &type)
void BuildTypeUsageInformation()
TypeUsageInfo(Thread *thread)
void UseTypeArgumentsInInstanceCreation(const Class &klass, const TypeArguments &ta)
void UseTypeInAssertAssignable(const AbstractType &type)
Dart_NativeFunction function
void DeoptimizeTypeTestingStubs()
void RegisterTypeArgumentsUse(const Function &function, TypeUsageInfo *type_usage_info, const Class &klass, Definition *type_arguments)
static uint32_t Hash(uint32_t key)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set