mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 15:01:29 +00:00
dart2js cps: Fix treatment of captured type variables.
CLOSES=24064 BUG= R=kmillikin@google.com Review URL: https://codereview.chromium.org//1286113003.
This commit is contained in:
parent
f2d08149fd
commit
0210c5c035
|
@ -2368,11 +2368,17 @@ class IrBuilder {
|
|||
SourceInformation sourceInformation) {
|
||||
List<ir.Primitive> arguments = <ir.Primitive>[];
|
||||
for (ClosureFieldElement field in classElement.closureFields) {
|
||||
// Captured 'this' is not available as a local in the current environment,
|
||||
// so treat that specially.
|
||||
ir.Primitive value = field.local is ThisLocal
|
||||
? buildThis()
|
||||
: environment.lookup(field.local);
|
||||
// Captured 'this' and type variables are not always available as locals
|
||||
// in the environment, so treat those specially.
|
||||
ir.Primitive value;
|
||||
if (field.local is ThisLocal) {
|
||||
value = buildThis();
|
||||
} else if (field.local is TypeVariableLocal) {
|
||||
TypeVariableLocal variable = field.local;
|
||||
value = buildTypeVariableAccess(variable.typeVariable);
|
||||
} else {
|
||||
value = environment.lookup(field.local);
|
||||
}
|
||||
arguments.add(value);
|
||||
}
|
||||
return addPrimitive(new ir.CreateInstance(
|
||||
|
|
|
@ -153,7 +153,6 @@ third_party/di_tests/di_test: Pass, Slow # Issue 22896
|
|||
analyzer/test/*: PubGetError
|
||||
|
||||
[ $compiler == dart2js && $cps_ir ]
|
||||
analyzer/test/cancelable_future_test: Crash # Invalid argument(s)
|
||||
analyzer/test/enum_test: Crash # (static Iterable<Str... cannot handle sync*/async* functions
|
||||
analyzer/test/generated/all_the_rest_test: Crash # Invalid argument(s)
|
||||
analyzer/test/src/context/context_test: Crash # Invalid argument(s)
|
||||
|
|
|
@ -353,8 +353,7 @@ await_test: RuntimeError # $async$temp1.S is not a function
|
|||
cha_deopt1_test: Crash # (d.make_u()): deferred access is not implemented
|
||||
cha_deopt2_test: Crash # (d.make_u()): deferred access is not implemented
|
||||
cha_deopt3_test: Crash # (d.make_u()): deferred access is not implemented
|
||||
closure_in_constructor_test: Crash # Invalid argument(s)
|
||||
closure_type_variables_test: Crash # Invalid argument(s)
|
||||
closure_in_constructor_test: RuntimeError # Typed lists.
|
||||
closures_initializer_test: RuntimeError # Please triage this failure.
|
||||
const_evaluation_test/01: Crash # (static Iterable<Str... cannot handle sync*/async* functions
|
||||
constructor12_test: RuntimeError # Please triage this failure.
|
||||
|
@ -470,15 +469,7 @@ syncstar_less_than_test: Crash # (Iterable<int> foo()... cannot handle sync*/as
|
|||
syncstar_yield_test/copyParameters: Crash # (Iterable<int> foo3(int p)sync*{int i=0;i++ ;p++ ;yield p+i;}): cannot handle sync*/async* functions
|
||||
syncstar_yield_test/none: Crash # (Iterable<int> foo3(int p)sync*{int i=0;i++ ;p++ ;yield p+i;}): cannot handle sync*/async* functions
|
||||
syncstar_yieldstar_test: Crash # (foo()sync*{yield* [1,2,3];yield null;yield* bar();}): cannot handle sync*/async* functions
|
||||
type_parameter_test/01: Crash # Invalid argument(s)
|
||||
type_parameter_test/02: Crash # Invalid argument(s)
|
||||
type_parameter_test/03: Crash # Invalid argument(s)
|
||||
type_parameter_test/04: Crash # Invalid argument(s)
|
||||
type_parameter_test/05: Crash # Invalid argument(s)
|
||||
type_parameter_test/06: Crash # Invalid argument(s)
|
||||
type_parameter_test/none: Crash # Invalid argument(s)
|
||||
type_variable_closure2_test: RuntimeError # Please triage this failure.
|
||||
type_variable_closure_test: Crash # Invalid argument(s)
|
||||
type_variable_field_initializer_closure_test: RuntimeError # Please triage this failure.
|
||||
type_variable_field_initializer_test: RuntimeError # Please triage this failure.
|
||||
type_variable_nested_test: RuntimeError # Please triage this failure.
|
||||
|
|
Loading…
Reference in a new issue