Version 1.3.16
        
X64: Convert smis to holding 32 bits of payload.

Introduce v8::Integer::NewFromUnsigned method.

Add missing null check in Context::GetCurrent.

Add trim, trimLeft and trimRight methods to String
Patch by Jan de Mooij <jandemooij@gmail.com>

Implement ES5 Array.isArray
Patch by Jan de Mooij <jandemooij@gmail.com>

Skip access checks for hidden properties.

Add String::Concat(Handle<String> left, Handle<String> right) to the V8 API.

Fix GYP-based builds of V8.



git-svn-id: http://v8.googlecode.com/svn/trunk@3082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap.cc b/src/heap.cc
index 0295a99..817a50f 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -1679,8 +1679,8 @@
       && second->IsAsciiRepresentation();
 
   // Make sure that an out of memory exception is thrown if the length
-  // of the new cons string is too large to fit in a Smi.
-  if (length > Smi::kMaxValue || length < -0) {
+  // of the new cons string is too large.
+  if (length > String::kMaxLength || length < 0) {
     Top::context()->mark_out_of_memory();
     return Failure::OutOfMemoryException();
   }
@@ -2021,6 +2021,7 @@
                                TargetSpaceId(map->instance_type()));
   if (result->IsFailure()) return result;
   HeapObject::cast(result)->set_map(map);
+  ProducerHeapProfile::RecordJSObjectAllocation(result);
   return result;
 }
 
@@ -2342,6 +2343,7 @@
     JSObject::cast(clone)->set_properties(FixedArray::cast(prop));
   }
   // Return the new clone.
+  ProducerHeapProfile::RecordJSObjectAllocation(clone);
   return clone;
 }
 
@@ -3308,6 +3310,9 @@
   LOG(IntEvent("heap-capacity", Capacity()));
   LOG(IntEvent("heap-available", Available()));
 
+  // This should be called only after initial objects have been created.
+  ProducerHeapProfile::Setup();
+
   return true;
 }