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

Unified Diff: src/x64/lithium-codegen-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: 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
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index 9a1ce9800993d683dc04ea27bee12b54b70c9168..ff2e2b16a5d8c67bc6e1d1e9394be5f65e320da7 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -4606,6 +4606,17 @@ void LCodeGen::DoSmiUntag(LSmiUntag* instr) {
if (instr->needs_check()) {
Condition is_smi = __ CheckSmi(input);
DeoptimizeIf(NegateCondition(is_smi), instr->environment());
+ } else if (instr->hydrogen()->value()->IsLoadKeyed()) {
+ HLoadKeyed* load = HLoadKeyed::cast(instr->hydrogen()->value());
+ if (load->UsesMustHandleHole()) {
+ Label done;
+ Condition cc = masm()->CheckSmi(input);
+ __ j(cc, &done);
+ __ xor_(input, input);
+ __ bind(&done);
+ } else {
+ __ AssertSmi(input);
+ }
} else {
__ AssertSmi(input);
}

Powered by Google App Engine
This is Rietveld 408576698