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

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

Issue 2649143002: [Turbofan] Implement call with spread bytecode in assembly code. (Closed)
Patch Set: Mips ports 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
Index: src/builtins/builtins-interpreter.cc
diff --git a/src/builtins/builtins-interpreter.cc b/src/builtins/builtins-interpreter.cc
index 27ef954f17b9994b8e5f11f60105bba13df54503..701c92b23970ba96a8adfcfa88fb17d885d27644 100644
--- a/src/builtins/builtins-interpreter.cc
+++ b/src/builtins/builtins-interpreter.cc
@@ -9,17 +9,20 @@ 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) {
+ PushArgsMode mode) {
+ switch (mode) {
+ case PushArgsMode::kJSFunction:
+ if (tail_call_mode == TailCallMode::kDisallow) {
return InterpreterPushArgsAndCallFunction();
} else {
- return InterpreterPushArgsAndCall();
- }
- case TailCallMode::kAllow:
- if (function_type == CallableType::kJSFunction) {
return InterpreterPushArgsAndTailCallFunction();
+ }
+ case PushArgsMode::kWithFinalSpread:
+ CHECK(tail_call_mode == TailCallMode::kDisallow);
+ return InterpreterPushArgsAndCallWithFinalSpread();
+ case PushArgsMode::kOther:
+ if (tail_call_mode == TailCallMode::kDisallow) {
+ return InterpreterPushArgsAndCall();
} else {
return InterpreterPushArgsAndTailCall();
}
@@ -30,34 +33,39 @@ Handle<Code> Builtins::InterpreterPushArgsAndCall(TailCallMode tail_call_mode,
void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) {
return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kDisallow,
- CallableType::kAny);
+ PushArgsMode::kOther);
}
void Builtins::Generate_InterpreterPushArgsAndCallFunction(
MacroAssembler* masm) {
return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kDisallow,
- CallableType::kJSFunction);
+ PushArgsMode::kJSFunction);
+}
+
+void Builtins::Generate_InterpreterPushArgsAndCallWithFinalSpread(
+ MacroAssembler* masm) {
+ return Generate_InterpreterPushArgsAndCallImpl(
+ masm, TailCallMode::kDisallow, PushArgsMode::kWithFinalSpread);
}
void Builtins::Generate_InterpreterPushArgsAndTailCall(MacroAssembler* masm) {
return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow,
- CallableType::kAny);
+ PushArgsMode::kOther);
}
void Builtins::Generate_InterpreterPushArgsAndTailCallFunction(
MacroAssembler* masm) {
return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow,
- CallableType::kJSFunction);
+ PushArgsMode::kJSFunction);
}
-Handle<Code> Builtins::InterpreterPushArgsAndConstruct(
- PushArgsConstructMode mode) {
+Handle<Code> Builtins::InterpreterPushArgsAndConstruct(PushArgsMode mode) {
switch (mode) {
- case PushArgsConstructMode::kJSFunction:
+ case PushArgsMode::kJSFunction:
return InterpreterPushArgsAndConstructFunction();
- case PushArgsConstructMode::kWithFinalSpread:
+ case PushArgsMode::kWithFinalSpread:
return InterpreterPushArgsAndConstructWithFinalSpread();
- case PushArgsConstructMode::kOther:
+ case PushArgsMode::kOther:
return InterpreterPushArgsAndConstruct();
}
UNREACHABLE();
@@ -65,20 +73,20 @@ Handle<Code> Builtins::InterpreterPushArgsAndConstruct(
}
void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) {
- return Generate_InterpreterPushArgsAndConstructImpl(
- masm, PushArgsConstructMode::kOther);
+ return Generate_InterpreterPushArgsAndConstructImpl(masm,
+ PushArgsMode::kOther);
}
void Builtins::Generate_InterpreterPushArgsAndConstructWithFinalSpread(
MacroAssembler* masm) {
return Generate_InterpreterPushArgsAndConstructImpl(
- masm, PushArgsConstructMode::kWithFinalSpread);
+ masm, PushArgsMode::kWithFinalSpread);
}
void Builtins::Generate_InterpreterPushArgsAndConstructFunction(
MacroAssembler* masm) {
return Generate_InterpreterPushArgsAndConstructImpl(
- masm, PushArgsConstructMode::kJSFunction);
+ masm, PushArgsMode::kJSFunction);
}
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698