| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 preallocated_unhandled_exception_(UnhandledException::null()), | 89 preallocated_unhandled_exception_(UnhandledException::null()), |
| 90 preallocated_stack_trace_(StackTrace::null()), | 90 preallocated_stack_trace_(StackTrace::null()), |
| 91 lookup_port_handler_(Function::null()), | 91 lookup_port_handler_(Function::null()), |
| 92 empty_uint32_array_(TypedData::null()), | 92 empty_uint32_array_(TypedData::null()), |
| 93 handle_message_function_(Function::null()), | 93 handle_message_function_(Function::null()), |
| 94 simple_instance_of_function_(Function::null()), | 94 simple_instance_of_function_(Function::null()), |
| 95 simple_instance_of_true_function_(Function::null()), | 95 simple_instance_of_true_function_(Function::null()), |
| 96 simple_instance_of_false_function_(Function::null()), | 96 simple_instance_of_false_function_(Function::null()), |
| 97 async_clear_thread_stack_trace_(Function::null()), | 97 async_clear_thread_stack_trace_(Function::null()), |
| 98 async_set_thread_stack_trace_(Function::null()), | 98 async_set_thread_stack_trace_(Function::null()), |
| 99 async_star_move_next_helper_(Function::null()), |
| 99 library_load_error_table_(Array::null()), | 100 library_load_error_table_(Array::null()), |
| 100 unique_dynamic_targets_(Array::null()), | 101 unique_dynamic_targets_(Array::null()), |
| 101 token_objects_(GrowableObjectArray::null()), | 102 token_objects_(GrowableObjectArray::null()), |
| 102 token_objects_map_(Array::null()), | 103 token_objects_map_(Array::null()), |
| 103 megamorphic_cache_table_(GrowableObjectArray::null()), | 104 megamorphic_cache_table_(GrowableObjectArray::null()), |
| 104 megamorphic_miss_code_(Code::null()), | 105 megamorphic_miss_code_(Code::null()), |
| 105 megamorphic_miss_function_(Function::null()) { | 106 megamorphic_miss_function_(Function::null()) { |
| 106 for (RawObject** current = from(); current <= to(); current++) { | 107 for (RawObject** current = from(); current <= to(); current++) { |
| 107 ASSERT(*current == Object::null()); | 108 ASSERT(*current == Object::null()); |
| 108 } | 109 } |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 function_name, 1, Object::null_array()); | 249 function_name, 1, Object::null_array()); |
| 249 set_async_set_thread_stack_trace(function); | 250 set_async_set_thread_stack_trace(function); |
| 250 | 251 |
| 251 function_name ^= async_lib.PrivateName(Symbols::ClearAsyncThreadStackTrace()); | 252 function_name ^= async_lib.PrivateName(Symbols::ClearAsyncThreadStackTrace()); |
| 252 ASSERT(!function_name.IsNull()); | 253 ASSERT(!function_name.IsNull()); |
| 253 function ^= Resolver::ResolveStatic(async_lib, Object::null_string(), | 254 function ^= Resolver::ResolveStatic(async_lib, Object::null_string(), |
| 254 function_name, 0, Object::null_array()); | 255 function_name, 0, Object::null_array()); |
| 255 ASSERT(!function.IsNull()); | 256 ASSERT(!function.IsNull()); |
| 256 set_async_clear_thread_stack_trace(function); | 257 set_async_clear_thread_stack_trace(function); |
| 257 | 258 |
| 259 function_name ^= async_lib.PrivateName(Symbols::AsyncStarMoveNextHelper()); |
| 260 ASSERT(!function_name.IsNull()); |
| 261 function ^= Resolver::ResolveStatic(async_lib, Object::null_string(), |
| 262 function_name, 1, Object::null_array()); |
| 263 ASSERT(!function.IsNull()); |
| 264 set_async_star_move_next_helper(function); |
| 265 |
| 258 const Library& internal_lib = Library::Handle(_internal_library()); | 266 const Library& internal_lib = Library::Handle(_internal_library()); |
| 259 cls = internal_lib.LookupClass(Symbols::Symbol()); | 267 cls = internal_lib.LookupClass(Symbols::Symbol()); |
| 260 set_symbol_class(cls); | 268 set_symbol_class(cls); |
| 261 | 269 |
| 262 const Library& core_lib = Library::Handle(core_library()); | 270 const Library& core_lib = Library::Handle(core_library()); |
| 263 cls = core_lib.LookupClassAllowPrivate(Symbols::_CompileTimeError()); | 271 cls = core_lib.LookupClassAllowPrivate(Symbols::_CompileTimeError()); |
| 264 ASSERT(!cls.IsNull()); | 272 ASSERT(!cls.IsNull()); |
| 265 set_compiletime_error_class(cls); | 273 set_compiletime_error_class(cls); |
| 266 | 274 |
| 267 // Cache the core private functions used for fast instance of checks. | 275 // Cache the core private functions used for fast instance of checks. |
| 268 simple_instance_of_function_ = | 276 simple_instance_of_function_ = |
| 269 PrivateObjectLookup(Symbols::_simpleInstanceOf()); | 277 PrivateObjectLookup(Symbols::_simpleInstanceOf()); |
| 270 simple_instance_of_true_function_ = | 278 simple_instance_of_true_function_ = |
| 271 PrivateObjectLookup(Symbols::_simpleInstanceOfTrue()); | 279 PrivateObjectLookup(Symbols::_simpleInstanceOfTrue()); |
| 272 simple_instance_of_false_function_ = | 280 simple_instance_of_false_function_ = |
| 273 PrivateObjectLookup(Symbols::_simpleInstanceOfFalse()); | 281 PrivateObjectLookup(Symbols::_simpleInstanceOfFalse()); |
| 274 #endif | 282 #endif |
| 275 } | 283 } |
| 276 | 284 |
| 277 } // namespace dart | 285 } // namespace dart |
| OLD | NEW |