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

Issue 14986002: Make static tear-off closures a class, like instance tear-off closures. (Closed)

Created:
7 years, 7 months ago by ngeoffray
Modified:
7 years, 7 months ago
CC:
reviews_dartlang.org, karlklose
Visibility:
Public.

Description

Make static tear-off closures a class, like instance tear-off closures. R=johnniwinther@google.com, sra@google.com Committed: https://code.google.com/p/dart/source/detail?r=22667

Patch Set 1 : #

Total comments: 14

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+177 lines, -208 lines) Patch
M sdk/lib/_internal/compiler/implementation/compiler.dart View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 2 7 chunks +3 lines, -15 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/constant_emitter.dart View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart View 1 2 10 chunks +64 lines, -36 lines 3 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/namer.dart View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/interceptors.dart View 1 2 1 chunk +0 lines, -11 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart View 1 2 4 chunks +9 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_helper.dart View 1 2 1 chunk +0 lines, -12 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 2 17 chunks +40 lines, -70 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen.dart View 1 2 7 chunks +32 lines, -44 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/nodes.dart View 1 2 2 chunks +6 lines, -7 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/optimize.dart View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/tracer.dart View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/inverse_operator_test.dart View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M tests/compiler/dart2js/pretty_parameter_test.dart View 1 2 3 chunks +2 lines, -1 line 0 comments Download
M tests/compiler/dart2js/ssa_phi_codegen_test.dart View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M tests/compiler/dart2js/static_closure_test.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
ngeoffray
@Kasper: there was a limitation on our tear-off closures of static methods. Because we were ...
7 years, 7 months ago (2013-05-06 10:16:26 UTC) #1
sra1
General comments 1. 'TearOff' seems to be a strange name. It makes sense to maybe ...
7 years, 7 months ago (2013-05-07 00:26:13 UTC) #2
ngeoffray
Thanks Stephen, PTAL. https://codereview.chromium.org/14986002/diff/36/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/14986002/diff/36/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1821 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1821: final Map<Element, Element> staticGetters = new ...
7 years, 7 months ago (2013-05-13 10:24:48 UTC) #3
ngeoffray
On 2013/05/07 00:26:13, sra1 wrote: > General comments > > 1. 'TearOff' seems to be ...
7 years, 7 months ago (2013-05-13 10:26:47 UTC) #4
sra1
lgtm https://chromiumcodereview.appspot.com/14986002/diff/36/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://chromiumcodereview.appspot.com/14986002/diff/36/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1823 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1823: void emitStaticFunctionGetters(CodeBuffer eagerBuffer) { On 2013/05/13 10:24:48, ngeoffray ...
7 years, 7 months ago (2013-05-14 03:19:46 UTC) #5
ngeoffray
Thanks Stephen. https://chromiumcodereview.appspot.com/14986002/diff/36/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://chromiumcodereview.appspot.com/14986002/diff/36/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1823 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1823: void emitStaticFunctionGetters(CodeBuffer eagerBuffer) { On 2013/05/14 03:19:46, ...
7 years, 7 months ago (2013-05-14 08:28:45 UTC) #6
ngeoffray
@Johnni: Could you please take a look at the changes in codegen.dart, line 5022?
7 years, 7 months ago (2013-05-14 09:41:08 UTC) #7
Johnni Winther
lgtm
7 years, 7 months ago (2013-05-14 10:37:37 UTC) #8
ngeoffray
Committed patchset #3 manually as r22667 (presubmit successful).
7 years, 7 months ago (2013-05-14 10:40:06 UTC) #9
ahe
https://codereview.chromium.org/14986002/diff/15001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/14986002/diff/15001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1836 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1836: 'new $closureClass($isolateProperties.$staticName, "$closureName")'); This broke deferred loading (and try.dartlang.org). ...
7 years, 7 months ago (2013-05-16 20:07:56 UTC) #10
sra1
https://codereview.chromium.org/14986002/diff/15001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/14986002/diff/15001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1836 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1836: 'new $closureClass($isolateProperties.$staticName, "$closureName")'); On 2013/05/16 20:07:56, ahe wrote: > ...
7 years, 7 months ago (2013-05-16 20:28:33 UTC) #11
ahe
7 years, 7 months ago (2013-05-16 20:30:44 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/14986002/diff/15001/sdk/lib/_internal/compile...
File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right):

https://codereview.chromium.org/14986002/diff/15001/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1836: 'new
$closureClass($isolateProperties.$staticName, "$closureName")');
On 2013/05/16 20:28:33, sra1 wrote:
> On 2013/05/16 20:07:56, ahe wrote:
> > This broke deferred loading (and http://try.dartlang.org).
> > 
> > You're emitting a constant here, but not using bufferForConstant.  This
means
> > that $ isn't the correct object.  We can take a look at that tomorrow or
> later.
> 
> This would 'just work' if static function closures were generated as a new
kind
> of constant, ClosureConstant, which works rather like a ConstructedConstant. 
> The arguments would be the FunctionConstant referencing the raw static
function
> and the name string.
> (It might even be reasonable to use ConstructedConstant directly).

I was thinking the same thing.  Well, up to the second comma.  Then you thought
ahead :-)

Powered by Google App Engine
This is Rietveld 408576698