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

Issue 27524003: Generate tear-off closures dynamically. (Closed)

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

Description

Generate tear-off closures dynamically. R=johnniwinther@google.com Committed: https://code.google.com/p/dart/source/detail?r=30955

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Total comments: 72

Patch Set 3 : Merged with r30787 and removed cruft. #

Patch Set 4 : Move pkg/observe/test/path_observer_test.dart to separate CL. #

Patch Set 5 : Removed dead code #

Patch Set 6 : Removed unrelated test. #

Patch Set 7 : Removed unrelated status file changes. #

Patch Set 8 : Merged with CL 99303004. #

Patch Set 9 : Removed more unused API. #

Patch Set 10 : Fix bug in tests/corelib/apply2_test.dart #

Patch Set 11 : Fixed unit tests. #

Total comments: 79

Patch Set 12 : Merged with 30940 and addressed comments. #

Patch Set 13 : Merged with r30954 #

Total comments: 29
Unified diffs Side-by-side diffs Delta from patch set Stats (+1111 lines, -613 lines) Patch
M dart/sdk/lib/_internal/compiler/implementation/js/nodes.dart View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +9 lines, -0 lines 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +35 lines, -4 lines 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +14 lines, -22 lines 0 comments Download
D dart/sdk/lib/_internal/compiler/implementation/js_emitter/closure_invocation_element.dart View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -25 lines 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_emitter/code_emitter_task.dart View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +17 lines, -20 lines 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +234 lines, -356 lines 13 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_emitter/declarations.dart View 1 2 1 chunk +7 lines, -2 lines 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_emitter/interceptor_emitter.dart View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_emitter/js_emitter.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_emitter/metadata_emitter.dart View 1 2 3 4 4 chunks +6 lines, -18 lines 2 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_emitter/nsm_emitter.dart View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -5 lines 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_emitter/reflection_data_parser.dart View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +184 lines, -7 lines 2 comments Download
M dart/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -1 line 0 comments Download
M dart/sdk/lib/_internal/compiler/implementation/universe/universe.dart View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +21 lines, -4 lines 0 comments Download
M dart/sdk/lib/_internal/lib/isolate_helper.dart View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -2 lines 0 comments Download
M dart/sdk/lib/_internal/lib/js_helper.dart View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +394 lines, -46 lines 4 comments Download
M dart/sdk/lib/_internal/lib/js_mirrors.dart View 1 2 3 4 5 6 7 8 9 10 11 17 chunks +149 lines, -80 lines 8 comments Download
M dart/sdk/lib/_internal/lib/js_rti.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M dart/tests/compiler/dart2js/mirrors_used_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -2 lines 0 comments Download
M dart/tests/compiler/dart2js/static_closure_test.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M dart/tests/compiler/dart2js/types_of_captured_variables_test.dart View 1 2 3 4 5 6 7 8 9 10 4 chunks +6 lines, -6 lines 0 comments Download
M dart/tests/compiler/dart2js_extra/deferred/deferred_function_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M dart/tests/compiler/dart2js_extra/mirror_invalid_field_access4_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M dart/tests/compiler/dart2js_extra/mirror_invalid_invoke2_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M dart/tests/compiler/dart2js_extra/mirror_invalid_invoke3_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M dart/tests/lib/lib.status View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 17 (0 generated)
ahe
This is not ready to review or submit yet, but I'd still like to solicit ...
7 years, 2 months ago (2013-10-16 17:18:50 UTC) #1
kasperl
The approach basically looks fine to me. https://codereview.chromium.org/27524003/diff/1/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart File dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart (right): https://codereview.chromium.org/27524003/diff/1/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart#newcode171 dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart:171: namer.closureInvocationSelectorName]; Cache ...
7 years, 2 months ago (2013-10-21 10:25:44 UTC) #2
ahe
Thank you, Kasper! https://codereview.chromium.org/27524003/diff/1/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart File dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart (right): https://codereview.chromium.org/27524003/diff/1/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart#newcode177 dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart:177: selectors = new Set<Selector>.from(selectors)..addAll(callSelectors); On 2013/10/21 ...
7 years, 2 months ago (2013-10-22 10:52:33 UTC) #3
ahe
Sorry, this CL contains a lot more junk that I'll normally include in an initial ...
7 years ago (2013-11-29 08:53:37 UTC) #4
kasperl
I'll continue try to digest the new reflection data. New round of comments: https://codereview.chromium.org/27524003/diff/33001/dart/failing_tests.txt File ...
7 years ago (2013-11-29 10:10:55 UTC) #5
ahe
7 years ago (2013-11-29 19:11:02 UTC) #6
ngeoffray
On 2013/11/29 19:11:02, ahe wrote: Hey Peter, is the CL ready to be reviewed, or ...
7 years ago (2013-12-04 09:26:07 UTC) #7
ahe
On 2013/12/04 09:26:07, ngeoffray wrote: > On 2013/11/29 19:11:02, ahe wrote: > > Hey Peter, ...
7 years ago (2013-12-04 09:54:35 UTC) #8
ahe
https://codereview.chromium.org/27524003/diff/243001/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart File dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart (right): https://codereview.chromium.org/27524003/diff/243001/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart#newcode325 dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart:325: void addMemberMethod(FunctionElement member, ClassBuilder builder) { FYI: this is ...
7 years ago (2013-12-04 09:55:53 UTC) #9
ngeoffray
Haven't seen things to say so far, except way too many long lines :-) Will ...
7 years ago (2013-12-04 14:38:28 UTC) #10
Johnni Winther
LGTM https://codereview.chromium.org/27524003/diff/243001/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart File dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart (right): https://codereview.chromium.org/27524003/diff/243001/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart#newcode138 dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart:138: compiler.internalErrorOnElement(cls.methodElement, 'Bound closure1.'); Better error message. https://codereview.chromium.org/27524003/diff/243001/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart#newcode141 dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart:141: ...
7 years ago (2013-12-05 11:49:56 UTC) #11
ahe
Thank you! https://codereview.chromium.org/27524003/diff/1/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart File dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart (right): https://codereview.chromium.org/27524003/diff/1/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart#newcode171 dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart:171: namer.closureInvocationSelectorName]; On 2013/10/21 10:25:44, kasperl wrote: > ...
7 years ago (2013-12-06 15:57:53 UTC) #12
ahe
7 years ago (2013-12-06 15:58:11 UTC) #13
ahe
Committed patchset #13 manually as r30955 (presubmit successful).
7 years ago (2013-12-06 17:42:15 UTC) #14
ngeoffray
Post-commit comments. https://codereview.chromium.org/27524003/diff/283001/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart File dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart (right): https://codereview.chromium.org/27524003/diff/283001/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart#newcode138 dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart:138: compiler.internalErrorOnElement(cls.methodElement, 'Bound closure1.'); Maybe add a better ...
7 years ago (2013-12-09 11:15:58 UTC) #15
ahe
Comments addressed in CL 104723004. https://codereview.chromium.org/27524003/diff/283001/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart File dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart (right): https://codereview.chromium.org/27524003/diff/283001/dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart#newcode138 dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart:138: compiler.internalErrorOnElement(cls.methodElement, 'Bound closure1.'); On ...
7 years ago (2013-12-09 17:06:47 UTC) #16
ngeoffray
7 years ago (2013-12-09 17:14:54 UTC) #17
Message was sent while issue was closed.
https://codereview.chromium.org/27524003/diff/283001/dart/sdk/lib/_internal/c...
File
dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart
(right):

https://codereview.chromium.org/27524003/diff/283001/dart/sdk/lib/_internal/c...
dart/sdk/lib/_internal/compiler/implementation/js_emitter/container_builder.dart:138:
compiler.internalErrorOnElement(cls.methodElement, 'Bound closure1.');
On 2013/12/09 17:06:47, ahe wrote:
> On 2013/12/09 11:15:58, ngeoffray wrote:
> > Maybe add a better error message.
> 
> Johnni said the same, so I'm going to repeat my answer :-)
> 
> I'm not sure what you suggest would be better. I only added the number to make
> sure that we have enough debugging information if a user reports a crash.

BoundClosure1 may be enough for you, but besides the location of the error, I
can't come up with a reason it should crash. Maybe then add a comment on why
this is an error to have a supertype being the bound closure class, and same
below.

Powered by Google App Engine
This is Rietveld 408576698