Version 3.16.3

Improved GC performance when moving parts of a FixedArray (issue 2452).

Enabled readline on d8 while building a shared lib (issue 1781).

Fixed missing exception check in typed array constructor (Chromium issue 168545).

Check for read-only-ness when preparing for array sort (issue 2419).

Performance and stability improvements on all platforms.

git-svn-id: http://v8.googlecode.com/svn/trunk@13346 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 0270a26..6e9e78e 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -4609,6 +4609,29 @@
   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));
+  movq(kScratchRegister, new_space_start);
+  cmpq(scratch_reg, kScratchRegister);
+  j(less, &no_info_available);
+  cmpq(scratch_reg, ExternalOperand(new_space_allocation_top));
+  j(greater_equal, &no_info_available);
+  CompareRoot(MemOperand(scratch_reg, 0),
+              Heap::kAllocationSiteInfoMapRootIndex);
+  j(equal, allocation_info_present);
+  bind(&no_info_available);
+}
+
 
 } }  // namespace v8::internal