OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1386 __ LoadP(r2, MemOperand(sp)); | 1386 __ LoadP(r2, MemOperand(sp)); |
1387 PushOperand(r2); | 1387 PushOperand(r2); |
1388 VisitForStackValue(value); | 1388 VisitForStackValue(value); |
1389 DCHECK(property->emit_store()); | 1389 DCHECK(property->emit_store()); |
1390 CallRuntimeWithOperands(Runtime::kInternalSetPrototype); | 1390 CallRuntimeWithOperands(Runtime::kInternalSetPrototype); |
1391 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), | 1391 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), |
1392 BailoutState::NO_REGISTERS); | 1392 BailoutState::NO_REGISTERS); |
1393 break; | 1393 break; |
1394 case ObjectLiteral::Property::GETTER: | 1394 case ObjectLiteral::Property::GETTER: |
1395 if (property->emit_store()) { | 1395 if (property->emit_store()) { |
1396 accessor_table.lookup(key)->second->getter = property; | 1396 AccessorTable::Iterator it = accessor_table.lookup(key); |
| 1397 it->second->bailout_id = expr->GetIdForPropertySet(property_index); |
| 1398 it->second->getter = property; |
1397 } | 1399 } |
1398 break; | 1400 break; |
1399 case ObjectLiteral::Property::SETTER: | 1401 case ObjectLiteral::Property::SETTER: |
1400 if (property->emit_store()) { | 1402 if (property->emit_store()) { |
1401 accessor_table.lookup(key)->second->setter = property; | 1403 AccessorTable::Iterator it = accessor_table.lookup(key); |
| 1404 it->second->bailout_id = expr->GetIdForPropertySet(property_index); |
| 1405 it->second->setter = property; |
1402 } | 1406 } |
1403 break; | 1407 break; |
1404 } | 1408 } |
1405 } | 1409 } |
1406 | 1410 |
1407 // Emit code to define accessors, using only a single call to the runtime for | 1411 // Emit code to define accessors, using only a single call to the runtime for |
1408 // each pair of corresponding getters and setters. | 1412 // each pair of corresponding getters and setters. |
1409 for (AccessorTable::Iterator it = accessor_table.begin(); | 1413 for (AccessorTable::Iterator it = accessor_table.begin(); |
1410 it != accessor_table.end(); ++it) { | 1414 it != accessor_table.end(); ++it) { |
1411 __ LoadP(r2, MemOperand(sp)); // Duplicate receiver. | 1415 __ LoadP(r2, MemOperand(sp)); // Duplicate receiver. |
1412 PushOperand(r2); | 1416 PushOperand(r2); |
1413 VisitForStackValue(it->first); | 1417 VisitForStackValue(it->first); |
1414 EmitAccessor(it->second->getter); | 1418 EmitAccessor(it->second->getter); |
1415 EmitAccessor(it->second->setter); | 1419 EmitAccessor(it->second->setter); |
1416 __ LoadSmiLiteral(r2, Smi::FromInt(NONE)); | 1420 __ LoadSmiLiteral(r2, Smi::FromInt(NONE)); |
1417 PushOperand(r2); | 1421 PushOperand(r2); |
1418 CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked); | 1422 CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked); |
| 1423 PrepareForBailoutForId(it->second->bailout_id, BailoutState::NO_REGISTERS); |
1419 } | 1424 } |
1420 | 1425 |
1421 // Object literals have two parts. The "static" part on the left contains no | 1426 // Object literals have two parts. The "static" part on the left contains no |
1422 // computed property names, and so we can compute its map ahead of time; see | 1427 // computed property names, and so we can compute its map ahead of time; see |
1423 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part | 1428 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part |
1424 // starts with the first computed property name, and continues with all | 1429 // starts with the first computed property name, and continues with all |
1425 // properties to its right. All the code from above initializes the static | 1430 // properties to its right. All the code from above initializes the static |
1426 // component of the object literal, and arranges for the map of the result to | 1431 // component of the object literal, and arranges for the map of the result to |
1427 // reflect the static order in which the keys appear. For the dynamic | 1432 // reflect the static order in which the keys appear. For the dynamic |
1428 // properties, we compile them into a series of "SetOwnProperty" runtime | 1433 // properties, we compile them into a series of "SetOwnProperty" runtime |
(...skipping 2244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3673 DCHECK(kOSRBranchInstruction == br_instr); | 3678 DCHECK(kOSRBranchInstruction == br_instr); |
3674 | 3679 |
3675 DCHECK(interrupt_address == | 3680 DCHECK(interrupt_address == |
3676 isolate->builtins()->OnStackReplacement()->entry()); | 3681 isolate->builtins()->OnStackReplacement()->entry()); |
3677 return ON_STACK_REPLACEMENT; | 3682 return ON_STACK_REPLACEMENT; |
3678 } | 3683 } |
3679 | 3684 |
3680 } // namespace internal | 3685 } // namespace internal |
3681 } // namespace v8 | 3686 } // namespace v8 |
3682 #endif // V8_TARGET_ARCH_S390 | 3687 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |