Fixed string length bug on ARM (issue 171).

Made most methods in the API const.

Optimized object literals by improving data locality.

Fixed bug that caused incomplete functions to be cached in case of stack overflow exceptions.

Fixed bugs that caused catch variables and variables introduced by eval to behave incorrectly when using accessors (issues 186, 190 and 191).


git-svn-id: http://v8.googlecode.com/svn/trunk@1095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap.cc b/src/heap.cc
index c4a860b..f8caa49 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -1904,7 +1904,7 @@
     if (clone->IsFailure()) return clone;
     ASSERT(Heap::InNewSpace(clone));
     // Since we know the clone is allocated in new space, we can copy
-    // the contents without worring about updating the write barrier.
+    // the contents without worrying about updating the write barrier.
     CopyBlock(reinterpret_cast<Object**>(HeapObject::cast(clone)->address()),
               reinterpret_cast<Object**>(source->address()),
               object_size);
@@ -2293,6 +2293,7 @@
 
 
 Object* Heap::AllocateFixedArray(int length) {
+  if (length == 0) return empty_fixed_array();
   Object* result = AllocateRawFixedArray(length);
   if (!result->IsFailure()) {
     // Initialize header.