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

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

Issue 15821007: MIPS: 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 | « 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 db216ddbeeac0db1c821ed3b534a580109b3d05e..01550ddf4f8eba5b27d3d375a7b48c0f98795681 100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -3644,7 +3644,10 @@ void LCodeGen::DoPower(LPower* instr) {
ASSERT(ToDoubleRegister(instr->left()).is(f2));
ASSERT(ToDoubleRegister(instr->result()).is(f0));
- if (exponent_type.IsTagged()) {
+ if (exponent_type.IsSmi()) {
+ MathPowStub stub(MathPowStub::TAGGED);
+ __ CallStub(&stub);
+ } else if (exponent_type.IsTagged()) {
Label no_deopt;
__ JumpIfSmi(a2, &no_deopt);
__ lw(t3, FieldMemOperand(a2, HeapObject::kMapOffset));
@@ -4648,22 +4651,6 @@ 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