Chromium Code Reviews| 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, |