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

Side by Side Diff: src/isolate.cc

Issue 2123983004: [ic] Split megamorphic stub cache in two caches (for loads and for stores). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@flags-fix
Patch Set: Rebasing 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 : embedder_data_(), 1895 : embedder_data_(),
1896 entry_stack_(NULL), 1896 entry_stack_(NULL),
1897 stack_trace_nesting_level_(0), 1897 stack_trace_nesting_level_(0),
1898 incomplete_message_(NULL), 1898 incomplete_message_(NULL),
1899 bootstrapper_(NULL), 1899 bootstrapper_(NULL),
1900 runtime_profiler_(NULL), 1900 runtime_profiler_(NULL),
1901 compilation_cache_(NULL), 1901 compilation_cache_(NULL),
1902 counters_(NULL), 1902 counters_(NULL),
1903 logger_(NULL), 1903 logger_(NULL),
1904 stats_table_(NULL), 1904 stats_table_(NULL),
1905 stub_cache_(NULL), 1905 load_stub_cache_(NULL),
1906 store_stub_cache_(NULL),
1906 code_aging_helper_(NULL), 1907 code_aging_helper_(NULL),
1907 deoptimizer_data_(NULL), 1908 deoptimizer_data_(NULL),
1908 deoptimizer_lazy_throw_(false), 1909 deoptimizer_lazy_throw_(false),
1909 materialized_object_store_(NULL), 1910 materialized_object_store_(NULL),
1910 capture_stack_trace_for_uncaught_exceptions_(false), 1911 capture_stack_trace_for_uncaught_exceptions_(false),
1911 stack_trace_for_uncaught_exceptions_frame_limit_(0), 1912 stack_trace_for_uncaught_exceptions_frame_limit_(0),
1912 stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview), 1913 stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview),
1913 keyed_lookup_cache_(NULL), 1914 keyed_lookup_cache_(NULL),
1914 context_slot_cache_(NULL), 1915 context_slot_cache_(NULL),
1915 descriptor_lookup_cache_(NULL), 1916 descriptor_lookup_cache_(NULL),
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2133 delete regexp_stack_; 2134 delete regexp_stack_;
2134 regexp_stack_ = NULL; 2135 regexp_stack_ = NULL;
2135 2136
2136 delete descriptor_lookup_cache_; 2137 delete descriptor_lookup_cache_;
2137 descriptor_lookup_cache_ = NULL; 2138 descriptor_lookup_cache_ = NULL;
2138 delete context_slot_cache_; 2139 delete context_slot_cache_;
2139 context_slot_cache_ = NULL; 2140 context_slot_cache_ = NULL;
2140 delete keyed_lookup_cache_; 2141 delete keyed_lookup_cache_;
2141 keyed_lookup_cache_ = NULL; 2142 keyed_lookup_cache_ = NULL;
2142 2143
2143 delete stub_cache_; 2144 delete load_stub_cache_;
2144 stub_cache_ = NULL; 2145 load_stub_cache_ = NULL;
2146 delete store_stub_cache_;
2147 store_stub_cache_ = NULL;
2145 delete code_aging_helper_; 2148 delete code_aging_helper_;
2146 code_aging_helper_ = NULL; 2149 code_aging_helper_ = NULL;
2147 delete stats_table_; 2150 delete stats_table_;
2148 stats_table_ = NULL; 2151 stats_table_ = NULL;
2149 2152
2150 delete materialized_object_store_; 2153 delete materialized_object_store_;
2151 materialized_object_store_ = NULL; 2154 materialized_object_store_ = NULL;
2152 2155
2153 delete logger_; 2156 delete logger_;
2154 logger_ = NULL; 2157 logger_ = NULL;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2277 compilation_cache_ = new CompilationCache(this); 2280 compilation_cache_ = new CompilationCache(this);
2278 keyed_lookup_cache_ = new KeyedLookupCache(); 2281 keyed_lookup_cache_ = new KeyedLookupCache();
2279 context_slot_cache_ = new ContextSlotCache(); 2282 context_slot_cache_ = new ContextSlotCache();
2280 descriptor_lookup_cache_ = new DescriptorLookupCache(); 2283 descriptor_lookup_cache_ = new DescriptorLookupCache();
2281 unicode_cache_ = new UnicodeCache(); 2284 unicode_cache_ = new UnicodeCache();
2282 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); 2285 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this);
2283 global_handles_ = new GlobalHandles(this); 2286 global_handles_ = new GlobalHandles(this);
2284 eternal_handles_ = new EternalHandles(); 2287 eternal_handles_ = new EternalHandles();
2285 bootstrapper_ = new Bootstrapper(this); 2288 bootstrapper_ = new Bootstrapper(this);
2286 handle_scope_implementer_ = new HandleScopeImplementer(this); 2289 handle_scope_implementer_ = new HandleScopeImplementer(this);
2287 stub_cache_ = new StubCache(this); 2290 load_stub_cache_ = new StubCache(this, Code::LOAD_IC);
2291 store_stub_cache_ = new StubCache(this, Code::STORE_IC);
2288 materialized_object_store_ = new MaterializedObjectStore(this); 2292 materialized_object_store_ = new MaterializedObjectStore(this);
2289 regexp_stack_ = new RegExpStack(); 2293 regexp_stack_ = new RegExpStack();
2290 regexp_stack_->isolate_ = this; 2294 regexp_stack_->isolate_ = this;
2291 date_cache_ = new DateCache(); 2295 date_cache_ = new DateCache();
2292 call_descriptor_data_ = 2296 call_descriptor_data_ =
2293 new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS]; 2297 new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS];
2294 cpu_profiler_ = new CpuProfiler(this); 2298 cpu_profiler_ = new CpuProfiler(this);
2295 heap_profiler_ = new HeapProfiler(heap()); 2299 heap_profiler_ = new HeapProfiler(heap());
2296 interpreter_ = new interpreter::Interpreter(this); 2300 interpreter_ = new interpreter::Interpreter(this);
2297 2301
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 } 2357 }
2354 2358
2355 // Initialize runtime profiler before deserialization, because collections may 2359 // Initialize runtime profiler before deserialization, because collections may
2356 // occur, clearing/updating ICs. 2360 // occur, clearing/updating ICs.
2357 runtime_profiler_ = new RuntimeProfiler(this); 2361 runtime_profiler_ = new RuntimeProfiler(this);
2358 2362
2359 // If we are deserializing, read the state into the now-empty heap. 2363 // If we are deserializing, read the state into the now-empty heap.
2360 if (!create_heap_objects) { 2364 if (!create_heap_objects) {
2361 des->Deserialize(this); 2365 des->Deserialize(this);
2362 } 2366 }
2363 stub_cache_->Initialize(); 2367 load_stub_cache_->Initialize();
2368 store_stub_cache_->Initialize();
2364 if (FLAG_ignition || serializer_enabled()) { 2369 if (FLAG_ignition || serializer_enabled()) {
2365 interpreter_->Initialize(); 2370 interpreter_->Initialize();
2366 } 2371 }
2367 2372
2368 // Finish initialization of ThreadLocal after deserialization is done. 2373 // Finish initialization of ThreadLocal after deserialization is done.
2369 clear_pending_exception(); 2374 clear_pending_exception();
2370 clear_pending_message(); 2375 clear_pending_message();
2371 clear_scheduled_exception(); 2376 clear_scheduled_exception();
2372 2377
2373 // Deserializing may put strange things in the root array's copy of the 2378 // Deserializing may put strange things in the root array's copy of the
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
3131 // Then check whether this scope intercepts. 3136 // Then check whether this scope intercepts.
3132 if ((flag & intercept_mask_)) { 3137 if ((flag & intercept_mask_)) {
3133 intercepted_flags_ |= flag; 3138 intercepted_flags_ |= flag;
3134 return true; 3139 return true;
3135 } 3140 }
3136 return false; 3141 return false;
3137 } 3142 }
3138 3143
3139 } // namespace internal 3144 } // namespace internal
3140 } // namespace v8 3145 } // namespace v8
OLDNEW
« src/ic/x64/stub-cache-x64.cc ('K') | « src/isolate.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698