Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 856106c799d5cb3bc187374db312687404a72517..5eeea39ac2bafe2d050b4746e3a820435f845e0b 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -452,6 +452,12 @@ void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { |
} |
+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; |
@@ -2033,6 +2039,27 @@ LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
} |
+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(), eax); |
+ LOperand* fixed_object_reg = FixedTemp(edx); |
+ LOperand* new_map_reg = FixedTemp(ebx); |
+ LTransitionElementsKind* result = |
+ new LTransitionElementsKind(object, new_map_reg, fixed_object_reg); |
+ return MarkAsCall(DefineFixed(result, eax), instr); |
+ } |
+} |
+ |
+ |
LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
bool needs_write_barrier = instr->NeedsWriteBarrier(); |