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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 } | 1045 } |
1046 | 1046 |
1047 // Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). | 1047 // Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). |
1048 PrepareForBailoutForId(stmt->BodyId(), BailoutState::NO_REGISTERS); | 1048 PrepareForBailoutForId(stmt->BodyId(), BailoutState::NO_REGISTERS); |
1049 // Generate code for the body of the loop. | 1049 // Generate code for the body of the loop. |
1050 Visit(stmt->body()); | 1050 Visit(stmt->body()); |
1051 | 1051 |
1052 // Generate code for going to the next element by incrementing the | 1052 // Generate code for going to the next element by incrementing the |
1053 // index (smi) stored on top of the stack. | 1053 // index (smi) stored on top of the stack. |
1054 __ bind(loop_statement.continue_label()); | 1054 __ bind(loop_statement.continue_label()); |
| 1055 PrepareForBailoutForId(stmt->IncrementId(), BailoutState::NO_REGISTERS); |
1055 __ add(Operand(esp, 0 * kPointerSize), Immediate(Smi::FromInt(1))); | 1056 __ add(Operand(esp, 0 * kPointerSize), Immediate(Smi::FromInt(1))); |
1056 | 1057 |
1057 EmitBackEdgeBookkeeping(stmt, &loop); | 1058 EmitBackEdgeBookkeeping(stmt, &loop); |
1058 __ jmp(&loop); | 1059 __ jmp(&loop); |
1059 | 1060 |
1060 // Remove the pointers stored on the stack. | 1061 // Remove the pointers stored on the stack. |
1061 __ bind(loop_statement.break_label()); | 1062 __ bind(loop_statement.break_label()); |
1062 DropOperands(5); | 1063 DropOperands(5); |
1063 | 1064 |
1064 // Exit and decrement the loop depth. | 1065 // Exit and decrement the loop depth. |
(...skipping 2572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3637 isolate->builtins()->OnStackReplacement()->entry(), | 3638 isolate->builtins()->OnStackReplacement()->entry(), |
3638 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3639 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3639 return ON_STACK_REPLACEMENT; | 3640 return ON_STACK_REPLACEMENT; |
3640 } | 3641 } |
3641 | 3642 |
3642 | 3643 |
3643 } // namespace internal | 3644 } // namespace internal |
3644 } // namespace v8 | 3645 } // namespace v8 |
3645 | 3646 |
3646 #endif // V8_TARGET_ARCH_X87 | 3647 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |