| 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/base/bits.h" | 9 #include "src/base/bits.h" | 
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" | 
| (...skipping 2586 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2597   __ ldr(vector, FieldMemOperand(vector, | 2597   __ ldr(vector, FieldMemOperand(vector, | 
| 2598                                  JSFunction::kSharedFunctionInfoOffset)); | 2598                                  JSFunction::kSharedFunctionInfoOffset)); | 
| 2599   __ ldr(vector, FieldMemOperand(vector, | 2599   __ ldr(vector, FieldMemOperand(vector, | 
| 2600                                  SharedFunctionInfo::kFeedbackVectorOffset)); | 2600                                  SharedFunctionInfo::kFeedbackVectorOffset)); | 
| 2601 } | 2601 } | 
| 2602 | 2602 | 
| 2603 | 2603 | 
| 2604 void CallIC_ArrayStub::Generate(MacroAssembler* masm) { | 2604 void CallIC_ArrayStub::Generate(MacroAssembler* masm) { | 
| 2605   // r1 - function | 2605   // r1 - function | 
| 2606   // r3 - slot id | 2606   // r3 - slot id | 
|  | 2607   // r2 - vector | 
| 2607   Label miss; | 2608   Label miss; | 
| 2608   int argc = arg_count(); | 2609   int argc = arg_count(); | 
| 2609   ParameterCount actual(argc); | 2610   ParameterCount actual(argc); | 
| 2610 | 2611 | 
| 2611   EmitLoadTypeFeedbackVector(masm, r2); |  | 
| 2612 |  | 
| 2613   __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r4); | 2612   __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r4); | 
| 2614   __ cmp(r1, r4); | 2613   __ cmp(r1, r4); | 
| 2615   __ b(ne, &miss); | 2614   __ b(ne, &miss); | 
| 2616 | 2615 | 
| 2617   __ mov(r0, Operand(arg_count())); | 2616   __ mov(r0, Operand(arg_count())); | 
| 2618   __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); | 2617   __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); | 
| 2619   __ ldr(r4, FieldMemOperand(r4, FixedArray::kHeaderSize)); | 2618   __ ldr(r4, FieldMemOperand(r4, FixedArray::kHeaderSize)); | 
| 2620 | 2619 | 
| 2621   // Verify that r4 contains an AllocationSite | 2620   // Verify that r4 contains an AllocationSite | 
| 2622   __ ldr(r5, FieldMemOperand(r4, HeapObject::kMapOffset)); | 2621   __ ldr(r5, FieldMemOperand(r4, HeapObject::kMapOffset)); | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 2637                          CallAsMethod()); | 2636                          CallAsMethod()); | 
| 2638 | 2637 | 
| 2639   // Unreachable. | 2638   // Unreachable. | 
| 2640   __ stop("Unexpected code address"); | 2639   __ stop("Unexpected code address"); | 
| 2641 } | 2640 } | 
| 2642 | 2641 | 
| 2643 | 2642 | 
| 2644 void CallICStub::Generate(MacroAssembler* masm) { | 2643 void CallICStub::Generate(MacroAssembler* masm) { | 
| 2645   // r1 - function | 2644   // r1 - function | 
| 2646   // r3 - slot id (Smi) | 2645   // r3 - slot id (Smi) | 
|  | 2646   // r2 - vector | 
| 2647   const int with_types_offset = | 2647   const int with_types_offset = | 
| 2648       FixedArray::OffsetOfElementAt(TypeFeedbackVector::kWithTypesIndex); | 2648       FixedArray::OffsetOfElementAt(TypeFeedbackVector::kWithTypesIndex); | 
| 2649   const int generic_offset = | 2649   const int generic_offset = | 
| 2650       FixedArray::OffsetOfElementAt(TypeFeedbackVector::kGenericCountIndex); | 2650       FixedArray::OffsetOfElementAt(TypeFeedbackVector::kGenericCountIndex); | 
| 2651   Label extra_checks_or_miss, slow_start; | 2651   Label extra_checks_or_miss, slow_start; | 
| 2652   Label slow, non_function, wrap, cont; | 2652   Label slow, non_function, wrap, cont; | 
| 2653   Label have_js_function; | 2653   Label have_js_function; | 
| 2654   int argc = arg_count(); | 2654   int argc = arg_count(); | 
| 2655   ParameterCount actual(argc); | 2655   ParameterCount actual(argc); | 
| 2656 | 2656 | 
| 2657   EmitLoadTypeFeedbackVector(masm, r2); |  | 
| 2658 |  | 
| 2659   // The checks. First, does r1 match the recorded monomorphic target? | 2657   // The checks. First, does r1 match the recorded monomorphic target? | 
| 2660   __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); | 2658   __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); | 
| 2661   __ ldr(r4, FieldMemOperand(r4, FixedArray::kHeaderSize)); | 2659   __ ldr(r4, FieldMemOperand(r4, FixedArray::kHeaderSize)); | 
| 2662   __ cmp(r1, r4); | 2660   __ cmp(r1, r4); | 
| 2663   __ b(ne, &extra_checks_or_miss); | 2661   __ b(ne, &extra_checks_or_miss); | 
| 2664 | 2662 | 
| 2665   __ bind(&have_js_function); | 2663   __ bind(&have_js_function); | 
| 2666   if (CallAsMethod()) { | 2664   if (CallAsMethod()) { | 
| 2667     EmitContinueIfStrictOrNative(masm, &cont); | 2665     EmitContinueIfStrictOrNative(masm, &cont); | 
| 2668     // Compute the receiver in sloppy mode. | 2666     // Compute the receiver in sloppy mode. | 
| (...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4245 } | 4243 } | 
| 4246 | 4244 | 
| 4247 | 4245 | 
| 4248 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { | 4246 void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { | 
| 4249   EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister()); | 4247   EmitLoadTypeFeedbackVector(masm, VectorLoadICDescriptor::VectorRegister()); | 
| 4250   VectorKeyedLoadStub stub(isolate()); | 4248   VectorKeyedLoadStub stub(isolate()); | 
| 4251   __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); | 4249   __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); | 
| 4252 } | 4250 } | 
| 4253 | 4251 | 
| 4254 | 4252 | 
|  | 4253 void CallICTrampolineStub::Generate(MacroAssembler* masm) { | 
|  | 4254   EmitLoadTypeFeedbackVector(masm, r2); | 
|  | 4255   CallICStub stub(isolate(), state()); | 
|  | 4256   __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); | 
|  | 4257 } | 
|  | 4258 | 
|  | 4259 | 
|  | 4260 void CallIC_ArrayTrampolineStub::Generate(MacroAssembler* masm) { | 
|  | 4261   EmitLoadTypeFeedbackVector(masm, r2); | 
|  | 4262   CallIC_ArrayStub stub(isolate(), state()); | 
|  | 4263   __ Jump(stub.GetCode(), RelocInfo::CODE_TARGET); | 
|  | 4264 } | 
|  | 4265 | 
|  | 4266 | 
| 4255 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { | 4267 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { | 
| 4256   if (masm->isolate()->function_entry_hook() != NULL) { | 4268   if (masm->isolate()->function_entry_hook() != NULL) { | 
| 4257     ProfileEntryHookStub stub(masm->isolate()); | 4269     ProfileEntryHookStub stub(masm->isolate()); | 
| 4258     int code_size = masm->CallStubSize(&stub) + 2 * Assembler::kInstrSize; | 4270     int code_size = masm->CallStubSize(&stub) + 2 * Assembler::kInstrSize; | 
| 4259     PredictableCodeSizeScope predictable(masm, code_size); | 4271     PredictableCodeSizeScope predictable(masm, code_size); | 
| 4260     __ push(lr); | 4272     __ push(lr); | 
| 4261     __ CallStub(&stub); | 4273     __ CallStub(&stub); | 
| 4262     __ pop(lr); | 4274     __ pop(lr); | 
| 4263   } | 4275   } | 
| 4264 } | 4276 } | 
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4931                            kStackUnwindSpace, NULL, | 4943                            kStackUnwindSpace, NULL, | 
| 4932                            MemOperand(fp, 6 * kPointerSize), NULL); | 4944                            MemOperand(fp, 6 * kPointerSize), NULL); | 
| 4933 } | 4945 } | 
| 4934 | 4946 | 
| 4935 | 4947 | 
| 4936 #undef __ | 4948 #undef __ | 
| 4937 | 4949 | 
| 4938 } }  // namespace v8::internal | 4950 } }  // namespace v8::internal | 
| 4939 | 4951 | 
| 4940 #endif  // V8_TARGET_ARCH_ARM | 4952 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW | 
|---|