Commit 2f0e62e8 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Mark JSStoreGlobal as NeedsExactContext

JSStoreGlobal can become a call into runtime code (SetProperty)
that inspects the context in order to get the language mode. Thus
always passing the native context is not good enough.

Bug: chromium:1065737
Change-Id: Iba9537cd3de743a0967325acf7900190aa835b5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2130280Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66946}
parent 06129101
...@@ -53,7 +53,6 @@ bool OperatorProperties::NeedsExactContext(const Operator* op) { ...@@ -53,7 +53,6 @@ bool OperatorProperties::NeedsExactContext(const Operator* op) {
case IrOpcode::kJSLoadGlobal: case IrOpcode::kJSLoadGlobal:
case IrOpcode::kJSLoadMessage: case IrOpcode::kJSLoadMessage:
case IrOpcode::kJSStackCheck: case IrOpcode::kJSStackCheck:
case IrOpcode::kJSStoreGlobal:
case IrOpcode::kJSStoreMessage: case IrOpcode::kJSStoreMessage:
case IrOpcode::kJSGetIterator: case IrOpcode::kJSGetIterator:
return false; return false;
...@@ -83,6 +82,7 @@ bool OperatorProperties::NeedsExactContext(const Operator* op) { ...@@ -83,6 +82,7 @@ bool OperatorProperties::NeedsExactContext(const Operator* op) {
case IrOpcode::kJSLoadProperty: case IrOpcode::kJSLoadProperty:
case IrOpcode::kJSStoreContext: case IrOpcode::kJSStoreContext:
case IrOpcode::kJSStoreDataPropertyInLiteral: case IrOpcode::kJSStoreDataPropertyInLiteral:
case IrOpcode::kJSStoreGlobal:
case IrOpcode::kJSStoreInArrayLiteral: case IrOpcode::kJSStoreInArrayLiteral:
case IrOpcode::kJSStoreModule: case IrOpcode::kJSStoreModule:
case IrOpcode::kJSStoreNamed: case IrOpcode::kJSStoreNamed:
......
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
function foo() {
class c {
static get [v = 0]() {}
}
}
%PrepareFunctionForOptimization(foo);
assertThrows(foo, ReferenceError);
assertThrows(foo, ReferenceError);
%OptimizeFunctionOnNextCall(foo);
assertThrows(foo, ReferenceError);
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