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

Unified Diff: src/ia32/macro-assembler-ia32.cc

Issue 11663005: Adapt Danno's Track Allocation Info idea to fast literals. When allocating a literal array, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ported to other platforms Created 7 years, 12 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
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index 7b41defabfecd86fbf47cfe8206e59f099f40591..90e357c78a6fd78260da76fe1b503be80b7bc0b8 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -3051,6 +3051,39 @@ void MacroAssembler::CheckEnumCache(Label* call_runtime) {
j(not_equal, &next);
}
+
+void MacroAssembler::PerformAllocationSiteInfoCheck(
+ Label* allocation_info_present) {
+ Label no_info_available;
+ // ----------- S t a t e -------------
+ // -- edx : receiver
+ // edi is clobbered.
+ // -----------------------------------
+ ExternalReference new_space_start =
+ ExternalReference::new_space_start(isolate());
+ ExternalReference new_space_allocation_top =
+ ExternalReference::new_space_allocation_top_address(isolate());
+
+ lea(edi, Operand(edx, JSArray::kSize + AllocationSiteInfo::kSize));
+ cmp(edi, Immediate(new_space_start));
+ j(less, &no_info_available);
+ cmp(edi, Operand::StaticVariable(new_space_allocation_top));
+ j(greater_equal, &no_info_available);
+ cmp(MemOperand(edi, 0),
+ Immediate(Handle<Map>(isolate()->heap()->
+ allocation_site_info_map())));
+
+ // Use the j/jmp sequence below for debugging, but the j(equal) sequence
+ // for production.
+ // j(not_equal, &no_info_available);
+ // int3();
+ // jmp(allocation_info_present);
+ // or
+ j(equal, allocation_info_present);
+ bind(&no_info_available);
+}
+
+
} } // namespace v8::internal
#endif // V8_TARGET_ARCH_IA32

Powered by Google App Engine
This is Rietveld 408576698