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

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

Issue 542473003: Teach the Observatory about MirrorReferences. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: build Created 6 years, 3 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
« no previous file with comments | « runtime/bin/vmservice/observatory/test/mirror_references_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19525 matching lines...) Expand 10 before | Expand all | Expand 10 after
19536 return result.raw(); 19536 return result.raw();
19537 } 19537 }
19538 19538
19539 19539
19540 const char* MirrorReference::ToCString() const { 19540 const char* MirrorReference::ToCString() const {
19541 return "_MirrorReference"; 19541 return "_MirrorReference";
19542 } 19542 }
19543 19543
19544 19544
19545 void MirrorReference::PrintJSONImpl(JSONStream* stream, bool ref) const { 19545 void MirrorReference::PrintJSONImpl(JSONStream* stream, bool ref) const {
19546 Instance::PrintJSONImpl(stream, ref); 19546 JSONObject jsobj(stream);
19547 PrintSharedInstanceJSON(&jsobj, ref);
19548 ObjectIdRing* ring = Isolate::Current()->object_id_ring();
19549 const intptr_t id = ring->GetIdForObject(raw());
19550 jsobj.AddPropertyF("id", "objects/%" Pd "", id);
19551
19552 if (ref) {
19553 return;
19554 }
19555
19556 const Object& referent_handle = Object::Handle(referent());
19557 jsobj.AddProperty("referent", referent_handle);
19547 } 19558 }
19548 19559
19549 19560
19550 void UserTag::MakeActive() const { 19561 void UserTag::MakeActive() const {
19551 Isolate* isolate = Isolate::Current(); 19562 Isolate* isolate = Isolate::Current();
19552 ASSERT(isolate != NULL); 19563 ASSERT(isolate != NULL);
19553 isolate->set_current_tag(*this); 19564 isolate->set_current_tag(*this);
19554 } 19565 }
19555 19566
19556 19567
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
19675 return tag_label.ToCString(); 19686 return tag_label.ToCString();
19676 } 19687 }
19677 19688
19678 19689
19679 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 19690 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
19680 Instance::PrintJSONImpl(stream, ref); 19691 Instance::PrintJSONImpl(stream, ref);
19681 } 19692 }
19682 19693
19683 19694
19684 } // namespace dart 19695 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/observatory/test/mirror_references_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698