Reviewers: jarin,
Description:
[turbofan] Make Runtime::kSetProperty have a frame state.
[email protected]
TEST=cctest/test-api/AccessCheckThrows
Please review this at https://codereview.chromium.org/1171943003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+4, -2 lines):
M src/compiler/ast-graph-builder.cc
M src/compiler/linkage.cc
M test/cctest/test-api.cc
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc
b/src/compiler/ast-graph-builder.cc
index
af0b4cf554e0d6404bf39129051d45690451d36e..7fddc4aafd549a0c00956dd7a891a14703333ee0
100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1744,7 +1744,9 @@ void
AstGraphBuilder::VisitObjectLiteral(ObjectLiteral* expr) {
Node* language = jsgraph()->Constant(SLOPPY);
const Operator* op =
javascript()->CallRuntime(Runtime::kSetProperty, 4);
- NewNode(op, receiver, key, value, language);
+ Node* set_property = NewNode(op, receiver, key, value, language);
+ // SetProperty should not lazy deopt on an object literal.
+ PrepareFrameState(set_property, BailoutId::None());
BuildSetHomeObject(value, receiver, property->value());
}
break;
Index: src/compiler/linkage.cc
diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
index
d61ff207a719752175581aebf4a215c03c416604..e6ca048250d48c490c2dfbcacfdc661feb83a616
100644
--- a/src/compiler/linkage.cc
+++ b/src/compiler/linkage.cc
@@ -124,7 +124,6 @@ bool Linkage::NeedsFrameState(Runtime::FunctionId
function) {
case Runtime::kPushBlockContext:
case Runtime::kPushCatchContext:
case Runtime::kReThrow:
- case Runtime::kSetProperty: // TODO(jarin): Is it safe?
case Runtime::kStringCompareRT:
case Runtime::kStringEquals:
case Runtime::kToFastProperties: // TODO(jarin): Is it safe?
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index
24324ee6a449765922712a095454db443ef7db9c..849833e58018e9714ff82228bacfdaf138461993
100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -19287,6 +19287,7 @@ void CheckCorrectThrow(const char* script) {
TEST(AccessCheckThrows) {
i::FLAG_allow_natives_syntax = true;
+ i::FLAG_turbo_try_catch = true;
v8::V8::Initialize();
v8::V8::SetFailedAccessCheckCallbackFunction(&FailedAccessCheckThrows);
v8::Isolate* isolate = CcTest::isolate();
--
--
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.