| Index: src/arm/lithium-arm.cc
|
| diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
|
| index 3fb07bc2c1207b0d912c7784a673d9162c57bda5..787fc81aa881eaa26685e76c4627f30bd2e9c12a 100644
|
| --- a/src/arm/lithium-arm.cc
|
| +++ b/src/arm/lithium-arm.cc
|
| @@ -863,10 +863,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)));
|
| @@ -1781,6 +1783,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* value = UseRegisterAtStart(instr->value());
|
| @@ -1884,11 +1896,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);
|
| }
|
|
|
|
|
| @@ -2014,8 +2033,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;
|
| }
|
| @@ -2403,8 +2423,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(), r1)
|
| + : UseRegisterAtStart(instr->left());
|
| + LOperand* right = FLAG_new_string_add
|
| + ? UseFixed(instr->right(), r0)
|
| + : UseRegisterAtStart(instr->right());
|
| return MarkAsCall(
|
| DefineFixed(new(zone()) LStringAdd(context, left, right), r0),
|
| instr);
|
| @@ -2475,7 +2499,7 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
|
| CodeStubInterfaceDescriptor* descriptor =
|
| info()->code_stub()->GetInterfaceDescriptor(info()->isolate());
|
| int index = static_cast<int>(instr->index());
|
| - Register reg = DESCRIPTOR_GET_PARAMETER_REGISTER(descriptor, index);
|
| + Register reg = descriptor->GetParameterRegister(index);
|
| return DefineFixed(result, reg);
|
| }
|
| }
|
|
|