Revision: 14852
Author: [email protected]
Date: Tue May 28 06:28:59 2013
Log: Only allow non-double if the observed representations are int32.
[email protected]
Review URL: https://chromiumcodereview.appspot.com/15988005
http://code.google.com/p/v8/source/detail?r=14852
Modified:
/branches/bleeding_edge/src/hydrogen-instructions.cc
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Tue May 28
02:24:39 2013
+++ /branches/bleeding_edge/src/hydrogen-instructions.cc Tue May 28
06:28:59 2013
@@ -2460,10 +2460,12 @@
Representation observed_right = observed_input_representation(1);
Representation rep = Representation::Smi();
- if (!left_rep.IsTagged()) rep = rep.generalize(left_rep);
- if (!right_rep.IsTagged()) rep = rep.generalize(right_rep);
- if (!observed_left.IsTagged()) rep = rep.generalize(observed_left);
- if (!observed_right.IsTagged()) rep = rep.generalize(observed_right);
+ if (observed_left.IsInteger32() && observed_right.IsInteger32()) {
+ if (!left_rep.IsTagged()) rep = rep.generalize(left_rep);
+ if (!right_rep.IsTagged()) rep = rep.generalize(right_rep);
+ } else {
+ rep = Representation::Double();
+ }
if (rep.IsDouble()) {
// According to the ES5 spec (11.9.3, 11.8.5), Equality comparisons
(==, ===
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.