Index: src/x87/codegen-x87.cc |
diff --git a/src/x87/codegen-x87.cc b/src/x87/codegen-x87.cc |
index 334490a3cc3b349512976e2875d149427d6917a4..68e22486c5fdcce2165dacf250d316be296dc553 100644 |
--- a/src/x87/codegen-x87.cc |
+++ b/src/x87/codegen-x87.cc |
@@ -199,40 +199,47 @@ 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, |
EMIT_REMEMBERED_SET, |
OMIT_SMI_CHECK); |
} |
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) { |
@@ -342,14 +349,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) { |