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

Issue 8271008: Set type argument vector at run time in instantiated closure objects. (Closed)

Created:
9 years, 2 months ago by regis
Modified:
9 years, 2 months ago
Reviewers:
siva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Set type argument vector at run time in instantiated closure objects. Set type argument vector at compile time in type of closure variables. TODO: Set type argument vector at compile time in type of closure parameters. Committed: https://code.google.com/p/dart/source/detail?r=416

Patch Set 1 #

Total comments: 8

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+191 lines, -106 lines) Patch
M runtime/vm/code_generator.cc View 1 2 chunks +16 lines, -8 lines 0 comments Download
M runtime/vm/code_generator_ia32.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/code_generator_ia32.cc View 1 9 chunks +53 lines, -52 lines 0 comments Download
M runtime/vm/object.cc View 1 2 chunks +22 lines, -8 lines 0 comments Download
M runtime/vm/parser.cc View 1 6 chunks +66 lines, -27 lines 0 comments Download
M runtime/vm/stub_code_ia32.cc View 1 10 chunks +33 lines, -11 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
regis
9 years, 2 months ago (2011-10-13 16:47:58 UTC) #1
siva
LGTM http://codereview.chromium.org/8271008/diff/1/runtime/vm/code_generator_ia32.cc File runtime/vm/code_generator_ia32.cc (right): http://codereview.chromium.org/8271008/diff/1/runtime/vm/code_generator_ia32.cc#newcode914 runtime/vm/code_generator_ia32.cc:914: __ popl(ECX); // Pop receiver. The code for ...
9 years, 2 months ago (2011-10-13 20:52:21 UTC) #2
regis
9 years, 2 months ago (2011-10-13 21:33:46 UTC) #3
Thanks!

http://codereview.chromium.org/8271008/diff/1/runtime/vm/code_generator_ia32.cc
File runtime/vm/code_generator_ia32.cc (right):

http://codereview.chromium.org/8271008/diff/1/runtime/vm/code_generator_ia32....
runtime/vm/code_generator_ia32.cc:914: __ popl(ECX);  // Pop receiver.
On 2011/10/13 20:52:21, asiva wrote:
> The code for VisitClosureNode and VisitImplicitInstanceClosureNode seem
> identical in the middle, I am wondering if it be worth making a static method
of
> the common code.

I tried to factorize the visiting code of all 3 closure flavors, but it gets
harder to read.

Even for the 2 instance flavors, many parameters need to be passed to the common
function, since the 2 ast node types are unrelated.

At this point, it would make sense to consolidate all 3 ast nodes into a single
one, For now. I will leave it as is.

Added TODO.

http://codereview.chromium.org/8271008/diff/1/runtime/vm/code_generator_ia32....
runtime/vm/code_generator_ia32.cc:2250: __ popl(EAX);
On 2011/10/13 20:52:21, asiva wrote:
> // Pop instantiator.

Done.

http://codereview.chromium.org/8271008/diff/1/runtime/vm/stub_code_ia32.cc
File runtime/vm/stub_code_ia32.cc (right):

http://codereview.chromium.org/8271008/diff/1/runtime/vm/stub_code_ia32.cc#ne...
runtime/vm/stub_code_ia32.cc:1247: //   ESP : points to return address.
On 2011/10/13 20:52:21, asiva wrote:
> if signature class is not parameterized  ESP + 4 will be the receiver right,
> maybe we should document that?

Done.

http://codereview.chromium.org/8271008/diff/1/runtime/vm/stub_code_ia32.cc#ne...
runtime/vm/stub_code_ia32.cc:1368: __ PushObject(TypeArguments::ZoneHandle()); 
// Push null type arguments.
On 2011/10/13 20:52:21, asiva wrote:
> why not use pushl(raw_null) here?

Done here and at some other locations.

Powered by Google App Engine
This is Rietveld 408576698