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

Issue 1255063005: Constructor tear-off closures (Closed)

Created:
5 years, 4 months ago by hausner
Modified:
5 years, 4 months ago
Reviewers:
regis, srdjan
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Ivan Posva, Florian Schneider
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Implement constructor closures One detail that isn't implemented yet is canonicalization of constructor tear-offs. At the moment, two tear-offs of the same constructor result in closures that are not equal. BUG= R=regis@google.com Committed: https://github.com/dart-lang/sdk/commit/4ebab25d8f250f389a991148ba847c2b5d3c7c04

Patch Set 1 #

Patch Set 2 : Add test #

Patch Set 3 : Skip tearoff test in analyzer and dart2js #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+343 lines, -18 lines) Patch
M runtime/vm/object.h View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M runtime/vm/parser.h View 3 chunks +9 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 11 chunks +239 lines, -16 lines 10 comments Download
M runtime/vm/symbols.h View 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/language_analyzer.status View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/language_analyzer2.status View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A tests/language/tearoff_constructor_basic_test.dart View 1 1 chunk +81 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
hausner
5 years, 4 months ago (2015-08-03 20:16:52 UTC) #2
hausner
Adding Regis who knows a thing or two about type parameters.
5 years, 4 months ago (2015-08-03 20:32:49 UTC) #4
regis
LGTM https://codereview.chromium.org/1255063005/diff/40001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/1255063005/diff/40001/runtime/vm/parser.cc#newcode837 runtime/vm/parser.cc:837: // of functions, special cases for getters and ...
5 years, 4 months ago (2015-08-03 21:51:36 UTC) #5
hausner
Committed patchset #3 (id:40001) manually as 4ebab25d8f250f389a991148ba847c2b5d3c7c04 (presubmit successful).
5 years, 4 months ago (2015-08-03 22:51:01 UTC) #6
hausner
Thank you! https://codereview.chromium.org/1255063005/diff/40001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/1255063005/diff/40001/runtime/vm/parser.cc#newcode837 runtime/vm/parser.cc:837: // of functions, special cases for getters ...
5 years, 4 months ago (2015-08-03 22:52:16 UTC) #7
srdjan
lgtm https://codereview.chromium.org/1255063005/diff/40001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/1255063005/diff/40001/runtime/vm/parser.cc#newcode847 runtime/vm/parser.cc:847: const Script& script = Script::Handle(func.script()); Handle(isolate(), ...) https://codereview.chromium.org/1255063005/diff/40001/runtime/vm/parser.cc#newcode857 ...
5 years, 4 months ago (2015-08-03 23:27:30 UTC) #8
hausner
5 years, 4 months ago (2015-08-03 23:52:21 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/1255063005/diff/40001/runtime/vm/parser.cc
File runtime/vm/parser.cc (right):

https://codereview.chromium.org/1255063005/diff/40001/runtime/vm/parser.cc#ne...
runtime/vm/parser.cc:847: const Script& script = Script::Handle(func.script());
On 2015/08/03 23:27:30, srdjan wrote:
> Handle(isolate(), ...)

This is in a static method, so isolate() is not available.

https://codereview.chromium.org/1255063005/diff/40001/runtime/vm/parser.cc#ne...
runtime/vm/parser.cc:857:
Thread::Current()->isolate()->object_store()->clear_sticky_error();
On 2015/08/03 23:27:30, srdjan wrote:
> Parser has isolate_ field:
> isolate()->object_store()->clear....

same here.

Powered by Google App Engine
This is Rietveld 408576698