OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1109 } | 1109 } |
1110 | 1110 |
1111 // Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). | 1111 // Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). |
1112 PrepareForBailoutForId(stmt->BodyId(), BailoutState::NO_REGISTERS); | 1112 PrepareForBailoutForId(stmt->BodyId(), BailoutState::NO_REGISTERS); |
1113 // Generate code for the body of the loop. | 1113 // Generate code for the body of the loop. |
1114 Visit(stmt->body()); | 1114 Visit(stmt->body()); |
1115 | 1115 |
1116 // Generate code for the going to the next element by incrementing | 1116 // Generate code for the going to the next element by incrementing |
1117 // the index (smi) stored on top of the stack. | 1117 // the index (smi) stored on top of the stack. |
1118 __ bind(loop_statement.continue_label()); | 1118 __ bind(loop_statement.continue_label()); |
| 1119 PrepareForBailoutForId(stmt->IncrementId(), BailoutState::NO_REGISTERS); |
1119 __ pop(r3); | 1120 __ pop(r3); |
1120 __ AddSmiLiteral(r3, r3, Smi::FromInt(1), r0); | 1121 __ AddSmiLiteral(r3, r3, Smi::FromInt(1), r0); |
1121 __ push(r3); | 1122 __ push(r3); |
1122 | 1123 |
1123 EmitBackEdgeBookkeeping(stmt, &loop); | 1124 EmitBackEdgeBookkeeping(stmt, &loop); |
1124 __ b(&loop); | 1125 __ b(&loop); |
1125 | 1126 |
1126 // Remove the pointers stored on the stack. | 1127 // Remove the pointers stored on the stack. |
1127 __ bind(loop_statement.break_label()); | 1128 __ bind(loop_statement.break_label()); |
1128 DropOperands(5); | 1129 DropOperands(5); |
(...skipping 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3624 | 3625 |
3625 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3626 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3626 | 3627 |
3627 DCHECK(interrupt_address == | 3628 DCHECK(interrupt_address == |
3628 isolate->builtins()->OnStackReplacement()->entry()); | 3629 isolate->builtins()->OnStackReplacement()->entry()); |
3629 return ON_STACK_REPLACEMENT; | 3630 return ON_STACK_REPLACEMENT; |
3630 } | 3631 } |
3631 } // namespace internal | 3632 } // namespace internal |
3632 } // namespace v8 | 3633 } // namespace v8 |
3633 #endif // V8_TARGET_ARCH_PPC | 3634 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |