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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 __ bind(&no_descriptors); | 1187 __ bind(&no_descriptors); |
1188 __ Drop(1); | 1188 __ Drop(1); |
1189 __ jmp(&exit); | 1189 __ jmp(&exit); |
1190 | 1190 |
1191 // We got a fixed array in register r0. Iterate through that. | 1191 // We got a fixed array in register r0. Iterate through that. |
1192 Label non_proxy; | 1192 Label non_proxy; |
1193 __ bind(&fixed_array); | 1193 __ bind(&fixed_array); |
1194 | 1194 |
1195 __ Move(r1, FeedbackVector()); | 1195 __ Move(r1, FeedbackVector()); |
1196 __ mov(r2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); | 1196 __ mov(r2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); |
1197 __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(slot.ToInt()))); | 1197 int vector_index = FeedbackVector()->GetIndex(slot); |
| 1198 __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(vector_index))); |
1198 | 1199 |
1199 __ mov(r1, Operand(Smi::FromInt(1))); // Smi indicates slow check | 1200 __ mov(r1, Operand(Smi::FromInt(1))); // Smi indicates slow check |
1200 __ ldr(r2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object | 1201 __ ldr(r2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object |
1201 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 1202 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
1202 __ CompareObjectType(r2, r3, r3, LAST_JS_PROXY_TYPE); | 1203 __ CompareObjectType(r2, r3, r3, LAST_JS_PROXY_TYPE); |
1203 __ b(gt, &non_proxy); | 1204 __ b(gt, &non_proxy); |
1204 __ mov(r1, Operand(Smi::FromInt(0))); // Zero indicates proxy | 1205 __ mov(r1, Operand(Smi::FromInt(0))); // Zero indicates proxy |
1205 __ bind(&non_proxy); | 1206 __ bind(&non_proxy); |
1206 __ Push(r1, r0); // Smi and array | 1207 __ Push(r1, r0); // Smi and array |
1207 __ ldr(r1, FieldMemOperand(r0, FixedArray::kLengthOffset)); | 1208 __ ldr(r1, FieldMemOperand(r0, FixedArray::kLengthOffset)); |
(...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2891 VisitForStackValue(args->at(i)); | 2892 VisitForStackValue(args->at(i)); |
2892 } | 2893 } |
2893 } | 2894 } |
2894 | 2895 |
2895 // Record source position of the IC call. | 2896 // Record source position of the IC call. |
2896 SetSourcePosition(expr->position()); | 2897 SetSourcePosition(expr->position()); |
2897 Handle<Code> ic = CallIC::initialize_stub( | 2898 Handle<Code> ic = CallIC::initialize_stub( |
2898 isolate(), arg_count, call_type); | 2899 isolate(), arg_count, call_type); |
2899 __ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); | 2900 __ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); |
2900 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 2901 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
2901 // Don't assign a type feedback id to the IC, since type feedback is provided | 2902 CallIC(ic, TypeFeedbackId(expr->CallFeedbackSlot().ToInt())); |
2902 // by the vector above. | |
2903 CallIC(ic); | |
2904 | 2903 |
2905 RecordJSReturnSite(expr); | 2904 RecordJSReturnSite(expr); |
2906 // Restore context register. | 2905 // Restore context register. |
2907 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2906 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
2908 context()->DropAndPlug(1, r0); | 2907 context()->DropAndPlug(1, r0); |
2909 } | 2908 } |
2910 | 2909 |
2911 | 2910 |
2912 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { | 2911 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
2913 // r4: copy of the first argument or undefined if it doesn't exist. | 2912 // r4: copy of the first argument or undefined if it doesn't exist. |
(...skipping 2285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5199 | 5198 |
5200 DCHECK(interrupt_address == | 5199 DCHECK(interrupt_address == |
5201 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5200 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5202 return OSR_AFTER_STACK_CHECK; | 5201 return OSR_AFTER_STACK_CHECK; |
5203 } | 5202 } |
5204 | 5203 |
5205 | 5204 |
5206 } } // namespace v8::internal | 5205 } } // namespace v8::internal |
5207 | 5206 |
5208 #endif // V8_TARGET_ARCH_ARM | 5207 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |