Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(896)

Side by Side Diff: runtime/vm/object.cc

Issue 1133713006: Deprecate 'dart:profiler' and move functionality to 'dart:developer' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 ASSERT(lib.raw() == Library::CollectionLibrary()); 1218 ASSERT(lib.raw() == Library::CollectionLibrary());
1219 1219
1220 cls = Class::New<LinkedHashMap>(); 1220 cls = Class::New<LinkedHashMap>();
1221 object_store->set_linked_hash_map_class(cls); 1221 object_store->set_linked_hash_map_class(cls);
1222 cls.set_type_arguments_field_offset(LinkedHashMap::type_arguments_offset()); 1222 cls.set_type_arguments_field_offset(LinkedHashMap::type_arguments_offset());
1223 cls.set_num_type_arguments(2); 1223 cls.set_num_type_arguments(2);
1224 cls.set_num_own_type_arguments(2); 1224 cls.set_num_own_type_arguments(2);
1225 RegisterPrivateClass(cls, Symbols::_LinkedHashMap(), lib); 1225 RegisterPrivateClass(cls, Symbols::_LinkedHashMap(), lib);
1226 pending_classes.Add(cls); 1226 pending_classes.Add(cls);
1227 1227
1228 // Pre-register the profiler library so we can place the vm class 1228 // Pre-register the developer library so we can place the vm class
1229 // UserTag there rather than the core library. 1229 // UserTag there rather than the core library.
1230 lib = Library::LookupLibrary(Symbols::DartProfiler()); 1230 lib = Library::LookupLibrary(Symbols::DartDeveloper());
1231 if (lib.IsNull()) { 1231 if (lib.IsNull()) {
1232 lib = Library::NewLibraryHelper(Symbols::DartProfiler(), true); 1232 lib = Library::NewLibraryHelper(Symbols::DartDeveloper(), true);
1233 lib.SetLoadRequested(); 1233 lib.SetLoadRequested();
1234 lib.Register(); 1234 lib.Register();
1235 object_store->set_bootstrap_library(ObjectStore::kProfiler, lib); 1235 object_store->set_bootstrap_library(ObjectStore::kDeveloper, lib);
1236 } 1236 }
1237 ASSERT(!lib.IsNull()); 1237 ASSERT(!lib.IsNull());
1238 ASSERT(lib.raw() == Library::ProfilerLibrary()); 1238 ASSERT(lib.raw() == Library::DeveloperLibrary());
1239 1239
1240 lib = Library::LookupLibrary(Symbols::DartProfiler()); 1240 lib = Library::LookupLibrary(Symbols::DartDeveloper());
1241 ASSERT(!lib.IsNull()); 1241 ASSERT(!lib.IsNull());
1242 cls = Class::New<UserTag>(); 1242 cls = Class::New<UserTag>();
1243 RegisterPrivateClass(cls, Symbols::_UserTag(), lib); 1243 RegisterPrivateClass(cls, Symbols::_UserTag(), lib);
1244 pending_classes.Add(cls); 1244 pending_classes.Add(cls);
1245 1245
1246 // Setup some default native field classes which can be extended for 1246 // Setup some default native field classes which can be extended for
1247 // specifying native fields in dart classes. 1247 // specifying native fields in dart classes.
1248 Library::InitNativeWrappersLibrary(isolate); 1248 Library::InitNativeWrappersLibrary(isolate);
1249 ASSERT(object_store->native_wrappers_library() != Library::null()); 1249 ASSERT(object_store->native_wrappers_library() != Library::null());
1250 1250
(...skipping 9230 matching lines...) Expand 10 before | Expand all | Expand 10 after
10481 CORE_INTEGER_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); 10481 CORE_INTEGER_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS);
10482 10482
10483 all_libs.Add(&Library::ZoneHandle(Library::MathLibrary())); 10483 all_libs.Add(&Library::ZoneHandle(Library::MathLibrary()));
10484 all_libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); 10484 all_libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary()));
10485 OTHER_RECOGNIZED_LIST(CHECK_FINGERPRINTS); 10485 OTHER_RECOGNIZED_LIST(CHECK_FINGERPRINTS);
10486 INLINE_WHITE_LIST(CHECK_FINGERPRINTS); 10486 INLINE_WHITE_LIST(CHECK_FINGERPRINTS);
10487 INLINE_BLACK_LIST(CHECK_FINGERPRINTS); 10487 INLINE_BLACK_LIST(CHECK_FINGERPRINTS);
10488 POLYMORPHIC_TARGET_LIST(CHECK_FINGERPRINTS); 10488 POLYMORPHIC_TARGET_LIST(CHECK_FINGERPRINTS);
10489 10489
10490 all_libs.Clear(); 10490 all_libs.Clear();
10491 all_libs.Add(&Library::ZoneHandle(Library::DeveloperLibrary()));
10492 DEVELOPER_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS);
10493
10494 all_libs.Clear();
10491 all_libs.Add(&Library::ZoneHandle(Library::MathLibrary())); 10495 all_libs.Add(&Library::ZoneHandle(Library::MathLibrary()));
10492 MATH_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); 10496 MATH_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS);
10493 10497
10494 all_libs.Clear(); 10498 all_libs.Clear();
10495 all_libs.Add(&Library::ZoneHandle(Library::ProfilerLibrary()));
10496 PROFILER_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS);
10497
10498 all_libs.Clear();
10499 all_libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); 10499 all_libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary()));
10500 TYPED_DATA_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); 10500 TYPED_DATA_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS);
10501 10501
10502 #undef CHECK_FINGERPRINTS 10502 #undef CHECK_FINGERPRINTS
10503 10503
10504 Class& cls = Class::Handle(); 10504 Class& cls = Class::Handle();
10505 10505
10506 #define CHECK_FACTORY_FINGERPRINTS(factory_symbol, cid, fp) \ 10506 #define CHECK_FACTORY_FINGERPRINTS(factory_symbol, cid, fp) \
10507 cls = Isolate::Current()->class_table()->At(cid); \ 10507 cls = Isolate::Current()->class_table()->At(cid); \
10508 func = cls.LookupFunctionAllowPrivate(Symbols::factory_symbol()); \ 10508 func = cls.LookupFunctionAllowPrivate(Symbols::factory_symbol()); \
(...skipping 10203 matching lines...) Expand 10 before | Expand all | Expand 10 after
20712 return tag_label.ToCString(); 20712 return tag_label.ToCString();
20713 } 20713 }
20714 20714
20715 20715
20716 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 20716 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
20717 Instance::PrintJSONImpl(stream, ref); 20717 Instance::PrintJSONImpl(stream, ref);
20718 } 20718 }
20719 20719
20720 20720
20721 } // namespace dart 20721 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698