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

Side by Side Diff: src/objects.cc

Issue 2102073002: [ic] Use UnseededNumberDictionary as a storage for names in TypeFeedbackMetadata. (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 unified diff | Download patch
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 <sstream> 9 #include <sstream>
10 10
(...skipping 16171 matching lines...) Expand 10 before | Expand all | Expand 10 after
16182 int capacity = (capacity_option == USE_CUSTOM_MINIMUM_CAPACITY) 16182 int capacity = (capacity_option == USE_CUSTOM_MINIMUM_CAPACITY)
16183 ? at_least_space_for 16183 ? at_least_space_for
16184 : ComputeCapacity(at_least_space_for); 16184 : ComputeCapacity(at_least_space_for);
16185 if (capacity > HashTable::kMaxCapacity) { 16185 if (capacity > HashTable::kMaxCapacity) {
16186 v8::internal::Heap::FatalProcessOutOfMemory("invalid table size", true); 16186 v8::internal::Heap::FatalProcessOutOfMemory("invalid table size", true);
16187 } 16187 }
16188 16188
16189 Factory* factory = isolate->factory(); 16189 Factory* factory = isolate->factory();
16190 int length = EntryToIndex(capacity); 16190 int length = EntryToIndex(capacity);
16191 Handle<FixedArray> array = factory->NewFixedArray(length, pretenure); 16191 Handle<FixedArray> array = factory->NewFixedArray(length, pretenure);
16192 array->set_map_no_write_barrier(*factory->hash_table_map()); 16192 array->set_map_no_write_barrier(Shape::GetMap(isolate));
16193 Handle<Derived> table = Handle<Derived>::cast(array); 16193 Handle<Derived> table = Handle<Derived>::cast(array);
16194 16194
16195 table->SetNumberOfElements(0); 16195 table->SetNumberOfElements(0);
16196 table->SetNumberOfDeletedElements(0); 16196 table->SetNumberOfDeletedElements(0);
16197 table->SetCapacity(capacity); 16197 table->SetCapacity(capacity);
16198 return table; 16198 return table;
16199 } 16199 }
16200 16200
16201 16201
16202 // Find entry for key otherwise return kNotFound. 16202 // Find entry for key otherwise return kNotFound.
(...skipping 2796 matching lines...) Expand 10 before | Expand all | Expand 10 after
18999 18999
19000 Object* data_obj = 19000 Object* data_obj =
19001 constructor->shared()->get_api_func_data()->access_check_info(); 19001 constructor->shared()->get_api_func_data()->access_check_info();
19002 if (data_obj->IsUndefined(isolate)) return nullptr; 19002 if (data_obj->IsUndefined(isolate)) return nullptr;
19003 19003
19004 return AccessCheckInfo::cast(data_obj); 19004 return AccessCheckInfo::cast(data_obj);
19005 } 19005 }
19006 19006
19007 } // namespace internal 19007 } // namespace internal
19008 } // namespace v8 19008 } // namespace v8
OLDNEW
« src/heap/heap.h ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698