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

Issue 9414010: Allow method-calls to getters (assuming they contain closures). (Closed)

Created:
8 years, 10 months ago by floitsch
Modified:
8 years, 10 months ago
Reviewers:
ngeoffray
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Allow method-calls to getters (assuming they contain closures). Example: class A { var f; } main() { var a = new A(); a.f = () => 499; print(a.f()); // <== method call to a.f. } Committed: https://code.google.com/p/dart/source/detail?r=4351

Patch Set 1 #

Patch Set 2 : Cosmetic changes (comments). #

Total comments: 8

Patch Set 3 : Address comments and update status file. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -9 lines) Patch
M frog/leg/compiler.dart View 1 2 2 chunks +25 lines, -0 lines 0 comments Download
M frog/leg/emitter.dart View 1 2 2 chunks +51 lines, -0 lines 0 comments Download
M frog/leg/resolver.dart View 1 chunk +4 lines, -4 lines 0 comments Download
M frog/leg/ssa/builder.dart View 1 chunk +1 line, -1 line 0 comments Download
A frog/tests/leg_only/src/Closure5Test.dart View 1 chunk +23 lines, -0 lines 0 comments Download
A frog/tests/leg_only/src/Closure6Test.dart View 1 chunk +30 lines, -0 lines 0 comments Download
M tests/language/language-leg.status View 1 2 3 chunks +0 lines, -4 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
floitsch
8 years, 10 months ago (2012-02-16 17:21:58 UTC) #1
ngeoffray
LGTM! https://chromiumcodereview.appspot.com/9414010/diff/3001/frog/leg/compiler.dart File frog/leg/compiler.dart (right): https://chromiumcodereview.appspot.com/9414010/diff/3001/frog/leg/compiler.dart#newcode220 frog/leg/compiler.dart:220: // invocation of the getter foo followed an ...
8 years, 10 months ago (2012-02-17 10:19:26 UTC) #2
floitsch
8 years, 10 months ago (2012-02-17 13:19:32 UTC) #3
https://chromiumcodereview.appspot.com/9414010/diff/3001/frog/leg/compiler.dart
File frog/leg/compiler.dart (right):

https://chromiumcodereview.appspot.com/9414010/diff/3001/frog/leg/compiler.da...
frog/leg/compiler.dart:220: // invocation of the getter foo followed an
invocation of the
On 2012/02/17 10:19:26, ngeoffray wrote:
> followed by

Done.

https://chromiumcodereview.appspot.com/9414010/diff/3001/frog/leg/compiler.da...
frog/leg/compiler.dart:223: if (invokedSelectors !== null &&
!invokedSelectors.isEmpty()) {
On 2012/02/17 10:19:26, ngeoffray wrote:
> Please add a comment that you cannot know if the selector applies to the
getter,
> because the getter may return any kind of function.

Done.

https://chromiumcodereview.appspot.com/9414010/diff/3001/frog/leg/emitter.dart
File frog/leg/emitter.dart (right):

https://chromiumcodereview.appspot.com/9414010/diff/3001/frog/leg/emitter.dar...
frog/leg/emitter.dart:373: void emitGetterMethod(StringBuffer buffer,
On 2012/02/17 10:19:26, ngeoffray wrote:
> emitCallStubForGetter

Done.

https://chromiumcodereview.appspot.com/9414010/diff/3001/frog/leg/emitter.dar...
frog/leg/emitter.dart:403: void emitGetterMethods(StringBuffer buffer) {
On 2012/02/17 10:19:26, ngeoffray wrote:
> emitCallStubForGetters

Done.

Powered by Google App Engine
This is Rietveld 408576698