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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 __ ld(kInterpreterBytecodeArrayRegister, | 1036 __ ld(kInterpreterBytecodeArrayRegister, |
1037 FieldMemOperand(a0, SharedFunctionInfo::kFunctionDataOffset)); | 1037 FieldMemOperand(a0, SharedFunctionInfo::kFunctionDataOffset)); |
1038 __ bind(&bytecode_array_loaded); | 1038 __ bind(&bytecode_array_loaded); |
1039 | 1039 |
1040 // Check whether we should continue to use the interpreter. | 1040 // Check whether we should continue to use the interpreter. |
1041 Label switch_to_different_code_kind; | 1041 Label switch_to_different_code_kind; |
1042 __ ld(a0, FieldMemOperand(a0, SharedFunctionInfo::kCodeOffset)); | 1042 __ ld(a0, FieldMemOperand(a0, SharedFunctionInfo::kCodeOffset)); |
1043 __ Branch(&switch_to_different_code_kind, ne, a0, | 1043 __ Branch(&switch_to_different_code_kind, ne, a0, |
1044 Operand(masm->CodeObject())); // Self-reference to this code. | 1044 Operand(masm->CodeObject())); // Self-reference to this code. |
1045 | 1045 |
| 1046 // Increment invocation count for the function. |
| 1047 __ ld(a0, FieldMemOperand(a1, JSFunction::kLiteralsOffset)); |
| 1048 __ ld(a0, FieldMemOperand(a0, LiteralsArray::kFeedbackVectorOffset)); |
| 1049 __ ld(a4, FieldMemOperand( |
| 1050 a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
| 1051 TypeFeedbackVector::kHeaderSize)); |
| 1052 __ Daddu(a4, a4, Operand(Smi::FromInt(1))); |
| 1053 __ sd(a4, FieldMemOperand( |
| 1054 a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
| 1055 TypeFeedbackVector::kHeaderSize)); |
| 1056 |
1046 // Check function data field is actually a BytecodeArray object. | 1057 // Check function data field is actually a BytecodeArray object. |
1047 if (FLAG_debug_code) { | 1058 if (FLAG_debug_code) { |
1048 __ SmiTst(kInterpreterBytecodeArrayRegister, a4); | 1059 __ SmiTst(kInterpreterBytecodeArrayRegister, a4); |
1049 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry, a4, | 1060 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry, a4, |
1050 Operand(zero_reg)); | 1061 Operand(zero_reg)); |
1051 __ GetObjectType(kInterpreterBytecodeArrayRegister, a4, a4); | 1062 __ GetObjectType(kInterpreterBytecodeArrayRegister, a4, a4); |
1052 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry, a4, | 1063 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry, a4, |
1053 Operand(BYTECODE_ARRAY_TYPE)); | 1064 Operand(BYTECODE_ARRAY_TYPE)); |
1054 } | 1065 } |
1055 | 1066 |
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3025 __ break_(0xCC); | 3036 __ break_(0xCC); |
3026 } | 3037 } |
3027 } | 3038 } |
3028 | 3039 |
3029 #undef __ | 3040 #undef __ |
3030 | 3041 |
3031 } // namespace internal | 3042 } // namespace internal |
3032 } // namespace v8 | 3043 } // namespace v8 |
3033 | 3044 |
3034 #endif // V8_TARGET_ARCH_MIPS64 | 3045 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |