OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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.h" | 5 #include "vm/object.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 ASSERT(lib.raw() == Library::CollectionLibrary()); | 1216 ASSERT(lib.raw() == Library::CollectionLibrary()); |
1217 | 1217 |
1218 cls = Class::New<LinkedHashMap>(); | 1218 cls = Class::New<LinkedHashMap>(); |
1219 object_store->set_linked_hash_map_class(cls); | 1219 object_store->set_linked_hash_map_class(cls); |
1220 cls.set_type_arguments_field_offset(LinkedHashMap::type_arguments_offset()); | 1220 cls.set_type_arguments_field_offset(LinkedHashMap::type_arguments_offset()); |
1221 cls.set_num_type_arguments(2); | 1221 cls.set_num_type_arguments(2); |
1222 cls.set_num_own_type_arguments(2); | 1222 cls.set_num_own_type_arguments(2); |
1223 RegisterPrivateClass(cls, Symbols::_LinkedHashMap(), lib); | 1223 RegisterPrivateClass(cls, Symbols::_LinkedHashMap(), lib); |
1224 pending_classes.Add(cls); | 1224 pending_classes.Add(cls); |
1225 | 1225 |
1226 // Pre-register the profiler library so we can place the vm class | 1226 // Pre-register the developer library so we can place the vm class |
1227 // UserTag there rather than the core library. | 1227 // UserTag there rather than the core library. |
1228 lib = Library::LookupLibrary(Symbols::DartProfiler()); | 1228 lib = Library::LookupLibrary(Symbols::DartDeveloper()); |
1229 if (lib.IsNull()) { | 1229 if (lib.IsNull()) { |
1230 lib = Library::NewLibraryHelper(Symbols::DartProfiler(), true); | 1230 lib = Library::NewLibraryHelper(Symbols::DartDeveloper(), true); |
1231 lib.SetLoadRequested(); | 1231 lib.SetLoadRequested(); |
1232 lib.Register(); | 1232 lib.Register(); |
1233 object_store->set_bootstrap_library(ObjectStore::kProfiler, lib); | 1233 object_store->set_bootstrap_library(ObjectStore::kDeveloper, lib); |
1234 } | 1234 } |
1235 ASSERT(!lib.IsNull()); | 1235 ASSERT(!lib.IsNull()); |
1236 ASSERT(lib.raw() == Library::ProfilerLibrary()); | 1236 ASSERT(lib.raw() == Library::DeveloperLibrary()); |
1237 | 1237 |
1238 lib = Library::LookupLibrary(Symbols::DartProfiler()); | 1238 lib = Library::LookupLibrary(Symbols::DartDeveloper()); |
1239 ASSERT(!lib.IsNull()); | 1239 ASSERT(!lib.IsNull()); |
1240 cls = Class::New<UserTag>(); | 1240 cls = Class::New<UserTag>(); |
1241 RegisterPrivateClass(cls, Symbols::_UserTag(), lib); | 1241 RegisterPrivateClass(cls, Symbols::_UserTag(), lib); |
1242 pending_classes.Add(cls); | 1242 pending_classes.Add(cls); |
1243 | 1243 |
1244 // Setup some default native field classes which can be extended for | 1244 // Setup some default native field classes which can be extended for |
1245 // specifying native fields in dart classes. | 1245 // specifying native fields in dart classes. |
1246 Library::InitNativeWrappersLibrary(isolate); | 1246 Library::InitNativeWrappersLibrary(isolate); |
1247 ASSERT(object_store->native_wrappers_library() != Library::null()); | 1247 ASSERT(object_store->native_wrappers_library() != Library::null()); |
1248 | 1248 |
(...skipping 9230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10479 CORE_INTEGER_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); | 10479 CORE_INTEGER_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); |
10480 | 10480 |
10481 all_libs.Add(&Library::ZoneHandle(Library::MathLibrary())); | 10481 all_libs.Add(&Library::ZoneHandle(Library::MathLibrary())); |
10482 all_libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); | 10482 all_libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); |
10483 OTHER_RECOGNIZED_LIST(CHECK_FINGERPRINTS); | 10483 OTHER_RECOGNIZED_LIST(CHECK_FINGERPRINTS); |
10484 INLINE_WHITE_LIST(CHECK_FINGERPRINTS); | 10484 INLINE_WHITE_LIST(CHECK_FINGERPRINTS); |
10485 INLINE_BLACK_LIST(CHECK_FINGERPRINTS); | 10485 INLINE_BLACK_LIST(CHECK_FINGERPRINTS); |
10486 POLYMORPHIC_TARGET_LIST(CHECK_FINGERPRINTS); | 10486 POLYMORPHIC_TARGET_LIST(CHECK_FINGERPRINTS); |
10487 | 10487 |
10488 all_libs.Clear(); | 10488 all_libs.Clear(); |
| 10489 all_libs.Add(&Library::ZoneHandle(Library::DeveloperLibrary())); |
| 10490 DEVELOPER_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); |
| 10491 |
| 10492 all_libs.Clear(); |
10489 all_libs.Add(&Library::ZoneHandle(Library::MathLibrary())); | 10493 all_libs.Add(&Library::ZoneHandle(Library::MathLibrary())); |
10490 MATH_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); | 10494 MATH_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); |
10491 | 10495 |
10492 all_libs.Clear(); | 10496 all_libs.Clear(); |
10493 all_libs.Add(&Library::ZoneHandle(Library::ProfilerLibrary())); | |
10494 PROFILER_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); | |
10495 | |
10496 all_libs.Clear(); | |
10497 all_libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); | 10497 all_libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); |
10498 TYPED_DATA_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); | 10498 TYPED_DATA_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); |
10499 | 10499 |
10500 #undef CHECK_FINGERPRINTS | 10500 #undef CHECK_FINGERPRINTS |
10501 | 10501 |
10502 Class& cls = Class::Handle(); | 10502 Class& cls = Class::Handle(); |
10503 | 10503 |
10504 #define CHECK_FACTORY_FINGERPRINTS(factory_symbol, cid, fp) \ | 10504 #define CHECK_FACTORY_FINGERPRINTS(factory_symbol, cid, fp) \ |
10505 cls = Isolate::Current()->class_table()->At(cid); \ | 10505 cls = Isolate::Current()->class_table()->At(cid); \ |
10506 func = cls.LookupFunctionAllowPrivate(Symbols::factory_symbol()); \ | 10506 func = cls.LookupFunctionAllowPrivate(Symbols::factory_symbol()); \ |
(...skipping 10234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20741 return tag_label.ToCString(); | 20741 return tag_label.ToCString(); |
20742 } | 20742 } |
20743 | 20743 |
20744 | 20744 |
20745 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20745 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
20746 Instance::PrintJSONImpl(stream, ref); | 20746 Instance::PrintJSONImpl(stream, ref); |
20747 } | 20747 } |
20748 | 20748 |
20749 | 20749 |
20750 } // namespace dart | 20750 } // namespace dart |
OLD | NEW |