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

Issue 16434015: Move code setting super type of class Object to null from object.cc to parser.cc (Closed)

Created:
7 years, 6 months ago by regis
Modified:
7 years, 6 months ago
Reviewers:
siva, Ivan Posva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Move code setting super type of class Object to null from object.cc to parser.cc R=iposva@google.com Committed: https://code.google.com/p/dart/source/detail?r=23847

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -8 lines) Patch
M runtime/vm/object.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M runtime/vm/parser.cc View 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
regis
7 years, 6 months ago (2013-06-11 11:57:53 UTC) #1
Ivan Posva
LGTM -ip
7 years, 6 months ago (2013-06-11 12:19:05 UTC) #2
regis
Committed patchset #1 manually as r23847 (presubmit successful).
7 years, 6 months ago (2013-06-11 12:22:08 UTC) #3
siva
I guess we still need to retain the multiple check in Class::NumTypeArguments() // Object is ...
7 years, 6 months ago (2013-06-11 17:05:26 UTC) #4
regis
7 years, 6 months ago (2013-06-12 08:28:39 UTC) #5
Message was sent while issue was closed.
On 2013/06/11 17:05:26, siva wrote:
> I guess we still need to retain the multiple check in
> Class::NumTypeArguments()
> 
>     // Object is its own super class during bootstrap.
>     if (cls.super_type() == AbstractType::null() ||
>         cls.super_type() == isolate->object_store()->object_type()) {
>       break;
>     }
> 
> Also the comment there does not seem to make sense anymore right.

Yes, checking for null is still necessary. And I think that a special NoType
instance to avoid a null check would only complicate the code (what is then its
super type?).

An alternative would be to fix the code so that everything works with Object
being its own super class. But here again, this could complicate the code. I
think it is clearer and not too expensive to check for null instead.

The comment has to go. I'll send a cl.

Thanks

Powered by Google App Engine
This is Rietveld 408576698