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

Unified Diff: src/arm/macro-assembler-arm.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/arm/macro-assembler-arm.cc
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
index 0764e090dde3fd9631421f9badbdfe0ba6573790..5368e519ffdf5cba24c2f93949106c211cd3a345 100644
--- a/src/arm/macro-assembler-arm.cc
+++ b/src/arm/macro-assembler-arm.cc
@@ -3883,6 +3883,39 @@ void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) {
}
+void MacroAssembler::PerformAllocationSiteInfoCheck(
+ Label* allocation_info_present) {
+ Label no_info_available;
+ // ----------- S t a t e -------------
+ // -- r2 : receiver
danno 2013/01/04 08:50:55 Pass in receiver_reg and scratch_reg.
mvstanton 2013/01/04 12:07:52 Done.
+ // r4 is clobbered.
+ // -----------------------------------
+ ExternalReference new_space_start =
+ ExternalReference::new_space_start(isolate());
+ ExternalReference new_space_allocation_top =
+ ExternalReference::new_space_allocation_top_address(isolate());
+
+ ldr(r4, FieldMemOperand(r2, JSArray::kSize + AllocationSiteInfo::kSize));
+ cmp(r4, Operand(new_space_start));
+ b(lt, &no_info_available);
+ cmp(r4, Operand(new_space_allocation_top));
+ b(hs, &no_info_available);
+ ldr(r4, MemOperand(r4, 0));
+ cmp(r4,
+ Operand(Handle<Map>(isolate()->heap()->
+ allocation_site_info_map())));
danno 2013/01/04 08:50:55 nit: formatting above, Operand can be on same line
mvstanton 2013/01/04 12:07:52 Done.
+
+ // Use the j/jmp sequence below for debugging, but the j(equal) sequence
danno 2013/01/04 08:50:55 Keep the sequence below uncommented on this and ot
mvstanton 2013/01/04 12:07:52 I decided to remove it because debug_code should b
+ // for production.
+ // b(not_equal, &no_info_available);
+ // int3();
+ // jmp(allocation_info_present);
+ // or
+ b(eq, allocation_info_present);
+ bind(&no_info_available);
+}
+
+
#ifdef DEBUG
bool AreAliased(Register reg1,
Register reg2,

Powered by Google App Engine
This is Rietveld 408576698