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

Side by Side 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, 4 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 unified diff | Download patch
« no previous file with comments | « src/objects.h ('k') | src/type-feedback-vector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 16407 matching lines...) Expand 10 before | Expand all | Expand 10 after
16418 16418
16419 template class Dictionary<SeededNumberDictionary, 16419 template class Dictionary<SeededNumberDictionary,
16420 SeededNumberDictionaryShape, 16420 SeededNumberDictionaryShape,
16421 uint32_t>; 16421 uint32_t>;
16422 16422
16423 template class Dictionary<UnseededNumberDictionary, 16423 template class Dictionary<UnseededNumberDictionary,
16424 UnseededNumberDictionaryShape, 16424 UnseededNumberDictionaryShape,
16425 uint32_t>; 16425 uint32_t>;
16426 16426
16427 template Handle<SeededNumberDictionary> 16427 template Handle<SeededNumberDictionary>
16428 Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>:: 16428 Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>::New(
16429 New(Isolate*, int at_least_space_for, PretenureFlag pretenure); 16429 Isolate*, int at_least_space_for, PretenureFlag pretenure,
16430 MinimumCapacity capacity_option);
16430 16431
16431 template Handle<UnseededNumberDictionary> 16432 template Handle<UnseededNumberDictionary>
16432 Dictionary<UnseededNumberDictionary, UnseededNumberDictionaryShape, uint32_t>:: 16433 Dictionary<UnseededNumberDictionary, UnseededNumberDictionaryShape,
16433 New(Isolate*, int at_least_space_for, PretenureFlag pretenure); 16434 uint32_t>::New(Isolate*, int at_least_space_for,
16435 PretenureFlag pretenure,
16436 MinimumCapacity capacity_option);
16434 16437
16435 template Handle<NameDictionary> 16438 template Handle<NameDictionary>
16436 Dictionary<NameDictionary, NameDictionaryShape, Handle<Name> >:: 16439 Dictionary<NameDictionary, NameDictionaryShape, Handle<Name>>::New(
16437 New(Isolate*, int n, PretenureFlag pretenure); 16440 Isolate*, int n, PretenureFlag pretenure, MinimumCapacity capacity_option);
16438 16441
16439 template Handle<GlobalDictionary> 16442 template Handle<GlobalDictionary>
16440 Dictionary<GlobalDictionary, GlobalDictionaryShape, Handle<Name> >::New( 16443 Dictionary<GlobalDictionary, GlobalDictionaryShape, Handle<Name>>::New(
16441 Isolate*, int n, PretenureFlag pretenure); 16444 Isolate*, int n, PretenureFlag pretenure, MinimumCapacity capacity_option);
16442 16445
16443 template Handle<SeededNumberDictionary> 16446 template Handle<SeededNumberDictionary>
16444 Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>:: 16447 Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>::
16445 AtPut(Handle<SeededNumberDictionary>, uint32_t, Handle<Object>); 16448 AtPut(Handle<SeededNumberDictionary>, uint32_t, Handle<Object>);
16446 16449
16447 template Handle<UnseededNumberDictionary> 16450 template Handle<UnseededNumberDictionary>
16448 Dictionary<UnseededNumberDictionary, UnseededNumberDictionaryShape, uint32_t>:: 16451 Dictionary<UnseededNumberDictionary, UnseededNumberDictionaryShape, uint32_t>::
16449 AtPut(Handle<UnseededNumberDictionary>, uint32_t, Handle<Object>); 16452 AtPut(Handle<UnseededNumberDictionary>, uint32_t, Handle<Object>);
16450 16453
16451 template Object* 16454 template Object*
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
17223 int value_index = entry_index + 1; 17226 int value_index = entry_index + 1;
17224 if (get(value_index) == value) { 17227 if (get(value_index) == value) {
17225 NoWriteBarrierSet(this, entry_index, the_hole_value); 17228 NoWriteBarrierSet(this, entry_index, the_hole_value);
17226 NoWriteBarrierSet(this, value_index, the_hole_value); 17229 NoWriteBarrierSet(this, value_index, the_hole_value);
17227 ElementRemoved(); 17230 ElementRemoved();
17228 } 17231 }
17229 } 17232 }
17230 return; 17233 return;
17231 } 17234 }
17232 17235
17233 17236 template <typename Derived, typename Shape, typename Key>
17234 template<typename Derived, typename Shape, typename Key>
17235 Handle<Derived> Dictionary<Derived, Shape, Key>::New( 17237 Handle<Derived> Dictionary<Derived, Shape, Key>::New(
17236 Isolate* isolate, 17238 Isolate* isolate, int at_least_space_for, PretenureFlag pretenure,
17237 int at_least_space_for, 17239 MinimumCapacity capacity_option) {
17238 PretenureFlag pretenure) {
17239 DCHECK(0 <= at_least_space_for); 17240 DCHECK(0 <= at_least_space_for);
17240 Handle<Derived> dict = DerivedHashTable::New(isolate, 17241 Handle<Derived> dict = DerivedHashTable::New(isolate, at_least_space_for,
17241 at_least_space_for, 17242 capacity_option, pretenure);
17242 USE_DEFAULT_MINIMUM_CAPACITY,
17243 pretenure);
17244 17243
17245 // Initialize the next enumeration index. 17244 // Initialize the next enumeration index.
17246 dict->SetNextEnumerationIndex(PropertyDetails::kInitialIndex); 17245 dict->SetNextEnumerationIndex(PropertyDetails::kInitialIndex);
17247 return dict; 17246 return dict;
17248 } 17247 }
17249 17248
17250 17249
17251 template <typename Derived, typename Shape, typename Key> 17250 template <typename Derived, typename Shape, typename Key>
17252 Handle<FixedArray> Dictionary<Derived, Shape, Key>::BuildIterationIndicesArray( 17251 Handle<FixedArray> Dictionary<Derived, Shape, Key>::BuildIterationIndicesArray(
17253 Handle<Derived> dictionary) { 17252 Handle<Derived> dictionary) {
(...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after
18992 for (PrototypeIterator iter(isolate, this, kStartAtReceiver, 18991 for (PrototypeIterator iter(isolate, this, kStartAtReceiver,
18993 PrototypeIterator::END_AT_NULL); 18992 PrototypeIterator::END_AT_NULL);
18994 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) { 18993 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) {
18995 if (iter.GetCurrent<Object>()->IsJSProxy()) return true; 18994 if (iter.GetCurrent<Object>()->IsJSProxy()) return true;
18996 } 18995 }
18997 return false; 18996 return false;
18998 } 18997 }
18999 18998
19000 } // namespace internal 18999 } // namespace internal
19001 } // namespace v8 19000 } // namespace v8
OLDNEW
« 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