| 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/debugger.h" | 5 #include "vm/debugger.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 line, | 1043 line, |
| 1044 ctx_.ToCString(), | 1044 ctx_.ToCString(), |
| 1045 ContextLevel()); | 1045 ContextLevel()); |
| 1046 } | 1046 } |
| 1047 | 1047 |
| 1048 | 1048 |
| 1049 void ActivationFrame::PrintToJSONObject(JSONObject* jsobj, | 1049 void ActivationFrame::PrintToJSONObject(JSONObject* jsobj, |
| 1050 bool full) { | 1050 bool full) { |
| 1051 const Script& script = Script::Handle(SourceScript()); | 1051 const Script& script = Script::Handle(SourceScript()); |
| 1052 jsobj->AddProperty("type", "Frame"); | 1052 jsobj->AddProperty("type", "Frame"); |
| 1053 jsobj->AddLocation(script, TokenPos()); | 1053 TokenPosition pos = TokenPos(); |
| 1054 if (pos.IsSynthetic()) { |
| 1055 pos = pos.FromSynthetic(); |
| 1056 } |
| 1057 jsobj->AddLocation(script, pos); |
| 1054 jsobj->AddProperty("function", function(), !full); | 1058 jsobj->AddProperty("function", function(), !full); |
| 1055 jsobj->AddProperty("code", code()); | 1059 jsobj->AddProperty("code", code()); |
| 1056 if (full) { | 1060 if (full) { |
| 1057 // TODO(cutch): The old "full" script usage no longer fits | 1061 // TODO(cutch): The old "full" script usage no longer fits |
| 1058 // in the world where we pass the script as part of the | 1062 // in the world where we pass the script as part of the |
| 1059 // location. | 1063 // location. |
| 1060 jsobj->AddProperty("script", script, !full); | 1064 jsobj->AddProperty("script", script, !full); |
| 1061 } | 1065 } |
| 1062 { | 1066 { |
| 1063 JSONArray jsvars(jsobj, "vars"); | 1067 JSONArray jsvars(jsobj, "vars"); |
| (...skipping 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3322 | 3326 |
| 3323 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 3327 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 3324 ASSERT(bpt->next() == NULL); | 3328 ASSERT(bpt->next() == NULL); |
| 3325 bpt->set_next(code_breakpoints_); | 3329 bpt->set_next(code_breakpoints_); |
| 3326 code_breakpoints_ = bpt; | 3330 code_breakpoints_ = bpt; |
| 3327 } | 3331 } |
| 3328 | 3332 |
| 3329 #endif // !PRODUCT | 3333 #endif // !PRODUCT |
| 3330 | 3334 |
| 3331 } // namespace dart | 3335 } // namespace dart |
| OLD | NEW |