| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2625 DCHECK(!AreAliased(scratch1, scratch2, | 2625 DCHECK(!AreAliased(scratch1, scratch2, |
| 2626 argc, function, feedback_vector, index)); | 2626 argc, function, feedback_vector, index)); |
| 2627 // Cache the called function in a feedback vector slot. Cache states are | 2627 // Cache the called function in a feedback vector slot. Cache states are |
| 2628 // uninitialized, monomorphic (indicated by a JSFunction), and megamorphic. | 2628 // uninitialized, monomorphic (indicated by a JSFunction), and megamorphic. |
| 2629 // argc : number of arguments to the construct function | 2629 // argc : number of arguments to the construct function |
| 2630 // function : the function to call | 2630 // function : the function to call |
| 2631 // feedback_vector : the feedback vector | 2631 // feedback_vector : the feedback vector |
| 2632 // index : slot in feedback vector (smi) | 2632 // index : slot in feedback vector (smi) |
| 2633 Label initialize, done, miss, megamorphic, not_array_function; | 2633 Label initialize, done, miss, megamorphic, not_array_function; |
| 2634 | 2634 |
| 2635 DCHECK_EQ(*TypeFeedbackInfo::MegamorphicSentinel(masm->isolate()), | 2635 DCHECK_EQ(*TypeFeedbackVector::MegamorphicSentinel(masm->isolate()), |
| 2636 masm->isolate()->heap()->megamorphic_symbol()); | 2636 masm->isolate()->heap()->megamorphic_symbol()); |
| 2637 DCHECK_EQ(*TypeFeedbackInfo::UninitializedSentinel(masm->isolate()), | 2637 DCHECK_EQ(*TypeFeedbackVector::UninitializedSentinel(masm->isolate()), |
| 2638 masm->isolate()->heap()->uninitialized_symbol()); | 2638 masm->isolate()->heap()->uninitialized_symbol()); |
| 2639 | 2639 |
| 2640 // Load the cache state. | 2640 // Load the cache state. |
| 2641 __ Add(scratch1, feedback_vector, | 2641 __ Add(scratch1, feedback_vector, |
| 2642 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 2642 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 2643 __ Ldr(scratch1, FieldMemOperand(scratch1, FixedArray::kHeaderSize)); | 2643 __ Ldr(scratch1, FieldMemOperand(scratch1, FixedArray::kHeaderSize)); |
| 2644 | 2644 |
| 2645 // A monomorphic cache hit or an already megamorphic state: invoke the | 2645 // A monomorphic cache hit or an already megamorphic state: invoke the |
| 2646 // function without changing the state. | 2646 // function without changing the state. |
| 2647 __ Cmp(scratch1, function); | 2647 __ Cmp(scratch1, function); |
| (...skipping 2401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5049 MemOperand(fp, 6 * kPointerSize), | 5049 MemOperand(fp, 6 * kPointerSize), |
| 5050 NULL); | 5050 NULL); |
| 5051 } | 5051 } |
| 5052 | 5052 |
| 5053 | 5053 |
| 5054 #undef __ | 5054 #undef __ |
| 5055 | 5055 |
| 5056 } } // namespace v8::internal | 5056 } } // namespace v8::internal |
| 5057 | 5057 |
| 5058 #endif // V8_TARGET_ARCH_ARM64 | 5058 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |