| Index: src/compiler/simplified-operator.cc
|
| diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc
|
| index b7b230fc7b25ce02595684639a0bae1fc08aea49..835d6163ca9722ef02df80cb133cf53f2dccadf3 100644
|
| --- a/src/compiler/simplified-operator.cc
|
| +++ b/src/compiler/simplified-operator.cc
|
| @@ -229,6 +229,34 @@ std::ostream& operator<<(std::ostream& os, CheckForMinusZeroMode mode) {
|
| return os;
|
| }
|
|
|
| +bool operator==(CheckMapsParameters const& lhs,
|
| + CheckMapsParameters const& rhs) {
|
| + return lhs.maps() == rhs.maps();
|
| +}
|
| +
|
| +bool operator!=(CheckMapsParameters const& lhs,
|
| + CheckMapsParameters const& rhs) {
|
| + return !(lhs == rhs);
|
| +}
|
| +
|
| +size_t hash_value(CheckMapsParameters const& p) {
|
| + return hash_value(p.maps());
|
| +}
|
| +
|
| +std::ostream& operator<<(std::ostream& os, CheckMapsParameters const& p) {
|
| + ZoneHandleSet<Map> const& maps = p.maps();
|
| + for (size_t i = 0; i < maps.size(); ++i) {
|
| + if (i != 0) os << ", ";
|
| + os << Brief(*maps[i]);
|
| + }
|
| + return os;
|
| +}
|
| +
|
| +CheckMapsParameters const& CheckMapsParametersOf(Operator const* op) {
|
| + DCHECK_EQ(IrOpcode::kCheckMaps, op->opcode());
|
| + return OpParameter<CheckMapsParameters>(op);
|
| +}
|
| +
|
| size_t hash_value(CheckTaggedInputMode mode) {
|
| return static_cast<size_t>(mode);
|
| }
|
| @@ -669,16 +697,14 @@ const Operator* SimplifiedOperatorBuilder::CheckedTaggedToFloat64(
|
| return nullptr;
|
| }
|
|
|
| -const Operator* SimplifiedOperatorBuilder::CheckMaps(int map_input_count) {
|
| - // TODO(bmeurer): Cache the most important versions of this operator.
|
| - DCHECK_LT(0, map_input_count);
|
| - int const value_input_count = 1 + map_input_count;
|
| - return new (zone()) Operator1<int>( // --
|
| - IrOpcode::kCheckMaps, // opcode
|
| - Operator::kNoThrow | Operator::kNoWrite, // flags
|
| - "CheckMaps", // name
|
| - value_input_count, 1, 1, 0, 1, 0, // counts
|
| - map_input_count); // parameter
|
| +const Operator* SimplifiedOperatorBuilder::CheckMaps(ZoneHandleSet<Map> maps) {
|
| + CheckMapsParameters const parameters(maps);
|
| + return new (zone()) Operator1<CheckMapsParameters>( // --
|
| + IrOpcode::kCheckMaps, // opcode
|
| + Operator::kNoThrow | Operator::kNoWrite, // flags
|
| + "CheckMaps", // name
|
| + 1, 1, 1, 0, 1, 0, // counts
|
| + parameters); // parameter
|
| }
|
|
|
| const Operator* SimplifiedOperatorBuilder::CheckFloat64Hole(
|
|
|