| 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
| 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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 __ LoadP(kInterpreterBytecodeArrayRegister, | 1080 __ LoadP(kInterpreterBytecodeArrayRegister, |
| 1081 FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayIndex)); | 1081 FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayIndex)); |
| 1082 __ bind(&array_done); | 1082 __ bind(&array_done); |
| 1083 | 1083 |
| 1084 // Check whether we should continue to use the interpreter. | 1084 // Check whether we should continue to use the interpreter. |
| 1085 Label switch_to_different_code_kind; | 1085 Label switch_to_different_code_kind; |
| 1086 __ LoadP(r2, FieldMemOperand(r2, SharedFunctionInfo::kCodeOffset)); | 1086 __ LoadP(r2, FieldMemOperand(r2, SharedFunctionInfo::kCodeOffset)); |
| 1087 __ CmpP(r2, Operand(masm->CodeObject())); // Self-reference to this code. | 1087 __ CmpP(r2, Operand(masm->CodeObject())); // Self-reference to this code. |
| 1088 __ bne(&switch_to_different_code_kind); | 1088 __ bne(&switch_to_different_code_kind); |
| 1089 | 1089 |
| 1090 // Increment invocation count for the function. |
| 1091 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); |
| 1092 __ LoadP(r6, FieldMemOperand(r6, LiteralsArray::kFeedbackVectorOffset)); |
| 1093 __ LoadP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex * |
| 1094 kPointerSize + |
| 1095 TypeFeedbackVector::kHeaderSize)); |
| 1096 __ AddSmiLiteral(r1, r1, Smi::FromInt(1), r0); |
| 1097 __ StoreP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex * |
| 1098 kPointerSize + |
| 1099 TypeFeedbackVector::kHeaderSize)); |
| 1100 |
| 1090 // Check function data field is actually a BytecodeArray object. | 1101 // Check function data field is actually a BytecodeArray object. |
| 1091 if (FLAG_debug_code) { | 1102 if (FLAG_debug_code) { |
| 1092 __ TestIfSmi(kInterpreterBytecodeArrayRegister); | 1103 __ TestIfSmi(kInterpreterBytecodeArrayRegister); |
| 1093 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 1104 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
| 1094 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r2, no_reg, | 1105 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r2, no_reg, |
| 1095 BYTECODE_ARRAY_TYPE); | 1106 BYTECODE_ARRAY_TYPE); |
| 1096 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); | 1107 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
| 1097 } | 1108 } |
| 1098 | 1109 |
| 1099 // Load the initial bytecode offset. | 1110 // Load the initial bytecode offset. |
| (...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3057 __ bkpt(0); | 3068 __ bkpt(0); |
| 3058 } | 3069 } |
| 3059 } | 3070 } |
| 3060 | 3071 |
| 3061 #undef __ | 3072 #undef __ |
| 3062 | 3073 |
| 3063 } // namespace internal | 3074 } // namespace internal |
| 3064 } // namespace v8 | 3075 } // namespace v8 |
| 3065 | 3076 |
| 3066 #endif // V8_TARGET_ARCH_S390 | 3077 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |