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

Issue 11688010: NoSuchMethod on different super accesses/invocations handled. (Closed)

Created:
7 years, 12 months ago by Johnni Winther
Modified:
7 years, 11 months ago
Reviewers:
ngeoffray
CC:
reviews_dartlang.org
Visibility:
Public.

Description

NoSuchMethod on different super accesses/invocations handled. Committed: https://code.google.com/p/dart/source/detail?r=16558

Patch Set 1 #

Total comments: 12

Patch Set 2 : Updated cf. comments. #

Patch Set 3 : Rebased #

Patch Set 4 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -27 lines) Patch
M sdk/lib/_internal/compiler/implementation/elements/elements.dart View 1 1 chunk +19 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_helper.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 5 chunks +15 lines, -10 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen.dart View 1 2 2 chunks +24 lines, -11 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/nodes.dart View 1 1 chunk +5 lines, -3 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 1 chunk +0 lines, -1 line 0 comments Download
A tests/language/super_no_such_method_test.dart View 1 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Johnni Winther
7 years, 12 months ago (2012-12-27 20:44:51 UTC) #1
ngeoffray
LGTM! https://codereview.chromium.org/11688010/diff/1/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart File sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (right): https://codereview.chromium.org/11688010/diff/1/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart#newcode394 sdk/lib/_internal/compiler/implementation/lib/js_helper.dart:394: if (isAccessor) return const <String,dynamic>{}; Shouldn't that be ...
7 years, 12 months ago (2012-12-28 10:23:58 UTC) #2
Johnni Winther
7 years, 12 months ago (2012-12-28 22:32:31 UTC) #3
https://codereview.chromium.org/11688010/diff/1/sdk/lib/_internal/compiler/im...
File sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (right):

https://codereview.chromium.org/11688010/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/lib/js_helper.dart:394: if
(isAccessor) return const <String,dynamic>{};
On 2012/12/28 10:24:03, ngeoffray wrote:
> Shouldn't that be <dynamic>{} ?

The syntax was changed to include the key type before M1.

https://codereview.chromium.org/11688010/diff/1/sdk/lib/_internal/compiler/im...
File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right):

https://codereview.chromium.org/11688010/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/ssa/builder.dart:3650: bool assignable
= true;
On 2012/12/28 10:24:03, ngeoffray wrote:
> Maybe a Elements.isAssignable helper method could improve readability of this
> method. You would then have to write:
> if (!Elements.isResolved(element) || !Elements.isAssignable(element)) {
>   return generateSuperNoSuchMethodSend(node);
> }

Done.

https://codereview.chromium.org/11688010/diff/1/sdk/lib/_internal/compiler/im...
File sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (right):

https://codereview.chromium.org/11688010/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/ssa/nodes.dart:1432: final bool
isGetter;
On 2012/12/28 10:24:03, ngeoffray wrote:
> Aren't these fields misnamed? Shouldn't they really be isSendSet and
> isPropertyAccess? Otherwise you might think that the element this super is
> refering to is a Dart setter or a Dart getter, and that is not what those
fields
> express.

Done.

https://codereview.chromium.org/11688010/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/ssa/nodes.dart:1433:
HInvokeSuper(inputs, {this.isSetter: false, this.isGetter: false}) :
super(inputs);
On 2012/12/28 10:24:03, ngeoffray wrote:
> long line.

Done.

https://codereview.chromium.org/11688010/diff/1/tests/language/super_no_such_...
File tests/language/super_no_such_method_test.dart (right):

https://codereview.chromium.org/11688010/diff/1/tests/language/super_no_such_...
tests/language/super_no_such_method_test.dart:8: noSuchMethod(im) => true;
On 2012/12/28 10:24:03, ngeoffray wrote:
> Too much indentation here and below.

Done.

https://codereview.chromium.org/11688010/diff/1/tests/language/super_no_such_...
tests/language/super_no_such_method_test.dart:26: 
On 2012/12/28 10:24:03, ngeoffray wrote:
> Do we also have a test where we get the bound closure of a super method?

No, I'll add one.

Powered by Google App Engine
This is Rietveld 408576698