Fix parsing of ClosureCreation kernel nodes in VM.

Summary:

Previously, the VM would crash when it encountered a ClosureCreation node
because it was not aware of the new type arguments field.

Now, it skips the type arguemnts field, which allows many tests to pass again,
even though it doesn't correct forward the type arguments at runtime.

Test Plan:

Removed expected failure lines for all the tests added in my prior
CL (introducing the new field).

BUG=
R=dmitryas@google.com, jensj@google.com

Reviewers: dmitryas@google.com
Review-Url: https://codereview.chromium.org/2987143002 .
This commit is contained in:
Samir Jindel 2017-08-03 16:42:54 +02:00
parent 115232ada2
commit e80b42a235
2 changed files with 4 additions and 16 deletions

View file

@ -4,18 +4,3 @@
field: RuntimeError
type_variables: RuntimeError
capture_closure: RuntimeError
capture_closure_parameter: RuntimeError
capture_this: RuntimeError
catch: RuntimeError
closure_in_constructor: RuntimeError
closure_in_initializer: RuntimeError
closure_in_initializer_closure: RuntimeError
closures: RuntimeError
for_in_closure: RuntimeError
for_loop: RuntimeError
for_variable_capture_test: RuntimeError
instance_tear_off: RuntimeError
named_closure: RuntimeError
non_void_context: RuntimeError
uncaptured_for_in_loop: RuntimeError

View file

@ -696,7 +696,8 @@ void StreamingScopeBuilder::VisitExpression() {
case kClosureCreation:
builder_->SkipCanonicalNameReference(); // read function reference.
VisitExpression(); // read context vector.
VisitDartType(); // read function type of the closure.
VisitDartType(); // read function type of the closure.
builder_->SkipListOfDartTypes(); // read type arguments.
return;
default:
UNREACHABLE();
@ -4024,6 +4025,7 @@ void StreamingFlowGraphBuilder::SkipExpression() {
SkipCanonicalNameReference(); // read top-level function reference.
SkipExpression(); // read context vector.
SkipDartType(); // read function type.
SkipListOfDartTypes(); // read type arguments.
return;
case kBigIntLiteral:
SkipStringReference(); // read string reference.
@ -5925,6 +5927,7 @@ Fragment StreamingFlowGraphBuilder::BuildClosureCreation(
instructions += Drop();
SkipDartType(); // skip function type of the closure.
SkipListOfDartTypes(); // skip list of type arguments.
return instructions;
}