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

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

Issue 1426893002: [turbofan] Optimize JSConvertReceiver if we know something about the receiver. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/compiler/js-operator.h ('k') | src/compiler/js-typed-lowering.h » ('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 ad2369da92a460de60905aa5ddf8267b14eb25c3..36a3c436962c3292ac140f443637b5c50235a727 100644
--- a/src/compiler/js-operator.cc
+++ b/src/compiler/js-operator.cc
@@ -40,12 +40,12 @@ size_t hash_value(VectorSlotPair const& p) {
}
-size_t hash_value(ConvertReceiverMode const& mode) {
+size_t hash_value(ConvertReceiverMode mode) {
return base::hash_value(static_cast<int>(mode));
}
-std::ostream& operator<<(std::ostream& os, ConvertReceiverMode const& mode) {
+std::ostream& operator<<(std::ostream& os, ConvertReceiverMode mode) {
switch (mode) {
case ConvertReceiverMode::kNullOrUndefined:
return os << "NULL_OR_UNDEFINED";
@@ -59,6 +59,12 @@ std::ostream& operator<<(std::ostream& os, ConvertReceiverMode const& mode) {
}
+ConvertReceiverMode ConvertReceiverModeOf(Operator const* op) {
+ DCHECK_EQ(IrOpcode::kJSConvertReceiver, op->opcode());
+ return OpParameter<ConvertReceiverMode>(op);
+}
+
+
std::ostream& operator<<(std::ostream& os, CallFunctionParameters const& p) {
os << p.arity() << ", " << p.flags() << ", " << p.language_mode();
if (p.AllowTailCalls()) {
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698