Chromium Code Reviews| Index: src/compiler/js-builtin-reducer.cc |
| diff --git a/src/compiler/js-builtin-reducer.cc b/src/compiler/js-builtin-reducer.cc |
| index bf72ca47302545484b5bef10b88627210a6daa63..83bfad6f07400b3a994660e17ba12344e43e5df5 100644 |
| --- a/src/compiler/js-builtin-reducer.cc |
| +++ b/src/compiler/js-builtin-reducer.cc |
| @@ -911,27 +911,14 @@ bool HasInstanceTypeWitness(Node* receiver, Node* effect, |
| } |
| return true; |
| } |
| - switch (dominator->opcode()) { |
| - case IrOpcode::kStoreField: { |
| - FieldAccess const& access = FieldAccessOf(dominator->op()); |
| - if (access.base_is_tagged == kTaggedBase && |
| - access.offset == HeapObject::kMapOffset) { |
| - return false; |
| - } |
| - break; |
| - } |
| - case IrOpcode::kStoreElement: |
| - case IrOpcode::kStoreTypedElement: |
| - break; |
| - default: { |
| - DCHECK_EQ(1, dominator->op()->EffectOutputCount()); |
| - if (dominator->op()->EffectInputCount() != 1 || |
| - !dominator->op()->HasProperty(Operator::kNoWrite)) { |
| - // Didn't find any appropriate CheckMaps node. |
| - return false; |
| - } |
| - break; |
| - } |
| + // The instance type doesn't change, so we don't need to pay |
| + // attention to potentially side-effecting nodes here. Strings |
| + // are an exception here, but we don't use this function then. |
| + DCHECK_LE(FIRST_NONSTRING_TYPE, instance_type); |
|
Michael Starzinger
2017/01/26 13:09:49
nit: I think it also doesn't hold for {FIXED_ARRAY
Benedikt Meurer
2017/01/26 13:16:20
Done.
|
| + DCHECK_EQ(1, dominator->op()->EffectOutputCount()); |
| + if (dominator->op()->EffectInputCount() != 1) { |
| + // Didn't find any appropriate CheckMaps node. |
| + return false; |
| } |
| dominator = NodeProperties::GetEffectInput(dominator); |
| } |