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

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

Issue 2649143002: [Turbofan] Implement call with spread bytecode in assembly code. (Closed)
Patch Set: Rename PushArgsMode to InterpreterPushArgsMode Created 3 years, 11 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.h ('k') | src/builtins/ia32/builtins-ia32.cc » ('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
index 27ef954f17b9994b8e5f11f60105bba13df54503..fe8a1a58ac70f7e70e59c8567cdf1e7afa121fb2 100644
--- a/src/builtins/builtins-interpreter.cc
+++ b/src/builtins/builtins-interpreter.cc
@@ -8,18 +8,21 @@
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) {
+Handle<Code> Builtins::InterpreterPushArgsAndCall(
+ TailCallMode tail_call_mode, InterpreterPushArgsMode mode) {
+ switch (mode) {
+ case InterpreterPushArgsMode::kJSFunction:
+ if (tail_call_mode == TailCallMode::kDisallow) {
return InterpreterPushArgsAndCallFunction();
} else {
- return InterpreterPushArgsAndCall();
- }
- case TailCallMode::kAllow:
- if (function_type == CallableType::kJSFunction) {
return InterpreterPushArgsAndTailCallFunction();
+ }
+ case InterpreterPushArgsMode::kWithFinalSpread:
+ CHECK(tail_call_mode == TailCallMode::kDisallow);
+ return InterpreterPushArgsAndCallWithFinalSpread();
+ case InterpreterPushArgsMode::kOther:
+ if (tail_call_mode == TailCallMode::kDisallow) {
+ return InterpreterPushArgsAndCall();
} else {
return InterpreterPushArgsAndTailCall();
}
@@ -29,35 +32,41 @@ Handle<Code> Builtins::InterpreterPushArgsAndCall(TailCallMode tail_call_mode,
}
void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) {
- return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kDisallow,
- CallableType::kAny);
+ return Generate_InterpreterPushArgsAndCallImpl(
+ masm, TailCallMode::kDisallow, InterpreterPushArgsMode::kOther);
}
void Builtins::Generate_InterpreterPushArgsAndCallFunction(
MacroAssembler* masm) {
- return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kDisallow,
- CallableType::kJSFunction);
+ return Generate_InterpreterPushArgsAndCallImpl(
+ masm, TailCallMode::kDisallow, InterpreterPushArgsMode::kJSFunction);
+}
+
+void Builtins::Generate_InterpreterPushArgsAndCallWithFinalSpread(
+ MacroAssembler* masm) {
+ return Generate_InterpreterPushArgsAndCallImpl(
+ masm, TailCallMode::kDisallow, InterpreterPushArgsMode::kWithFinalSpread);
}
void Builtins::Generate_InterpreterPushArgsAndTailCall(MacroAssembler* masm) {
- return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow,
- CallableType::kAny);
+ return Generate_InterpreterPushArgsAndCallImpl(
+ masm, TailCallMode::kAllow, InterpreterPushArgsMode::kOther);
}
void Builtins::Generate_InterpreterPushArgsAndTailCallFunction(
MacroAssembler* masm) {
- return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow,
- CallableType::kJSFunction);
+ return Generate_InterpreterPushArgsAndCallImpl(
+ masm, TailCallMode::kAllow, InterpreterPushArgsMode::kJSFunction);
}
Handle<Code> Builtins::InterpreterPushArgsAndConstruct(
- PushArgsConstructMode mode) {
+ InterpreterPushArgsMode mode) {
switch (mode) {
- case PushArgsConstructMode::kJSFunction:
+ case InterpreterPushArgsMode::kJSFunction:
return InterpreterPushArgsAndConstructFunction();
- case PushArgsConstructMode::kWithFinalSpread:
+ case InterpreterPushArgsMode::kWithFinalSpread:
return InterpreterPushArgsAndConstructWithFinalSpread();
- case PushArgsConstructMode::kOther:
+ case InterpreterPushArgsMode::kOther:
return InterpreterPushArgsAndConstruct();
}
UNREACHABLE();
@@ -66,19 +75,19 @@ Handle<Code> Builtins::InterpreterPushArgsAndConstruct(
void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) {
return Generate_InterpreterPushArgsAndConstructImpl(
- masm, PushArgsConstructMode::kOther);
+ masm, InterpreterPushArgsMode::kOther);
}
void Builtins::Generate_InterpreterPushArgsAndConstructWithFinalSpread(
MacroAssembler* masm) {
return Generate_InterpreterPushArgsAndConstructImpl(
- masm, PushArgsConstructMode::kWithFinalSpread);
+ masm, InterpreterPushArgsMode::kWithFinalSpread);
}
void Builtins::Generate_InterpreterPushArgsAndConstructFunction(
MacroAssembler* masm) {
return Generate_InterpreterPushArgsAndConstructImpl(
- masm, PushArgsConstructMode::kJSFunction);
+ masm, InterpreterPushArgsMode::kJSFunction);
}
} // namespace internal
« no previous file with comments | « src/builtins/builtins.h ('k') | src/builtins/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698