| 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/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2522 | 2522 |
| 2523 // Increment the call count for monomorphic function calls. | 2523 // Increment the call count for monomorphic function calls. |
| 2524 __ add(r2, r2, Operand::PointerOffsetFromSmiKey(r3)); | 2524 __ add(r2, r2, Operand::PointerOffsetFromSmiKey(r3)); |
| 2525 __ add(r2, r2, Operand(FixedArray::kHeaderSize + kPointerSize)); | 2525 __ add(r2, r2, Operand(FixedArray::kHeaderSize + kPointerSize)); |
| 2526 __ ldr(r3, FieldMemOperand(r2, 0)); | 2526 __ ldr(r3, FieldMemOperand(r2, 0)); |
| 2527 __ add(r3, r3, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement))); | 2527 __ add(r3, r3, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement))); |
| 2528 __ str(r3, FieldMemOperand(r2, 0)); | 2528 __ str(r3, FieldMemOperand(r2, 0)); |
| 2529 | 2529 |
| 2530 __ bind(&call_function); | 2530 __ bind(&call_function); |
| 2531 __ mov(r0, Operand(argc)); | 2531 __ mov(r0, Operand(argc)); |
| 2532 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode()), | 2532 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(), |
| 2533 tail_call_mode()), |
| 2533 RelocInfo::CODE_TARGET); | 2534 RelocInfo::CODE_TARGET); |
| 2534 | 2535 |
| 2535 __ bind(&extra_checks_or_miss); | 2536 __ bind(&extra_checks_or_miss); |
| 2536 Label uninitialized, miss, not_allocation_site; | 2537 Label uninitialized, miss, not_allocation_site; |
| 2537 | 2538 |
| 2538 __ CompareRoot(r4, Heap::kmegamorphic_symbolRootIndex); | 2539 __ CompareRoot(r4, Heap::kmegamorphic_symbolRootIndex); |
| 2539 __ b(eq, &call); | 2540 __ b(eq, &call); |
| 2540 | 2541 |
| 2541 // Verify that r4 contains an AllocationSite | 2542 // Verify that r4 contains an AllocationSite |
| 2542 __ ldr(r5, FieldMemOperand(r4, HeapObject::kMapOffset)); | 2543 __ ldr(r5, FieldMemOperand(r4, HeapObject::kMapOffset)); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2561 // to handle it here. More complex cases are dealt with in the runtime. | 2562 // to handle it here. More complex cases are dealt with in the runtime. |
| 2562 __ AssertNotSmi(r4); | 2563 __ AssertNotSmi(r4); |
| 2563 __ CompareObjectType(r4, r5, r5, JS_FUNCTION_TYPE); | 2564 __ CompareObjectType(r4, r5, r5, JS_FUNCTION_TYPE); |
| 2564 __ b(ne, &miss); | 2565 __ b(ne, &miss); |
| 2565 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); | 2566 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); |
| 2566 __ LoadRoot(ip, Heap::kmegamorphic_symbolRootIndex); | 2567 __ LoadRoot(ip, Heap::kmegamorphic_symbolRootIndex); |
| 2567 __ str(ip, FieldMemOperand(r4, FixedArray::kHeaderSize)); | 2568 __ str(ip, FieldMemOperand(r4, FixedArray::kHeaderSize)); |
| 2568 | 2569 |
| 2569 __ bind(&call); | 2570 __ bind(&call); |
| 2570 __ mov(r0, Operand(argc)); | 2571 __ mov(r0, Operand(argc)); |
| 2571 __ Jump(masm->isolate()->builtins()->Call(convert_mode()), | 2572 __ Jump(masm->isolate()->builtins()->Call(convert_mode(), tail_call_mode()), |
| 2572 RelocInfo::CODE_TARGET); | 2573 RelocInfo::CODE_TARGET); |
| 2573 | 2574 |
| 2574 __ bind(&uninitialized); | 2575 __ bind(&uninitialized); |
| 2575 | 2576 |
| 2576 // We are going monomorphic, provided we actually have a JSFunction. | 2577 // We are going monomorphic, provided we actually have a JSFunction. |
| 2577 __ JumpIfSmi(r1, &miss); | 2578 __ JumpIfSmi(r1, &miss); |
| 2578 | 2579 |
| 2579 // Goto miss case if we do not have a function. | 2580 // Goto miss case if we do not have a function. |
| 2580 __ CompareObjectType(r1, r4, r4, JS_FUNCTION_TYPE); | 2581 __ CompareObjectType(r1, r4, r4, JS_FUNCTION_TYPE); |
| 2581 __ b(ne, &miss); | 2582 __ b(ne, &miss); |
| (...skipping 2861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5443 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5444 kStackUnwindSpace, NULL, return_value_operand, NULL); |
| 5444 } | 5445 } |
| 5445 | 5446 |
| 5446 | 5447 |
| 5447 #undef __ | 5448 #undef __ |
| 5448 | 5449 |
| 5449 } // namespace internal | 5450 } // namespace internal |
| 5450 } // namespace v8 | 5451 } // namespace v8 |
| 5451 | 5452 |
| 5452 #endif // V8_TARGET_ARCH_ARM | 5453 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |