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

Unified Diff: src/builtins/builtins-interpreter.cc

Issue 2168273004: [builtins] move conversions, debugger, handlers, interpreter builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase yet again Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/builtins-handler.cc ('k') | src/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-interpreter.cc
diff --git a/src/builtins/builtins-interpreter.cc b/src/builtins/builtins-interpreter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..900172fd48311efb2596e4402fd441a26787600b
--- /dev/null
+++ b/src/builtins/builtins-interpreter.cc
@@ -0,0 +1,54 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/builtins/builtins.h"
+#include "src/builtins/builtins-utils.h"
+
+namespace v8 {
+namespace internal {
+
+Handle<Code> Builtins::InterpreterPushArgsAndCall(TailCallMode tail_call_mode,
+ CallableType function_type) {
+ switch (tail_call_mode) {
+ case TailCallMode::kDisallow:
+ if (function_type == CallableType::kJSFunction) {
+ return InterpreterPushArgsAndCallFunction();
+ } else {
+ return InterpreterPushArgsAndCall();
+ }
+ case TailCallMode::kAllow:
+ if (function_type == CallableType::kJSFunction) {
+ return InterpreterPushArgsAndTailCallFunction();
+ } else {
+ return InterpreterPushArgsAndTailCall();
+ }
+ }
+ UNREACHABLE();
+ return Handle<Code>::null();
+}
+
+void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) {
+ return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kDisallow,
+ CallableType::kAny);
+}
+
+void Builtins::Generate_InterpreterPushArgsAndCallFunction(
+ MacroAssembler* masm) {
+ return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kDisallow,
+ CallableType::kJSFunction);
+}
+
+void Builtins::Generate_InterpreterPushArgsAndTailCall(MacroAssembler* masm) {
+ return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow,
+ CallableType::kAny);
+}
+
+void Builtins::Generate_InterpreterPushArgsAndTailCallFunction(
+ MacroAssembler* masm) {
+ return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow,
+ CallableType::kJSFunction);
+}
+
+} // namespace internal
+} // namespace v8
« no previous file with comments | « src/builtins/builtins-handler.cc ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698