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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 // We got a fixed array in register r0. Iterate through that. | 1118 // We got a fixed array in register r0. Iterate through that. |
1119 __ bind(&fixed_array); | 1119 __ bind(&fixed_array); |
1120 | 1120 |
1121 __ EmitLoadTypeFeedbackVector(r1); | 1121 __ EmitLoadTypeFeedbackVector(r1); |
1122 __ mov(r2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); | 1122 __ mov(r2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); |
1123 int vector_index = SmiFromSlot(slot)->value(); | 1123 int vector_index = SmiFromSlot(slot)->value(); |
1124 __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(vector_index))); | 1124 __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(vector_index))); |
1125 __ mov(r1, Operand(Smi::FromInt(1))); // Smi(1) indicates slow check | 1125 __ mov(r1, Operand(Smi::FromInt(1))); // Smi(1) indicates slow check |
1126 __ Push(r1, r0); // Smi and array | 1126 __ Push(r1, r0); // Smi and array |
1127 __ ldr(r1, FieldMemOperand(r0, FixedArray::kLengthOffset)); | 1127 __ ldr(r1, FieldMemOperand(r0, FixedArray::kLengthOffset)); |
| 1128 __ Push(r1); // Fixed array length (as smi). |
| 1129 PrepareForBailoutForId(stmt->PrepareId(), NO_REGISTERS); |
1128 __ mov(r0, Operand(Smi::FromInt(0))); | 1130 __ mov(r0, Operand(Smi::FromInt(0))); |
1129 __ Push(r1, r0); // Fixed array length (as smi) and initial index. | 1131 __ Push(r0); // Initial index. |
1130 | 1132 |
1131 // Generate code for doing the condition check. | 1133 // Generate code for doing the condition check. |
1132 __ bind(&loop); | 1134 __ bind(&loop); |
1133 SetExpressionAsStatementPosition(stmt->each()); | 1135 SetExpressionAsStatementPosition(stmt->each()); |
1134 | 1136 |
1135 // Load the current count to r0, load the length to r1. | 1137 // Load the current count to r0, load the length to r1. |
1136 __ Ldrd(r0, r1, MemOperand(sp, 0 * kPointerSize)); | 1138 __ Ldrd(r0, r1, MemOperand(sp, 0 * kPointerSize)); |
1137 __ cmp(r0, r1); // Compare to the array length. | 1139 __ cmp(r0, r1); // Compare to the array length. |
1138 __ b(hs, loop_statement.break_label()); | 1140 __ b(hs, loop_statement.break_label()); |
1139 | 1141 |
(...skipping 3711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4851 DCHECK(interrupt_address == | 4853 DCHECK(interrupt_address == |
4852 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4854 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4853 return OSR_AFTER_STACK_CHECK; | 4855 return OSR_AFTER_STACK_CHECK; |
4854 } | 4856 } |
4855 | 4857 |
4856 | 4858 |
4857 } // namespace internal | 4859 } // namespace internal |
4858 } // namespace v8 | 4860 } // namespace v8 |
4859 | 4861 |
4860 #endif // V8_TARGET_ARCH_ARM | 4862 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |