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

Issue 10942006: Fix bad optimization of instance-of with uninstantiated types (issue 5216). (Closed)

Created:
8 years, 3 months ago by regis
Modified:
8 years, 3 months ago
Reviewers:
zerny-google
CC:
reviews_dartlang.org, srdjan
Visibility:
Public.

Description

Fix bad optimization of instance-of with uninstantiated types (issue 5216). Fix bad assert when type check elimination is disabled (issue 5217). Cleanup of type elimination code in optimizing compiler. Add test. Committed: https://code.google.com/p/dart/source/detail?r=12502

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -72 lines) Patch
M runtime/vm/flow_graph_builder.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 chunks +17 lines, -26 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 1 chunk +10 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 2 chunks +80 lines, -33 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 chunks +13 lines, -5 lines 0 comments Download
A tests/language/instanceof4_test.dart View 1 chunk +69 lines, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
regis
Hello Ian, Here is your reward for filling these issues :-) Not really, but since ...
8 years, 3 months ago (2012-09-18 06:07:03 UTC) #1
zerny-google
lgtm with a few comments. https://codereview.chromium.org/10942006/diff/1/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/10942006/diff/1/runtime/vm/intermediate_language.cc#newcode349 runtime/vm/intermediate_language.cc:349: return true; is_instance does ...
8 years, 3 months ago (2012-09-18 11:20:24 UTC) #2
regis
8 years, 3 months ago (2012-09-18 14:55:44 UTC) #3
Thank you, Sir!

https://codereview.chromium.org/10942006/diff/1/runtime/vm/intermediate_langu...
File runtime/vm/intermediate_language.cc (right):

https://codereview.chromium.org/10942006/diff/1/runtime/vm/intermediate_langu...
runtime/vm/intermediate_language.cc:349: return true;
On 2012/09/18 11:20:24, zerny wrote:
> is_instance does not appear to be set when this returns true.

Good catch!

https://codereview.chromium.org/10942006/diff/1/runtime/vm/object.cc
File runtime/vm/object.cc (right):

https://codereview.chromium.org/10942006/diff/1/runtime/vm/object.cc#newcode8542
runtime/vm/object.cc:8542: // compile time. Both sentinels are instances of the
Null class, but they
On 2012/09/18 11:20:24, zerny wrote:
> Can we assert that?

There is already an assert for !FLAG_eliminate_type_checks. I added one checking
that this instance is indeed one of the  sentinels.

Powered by Google App Engine
This is Rietveld 408576698