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

Issue 9250005: Fix dartc in optimized mode (broken in r3358). (Closed)

Created:
8 years, 11 months ago by kasperl
Modified:
8 years, 11 months ago
Reviewers:
mmendez, floitsch
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix dartc in optimized mode (broken in r3358). Add checks that ensure that keys used for array access are integers. Fix bug in the optimization strategy that ended up generating the wrong code for "native" classes. R=floitsch@google.com,mmendez@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=3390

Patch Set 1 #

Patch Set 2 : Merge. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -32 lines) Patch
M compiler/java/com/google/dart/compiler/backend/js/BasicOptimizationStrategy.java View 1 chunk +1 line, -1 line 1 comment Download
M compiler/lib/implementation/array.dart View 1 2 chunks +2 lines, -15 lines 0 comments Download
M compiler/lib/implementation/array.js View 1 3 chunks +26 lines, -11 lines 0 comments Download
M compiler/lib/implementation/core.js View 1 chunk +1 line, -1 line 0 comments Download
M corelib/src/implementation/hash_map_set.dart View 2 chunks +5 lines, -3 lines 0 comments Download
tests/corelib/corelib.status View 1 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
kasperl
8 years, 11 months ago (2012-01-18 12:05:54 UTC) #1
floitsch
LGTM!
8 years, 11 months ago (2012-01-18 12:34:42 UTC) #2
mmendez
8 years, 11 months ago (2012-01-18 16:27:54 UTC) #3
lgtm

The inconsistency between the class modifiers and the native class name was the
root cause behind the failure of
http://code.google.com/p/dart/source/detail?r=3356.  Thanks for fixing it in
this patch.

https://chromiumcodereview.appspot.com/9250005/diff/3001/compiler/java/com/go...
File
compiler/java/com/google/dart/compiler/backend/js/BasicOptimizationStrategy.java
(right):

https://chromiumcodereview.appspot.com/9250005/diff/3001/compiler/java/com/go...
compiler/java/com/google/dart/compiler/backend/js/BasicOptimizationStrategy.java:426:
if (classElement.getNativeName() != null) {
Nit: I'm not sure how many other places might assume that native classes have
the native bit set in the modifiers.  The fact that the modifier does not jive
with the native name attribute is confusing.

Another option is to leave this as classElement.getModifiers and append
"modifiers = modifiers.makeNative();" to DartParser.parseClass line 611.

Powered by Google App Engine
This is Rietveld 408576698