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