From 71b2572547e62ed724ede3d8ffac124ca02fe84c Mon Sep 17 00:00:00 2001 From: "fschneider@chromium.org" Date: Mon, 4 Apr 2011 08:57:21 +0000 Subject: [PATCH] Remove redundant data member from HChange instructions. The target representation is already stored as part of HValue::representation(). Review URL: http://codereview.chromium.org/6794014 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/hydrogen-instructions.cc | 2 +- src/hydrogen-instructions.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc index 6b0c8e4..eec1237 100644 --- a/src/hydrogen-instructions.cc +++ b/src/hydrogen-instructions.cc @@ -726,7 +726,7 @@ void HTypeofIs::PrintDataTo(StringStream* stream) { void HChange::PrintDataTo(StringStream* stream) { HUnaryOperation::PrintDataTo(stream); - stream->Add(" %s to %s", from_.Mnemonic(), to_.Mnemonic()); + stream->Add(" %s to %s", from_.Mnemonic(), to().Mnemonic()); if (CanTruncateToInt32()) stream->Add(" truncating-int32"); if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index ddef8b7..fb45ee9 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -932,7 +932,7 @@ class HChange: public HUnaryOperation { Representation from, Representation to, bool is_truncating) - : HUnaryOperation(value), from_(from), to_(to) { + : HUnaryOperation(value), from_(from) { ASSERT(!from.IsNone() && !to.IsNone()); ASSERT(!from.Equals(to)); set_representation(to); @@ -947,7 +947,7 @@ class HChange: public HUnaryOperation { virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); Representation from() const { return from_; } - Representation to() const { return to_; } + Representation to() const { return representation(); } virtual Representation RequiredInputRepresentation(int index) const { return from_; } @@ -969,7 +969,6 @@ class HChange: public HUnaryOperation { private: Representation from_; - Representation to_; }; -- 2.7.4