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

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

Issue 1408223009: VM: Change debug printing of Context to not print the raw-pointer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 5 years, 1 month 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
« no previous file with comments | « no previous file | 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 13860 matching lines...) Expand 10 before | Expand all | Expand 10 after
13871 } 13871 }
13872 13872
13873 13873
13874 const char* Context::ToCString() const { 13874 const char* Context::ToCString() const {
13875 if (IsNull()) { 13875 if (IsNull()) {
13876 return "Context (Null)"; 13876 return "Context (Null)";
13877 } 13877 }
13878 Zone* zone = Thread::Current()->zone(); 13878 Zone* zone = Thread::Current()->zone();
13879 const Context& parent_ctx = Context::Handle(parent()); 13879 const Context& parent_ctx = Context::Handle(parent());
13880 if (parent_ctx.IsNull()) { 13880 if (parent_ctx.IsNull()) {
13881 return zone->PrintToString("Context@%p num_variables:% " Pd "", 13881 return zone->PrintToString("Context num_variables: %" Pd "",
13882 this->raw(), num_variables()); 13882 num_variables());
13883 } else { 13883 } else {
13884 const char* parent_str = parent_ctx.ToCString(); 13884 const char* parent_str = parent_ctx.ToCString();
13885 return zone->PrintToString( 13885 return zone->PrintToString(
13886 "Context@%p num_variables:% " Pd " parent:{ %s }", 13886 "Context num_variables: %" Pd " parent:{ %s }",
13887 this->raw(), num_variables(), parent_str); 13887 num_variables(), parent_str);
13888 } 13888 }
13889 } 13889 }
13890 13890
13891 13891
13892 static void IndentN(int count) { 13892 static void IndentN(int count) {
13893 for (int i = 0; i < count; i++) { 13893 for (int i = 0; i < count; i++) {
13894 THR_Print(" "); 13894 THR_Print(" ");
13895 } 13895 }
13896 } 13896 }
13897 13897
(...skipping 8031 matching lines...) Expand 10 before | Expand all | Expand 10 after
21929 return tag_label.ToCString(); 21929 return tag_label.ToCString();
21930 } 21930 }
21931 21931
21932 21932
21933 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21933 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21934 Instance::PrintJSONImpl(stream, ref); 21934 Instance::PrintJSONImpl(stream, ref);
21935 } 21935 }
21936 21936
21937 21937
21938 } // namespace dart 21938 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698