| Index: src/x64/lithium-x64.cc
|
| ===================================================================
|
| --- src/x64/lithium-x64.cc (revision 9808)
|
| +++ src/x64/lithium-x64.cc (working copy)
|
| @@ -447,6 +447,12 @@
|
| }
|
|
|
|
|
| +void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
|
| + object()->PrintTo(stream);
|
| + stream->Add(" %p -> %p", *original_map(), *transitioned_map());
|
| +}
|
| +
|
| +
|
| void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) {
|
| LInstructionGap* gap = new LInstructionGap(block);
|
| int index = -1;
|
| @@ -1396,12 +1402,10 @@
|
|
|
|
|
| LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
|
| - Token::Value op = instr->token();
|
| ASSERT(instr->left()->representation().IsTagged());
|
| ASSERT(instr->right()->representation().IsTagged());
|
| - bool reversed = (op == Token::GT || op == Token::LTE);
|
| - LOperand* left = UseFixed(instr->left(), reversed ? rax : rdx);
|
| - LOperand* right = UseFixed(instr->right(), reversed ? rdx : rax);
|
| + LOperand* left = UseFixed(instr->left(), rdx);
|
| + LOperand* right = UseFixed(instr->right(), rax);
|
| LCmpT* result = new LCmpT(left, right);
|
| return MarkAsCall(DefineFixed(result, rax), instr);
|
| }
|
| @@ -1413,15 +1417,22 @@
|
| if (r.IsInteger32()) {
|
| ASSERT(instr->left()->representation().IsInteger32());
|
| ASSERT(instr->right()->representation().IsInteger32());
|
| - LOperand* left = UseRegisterAtStart(instr->left());
|
| + LOperand* left = UseRegisterOrConstantAtStart(instr->left());
|
| LOperand* right = UseOrConstantAtStart(instr->right());
|
| return new LCmpIDAndBranch(left, right);
|
| } else {
|
| ASSERT(r.IsDouble());
|
| ASSERT(instr->left()->representation().IsDouble());
|
| ASSERT(instr->right()->representation().IsDouble());
|
| - LOperand* left = UseRegisterAtStart(instr->left());
|
| - LOperand* right = UseRegisterAtStart(instr->right());
|
| + LOperand* left;
|
| + LOperand* right;
|
| + if (instr->left()->IsConstant() && instr->right()->IsConstant()) {
|
| + left = UseRegisterOrConstantAtStart(instr->left());
|
| + right = UseRegisterOrConstantAtStart(instr->right());
|
| + } else {
|
| + left = UseRegisterAtStart(instr->left());
|
| + right = UseRegisterAtStart(instr->right());
|
| + }
|
| return new LCmpIDAndBranch(left, right);
|
| }
|
| }
|
| @@ -1956,6 +1967,27 @@
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
| + HTransitionElementsKind* instr) {
|
| + if (instr->original_map()->elements_kind() == FAST_SMI_ONLY_ELEMENTS &&
|
| + instr->transitioned_map()->elements_kind() == FAST_ELEMENTS) {
|
| + LOperand* object = UseRegister(instr->object());
|
| + LOperand* new_map_reg = TempRegister();
|
| + LOperand* temp_reg = TempRegister();
|
| + LTransitionElementsKind* result =
|
| + new LTransitionElementsKind(object, new_map_reg, temp_reg);
|
| + return DefineSameAsFirst(result);
|
| + } else {
|
| + LOperand* object = UseFixed(instr->object(), rax);
|
| + LOperand* fixed_object_reg = FixedTemp(rdx);
|
| + LOperand* new_map_reg = FixedTemp(rbx);
|
| + LTransitionElementsKind* result =
|
| + new LTransitionElementsKind(object, new_map_reg, fixed_object_reg);
|
| + return MarkAsCall(DefineFixed(result, rax), instr);
|
| + }
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
| bool needs_write_barrier = instr->NeedsWriteBarrier();
|
|
|
|
|