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

Unified Diff: src/mips/lithium-codegen-mips.cc

Issue 15690003: MIPS: Handle holes in smi-untag from LoadKeyed requiring hole handling. (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 | « no previous file | src/mips/lithium-mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
index ae0d6283f44c1a483964506e5644fbabccbf5ea8..49743fd5218bf86c78e825d67c2ccf1bf9064c38 100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -4610,6 +4610,22 @@ void LCodeGen::DoSmiUntag(LSmiUntag* instr) {
__ And(scratch, input, Operand(kHeapObjectTag));
__ SmiUntag(result, input);
DeoptimizeIf(ne, instr->environment(), scratch, Operand(zero_reg));
+ } else if (instr->hydrogen()->value()->IsLoadKeyed()) {
+ HLoadKeyed* load = HLoadKeyed::cast(instr->hydrogen()->value());
+ if (load->UsesMustHandleHole()) {
+ __ And(scratch, input, Operand(kHeapObjectTag));
+ __ SmiUntag(result, input);
+ if (load->hole_mode() == ALLOW_RETURN_HOLE) {
+ Label done;
+ __ Branch(&done, eq, scratch, Operand(zero_reg));
+ __ li(result, Operand(Smi::FromInt(0)));
+ __ bind(&done);
+ } else {
+ DeoptimizeIf(ne, instr->environment(), scratch, Operand(zero_reg));
+ }
+ } else {
+ __ SmiUntag(result, input);
+ }
} else {
__ SmiUntag(result, input);
}
« no previous file with comments | « no previous file | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698