diff --git a/src/objects.cc b/src/objects.cc index d30d80b449..45394c4918 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -12543,18 +12543,6 @@ void SharedFunctionInfo::EvictFromOptimizedCodeMap(Code* optimized_code, } } - -void SharedFunctionInfo::TrimOptimizedCodeMap(int shrink_by) { - FixedArray* code_map = optimized_code_map(); - DCHECK(shrink_by % kEntryLength == 0); - DCHECK(shrink_by <= code_map->length() - kEntriesStart); - // Always trim even when array is cleared because of heap verifier. - GetHeap()->RightTrimFixedArray(code_map, shrink_by); - if (code_map->length() == kEntriesStart) { - ClearOptimizedCodeMap(); - } -} - // static void JSFunction::EnsureLiterals(Handle function) { Handle shared(function->shared()); diff --git a/src/objects.h b/src/objects.h index c802e91626..66a53db370 100644 --- a/src/objects.h +++ b/src/objects.h @@ -7463,9 +7463,6 @@ class SharedFunctionInfo: public HeapObject { // the entry itself is left in the map in order to proceed sharing literals. void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason); - // Trims the optimized code map after entries have been removed. - void TrimOptimizedCodeMap(int shrink_by); - static Handle FindOrCreateLiterals( Handle shared, Handle native_context);