Reviewers: Michael Starzinger,
Message:
Please take a look. This fixes
http://build.chromium.org/p/client.v8/builders/V8%20GC%20Stress%20-%203/builds/9/steps/Check/logs/stdio
.
HMathMinMax only supports Integer32 or Double representation.
InferRepresentationFromInputs() does the right thing, but when a GC happens
at a
bad time, there can be generic/tagged uses which made
InferRepresentationFromUses() override that choice. It makes sense for
HMathMinMax to not look at use representations at all, which also solves
this
issue.
Description:
Make sure HMathMinMax always has a supported representation
Please review this at https://codereview.chromium.org/11467021/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/hydrogen-instructions.h
M src/hydrogen-instructions.cc
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index
d9590a946e28a21ae10120df6f243c03f901ac97..0e6ea00058f299ab0966d2e5055e1a70f6da9858
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<int32_t>(0xffffffff);
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index
300673428257d9fee2d14c36757884433f50b716..4e436deea72d6dd67f9160be23505c6e74504fd6
100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -3692,6 +3692,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();
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev