Index: src/ia32/codegen-ia32.cc |
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc |
index cb2fa26a018c6d9d400dd176d0c1c97ad20ebe45..7dc37689a0bb3e204f0e78339e85a83adb90ad35 100644 |
--- a/src/ia32/codegen-ia32.cc |
+++ b/src/ia32/codegen-ia32.cc |
@@ -390,7 +390,8 @@ OS::MemCopyFunction CreateMemCopyFunction() { |
void ElementsTransitionGenerator::GenerateMapChangeElementsTransition( |
- MacroAssembler* masm) { |
+ MacroAssembler* masm, AllocationSiteMode mode, |
+ Label* allocation_site_info_found) { |
// ----------- S t a t e ------------- |
// -- eax : value |
// -- ebx : target map |
@@ -398,6 +399,12 @@ void ElementsTransitionGenerator::GenerateMapChangeElementsTransition( |
// -- edx : receiver |
// -- esp[0] : return address |
// ----------------------------------- |
+ if (mode == TRACK_ALLOCATION_SITE) { |
+ ASSERT(allocation_site_info_found != NULL); |
+ masm->TestJSArrayForAllocationSiteInfo(edx, edi, |
+ allocation_site_info_found); |
+ } |
+ |
// Set transitioned map. |
__ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); |
__ RecordWriteField(edx, |
@@ -411,7 +418,7 @@ void ElementsTransitionGenerator::GenerateMapChangeElementsTransition( |
void ElementsTransitionGenerator::GenerateSmiToDouble( |
- MacroAssembler* masm, Label* fail) { |
+ MacroAssembler* masm, AllocationSiteMode mode, Label* fail) { |
// ----------- S t a t e ------------- |
// -- eax : value |
// -- ebx : target map |
@@ -421,7 +428,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( |
// ----------------------------------- |
Label loop, entry, convert_hole, gc_required, only_change_map; |
- if (FLAG_track_allocation_sites) { |
+ if (mode == TRACK_ALLOCATION_SITE) { |
masm->TestJSArrayForAllocationSiteInfo(edx, edi, fail); |
} |
@@ -550,7 +557,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble( |
void ElementsTransitionGenerator::GenerateDoubleToObject( |
- MacroAssembler* masm, Label* fail) { |
+ MacroAssembler* masm, AllocationSiteMode mode, Label* fail) { |
// ----------- S t a t e ------------- |
// -- eax : value |
// -- ebx : target map |
@@ -560,6 +567,10 @@ void ElementsTransitionGenerator::GenerateDoubleToObject( |
// ----------------------------------- |
Label loop, entry, convert_hole, gc_required, only_change_map, success; |
+ if (mode == TRACK_ALLOCATION_SITE) { |
+ masm->TestJSArrayForAllocationSiteInfo(edx, edi, fail); |
+ } |
+ |
// Check for empty arrays, which only require a map transition and no changes |
// to the backing store. |
__ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); |