From: jkummerow@chromium.org Date: Mon, 10 Dec 2012 12:10:23 +0000 (+0000) Subject: Make sure HMathMinMax always has a supported representation X-Git-Tag: upstream/4.7.83~15464 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35cd58365d0b171ab2cf7c3b44feaea0fb52f4e5;p=platform%2Fupstream%2Fv8.git Make sure HMathMinMax always has a supported representation Review URL: https://codereview.chromium.org/11467021 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc index d9590a946..0e6ea0005 100644 --- a/src/hydrogen-instructions.cc +++ b/src/hydrogen-instructions.cc @@ -1689,6 +1689,14 @@ void HBinaryOperation::AssumeRepresentation(Representation r) { } +void HMathMinMax::InferRepresentation(HInferRepresentation* h_infer) { + ASSERT(CheckFlag(kFlexibleRepresentation)); + Representation new_rep = RepresentationFromInputs(); + UpdateRepresentation(new_rep, h_infer, "inputs"); + // Do not care about uses. +} + + Range* HBitwise::InferRange(Zone* zone) { if (op() == Token::BIT_XOR) return HValue::InferRange(zone); const int32_t kDefaultMask = static_cast(0xffffffff); diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index c6bf71d83..80685f077 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -3726,6 +3726,8 @@ class HMathMinMax: public HArithmeticBinaryOperation { return RequiredInputRepresentation(index); } + virtual void InferRepresentation(HInferRepresentation* h_infer); + virtual Representation RepresentationFromInputs() { Representation left_rep = left()->representation(); Representation right_rep = right()->representation();