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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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/compiler/ast-graph-builder.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 PushOperand(r0); 1472 PushOperand(r0);
1473 VisitForStackValue(value); 1473 VisitForStackValue(value);
1474 DCHECK(property->emit_store()); 1474 DCHECK(property->emit_store());
1475 CallRuntimeWithOperands(Runtime::kInternalSetPrototype); 1475 CallRuntimeWithOperands(Runtime::kInternalSetPrototype);
1476 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), 1476 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
1477 BailoutState::NO_REGISTERS); 1477 BailoutState::NO_REGISTERS);
1478 break; 1478 break;
1479 1479
1480 case ObjectLiteral::Property::GETTER: 1480 case ObjectLiteral::Property::GETTER:
1481 if (property->emit_store()) { 1481 if (property->emit_store()) {
1482 accessor_table.lookup(key)->second->getter = property; 1482 AccessorTable::Iterator it = accessor_table.lookup(key);
1483 it->second->bailout_id = expr->GetIdForPropertySet(property_index);
1484 it->second->getter = property;
1483 } 1485 }
1484 break; 1486 break;
1485 case ObjectLiteral::Property::SETTER: 1487 case ObjectLiteral::Property::SETTER:
1486 if (property->emit_store()) { 1488 if (property->emit_store()) {
1487 accessor_table.lookup(key)->second->setter = property; 1489 AccessorTable::Iterator it = accessor_table.lookup(key);
1490 it->second->bailout_id = expr->GetIdForPropertySet(property_index);
1491 it->second->setter = property;
1488 } 1492 }
1489 break; 1493 break;
1490 } 1494 }
1491 } 1495 }
1492 1496
1493 // Emit code to define accessors, using only a single call to the runtime for 1497 // Emit code to define accessors, using only a single call to the runtime for
1494 // each pair of corresponding getters and setters. 1498 // each pair of corresponding getters and setters.
1495 for (AccessorTable::Iterator it = accessor_table.begin(); 1499 for (AccessorTable::Iterator it = accessor_table.begin();
1496 it != accessor_table.end(); 1500 it != accessor_table.end();
1497 ++it) { 1501 ++it) {
1498 __ ldr(r0, MemOperand(sp)); // Duplicate receiver. 1502 __ ldr(r0, MemOperand(sp)); // Duplicate receiver.
1499 PushOperand(r0); 1503 PushOperand(r0);
1500 VisitForStackValue(it->first); 1504 VisitForStackValue(it->first);
1501 EmitAccessor(it->second->getter); 1505 EmitAccessor(it->second->getter);
1502 EmitAccessor(it->second->setter); 1506 EmitAccessor(it->second->setter);
1503 __ mov(r0, Operand(Smi::FromInt(NONE))); 1507 __ mov(r0, Operand(Smi::FromInt(NONE)));
1504 PushOperand(r0); 1508 PushOperand(r0);
1505 CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked); 1509 CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked);
1510 PrepareForBailoutForId(it->second->bailout_id, BailoutState::NO_REGISTERS);
1506 } 1511 }
1507 1512
1508 // Object literals have two parts. The "static" part on the left contains no 1513 // Object literals have two parts. The "static" part on the left contains no
1509 // computed property names, and so we can compute its map ahead of time; see 1514 // computed property names, and so we can compute its map ahead of time; see
1510 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part 1515 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part
1511 // starts with the first computed property name, and continues with all 1516 // starts with the first computed property name, and continues with all
1512 // properties to its right. All the code from above initializes the static 1517 // properties to its right. All the code from above initializes the static
1513 // component of the object literal, and arranges for the map of the result to 1518 // component of the object literal, and arranges for the map of the result to
1514 // reflect the static order in which the keys appear. For the dynamic 1519 // reflect the static order in which the keys appear. For the dynamic
1515 // properties, we compile them into a series of "SetOwnProperty" runtime 1520 // properties, we compile them into a series of "SetOwnProperty" runtime
(...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after
3862 DCHECK(interrupt_address == 3867 DCHECK(interrupt_address ==
3863 isolate->builtins()->OnStackReplacement()->entry()); 3868 isolate->builtins()->OnStackReplacement()->entry());
3864 return ON_STACK_REPLACEMENT; 3869 return ON_STACK_REPLACEMENT;
3865 } 3870 }
3866 3871
3867 3872
3868 } // namespace internal 3873 } // namespace internal
3869 } // namespace v8 3874 } // namespace v8
3870 3875
3871 #endif // V8_TARGET_ARCH_ARM 3876 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698