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

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

Issue 1965823002: Initial isolate reload support (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 #include "vm/disassembler.h" 6 #include "vm/disassembler.h"
7 #include "vm/object.h" 7 #include "vm/object.h"
8 #include "vm/object_store.h" 8 #include "vm/object_store.h"
9 #include "vm/stub_code.h" 9 #include "vm/stub_code.h"
10 #include "vm/symbols.h" 10 #include "vm/symbols.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 423
424 // See also Dart_ScriptGetTokenInfo. 424 // See also Dart_ScriptGetTokenInfo.
425 void Script::PrintJSONImpl(JSONStream* stream, bool ref) const { 425 void Script::PrintJSONImpl(JSONStream* stream, bool ref) const {
426 JSONObject jsobj(stream); 426 JSONObject jsobj(stream);
427 AddCommonObjectProperties(&jsobj, "Script", ref); 427 AddCommonObjectProperties(&jsobj, "Script", ref);
428 const String& uri = String::Handle(url()); 428 const String& uri = String::Handle(url());
429 ASSERT(!uri.IsNull()); 429 ASSERT(!uri.IsNull());
430 const String& encoded_uri = String::Handle(String::EncodeIRI(uri)); 430 const String& encoded_uri = String::Handle(String::EncodeIRI(uri));
431 ASSERT(!encoded_uri.IsNull()); 431 ASSERT(!encoded_uri.IsNull());
432 const Library& lib = Library::Handle(FindLibrary()); 432 const Library& lib = Library::Handle(FindLibrary());
433 if (kind() == RawScript::kEvaluateTag) { 433 if (lib.IsNull()) {
434 jsobj.AddServiceId(*this); 434 jsobj.AddServiceId(*this);
435 } else { 435 } else {
436 ASSERT(!lib.IsNull()); 436 jsobj.AddFixedServiceId("libraries/%" Pd "/scripts/%s/%" Px64 "",
437 jsobj.AddFixedServiceId("libraries/%" Pd "/scripts/%s", 437 lib.index(), encoded_uri.ToCString(),
438 lib.index(), encoded_uri.ToCString()); 438 load_timestamp());
439 } 439 }
440 jsobj.AddPropertyStr("uri", uri); 440 jsobj.AddPropertyStr("uri", uri);
441 jsobj.AddProperty("_kind", GetKindAsCString()); 441 jsobj.AddProperty("_kind", GetKindAsCString());
442 if (ref) { 442 if (ref) {
443 return; 443 return;
444 } 444 }
445 jsobj.AddPropertyTimeMillis("_loadTime", load_timestamp());
445 if (!lib.IsNull()) { 446 if (!lib.IsNull()) {
446 jsobj.AddProperty("library", lib); 447 jsobj.AddProperty("library", lib);
447 } 448 }
448 const String& source = String::Handle(Source()); 449 const String& source = String::Handle(Source());
449 jsobj.AddProperty("lineOffset", line_offset()); 450 jsobj.AddProperty("lineOffset", line_offset());
450 jsobj.AddProperty("columnOffset", col_offset()); 451 jsobj.AddProperty("columnOffset", col_offset());
451 if (!source.IsNull()) { 452 if (!source.IsNull()) {
452 jsobj.AddPropertyStr("source", source); 453 jsobj.AddPropertyStr("source", source);
453 } 454 }
454 455
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 jsobj.AddProperty("mirrorReferent", referent_handle); 1588 jsobj.AddProperty("mirrorReferent", referent_handle);
1588 } 1589 }
1589 1590
1590 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 1591 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
1591 Instance::PrintJSONImpl(stream, ref); 1592 Instance::PrintJSONImpl(stream, ref);
1592 } 1593 }
1593 1594
1594 #endif 1595 #endif
1595 1596
1596 } // namespace dart 1597 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698