[turbofan] Fix the deopt ids in assignment.
BUG=chromium:463028 LOG=n R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/987733003 Cr-Commit-Position: refs/heads/master@{#27041}
This commit is contained in:
parent
1b00451f57
commit
9b40c5d0d2
@ -1844,7 +1844,7 @@ void AstGraphBuilder::VisitAssignment(Assignment* expr) {
|
||||
switch (assign_type) {
|
||||
case VARIABLE: {
|
||||
Variable* variable = expr->target()->AsVariableProxy()->var();
|
||||
BuildVariableAssignment(variable, value, expr->op(), expr->AssignmentId(),
|
||||
BuildVariableAssignment(variable, value, expr->op(), expr->id(),
|
||||
ast_context()->GetStateCombine());
|
||||
break;
|
||||
}
|
||||
@ -1854,8 +1854,7 @@ void AstGraphBuilder::VisitAssignment(Assignment* expr) {
|
||||
MakeUnique(property->key()->AsLiteral()->AsPropertyName());
|
||||
Node* store = NewNode(javascript()->StoreNamed(language_mode(), name),
|
||||
object, value);
|
||||
PrepareFrameState(store, expr->AssignmentId(),
|
||||
ast_context()->GetStateCombine());
|
||||
PrepareFrameState(store, expr->id(), ast_context()->GetStateCombine());
|
||||
break;
|
||||
}
|
||||
case KEYED_PROPERTY: {
|
||||
@ -1863,8 +1862,7 @@ void AstGraphBuilder::VisitAssignment(Assignment* expr) {
|
||||
Node* object = environment()->Pop();
|
||||
Node* store = NewNode(javascript()->StoreProperty(language_mode()),
|
||||
object, key, value);
|
||||
PrepareFrameState(store, expr->AssignmentId(),
|
||||
ast_context()->GetStateCombine());
|
||||
PrepareFrameState(store, expr->id(), ast_context()->GetStateCombine());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
18
test/mjsunit/regress/regress-463028.js
Normal file
18
test/mjsunit/regress/regress-463028.js
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright 2015 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
|
||||
|
||||
var o = {}
|
||||
Object.defineProperty(o, "z", {
|
||||
set: function() {
|
||||
%DeoptimizeFunction(f);
|
||||
},
|
||||
});
|
||||
|
||||
function f(o) {
|
||||
return 19 + (void(o.z = 12));
|
||||
}
|
||||
|
||||
f(o);
|
Loading…
Reference in New Issue
Block a user