| 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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1051 | 1051 |
| 1052 __ bind(&loop_top); | 1052 __ bind(&loop_top); |
| 1053 Register temp = edi; | 1053 Register temp = edi; |
| 1054 | 1054 |
| 1055 // Does the native context match? | 1055 // Does the native context match? |
| 1056 __ mov(temp, FieldOperand(map, index, times_half_pointer_size, | 1056 __ mov(temp, FieldOperand(map, index, times_half_pointer_size, |
| 1057 SharedFunctionInfo::kOffsetToPreviousContext)); | 1057 SharedFunctionInfo::kOffsetToPreviousContext)); |
| 1058 __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset)); | 1058 __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset)); |
| 1059 __ cmp(temp, native_context); | 1059 __ cmp(temp, native_context); |
| 1060 __ j(not_equal, &loop_bottom); | 1060 __ j(not_equal, &loop_bottom); |
| 1061 // Literals available? | 1061 // Feedback vector available? |
| 1062 __ mov(temp, FieldOperand(map, index, times_half_pointer_size, | 1062 __ mov(temp, FieldOperand(map, index, times_half_pointer_size, |
| 1063 SharedFunctionInfo::kOffsetToPreviousLiterals)); | 1063 SharedFunctionInfo::kOffsetToPreviousLiterals)); |
| 1064 __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset)); | 1064 __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset)); |
| 1065 __ JumpIfSmi(temp, &gotta_call_runtime); | 1065 __ JumpIfSmi(temp, &gotta_call_runtime); |
| 1066 | 1066 |
| 1067 // Save the literals in the closure. | 1067 // Save the vector in the closure. |
| 1068 __ mov(ecx, Operand(esp, 0)); | 1068 __ mov(ecx, Operand(esp, 0)); |
| 1069 __ mov(FieldOperand(ecx, JSFunction::kLiteralsOffset), temp); | 1069 __ mov(FieldOperand(ecx, JSFunction::kFeedbackVectorOffset), temp); |
| 1070 __ push(index); | 1070 __ push(index); |
| 1071 __ RecordWriteField(ecx, JSFunction::kLiteralsOffset, temp, index, | 1071 __ RecordWriteField(ecx, JSFunction::kFeedbackVectorOffset, temp, index, |
| 1072 kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); | 1072 kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
| 1073 __ pop(index); | 1073 __ pop(index); |
| 1074 | 1074 |
| 1075 // Code available? | 1075 // Code available? |
| 1076 Register entry = ecx; | 1076 Register entry = ecx; |
| 1077 __ mov(entry, FieldOperand(map, index, times_half_pointer_size, | 1077 __ mov(entry, FieldOperand(map, index, times_half_pointer_size, |
| 1078 SharedFunctionInfo::kOffsetToPreviousCachedCode)); | 1078 SharedFunctionInfo::kOffsetToPreviousCachedCode)); |
| 1079 __ mov(entry, FieldOperand(entry, WeakCell::kValueOffset)); | 1079 __ mov(entry, FieldOperand(entry, WeakCell::kValueOffset)); |
| 1080 __ JumpIfSmi(entry, &try_shared); | 1080 __ JumpIfSmi(entry, &try_shared); |
| 1081 | 1081 |
| (...skipping 2291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3373 | 3373 |
| 3374 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3374 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
| 3375 Generate_OnStackReplacementHelper(masm, true); | 3375 Generate_OnStackReplacementHelper(masm, true); |
| 3376 } | 3376 } |
| 3377 | 3377 |
| 3378 #undef __ | 3378 #undef __ |
| 3379 } // namespace internal | 3379 } // namespace internal |
| 3380 } // namespace v8 | 3380 } // namespace v8 |
| 3381 | 3381 |
| 3382 #endif // V8_TARGET_ARCH_IA32 | 3382 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |