| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // Expansion of inlined functions requires additional memory at run time, | 177 // Expansion of inlined functions requires additional memory at run time, |
| 178 // avoid it. | 178 // avoid it. |
| 179 stack_trace.set_expand_inlined(false); | 179 stack_trace.set_expand_inlined(false); |
| 180 set_preallocated_stack_trace(stack_trace); | 180 set_preallocated_stack_trace(stack_trace); |
| 181 | 181 |
| 182 return Error::null(); | 182 return Error::null(); |
| 183 } | 183 } |
| 184 | 184 |
| 185 | 185 |
| 186 void ObjectStore::InitKnownObjects() { | 186 void ObjectStore::InitKnownObjects() { |
| 187 #ifdef DART_PRECOMPILED_RUNTIME |
| 188 // These objects are only needed for code generation. |
| 189 return; |
| 190 #else |
| 187 Thread* thread = Thread::Current(); | 191 Thread* thread = Thread::Current(); |
| 188 Zone* zone = thread->zone(); | 192 Zone* zone = thread->zone(); |
| 189 Isolate* isolate = thread->isolate(); | 193 Isolate* isolate = thread->isolate(); |
| 190 ASSERT(isolate != NULL && isolate->object_store() == this); | 194 ASSERT(isolate != NULL && isolate->object_store() == this); |
| 191 | 195 |
| 192 const Library& async_lib = Library::Handle(async_library()); | 196 const Library& async_lib = Library::Handle(async_library()); |
| 193 ASSERT(!async_lib.IsNull()); | 197 ASSERT(!async_lib.IsNull()); |
| 194 Class& cls = Class::Handle(zone); | 198 Class& cls = Class::Handle(zone); |
| 195 cls = async_lib.LookupClass(Symbols::Future()); | 199 cls = async_lib.LookupClass(Symbols::Future()); |
| 196 ASSERT(!cls.IsNull()); | 200 ASSERT(!cls.IsNull()); |
| 197 set_future_class(cls); | 201 set_future_class(cls); |
| 198 cls = async_lib.LookupClass(Symbols::Completer()); | 202 cls = async_lib.LookupClass(Symbols::Completer()); |
| 199 ASSERT(!cls.IsNull()); | 203 ASSERT(!cls.IsNull()); |
| 200 set_completer_class(cls); | 204 set_completer_class(cls); |
| 201 cls = async_lib.LookupClass(Symbols::StreamIterator()); | 205 cls = async_lib.LookupClass(Symbols::StreamIterator()); |
| 202 ASSERT(!cls.IsNull()); | 206 ASSERT(!cls.IsNull()); |
| 203 set_stream_iterator_class(cls); | 207 set_stream_iterator_class(cls); |
| 204 | 208 |
| 205 const Library& internal_lib = Library::Handle(internal_library()); | 209 const Library& internal_lib = Library::Handle(internal_library()); |
| 206 cls = internal_lib.LookupClass(Symbols::Symbol()); | 210 cls = internal_lib.LookupClass(Symbols::Symbol()); |
| 207 set_symbol_class(cls); | 211 set_symbol_class(cls); |
| 212 #endif |
| 208 } | 213 } |
| 209 | 214 |
| 210 } // namespace dart | 215 } // namespace dart |
| OLD | NEW |