Flutter Engine
The Flutter Engine
object_store.cc
Go to the documentation of this file.
1// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#include "vm/object_store.h"
6
7#include "vm/dart_entry.h"
8#include "vm/exceptions.h"
9#include "vm/isolate.h"
10#include "vm/object.h"
11#include "vm/raw_object.h"
12#include "vm/resolver.h"
13#include "vm/stub_code.h"
14#include "vm/symbols.h"
15#include "vm/visitor.h"
16
17namespace dart {
18
20 ASSERT(visitor != nullptr);
21 visitor->set_gc_root_type("isolate_object store");
22 visitor->VisitPointers(from(), to());
23 visitor->clear_gc_root_type();
24}
25
27 for (ObjectPtr* current = from(); current <= to(); current++) {
28 *current = Object::null();
29 }
30}
31
32#ifndef PRODUCT
34 jsobj->AddProperty("type", "_IsolateObjectStore");
35
36 {
37 JSONObject fields(jsobj, "fields");
39
40 static const char* const names[] = {
41#define EMIT_FIELD_NAME(type, name) #name "_",
42 ISOLATE_OBJECT_STORE_FIELD_LIST(EMIT_FIELD_NAME, EMIT_FIELD_NAME)
43#undef EMIT_FIELD_NAME
44 };
45 ObjectPtr* current = from();
46 intptr_t i = 0;
47 while (current <= to()) {
48 value = *current;
49 fields.AddProperty(names[i], value);
50 current++;
51 i++;
52 }
54 }
55}
56#endif // !PRODUCT
57
58static StackTracePtr CreatePreallocatedStackTrace(Zone* zone) {
59 const Array& code_array = Array::Handle(
61 const TypedData& pc_offset_array = TypedData::Handle(
63 Heap::kOld));
64 const StackTrace& stack_trace =
65 StackTrace::Handle(zone, StackTrace::New(code_array, pc_offset_array));
66 // Expansion of inlined functions requires additional memory at run time,
67 // avoid it.
68 stack_trace.set_expand_inlined(false);
69 return stack_trace.ptr();
70}
71
72ErrorPtr IsolateObjectStore::PreallocateObjects(const Object& out_of_memory) {
73 Thread* thread = Thread::Current();
74 Isolate* isolate = thread->isolate();
75 Zone* zone = thread->zone();
76 ASSERT(isolate != nullptr && isolate->isolate_object_store() == this);
77 ASSERT(preallocated_stack_trace() == StackTrace::null());
78 resume_capabilities_ = GrowableObjectArray::New();
79 exit_listeners_ = GrowableObjectArray::New();
80 error_listeners_ = GrowableObjectArray::New();
81 dart_args_1_ = Array::New(1);
82 dart_args_2_ = Array::New(2);
83
84 // Allocate pre-allocated unhandled exception object initialized with the
85 // pre-allocated OutOfMemoryError.
86 const StackTrace& preallocated_stack_trace =
88 set_preallocated_stack_trace(preallocated_stack_trace);
89 set_preallocated_unhandled_exception(UnhandledException::Handle(
90 zone, UnhandledException::New(Instance::Cast(out_of_memory),
91 preallocated_stack_trace)));
92 const UnwindError& preallocated_unwind_error =
94 zone, String::New("isolate is exiting"))));
95 set_preallocated_unwind_error(preallocated_unwind_error);
96
97 return Error::null();
98}
99
101 :
102#define EMIT_FIELD_INIT(type, name) name##_(nullptr),
112#undef EMIT_FIELD_INIT
113 // Just to prevent a trailing comma.
114 unused_field_(0) {
115 for (ObjectPtr* current = from(); current <= to(); current++) {
116 *current = Object::null();
117 }
118}
119
121
123 ASSERT(visitor != nullptr);
124 visitor->set_gc_root_type("object store");
125 visitor->VisitPointers(from(), to());
126 visitor->clear_gc_root_type();
127}
128
130#define DO(member, name) set_##member(StubCode::name());
132#undef DO
133}
134
135#ifndef PRODUCT
137 jsobj->AddProperty("type", "_ObjectStore");
138
139 {
140 JSONObject fields(jsobj, "fields");
142 static const char* const names[] = {
143#define EMIT_FIELD_NAME(type, name) #name "_",
148#undef EMIT_FIELD_NAME
149 };
150 ObjectPtr* current = from();
151 intptr_t i = 0;
152 while (current <= to()) {
153 value = *current;
154 fields.AddProperty(names[i], value);
155 current++;
156 i++;
157 }
159 }
160}
161#endif // !PRODUCT
162
163static InstancePtr AllocateObjectByClassName(const Library& library,
164 const String& class_name) {
166 ASSERT(!cls.IsNull());
167 return Instance::New(cls);
168}
169
171 Thread* thread = Thread::Current();
172 IsolateGroup* isolate_group = thread->isolate_group();
173 // Either we are the object store on isolate group, or isolate group has no
174 // object store and we are the object store on the isolate.
175 ASSERT(isolate_group != nullptr && isolate_group->object_store() == this);
176
177 if (this->stack_overflow() != Instance::null()) {
178 ASSERT(this->out_of_memory() != Instance::null());
179 return Error::null();
180 }
181 ASSERT(this->stack_overflow() == Instance::null());
182 ASSERT(this->out_of_memory() == Instance::null());
183
185 const Library& library = Library::Handle(Library::CoreLibrary());
186
187 result = AllocateObjectByClassName(library, Symbols::StackOverflowError());
188 if (result.IsError()) {
189 return Error::Cast(result).ptr();
190 }
191 set_stack_overflow(Instance::Cast(result));
192
193 result = AllocateObjectByClassName(library, Symbols::OutOfMemoryError());
194 if (result.IsError()) {
195 return Error::Cast(result).ptr();
196 }
197 set_out_of_memory(Instance::Cast(result));
198
199 return Error::null();
200}
201
202FunctionPtr ObjectStore::PrivateObjectLookup(const String& name) {
203 const Library& core_lib = Library::Handle(core_library());
204 const String& mangled = String::ZoneHandle(core_lib.PrivateName(name));
205 const Class& cls = Class::Handle(object_class());
206 Thread* thread = Thread::Current();
207 const auto& error = cls.EnsureIsFinalized(thread);
210 Resolver::ResolveDynamicFunction(thread->zone(), cls, mangled));
211 ASSERT(!result.IsNull());
212 return result.ptr();
213}
214
216 Thread* thread = Thread::Current();
217 Zone* zone = thread->zone();
218 Class& cls = Class::Handle(zone);
219 const Library& collection_lib = Library::Handle(zone, collection_library());
220 cls = collection_lib.LookupClassAllowPrivate(Symbols::_Set());
221 ASSERT(!cls.IsNull());
222 set_set_impl_class(cls);
223
224#if defined(DART_PRECOMPILED_RUNTIME)
225 // The rest of these objects are only needed for code generation.
226 return;
227#else
228 auto isolate_group = thread->isolate_group();
229 ASSERT(isolate_group != nullptr && isolate_group->object_store() == this);
230
231 const Library& async_lib = Library::Handle(zone, async_library());
232 ASSERT(!async_lib.IsNull());
233 cls = async_lib.LookupClass(Symbols::Future());
234 ASSERT(!cls.IsNull());
235 set_future_class(cls);
236
239 Field& field = Field::Handle(zone);
240
241 cls =
242 async_lib.LookupClassAllowPrivate(Symbols::_AsyncStarStreamController());
243 ASSERT(!cls.IsNull());
245 set_async_star_stream_controller(cls);
246
247 function = cls.LookupFunctionAllowPrivate(Symbols::add());
248 ASSERT(!function.IsNull());
249 set_async_star_stream_controller_add(function);
250
251 function = cls.LookupFunctionAllowPrivate(Symbols::addStream());
252 ASSERT(!function.IsNull());
253 set_async_star_stream_controller_add_stream(function);
254
255 field = cls.LookupFieldAllowPrivate(Symbols::asyncStarBody());
256 ASSERT(!field.IsNull());
257 set_async_star_stream_controller_async_star_body(field);
258
259#if !defined(PRODUCT)
260 // Disable debugging and inlining of all functions on the
261 // _AsyncStarStreamController class.
262 const Array& functions = Array::Handle(zone, cls.current_functions());
263 for (intptr_t i = 0; i < functions.Length(); i++) {
264 function ^= functions.At(i);
265 if (function.IsNull()) {
266 break;
267 }
268 function.set_is_debuggable(false);
269 function.set_is_inlinable(false);
270 }
271#endif
272
273 cls = async_lib.LookupClassAllowPrivate(Symbols::Stream());
274 ASSERT(!cls.IsNull());
275 set_stream_class(cls);
276
277 cls = async_lib.LookupClassAllowPrivate(Symbols::_SuspendState());
278 ASSERT(!cls.IsNull());
279 const auto& error = cls.EnsureIsFinalized(thread);
281
282 function = cls.LookupFunctionAllowPrivate(Symbols::_initAsync());
283 ASSERT(!function.IsNull());
284 set_suspend_state_init_async(function);
285
286 function = cls.LookupFunctionAllowPrivate(Symbols::_await());
287 ASSERT(!function.IsNull());
288 set_suspend_state_await(function);
289
290 function = cls.LookupFunctionAllowPrivate(Symbols::_awaitWithTypeCheck());
291 ASSERT(!function.IsNull());
292 set_suspend_state_await_with_type_check(function);
293
294 function = cls.LookupFunctionAllowPrivate(Symbols::_returnAsync());
295 ASSERT(!function.IsNull());
296 set_suspend_state_return_async(function);
297
298 function = cls.LookupFunctionAllowPrivate(Symbols::_returnAsyncNotFuture());
299 ASSERT(!function.IsNull());
300 set_suspend_state_return_async_not_future(function);
301
302 function = cls.LookupFunctionAllowPrivate(Symbols::_initAsyncStar());
303 ASSERT(!function.IsNull());
304 set_suspend_state_init_async_star(function);
305
306 function = cls.LookupFunctionAllowPrivate(Symbols::_yieldAsyncStar());
307 ASSERT(!function.IsNull());
308 set_suspend_state_yield_async_star(function);
309
310 function = cls.LookupFunctionAllowPrivate(Symbols::_returnAsyncStar());
311 ASSERT(!function.IsNull());
312 set_suspend_state_return_async_star(function);
313
314 function = cls.LookupFunctionAllowPrivate(Symbols::_initSyncStar());
315 ASSERT(!function.IsNull());
316 set_suspend_state_init_sync_star(function);
317
318 function = cls.LookupFunctionAllowPrivate(Symbols::_suspendSyncStarAtStart());
319 ASSERT(!function.IsNull());
320 set_suspend_state_suspend_sync_star_at_start(function);
321
322 function = cls.LookupFunctionAllowPrivate(Symbols::_handleException());
323 ASSERT(!function.IsNull());
324 set_suspend_state_handle_exception(function);
325
326 cls = async_lib.LookupClassAllowPrivate(Symbols::_SyncStarIterator());
327 ASSERT(!cls.IsNull());
329 set_sync_star_iterator_class(cls);
330
331 field = cls.LookupFieldAllowPrivate(Symbols::_current());
332 ASSERT(!field.IsNull());
333 set_sync_star_iterator_current(field);
334
335 field = cls.LookupFieldAllowPrivate(Symbols::_state());
336 ASSERT(!field.IsNull());
337 set_sync_star_iterator_state(field);
338
339 field = cls.LookupFieldAllowPrivate(Symbols::_yieldStarIterable());
340 ASSERT(!field.IsNull());
341 set_sync_star_iterator_yield_star_iterable(field);
342
343 const Library& core_lib = Library::Handle(zone, core_library());
344 cls = core_lib.LookupClassAllowPrivate(Symbols::_CompileTimeError());
345 ASSERT(!cls.IsNull());
346 set_compiletime_error_class(cls);
347
348 cls = core_lib.LookupClassAllowPrivate(Symbols::Pragma());
349 ASSERT(!cls.IsNull());
350 set_pragma_class(cls);
352 set_pragma_name(Field::Handle(zone, cls.LookupField(Symbols::name())));
353 set_pragma_options(Field::Handle(zone, cls.LookupField(Symbols::options())));
354
355 cls = core_lib.LookupClassAllowPrivate(Symbols::_GrowableList());
356 ASSERT(!cls.IsNull());
358 growable_list_factory_ =
359 cls.LookupFactoryAllowPrivate(Symbols::_GrowableListFactory());
360 ASSERT(growable_list_factory_ != Function::null());
361
362 cls = core_lib.LookupClassAllowPrivate(Symbols::Error());
363 ASSERT(!cls.IsNull());
364 set_error_class(cls);
365
366 cls = core_lib.LookupClassAllowPrivate(Symbols::Expando());
367 ASSERT(!cls.IsNull());
368 set_expando_class(cls);
369
370 cls = core_lib.LookupClassAllowPrivate(Symbols::Iterable());
371 ASSERT(!cls.IsNull());
372 set_iterable_class(cls);
373
374 // Cache the core private functions used for fast instance of checks.
375 simple_instance_of_function_ =
376 PrivateObjectLookup(Symbols::_simpleInstanceOf());
377 simple_instance_of_true_function_ =
378 PrivateObjectLookup(Symbols::_simpleInstanceOfTrue());
379 simple_instance_of_false_function_ =
380 PrivateObjectLookup(Symbols::_simpleInstanceOfFalse());
381
382 // Ensure AddSmiSmiCheckForFastSmiStubs run by the background compiler
383 // will not create new functions.
384 const Class& smi_class = Class::Handle(zone, this->smi_class());
385 RELEASE_ASSERT(smi_class.EnsureIsFinalized(thread) == Error::null());
389 /*allow_add=*/true);
393 /*allow_add=*/true);
397 /*allow_add=*/true);
401 /*allow_add=*/true);
405 /*allow_add=*/true);
409 /*allow_add=*/true);
413 /*allow_add=*/true);
417 /*allow_add=*/true);
418#endif // defined(DART_PRECOMPILED_RUNTIME)
419}
420
421void ObjectStore::LazyInitCoreMembers() {
422 auto* const thread = Thread::Current();
423 SafepointWriteRwLocker locker(thread,
424 thread->isolate_group()->program_lock());
425 if (list_class_.load() == Type::null()) {
426 ASSERT(non_nullable_list_rare_type_.load() == Type::null());
427 ASSERT(non_nullable_map_rare_type_.load() == Type::null());
428 ASSERT(enum_index_field_.load() == Field::null());
429 ASSERT(enum_name_field_.load() == Field::null());
430 ASSERT(_object_equals_function_.load() == Function::null());
431 ASSERT(_object_hash_code_function_.load() == Function::null());
432 ASSERT(_object_to_string_function_.load() == Function::null());
433
434 auto* const zone = thread->zone();
435 const auto& core_lib = Library::Handle(zone, Library::CoreLibrary());
436 auto& cls = Class::Handle(zone);
437
438 cls = core_lib.LookupClass(Symbols::List());
439 ASSERT(!cls.IsNull());
440 list_class_.store(cls.ptr());
441
442 auto& type = Type::Handle(zone);
443 type = cls.RareType();
444 non_nullable_list_rare_type_.store(type.ptr());
445
446 cls = core_lib.LookupClass(Symbols::Map());
447 ASSERT(!cls.IsNull());
448 map_class_.store(cls.ptr());
449
450 type = cls.RareType();
451 non_nullable_map_rare_type_.store(type.ptr());
452
453 cls = core_lib.LookupClass(Symbols::Set());
454 ASSERT(!cls.IsNull());
455 set_class_.store(cls.ptr());
456
457 auto& field = Field::Handle(zone);
458
459 cls = core_lib.LookupClassAllowPrivate(Symbols::_Enum());
460 ASSERT(!cls.IsNull());
461 const auto& error = cls.EnsureIsFinalized(thread);
463
464 field = cls.LookupInstanceField(Symbols::Index());
465 ASSERT(!field.IsNull());
466 enum_index_field_.store(field.ptr());
467
469 ASSERT(!field.IsNull());
470 enum_name_field_.store(field.ptr());
471
472 auto& function = Function::Handle(zone);
473
474 function = core_lib.LookupFunctionAllowPrivate(Symbols::_objectHashCode());
475 ASSERT(!function.IsNull());
476 _object_hash_code_function_.store(function.ptr());
477
478 function = core_lib.LookupFunctionAllowPrivate(Symbols::_objectEquals());
479 ASSERT(!function.IsNull());
480 _object_equals_function_.store(function.ptr());
481
482 function = core_lib.LookupFunctionAllowPrivate(Symbols::_objectToString());
483 ASSERT(!function.IsNull());
484 _object_to_string_function_.store(function.ptr());
485 }
486}
487
488void ObjectStore::LazyInitAsyncMembers() {
489 auto* const thread = Thread::Current();
490 SafepointWriteRwLocker locker(thread,
491 thread->isolate_group()->program_lock());
492 if (nullable_future_null_type_.load() == Type::null()) {
493 ASSERT(non_nullable_future_never_type_.load() == Type::null());
494
495 auto* const zone = thread->zone();
496 const auto& cls = Class::Handle(zone, future_class());
497 ASSERT(!cls.IsNull());
498
499 auto& type_args = TypeArguments::Handle(zone);
500 auto& type = Type::Handle(zone);
501 type = never_type();
502 ASSERT(!type.IsNull());
503 type_args = TypeArguments::New(1);
504 type_args.SetTypeAt(0, type);
505 type = Type::New(cls, type_args, Nullability::kNonNullable);
506 type.SetIsFinalized();
507 type ^= type.Canonicalize(thread);
508 non_nullable_future_never_type_.store(type.ptr());
509
510 type = null_type();
511 ASSERT(!type.IsNull());
512 type_args = TypeArguments::New(1);
513 type_args.SetTypeAt(0, type);
514 type = Type::New(cls, type_args, Nullability::kNullable);
515 type.SetIsFinalized();
516 type ^= type.Canonicalize(thread);
517 nullable_future_null_type_.store(type.ptr());
518 }
519}
520
521void ObjectStore::LazyInitFfiMembers() {
522 auto* const thread = Thread::Current();
523 SafepointWriteRwLocker locker(thread,
524 thread->isolate_group()->program_lock());
525 if (handle_finalizer_message_function_.load() == Function::null()) {
526 auto* const zone = thread->zone();
527 auto& cls = Class::Handle(zone);
528 auto& function = Function::Handle(zone);
529 auto& error = Error::Handle(zone);
530
531 const auto& ffi_lib = Library::Handle(zone, Library::FfiLibrary());
532 ASSERT(!ffi_lib.IsNull());
533
534 cls = finalizer_class();
535 ASSERT(!cls.IsNull());
536 error = cls.EnsureIsFinalized(thread);
537 ASSERT(error.IsNull());
538 function =
539 cls.LookupFunctionAllowPrivate(Symbols::_handleFinalizerMessage());
540 ASSERT(!function.IsNull());
541 handle_finalizer_message_function_.store(function.ptr());
542
543 cls = native_finalizer_class();
544 ASSERT(!cls.IsNull());
545 error = cls.EnsureIsFinalized(thread);
546 ASSERT(error.IsNull());
548 Symbols::_handleNativeFinalizerMessage());
549 ASSERT(!function.IsNull());
550 handle_native_finalizer_message_function_.store(function.ptr());
551
552 cls = ffi_lib.LookupClass(Symbols::FfiNative());
553 ASSERT(!cls.IsNull());
554 error = cls.EnsureIsFinalized(thread);
555 ASSERT(error.IsNull());
556 function =
557 cls.LookupStaticFunctionAllowPrivate(Symbols::_ffi_resolver_function());
558 ASSERT(!function.IsNull());
559 ffi_resolver_function_.store(function.ptr());
560
561 cls = ffi_lib.LookupClass(Symbols::VarArgs());
562 ASSERT(!cls.IsNull());
563 varargs_class_.store(cls.ptr());
564 }
565}
566
567void ObjectStore::LazyInitIsolateMembers() {
568 auto* const thread = Thread::Current();
569 SafepointWriteRwLocker locker(thread,
570 thread->isolate_group()->program_lock());
571 if (lookup_port_handler_.load() == Type::null()) {
572 ASSERT(lookup_open_ports_.load() == Type::null());
573 ASSERT(handle_message_function_.load() == Type::null());
574
575 auto* const zone = thread->zone();
576 const auto& isolate_lib = Library::Handle(zone, Library::IsolateLibrary());
577 auto& cls = Class::Handle(zone);
578 auto& function = Function::Handle(zone);
579
580 cls = isolate_lib.LookupClass(Symbols::Capability());
581 ASSERT(!cls.IsNull());
582 capability_class_.store(cls.ptr());
583
584 cls = isolate_lib.LookupClass(Symbols::SendPort());
585 ASSERT(!cls.IsNull());
586 send_port_class_.store(cls.ptr());
587
588 cls = isolate_lib.LookupClass(Symbols::TransferableTypedData());
589 ASSERT(!cls.IsNull());
590 transferable_class_.store(cls.ptr());
591
592 cls = isolate_lib.LookupClassAllowPrivate(Symbols::_RawReceivePort());
593 ASSERT(!cls.IsNull());
594 const auto& error = cls.EnsureIsFinalized(thread);
596
597 function = cls.LookupFunctionAllowPrivate(Symbols::_lookupHandler());
598 ASSERT(!function.IsNull());
599 lookup_port_handler_.store(function.ptr());
600
601 function = cls.LookupFunctionAllowPrivate(Symbols::_lookupOpenPorts());
602 ASSERT(!function.IsNull());
603 lookup_open_ports_.store(function.ptr());
604
605 function = cls.LookupFunctionAllowPrivate(Symbols::_handleMessage());
606 ASSERT(!function.IsNull());
607 handle_message_function_.store(function.ptr());
608 }
609}
610
611void ObjectStore::LazyInitInternalMembers() {
612 auto* const thread = Thread::Current();
613 SafepointWriteRwLocker locker(thread,
614 thread->isolate_group()->program_lock());
615 if (symbol_class_.load() == Type::null()) {
616 ASSERT(symbol_name_field_.load() == Field::null());
617
618 auto* const zone = thread->zone();
619 auto& cls = Class::Handle(zone);
620 auto& field = Field::Handle(zone);
621 auto& error = Error::Handle(zone);
622
623 const auto& internal_lib =
625 cls = internal_lib.LookupClass(Symbols::Symbol());
626 ASSERT(!cls.IsNull());
627 error = cls.EnsureIsFinalized(thread);
628 ASSERT(error.IsNull());
629 symbol_class_.store(cls.ptr());
630
632 ASSERT(!field.IsNull());
633 symbol_name_field_.store(field.ptr());
634 }
635}
636
637} // namespace dart
const char * options
NSString * _name
SkIDChangeListener::List List
#define RELEASE_ASSERT(cond)
Definition: assert.h:327
GLenum type
static ArrayPtr New(intptr_t len, Heap::Space space=Heap::kNew)
Definition: object.h:10959
ObjectPtr At(intptr_t index) const
Definition: object.h:10875
intptr_t Length() const
Definition: object.h:10829
FieldPtr LookupInstanceField(const String &name) const
Definition: object.cc:6344
FunctionPtr LookupFunctionAllowPrivate(const String &name) const
Definition: object.cc:6167
FieldPtr LookupInstanceFieldAllowPrivate(const String &name) const
Definition: object.cc:6434
TypePtr RareType() const
Definition: object.cc:3036
FunctionPtr LookupStaticFunctionAllowPrivate(const String &name) const
Definition: object.cc:6143
ErrorPtr EnsureIsFinalized(Thread *thread) const
Definition: object.cc:4924
FieldPtr LookupField(const String &name) const
Definition: object.cc:6352
FunctionPtr LookupFactoryAllowPrivate(const String &name) const
Definition: object.cc:6163
FieldPtr LookupFieldAllowPrivate(const String &name, bool instance_only=false) const
Definition: object.cc:6403
ArrayPtr current_functions() const
Definition: object.h:1641
static StringPtr CreateDynamicInvocationForwarderName(const String &name)
Definition: object.cc:4205
static GrowableObjectArrayPtr New(Heap::Space space=Heap::kNew)
Definition: object.h:11144
@ kOld
Definition: heap.h:39
static InstancePtr New(const Class &cls, Heap::Space space=Heap::kNew)
Definition: object.cc:20935
ObjectStore * object_store() const
Definition: isolate.h:510
SafepointRwLock * program_lock()
Definition: isolate.h:537
void PrintToJSONObject(JSONObject *jsobj)
Definition: object_store.cc:33
ErrorPtr PreallocateObjects(const Object &out_of_memory)
Definition: object_store.cc:72
void VisitObjectPointers(ObjectPointerVisitor *visitor)
Definition: object_store.cc:19
IsolateObjectStore * isolate_object_store() const
Definition: isolate.h:1007
void AddProperty(const char *name, bool b) const
Definition: json_stream.h:395
static LibraryPtr CoreLibrary()
Definition: object.cc:14787
StringPtr PrivateName(const String &name) const
Definition: object.cc:14704
static LibraryPtr IsolateLibrary()
Definition: object.cc:14807
ClassPtr LookupClassAllowPrivate(const String &name) const
Definition: object.cc:14113
FunctionPtr LookupFunctionAllowPrivate(const String &name) const
Definition: object.cc:14084
ClassPtr LookupClass(const String &name) const
Definition: object.cc:14105
static LibraryPtr InternalLibrary()
Definition: object.cc:14803
static LibraryPtr FfiLibrary()
Definition: object.cc:14799
void set_gc_root_type(const char *gc_root_type)
Definition: visitor.h:58
virtual void VisitPointers(ObjectPtr *first, ObjectPtr *last)=0
ErrorPtr PreallocateObjects()
void VisitObjectPointers(ObjectPointerVisitor *visitor)
void PrintToJSONObject(JSONObject *jsobj)
OBJECT_STORE_FIELD_LIST(DECLARE_GETTER, DECLARE_GETTER_AND_SETTER, DECLARE_RELAXED_ATOMIC_GETTER_AND_SETTER, DECLARE_ACQREL_ATOMIC_GETTER_AND_SETTER, DECLARE_LAZY_INIT_CORE_GETTER, DECLARE_LAZY_INIT_ASYNC_GETTER, DECLARE_LAZY_INIT_ISOLATE_GETTER, DECLARE_LAZY_INIT_INTERNAL_GETTER, DECLARE_LAZY_INIT_FFI_GETTER) LibraryPtr bootstrap_library(BootstrapLibraryId index)
Definition: object_store.h:508
static ObjectPtr null()
Definition: object.h:433
ObjectPtr ptr() const
Definition: object.h:332
bool IsNull() const
Definition: object.h:363
static Object & Handle()
Definition: object.h:407
static Object & ZoneHandle()
Definition: object.h:419
static FunctionPtr ResolveDynamicAnyArgs(Zone *zone, const Class &receiver_class, const String &function_name, bool allow_add)
Definition: resolver.cc:185
static FunctionPtr ResolveDynamicFunction(Zone *zone, const Class &receiver_class, const String &function_name)
Definition: resolver.cc:176
static constexpr int kPreallocatedStackdepth
Definition: object.h:12558
static StackTracePtr New(const Array &code_array, const TypedData &pc_offset_array, Heap::Space space=Heap::kNew)
Definition: object.cc:26069
void set_expand_inlined(bool value) const
Definition: object.cc:26061
static StringPtr New(const char *cstr, Heap::Space space=Heap::kNew)
Definition: object.cc:23698
static const String & Symbol(intptr_t index)
Definition: symbols.h:607
static const String & Plus()
Definition: symbols.h:617
static const String & LAngleBracket()
Definition: symbols.h:623
static const String & BitOr()
Definition: symbols.h:619
static const String & RAngleBracket()
Definition: symbols.h:626
static const String & Star()
Definition: symbols.h:678
static const String & BitAnd()
Definition: symbols.h:620
static const String & Minus()
Definition: symbols.h:618
static const String & Equals()
Definition: symbols.h:614
Zone * zone() const
Definition: thread_state.h:37
static Thread * Current()
Definition: thread.h:362
Isolate * isolate() const
Definition: thread.h:534
IsolateGroup * isolate_group() const
Definition: thread.h:541
static TypeArgumentsPtr New(intptr_t len, Heap::Space space=Heap::kOld)
Definition: object.cc:7675
static TypePtr New(const Class &clazz, const TypeArguments &arguments, Nullability nullability=Nullability::kNonNullable, Heap::Space space=Heap::kOld)
static TypedDataPtr New(intptr_t class_id, intptr_t len, Heap::Space space=Heap::kNew)
Definition: object.cc:25587
static UnhandledExceptionPtr New(const Instance &exception, const Instance &stacktrace, Heap::Space space=Heap::kNew)
Definition: object.cc:19939
static UnwindErrorPtr New(const String &message, Heap::Space space=Heap::kNew)
Definition: object.cc:20005
#define ASSERT(E)
const uint8_t uint32_t uint32_t GError ** error
uint8_t value
GAsyncResult * result
Dart_NativeFunction function
Definition: fuchsia.cc:51
Definition: dart_vm.cc:33
static const char *const names[]
Definition: symbols.cc:24
const char *const name
const char *const class_name
static StackTracePtr CreatePreallocatedStackTrace(Zone *zone)
Definition: object_store.cc:58
static InstancePtr AllocateObjectByClassName(const Library &library, const String &class_name)
const char *const function_name
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
#define DO(member, name)
#define EMIT_FIELD_INIT(type, name)
#define EMIT_FIELD_NAME(type, name)
#define OBJECT_STORE_FIELD_LIST(R_, RW, ARW_RELAXED, ARW_AR, LAZY_CORE, LAZY_ASYNC, LAZY_ISOLATE, LAZY_INTERNAL, LAZY_FFI)
Definition: object_store.h:41
#define OBJECT_STORE_STUB_CODE_LIST(DO)
Definition: object_store.h:296
#define ARRAY_SIZE(array)
Definition: globals.h:72