OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/object_store.h" | 5 #include "vm/object_store.h" |
6 | 6 |
7 #include "vm/exceptions.h" | 7 #include "vm/exceptions.h" |
8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
10 #include "vm/object.h" | 10 #include "vm/object.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 internal_library_(Library::null()), | 66 internal_library_(Library::null()), |
67 isolate_library_(Library::null()), | 67 isolate_library_(Library::null()), |
68 math_library_(Library::null()), | 68 math_library_(Library::null()), |
69 mirrors_library_(Library::null()), | 69 mirrors_library_(Library::null()), |
70 native_wrappers_library_(Library::null()), | 70 native_wrappers_library_(Library::null()), |
71 root_library_(Library::null()), | 71 root_library_(Library::null()), |
72 typed_data_library_(Library::null()), | 72 typed_data_library_(Library::null()), |
73 vmservice_library_(Library::null()), | 73 vmservice_library_(Library::null()), |
74 libraries_(GrowableObjectArray::null()), | 74 libraries_(GrowableObjectArray::null()), |
75 pending_classes_(GrowableObjectArray::null()), | 75 pending_classes_(GrowableObjectArray::null()), |
76 pending_functions_(GrowableObjectArray::null()), | |
77 pending_deferred_loads_(GrowableObjectArray::null()), | 76 pending_deferred_loads_(GrowableObjectArray::null()), |
78 resume_capabilities_(GrowableObjectArray::null()), | 77 resume_capabilities_(GrowableObjectArray::null()), |
79 exit_listeners_(GrowableObjectArray::null()), | 78 exit_listeners_(GrowableObjectArray::null()), |
80 error_listeners_(GrowableObjectArray::null()), | 79 error_listeners_(GrowableObjectArray::null()), |
81 sticky_error_(Error::null()), | 80 sticky_error_(Error::null()), |
82 empty_context_(Context::null()), | 81 empty_context_(Context::null()), |
83 stack_overflow_(Instance::null()), | 82 stack_overflow_(Instance::null()), |
84 out_of_memory_(Instance::null()), | 83 out_of_memory_(Instance::null()), |
85 preallocated_unhandled_exception_(UnhandledException::null()), | 84 preallocated_unhandled_exception_(UnhandledException::null()), |
86 preallocated_stack_trace_(Stacktrace::null()), | 85 preallocated_stack_trace_(Stacktrace::null()), |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 ASSERT(isolate != NULL && isolate->object_store() == this); | 121 ASSERT(isolate != NULL && isolate->object_store() == this); |
123 if (this->stack_overflow() != Instance::null()) { | 122 if (this->stack_overflow() != Instance::null()) { |
124 ASSERT(this->out_of_memory() != Instance::null()); | 123 ASSERT(this->out_of_memory() != Instance::null()); |
125 ASSERT(this->preallocated_stack_trace() != Stacktrace::null()); | 124 ASSERT(this->preallocated_stack_trace() != Stacktrace::null()); |
126 return true; | 125 return true; |
127 } | 126 } |
128 ASSERT(this->stack_overflow() == Instance::null()); | 127 ASSERT(this->stack_overflow() == Instance::null()); |
129 ASSERT(this->out_of_memory() == Instance::null()); | 128 ASSERT(this->out_of_memory() == Instance::null()); |
130 ASSERT(this->preallocated_stack_trace() == Stacktrace::null()); | 129 ASSERT(this->preallocated_stack_trace() == Stacktrace::null()); |
131 | 130 |
132 ASSERT(this->pending_functions() == GrowableObjectArray::null()); | |
133 this->pending_functions_ = GrowableObjectArray::New(); | |
134 this->pending_deferred_loads_ = GrowableObjectArray::New(); | 131 this->pending_deferred_loads_ = GrowableObjectArray::New(); |
135 | 132 |
136 this->resume_capabilities_ = GrowableObjectArray::New(); | 133 this->resume_capabilities_ = GrowableObjectArray::New(); |
137 this->exit_listeners_ = GrowableObjectArray::New(); | 134 this->exit_listeners_ = GrowableObjectArray::New(); |
138 this->error_listeners_ = GrowableObjectArray::New(); | 135 this->error_listeners_ = GrowableObjectArray::New(); |
139 | 136 |
140 Object& result = Object::Handle(); | 137 Object& result = Object::Handle(); |
141 const Library& library = Library::Handle(Library::CoreLibrary()); | 138 const Library& library = Library::Handle(Library::CoreLibrary()); |
142 | 139 |
143 result = DartLibraryCalls::InstanceCreate(library, | 140 result = DartLibraryCalls::InstanceCreate(library, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 cls = async_lib.LookupClass(Symbols::StreamIterator()); | 195 cls = async_lib.LookupClass(Symbols::StreamIterator()); |
199 ASSERT(!cls.IsNull()); | 196 ASSERT(!cls.IsNull()); |
200 set_stream_iterator_class(cls); | 197 set_stream_iterator_class(cls); |
201 | 198 |
202 const Library& internal_lib = Library::Handle(internal_library()); | 199 const Library& internal_lib = Library::Handle(internal_library()); |
203 cls = internal_lib.LookupClass(Symbols::Symbol()); | 200 cls = internal_lib.LookupClass(Symbols::Symbol()); |
204 set_symbol_class(cls); | 201 set_symbol_class(cls); |
205 } | 202 } |
206 | 203 |
207 } // namespace dart | 204 } // namespace dart |
OLD | NEW |