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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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/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 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 __ ld(a0, MemOperand(sp)); 1459 __ ld(a0, MemOperand(sp));
1460 PushOperand(a0); 1460 PushOperand(a0);
1461 VisitForStackValue(value); 1461 VisitForStackValue(value);
1462 DCHECK(property->emit_store()); 1462 DCHECK(property->emit_store());
1463 CallRuntimeWithOperands(Runtime::kInternalSetPrototype); 1463 CallRuntimeWithOperands(Runtime::kInternalSetPrototype);
1464 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), 1464 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
1465 BailoutState::NO_REGISTERS); 1465 BailoutState::NO_REGISTERS);
1466 break; 1466 break;
1467 case ObjectLiteral::Property::GETTER: 1467 case ObjectLiteral::Property::GETTER:
1468 if (property->emit_store()) { 1468 if (property->emit_store()) {
1469 accessor_table.lookup(key)->second->getter = property; 1469 AccessorTable::Iterator it = accessor_table.lookup(key);
1470 it->second->bailout_id = expr->GetIdForPropertySet(property_index);
1471 it->second->getter = property;
1470 } 1472 }
1471 break; 1473 break;
1472 case ObjectLiteral::Property::SETTER: 1474 case ObjectLiteral::Property::SETTER:
1473 if (property->emit_store()) { 1475 if (property->emit_store()) {
1474 accessor_table.lookup(key)->second->setter = property; 1476 AccessorTable::Iterator it = accessor_table.lookup(key);
1477 it->second->bailout_id = expr->GetIdForPropertySet(property_index);
1478 it->second->setter = property;
1475 } 1479 }
1476 break; 1480 break;
1477 } 1481 }
1478 } 1482 }
1479 1483
1480 // Emit code to define accessors, using only a single call to the runtime for 1484 // Emit code to define accessors, using only a single call to the runtime for
1481 // each pair of corresponding getters and setters. 1485 // each pair of corresponding getters and setters.
1482 for (AccessorTable::Iterator it = accessor_table.begin(); 1486 for (AccessorTable::Iterator it = accessor_table.begin();
1483 it != accessor_table.end(); 1487 it != accessor_table.end();
1484 ++it) { 1488 ++it) {
1485 __ ld(a0, MemOperand(sp)); // Duplicate receiver. 1489 __ ld(a0, MemOperand(sp)); // Duplicate receiver.
1486 PushOperand(a0); 1490 PushOperand(a0);
1487 VisitForStackValue(it->first); 1491 VisitForStackValue(it->first);
1488 EmitAccessor(it->second->getter); 1492 EmitAccessor(it->second->getter);
1489 EmitAccessor(it->second->setter); 1493 EmitAccessor(it->second->setter);
1490 __ li(a0, Operand(Smi::FromInt(NONE))); 1494 __ li(a0, Operand(Smi::FromInt(NONE)));
1491 PushOperand(a0); 1495 PushOperand(a0);
1492 CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked); 1496 CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked);
1497 PrepareForBailoutForId(it->second->bailout_id, BailoutState::NO_REGISTERS);
1493 } 1498 }
1494 1499
1495 // Object literals have two parts. The "static" part on the left contains no 1500 // Object literals have two parts. The "static" part on the left contains no
1496 // computed property names, and so we can compute its map ahead of time; see 1501 // computed property names, and so we can compute its map ahead of time; see
1497 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part 1502 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part
1498 // starts with the first computed property name, and continues with all 1503 // starts with the first computed property name, and continues with all
1499 // properties to its right. All the code from above initializes the static 1504 // properties to its right. All the code from above initializes the static
1500 // component of the object literal, and arranges for the map of the result to 1505 // component of the object literal, and arranges for the map of the result to
1501 // reflect the static order in which the keys appear. For the dynamic 1506 // reflect the static order in which the keys appear. For the dynamic
1502 // properties, we compile them into a series of "SetOwnProperty" runtime 1507 // properties, we compile them into a series of "SetOwnProperty" runtime
(...skipping 2284 matching lines...) Expand 10 before | Expand all | Expand 10 after
3787 reinterpret_cast<uint64_t>( 3792 reinterpret_cast<uint64_t>(
3788 isolate->builtins()->OnStackReplacement()->entry())); 3793 isolate->builtins()->OnStackReplacement()->entry()));
3789 return ON_STACK_REPLACEMENT; 3794 return ON_STACK_REPLACEMENT;
3790 } 3795 }
3791 3796
3792 3797
3793 } // namespace internal 3798 } // namespace internal
3794 } // namespace v8 3799 } // namespace v8
3795 3800
3796 #endif // V8_TARGET_ARCH_MIPS64 3801 #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