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

Unified Diff: src/compiler/js-operator.cc

Issue 1410853007: [turbofan] Remove use of CallFunctionStub from TurboFan. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-operator.cc
diff --git a/src/compiler/js-operator.cc b/src/compiler/js-operator.cc
index 31d21f86cdd6f957d29680b985e51c70f0ba2d3a..f6b3328a44690e0400e6ba1a68f0d365ac978130 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -41,7 +41,7 @@ size_t hash_value(VectorSlotPair const& p) {
size_t hash_value(ConvertReceiverMode mode) {
- return base::hash_value(static_cast<int>(mode));
+ return base::hash_value(static_cast<unsigned>(mode));
}
@@ -65,11 +65,26 @@ ConvertReceiverMode ConvertReceiverModeOf(Operator const* op) {
}
-std::ostream& operator<<(std::ostream& os, CallFunctionParameters const& p) {
- os << p.arity() << ", " << p.flags() << ", " << p.language_mode();
- if (p.AllowTailCalls()) {
- os << ", ALLOW_TAIL_CALLS";
+size_t hash_value(TailCallMode mode) {
+ return base::hash_value(static_cast<unsigned>(mode));
+}
+
+
+std::ostream& operator<<(std::ostream& os, TailCallMode mode) {
+ switch (mode) {
+ case TailCallMode::kAllow:
+ return os << "ALLOW_TAIL_CALLS";
+ case TailCallMode::kDisallow:
+ return os << "DISALLOW_TAIL_CALLS";
}
+ UNREACHABLE();
+ return os;
+}
+
+
+std::ostream& operator<<(std::ostream& os, CallFunctionParameters const& p) {
+ os << p.arity() << ", " << p.language_mode() << ", " << p.convert_mode()
+ << ", " << p.tail_call_mode();
return os;
}
@@ -470,10 +485,9 @@ CACHED_OP_LIST_WITH_LANGUAGE_MODE(CACHED_WITH_LANGUAGE_MODE)
const Operator* JSOperatorBuilder::CallFunction(
- size_t arity, CallFunctionFlags flags, LanguageMode language_mode,
- VectorSlotPair const& feedback, ConvertReceiverMode convert_mode,
- TailCallMode tail_call_mode) {
- CallFunctionParameters parameters(arity, flags, language_mode, feedback,
+ size_t arity, LanguageMode language_mode, VectorSlotPair const& feedback,
+ ConvertReceiverMode convert_mode, TailCallMode tail_call_mode) {
+ CallFunctionParameters parameters(arity, language_mode, feedback,
tail_call_mode, convert_mode);
return new (zone()) Operator1<CallFunctionParameters>( // --
IrOpcode::kJSCallFunction, Operator::kNoProperties, // opcode
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698