OLD | NEW |
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 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 } | 1120 } |
1121 | 1121 |
1122 // Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). | 1122 // Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). |
1123 PrepareForBailoutForId(stmt->BodyId(), BailoutState::NO_REGISTERS); | 1123 PrepareForBailoutForId(stmt->BodyId(), BailoutState::NO_REGISTERS); |
1124 // Generate code for the body of the loop. | 1124 // Generate code for the body of the loop. |
1125 Visit(stmt->body()); | 1125 Visit(stmt->body()); |
1126 | 1126 |
1127 // Generate code for the going to the next element by incrementing | 1127 // Generate code for the going to the next element by incrementing |
1128 // the index (smi) stored on top of the stack. | 1128 // the index (smi) stored on top of the stack. |
1129 __ bind(loop_statement.continue_label()); | 1129 __ bind(loop_statement.continue_label()); |
| 1130 PrepareForBailoutForId(stmt->IncrementId(), BailoutState::NO_REGISTERS); |
1130 __ pop(a0); | 1131 __ pop(a0); |
1131 __ Daddu(a0, a0, Operand(Smi::FromInt(1))); | 1132 __ Daddu(a0, a0, Operand(Smi::FromInt(1))); |
1132 __ push(a0); | 1133 __ push(a0); |
1133 | 1134 |
1134 EmitBackEdgeBookkeeping(stmt, &loop); | 1135 EmitBackEdgeBookkeeping(stmt, &loop); |
1135 __ Branch(&loop); | 1136 __ Branch(&loop); |
1136 | 1137 |
1137 // Remove the pointers stored on the stack. | 1138 // Remove the pointers stored on the stack. |
1138 __ bind(loop_statement.break_label()); | 1139 __ bind(loop_statement.break_label()); |
1139 DropOperands(5); | 1140 DropOperands(5); |
(...skipping 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3763 reinterpret_cast<uint64_t>( | 3764 reinterpret_cast<uint64_t>( |
3764 isolate->builtins()->OnStackReplacement()->entry())); | 3765 isolate->builtins()->OnStackReplacement()->entry())); |
3765 return ON_STACK_REPLACEMENT; | 3766 return ON_STACK_REPLACEMENT; |
3766 } | 3767 } |
3767 | 3768 |
3768 | 3769 |
3769 } // namespace internal | 3770 } // namespace internal |
3770 } // namespace v8 | 3771 } // namespace v8 |
3771 | 3772 |
3772 #endif // V8_TARGET_ARCH_MIPS64 | 3773 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |