| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 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 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 | 1116 |
| 1117 __ bind(&try_shared); | 1117 __ bind(&try_shared); |
| 1118 __ pop(closure); | 1118 __ pop(closure); |
| 1119 __ pop(new_target); | 1119 __ pop(new_target); |
| 1120 __ pop(argument_count); | 1120 __ pop(argument_count); |
| 1121 __ mov(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1121 __ mov(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
| 1122 // Is the shared function marked for tier up? | 1122 // Is the shared function marked for tier up? |
| 1123 __ test_b(FieldOperand(entry, SharedFunctionInfo::kMarkedForTierUpByteOffset), | 1123 __ test_b(FieldOperand(entry, SharedFunctionInfo::kMarkedForTierUpByteOffset), |
| 1124 Immediate(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); | 1124 Immediate(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); |
| 1125 __ j(not_zero, &gotta_call_runtime_no_stack); | 1125 __ j(not_zero, &gotta_call_runtime_no_stack); |
| 1126 // Is the full code valid? | 1126 |
| 1127 // If SFI points to anything other than CompileLazy, install that. |
| 1127 __ mov(entry, FieldOperand(entry, SharedFunctionInfo::kCodeOffset)); | 1128 __ mov(entry, FieldOperand(entry, SharedFunctionInfo::kCodeOffset)); |
| 1128 __ mov(ebx, FieldOperand(entry, Code::kFlagsOffset)); | 1129 __ Move(ebx, masm->CodeObject()); |
| 1129 __ and_(ebx, Code::KindField::kMask); | 1130 __ cmp(entry, ebx); |
| 1130 __ shr(ebx, Code::KindField::kShift); | |
| 1131 __ cmp(ebx, Immediate(Code::BUILTIN)); | |
| 1132 __ j(equal, &gotta_call_runtime_no_stack); | 1131 __ j(equal, &gotta_call_runtime_no_stack); |
| 1133 // Yes, install the full code. | 1132 |
| 1133 // Install the SFI's code entry. |
| 1134 __ lea(entry, FieldOperand(entry, Code::kHeaderSize)); | 1134 __ lea(entry, FieldOperand(entry, Code::kHeaderSize)); |
| 1135 __ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry); | 1135 __ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry); |
| 1136 __ RecordWriteCodeEntryField(closure, entry, ebx); | 1136 __ RecordWriteCodeEntryField(closure, entry, ebx); |
| 1137 __ jmp(entry); | 1137 __ jmp(entry); |
| 1138 | 1138 |
| 1139 __ bind(&gotta_call_runtime); | 1139 __ bind(&gotta_call_runtime); |
| 1140 __ pop(closure); | 1140 __ pop(closure); |
| 1141 __ pop(new_target); | 1141 __ pop(new_target); |
| 1142 __ pop(argument_count); | 1142 __ pop(argument_count); |
| 1143 __ bind(&gotta_call_runtime_no_stack); | 1143 __ bind(&gotta_call_runtime_no_stack); |
| (...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3137 | 3137 |
| 3138 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3138 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
| 3139 Generate_OnStackReplacementHelper(masm, true); | 3139 Generate_OnStackReplacementHelper(masm, true); |
| 3140 } | 3140 } |
| 3141 | 3141 |
| 3142 #undef __ | 3142 #undef __ |
| 3143 } // namespace internal | 3143 } // namespace internal |
| 3144 } // namespace v8 | 3144 } // namespace v8 |
| 3145 | 3145 |
| 3146 #endif // V8_TARGET_ARCH_X87 | 3146 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |