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

Issue 8289027: Set type argument vector at compile time in type of closure parameters; this (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 compile time in type of closure parameters; this require the introduction of a signature type cached in signature functions. Support printing of the name of an instantiated signature type, e.g. print '(int) => int' instead of '<T>(T) => T<int>'. Avoid cycles when printing the name of illegal types during error reporting by checking that the type is not being finalized. Committed: https://code.google.com/p/dart/source/detail?r=479

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -69 lines) Patch
M runtime/vm/class_finalizer.cc View 1 3 chunks +8 lines, -8 lines 0 comments Download
M runtime/vm/code_generator_ia32.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M runtime/vm/object.h View 1 8 chunks +35 lines, -2 lines 0 comments Download
M runtime/vm/object.cc View 1 13 chunks +106 lines, -19 lines 0 comments Download
M runtime/vm/parser.cc View 1 5 chunks +29 lines, -39 lines 0 comments Download
M runtime/vm/raw_object.h View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
regis
9 years, 2 months ago (2011-10-15 03:15:42 UTC) #1
siva
LGTM http://codereview.chromium.org/8289027/diff/1/runtime/vm/object.cc File runtime/vm/object.cc (right): http://codereview.chromium.org/8289027/diff/1/runtime/vm/object.cc#newcode707 runtime/vm/object.cc:707: const intptr_t num_type_params = NumTypeParameters(); Should we add ...
9 years, 2 months ago (2011-10-17 18:36:58 UTC) #2
regis
9 years, 2 months ago (2011-10-17 19:02:47 UTC) #3
Thanks!

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

http://codereview.chromium.org/8289027/diff/1/runtime/vm/object.cc#newcode707
runtime/vm/object.cc:707: const intptr_t num_type_params = NumTypeParameters();
On 2011/10/17 18:36:59, asiva wrote:
> Should we add a num_type_params check? would avoid 4 handle creations.
> 
> if (num_type_params > 0) {
>   ....
>   ...
>   ...
>   ...
>   for (int i = 0;.....) {
>   }
> }
> 
> Also what does TypeArguments::NewTypeArray(0) return?

Good point. I actually can replace the test IsParameterized() by num_type_params
> 0.
Is it OK to leave the type argument vector as null if the class has no type
parameters on its own. Type finalization will extend the vector with the
arguments of the base class if necessary.

Powered by Google App Engine
This is Rietveld 408576698