Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index 1cdca4c46efa14ac1cfb764d52fff9c641790749..8f9dd3f7db7c7d4343a93a697bc5ff1bed159166 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -618,6 +618,8 @@ class HValue : public ZoneObject { |
| // flag. |
| kUint32, |
| kHasNoObservableSideEffects, |
| + // Indicates an instruction shouldn't be replaced by optimization. |
|
mvstanton
2014/05/09 13:16:49
Or alternatively, instead of commenting the usage
danno
2014/05/09 15:51:25
Done.
|
| + kCantBeReplaced, |
| // Indicates the instruction is live during dead code elimination. |
| kIsLive, |
| @@ -6245,6 +6247,7 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { |
| virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| bool CanBeReplacedWith(HValue* other) const { |
| + if (!CheckFlag(HValue::kCantBeReplaced)) return false; |
| if (!type().Equals(other->type())) return false; |
| if (!representation().Equals(other->representation())) return false; |
| if (!other->IsLoadNamedField()) return true; |
| @@ -6308,7 +6311,9 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { |
| HObjectAccess access, |
| const UniqueSet<Map>* maps, |
| HType type) |
| - : HTemplateInstruction<2>(type), access_(access), maps_(maps) { |
| + : HTemplateInstruction<2>(type), |
| + access_(access), |
| + maps_(maps) { |
| ASSERT_NOT_NULL(maps); |
| ASSERT_NE(0, maps->size()); |