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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 } | 1053 } |
1054 | 1054 |
1055 // Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). | 1055 // Both Crankshaft and Turbofan expect BodyId to be right before stmt->body(). |
1056 PrepareForBailoutForId(stmt->BodyId(), BailoutState::NO_REGISTERS); | 1056 PrepareForBailoutForId(stmt->BodyId(), BailoutState::NO_REGISTERS); |
1057 // Generate code for the body of the loop. | 1057 // Generate code for the body of the loop. |
1058 Visit(stmt->body()); | 1058 Visit(stmt->body()); |
1059 | 1059 |
1060 // Generate code for going to the next element by incrementing the | 1060 // Generate code for going to the next element by incrementing the |
1061 // index (smi) stored on top of the stack. | 1061 // index (smi) stored on top of the stack. |
1062 __ bind(loop_statement.continue_label()); | 1062 __ bind(loop_statement.continue_label()); |
| 1063 PrepareForBailoutForId(stmt->IncrementId(), BailoutState::NO_REGISTERS); |
1063 __ add(Operand(esp, 0 * kPointerSize), Immediate(Smi::FromInt(1))); | 1064 __ add(Operand(esp, 0 * kPointerSize), Immediate(Smi::FromInt(1))); |
1064 | 1065 |
1065 EmitBackEdgeBookkeeping(stmt, &loop); | 1066 EmitBackEdgeBookkeeping(stmt, &loop); |
1066 __ jmp(&loop); | 1067 __ jmp(&loop); |
1067 | 1068 |
1068 // Remove the pointers stored on the stack. | 1069 // Remove the pointers stored on the stack. |
1069 __ bind(loop_statement.break_label()); | 1070 __ bind(loop_statement.break_label()); |
1070 DropOperands(5); | 1071 DropOperands(5); |
1071 | 1072 |
1072 // Exit and decrement the loop depth. | 1073 // Exit and decrement the loop depth. |
(...skipping 2572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3645 isolate->builtins()->OnStackReplacement()->entry(), | 3646 isolate->builtins()->OnStackReplacement()->entry(), |
3646 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3647 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3647 return ON_STACK_REPLACEMENT; | 3648 return ON_STACK_REPLACEMENT; |
3648 } | 3649 } |
3649 | 3650 |
3650 | 3651 |
3651 } // namespace internal | 3652 } // namespace internal |
3652 } // namespace v8 | 3653 } // namespace v8 |
3653 | 3654 |
3654 #endif // V8_TARGET_ARCH_IA32 | 3655 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |