Fix handling of accessors on trunk.  This is a combination of
r12271, r12264 and r12247, and is intended to fix bugs 140473,
140430 and 138388.  Unfortunately it probably breaks the MIPS
port.
Review URL: https://chromiumcodereview.appspot.com/10827220

git-svn-id: http://v8.googlecode.com/svn/trunk@12277 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap.cc b/src/heap.cc
index 74b6223..21b79bf 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -2424,6 +2424,7 @@
     if (!maybe_obj->ToObject(&obj)) return false;
   }
   Map* global_context_map = Map::cast(obj);
+  global_context_map->set_dictionary_map(true);
   global_context_map->set_visitor_id(StaticVisitorBase::kVisitGlobalContext);
   set_global_context_map(global_context_map);
 
@@ -4108,6 +4109,7 @@
 MaybeObject* Heap::AllocateGlobalObject(JSFunction* constructor) {
   ASSERT(constructor->has_initial_map());
   Map* map = constructor->initial_map();
+  ASSERT(map->is_dictionary_map());
 
   // Make sure no field properties are described in the initial map.
   // This guarantees us that normalizing the properties does not
@@ -4158,6 +4160,7 @@
   Map* new_map;
   MaybeObject* maybe_map = map->CopyDropDescriptors();
   if (!maybe_map->To(&new_map)) return maybe_map;
+  new_map->set_dictionary_map(true);
 
   // Set up the global object as a normalized object.
   global->set_map(new_map);