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

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

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/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index 44d056fe135ab5dbc48396f820ea4b354567d9e5..f97b7fcf73e0f33c94983fab4d48ccea0d164f3e 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -3647,7 +3647,10 @@ void LCodeGen::DoPower(LPower* instr) {
ASSERT(ToDoubleRegister(instr->left()).is(xmm2));
ASSERT(ToDoubleRegister(instr->result()).is(xmm3));
- if (exponent_type.IsTagged()) {
+ if (exponent_type.IsSmi()) {
+ MathPowStub stub(MathPowStub::TAGGED);
+ __ CallStub(&stub);
+ } else if (exponent_type.IsTagged()) {
Label no_deopt;
__ JumpIfSmi(exponent, &no_deopt);
__ CmpObjectType(exponent, HEAP_NUMBER_TYPE, rcx);
@@ -4643,21 +4646,6 @@ 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()) {
- Condition cc = masm()->CheckSmi(input);
- if (load->hole_mode() == ALLOW_RETURN_HOLE) {
- Label done;
- __ j(cc, &done);
- __ xor_(input, input);
- __ bind(&done);
- } else {
- DeoptimizeIf(NegateCondition(cc), instr->environment());
- }
- } else {
- __ AssertSmi(input);
- }
} else {
__ AssertSmi(input);
}
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698