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 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1110 } | 1110 } |
1111 | 1111 |
1112 // Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). | 1112 // Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). |
1113 PrepareForBailoutForId(stmt->BodyId(), BailoutState::NO_REGISTERS); | 1113 PrepareForBailoutForId(stmt->BodyId(), BailoutState::NO_REGISTERS); |
1114 // Generate code for the body of the loop. | 1114 // Generate code for the body of the loop. |
1115 Visit(stmt->body()); | 1115 Visit(stmt->body()); |
1116 | 1116 |
1117 // Generate code for the going to the next element by incrementing | 1117 // Generate code for the going to the next element by incrementing |
1118 // the index (smi) stored on top of the stack. | 1118 // the index (smi) stored on top of the stack. |
1119 __ bind(loop_statement.continue_label()); | 1119 __ bind(loop_statement.continue_label()); |
| 1120 PrepareForBailoutForId(stmt->IncrementId(), BailoutState::NO_REGISTERS); |
1120 __ pop(r3); | 1121 __ pop(r3); |
1121 __ AddSmiLiteral(r3, r3, Smi::FromInt(1), r0); | 1122 __ AddSmiLiteral(r3, r3, Smi::FromInt(1), r0); |
1122 __ push(r3); | 1123 __ push(r3); |
1123 | 1124 |
1124 EmitBackEdgeBookkeeping(stmt, &loop); | 1125 EmitBackEdgeBookkeeping(stmt, &loop); |
1125 __ b(&loop); | 1126 __ b(&loop); |
1126 | 1127 |
1127 // Remove the pointers stored on the stack. | 1128 // Remove the pointers stored on the stack. |
1128 __ bind(loop_statement.break_label()); | 1129 __ bind(loop_statement.break_label()); |
1129 DropOperands(5); | 1130 DropOperands(5); |
(...skipping 2536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3666 | 3667 |
3667 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3668 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3668 | 3669 |
3669 DCHECK(interrupt_address == | 3670 DCHECK(interrupt_address == |
3670 isolate->builtins()->OnStackReplacement()->entry()); | 3671 isolate->builtins()->OnStackReplacement()->entry()); |
3671 return ON_STACK_REPLACEMENT; | 3672 return ON_STACK_REPLACEMENT; |
3672 } | 3673 } |
3673 } // namespace internal | 3674 } // namespace internal |
3674 } // namespace v8 | 3675 } // namespace v8 |
3675 #endif // V8_TARGET_ARCH_PPC | 3676 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |