| Index: src/ia32/lithium-ia32.cc
|
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
|
| index 3390aa6127275e35a96ed90452b6688f1331840f..2b1a0259d0e4532ee31a6b727799846022a80e13 100644
|
| --- a/src/ia32/lithium-ia32.cc
|
| +++ b/src/ia32/lithium-ia32.cc
|
| @@ -924,10 +924,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)));
|
| @@ -1290,10 +1292,9 @@ LInstruction* LChunkBuilder::DoMathFloor(HUnaryMathOperation* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoMathRound(HUnaryMathOperation* instr) {
|
| - LOperand* context = UseAny(instr->context());
|
| LOperand* input = UseRegister(instr->value());
|
| LOperand* temp = FixedTemp(xmm4);
|
| - LMathRound* result = new(zone()) LMathRound(context, input, temp);
|
| + LMathRound* result = new(zone()) LMathRound(input, temp);
|
| return AssignEnvironment(DefineAsRegister(result));
|
| }
|
|
|
| @@ -1355,10 +1356,9 @@ LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoMathPowHalf(HUnaryMathOperation* instr) {
|
| - LOperand* context = UseAny(instr->context());
|
| LOperand* input = UseRegisterAtStart(instr->value());
|
| LOperand* temp = TempRegister();
|
| - LMathPowHalf* result = new(zone()) LMathPowHalf(context, input, temp);
|
| + LMathPowHalf* result = new(zone()) LMathPowHalf(input, temp);
|
| return DefineSameAsFirst(result);
|
| }
|
|
|
| @@ -1873,6 +1873,13 @@ 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 = UseRegisterAtStart(instr->string());
|
| LOperand* index = UseRegisterOrConstantAtStart(instr->index());
|
| @@ -2109,12 +2116,10 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
|
| - LOperand* context = info()->IsStub()
|
| - ? UseFixed(instr->context(), esi)
|
| - : NULL;
|
| + LOperand* context = info()->IsStub() ? UseFixed(instr->context(), esi) : NULL;
|
| LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count());
|
| - return new(zone()) LReturn(UseFixed(instr->value(), eax), context,
|
| - parameter_count);
|
| + return new(zone()) LReturn(
|
| + UseFixed(instr->value(), eax), context, parameter_count);
|
| }
|
|
|
|
|
| @@ -2429,7 +2434,8 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
| !(FLAG_track_double_fields && instr->field_representation().IsDouble());
|
|
|
| LOperand* val;
|
| - if (instr->field_representation().IsByte()) {
|
| + if (instr->field_representation().IsInteger8() ||
|
| + instr->field_representation().IsUInteger8()) {
|
| // mov_b requires a byte register (i.e. any of eax, ebx, ecx, edx).
|
| // Just force the value to be in eax and we're safe here.
|
| val = UseFixed(instr->value(), eax);
|
| @@ -2479,8 +2485,12 @@ LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
|
|
|
| LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
|
| LOperand* context = UseFixed(instr->context(), esi);
|
| - LOperand* left = UseOrConstantAtStart(instr->left());
|
| - LOperand* right = UseOrConstantAtStart(instr->right());
|
| + LOperand* left = FLAG_new_string_add
|
| + ? UseFixed(instr->left(), edx)
|
| + : UseOrConstantAtStart(instr->left());
|
| + LOperand* right = FLAG_new_string_add
|
| + ? UseFixed(instr->right(), eax)
|
| + : UseOrConstantAtStart(instr->right());
|
| LStringAdd* string_add = new(zone()) LStringAdd(context, left, right);
|
| return MarkAsCall(DefineFixed(string_add, eax), instr);
|
| }
|
|
|