| Index: src/ia32/lithium-ia32.cc
|
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
|
| index 29b42fe0ffc7d1377e9d616fff8e7b8b2ab2275d..5343773daff5c6cf7b43ed5ca1ebfd5d26a007df 100644
|
| --- a/src/ia32/lithium-ia32.cc
|
| +++ b/src/ia32/lithium-ia32.cc
|
| @@ -1410,8 +1410,10 @@ LInstruction* LChunkBuilder::DoCallNewArray(HCallNewArray* instr) {
|
| LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) {
|
| LOperand* context = UseFixed(instr->context(), esi);
|
| LOperand* function = UseFixed(instr->function(), edi);
|
| - LCallFunction* result = new(zone()) LCallFunction(context, function);
|
| - return MarkAsCall(DefineFixed(result, eax), instr);
|
| + LCallFunction* call = new(zone()) LCallFunction(context, function);
|
| + LInstruction* result = DefineFixed(call, eax);
|
| + if (instr->IsTailCall()) return result;
|
| + return MarkAsCall(result, instr);
|
| }
|
|
|
|
|
| @@ -1556,10 +1558,6 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
|
| instr->CheckFlag(HValue::kBailoutOnMinusZero))
|
| ? AssignEnvironment(result)
|
| : result;
|
| - } else if (instr->fixed_right_arg().has_value) {
|
| - LModI* mod = new(zone()) LModI(UseRegister(left),
|
| - UseRegisterAtStart(right),
|
| - NULL);
|
| return AssignEnvironment(DefineSameAsFirst(mod));
|
| } else {
|
| // The temporary operand is necessary to ensure that right is not
|
| @@ -1697,19 +1695,6 @@ LInstruction* LChunkBuilder::DoPower(HPower* instr) {
|
| }
|
|
|
|
|
| -LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
|
| - ASSERT(instr->representation().IsDouble());
|
| - ASSERT(instr->global_object()->representation().IsTagged());
|
| - LOperand* global_object = UseTempRegister(instr->global_object());
|
| - LOperand* scratch = TempRegister();
|
| - LOperand* scratch2 = TempRegister();
|
| - LOperand* scratch3 = TempRegister();
|
| - LRandom* result = new(zone()) LRandom(
|
| - global_object, scratch, scratch2, scratch3);
|
| - return DefineFixedDouble(result, xmm1);
|
| -}
|
| -
|
| -
|
| LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
|
| ASSERT(instr->left()->representation().IsSmiOrTagged());
|
| ASSERT(instr->right()->representation().IsSmiOrTagged());
|
| @@ -1890,13 +1875,36 @@ LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) {
|
| }
|
|
|
|
|
| +LOperand* LChunkBuilder::GetSeqStringSetCharOperand(HSeqStringSetChar* instr) {
|
| + if (instr->encoding() == String::ONE_BYTE_ENCODING) {
|
| + if (FLAG_debug_code) {
|
| + return UseFixed(instr->value(), eax);
|
| + } else {
|
| + return UseFixedOrConstant(instr->value(), eax);
|
| + }
|
| + } else {
|
| + if (FLAG_debug_code) {
|
| + return UseRegisterAtStart(instr->value());
|
| + } else {
|
| + return UseRegisterOrConstantAtStart(instr->value());
|
| + }
|
| + }
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoSeqStringSetChar(HSeqStringSetChar* instr) {
|
| LOperand* string = UseRegisterAtStart(instr->string());
|
| - LOperand* index = UseRegisterOrConstantAtStart(instr->index());
|
| - LOperand* value = (instr->encoding() == String::ONE_BYTE_ENCODING)
|
| - ? UseFixedOrConstant(instr->value(), eax)
|
| - : UseRegisterOrConstantAtStart(instr->value());
|
| - return new(zone()) LSeqStringSetChar(string, index, value);
|
| + LOperand* index = FLAG_debug_code
|
| + ? UseRegisterAtStart(instr->index())
|
| + : UseRegisterOrConstantAtStart(instr->index());
|
| + LOperand* value = GetSeqStringSetCharOperand(instr);
|
| + LOperand* context = FLAG_debug_code ? UseFixed(instr->context(), esi) : NULL;
|
| + LInstruction* result = new(zone()) LSeqStringSetChar(context, string,
|
| + index, value);
|
| + if (FLAG_debug_code) {
|
| + result = MarkAsCall(result, instr);
|
| + }
|
| + return result;
|
| }
|
|
|
|
|
| @@ -2654,6 +2662,8 @@ LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoTypeofIsAndBranch(HTypeofIsAndBranch* instr) {
|
| + LInstruction* goto_instr = CheckElideControlInstruction(instr);
|
| + if (goto_instr != NULL) return goto_instr;
|
| return new(zone()) LTypeofIsAndBranch(UseTempRegister(instr->value()));
|
| }
|
|
|
|
|