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

Unified Diff: src/ia32/lithium-codegen-ia32.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/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
index 3e237638d78e7481d43e14973bb251fd396a5a83..3d0457431c218c79f2f585b0c3df4c29928c5f84 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -3934,7 +3934,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(eax, &no_deopt);
__ CmpObjectType(eax, HEAP_NUMBER_TYPE, ecx);
@@ -5057,21 +5060,6 @@ void LCodeGen::DoSmiUntag(LSmiUntag* instr) {
if (instr->needs_check()) {
__ test(result, Immediate(kSmiTagMask));
DeoptimizeIf(not_zero, instr->environment());
- } else if (instr->hydrogen()->value()->IsLoadKeyed()) {
- HLoadKeyed* load = HLoadKeyed::cast(instr->hydrogen()->value());
- if (load->UsesMustHandleHole()) {
- __ test(result, Immediate(kSmiTagMask));
- if (load->hole_mode() == ALLOW_RETURN_HOLE) {
- Label done;
- __ j(equal, &done);
- __ xor_(result, result);
- __ bind(&done);
- } else {
- DeoptimizeIf(not_zero, instr->environment());
- }
- } else {
- __ AssertSmi(result);
- }
} else {
__ AssertSmi(result);
}
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698