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

Side by Side Diff: src/factory.cc

Issue 1846963002: Use a dictionary-mode code cache on the map rather than a dual system. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/factory.h ('k') | src/globals.h » ('j') | src/heap/heap.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 846
847 847
848 Handle<Struct> Factory::NewStruct(InstanceType type) { 848 Handle<Struct> Factory::NewStruct(InstanceType type) {
849 CALL_HEAP_FUNCTION( 849 CALL_HEAP_FUNCTION(
850 isolate(), 850 isolate(),
851 isolate()->heap()->AllocateStruct(type), 851 isolate()->heap()->AllocateStruct(type),
852 Struct); 852 Struct);
853 } 853 }
854 854
855 855
856 Handle<CodeCache> Factory::NewCodeCache() {
857 Handle<CodeCache> code_cache =
858 Handle<CodeCache>::cast(NewStruct(CODE_CACHE_TYPE));
859 code_cache->set_default_cache(*empty_fixed_array(), SKIP_WRITE_BARRIER);
860 code_cache->set_normal_type_cache(*undefined_value(), SKIP_WRITE_BARRIER);
861 return code_cache;
862 }
863
864
865 Handle<AliasedArgumentsEntry> Factory::NewAliasedArgumentsEntry( 856 Handle<AliasedArgumentsEntry> Factory::NewAliasedArgumentsEntry(
866 int aliased_context_slot) { 857 int aliased_context_slot) {
867 Handle<AliasedArgumentsEntry> entry = Handle<AliasedArgumentsEntry>::cast( 858 Handle<AliasedArgumentsEntry> entry = Handle<AliasedArgumentsEntry>::cast(
868 NewStruct(ALIASED_ARGUMENTS_ENTRY_TYPE)); 859 NewStruct(ALIASED_ARGUMENTS_ENTRY_TYPE));
869 entry->set_aliased_context_slot(aliased_context_slot); 860 entry->set_aliased_context_slot(aliased_context_slot);
870 return entry; 861 return entry;
871 } 862 }
872 863
873 864
874 Handle<AccessorInfo> Factory::NewAccessorInfo() { 865 Handle<AccessorInfo> Factory::NewAccessorInfo() {
(...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 } 2370 }
2380 2371
2381 2372
2382 Handle<Object> Factory::ToBoolean(bool value) { 2373 Handle<Object> Factory::ToBoolean(bool value) {
2383 return value ? true_value() : false_value(); 2374 return value ? true_value() : false_value();
2384 } 2375 }
2385 2376
2386 2377
2387 } // namespace internal 2378 } // namespace internal
2388 } // namespace v8 2379 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/globals.h » ('j') | src/heap/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698