Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index f5ff751268e4687c405c7315022b9ce91e6e3714..e0c5787d3b990c86f354033b0daeec41a06c2cc5 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -5449,6 +5449,27 @@ void MacroAssembler::ClampDoubleToUint8(Register result_reg, |
} |
+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()); |
+ lw(scratch_reg, FieldMemOperand(receiver_reg, |
+ JSArray::kSize + AllocationSiteInfo::kSize)); |
+ Branch(&no_info_available, lt, scratch_reg, Operand(new_space_start)); |
+ Branch(&no_info_available, hs, scratch_reg, |
+ Operand(new_space_allocation_top)); |
+ lw(scratch_reg, MemOperand(scratch_reg)); |
+ Branch(allocation_info_present, eq, scratch_reg, |
+ Operand(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); |
+ bind(&no_info_available); |
+} |
+ |
+ |
bool AreAliased(Register r1, Register r2, Register r3, Register r4) { |
if (r1.is(r2)) return true; |
if (r1.is(r3)) return true; |