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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1211 __ j(equal, loop_statement.continue_label()); | 1211 __ j(equal, loop_statement.continue_label()); |
1212 __ movp(rbx, rax); | 1212 __ movp(rbx, rax); |
1213 | 1213 |
1214 // Update the 'each' property or variable from the possibly filtered | 1214 // Update the 'each' property or variable from the possibly filtered |
1215 // entry in register rbx. | 1215 // entry in register rbx. |
1216 __ bind(&update_each); | 1216 __ bind(&update_each); |
1217 __ movp(result_register(), rbx); | 1217 __ movp(result_register(), rbx); |
1218 // Perform the assignment as if via '='. | 1218 // Perform the assignment as if via '='. |
1219 { EffectContext context(this); | 1219 { EffectContext context(this); |
1220 EmitAssignment(stmt->each()); | 1220 EmitAssignment(stmt->each()); |
| 1221 PrepareForBailoutForId(stmt->AssignmentId(), NO_REGISTERS); |
1221 } | 1222 } |
1222 | 1223 |
1223 // Generate code for the body of the loop. | 1224 // Generate code for the body of the loop. |
1224 Visit(stmt->body()); | 1225 Visit(stmt->body()); |
1225 | 1226 |
1226 // Generate code for going to the next element by incrementing the | 1227 // Generate code for going to the next element by incrementing the |
1227 // index (smi) stored on top of the stack. | 1228 // index (smi) stored on top of the stack. |
1228 __ bind(loop_statement.continue_label()); | 1229 __ bind(loop_statement.continue_label()); |
1229 __ SmiAddConstant(Operand(rsp, 0 * kPointerSize), Smi::FromInt(1)); | 1230 __ SmiAddConstant(Operand(rsp, 0 * kPointerSize), Smi::FromInt(1)); |
1230 | 1231 |
(...skipping 4071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5302 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5303 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5303 Assembler::target_address_at(call_target_address, | 5304 Assembler::target_address_at(call_target_address, |
5304 unoptimized_code)); | 5305 unoptimized_code)); |
5305 return OSR_AFTER_STACK_CHECK; | 5306 return OSR_AFTER_STACK_CHECK; |
5306 } | 5307 } |
5307 | 5308 |
5308 | 5309 |
5309 } } // namespace v8::internal | 5310 } } // namespace v8::internal |
5310 | 5311 |
5311 #endif // V8_TARGET_ARCH_X64 | 5312 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |