| 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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 2927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2938 | 2938 |
| 2939 // Goto miss case if we do not have a function. | 2939 // Goto miss case if we do not have a function. |
| 2940 __ JumpIfNotObjectType(function, x5, x5, JS_FUNCTION_TYPE, &miss); | 2940 __ JumpIfNotObjectType(function, x5, x5, JS_FUNCTION_TYPE, &miss); |
| 2941 | 2941 |
| 2942 // Make sure the function is not the Array() function, which requires special | 2942 // Make sure the function is not the Array() function, which requires special |
| 2943 // behavior on MISS. | 2943 // behavior on MISS. |
| 2944 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, x5); | 2944 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, x5); |
| 2945 __ Cmp(function, x5); | 2945 __ Cmp(function, x5); |
| 2946 __ B(eq, &miss); | 2946 __ B(eq, &miss); |
| 2947 | 2947 |
| 2948 // Make sure the function belongs to the same native context (which implies |
| 2949 // the same global object). |
| 2950 __ Ldr(x4, FieldMemOperand(function, JSFunction::kContextOffset)); |
| 2951 __ Ldr(x4, ContextMemOperand(x4, Context::GLOBAL_OBJECT_INDEX)); |
| 2952 __ Ldr(x4, GlobalObjectMemOperand()); |
| 2953 __ Cmp(x4, x5); |
| 2954 __ B(ne, &miss); |
| 2955 |
| 2948 // Update stats. | 2956 // Update stats. |
| 2949 __ Ldr(x4, FieldMemOperand(feedback_vector, with_types_offset)); | 2957 __ Ldr(x4, FieldMemOperand(feedback_vector, with_types_offset)); |
| 2950 __ Adds(x4, x4, Operand(Smi::FromInt(1))); | 2958 __ Adds(x4, x4, Operand(Smi::FromInt(1))); |
| 2951 __ Str(x4, FieldMemOperand(feedback_vector, with_types_offset)); | 2959 __ Str(x4, FieldMemOperand(feedback_vector, with_types_offset)); |
| 2952 | 2960 |
| 2953 // Initialize the call counter. | 2961 // Initialize the call counter. |
| 2954 __ Mov(x5, Smi::FromInt(CallICNexus::kCallCountIncrement)); | 2962 __ Mov(x5, Smi::FromInt(CallICNexus::kCallCountIncrement)); |
| 2955 __ Adds(x4, feedback_vector, | 2963 __ Adds(x4, feedback_vector, |
| 2956 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 2964 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 2957 __ Str(x5, FieldMemOperand(x4, FixedArray::kHeaderSize + kPointerSize)); | 2965 __ Str(x5, FieldMemOperand(x4, FixedArray::kHeaderSize + kPointerSize)); |
| (...skipping 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5876 MemOperand(fp, 6 * kPointerSize), NULL); | 5884 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5877 } | 5885 } |
| 5878 | 5886 |
| 5879 | 5887 |
| 5880 #undef __ | 5888 #undef __ |
| 5881 | 5889 |
| 5882 } // namespace internal | 5890 } // namespace internal |
| 5883 } // namespace v8 | 5891 } // namespace v8 |
| 5884 | 5892 |
| 5885 #endif // V8_TARGET_ARCH_ARM64 | 5893 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |