| 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 13694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13705 THR_Print("Context@null\n"); | 13705 THR_Print("Context@null\n"); |
| 13706 return; | 13706 return; |
| 13707 } | 13707 } |
| 13708 | 13708 |
| 13709 IndentN(indent); | 13709 IndentN(indent); |
| 13710 THR_Print("Context@%p vars(%" Pd ") {\n", this->raw(), num_variables()); | 13710 THR_Print("Context@%p vars(%" Pd ") {\n", this->raw(), num_variables()); |
| 13711 Object& obj = Object::Handle(); | 13711 Object& obj = Object::Handle(); |
| 13712 for (intptr_t i = 0; i < num_variables(); i++) { | 13712 for (intptr_t i = 0; i < num_variables(); i++) { |
| 13713 IndentN(indent + 2); | 13713 IndentN(indent + 2); |
| 13714 obj = At(i); | 13714 obj = At(i); |
| 13715 THR_Print("[%" Pd "] = %s\n", i, obj.ToCString()); | 13715 const char* s = obj.ToCString(); |
| 13716 if (strlen(s) > 50) { |
| 13717 THR_Print("[%" Pd "] = [first 50 chars:] %.50s...\n", i, s); |
| 13718 } else { |
| 13719 THR_Print("[%" Pd "] = %s\n", i, s); |
| 13720 } |
| 13716 } | 13721 } |
| 13717 | 13722 |
| 13718 const Context& parent_ctx = Context::Handle(parent()); | 13723 const Context& parent_ctx = Context::Handle(parent()); |
| 13719 if (!parent_ctx.IsNull()) { | 13724 if (!parent_ctx.IsNull()) { |
| 13720 parent_ctx.Dump(indent + 2); | 13725 parent_ctx.Dump(indent + 2); |
| 13721 } | 13726 } |
| 13722 IndentN(indent); | 13727 IndentN(indent); |
| 13723 THR_Print("}\n"); | 13728 THR_Print("}\n"); |
| 13724 } | 13729 } |
| 13725 | 13730 |
| (...skipping 8145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21871 return UserTag::null(); | 21876 return UserTag::null(); |
| 21872 } | 21877 } |
| 21873 | 21878 |
| 21874 | 21879 |
| 21875 const char* UserTag::ToCString() const { | 21880 const char* UserTag::ToCString() const { |
| 21876 const String& tag_label = String::Handle(label()); | 21881 const String& tag_label = String::Handle(label()); |
| 21877 return tag_label.ToCString(); | 21882 return tag_label.ToCString(); |
| 21878 } | 21883 } |
| 21879 | 21884 |
| 21880 } // namespace dart | 21885 } // namespace dart |
| OLD | NEW |