| Index: runtime/vm/object_store.cc
|
| diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
|
| index 8812a8ee50c3e8336d36ea31ca334bd9e0a644e7..312e02aa0605abb8b60ee5313675285d03004c67 100644
|
| --- a/runtime/vm/object_store.cc
|
| +++ b/runtime/vm/object_store.cc
|
| @@ -15,99 +15,98 @@
|
| namespace dart {
|
|
|
| ObjectStore::ObjectStore()
|
| - : object_class_(Class::null()),
|
| - object_type_(Type::null()),
|
| - null_class_(Class::null()),
|
| - null_type_(Type::null()),
|
| - function_type_(Type::null()),
|
| - closure_class_(Class::null()),
|
| - number_type_(Type::null()),
|
| - int_type_(Type::null()),
|
| - integer_implementation_class_(Class::null()),
|
| - smi_class_(Class::null()),
|
| - smi_type_(Type::null()),
|
| - mint_class_(Class::null()),
|
| - mint_type_(Type::null()),
|
| - bigint_class_(Class::null()),
|
| - double_class_(Class::null()),
|
| - double_type_(Type::null()),
|
| - float32x4_type_(Type::null()),
|
| - int32x4_type_(Type::null()),
|
| - float64x2_type_(Type::null()),
|
| - string_type_(Type::null()),
|
| - compiletime_error_class_(Class::null()),
|
| - future_class_(Class::null()),
|
| - completer_class_(Class::null()),
|
| - stream_iterator_class_(Class::null()),
|
| - symbol_class_(Class::null()),
|
| - one_byte_string_class_(Class::null()),
|
| - two_byte_string_class_(Class::null()),
|
| - external_one_byte_string_class_(Class::null()),
|
| - external_two_byte_string_class_(Class::null()),
|
| - bool_type_(Type::null()),
|
| - bool_class_(Class::null()),
|
| - array_class_(Class::null()),
|
| - array_type_(Type::null()),
|
| - immutable_array_class_(Class::null()),
|
| - growable_object_array_class_(Class::null()),
|
| - linked_hash_map_class_(Class::null()),
|
| - float32x4_class_(Class::null()),
|
| - int32x4_class_(Class::null()),
|
| - float64x2_class_(Class::null()),
|
| - error_class_(Class::null()),
|
| - weak_property_class_(Class::null()),
|
| - symbol_table_(Array::null()),
|
| - canonical_types_(Array::null()),
|
| - canonical_type_arguments_(Array::null()),
|
| - async_library_(Library::null()),
|
| - builtin_library_(Library::null()),
|
| - core_library_(Library::null()),
|
| - collection_library_(Library::null()),
|
| - convert_library_(Library::null()),
|
| - developer_library_(Library::null()),
|
| - internal_library_(Library::null()),
|
| - isolate_library_(Library::null()),
|
| - math_library_(Library::null()),
|
| - mirrors_library_(Library::null()),
|
| - native_wrappers_library_(Library::null()),
|
| - profiler_library_(Library::null()),
|
| - root_library_(Library::null()),
|
| - typed_data_library_(Library::null()),
|
| - vmservice_library_(Library::null()),
|
| - libraries_(GrowableObjectArray::null()),
|
| - libraries_map_(Array::null()),
|
| - closure_functions_(GrowableObjectArray::null()),
|
| - pending_classes_(GrowableObjectArray::null()),
|
| - pending_deferred_loads_(GrowableObjectArray::null()),
|
| - resume_capabilities_(GrowableObjectArray::null()),
|
| - exit_listeners_(GrowableObjectArray::null()),
|
| - error_listeners_(GrowableObjectArray::null()),
|
| - empty_context_(Context::null()),
|
| - stack_overflow_(Instance::null()),
|
| - out_of_memory_(Instance::null()),
|
| - preallocated_unhandled_exception_(UnhandledException::null()),
|
| - preallocated_stack_trace_(Stacktrace::null()),
|
| - lookup_port_handler_(Function::null()),
|
| - empty_uint32_array_(TypedData::null()),
|
| - handle_message_function_(Function::null()),
|
| - simple_instance_of_function_(Function::null()),
|
| - simple_instance_of_true_function_(Function::null()),
|
| - simple_instance_of_false_function_(Function::null()),
|
| - library_load_error_table_(Array::null()),
|
| - unique_dynamic_targets_(Array::null()),
|
| - token_objects_(GrowableObjectArray::null()),
|
| - token_objects_map_(Array::null()),
|
| - megamorphic_cache_table_(GrowableObjectArray::null()),
|
| - megamorphic_miss_code_(Code::null()),
|
| - megamorphic_miss_function_(Function::null()) {
|
| + : object_class_(Class::null()),
|
| + object_type_(Type::null()),
|
| + null_class_(Class::null()),
|
| + null_type_(Type::null()),
|
| + function_type_(Type::null()),
|
| + closure_class_(Class::null()),
|
| + number_type_(Type::null()),
|
| + int_type_(Type::null()),
|
| + integer_implementation_class_(Class::null()),
|
| + smi_class_(Class::null()),
|
| + smi_type_(Type::null()),
|
| + mint_class_(Class::null()),
|
| + mint_type_(Type::null()),
|
| + bigint_class_(Class::null()),
|
| + double_class_(Class::null()),
|
| + double_type_(Type::null()),
|
| + float32x4_type_(Type::null()),
|
| + int32x4_type_(Type::null()),
|
| + float64x2_type_(Type::null()),
|
| + string_type_(Type::null()),
|
| + compiletime_error_class_(Class::null()),
|
| + future_class_(Class::null()),
|
| + completer_class_(Class::null()),
|
| + stream_iterator_class_(Class::null()),
|
| + symbol_class_(Class::null()),
|
| + one_byte_string_class_(Class::null()),
|
| + two_byte_string_class_(Class::null()),
|
| + external_one_byte_string_class_(Class::null()),
|
| + external_two_byte_string_class_(Class::null()),
|
| + bool_type_(Type::null()),
|
| + bool_class_(Class::null()),
|
| + array_class_(Class::null()),
|
| + array_type_(Type::null()),
|
| + immutable_array_class_(Class::null()),
|
| + growable_object_array_class_(Class::null()),
|
| + linked_hash_map_class_(Class::null()),
|
| + float32x4_class_(Class::null()),
|
| + int32x4_class_(Class::null()),
|
| + float64x2_class_(Class::null()),
|
| + error_class_(Class::null()),
|
| + weak_property_class_(Class::null()),
|
| + symbol_table_(Array::null()),
|
| + canonical_types_(Array::null()),
|
| + canonical_type_arguments_(Array::null()),
|
| + async_library_(Library::null()),
|
| + builtin_library_(Library::null()),
|
| + core_library_(Library::null()),
|
| + collection_library_(Library::null()),
|
| + convert_library_(Library::null()),
|
| + developer_library_(Library::null()),
|
| + internal_library_(Library::null()),
|
| + isolate_library_(Library::null()),
|
| + math_library_(Library::null()),
|
| + mirrors_library_(Library::null()),
|
| + native_wrappers_library_(Library::null()),
|
| + profiler_library_(Library::null()),
|
| + root_library_(Library::null()),
|
| + typed_data_library_(Library::null()),
|
| + vmservice_library_(Library::null()),
|
| + libraries_(GrowableObjectArray::null()),
|
| + libraries_map_(Array::null()),
|
| + closure_functions_(GrowableObjectArray::null()),
|
| + pending_classes_(GrowableObjectArray::null()),
|
| + pending_deferred_loads_(GrowableObjectArray::null()),
|
| + resume_capabilities_(GrowableObjectArray::null()),
|
| + exit_listeners_(GrowableObjectArray::null()),
|
| + error_listeners_(GrowableObjectArray::null()),
|
| + empty_context_(Context::null()),
|
| + stack_overflow_(Instance::null()),
|
| + out_of_memory_(Instance::null()),
|
| + preallocated_unhandled_exception_(UnhandledException::null()),
|
| + preallocated_stack_trace_(Stacktrace::null()),
|
| + lookup_port_handler_(Function::null()),
|
| + empty_uint32_array_(TypedData::null()),
|
| + handle_message_function_(Function::null()),
|
| + simple_instance_of_function_(Function::null()),
|
| + simple_instance_of_true_function_(Function::null()),
|
| + simple_instance_of_false_function_(Function::null()),
|
| + library_load_error_table_(Array::null()),
|
| + unique_dynamic_targets_(Array::null()),
|
| + token_objects_(GrowableObjectArray::null()),
|
| + token_objects_map_(Array::null()),
|
| + megamorphic_cache_table_(GrowableObjectArray::null()),
|
| + megamorphic_miss_code_(Code::null()),
|
| + megamorphic_miss_function_(Function::null()) {
|
| for (RawObject** current = from(); current <= to(); current++) {
|
| ASSERT(*current == Object::null());
|
| }
|
| }
|
|
|
|
|
| -ObjectStore::~ObjectStore() {
|
| -}
|
| +ObjectStore::~ObjectStore() {}
|
|
|
|
|
| void ObjectStore::VisitObjectPointers(ObjectPointerVisitor* visitor) {
|
| @@ -134,9 +133,9 @@ void ObjectStore::PrintToJSONObject(JSONObject* jsobj) {
|
| JSONObject fields(jsobj, "fields");
|
| Object& value = Object::Handle();
|
| #define PRINT_OBJECT_STORE_FIELD(type, name) \
|
| - value = name; \
|
| - fields.AddProperty(#name, value);
|
| -OBJECT_STORE_FIELD_LIST(PRINT_OBJECT_STORE_FIELD);
|
| + value = name; \
|
| + fields.AddProperty(#name, value);
|
| + OBJECT_STORE_FIELD_LIST(PRINT_OBJECT_STORE_FIELD);
|
| #undef PRINT_OBJECT_STORE_FIELD
|
| }
|
| }
|
| @@ -167,19 +166,17 @@ RawError* ObjectStore::PreallocateObjects() {
|
| Object& result = Object::Handle();
|
| const Library& library = Library::Handle(Library::CoreLibrary());
|
|
|
| - result = DartLibraryCalls::InstanceCreate(library,
|
| - Symbols::StackOverflowError(),
|
| - Symbols::Dot(),
|
| - Object::empty_array());
|
| + result =
|
| + DartLibraryCalls::InstanceCreate(library, Symbols::StackOverflowError(),
|
| + Symbols::Dot(), Object::empty_array());
|
| if (result.IsError()) {
|
| return Error::Cast(result).raw();
|
| }
|
| set_stack_overflow(Instance::Cast(result));
|
|
|
| - result = DartLibraryCalls::InstanceCreate(library,
|
| - Symbols::OutOfMemoryError(),
|
| - Symbols::Dot(),
|
| - Object::empty_array());
|
| + result =
|
| + DartLibraryCalls::InstanceCreate(library, Symbols::OutOfMemoryError(),
|
| + Symbols::Dot(), Object::empty_array());
|
| if (result.IsError()) {
|
| return Error::Cast(result).raw();
|
| }
|
| @@ -187,17 +184,17 @@ RawError* ObjectStore::PreallocateObjects() {
|
|
|
| // Allocate pre-allocated unhandled exception object initialized with the
|
| // pre-allocated OutOfMemoryError.
|
| - const UnhandledException& unhandled_exception = UnhandledException::Handle(
|
| - UnhandledException::New(Instance::Cast(result),
|
| - Stacktrace::Handle(zone)));
|
| + const UnhandledException& unhandled_exception =
|
| + UnhandledException::Handle(UnhandledException::New(
|
| + Instance::Cast(result), Stacktrace::Handle(zone)));
|
| set_preallocated_unhandled_exception(unhandled_exception);
|
|
|
| - const Array& code_array = Array::Handle(zone,
|
| - Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
|
| - const Array& pc_offset_array = Array::Handle(zone,
|
| - Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
|
| - const Stacktrace& stack_trace = Stacktrace::Handle(zone,
|
| - Stacktrace::New(code_array, pc_offset_array));
|
| + const Array& code_array = Array::Handle(
|
| + zone, Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
|
| + const Array& pc_offset_array = Array::Handle(
|
| + zone, Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
|
| + const Stacktrace& stack_trace =
|
| + Stacktrace::Handle(zone, Stacktrace::New(code_array, pc_offset_array));
|
| // Expansion of inlined functions requires additional memory at run time,
|
| // avoid it.
|
| stack_trace.set_expand_inlined(false);
|
|
|