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

Issue 10448025: Canonicalize bound closures for non-optional-arg methods. (Closed)

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

Description

Canonicalize bound closures for non-optional-arg methods. Committed: https://code.google.com/p/dart/source/detail?r=8102

Patch Set 1 #

Total comments: 12

Patch Set 2 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -45 lines) Patch
M lib/compiler/implementation/emitter.dart View 1 2 chunks +64 lines, -45 lines 0 comments Download
A tests/language/closure7_test.dart View 1 chunk +96 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
floitsch
https://chromiumcodereview.appspot.com/10448025/diff/1/lib/compiler/implementation/emitter.dart File lib/compiler/implementation/emitter.dart (left): https://chromiumcodereview.appspot.com/10448025/diff/1/lib/compiler/implementation/emitter.dart#oldcode670 lib/compiler/implementation/emitter.dart:670: String targetName = namer.instanceMethodName(member.getLibrary(), This line has been moved ...
8 years, 7 months ago (2012-05-25 14:17:21 UTC) #1
kasperl
LGTM! https://chromiumcodereview.appspot.com/10448025/diff/1/lib/compiler/implementation/emitter.dart File lib/compiler/implementation/emitter.dart (right): https://chromiumcodereview.appspot.com/10448025/diff/1/lib/compiler/implementation/emitter.dart#newcode633 lib/compiler/implementation/emitter.dart:633: // 'foo'. Then we generate the following code ...
8 years, 6 months ago (2012-05-30 08:15:51 UTC) #2
ngeoffray
https://chromiumcodereview.appspot.com/10448025/diff/1/lib/compiler/implementation/emitter.dart File lib/compiler/implementation/emitter.dart (right): https://chromiumcodereview.appspot.com/10448025/diff/1/lib/compiler/implementation/emitter.dart#newcode647 lib/compiler/implementation/emitter.dart:647: // if there are no optional parameters. Explain why.
8 years, 6 months ago (2012-05-30 10:23:32 UTC) #3
floitsch
8 years, 6 months ago (2012-05-30 13:24:07 UTC) #4
https://chromiumcodereview.appspot.com/10448025/diff/1/lib/compiler/implement...
File lib/compiler/implementation/emitter.dart (right):

https://chromiumcodereview.appspot.com/10448025/diff/1/lib/compiler/implement...
lib/compiler/implementation/emitter.dart:633: // 'foo'. Then we generate the
following code (in pseudo Dart/Js):
On 2012/05/30 08:15:51, kasperl wrote:
> Js -> JavaScript

Done.

https://chromiumcodereview.appspot.com/10448025/diff/1/lib/compiler/implement...
lib/compiler/implementation/emitter.dart:647: // if there are no optional
parameters.
On 2012/05/30 10:23:33, ngeoffray wrote:
> Explain why.

Done.

https://chromiumcodereview.appspot.com/10448025/diff/1/lib/compiler/implement...
lib/compiler/implementation/emitter.dart:651: member.parameterCount(compiler);
On 2012/05/30 08:15:51, kasperl wrote:
> This looks fishy.
removed.

https://chromiumcodereview.appspot.com/10448025/diff/1/lib/compiler/implement...
lib/compiler/implementation/emitter.dart:653: String closureClass = null;
On 2012/05/30 08:15:51, kasperl wrote:
> Maybe use something ala:
> 
>    String closureClass = hasOptionalParameters
>        ? null
>        : boundClosureCache[parameterCount];

Done.

https://chromiumcodereview.appspot.com/10448025/diff/1/lib/compiler/implement...
lib/compiler/implementation/emitter.dart:684: arguments[i] = "arg$i";
On 2012/05/30 08:15:51, kasperl wrote:
> I wonder if a shorter name wouldn't be as nice. p0, p1?

Done.

Powered by Google App Engine
This is Rietveld 408576698