Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1060)

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 2207413002: [turbofan] Fix missing bailout for accessors in literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 // Duplicate receiver on stack. 1447 // Duplicate receiver on stack.
1448 __ Peek(x0, 0); 1448 __ Peek(x0, 0);
1449 PushOperand(x0); 1449 PushOperand(x0);
1450 VisitForStackValue(value); 1450 VisitForStackValue(value);
1451 CallRuntimeWithOperands(Runtime::kInternalSetPrototype); 1451 CallRuntimeWithOperands(Runtime::kInternalSetPrototype);
1452 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), 1452 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
1453 BailoutState::NO_REGISTERS); 1453 BailoutState::NO_REGISTERS);
1454 break; 1454 break;
1455 case ObjectLiteral::Property::GETTER: 1455 case ObjectLiteral::Property::GETTER:
1456 if (property->emit_store()) { 1456 if (property->emit_store()) {
1457 accessor_table.lookup(key)->second->getter = property; 1457 AccessorTable::Iterator it = accessor_table.lookup(key);
1458 it->second->bailout_id = expr->GetIdForPropertySet(property_index);
1459 it->second->getter = property;
1458 } 1460 }
1459 break; 1461 break;
1460 case ObjectLiteral::Property::SETTER: 1462 case ObjectLiteral::Property::SETTER:
1461 if (property->emit_store()) { 1463 if (property->emit_store()) {
1462 accessor_table.lookup(key)->second->setter = property; 1464 AccessorTable::Iterator it = accessor_table.lookup(key);
1465 it->second->bailout_id = expr->GetIdForPropertySet(property_index);
1466 it->second->setter = property;
1463 } 1467 }
1464 break; 1468 break;
1465 } 1469 }
1466 } 1470 }
1467 1471
1468 // Emit code to define accessors, using only a single call to the runtime for 1472 // Emit code to define accessors, using only a single call to the runtime for
1469 // each pair of corresponding getters and setters. 1473 // each pair of corresponding getters and setters.
1470 for (AccessorTable::Iterator it = accessor_table.begin(); 1474 for (AccessorTable::Iterator it = accessor_table.begin();
1471 it != accessor_table.end(); 1475 it != accessor_table.end();
1472 ++it) { 1476 ++it) {
1473 __ Peek(x10, 0); // Duplicate receiver. 1477 __ Peek(x10, 0); // Duplicate receiver.
1474 PushOperand(x10); 1478 PushOperand(x10);
1475 VisitForStackValue(it->first); 1479 VisitForStackValue(it->first);
1476 EmitAccessor(it->second->getter); 1480 EmitAccessor(it->second->getter);
1477 EmitAccessor(it->second->setter); 1481 EmitAccessor(it->second->setter);
1478 __ Mov(x10, Smi::FromInt(NONE)); 1482 __ Mov(x10, Smi::FromInt(NONE));
1479 PushOperand(x10); 1483 PushOperand(x10);
1480 CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked); 1484 CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked);
1485 PrepareForBailoutForId(it->second->bailout_id, BailoutState::NO_REGISTERS);
1481 } 1486 }
1482 1487
1483 // Object literals have two parts. The "static" part on the left contains no 1488 // Object literals have two parts. The "static" part on the left contains no
1484 // computed property names, and so we can compute its map ahead of time; see 1489 // computed property names, and so we can compute its map ahead of time; see
1485 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part 1490 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part
1486 // starts with the first computed property name, and continues with all 1491 // starts with the first computed property name, and continues with all
1487 // properties to its right. All the code from above initializes the static 1492 // properties to its right. All the code from above initializes the static
1488 // component of the object literal, and arranges for the map of the result to 1493 // component of the object literal, and arranges for the map of the result to
1489 // reflect the static order in which the keys appear. For the dynamic 1494 // reflect the static order in which the keys appear. For the dynamic
1490 // properties, we compile them into a series of "SetOwnProperty" runtime 1495 // properties, we compile them into a series of "SetOwnProperty" runtime
(...skipping 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after
3848 } 3853 }
3849 3854
3850 return INTERRUPT; 3855 return INTERRUPT;
3851 } 3856 }
3852 3857
3853 3858
3854 } // namespace internal 3859 } // namespace internal
3855 } // namespace v8 3860 } // namespace v8
3856 3861
3857 #endif // V8_TARGET_ARCH_ARM64 3862 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698