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 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayIndex)); | 1031 FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayIndex)); |
1032 __ bind(&array_done); | 1032 __ bind(&array_done); |
1033 | 1033 |
1034 // Check whether we should continue to use the interpreter. | 1034 // Check whether we should continue to use the interpreter. |
1035 Label switch_to_different_code_kind; | 1035 Label switch_to_different_code_kind; |
1036 __ LoadP(r2, FieldMemOperand(r2, SharedFunctionInfo::kCodeOffset)); | 1036 __ LoadP(r2, FieldMemOperand(r2, SharedFunctionInfo::kCodeOffset)); |
1037 __ CmpP(r2, Operand(masm->CodeObject())); // Self-reference to this code. | 1037 __ CmpP(r2, Operand(masm->CodeObject())); // Self-reference to this code. |
1038 __ bne(&switch_to_different_code_kind); | 1038 __ bne(&switch_to_different_code_kind); |
1039 | 1039 |
1040 // Increment invocation count for the function. | 1040 // Increment invocation count for the function. |
1041 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); | 1041 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kFeedbackVectorOffset)); |
1042 __ LoadP(r6, FieldMemOperand(r6, LiteralsArray::kFeedbackVectorOffset)); | |
1043 __ LoadP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex * | 1042 __ LoadP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex * |
1044 kPointerSize + | 1043 kPointerSize + |
1045 TypeFeedbackVector::kHeaderSize)); | 1044 TypeFeedbackVector::kHeaderSize)); |
1046 __ AddSmiLiteral(r1, r1, Smi::FromInt(1), r0); | 1045 __ AddSmiLiteral(r1, r1, Smi::FromInt(1), r0); |
1047 __ StoreP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex * | 1046 __ StoreP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex * |
1048 kPointerSize + | 1047 kPointerSize + |
1049 TypeFeedbackVector::kHeaderSize)); | 1048 TypeFeedbackVector::kHeaderSize)); |
1050 | 1049 |
1051 // Check function data field is actually a BytecodeArray object. | 1050 // Check function data field is actually a BytecodeArray object. |
1052 if (FLAG_debug_code) { | 1051 if (FLAG_debug_code) { |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1392 Register array_pointer = r7; | 1391 Register array_pointer = r7; |
1393 | 1392 |
1394 // Does the native context match? | 1393 // Does the native context match? |
1395 __ SmiToPtrArrayOffset(array_pointer, index); | 1394 __ SmiToPtrArrayOffset(array_pointer, index); |
1396 __ AddP(array_pointer, map, array_pointer); | 1395 __ AddP(array_pointer, map, array_pointer); |
1397 __ LoadP(temp, FieldMemOperand(array_pointer, | 1396 __ LoadP(temp, FieldMemOperand(array_pointer, |
1398 SharedFunctionInfo::kOffsetToPreviousContext)); | 1397 SharedFunctionInfo::kOffsetToPreviousContext)); |
1399 __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); | 1398 __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); |
1400 __ CmpP(temp, native_context); | 1399 __ CmpP(temp, native_context); |
1401 __ bne(&loop_bottom, Label::kNear); | 1400 __ bne(&loop_bottom, Label::kNear); |
1402 // Literals available? | 1401 // Feedback vector available? |
1403 __ LoadP(temp, | 1402 __ LoadP(temp, |
1404 FieldMemOperand(array_pointer, | 1403 FieldMemOperand(array_pointer, |
1405 SharedFunctionInfo::kOffsetToPreviousLiterals)); | 1404 SharedFunctionInfo::kOffsetToPreviousLiterals)); |
1406 __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); | 1405 __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); |
1407 __ JumpIfSmi(temp, &gotta_call_runtime); | 1406 __ JumpIfSmi(temp, &gotta_call_runtime); |
1408 | 1407 |
1409 // Save the literals in the closure. | 1408 // Save the feedback vector in the closure. |
1410 __ StoreP(temp, FieldMemOperand(closure, JSFunction::kLiteralsOffset), r0); | 1409 __ StoreP(temp, FieldMemOperand(closure, JSFunction::kFeedbackVectorOffset), |
1411 __ RecordWriteField(closure, JSFunction::kLiteralsOffset, temp, r6, | 1410 r0); |
| 1411 __ RecordWriteField(closure, JSFunction::kFeedbackVectorOffset, temp, r6, |
1412 kLRHasNotBeenSaved, kDontSaveFPRegs, EMIT_REMEMBERED_SET, | 1412 kLRHasNotBeenSaved, kDontSaveFPRegs, EMIT_REMEMBERED_SET, |
1413 OMIT_SMI_CHECK); | 1413 OMIT_SMI_CHECK); |
1414 | 1414 |
1415 // Code available? | 1415 // Code available? |
1416 Register entry = r6; | 1416 Register entry = r6; |
1417 __ LoadP(entry, | 1417 __ LoadP(entry, |
1418 FieldMemOperand(array_pointer, | 1418 FieldMemOperand(array_pointer, |
1419 SharedFunctionInfo::kOffsetToPreviousCachedCode)); | 1419 SharedFunctionInfo::kOffsetToPreviousCachedCode)); |
1420 __ LoadP(entry, FieldMemOperand(entry, WeakCell::kValueOffset)); | 1420 __ LoadP(entry, FieldMemOperand(entry, WeakCell::kValueOffset)); |
1421 __ JumpIfSmi(entry, &try_shared); | 1421 __ JumpIfSmi(entry, &try_shared); |
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3217 __ bkpt(0); | 3217 __ bkpt(0); |
3218 } | 3218 } |
3219 } | 3219 } |
3220 | 3220 |
3221 #undef __ | 3221 #undef __ |
3222 | 3222 |
3223 } // namespace internal | 3223 } // namespace internal |
3224 } // namespace v8 | 3224 } // namespace v8 |
3225 | 3225 |
3226 #endif // V8_TARGET_ARCH_S390 | 3226 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |