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

Side by Side Diff: src/mips64/builtins-mips64.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/mips/builtins-mips.cc ('k') | src/ppc/builtins-ppc.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 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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.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 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); 1008 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL);
1009 } 1009 }
1010 1010
1011 1011
1012 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { 1012 void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
1013 CallRuntimePassFunction(masm, Runtime::kCompileLazy); 1013 CallRuntimePassFunction(masm, Runtime::kCompileLazy);
1014 GenerateTailCallToReturnedCode(masm); 1014 GenerateTailCallToReturnedCode(masm);
1015 } 1015 }
1016 1016
1017 1017
1018 static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) {
1019 FrameScope scope(masm, StackFrame::INTERNAL);
1020 // Push a copy of the function onto the stack.
1021 // Push function as parameter to the runtime call.
1022 __ Push(a1, a1);
1023 // Whether to compile in a background thread.
1024 __ LoadRoot(
1025 at, concurrent ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex);
1026 __ push(at);
1027
1028 __ CallRuntime(Runtime::kCompileOptimized, 2);
1029 // Restore receiver.
1030 __ Pop(a1);
1031 }
1032
1033
1034 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { 1018 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) {
1035 CallCompileOptimized(masm, false); 1019 CallRuntimePassFunction(masm, Runtime::kCompileOptimized_NotConcurrent);
1036 GenerateTailCallToReturnedCode(masm); 1020 GenerateTailCallToReturnedCode(masm);
1037 } 1021 }
1038 1022
1039 1023
1040 void Builtins::Generate_CompileOptimizedConcurrent(MacroAssembler* masm) { 1024 void Builtins::Generate_CompileOptimizedConcurrent(MacroAssembler* masm) {
1041 CallCompileOptimized(masm, true); 1025 CallRuntimePassFunction(masm, Runtime::kCompileOptimized_Concurrent);
1042 GenerateTailCallToReturnedCode(masm); 1026 GenerateTailCallToReturnedCode(masm);
1043 } 1027 }
1044 1028
1045 1029
1046 static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) { 1030 static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) {
1047 // For now, we are relying on the fact that make_code_young doesn't do any 1031 // For now, we are relying on the fact that make_code_young doesn't do any
1048 // garbage collection which allows us to save/restore the registers without 1032 // garbage collection which allows us to save/restore the registers without
1049 // worrying about which of them contain pointers. We also don't build an 1033 // worrying about which of them contain pointers. We also don't build an
1050 // internal frame to make the code faster, since we shouldn't have to do stack 1034 // internal frame to make the code faster, since we shouldn't have to do stack
1051 // crawls in MakeCodeYoung. This seems a bit fragile. 1035 // crawls in MakeCodeYoung. This seems a bit fragile.
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 } 1912 }
1929 } 1913 }
1930 1914
1931 1915
1932 #undef __ 1916 #undef __
1933 1917
1934 } // namespace internal 1918 } // namespace internal
1935 } // namespace v8 1919 } // namespace v8
1936 1920
1937 #endif // V8_TARGET_ARCH_MIPS64 1921 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/ppc/builtins-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698