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 2685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2696 } | 2696 } |
2697 | 2697 |
2698 __ bind(&extra_checks_or_miss); | 2698 __ bind(&extra_checks_or_miss); |
2699 Label miss; | 2699 Label miss; |
2700 | 2700 |
2701 __ CompareRoot(r4, Heap::kmegamorphic_symbolRootIndex); | 2701 __ CompareRoot(r4, Heap::kmegamorphic_symbolRootIndex); |
2702 __ b(eq, &slow_start); | 2702 __ b(eq, &slow_start); |
2703 __ CompareRoot(r4, Heap::kuninitialized_symbolRootIndex); | 2703 __ CompareRoot(r4, Heap::kuninitialized_symbolRootIndex); |
2704 __ b(eq, &miss); | 2704 __ b(eq, &miss); |
2705 | 2705 |
2706 if (!FLAG_trace_ic) { | |
2707 // We are going megamorphic. If the feedback is a JSFunction, it is fine | |
2708 // to handle it here. More complex cases are dealt with in the runtime. | |
2709 __ AssertNotSmi(r4); | |
2710 __ CompareObjectType(r4, r5, r5, JS_FUNCTION_TYPE); | |
2711 __ b(ne, &miss); | |
2712 __ add(r4, r2, Operand::PointerOffsetFromSmiKey(r3)); | |
2713 __ LoadRoot(ip, Heap::kmegamorphic_symbolRootIndex); | |
2714 __ str(ip, FieldMemOperand(r4, FixedArray::kHeaderSize)); | |
2715 __ jmp(&slow_start); | |
2716 } | |
2717 | |
2718 // We are here because tracing is on or we are going monomorphic. | 2706 // We are here because tracing is on or we are going monomorphic. |
2719 __ bind(&miss); | 2707 __ bind(&miss); |
2720 GenerateMiss(masm); | 2708 GenerateMiss(masm); |
2721 | 2709 |
2722 // the slow case | 2710 // the slow case |
2723 __ bind(&slow_start); | 2711 __ bind(&slow_start); |
2724 // Check that the function is really a JavaScript function. | 2712 // Check that the function is really a JavaScript function. |
2725 // r1: pushed function (to be verified) | 2713 // r1: pushed function (to be verified) |
2726 __ JumpIfSmi(r1, &non_function); | 2714 __ JumpIfSmi(r1, &non_function); |
2727 | 2715 |
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4678 MemOperand(fp, 6 * kPointerSize), | 4666 MemOperand(fp, 6 * kPointerSize), |
4679 NULL); | 4667 NULL); |
4680 } | 4668 } |
4681 | 4669 |
4682 | 4670 |
4683 #undef __ | 4671 #undef __ |
4684 | 4672 |
4685 } } // namespace v8::internal | 4673 } } // namespace v8::internal |
4686 | 4674 |
4687 #endif // V8_TARGET_ARCH_ARM | 4675 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |