Commit ce0922bc authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Make Runtime::kSetProperty have a frame state.

R=jarin@chromium.org
TEST=cctest/test-api/AccessCheckThrows

Review URL: https://codereview.chromium.org/1171943003

Cr-Commit-Position: refs/heads/master@{#28859}
parent bb9c774c
......@@ -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;
......
......@@ -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?
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment