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

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

Issue 2621423006: [turbofan] Add support for (deferred) instance migration. (Closed)
Patch Set: 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/compiler/simplified-operator.cc
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc
index 98e136682c2c78f38f31ad15f99cbfd77999784b..31dac61d7e7d7b79a6b485b7bc816921dbed5f38 100644
--- a/src/compiler/simplified-operator.cc
+++ b/src/compiler/simplified-operator.cc
@@ -234,9 +234,19 @@ std::ostream& operator<<(std::ostream& os, CheckForMinusZeroMode mode) {
return os;
}
+std::ostream& operator<<(std::ostream& os, CheckMapsFlags flags) {
+ bool empty = true;
+ if (flags & CheckMapsFlag::kTryMigrateInstance) {
+ os << "TryMigrateInstance";
+ empty = false;
+ }
+ if (empty) os << "None";
+ return os;
+}
+
bool operator==(CheckMapsParameters const& lhs,
CheckMapsParameters const& rhs) {
- return lhs.maps() == rhs.maps();
+ return lhs.flags() == rhs.flags() && lhs.maps() == rhs.maps();
}
bool operator!=(CheckMapsParameters const& lhs,
@@ -244,13 +254,15 @@ bool operator!=(CheckMapsParameters const& lhs,
return !(lhs == rhs);
}
-size_t hash_value(CheckMapsParameters const& p) { return hash_value(p.maps()); }
+size_t hash_value(CheckMapsParameters const& p) {
+ return base::hash_combine(p.flags(), p.maps());
+}
std::ostream& operator<<(std::ostream& os, CheckMapsParameters const& p) {
ZoneHandleSet<Map> const& maps = p.maps();
+ os << p.flags();
for (size_t i = 0; i < maps.size(); ++i) {
- if (i != 0) os << ", ";
- os << Brief(*maps[i]);
+ os << ", " << Brief(*maps[i]);
}
return os;
}
@@ -742,8 +754,9 @@ const Operator* SimplifiedOperatorBuilder::CheckedTaggedToFloat64(
return nullptr;
}
-const Operator* SimplifiedOperatorBuilder::CheckMaps(ZoneHandleSet<Map> maps) {
- CheckMapsParameters const parameters(maps);
+const Operator* SimplifiedOperatorBuilder::CheckMaps(CheckMapsFlags flags,
+ ZoneHandleSet<Map> maps) {
+ CheckMapsParameters const parameters(flags, maps);
return new (zone()) Operator1<CheckMapsParameters>( // --
IrOpcode::kCheckMaps, // opcode
Operator::kNoThrow | Operator::kNoWrite, // flags
« src/compiler/effect-control-linearizer.cc ('K') | « src/compiler/simplified-operator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698