From fa742f84a4089bf509e7faffc58eaf003fa2c864 Mon Sep 17 00:00:00 2001 From: "verwaest@chromium.org" Date: Mon, 30 Sep 2013 15:28:52 +0000 Subject: [PATCH] Allow code to be cached in shared maps. R=ulan@chromium.org Review URL: https://chromiumcodereview.appspot.com/25058004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/objects.cc | 19 ------------------- src/objects.h | 2 -- 2 files changed, 21 deletions(-) diff --git a/src/objects.cc b/src/objects.cc index cca11323df..53607d0202 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -4449,16 +4449,6 @@ void HeapObject::UpdateMapCodeCache(Handle object, Handle name, Handle code) { Handle map(object->map()); - if (map->is_shared()) { - Handle receiver = Handle::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 @@ void Map::UpdateCodeCache(Handle map, 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; @@ -10467,13 +10455,6 @@ BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { } -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) { PatchPlatformCodeAge(isolate, sequence, kNoAge, NO_MARKING_PARITY); } diff --git a/src/objects.h b/src/objects.h index 128948afa0..a2aacca624 100644 --- a/src/objects.h +++ b/src/objects.h @@ -4984,8 +4984,6 @@ class Code: public HeapObject { 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);