| Index: src/mips/lithium-mips.cc
|
| diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc
|
| index fb94bc3bdf24a7639d241603207ba2a5fdf1a5ca..70dd60d6560cdb6a6938ff709130a72c0c00c101 100644
|
| --- a/src/mips/lithium-mips.cc
|
| +++ b/src/mips/lithium-mips.cc
|
| @@ -868,10 +868,12 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
|
|
|
| LInstruction* instr = NULL;
|
| if (current->CanReplaceWithDummyUses()) {
|
| - HValue* first_operand = current->OperandCount() == 0
|
| - ? graph()->GetConstant1()
|
| - : current->OperandAt(0);
|
| - instr = DefineAsRegister(new(zone()) LDummyUse(UseAny(first_operand)));
|
| + if (current->OperandCount() == 0) {
|
| + instr = DefineAsRegister(new(zone()) LDummy());
|
| + } else {
|
| + instr = DefineAsRegister(new(zone())
|
| + LDummyUse(UseAny(current->OperandAt(0))));
|
| + }
|
| for (int i = 1; i < current->OperandCount(); ++i) {
|
| LInstruction* dummy =
|
| new(zone()) LDummyUse(UseAny(current->OperandAt(i)));
|
| @@ -1701,6 +1703,16 @@ LInstruction* LChunkBuilder::DoCompareHoleAndBranch(
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch(
|
| + HCompareMinusZeroAndBranch* instr) {
|
| + LInstruction* goto_instr = CheckElideControlInstruction(instr);
|
| + if (goto_instr != NULL) return goto_instr;
|
| + LOperand* value = UseRegister(instr->value());
|
| + LOperand* scratch = TempRegister();
|
| + return new(zone()) LCompareMinusZeroAndBranch(value, scratch);
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) {
|
| ASSERT(instr->value()->representation().IsTagged());
|
| LOperand* temp = TempRegister();
|
| @@ -1804,11 +1816,18 @@ LInstruction* LChunkBuilder::DoDateField(HDateField* instr) {
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) {
|
| + LOperand* string = UseRegisterAtStart(instr->string());
|
| + LOperand* index = UseRegisterOrConstantAtStart(instr->index());
|
| + return DefineAsRegister(new(zone()) LSeqStringGetChar(string, index));
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoSeqStringSetChar(HSeqStringSetChar* instr) {
|
| LOperand* string = UseRegister(instr->string());
|
| LOperand* index = UseRegisterOrConstant(instr->index());
|
| LOperand* value = UseRegister(instr->value());
|
| - return new(zone()) LSeqStringSetChar(instr->encoding(), string, index, value);
|
| + return new(zone()) LSeqStringSetChar(string, index, value);
|
| }
|
|
|
|
|
| @@ -1934,8 +1953,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
| } else if (to.IsSmi()) {
|
| HValue* val = instr->value();
|
| LOperand* value = UseRegister(val);
|
| - LInstruction* result =
|
| - DefineSameAsFirst(new(zone()) LInteger32ToSmi(value));
|
| + LInstruction* result = val->CheckFlag(HInstruction::kUint32)
|
| + ? DefineSameAsFirst(new(zone()) LUint32ToSmi(value))
|
| + : DefineSameAsFirst(new(zone()) LInteger32ToSmi(value));
|
| if (val->HasRange() && val->range()->IsInSmiRange()) {
|
| return result;
|
| }
|
| @@ -2325,8 +2345,12 @@ LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
|
|
|
| LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| - LOperand* left = UseRegisterAtStart(instr->left());
|
| - LOperand* right = UseRegisterAtStart(instr->right());
|
| + LOperand* left = FLAG_new_string_add
|
| + ? UseFixed(instr->left(), a1)
|
| + : UseRegisterAtStart(instr->left());
|
| + LOperand* right = FLAG_new_string_add
|
| + ? UseFixed(instr->right(), a0)
|
| + : UseRegisterAtStart(instr->right());
|
| return MarkAsCall(
|
| DefineFixed(new(zone()) LStringAdd(context, left, right), v0),
|
| instr);
|
|
|