| 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 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1394 __ LoadP(r2, MemOperand(sp)); | 1394 __ LoadP(r2, MemOperand(sp)); |
| 1395 PushOperand(r2); | 1395 PushOperand(r2); |
| 1396 VisitForStackValue(value); | 1396 VisitForStackValue(value); |
| 1397 DCHECK(property->emit_store()); | 1397 DCHECK(property->emit_store()); |
| 1398 CallRuntimeWithOperands(Runtime::kInternalSetPrototype); | 1398 CallRuntimeWithOperands(Runtime::kInternalSetPrototype); |
| 1399 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), | 1399 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index), |
| 1400 BailoutState::NO_REGISTERS); | 1400 BailoutState::NO_REGISTERS); |
| 1401 break; | 1401 break; |
| 1402 case ObjectLiteral::Property::GETTER: | 1402 case ObjectLiteral::Property::GETTER: |
| 1403 if (property->emit_store()) { | 1403 if (property->emit_store()) { |
| 1404 accessor_table.lookup(key)->second->getter = property; | 1404 AccessorTable::Iterator it = accessor_table.lookup(key); |
| 1405 it->second->bailout_id = expr->GetIdForPropertySet(property_index); |
| 1406 it->second->getter = property; |
| 1405 } | 1407 } |
| 1406 break; | 1408 break; |
| 1407 case ObjectLiteral::Property::SETTER: | 1409 case ObjectLiteral::Property::SETTER: |
| 1408 if (property->emit_store()) { | 1410 if (property->emit_store()) { |
| 1409 accessor_table.lookup(key)->second->setter = property; | 1411 AccessorTable::Iterator it = accessor_table.lookup(key); |
| 1412 it->second->bailout_id = expr->GetIdForPropertySet(property_index); |
| 1413 it->second->setter = property; |
| 1410 } | 1414 } |
| 1411 break; | 1415 break; |
| 1412 } | 1416 } |
| 1413 } | 1417 } |
| 1414 | 1418 |
| 1415 // Emit code to define accessors, using only a single call to the runtime for | 1419 // Emit code to define accessors, using only a single call to the runtime for |
| 1416 // each pair of corresponding getters and setters. | 1420 // each pair of corresponding getters and setters. |
| 1417 for (AccessorTable::Iterator it = accessor_table.begin(); | 1421 for (AccessorTable::Iterator it = accessor_table.begin(); |
| 1418 it != accessor_table.end(); ++it) { | 1422 it != accessor_table.end(); ++it) { |
| 1419 __ LoadP(r2, MemOperand(sp)); // Duplicate receiver. | 1423 __ LoadP(r2, MemOperand(sp)); // Duplicate receiver. |
| 1420 PushOperand(r2); | 1424 PushOperand(r2); |
| 1421 VisitForStackValue(it->first); | 1425 VisitForStackValue(it->first); |
| 1422 EmitAccessor(it->second->getter); | 1426 EmitAccessor(it->second->getter); |
| 1423 EmitAccessor(it->second->setter); | 1427 EmitAccessor(it->second->setter); |
| 1424 __ LoadSmiLiteral(r2, Smi::FromInt(NONE)); | 1428 __ LoadSmiLiteral(r2, Smi::FromInt(NONE)); |
| 1425 PushOperand(r2); | 1429 PushOperand(r2); |
| 1426 CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked); | 1430 CallRuntimeWithOperands(Runtime::kDefineAccessorPropertyUnchecked); |
| 1431 PrepareForBailoutForId(it->second->bailout_id, BailoutState::NO_REGISTERS); |
| 1427 } | 1432 } |
| 1428 | 1433 |
| 1429 // Object literals have two parts. The "static" part on the left contains no | 1434 // Object literals have two parts. The "static" part on the left contains no |
| 1430 // computed property names, and so we can compute its map ahead of time; see | 1435 // computed property names, and so we can compute its map ahead of time; see |
| 1431 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part | 1436 // runtime.cc::CreateObjectLiteralBoilerplate. The second "dynamic" part |
| 1432 // starts with the first computed property name, and continues with all | 1437 // starts with the first computed property name, and continues with all |
| 1433 // properties to its right. All the code from above initializes the static | 1438 // properties to its right. All the code from above initializes the static |
| 1434 // component of the object literal, and arranges for the map of the result to | 1439 // component of the object literal, and arranges for the map of the result to |
| 1435 // reflect the static order in which the keys appear. For the dynamic | 1440 // reflect the static order in which the keys appear. For the dynamic |
| 1436 // properties, we compile them into a series of "SetOwnProperty" runtime | 1441 // properties, we compile them into a series of "SetOwnProperty" runtime |
| (...skipping 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3696 DCHECK(kOSRBranchInstruction == br_instr); | 3701 DCHECK(kOSRBranchInstruction == br_instr); |
| 3697 | 3702 |
| 3698 DCHECK(interrupt_address == | 3703 DCHECK(interrupt_address == |
| 3699 isolate->builtins()->OnStackReplacement()->entry()); | 3704 isolate->builtins()->OnStackReplacement()->entry()); |
| 3700 return ON_STACK_REPLACEMENT; | 3705 return ON_STACK_REPLACEMENT; |
| 3701 } | 3706 } |
| 3702 | 3707 |
| 3703 } // namespace internal | 3708 } // namespace internal |
| 3704 } // namespace v8 | 3709 } // namespace v8 |
| 3705 #endif // V8_TARGET_ARCH_S390 | 3710 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |