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

Issue 11273034: Make unmatched static call a runtime error. (Closed)

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

Description

Make unmatched static call a runtime error. The runtime error message will be constructed using NoSuchMethodError.toString(), which prints "incorrect number of arguments passed to method", which may be a bit confusing for calls where the named optional arguments do not match, but we can emit a more precise message in the resolver. BUG=http://code.google.com/p/dart/issues/detail?id=6217 Committed: https://code.google.com/p/dart/source/detail?r=14172

Patch Set 1 #

Total comments: 6

Patch Set 2 : Refactor checks and add status file changes. #

Patch Set 3 : Revert change to comment. #

Patch Set 4 : Remove duplicate call. #

Patch Set 5 : Fix a bug. #

Total comments: 9

Patch Set 6 : Refactored resolution code. #

Total comments: 5

Patch Set 7 : Add bug number to test. #

Patch Set 8 : Remove isValid. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -55 lines) Patch
M lib/compiler/implementation/dart_backend/placeholder_collector.dart View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M lib/compiler/implementation/elements/elements.dart View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M lib/compiler/implementation/lib/js_helper.dart View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M lib/compiler/implementation/resolution/members.dart View 1 2 3 4 5 6 7 2 chunks +19 lines, -9 lines 0 comments Download
M lib/compiler/implementation/ssa/builder.dart View 1 2 3 4 5 6 7 7 chunks +56 lines, -15 lines 0 comments Download
M lib/compiler/implementation/universe/universe.dart View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 3 4 5 6 7 7 chunks +8 lines, -13 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 4 5 6 7 3 chunks +1 line, -14 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
karlklose
8 years, 1 month ago (2012-10-25 10:56:08 UTC) #1
ngeoffray
http://codereview.chromium.org/11273034/diff/1/lib/compiler/implementation/resolution/members.dart File lib/compiler/implementation/resolution/members.dart (right): http://codereview.chromium.org/11273034/diff/1/lib/compiler/implementation/resolution/members.dart#newcode1704 lib/compiler/implementation/resolution/members.dart:1704: || target.kind == ElementKind.GENERATIVE_CONSTRUCTOR) Why do you need these ...
8 years, 1 month ago (2012-10-25 11:24:09 UTC) #2
ahe
LGTM, except for the use of optional arguments. http://codereview.chromium.org/11273034/diff/1/lib/compiler/implementation/lib/js_helper.dart File lib/compiler/implementation/lib/js_helper.dart (right): http://codereview.chromium.org/11273034/diff/1/lib/compiler/implementation/lib/js_helper.dart#newcode1378 lib/compiler/implementation/lib/js_helper.dart:1378: void ...
8 years, 1 month ago (2012-10-25 13:34:04 UTC) #3
karlklose
Thanks for the reviews. I have uploaded a new version which addresses some offline comments ...
8 years, 1 month ago (2012-10-25 13:55:44 UTC) #4
ahe
LGTM, except for the optional arguments. http://codereview.chromium.org/11273034/diff/3002/lib/compiler/implementation/elements/elements.dart File lib/compiler/implementation/elements/elements.dart (right): http://codereview.chromium.org/11273034/diff/3002/lib/compiler/implementation/elements/elements.dart#newcode151 lib/compiler/implementation/elements/elements.dart:151: bool hasSignature() => ...
8 years, 1 month ago (2012-10-25 14:07:27 UTC) #5
ngeoffray
http://codereview.chromium.org/11273034/diff/3002/lib/compiler/implementation/resolution/members.dart File lib/compiler/implementation/resolution/members.dart (right): http://codereview.chromium.org/11273034/diff/3002/lib/compiler/implementation/resolution/members.dart#newcode1712 lib/compiler/implementation/resolution/members.dart:1712: if (Elements.isValid(target) && target.hasSignature() Actually, I'd prefer having the ...
8 years, 1 month ago (2012-10-25 14:21:58 UTC) #6
ahe
http://codereview.chromium.org/11273034/diff/3002/lib/compiler/implementation/resolution/members.dart File lib/compiler/implementation/resolution/members.dart (right): http://codereview.chromium.org/11273034/diff/3002/lib/compiler/implementation/resolution/members.dart#newcode1712 lib/compiler/implementation/resolution/members.dart:1712: if (Elements.isValid(target) && target.hasSignature() On 2012/10/25 14:21:58, ngeoffray wrote: ...
8 years, 1 month ago (2012-10-25 15:37:36 UTC) #7
karlklose
http://codereview.chromium.org/11273034/diff/3002/lib/compiler/implementation/elements/elements.dart File lib/compiler/implementation/elements/elements.dart (right): http://codereview.chromium.org/11273034/diff/3002/lib/compiler/implementation/elements/elements.dart#newcode151 lib/compiler/implementation/elements/elements.dart:151: bool hasSignature() => isFunction() || isConstructor(); On 2012/10/25 14:07:27, ...
8 years, 1 month ago (2012-10-26 11:08:48 UTC) #8
ngeoffray
LGTM http://codereview.chromium.org/11273034/diff/13001/lib/compiler/implementation/elements/elements.dart File lib/compiler/implementation/elements/elements.dart (right): http://codereview.chromium.org/11273034/diff/13001/lib/compiler/implementation/elements/elements.dart#newcode1659 lib/compiler/implementation/elements/elements.dart:1659: * erroneuous elements. erroneuous -> erroneous http://codereview.chromium.org/11273034/diff/13001/lib/compiler/implementation/elements/elements.dart#newcode1661 lib/compiler/implementation/elements/elements.dart:1661: ...
8 years, 1 month ago (2012-10-26 12:15:57 UTC) #9
karlklose
http://codereview.chromium.org/11273034/diff/13001/tests/language/language_dart2js.status File tests/language/language_dart2js.status (right): http://codereview.chromium.org/11273034/diff/13001/tests/language/language_dart2js.status#newcode92 tests/language/language_dart2js.status:92: named_parameters_aggregated_test/04: Fail We detect that the selector does not ...
8 years, 1 month ago (2012-10-26 12:23:22 UTC) #10
karlklose
8 years, 1 month ago (2012-10-26 12:39:43 UTC) #11
http://codereview.chromium.org/11273034/diff/13001/lib/compiler/implementatio...
File lib/compiler/implementation/elements/elements.dart (right):

http://codereview.chromium.org/11273034/diff/13001/lib/compiler/implementatio...
lib/compiler/implementation/elements/elements.dart:1661: static bool
isValid(Element e) => !isUnresolved(e);
Done, removed it.

Powered by Google App Engine
This is Rietveld 408576698