Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(662)

Unified Diff: src/x87/codegen-x87.cc

Issue 395633010: X87: Use register parameters in ElementsTransitionGenerator (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/x87/ic-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | src/x87/ic-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698