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

Issue 11669015: Turn compile time errors related to missing getters and setters into invocation (Closed)

Created:
8 years ago by regis
Modified:
7 years, 11 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Turn compile time errors related to missing getters and setters into invocation of noSuchMethod or into throwing of NoSuchMethodError according to spec. Return result of InvocationMirror.invokeOn to caller. Fix various tests. Committed: https://code.google.com/p/dart/source/detail?r=16463

Patch Set 1 #

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+200 lines, -158 lines) Patch
M runtime/lib/invocation_mirror_patch.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/ast.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/ast.cc View 1 2 chunks +53 lines, -48 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 4 chunks +84 lines, -34 lines 0 comments Download
M runtime/vm/parser.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 9 chunks +46 lines, -40 lines 0 comments Download
D tests/language/assign_top_method_negative_test.dart View 1 1 chunk +0 lines, -10 lines 0 comments Download
A + tests/language/assign_top_method_test.dart View 2 chunks +3 lines, -2 lines 0 comments Download
M tests/language/invocation_mirror_test.dart View 1 4 chunks +5 lines, -5 lines 2 comments Download
M tests/language/language.status View 1 3 chunks +3 lines, -15 lines 0 comments Download
M tests/language/language_dart2js.status View 1 3 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
regis
8 years ago (2012-12-21 23:38:32 UTC) #1
hausner
LGTM
8 years ago (2012-12-22 00:35:20 UTC) #2
regis
Thanks!
8 years ago (2012-12-22 00:41:52 UTC) #3
srdjan
lgtm
7 years, 12 months ago (2012-12-26 17:36:50 UTC) #4
Lasse Reichstein Nielsen
https://codereview.chromium.org/11669015/diff/6001/tests/language/invocation_mirror_test.dart File tests/language/invocation_mirror_test.dart (right): https://codereview.chromium.org/11669015/diff/6001/tests/language/invocation_mirror_test.dart#newcode45 tests/language/invocation_mirror_test.dart:45: Expect.equals(0, im.namedArguments.length, "$name:#named"); This change is incorrect. The API ...
7 years, 11 months ago (2013-01-02 09:59:29 UTC) #5
regis
7 years, 11 months ago (2013-01-02 17:37:21 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/11669015/diff/6001/tests/language/invocation_...
File tests/language/invocation_mirror_test.dart (right):

https://codereview.chromium.org/11669015/diff/6001/tests/language/invocation_...
tests/language/invocation_mirror_test.dart:45: Expect.equals(0,
im.namedArguments.length, "$name:#named");
On 2013/01/02 09:59:29, Lasse Reichstein Nielsen wrote:
> This change is incorrect.
> The API specification for InvocationMirror states that if isGetter is true,
then
> both positional and named arguments must be null.
> Now, I'm quite open to changing that if you have reasons to prefer using empty
> unmodifiable collections instead - it's actually quite reasonable, and if you
> have the (reusable) objects anyway, it should be no more expensive than
passing
> null.

The Language Spec has refined the description of the InvocationMirror instance
passed to noSuchMethod(). In the case of a getter, positionalArguments is an
empty array and namedArguments is an empty map. Please, update the API spec
accordingly. Thanks.

Powered by Google App Engine
This is Rietveld 408576698