Revision: 17045
Author:   [email protected]
Date:     Tue Oct  1 13:13:39 2013 UTC
Log:      Allow code to be cached in shared maps.

BUG=
[email protected]

Review URL: https://chromiumcodereview.appspot.com/25486002
http://code.google.com/p/v8/source/detail?r=17045

Modified:
 /branches/bleeding_edge/src/objects.cc
 /branches/bleeding_edge/src/objects.h

=======================================
--- /branches/bleeding_edge/src/objects.cc      Tue Oct  1 08:14:38 2013 UTC
+++ /branches/bleeding_edge/src/objects.cc      Tue Oct  1 13:13:39 2013 UTC
@@ -4449,16 +4449,6 @@
                                     Handle<Name> name,
                                     Handle<Code> code) {
   Handle<Map> map(object->map());
-  if (map->is_shared()) {
-    Handle<JSObject> receiver = Handle<JSObject>::cast(object);
-    // Fast case maps are never marked as shared.
-    ASSERT(!receiver->HasFastProperties());
-    // Replace the map with an identical copy that can be safely modified.
-    map = Map::CopyNormalized(map, KEEP_INOBJECT_PROPERTIES,
-                              UNIQUE_NORMALIZED_MAP);
-    receiver->GetIsolate()->counters()->normalized_maps()->Increment();
-    receiver->set_map(*map);
-  }
   Map::UpdateCodeCache(map, name, code);
 }

@@ -7023,8 +7013,6 @@


 MaybeObject* Map::UpdateCodeCache(Name* name, Code* code) {
-  ASSERT(!is_shared() || code->allowed_in_shared_map_code_cache());
-
   // Allocate the code cache if not present.
   if (code_cache()->IsFixedArray()) {
     Object* result;
@@ -10464,13 +10452,6 @@
   }
   return BailoutId::None();
 }
-
-
-bool Code::allowed_in_shared_map_code_cache() {
-  return is_keyed_load_stub() || is_keyed_store_stub() ||
-      (is_compare_ic_stub() &&
- ICCompareStub::CompareState(stub_info()) == CompareIC::KNOWN_OBJECT);
-}


 void Code::MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate) {
=======================================
--- /branches/bleeding_edge/src/objects.h       Tue Oct  1 09:47:37 2013 UTC
+++ /branches/bleeding_edge/src/objects.h       Tue Oct  1 13:13:39 2013 UTC
@@ -4979,8 +4979,6 @@
   inline bool marked_for_deoptimization();
   inline void set_marked_for_deoptimization(bool flag);

-  bool allowed_in_shared_map_code_cache();
-
   // Get the safepoint entry for the given pc.
   SafepointEntry GetSafepointEntry(Address pc);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to