Chromium Code Reviews
DescriptionImplement more of allocation code using type arguments. Type argument extraction for non-factories produces two results, however, instructions can produce only one temporary. Use a stack placeholder so that we have room to push two results. Examples of generated IL (first factory, second non-factory).
foo() { return new List<T>(); }
moo() { return new A<T>(); }
==== file:///sources/dartall/dart/runtime/Test.dart_A_foo
0: [target]
t1 <- LoadLocal(this)
t1 <- NativeLoadField(t1, 16)
t1 <- ExtractTypeArguments(t1)
t0 <- StaticCall(List., t0)
return t0
==== file:///sources/dartall/dart/runtime/Test.dart_A_moo
0: [target]
t0 <- #null
t1 <- LoadLocal(this)
t1 <- NativeLoadField(t1, 16)
t1 <- ExtractTypeArguments(t1)
t0 <- AllocateObject(Library:'file:///sources/dartall/dart/runtime/Test.dart' Class: A, t0, t1)
t1 <- Pick(t0)
t2 <- #3
StaticCall(A., t1, t2)
return t0
Committed: https://code.google.com/p/dart/source/detail?r=5480
Patch Set 1 #
Total comments: 2
Patch Set 2 : #
Messages
Total messages: 3 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||