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

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

Issue 1456003003: Simplify dispatch in optimizing compile stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/arm/builtins-arm.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 __ Ret(); 977 __ Ret();
978 } 978 }
979 979
980 980
981 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { 981 void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
982 CallRuntimePassFunction(masm, Runtime::kCompileLazy); 982 CallRuntimePassFunction(masm, Runtime::kCompileLazy);
983 GenerateTailCallToReturnedCode(masm); 983 GenerateTailCallToReturnedCode(masm);
984 } 984 }
985 985
986 986
987 static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) {
988 FrameScope scope(masm, StackFrame::INTERNAL);
989 Register function = x1;
990
991 // Preserve function. At the same time, push arguments for
992 // kCompileOptimized.
993 __ LoadObject(x10, masm->isolate()->factory()->ToBoolean(concurrent));
994 __ Push(function, function, x10);
995
996 __ CallRuntime(Runtime::kCompileOptimized, 2);
997
998 // Restore receiver.
999 __ Pop(function);
1000 }
1001
1002
1003 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { 987 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) {
1004 CallCompileOptimized(masm, false); 988 CallRuntimePassFunction(masm, Runtime::kCompileOptimized_NotConcurrent);
1005 GenerateTailCallToReturnedCode(masm); 989 GenerateTailCallToReturnedCode(masm);
1006 } 990 }
1007 991
1008 992
1009 void Builtins::Generate_CompileOptimizedConcurrent(MacroAssembler* masm) { 993 void Builtins::Generate_CompileOptimizedConcurrent(MacroAssembler* masm) {
1010 CallCompileOptimized(masm, true); 994 CallRuntimePassFunction(masm, Runtime::kCompileOptimized_Concurrent);
1011 GenerateTailCallToReturnedCode(masm); 995 GenerateTailCallToReturnedCode(masm);
1012 } 996 }
1013 997
1014 998
1015 static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) { 999 static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) {
1016 // For now, we are relying on the fact that make_code_young doesn't do any 1000 // For now, we are relying on the fact that make_code_young doesn't do any
1017 // garbage collection which allows us to save/restore the registers without 1001 // garbage collection which allows us to save/restore the registers without
1018 // worrying about which of them contain pointers. We also don't build an 1002 // worrying about which of them contain pointers. We also don't build an
1019 // internal frame to make the code fast, since we shouldn't have to do stack 1003 // internal frame to make the code fast, since we shouldn't have to do stack
1020 // crawls in MakeCodeYoung. This seems a bit fragile. 1004 // crawls in MakeCodeYoung. This seems a bit fragile.
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1998 } 1982 }
1999 } 1983 }
2000 1984
2001 1985
2002 #undef __ 1986 #undef __
2003 1987
2004 } // namespace internal 1988 } // namespace internal
2005 } // namespace v8 1989 } // namespace v8
2006 1990
2007 #endif // V8_TARGET_ARCH_ARM 1991 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698