Make escape analysis preserve all representations required by HCompareNumericAndBranch.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/257803012

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jarin@chromium.org 2014-05-12 08:43:18 +00:00
parent 38754b4e12
commit cbf8c3f460
2 changed files with 7 additions and 8 deletions

View File

@ -144,7 +144,7 @@ HValue* HEscapeAnalysisPhase::NewLoadReplacement(
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);

View File

@ -12,7 +12,7 @@ function deepEquals(a, b) {
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 deepEquals(a, b) {
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);