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

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

Issue 2583693003: [Ignition] Teach CompileLazy about interpreted functions. (Closed)
Patch Set: Fix arm 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 | « src/builtins/mips64/builtins-mips64.cc ('k') | 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_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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 1069
1070 // We found neither literals nor code. 1070 // We found neither literals nor code.
1071 __ jmp(&gotta_call_runtime); 1071 __ jmp(&gotta_call_runtime);
1072 1072
1073 __ bind(&try_shared); 1073 __ bind(&try_shared);
1074 __ movp(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1074 __ movp(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1075 // Is the shared function marked for tier up? 1075 // Is the shared function marked for tier up?
1076 __ testb(FieldOperand(entry, SharedFunctionInfo::kMarkedForTierUpByteOffset), 1076 __ testb(FieldOperand(entry, SharedFunctionInfo::kMarkedForTierUpByteOffset),
1077 Immediate(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); 1077 Immediate(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte));
1078 __ j(not_zero, &gotta_call_runtime); 1078 __ j(not_zero, &gotta_call_runtime);
1079 // Is the full code valid? 1079
1080 // If SFI points to anything other than CompileLazy, install that.
1080 __ movp(entry, FieldOperand(entry, SharedFunctionInfo::kCodeOffset)); 1081 __ movp(entry, FieldOperand(entry, SharedFunctionInfo::kCodeOffset));
1081 __ movl(rbx, FieldOperand(entry, Code::kFlagsOffset)); 1082 __ Move(rbx, masm->CodeObject());
1082 __ andl(rbx, Immediate(Code::KindField::kMask)); 1083 __ cmpp(entry, rbx);
1083 __ shrl(rbx, Immediate(Code::KindField::kShift));
1084 __ cmpl(rbx, Immediate(Code::BUILTIN));
1085 __ j(equal, &gotta_call_runtime); 1084 __ j(equal, &gotta_call_runtime);
1086 // Yes, install the full code. 1085
1086 // Install the SFI's code entry.
1087 __ leap(entry, FieldOperand(entry, Code::kHeaderSize)); 1087 __ leap(entry, FieldOperand(entry, Code::kHeaderSize));
1088 __ movp(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry); 1088 __ movp(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry);
1089 __ RecordWriteCodeEntryField(closure, entry, r15); 1089 __ RecordWriteCodeEntryField(closure, entry, r15);
1090 __ jmp(entry); 1090 __ jmp(entry);
1091 1091
1092 __ bind(&gotta_call_runtime); 1092 __ bind(&gotta_call_runtime);
1093 GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy); 1093 GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy);
1094 } 1094 }
1095 1095
1096 void Builtins::Generate_CompileBaseline(MacroAssembler* masm) { 1096 void Builtins::Generate_CompileBaseline(MacroAssembler* masm) {
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after
3046 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3046 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3047 Generate_OnStackReplacementHelper(masm, true); 3047 Generate_OnStackReplacementHelper(masm, true);
3048 } 3048 }
3049 3049
3050 #undef __ 3050 #undef __
3051 3051
3052 } // namespace internal 3052 } // namespace internal
3053 } // namespace v8 3053 } // namespace v8
3054 3054
3055 #endif // V8_TARGET_ARCH_X64 3055 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/builtins/mips64/builtins-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698