OLD | NEW |
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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 1007 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); |
1008 } | 1008 } |
1009 | 1009 |
1010 | 1010 |
1011 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { | 1011 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { |
1012 CallRuntimePassFunction(masm, Runtime::kCompileLazy); | 1012 CallRuntimePassFunction(masm, Runtime::kCompileLazy); |
1013 GenerateTailCallToReturnedCode(masm); | 1013 GenerateTailCallToReturnedCode(masm); |
1014 } | 1014 } |
1015 | 1015 |
1016 | 1016 |
1017 static void CallCompileOptimized(MacroAssembler* masm, bool concurrent) { | |
1018 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | |
1019 // Push a copy of the function onto the stack. | |
1020 __ push(r1); | |
1021 // Push function as parameter to the runtime call. | |
1022 __ Push(r1); | |
1023 // Whether to compile in a background thread. | |
1024 __ LoadRoot( | |
1025 ip, concurrent ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex); | |
1026 __ push(ip); | |
1027 | |
1028 __ CallRuntime(Runtime::kCompileOptimized, 2); | |
1029 // Restore receiver. | |
1030 __ pop(r1); | |
1031 } | |
1032 | |
1033 | |
1034 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { | 1017 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { |
1035 CallCompileOptimized(masm, false); | 1018 CallRuntimePassFunction(masm, Runtime::kCompileOptimized_NotConcurrent); |
1036 GenerateTailCallToReturnedCode(masm); | 1019 GenerateTailCallToReturnedCode(masm); |
1037 } | 1020 } |
1038 | 1021 |
1039 | 1022 |
1040 void Builtins::Generate_CompileOptimizedConcurrent(MacroAssembler* masm) { | 1023 void Builtins::Generate_CompileOptimizedConcurrent(MacroAssembler* masm) { |
1041 CallCompileOptimized(masm, true); | 1024 CallRuntimePassFunction(masm, Runtime::kCompileOptimized_Concurrent); |
1042 GenerateTailCallToReturnedCode(masm); | 1025 GenerateTailCallToReturnedCode(masm); |
1043 } | 1026 } |
1044 | 1027 |
1045 | 1028 |
1046 static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) { | 1029 static void GenerateMakeCodeYoungAgainCommon(MacroAssembler* masm) { |
1047 // For now, we are relying on the fact that make_code_young doesn't do any | 1030 // 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 | 1031 // 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 | 1032 // 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 | 1033 // internal frame to make the code faster, since we shouldn't have to do stack |
1051 // crawls in MakeCodeYoung. This seems a bit fragile. | 1034 // crawls in MakeCodeYoung. This seems a bit fragile. |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1902 } | 1885 } |
1903 } | 1886 } |
1904 | 1887 |
1905 | 1888 |
1906 #undef __ | 1889 #undef __ |
1907 | 1890 |
1908 } // namespace internal | 1891 } // namespace internal |
1909 } // namespace v8 | 1892 } // namespace v8 |
1910 | 1893 |
1911 #endif // V8_TARGET_ARCH_ARM | 1894 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |