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

Issue 11140018: Ensure that ClassElement.lookupConstructor fails when looking up default constructor using Selector… (Closed)

Created:
8 years, 2 months ago by aam-me
Modified:
8 years, 1 month ago
Reviewers:
ahe, kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Ensure that ClassElement.lookupConstructor fails when looking up default constructor using Selector.callConstructor(), forcing client to use Selector.callDefaultConstructor() instead. BUG=dartbug.com/5834 TEST=tests/compiler/dart2js/resolver_test.dart Committed: https://code.google.com/p/dart/source/detail?r=14127

Patch Set 1 #

Patch Set 2 : Fixed String and SourceString comparison. #

Total comments: 6

Patch Set 3 : Replaced getConstructorName with getConstructorSelector. #

Total comments: 10

Patch Set 4 : Fixed redirecting constructor lookup logic. #

Total comments: 4

Patch Set 5 : Removed unused paramter, inverted if-then-else condition. #

Total comments: 6

Patch Set 6 : Moved code to ResolverVisitor. #

Patch Set 7 : Rebased. #

Patch Set 8 : Rebased. #

Total comments: 9

Patch Set 9 : Cleaned up status file changes. #

Total comments: 2

Patch Set 10 : Use [==] and [!=] instead of [identical] for SourceString comparison. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -87 lines) Patch
M lib/compiler/implementation/elements/elements.dart View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -3 lines 0 comments Download
M lib/compiler/implementation/resolution/members.dart View 1 2 3 4 5 6 7 8 9 6 chunks +58 lines, -68 lines 0 comments Download
M tests/co19/co19-dart2dart.status View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 3 4 5 6 7 8 2 chunks +1 line, -2 lines 0 comments Download
M tests/compiler/dart2js/resolver_test.dart View 1 2 3 4 5 6 7 8 8 chunks +19 lines, -13 lines 1 comment Download
A tests/compiler/dart2js_extra/this_redirecting_constructor_test.dart View 1 2 3 4 5 6 7 8 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
aam-me
Kasper, is this what you had in mind for dartbug.com/5834? Thanks!
8 years, 2 months ago (2012-10-15 01:22:20 UTC) #1
kasperl
Yeah. This is definitely the direction I was heading in. Comments: https://chromiumcodereview.appspot.com/11140018/diff/2001/lib/compiler/implementation/resolver.dart File lib/compiler/implementation/resolver.dart (right): ...
8 years, 2 months ago (2012-10-15 07:26:38 UTC) #2
aam-me
Thanks for the review! PTAL. https://chromiumcodereview.appspot.com/11140018/diff/2001/lib/compiler/implementation/resolver.dart File lib/compiler/implementation/resolver.dart (right): https://chromiumcodereview.appspot.com/11140018/diff/2001/lib/compiler/implementation/resolver.dart#newcode92 lib/compiler/implementation/resolver.dart:92: SourceString getConstructorName(Send node, SourceString ...
8 years, 2 months ago (2012-10-15 12:07:52 UTC) #3
kasperl
LGTM but I think you can simplify it a bit more. https://chromiumcodereview.appspot.com/11140018/diff/6/lib/compiler/implementation/resolver.dart File lib/compiler/implementation/resolver.dart (right): ...
8 years, 2 months ago (2012-10-15 12:14:12 UTC) #4
aam-me
Thank you, Kasper, for the review. Please, see comments below. https://chromiumcodereview.appspot.com/11140018/diff/6/lib/compiler/implementation/resolver.dart File lib/compiler/implementation/resolver.dart (right): https://chromiumcodereview.appspot.com/11140018/diff/6/lib/compiler/implementation/resolver.dart#newcode92 ...
8 years, 2 months ago (2012-10-16 04:09:32 UTC) #5
kasperl
LGTM. Looks even better to me. https://chromiumcodereview.appspot.com/11140018/diff/3005/lib/compiler/implementation/resolver.dart File lib/compiler/implementation/resolver.dart (right): https://chromiumcodereview.appspot.com/11140018/diff/3005/lib/compiler/implementation/resolver.dart#newcode94 lib/compiler/implementation/resolver.dart:94: SourceString className, Unused ...
8 years, 2 months ago (2012-10-16 05:24:02 UTC) #6
aam-me
Thank you for the comments, Kasper. Please take another look when you have a chance. ...
8 years, 2 months ago (2012-10-16 12:07:49 UTC) #7
kasperl
LGTM.
8 years, 2 months ago (2012-10-16 12:19:18 UTC) #8
ahe
LGTM https://chromiumcodereview.appspot.com/11140018/diff/13001/lib/compiler/implementation/resolver.dart File lib/compiler/implementation/resolver.dart (right): https://chromiumcodereview.appspot.com/11140018/diff/13001/lib/compiler/implementation/resolver.dart#newcode94 lib/compiler/implementation/resolver.dart:94: ResolverVisitor visitor) { Passing in the ResolverVisitor to ...
8 years, 2 months ago (2012-10-16 13:56:08 UTC) #9
aam-me
Thank you, Peter, for the review. Please have another look when you have a chance. ...
8 years, 2 months ago (2012-10-17 01:52:04 UTC) #10
aam-me
Ping.
8 years, 1 month ago (2012-10-25 00:52:28 UTC) #11
ahe
LGTM! https://chromiumcodereview.appspot.com/11140018/diff/28001/tests/co19/co19-dart2dart.status File tests/co19/co19-dart2dart.status (left): https://chromiumcodereview.appspot.com/11140018/diff/28001/tests/co19/co19-dart2dart.status#oldcode83 tests/co19/co19-dart2dart.status:83: LibTest/math/exp_A01_t01: Fail # TODO(dart2dart-team): Please triage this failure. ...
8 years, 1 month ago (2012-10-25 13:57:48 UTC) #12
aam-me
Hi, Peter, thank you for the review. I removed changes to the floating-point tests statuses ...
8 years, 1 month ago (2012-10-26 03:56:10 UTC) #13
ahe
LGTM https://chromiumcodereview.appspot.com/11140018/diff/36001/lib/compiler/implementation/elements/elements.dart File lib/compiler/implementation/elements/elements.dart (left): https://chromiumcodereview.appspot.com/11140018/diff/36001/lib/compiler/implementation/elements/elements.dart#oldcode1485 lib/compiler/implementation/elements/elements.dart:1485: if (!identical(constructorName, const SourceString('')) && Actually, I think ...
8 years, 1 month ago (2012-10-26 04:39:10 UTC) #14
aam-me
Thank you, Peter! Good point regarding SourceString comparison. Fixed that. PTAL! https://chromiumcodereview.appspot.com/11140018/diff/36001/lib/compiler/implementation/elements/elements.dart File lib/compiler/implementation/elements/elements.dart (left): ...
8 years, 1 month ago (2012-10-26 10:59:55 UTC) #15
ahe
8 years, 1 month ago (2012-10-26 11:08:53 UTC) #16
LGTM

https://chromiumcodereview.appspot.com/11140018/diff/45001/tests/compiler/dar...
File tests/compiler/dart2js/resolver_test.dart (right):

https://chromiumcodereview.appspot.com/11140018/diff/45001/tests/compiler/dar...
tests/compiler/dart2js/resolver_test.dart:572: if (constructor !== '') {
!=

Powered by Google App Engine
This is Rietveld 408576698