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

Unified Diff: runtime/vm/object_service.cc

Issue 2719603002: Rename Closure instance field type_arguments_ to instantiator_. (Closed)
Patch Set: work in progress Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_service.cc
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index 5591052ae7fa3223f6af1c6f9293fae4ff856c78..a7c846b7009e04c517f9eea6e05886f02a3db506 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -982,6 +982,10 @@ void Instance::PrintSharedInstanceJSON(JSONObject* jsobj, bool ref) const {
// Add all fields in layout order, from superclass to subclass.
GrowableArray<Class*> classes;
Class& cls = Class::Handle(this->clazz());
+ if (IsClosure()) {
+ // Closure fields are not instances. Skip them.
+ cls = cls.SuperClass();
+ }
do {
classes.Add(&Class::Handle(cls.raw()));
cls = cls.SuperClass();
@@ -1038,6 +1042,7 @@ void Instance::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
PrintSharedInstanceJSON(&jsobj, ref);
+ // TODO(regis): Wouldn't it be simpler to provide a Closure::PrintJSONImpl()?
if (IsClosure()) {
jsobj.AddProperty("kind", "Closure");
} else {
@@ -1045,6 +1050,7 @@ void Instance::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
jsobj.AddServiceId(*this);
if (IsClosure()) {
+ // TODO(regis): How about closureInstantiator?
jsobj.AddProperty("closureFunction",
Function::Handle(Closure::Cast(*this).function()));
jsobj.AddProperty("closureContext",
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698