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

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

Issue 1116263004: Add 'dart:debugger' library (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 9823 matching lines...) Expand 10 before | Expand all | Expand 10 after
9834 RawLibrary* Library::CoreLibrary() { 9834 RawLibrary* Library::CoreLibrary() {
9835 return Isolate::Current()->object_store()->core_library(); 9835 return Isolate::Current()->object_store()->core_library();
9836 } 9836 }
9837 9837
9838 9838
9839 RawLibrary* Library::CollectionLibrary() { 9839 RawLibrary* Library::CollectionLibrary() {
9840 return Isolate::Current()->object_store()->collection_library(); 9840 return Isolate::Current()->object_store()->collection_library();
9841 } 9841 }
9842 9842
9843 9843
9844 RawLibrary* Library::DebuggerLibrary() {
9845 return Isolate::Current()->object_store()->debugger_library();
9846 }
9847
9848
9844 RawLibrary* Library::InternalLibrary() { 9849 RawLibrary* Library::InternalLibrary() {
9845 return Isolate::Current()->object_store()->internal_library(); 9850 return Isolate::Current()->object_store()->internal_library();
9846 } 9851 }
9847 9852
9848 9853
9849 RawLibrary* Library::IsolateLibrary() { 9854 RawLibrary* Library::IsolateLibrary() {
9850 return Isolate::Current()->object_store()->isolate_library(); 9855 return Isolate::Current()->object_store()->isolate_library();
9851 } 9856 }
9852 9857
9853 9858
9854 RawLibrary* Library::MathLibrary() { 9859 RawLibrary* Library::MathLibrary() {
9855 return Isolate::Current()->object_store()->math_library(); 9860 return Isolate::Current()->object_store()->math_library();
9856 } 9861 }
9857 9862
9858 9863
9859 RawLibrary* Library::MirrorsLibrary() { 9864 RawLibrary* Library::MirrorsLibrary() {
9860 return Isolate::Current()->object_store()->mirrors_library(); 9865 return Isolate::Current()->object_store()->mirrors_library();
9861 } 9866 }
9862 9867
9863 9868
9864 RawLibrary* Library::NativeWrappersLibrary() { 9869 RawLibrary* Library::NativeWrappersLibrary() {
9865 return Isolate::Current()->object_store()->native_wrappers_library(); 9870 return Isolate::Current()->object_store()->native_wrappers_library();
9866 } 9871 }
9867 9872
9868 9873
9874 RawLibrary* Library::ProfilerLibrary() {
9875 return Isolate::Current()->object_store()->profiler_library();
9876 }
9877
9878
9869 RawLibrary* Library::TypedDataLibrary() { 9879 RawLibrary* Library::TypedDataLibrary() {
9870 return Isolate::Current()->object_store()->typed_data_library(); 9880 return Isolate::Current()->object_store()->typed_data_library();
9871 } 9881 }
9872 9882
9873 9883
9874 RawLibrary* Library::ProfilerLibrary() {
9875 return Isolate::Current()->object_store()->profiler_library();
9876 }
9877
9878
9879 const char* Library::ToCString() const { 9884 const char* Library::ToCString() const {
9880 const char* kFormat = "Library:'%s'"; 9885 const char* kFormat = "Library:'%s'";
9881 const String& name = String::Handle(url()); 9886 const String& name = String::Handle(url());
9882 intptr_t len = OS::SNPrint(NULL, 0, kFormat, name.ToCString()) + 1; 9887 intptr_t len = OS::SNPrint(NULL, 0, kFormat, name.ToCString()) + 1;
9883 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 9888 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
9884 OS::SNPrint(chars, len, kFormat, name.ToCString()); 9889 OS::SNPrint(chars, len, kFormat, name.ToCString());
9885 return chars; 9890 return chars;
9886 } 9891 }
9887 9892
9888 9893
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
10485 OTHER_RECOGNIZED_LIST(CHECK_FINGERPRINTS); 10490 OTHER_RECOGNIZED_LIST(CHECK_FINGERPRINTS);
10486 INLINE_WHITE_LIST(CHECK_FINGERPRINTS); 10491 INLINE_WHITE_LIST(CHECK_FINGERPRINTS);
10487 INLINE_BLACK_LIST(CHECK_FINGERPRINTS); 10492 INLINE_BLACK_LIST(CHECK_FINGERPRINTS);
10488 POLYMORPHIC_TARGET_LIST(CHECK_FINGERPRINTS); 10493 POLYMORPHIC_TARGET_LIST(CHECK_FINGERPRINTS);
10489 10494
10490 all_libs.Clear(); 10495 all_libs.Clear();
10491 all_libs.Add(&Library::ZoneHandle(Library::MathLibrary())); 10496 all_libs.Add(&Library::ZoneHandle(Library::MathLibrary()));
10492 MATH_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); 10497 MATH_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS);
10493 10498
10494 all_libs.Clear(); 10499 all_libs.Clear();
10500 all_libs.Add(&Library::ZoneHandle(Library::ProfilerLibrary()));
10501 PROFILER_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS);
10502
10503 all_libs.Clear();
10495 all_libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary())); 10504 all_libs.Add(&Library::ZoneHandle(Library::TypedDataLibrary()));
10496 TYPED_DATA_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS); 10505 TYPED_DATA_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS);
10497 10506
10498 all_libs.Clear();
10499 all_libs.Add(&Library::ZoneHandle(Library::ProfilerLibrary()));
10500 PROFILER_LIB_INTRINSIC_LIST(CHECK_FINGERPRINTS);
10501
10502 #undef CHECK_FINGERPRINTS 10507 #undef CHECK_FINGERPRINTS
10503 10508
10504 Class& cls = Class::Handle(); 10509 Class& cls = Class::Handle();
10505 10510
10506 #define CHECK_FACTORY_FINGERPRINTS(factory_symbol, cid, fp) \ 10511 #define CHECK_FACTORY_FINGERPRINTS(factory_symbol, cid, fp) \
10507 cls = Isolate::Current()->class_table()->At(cid); \ 10512 cls = Isolate::Current()->class_table()->At(cid); \
10508 func = cls.LookupFunctionAllowPrivate(Symbols::factory_symbol()); \ 10513 func = cls.LookupFunctionAllowPrivate(Symbols::factory_symbol()); \
10509 if (func.IsNull()) { \ 10514 if (func.IsNull()) { \
10510 has_errors = true; \ 10515 has_errors = true; \
10511 OS::Print("Function not found %s.%s\n", cls.ToCString(), \ 10516 OS::Print("Function not found %s.%s\n", cls.ToCString(), \
(...skipping 10206 matching lines...) Expand 10 before | Expand all | Expand 10 after
20718 return tag_label.ToCString(); 20723 return tag_label.ToCString();
20719 } 20724 }
20720 20725
20721 20726
20722 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 20727 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
20723 Instance::PrintJSONImpl(stream, ref); 20728 Instance::PrintJSONImpl(stream, ref);
20724 } 20729 }
20725 20730
20726 20731
20727 } // namespace dart 20732 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698