Improved handling of relocation information to enable more peep-hole optimizations.

Optimized switch statements where all labels are constant small integers.

Optimized String.prototype.indexOf for common cases.

Fixed more build issues (issue 80).

Fixed a couple of profiler issues.

Fixed bug where the body of a function created using the Function constructor was not allowed to end with a single-line comment (issue 85).

Improved handling of object literals by canonicalizing object literal maps.  This will allow JSON objects with the same set of properties to share the same map making inline caching work better for JSON objects.



git-svn-id: http://v8.googlecode.com/svn/trunk@373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap.cc b/src/heap.cc
index b2aaf32..ad2c038 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -974,15 +974,15 @@
   STRUCT_LIST(ALLOCATE_STRUCT_MAP)
 #undef ALLOCATE_STRUCT_MAP
 
-  obj = AllocateMap(FIXED_ARRAY_TYPE, HeapObject::kSize);
+  obj = AllocateMap(FIXED_ARRAY_TYPE, HeapObject::kHeaderSize);
   if (obj->IsFailure()) return false;
   hash_table_map_ = Map::cast(obj);
 
-  obj = AllocateMap(FIXED_ARRAY_TYPE, HeapObject::kSize);
+  obj = AllocateMap(FIXED_ARRAY_TYPE, HeapObject::kHeaderSize);
   if (obj->IsFailure()) return false;
   context_map_ = Map::cast(obj);
 
-  obj = AllocateMap(FIXED_ARRAY_TYPE, HeapObject::kSize);
+  obj = AllocateMap(FIXED_ARRAY_TYPE, HeapObject::kHeaderSize);
   if (obj->IsFailure()) return false;
   global_context_map_ = Map::cast(obj);