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

Side by Side Diff: src/mips/builtins-mips.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/ia32/builtins-ia32.cc ('k') | src/mips64/builtins-mips64.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); 1013 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL);
1014 } 1014 }
1015 1015
1016 1016
1017 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { 1017 void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
1018 CallRuntimePassFunction(masm, Runtime::kCompileLazy); 1018 CallRuntimePassFunction(masm, Runtime::kCompileLazy);
1019 GenerateTailCallToReturnedCode(masm); 1019 GenerateTailCallToReturnedCode(masm);
1020 } 1020 }
1021 1021
1022 1022
1023 static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) {
1024 FrameScope scope(masm, StackFrame::INTERNAL);
1025 // Push a copy of the function onto the stack.
1026 // Push function as parameter to the runtime call.
1027 __ Push(a1, a1);
1028 // Whether to compile in a background thread.
1029 __ LoadRoot(
1030 at, concurrent ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex);
1031 __ push(at);
1032
1033 __ CallRuntime(Runtime::kCompileOptimized, 2);
1034 // Restore receiver.
1035 __ Pop(a1);
1036 }
1037
1038
1039 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { 1023 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) {
1040 CallCompileOptimized(masm, false); 1024 CallRuntimePassFunction(masm, Runtime::kCompileOptimized_NotConcurrent);
1041 GenerateTailCallToReturnedCode(masm); 1025 GenerateTailCallToReturnedCode(masm);
1042 } 1026 }
1043 1027
1044 1028
1045 void Builtins::Generate_CompileOptimizedConcurrent(MacroAssembler* masm) { 1029 void Builtins::Generate_CompileOptimizedConcurrent(MacroAssembler* masm) {
1046 CallCompileOptimized(masm, true); 1030 CallRuntimePassFunction(masm, Runtime::kCompileOptimized_Concurrent);
1047 GenerateTailCallToReturnedCode(masm); 1031 GenerateTailCallToReturnedCode(masm);
1048 } 1032 }
1049 1033
1050 1034
1051
1052 static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) { 1035 static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) {
1053 // For now, we are relying on the fact that make_code_young doesn't do any 1036 // For now, we are relying on the fact that make_code_young doesn't do any
1054 // garbage collection which allows us to save/restore the registers without 1037 // garbage collection which allows us to save/restore the registers without
1055 // worrying about which of them contain pointers. We also don't build an 1038 // worrying about which of them contain pointers. We also don't build an
1056 // internal frame to make the code faster, since we shouldn't have to do stack 1039 // internal frame to make the code faster, since we shouldn't have to do stack
1057 // crawls in MakeCodeYoung. This seems a bit fragile. 1040 // crawls in MakeCodeYoung. This seems a bit fragile.
1058 1041
1059 // Set a0 to point to the head of the PlatformCodeAge sequence. 1042 // Set a0 to point to the head of the PlatformCodeAge sequence.
1060 __ Subu(a0, a0, 1043 __ Subu(a0, a0,
1061 Operand(kNoCodeAgeSequenceLength - Assembler::kInstrSize)); 1044 Operand(kNoCodeAgeSequenceLength - Assembler::kInstrSize));
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1934 } 1917 }
1935 } 1918 }
1936 1919
1937 1920
1938 #undef __ 1921 #undef __
1939 1922
1940 } // namespace internal 1923 } // namespace internal
1941 } // namespace v8 1924 } // namespace v8
1942 1925
1943 #endif // V8_TARGET_ARCH_MIPS 1926 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698