Revert of Allow loading holes from holey smi arrays (patchset #2 id:20001 of https...
authorverwaest <verwaest@chromium.org>
Fri, 8 May 2015 07:28:55 +0000 (00:28 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 8 May 2015 07:28:57 +0000 (07:28 +0000)
Reason for revert:
Shouldn't unconditionally load holes since it tanks performance. I'll change it in a follow-up to only do it if the IC ever saw it happen.

Original issue's description:
> Allow loading holes from holey smi arrays
>
> BUG=
>
> Committed: https://crrev.com/eab5bb5390fab79d063f29398377c6d181963dde
> Cr-Commit-Position: refs/heads/master@{#28298}

TBR=mvstanton@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28309}

src/arm/lithium-codegen-arm.cc
src/arm64/lithium-codegen-arm64.cc
src/hydrogen.cc
src/ia32/lithium-codegen-ia32.cc
src/mips/lithium-codegen-mips.cc
src/mips64/lithium-codegen-mips64.cc
src/ppc/lithium-codegen-ppc.cc
src/x64/lithium-codegen-x64.cc
src/x87/lithium-codegen-x87.cc

index b9c7328..e91fddf 100644 (file)
@@ -3349,8 +3349,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) {
       DeoptimizeIf(eq, instr, Deoptimizer::kHole);
     }
   } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
-    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
-           instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
+    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
     Label done;
     __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
     __ cmp(result, scratch);
index e17570b..c2a2ff3 100644 (file)
@@ -3629,8 +3629,7 @@ void LCodeGen::DoLoadKeyedFixed(LLoadKeyedFixed* instr) {
                        Deoptimizer::kHole);
     }
   } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
-    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
-           instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
+    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
     Label done;
     __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
     __ B(ne, &done);
index 77890f6..2ac3d52 100644 (file)
@@ -7098,13 +7098,11 @@ LoadKeyedHoleMode HOptimizedGraphBuilder::BuildKeyedHoleMode(Handle<Map> map) {
   // Loads from a "stock" fast holey array can convert the hole to undefined
   // with impunity.
   LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE;
-  bool holey_smi_elements =
-      *map == isolate()->get_initial_js_array_map(FAST_HOLEY_SMI_ELEMENTS);
   bool holey_double_elements =
       *map == isolate()->get_initial_js_array_map(FAST_HOLEY_DOUBLE_ELEMENTS);
   bool holey_elements =
       *map == isolate()->get_initial_js_array_map(FAST_HOLEY_ELEMENTS);
-  if ((holey_smi_elements || holey_double_elements || holey_elements) &&
+  if ((holey_double_elements || holey_elements) &&
       isolate()->IsFastArrayConstructorPrototypeChainIntact()) {
     load_mode =
         holey_double_elements ? ALLOW_RETURN_HOLE : CONVERT_HOLE_TO_UNDEFINED;
index 4ff65fb..3f1bab7 100644 (file)
@@ -3186,8 +3186,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) {
       DeoptimizeIf(equal, instr, Deoptimizer::kHole);
     }
   } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
-    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
-           instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
+    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
     Label done;
     __ cmp(result, factory()->the_hole_value());
     __ j(not_equal, &done);
index 4378418..b173e30 100644 (file)
@@ -3286,8 +3286,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) {
       DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch));
     }
   } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
-    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
-           instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
+    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
     Label done;
     __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
     __ Branch(&done, ne, result, Operand(scratch));
index 0373312..223370f 100644 (file)
@@ -3335,8 +3335,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) {
       DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch));
     }
   } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
-    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
-           instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
+    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
     Label done;
     __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
     __ Branch(&done, ne, result, Operand(scratch));
index 443d8e7..2977da5 100644 (file)
@@ -3494,8 +3494,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) {
       DeoptimizeIf(eq, instr, Deoptimizer::kHole);
     }
   } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
-    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
-           instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
+    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
     Label done;
     __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
     __ cmp(result, scratch);
index e030826..eb8274b 100644 (file)
@@ -3264,8 +3264,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) {
       DeoptimizeIf(equal, instr, Deoptimizer::kHole);
     }
   } else if (hinstr->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
-    DCHECK(hinstr->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
-           hinstr->elements_kind() == FAST_HOLEY_ELEMENTS);
+    DCHECK(hinstr->elements_kind() == FAST_HOLEY_ELEMENTS);
     Label done;
     __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
     __ j(not_equal, &done);
index b5dc142..a81fd70 100644 (file)
@@ -3453,8 +3453,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) {
       DeoptimizeIf(equal, instr, Deoptimizer::kHole);
     }
   } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
-    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
-           instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
+    DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
     Label done;
     __ cmp(result, factory()->the_hole_value());
     __ j(not_equal, &done);