Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index 8db5f00fbffc9ad801d389ec6e2c32c8cf958051..5cf1d59e490840a6d12f1fee2dc324b882b32475 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -407,9 +407,6 @@ Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { |
if (r.IsInteger32()) { |
ASSERT(literal->IsNumber()); |
__ li(scratch, Operand(static_cast<int32_t>(literal->Number()))); |
- } else if (r.IsSmi()) { |
- ASSERT(constant->HasSmiValue()); |
- __ li(scratch, Operand(Smi::FromInt(constant->Integer32Value()))); |
} else if (r.IsDouble()) { |
Abort("EmitLoadRegister: Unsupported double immediate."); |
} else { |
@@ -1524,7 +1521,6 @@ void LCodeGen::DoShiftI(LShiftI* instr) { |
LOperand* right_op = instr->right(); |
Register left = ToRegister(instr->left()); |
Register result = ToRegister(instr->result()); |
- Register scratch = scratch0(); |
if (right_op->IsRegister()) { |
// No need to mask the right operand on MIPS, it is built into the variable |
@@ -1581,14 +1577,7 @@ void LCodeGen::DoShiftI(LShiftI* instr) { |
break; |
case Token::SHL: |
if (shift_count != 0) { |
- if (instr->hydrogen_value()->representation().IsSmi() && |
- instr->can_deopt()) { |
- __ sll(result, left, shift_count - 1); |
- __ SmiTagCheckOverflow(result, result, scratch); |
- DeoptimizeIf(lt, instr->environment(), scratch, Operand(zero_reg)); |
- } else { |
- __ sll(result, left, shift_count); |
- } |
+ __ sll(result, left, shift_count); |
} else { |
__ Move(result, left); |
} |
@@ -1658,11 +1647,6 @@ void LCodeGen::DoConstantD(LConstantD* instr) { |
} |
-void LCodeGen::DoConstantE(LConstantE* instr) { |
- __ li(ToRegister(instr->result()), Operand(instr->value())); |
-} |
- |
- |
void LCodeGen::DoConstantT(LConstantT* instr) { |
Handle<Object> value = instr->value(); |
AllowDeferredHandleDereference smi_check; |
@@ -2883,13 +2867,6 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
HObjectAccess access = instr->hydrogen()->access(); |
int offset = access.offset(); |
Register object = ToRegister(instr->object()); |
- |
- if (access.IsExternalMemory()) { |
- Register result = ToRegister(instr->result()); |
- __ lw(result, MemOperand(object, offset)); |
- return; |
- } |
- |
if (instr->hydrogen()->representation().IsDouble()) { |
DoubleRegister result = ToDoubleRegister(instr->result()); |
__ ldc1(result, FieldMemOperand(object, offset)); |
@@ -4127,12 +4104,6 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
HObjectAccess access = instr->hydrogen()->access(); |
int offset = access.offset(); |
- if (access.IsExternalMemory()) { |
- Register value = ToRegister(instr->value()); |
- __ sw(value, MemOperand(object, offset)); |
- return; |
- } |
- |
Handle<Map> transition = instr->transition(); |
if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
@@ -4473,7 +4444,7 @@ void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { |
// Write barrier. |
__ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, |
scratch, GetRAState(), kDontSaveFPRegs); |
- } else { |
+ } else if (FLAG_compiled_transitions) { |
PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
__ mov(a0, object_reg); |
__ li(a1, Operand(to_map)); |
@@ -4481,6 +4452,28 @@ void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { |
__ CallStub(&stub); |
RecordSafepointWithRegisters( |
instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); |
+ } else if (IsFastSmiElementsKind(from_kind) && |
+ IsFastDoubleElementsKind(to_kind)) { |
+ Register fixed_object_reg = ToRegister(instr->temp()); |
+ ASSERT(fixed_object_reg.is(a2)); |
+ Register new_map_reg = ToRegister(instr->new_map_temp()); |
+ ASSERT(new_map_reg.is(a3)); |
+ __ li(new_map_reg, Operand(to_map)); |
+ __ mov(fixed_object_reg, object_reg); |
+ CallCode(isolate()->builtins()->TransitionElementsSmiToDouble(), |
+ RelocInfo::CODE_TARGET, instr); |
+ } else if (IsFastDoubleElementsKind(from_kind) && |
+ IsFastObjectElementsKind(to_kind)) { |
+ Register fixed_object_reg = ToRegister(instr->temp()); |
+ ASSERT(fixed_object_reg.is(a2)); |
+ Register new_map_reg = ToRegister(instr->new_map_temp()); |
+ ASSERT(new_map_reg.is(a3)); |
+ __ li(new_map_reg, Operand(to_map)); |
+ __ mov(fixed_object_reg, object_reg); |
+ CallCode(isolate()->builtins()->TransitionElementsDoubleToObject(), |
+ RelocInfo::CODE_TARGET, instr); |
+ } else { |
+ UNREACHABLE(); |
} |
__ bind(¬_applicable); |
} |