Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: src/builtins/x87/builtins-x87.cc

Issue 2614533003: X87: [Ignition] Teach CompileLazy about interpreted functions. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698