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

Unified Diff: runtime/vm/object_service.cc

Issue 2600313002: Revert "Fix resolution and canonicalization of typedefs and function types..." (Closed)
Patch Set: Created 4 years 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 d4fc827ce49f6b8aafe568be9abe817517858b5f..99e115733ff126ac74ed544e315fda25aeb03766 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -243,11 +243,6 @@ void PatchClass::PrintJSONImpl(JSONStream* stream, bool ref) const {
static void AddFunctionServiceId(const JSONObject& jsobj,
const Function& f,
const Class& cls) {
- if (cls.IsNull()) {
- ASSERT(f.IsSignatureFunction());
- jsobj.AddServiceId(f);
- return;
- }
// Special kinds of functions use indices in their respective lists.
intptr_t id = -1;
const char* selector = NULL;
@@ -284,13 +279,10 @@ static void AddFunctionServiceId(const JSONObject& jsobj,
void Function::PrintJSONImpl(JSONStream* stream, bool ref) const {
Class& cls = Class::Handle(Owner());
- if (!cls.IsNull()) {
- Error& err = Error::Handle();
- err ^= cls.EnsureIsFinalized(Thread::Current());
- ASSERT(err.IsNull());
- } else {
- ASSERT(IsSignatureFunction());
- }
+ ASSERT(!cls.IsNull());
+ Error& err = Error::Handle();
+ err ^= cls.EnsureIsFinalized(Thread::Current());
+ ASSERT(err.IsNull());
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Function", ref);
AddFunctionServiceId(jsobj, *this, cls);
@@ -300,13 +292,11 @@ void Function::PrintJSONImpl(JSONStream* stream, bool ref) const {
const Function& parent = Function::Handle(parent_function());
if (!parent.IsNull()) {
jsobj.AddProperty("owner", parent);
- } else if (!cls.IsNull()) {
- if (cls.IsTopLevel()) {
- const Library& library = Library::Handle(cls.library());
- jsobj.AddProperty("owner", library);
- } else {
- jsobj.AddProperty("owner", cls);
- }
+ } else if (cls.IsTopLevel()) {
+ const Library& library = Library::Handle(cls.library());
+ jsobj.AddProperty("owner", library);
+ } else {
+ jsobj.AddProperty("owner", cls);
}
const char* kind_string = Function::KindToCString(kind());
@@ -1109,7 +1099,6 @@ void AbstractType::PrintJSONImpl(JSONStream* stream, bool ref) const {
void Type::PrintJSONImpl(JSONStream* stream, bool ref) const {
- // TODO(regis): Function types are not handled properly.
JSONObject jsobj(stream);
PrintSharedInstanceJSON(&jsobj, ref);
jsobj.AddProperty("kind", "Type");
« 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