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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 __ movp(native_context, NativeContextOperand()); | 1012 __ movp(native_context, NativeContextOperand()); |
1013 | 1013 |
1014 __ bind(&loop_top); | 1014 __ bind(&loop_top); |
1015 // Native context match? | 1015 // Native context match? |
1016 Register temp = r11; | 1016 Register temp = r11; |
1017 __ movp(temp, FieldOperand(map, index, times_pointer_size, | 1017 __ movp(temp, FieldOperand(map, index, times_pointer_size, |
1018 SharedFunctionInfo::kOffsetToPreviousContext)); | 1018 SharedFunctionInfo::kOffsetToPreviousContext)); |
1019 __ movp(temp, FieldOperand(temp, WeakCell::kValueOffset)); | 1019 __ movp(temp, FieldOperand(temp, WeakCell::kValueOffset)); |
1020 __ cmpp(temp, native_context); | 1020 __ cmpp(temp, native_context); |
1021 __ j(not_equal, &loop_bottom); | 1021 __ j(not_equal, &loop_bottom); |
1022 // OSR id set to none? | |
1023 __ movp(temp, FieldOperand(map, index, times_pointer_size, | |
1024 SharedFunctionInfo::kOffsetToPreviousOsrAstId)); | |
1025 __ SmiToInteger32(temp, temp); | |
1026 const int bailout_id = BailoutId::None().ToInt(); | |
1027 __ cmpl(temp, Immediate(bailout_id)); | |
1028 __ j(not_equal, &loop_bottom); | |
1029 // Literals available? | 1022 // Literals available? |
1030 __ movp(temp, FieldOperand(map, index, times_pointer_size, | 1023 __ movp(temp, FieldOperand(map, index, times_pointer_size, |
1031 SharedFunctionInfo::kOffsetToPreviousLiterals)); | 1024 SharedFunctionInfo::kOffsetToPreviousLiterals)); |
1032 __ movp(temp, FieldOperand(temp, WeakCell::kValueOffset)); | 1025 __ movp(temp, FieldOperand(temp, WeakCell::kValueOffset)); |
1033 __ JumpIfSmi(temp, &gotta_call_runtime); | 1026 __ JumpIfSmi(temp, &gotta_call_runtime); |
1034 | 1027 |
1035 // Save the literals in the closure. | 1028 // Save the literals in the closure. |
1036 __ movp(FieldOperand(closure, JSFunction::kLiteralsOffset), temp); | 1029 __ movp(FieldOperand(closure, JSFunction::kLiteralsOffset), temp); |
1037 __ movp(r15, index); | 1030 __ movp(r15, index); |
1038 __ RecordWriteField(closure, JSFunction::kLiteralsOffset, temp, r15, | 1031 __ RecordWriteField(closure, JSFunction::kLiteralsOffset, temp, r15, |
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3055 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3048 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
3056 Generate_OnStackReplacementHelper(masm, true); | 3049 Generate_OnStackReplacementHelper(masm, true); |
3057 } | 3050 } |
3058 | 3051 |
3059 #undef __ | 3052 #undef __ |
3060 | 3053 |
3061 } // namespace internal | 3054 } // namespace internal |
3062 } // namespace v8 | 3055 } // namespace v8 |
3063 | 3056 |
3064 #endif // V8_TARGET_ARCH_X64 | 3057 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |