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

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

Issue 21173004: Version 3.20.11.1 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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/mips/ic-mips.cc ('k') | 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 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(&not_applicable);
}
« no previous file with comments | « src/mips/ic-mips.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698