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

Unified Diff: src/x64/lithium-x64.cc

Issue 15737003: Handle holes in smi-untag from LoadKeyed requiring hole handling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Respect hole-mode 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/x64/lithium-x64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-x64.cc
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
index 1217a4000df42e15b91295e3cdbbe80c76846609..cde4e861b188a250fd99bdd69943cea5f406e2a3 100644
--- a/src/x64/lithium-x64.cc
+++ b/src/x64/lithium-x64.cc
@@ -1825,7 +1825,16 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
ASSERT(to.IsInteger32());
LOperand* value = UseRegister(instr->value());
if (instr->value()->type().IsSmi()) {
- return DefineSameAsFirst(new(zone()) LSmiUntag(value, false));
+ LInstruction* result =
+ DefineSameAsFirst(new(zone()) LSmiUntag(value, false));
+ if (instr->value()->IsLoadKeyed()) {
+ HLoadKeyed* load_keyed = HLoadKeyed::cast(instr->value());
+ if (load_keyed->UsesMustHandleHole() &&
+ load_keyed->hole_mode() == NEVER_RETURN_HOLE) {
+ return AssignEnvironment(result);
+ }
+ }
+ return result;
} else {
bool truncating = instr->CanTruncateToInt32();
LOperand* xmm_temp = truncating ? NULL : FixedTemp(xmm1);
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698