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 8534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8545 intptr_t lib_index = (lib.IsNull()) ? -1 : lib.index(); | 8545 intptr_t lib_index = (lib.IsNull()) ? -1 : lib.index(); |
8546 jsobj.AddPropertyF("id", "libraries/%" Pd "/scripts/%s", | 8546 jsobj.AddPropertyF("id", "libraries/%" Pd "/scripts/%s", |
8547 lib_index, encoded_url.ToCString()); | 8547 lib_index, encoded_url.ToCString()); |
8548 jsobj.AddPropertyStr("name", name); | 8548 jsobj.AddPropertyStr("name", name); |
8549 jsobj.AddProperty("kind", GetKindAsCString()); | 8549 jsobj.AddProperty("kind", GetKindAsCString()); |
8550 if (ref) { | 8550 if (ref) { |
8551 return; | 8551 return; |
8552 } | 8552 } |
8553 jsobj.AddProperty("library", lib); | 8553 jsobj.AddProperty("library", lib); |
8554 const String& source = String::Handle(Source()); | 8554 const String& source = String::Handle(Source()); |
| 8555 jsobj.AddProperty("lineOffset", line_offset()); |
| 8556 jsobj.AddProperty("columnOffset", col_offset()); |
8555 jsobj.AddPropertyStr("source", source); | 8557 jsobj.AddPropertyStr("source", source); |
8556 | 8558 |
8557 // Print the line number table | 8559 // Print the line number table |
8558 { | 8560 { |
8559 JSONArray tokenPosTable(&jsobj, "tokenPosTable"); | 8561 JSONArray tokenPosTable(&jsobj, "tokenPosTable"); |
8560 | 8562 |
8561 const GrowableObjectArray& lineNumberArray = | 8563 const GrowableObjectArray& lineNumberArray = |
8562 GrowableObjectArray::Handle(GenerateLineNumberArray()); | 8564 GrowableObjectArray::Handle(GenerateLineNumberArray()); |
8563 Object& value = Object::Handle(); | 8565 Object& value = Object::Handle(); |
8564 intptr_t pos = 0; | 8566 intptr_t pos = 0; |
(...skipping 12148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20713 return tag_label.ToCString(); | 20715 return tag_label.ToCString(); |
20714 } | 20716 } |
20715 | 20717 |
20716 | 20718 |
20717 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20719 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
20718 Instance::PrintJSONImpl(stream, ref); | 20720 Instance::PrintJSONImpl(stream, ref); |
20719 } | 20721 } |
20720 | 20722 |
20721 | 20723 |
20722 } // namespace dart | 20724 } // namespace dart |
OLD | NEW |