Revision: 21255
Author:   [email protected]
Date:     Mon May 12 08:43:18 2014 UTC
Log: Make escape analysis preserve all representations required by HCompareNumericAndBranch.

[email protected]
BUG=

Review URL: https://codereview.chromium.org/257803012
http://code.google.com/p/v8/source/detail?r=21255

Modified:
 /branches/bleeding_edge/src/hydrogen-escape-analysis.cc
/branches/bleeding_edge/test/mjsunit/regress/regress-escape-preserve-smi-representation.js

=======================================
--- /branches/bleeding_edge/src/hydrogen-escape-analysis.cc Mon May 5 06:53:19 2014 UTC +++ /branches/bleeding_edge/src/hydrogen-escape-analysis.cc Mon May 12 08:43:18 2014 UTC
@@ -144,7 +144,7 @@
     HLoadNamedField* load, HValue* load_value) {
   HValue* replacement = load_value;
   Representation representation = load->representation();
-  if (representation.IsSmi()) {
+  if (representation.IsSmiOrInteger32() || representation.IsDouble()) {
     Zone* zone = graph()->zone();
     HInstruction* new_instr =
         HForceRepresentation::New(zone, NULL, load_value, representation);
=======================================
--- /branches/bleeding_edge/test/mjsunit/regress/regress-escape-preserve-smi-representation.js Fri Apr 25 11:29:02 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/regress/regress-escape-preserve-smi-representation.js Mon May 12 08:43:18 2014 UTC
@@ -12,7 +12,7 @@
   if (objectClass === "RegExp") { return (a.toString() === b.toString()); }
   if (objectClass === "Function") return false;
   if (objectClass === "Array") {
-    var elementCount = 0;
+    var elementsCount = 0;
     if (a.length != b.length) { return false; }
     for (var i = 0; i < a.length; i++) {
       if (!deepEquals(a[i], b[i])) return false;
@@ -23,12 +23,11 @@


 function __f_1(){
- var __v_0 = [];
- for(var i=0; i<2; i++){
-   var __v_1=[];
-   __v_0.push([])
-   deepEquals(2, __v_0.length);
- }
+  var __v_0 = [];
+  for(var i=0; i<2; i++){
+    __v_0.push([])
+    deepEquals(2, __v_0.length);
+  }
 }
 __f_1();
 %OptimizeFunctionOnNextCall(__f_1);

--
--
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/d/optout.

Reply via email to