OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayIndex)); | 1077 FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayIndex)); |
1078 __ bind(&array_done); | 1078 __ bind(&array_done); |
1079 | 1079 |
1080 // Check whether we should continue to use the interpreter. | 1080 // Check whether we should continue to use the interpreter. |
1081 Label switch_to_different_code_kind; | 1081 Label switch_to_different_code_kind; |
1082 __ LoadP(r3, FieldMemOperand(r3, SharedFunctionInfo::kCodeOffset)); | 1082 __ LoadP(r3, FieldMemOperand(r3, SharedFunctionInfo::kCodeOffset)); |
1083 __ mov(ip, Operand(masm->CodeObject())); // Self-reference to this code. | 1083 __ mov(ip, Operand(masm->CodeObject())); // Self-reference to this code. |
1084 __ cmp(r3, ip); | 1084 __ cmp(r3, ip); |
1085 __ bne(&switch_to_different_code_kind); | 1085 __ bne(&switch_to_different_code_kind); |
1086 | 1086 |
| 1087 // Increment invocation count for the function. |
| 1088 __ LoadP(r7, FieldMemOperand(r4, JSFunction::kLiteralsOffset)); |
| 1089 __ LoadP(r7, FieldMemOperand(r7, LiteralsArray::kFeedbackVectorOffset)); |
| 1090 __ LoadP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex * |
| 1091 kPointerSize + |
| 1092 TypeFeedbackVector::kHeaderSize)); |
| 1093 __ AddSmiLiteral(r8, r8, Smi::FromInt(1), r0); |
| 1094 __ StoreP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex * |
| 1095 kPointerSize + |
| 1096 TypeFeedbackVector::kHeaderSize), |
| 1097 r0); |
| 1098 |
1087 // Check function data field is actually a BytecodeArray object. | 1099 // Check function data field is actually a BytecodeArray object. |
1088 | 1100 |
1089 if (FLAG_debug_code) { | 1101 if (FLAG_debug_code) { |
1090 __ TestIfSmi(kInterpreterBytecodeArrayRegister, r0); | 1102 __ TestIfSmi(kInterpreterBytecodeArrayRegister, r0); |
1091 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 1103 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
1092 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r3, no_reg, | 1104 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r3, no_reg, |
1093 BYTECODE_ARRAY_TYPE); | 1105 BYTECODE_ARRAY_TYPE); |
1094 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 1106 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
1095 } | 1107 } |
1096 | 1108 |
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3045 __ CallRuntime(Runtime::kThrowStackOverflow); | 3057 __ CallRuntime(Runtime::kThrowStackOverflow); |
3046 __ bkpt(0); | 3058 __ bkpt(0); |
3047 } | 3059 } |
3048 } | 3060 } |
3049 | 3061 |
3050 #undef __ | 3062 #undef __ |
3051 } // namespace internal | 3063 } // namespace internal |
3052 } // namespace v8 | 3064 } // namespace v8 |
3053 | 3065 |
3054 #endif // V8_TARGET_ARCH_PPC | 3066 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |