Version 3.9.0

Reduce memory use immediately after starting V8.

Stability fixes and performance improvements on all platforms.

git-svn-id: http://v8.googlecode.com/svn/trunk@10576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 2d6bd08..684ec15 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -4033,6 +4033,32 @@
   }
 }
 
+
+void MacroAssembler::LoadGlobalInitialConstructedArrayMap(
+    Register function_in, Register scratch, Register map_out) {
+  ASSERT(!function_in.is(map_out));
+  Label done;
+  movq(map_out, FieldOperand(function_in,
+                             JSFunction::kPrototypeOrInitialMapOffset));
+  if (!FLAG_smi_only_arrays) {
+    // Load the global or builtins object from the current context.
+    movq(scratch, Operand(rsi, Context::SlotOffset(Context::GLOBAL_INDEX)));
+    movq(scratch, FieldOperand(scratch, GlobalObject::kGlobalContextOffset));
+
+    // Check that the function's map is same as the cached map.
+    cmpq(map_out,
+         Operand(scratch,
+                 Context::SlotOffset(Context::SMI_JS_ARRAY_MAP_INDEX)));
+    j(not_equal, &done);
+
+    // Use the cached transitioned map.
+    movq(map_out,
+         Operand(scratch,
+                 Context::SlotOffset(Context::OBJECT_JS_ARRAY_MAP_INDEX)));
+  }
+  bind(&done);
+}
+
 #ifdef _WIN64
 static const int kRegisterPassedArguments = 4;
 #else