Index: src/ia32/codegen-ia32.cc |
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc |
index 1484b0f95a376a2be889a2952d50f3422697098c..14d7645647bc1ce997fd4588e8f37c08638e8ae8 100644 |
--- a/src/ia32/codegen-ia32.cc |
+++ b/src/ia32/codegen-ia32.cc |
@@ -522,26 +522,28 @@ MemMoveFunction CreateMemMoveFunction() { |
void ElementsTransitionGenerator::GenerateMapChangeElementsTransition( |
- MacroAssembler* masm, AllocationSiteMode mode, |
+ MacroAssembler* masm, |
+ Register receiver, |
+ Register key, |
+ Register value, |
+ Register target_map, |
+ AllocationSiteMode mode, |
Label* allocation_memento_found) { |
- // ----------- S t a t e ------------- |
- // -- eax : value |
- // -- ebx : target map |
- // -- ecx : key |
- // -- edx : receiver |
- // -- esp[0] : return address |
- // ----------------------------------- |
+ Register scratch = edi; |
+ ASSERT(!AreAliased(receiver, key, value, target_map, scratch)); |
+ |
if (mode == TRACK_ALLOCATION_SITE) { |
ASSERT(allocation_memento_found != NULL); |
- __ JumpIfJSArrayHasAllocationMemento(edx, edi, allocation_memento_found); |
+ __ JumpIfJSArrayHasAllocationMemento( |
+ receiver, scratch, allocation_memento_found); |
} |
// Set transitioned map. |
- __ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); |
- __ RecordWriteField(edx, |
+ __ mov(FieldOperand(receiver, HeapObject::kMapOffset), target_map); |
+ __ RecordWriteField(receiver, |
HeapObject::kMapOffset, |
- ebx, |
- edi, |
+ target_map, |
+ scratch, |
kDontSaveFPRegs, |
EMIT_REMEMBERED_SET, |
OMIT_SMI_CHECK); |
@@ -549,14 +551,19 @@ void ElementsTransitionGenerator::GenerateMapChangeElementsTransition( |
void ElementsTransitionGenerator::GenerateSmiToDouble( |
- MacroAssembler* masm, AllocationSiteMode mode, Label* fail) { |
- // ----------- S t a t e ------------- |
- // -- eax : value |
- // -- ebx : target map |
- // -- ecx : key |
- // -- edx : receiver |
- // -- esp[0] : return address |
- // ----------------------------------- |
+ MacroAssembler* masm, |
+ Register receiver, |
+ Register key, |
+ Register value, |
+ Register target_map, |
+ AllocationSiteMode mode, |
+ Label* fail) { |
+ // Return address is on the stack. |
+ ASSERT(receiver.is(edx)); |
+ ASSERT(key.is(ecx)); |
+ ASSERT(value.is(eax)); |
+ ASSERT(target_map.is(ebx)); |
+ |
Label loop, entry, convert_hole, gc_required, only_change_map; |
if (mode == TRACK_ALLOCATION_SITE) { |
@@ -670,14 +677,19 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( |
void ElementsTransitionGenerator::GenerateDoubleToObject( |
- MacroAssembler* masm, AllocationSiteMode mode, Label* fail) { |
- // ----------- S t a t e ------------- |
- // -- eax : value |
- // -- ebx : target map |
- // -- ecx : key |
- // -- edx : receiver |
- // -- esp[0] : return address |
- // ----------------------------------- |
+ MacroAssembler* masm, |
+ Register receiver, |
+ Register key, |
+ Register value, |
+ Register target_map, |
+ AllocationSiteMode mode, |
+ Label* fail) { |
+ // Return address is on the stack. |
+ ASSERT(receiver.is(edx)); |
+ ASSERT(key.is(ecx)); |
+ ASSERT(value.is(eax)); |
+ ASSERT(target_map.is(ebx)); |
+ |
Label loop, entry, convert_hole, gc_required, only_change_map, success; |
if (mode == TRACK_ALLOCATION_SITE) { |