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

Issue 11361059: Fix issue 6472 that exhibited a few crashing bugs in dart2js. (Closed)

Created:
8 years, 1 month ago by ngeoffray
Modified:
8 years, 1 month ago
Reviewers:
karlklose, ahe, kasperl
CC:
reviews_dartlang.org, ahe
Visibility:
Public.

Description

Fix issue 6472 that exhibited a few crashing bugs in dart2js. Committed: https://code.google.com/p/dart/source/detail?r=14461

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -7 lines) Patch
M lib/compiler/implementation/ssa/optimize.dart View 1 1 chunk +8 lines, -5 lines 0 comments Download
M lib/compiler/implementation/universe/partial_type_tree.dart View 1 chunk +3 lines, -1 line 2 comments Download
M lib/compiler/implementation/universe/universe.dart View 1 chunk +1 line, -1 line 4 comments Download
A tests/language/checked_null_test.dart View 1 2 1 chunk +23 lines, -0 lines 4 comments Download

Messages

Total messages: 6 (0 generated)
ngeoffray
8 years, 1 month ago (2012-11-02 10:46:33 UTC) #1
ngeoffray
On 2012/11/02 10:46:33, ngeoffray wrote: Err, fix bug 6472, not r14278.
8 years, 1 month ago (2012-11-02 10:47:15 UTC) #2
kasperl
LGTM. https://codereview.chromium.org/11361059/diff/1/lib/compiler/implementation/ssa/optimize.dart File lib/compiler/implementation/ssa/optimize.dart (right): https://codereview.chromium.org/11361059/diff/1/lib/compiler/implementation/ssa/optimize.dart#newcode150 lib/compiler/implementation/ssa/optimize.dart:150: // If the replacement instruction does not know ...
8 years, 1 month ago (2012-11-02 11:09:40 UTC) #3
ngeoffray
Thanks Kasper https://codereview.chromium.org/11361059/diff/1/lib/compiler/implementation/ssa/optimize.dart File lib/compiler/implementation/ssa/optimize.dart (right): https://codereview.chromium.org/11361059/diff/1/lib/compiler/implementation/ssa/optimize.dart#newcode150 lib/compiler/implementation/ssa/optimize.dart:150: // If the replacement instruction does not ...
8 years, 1 month ago (2012-11-02 11:15:31 UTC) #4
ahe
https://codereview.chromium.org/11361059/diff/6001/lib/compiler/implementation/universe/partial_type_tree.dart File lib/compiler/implementation/universe/partial_type_tree.dart (right): https://codereview.chromium.org/11361059/diff/6001/lib/compiler/implementation/universe/partial_type_tree.dart#newcode67 lib/compiler/implementation/universe/partial_type_tree.dart:67: if (type.element.isTypedef()) return compiler.functionClass; I think this deserves a ...
8 years, 1 month ago (2012-11-05 08:33:32 UTC) #5
ngeoffray
8 years, 1 month ago (2012-11-05 10:51:03 UTC) #6
Thanks Peter for the comments. New CL uploaded:
https://codereview.chromium.org/11361093/.

https://codereview.chromium.org/11361059/diff/6001/lib/compiler/implementatio...
File lib/compiler/implementation/universe/partial_type_tree.dart (right):

https://codereview.chromium.org/11361059/diff/6001/lib/compiler/implementatio...
lib/compiler/implementation/universe/partial_type_tree.dart:67: if
(type.element.isTypedef()) return compiler.functionClass;
On 2012/11/05 08:33:32, ahe wrote:
> I think this deserves a TODO. You're throwing away information.

Done.

https://codereview.chromium.org/11361059/diff/6001/lib/compiler/implementatio...
File lib/compiler/implementation/universe/universe.dart (right):

https://codereview.chromium.org/11361059/diff/6001/lib/compiler/implementatio...
lib/compiler/implementation/universe/universe.dart:425: ClassElement self =
receiverType.element;
On 2012/11/05 08:33:32, ahe wrote:
> Doesn't this fail in checked mode?

Good catch. The test I wrote was not complete.

https://codereview.chromium.org/11361059/diff/6001/lib/compiler/implementatio...
lib/compiler/implementation/universe/universe.dart:433: if (!self.isTypedef() &&
!self.isInterface() && self.isSubclassOf(other)) {
On 2012/11/05 08:33:32, ahe wrote:
> I think it would be better with a positive test, such as: self.isClass().
Also,
> I'm not sure the value of testing for isInterface as classes can be used as
> interfaces as well.

Done.

https://codereview.chromium.org/11361059/diff/6001/tests/language/checked_nul...
File tests/language/checked_null_test.dart (right):

https://codereview.chromium.org/11361059/diff/6001/tests/language/checked_nul...
tests/language/checked_null_test.dart:9: // of [a] was inferred to be
[Comparator] or null;
On 2012/11/05 08:33:32, ahe wrote:
> Did you mean [b] was inferred to be [Comparator]?

No [a]. It was a bug.

https://codereview.chromium.org/11361059/diff/6001/tests/language/checked_nul...
tests/language/checked_null_test.dart:14: Expect.throws(bar, (e) => e is
NullPointerException);
On 2012/11/05 08:33:32, ahe wrote:
> You cannot be sure to get a NullPointerException on all platforms.

I removed the is check.

Powered by Google App Engine
This is Rietveld 408576698