| 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 8537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8548 const String& uri = String::Handle(url()); | 8548 const String& uri = String::Handle(url()); |
| 8549 ASSERT(!uri.IsNull()); | 8549 ASSERT(!uri.IsNull()); |
| 8550 const String& encoded_uri = String::Handle(String::EncodeIRI(uri)); | 8550 const String& encoded_uri = String::Handle(String::EncodeIRI(uri)); |
| 8551 ASSERT(!encoded_uri.IsNull()); | 8551 ASSERT(!encoded_uri.IsNull()); |
| 8552 const Library& lib = Library::Handle(FindLibrary()); | 8552 const Library& lib = Library::Handle(FindLibrary()); |
| 8553 // TODO(rmacnak): This can fail for eval scripts. Use a ring-id for those. | 8553 // TODO(rmacnak): This can fail for eval scripts. Use a ring-id for those. |
| 8554 intptr_t lib_index = (lib.IsNull()) ? -1 : lib.index(); | 8554 intptr_t lib_index = (lib.IsNull()) ? -1 : lib.index(); |
| 8555 jsobj.AddFixedServiceId("libraries/%" Pd "/scripts/%s", | 8555 jsobj.AddFixedServiceId("libraries/%" Pd "/scripts/%s", |
| 8556 lib_index, encoded_uri.ToCString()); | 8556 lib_index, encoded_uri.ToCString()); |
| 8557 jsobj.AddPropertyStr("uri", uri); | 8557 jsobj.AddPropertyStr("uri", uri); |
| 8558 jsobj.AddProperty("kind", GetKindAsCString()); | 8558 jsobj.AddProperty("_kind", GetKindAsCString()); |
| 8559 if (ref) { | 8559 if (ref) { |
| 8560 return; | 8560 return; |
| 8561 } | 8561 } |
| 8562 jsobj.AddProperty("library", lib); | 8562 jsobj.AddProperty("library", lib); |
| 8563 const String& source = String::Handle(Source()); | 8563 const String& source = String::Handle(Source()); |
| 8564 jsobj.AddProperty("lineOffset", line_offset()); | 8564 jsobj.AddProperty("lineOffset", line_offset()); |
| 8565 jsobj.AddProperty("columnOffset", col_offset()); | 8565 jsobj.AddProperty("columnOffset", col_offset()); |
| 8566 jsobj.AddPropertyStr("source", source); | 8566 jsobj.AddPropertyStr("source", source); |
| 8567 | 8567 |
| 8568 // Print the line number table | 8568 // Print the line number table |
| (...skipping 12213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20782 return tag_label.ToCString(); | 20782 return tag_label.ToCString(); |
| 20783 } | 20783 } |
| 20784 | 20784 |
| 20785 | 20785 |
| 20786 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20786 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 20787 Instance::PrintJSONImpl(stream, ref); | 20787 Instance::PrintJSONImpl(stream, ref); |
| 20788 } | 20788 } |
| 20789 | 20789 |
| 20790 | 20790 |
| 20791 } // namespace dart | 20791 } // namespace dart |
| OLD | NEW |