Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1367)

Unified Diff: src/hydrogen-instructions.h

Issue 16013003: Fix hole handling, and ensure smi representation is handled properly (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 43a5ad869eb30a780157e5689354b0a1734b5e93..038714622e96c64d60a341f65b0eccf19aa67abd 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -5465,7 +5465,9 @@ class HLoadKeyed
IsFastDoubleElementsKind(elements_kind));
if (IsFastSmiOrObjectElementsKind(elements_kind)) {
- if (IsFastSmiElementsKind(elements_kind)) {
+ if (IsFastSmiElementsKind(elements_kind) &&
+ (!IsHoleyElementsKind(elements_kind) ||
+ mode == NEVER_RETURN_HOLE)) {
set_type(HType::Smi());
set_representation(Representation::Smi());
} else {
@@ -5774,6 +5776,7 @@ class HStoreKeyed
virtual Representation RequiredInputRepresentation(int index) {
// kind_fast: tagged[int32] = tagged
// kind_double: tagged[int32] = double
+ // kind_smi : tagged[int32] = smi
// kind_external: external[int32] = (double | int32)
if (index == 0) {
return is_external() ? Representation::External()
@@ -5802,6 +5805,9 @@ class HStoreKeyed
virtual Representation observed_input_representation(int index) {
if (index < 2) return RequiredInputRepresentation(index);
+ if (IsFastSmiElementsKind(elements_kind())) {
+ return Representation::Smi();
+ }
if (IsDoubleOrFloatElementsKind(elements_kind())) {
return Representation::Double();
}
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698