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

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

Issue 2230983005: Merged: [turbofan] Fix missing bailout for accessors in literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.3
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/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 __ ld(a0, MemOperand(sp)); 1467 __ ld(a0, MemOperand(sp));
1468 PushOperand(a0); 1468 PushOperand(a0);
1469 VisitForStackValue(value); 1469 VisitForStackValue(value);
1470 DCHECK(property->emit_store()); 1470 DCHECK(property->emit_store());
1471 CallRuntimeWithOperands(Runtime::kInternalSetPrototype); 1471 CallRuntimeWithOperands(Runtime::kInternalSetPrototype);
1472 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), 1472 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
1473 BailoutState::NO_REGISTERS); 1473 BailoutState::NO_REGISTERS);
1474 break; 1474 break;
1475 case ObjectLiteral::Property::GETTER: 1475 case ObjectLiteral::Property::GETTER:
1476 if (property->emit_store()) { 1476 if (property->emit_store()) {
1477 accessor_table.lookup(key)->second->getter = property; 1477 AccessorTable::Iterator it = accessor_table.lookup(key);
1478 it->second->bailout_id = expr->GetIdForPropertySet(property_index);
1479 it->second->getter = property;
1478 } 1480 }
1479 break; 1481 break;
1480 case ObjectLiteral::Property::SETTER: 1482 case ObjectLiteral::Property::SETTER:
1481 if (property->emit_store()) { 1483 if (property->emit_store()) {
1482 accessor_table.lookup(key)->second->setter = property; 1484 AccessorTable::Iterator it = accessor_table.lookup(key);
1485 it->second->bailout_id = expr->GetIdForPropertySet(property_index);
1486 it->second->setter = property;
1483 } 1487 }
1484 break; 1488 break;
1485 } 1489 }
1486 } 1490 }
1487 1491
1488 // Emit code to define accessors, using only a single call to the runtime for 1492 // Emit code to define accessors, using only a single call to the runtime for
1489 // each pair of corresponding getters and setters. 1493 // each pair of corresponding getters and setters.
1490 for (AccessorTable::Iterator it = accessor_table.begin(); 1494 for (AccessorTable::Iterator it = accessor_table.begin();
1491 it != accessor_table.end(); 1495 it != accessor_table.end();
1492 ++it) { 1496 ++it) {
1493 __ ld(a0, MemOperand(sp)); // Duplicate receiver. 1497 __ ld(a0, MemOperand(sp)); // Duplicate receiver.
1494 PushOperand(a0); 1498 PushOperand(a0);
1495 VisitForStackValue(it->first); 1499 VisitForStackValue(it->first);
1496 EmitAccessor(it->second->getter); 1500 EmitAccessor(it->second->getter);
1497 EmitAccessor(it->second->setter); 1501 EmitAccessor(it->second->setter);
1498 __ li(a0, Operand(Smi::FromInt(NONE))); 1502 __ li(a0, Operand(Smi::FromInt(NONE)));
1499 PushOperand(a0); 1503 PushOperand(a0);
1500 CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked); 1504 CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked);
1505 PrepareForBailoutForId(it->second->bailout_id, BailoutState::NO_REGISTERS);
1501 } 1506 }
1502 1507
1503 // Object literals have two parts. The "static" part on the left contains no 1508 // Object literals have two parts. The "static" part on the left contains no
1504 // computed property names, and so we can compute its map ahead of time; see 1509 // computed property names, and so we can compute its map ahead of time; see
1505 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part 1510 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part
1506 // starts with the first computed property name, and continues with all 1511 // starts with the first computed property name, and continues with all
1507 // properties to its right. All the code from above initializes the static 1512 // properties to its right. All the code from above initializes the static
1508 // component of the object literal, and arranges for the map of the result to 1513 // component of the object literal, and arranges for the map of the result to
1509 // reflect the static order in which the keys appear. For the dynamic 1514 // reflect the static order in which the keys appear. For the dynamic
1510 // properties, we compile them into a series of "SetOwnProperty" runtime 1515 // properties, we compile them into a series of "SetOwnProperty" runtime
(...skipping 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after
3813 reinterpret_cast<uint64_t>( 3818 reinterpret_cast<uint64_t>(
3814 isolate->builtins()->OnStackReplacement()->entry())); 3819 isolate->builtins()->OnStackReplacement()->entry()));
3815 return ON_STACK_REPLACEMENT; 3820 return ON_STACK_REPLACEMENT;
3816 } 3821 }
3817 3822
3818 3823
3819 } // namespace internal 3824 } // namespace internal
3820 } // namespace v8 3825 } // namespace v8
3821 3826
3822 #endif // V8_TARGET_ARCH_MIPS64 3827 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698