Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(597)

Unified Diff: src/objects.cc

Issue 2181303002: [ic] Avoid memory wasting when allocating names table of type feedback metadata. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/type-feedback-vector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 386cd98498d5181001810ae77cebcf88f24be52b..9b26b75f33f5c46d93a0517e766de2a7e5e92f99 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -16425,20 +16425,23 @@ template class Dictionary<UnseededNumberDictionary,
uint32_t>;
template Handle<SeededNumberDictionary>
-Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>::
- New(Isolate*, int at_least_space_for, PretenureFlag pretenure);
+Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>::New(
+ Isolate*, int at_least_space_for, PretenureFlag pretenure,
+ MinimumCapacity capacity_option);
template Handle<UnseededNumberDictionary>
-Dictionary<UnseededNumberDictionary, UnseededNumberDictionaryShape, uint32_t>::
- New(Isolate*, int at_least_space_for, PretenureFlag pretenure);
+Dictionary<UnseededNumberDictionary, UnseededNumberDictionaryShape,
+ uint32_t>::New(Isolate*, int at_least_space_for,
+ PretenureFlag pretenure,
+ MinimumCapacity capacity_option);
template Handle<NameDictionary>
-Dictionary<NameDictionary, NameDictionaryShape, Handle<Name> >::
- New(Isolate*, int n, PretenureFlag pretenure);
+Dictionary<NameDictionary, NameDictionaryShape, Handle<Name>>::New(
+ Isolate*, int n, PretenureFlag pretenure, MinimumCapacity capacity_option);
template Handle<GlobalDictionary>
-Dictionary<GlobalDictionary, GlobalDictionaryShape, Handle<Name> >::New(
- Isolate*, int n, PretenureFlag pretenure);
+Dictionary<GlobalDictionary, GlobalDictionaryShape, Handle<Name>>::New(
+ Isolate*, int n, PretenureFlag pretenure, MinimumCapacity capacity_option);
template Handle<SeededNumberDictionary>
Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>::
@@ -17230,17 +17233,13 @@ void CompilationCacheTable::Remove(Object* value) {
return;
}
-
-template<typename Derived, typename Shape, typename Key>
+template <typename Derived, typename Shape, typename Key>
Handle<Derived> Dictionary<Derived, Shape, Key>::New(
- Isolate* isolate,
- int at_least_space_for,
- PretenureFlag pretenure) {
+ Isolate* isolate, int at_least_space_for, PretenureFlag pretenure,
+ MinimumCapacity capacity_option) {
DCHECK(0 <= at_least_space_for);
- Handle<Derived> dict = DerivedHashTable::New(isolate,
- at_least_space_for,
- USE_DEFAULT_MINIMUM_CAPACITY,
- pretenure);
+ Handle<Derived> dict = DerivedHashTable::New(isolate, at_least_space_for,
+ capacity_option, pretenure);
// Initialize the next enumeration index.
dict->SetNextEnumerationIndex(PropertyDetails::kInitialIndex);
« no previous file with comments | « src/objects.h ('k') | src/type-feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698