Index: src/compiler/effect-control-linearizer.cc |
diff --git a/src/compiler/effect-control-linearizer.cc b/src/compiler/effect-control-linearizer.cc |
index 981c4817eecb69c957372192b38ee39e577e4812..846ccd5e90321443239b93e08822765514a780bd 100644 |
--- a/src/compiler/effect-control-linearizer.cc |
+++ b/src/compiler/effect-control-linearizer.cc |
@@ -1167,18 +1167,20 @@ EffectControlLinearizer::LowerCheckBounds(Node* node, Node* frame_state, |
EffectControlLinearizer::ValueEffectControl |
EffectControlLinearizer::LowerCheckMaps(Node* node, Node* frame_state, |
Node* effect, Node* control) { |
+ CheckMapsParameters const& p = CheckMapsParametersOf(node->op()); |
Node* value = node->InputAt(0); |
// Load the current map of the {value}. |
Node* value_map = effect = graph()->NewNode( |
simplified()->LoadField(AccessBuilder::ForMap()), value, effect, control); |
- int const map_count = node->op()->ValueInputCount() - 1; |
+ ZoneHandleSet<Map> const& maps = p.maps(); |
+ int const map_count = static_cast<int>(maps.size()); |
Node** controls = temp_zone()->NewArray<Node*>(map_count); |
Node** effects = temp_zone()->NewArray<Node*>(map_count + 1); |
for (int i = 0; i < map_count; ++i) { |
- Node* map = node->InputAt(1 + i); |
+ Node* map = jsgraph()->HeapConstant(maps[i]); |
Node* check = graph()->NewNode(machine()->WordEqual(), value_map, map); |
if (i == map_count - 1) { |