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

Issue 11958009: Do not track parameter types of closures, since closure calls can be generated during the emitter. (Closed)

Created:
7 years, 11 months ago by ngeoffray
Modified:
7 years, 11 months ago
Reviewers:
kasperl
CC:
reviews_dartlang.org, sra1
Visibility:
Public.

Description

Do not track parameter types of closures, since closure calls can be generated during the emitter. Committed: https://code.google.com/p/dart/source/detail?r=17134

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -5 lines) Patch
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 1 chunk +7 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen.dart View 1 chunk +0 lines, -5 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/universe/universe.dart View 1 1 chunk +4 lines, -0 lines 0 comments Download
A tests/language/closure_parameter_types_test.dart View 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
ngeoffray
7 years, 11 months ago (2013-01-16 11:39:58 UTC) #1
kasperl
LGTM, but: https://codereview.chromium.org/11958009/diff/1/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart File sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (right): https://codereview.chromium.org/11958009/diff/1/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart#newcode488 sdk/lib/_internal/compiler/implementation/js_backend/backend.dart:488: if (selector.name == Compiler.CALL_OPERATOR_NAME) { Using == ...
7 years, 11 months ago (2013-01-16 11:54:46 UTC) #2
ngeoffray
7 years, 11 months ago (2013-01-16 12:10:03 UTC) #3
Thanks Kasper.

https://codereview.chromium.org/11958009/diff/1/sdk/lib/_internal/compiler/im...
File sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (right):

https://codereview.chromium.org/11958009/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/js_backend/backend.dart:488: if
(selector.name == Compiler.CALL_OPERATOR_NAME) {
On 2013/01/16 11:54:46, kasperl wrote:
> Using == is kind of dangerous because it works for all types. Maybe add a
helper
> somewhere that looks something like this:
> 
>    bool isClosureCallName(SourceString name) {
>      SourceString callName = Compiler.CALL_OPERATOR_NAME;
>      return name == callName;
>    }
> 
> That will give us warnings and checked-mode errors if we ever change the type
of
> selector.name to something that doesn't match the type of
> Compiler.CALL_OPERATOR_NAME. This would also be very useful in the namer.

Good point. I added a Selector.isClosureCall for now that catches this.

Powered by Google App Engine
This is Rietveld 408576698