| 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/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 __ Ldr(kInterpreterBytecodeArrayRegister, | 1058 __ Ldr(kInterpreterBytecodeArrayRegister, |
| 1059 FieldMemOperand(x0, SharedFunctionInfo::kFunctionDataOffset)); | 1059 FieldMemOperand(x0, SharedFunctionInfo::kFunctionDataOffset)); |
| 1060 __ Bind(&bytecode_array_loaded); | 1060 __ Bind(&bytecode_array_loaded); |
| 1061 | 1061 |
| 1062 // Check whether we should continue to use the interpreter. | 1062 // Check whether we should continue to use the interpreter. |
| 1063 Label switch_to_different_code_kind; | 1063 Label switch_to_different_code_kind; |
| 1064 __ Ldr(x0, FieldMemOperand(x0, SharedFunctionInfo::kCodeOffset)); | 1064 __ Ldr(x0, FieldMemOperand(x0, SharedFunctionInfo::kCodeOffset)); |
| 1065 __ Cmp(x0, Operand(masm->CodeObject())); // Self-reference to this code. | 1065 __ Cmp(x0, Operand(masm->CodeObject())); // Self-reference to this code. |
| 1066 __ B(ne, &switch_to_different_code_kind); | 1066 __ B(ne, &switch_to_different_code_kind); |
| 1067 | 1067 |
| 1068 // Increment invocation count for the function. |
| 1069 __ Ldr(x11, FieldMemOperand(x1, JSFunction::kLiteralsOffset)); |
| 1070 __ Ldr(x11, FieldMemOperand(x11, LiteralsArray::kFeedbackVectorOffset)); |
| 1071 __ Ldr(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex * |
| 1072 kPointerSize + |
| 1073 TypeFeedbackVector::kHeaderSize)); |
| 1074 __ Add(x10, x10, Operand(Smi::FromInt(1))); |
| 1075 __ Str(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex * |
| 1076 kPointerSize + |
| 1077 TypeFeedbackVector::kHeaderSize)); |
| 1078 |
| 1068 // Check function data field is actually a BytecodeArray object. | 1079 // Check function data field is actually a BytecodeArray object. |
| 1069 if (FLAG_debug_code) { | 1080 if (FLAG_debug_code) { |
| 1070 __ AssertNotSmi(kInterpreterBytecodeArrayRegister, | 1081 __ AssertNotSmi(kInterpreterBytecodeArrayRegister, |
| 1071 kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 1082 kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
| 1072 __ CompareObjectType(kInterpreterBytecodeArrayRegister, x0, x0, | 1083 __ CompareObjectType(kInterpreterBytecodeArrayRegister, x0, x0, |
| 1073 BYTECODE_ARRAY_TYPE); | 1084 BYTECODE_ARRAY_TYPE); |
| 1074 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 1085 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
| 1075 } | 1086 } |
| 1076 | 1087 |
| 1077 // Load the initial bytecode offset. | 1088 // Load the initial bytecode offset. |
| (...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3060 __ Unreachable(); | 3071 __ Unreachable(); |
| 3061 } | 3072 } |
| 3062 } | 3073 } |
| 3063 | 3074 |
| 3064 #undef __ | 3075 #undef __ |
| 3065 | 3076 |
| 3066 } // namespace internal | 3077 } // namespace internal |
| 3067 } // namespace v8 | 3078 } // namespace v8 |
| 3068 | 3079 |
| 3069 #endif // V8_TARGET_ARCH_ARM | 3080 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |