Chromium Code Reviews| 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..c0e1f378d33d790ab8c2b87056367276d2ebbd22 100644 |
| --- a/src/ia32/macro-assembler-ia32.cc |
| +++ b/src/ia32/macro-assembler-ia32.cc |
| @@ -3051,6 +3051,31 @@ void MacroAssembler::CheckEnumCache(Label* call_runtime) { |
| j(not_equal, &next); |
| } |
| + |
| +void MacroAssembler::TestJSArrayForAllocationSiteInfo( |
| + Register receiver_reg, |
| + Register scratch_reg, |
| + Label* allocation_info_present) { |
| + Label no_info_available; |
| + ExternalReference new_space_start = |
| + ExternalReference::new_space_start(isolate()); |
| + ExternalReference new_space_allocation_top = |
| + ExternalReference::new_space_allocation_top_address(isolate()); |
| + |
| + lea(scratch_reg, Operand(receiver_reg, |
| + JSArray::kSize + AllocationSiteInfo::kSize)); |
| + cmp(scratch_reg, Immediate(new_space_start)); |
| + j(less, &no_info_available); |
| + cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); |
| + j(greater_equal, &no_info_available); |
| + cmp(MemOperand(scratch_reg, 0), |
| + Immediate(Handle<Map>(isolate()->heap()-> |
| + allocation_site_info_map()))); |
|
danno
2013/01/07 08:03:48
nit: indentation (4 spaces)
mvstanton
2013/01/07 09:28:41
Done.
|
| + j(equal, allocation_info_present); |
| + bind(&no_info_available); |
| +} |
| + |
| + |
| } } // namespace v8::internal |
| #endif // V8_TARGET_ARCH_IA32 |