Reviewers: Dmitry Lomov (chromium),
Description:
Add missing FrameState to harmony class literals.
[email protected]
TEST=mjsunit/harmony/classes
Please review this at https://codereview.chromium.org/864033002/
Base URL:
https://chromium.googlesource.com/v8/v8.git@local_deoptimization-test-get-proto
Affected files (+10, -8 lines):
M src/compiler/ast-graph-builder.cc
M src/compiler/linkage.cc
M test/mjsunit/mjsunit.status
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc
b/src/compiler/ast-graph-builder.cc
index
f2d0291f4b697c1b944adc31f23c512c6f5464a1..f001455c3eb1aa0631ca61713a3dcadbaf79f2e2
100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -932,7 +932,9 @@ void
AstGraphBuilder::VisitClassLiteralContents(ClassLiteral* expr) {
if (FunctionLiteral::NeedsHomeObject(property->value())) {
Unique<Name> name =
MakeUnique(isolate()->factory()->home_object_symbol());
- NewNode(javascript()->StoreNamed(strict_mode(), name), value,
receiver);
+ Node* store = NewNode(javascript()->StoreNamed(strict_mode(), name),
+ value, receiver);
+ PrepareFrameState(store, BailoutId::None());
}
}
@@ -948,6 +950,7 @@ void
AstGraphBuilder::VisitClassLiteralContents(ClassLiteral* expr) {
BuildVariableAssignment(var, literal, Token::INIT_CONST,
BailoutId::None());
}
+ PrepareFrameState(literal, expr->id(), ast_context()->GetStateCombine());
ast_context()->ProduceValue(literal);
}
@@ -1461,11 +1464,12 @@ void AstGraphBuilder::VisitCall(Call* expr) {
flags = CALL_AS_METHOD;
break;
}
- case Call::SUPER_CALL: {
+ case Call::SUPER_CALL:
// TODO(dslomov): Implement super calls.
- UNIMPLEMENTED();
+ callee_value = jsgraph()->UndefinedConstant();
+ receiver_value = jsgraph()->UndefinedConstant();
+ SetStackOverflow();
break;
- }
case Call::POSSIBLY_EVAL_CALL:
possibly_eval = true;
// Fall through.
Index: src/compiler/linkage.cc
diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
index
a8f7b04efd4302c653fb8be43f2ad19e2ba4b0be..80f3fe8053a268ceb8764f66bc7a0f75f47a26c8
100644
--- a/src/compiler/linkage.cc
+++ b/src/compiler/linkage.cc
@@ -152,7 +152,9 @@ bool Linkage::NeedsFrameState(Runtime::FunctionId
function) {
case Runtime::kDebugGetLoadedScripts:
case Runtime::kDebugGetPropertyDetails:
case Runtime::kDebugPromiseEvent:
+ case Runtime::kDefaultConstructorSuperCall:
case Runtime::kDefineAccessorPropertyUnchecked:
+ case Runtime::kDefineClass:
case Runtime::kDefineDataPropertyUnchecked:
case Runtime::kDeleteProperty:
case Runtime::kDeliverObservationChangeRecords:
Index: test/mjsunit/mjsunit.status
diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status
index
f2a94ff4b8f0a923713382dc546868ee5e4aca5a..4a7bc7fd65b9ce91dc74b1d8983d2d4e6c6108cf
100644
--- a/test/mjsunit/mjsunit.status
+++ b/test/mjsunit/mjsunit.status
@@ -106,13 +106,9 @@
# TODO(jarin): Some tests don't like --turbo-deoptimzation very much.
'asm/embenchen/lua_binarytrees': [SKIP],
'es6/symbols': [PASS, NO_VARIANTS],
- 'harmony/classes': [PASS, NO_VARIANTS],
'regress/regress-354433': [PASS, NO_VARIANTS], # only on ARM simulator.
'regress/regress-crbug-259300': [PASS, NO_VARIANTS],
- # TODO(dslomov): Implement super calls.
- 'harmony/super': [PASS, NO_VARIANTS],
-
# TODO(arv): TurboFan does not yet add [[HomeObject]] as needed.
'harmony/object-literals-super': [PASS, NO_VARIANTS],
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.