OLD | NEW |
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> |
11 | 11 |
12 #include "src/ast/context-slot-cache.h" | |
13 #include "src/base/accounting-allocator.h" | 12 #include "src/base/accounting-allocator.h" |
14 #include "src/base/hashmap.h" | 13 #include "src/base/hashmap.h" |
15 #include "src/base/platform/platform.h" | 14 #include "src/base/platform/platform.h" |
16 #include "src/base/sys-info.h" | 15 #include "src/base/sys-info.h" |
17 #include "src/base/utils/random-number-generator.h" | 16 #include "src/base/utils/random-number-generator.h" |
18 #include "src/basic-block-profiler.h" | 17 #include "src/basic-block-profiler.h" |
19 #include "src/bootstrapper.h" | 18 #include "src/bootstrapper.h" |
20 #include "src/cancelable-task.h" | 19 #include "src/cancelable-task.h" |
21 #include "src/codegen.h" | 20 #include "src/codegen.h" |
22 #include "src/compilation-cache.h" | 21 #include "src/compilation-cache.h" |
(...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1937 load_stub_cache_(NULL), | 1936 load_stub_cache_(NULL), |
1938 store_stub_cache_(NULL), | 1937 store_stub_cache_(NULL), |
1939 code_aging_helper_(NULL), | 1938 code_aging_helper_(NULL), |
1940 deoptimizer_data_(NULL), | 1939 deoptimizer_data_(NULL), |
1941 deoptimizer_lazy_throw_(false), | 1940 deoptimizer_lazy_throw_(false), |
1942 materialized_object_store_(NULL), | 1941 materialized_object_store_(NULL), |
1943 capture_stack_trace_for_uncaught_exceptions_(false), | 1942 capture_stack_trace_for_uncaught_exceptions_(false), |
1944 stack_trace_for_uncaught_exceptions_frame_limit_(0), | 1943 stack_trace_for_uncaught_exceptions_frame_limit_(0), |
1945 stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview), | 1944 stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview), |
1946 keyed_lookup_cache_(NULL), | 1945 keyed_lookup_cache_(NULL), |
1947 context_slot_cache_(NULL), | |
1948 descriptor_lookup_cache_(NULL), | 1946 descriptor_lookup_cache_(NULL), |
1949 handle_scope_implementer_(NULL), | 1947 handle_scope_implementer_(NULL), |
1950 unicode_cache_(NULL), | 1948 unicode_cache_(NULL), |
1951 allocator_(FLAG_trace_gc_object_stats | 1949 allocator_(FLAG_trace_gc_object_stats |
1952 ? new VerboseAccountingAllocator(&heap_, 256 * KB) | 1950 ? new VerboseAccountingAllocator(&heap_, 256 * KB) |
1953 : new base::AccountingAllocator()), | 1951 : new base::AccountingAllocator()), |
1954 runtime_zone_(new Zone(allocator_)), | 1952 runtime_zone_(new Zone(allocator_)), |
1955 interface_descriptor_zone_(new Zone(allocator_)), | 1953 interface_descriptor_zone_(new Zone(allocator_)), |
1956 inner_pointer_to_code_cache_(NULL), | 1954 inner_pointer_to_code_cache_(NULL), |
1957 global_handles_(NULL), | 1955 global_handles_(NULL), |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2165 date_cache_ = NULL; | 2163 date_cache_ = NULL; |
2166 | 2164 |
2167 delete[] call_descriptor_data_; | 2165 delete[] call_descriptor_data_; |
2168 call_descriptor_data_ = NULL; | 2166 call_descriptor_data_ = NULL; |
2169 | 2167 |
2170 delete regexp_stack_; | 2168 delete regexp_stack_; |
2171 regexp_stack_ = NULL; | 2169 regexp_stack_ = NULL; |
2172 | 2170 |
2173 delete descriptor_lookup_cache_; | 2171 delete descriptor_lookup_cache_; |
2174 descriptor_lookup_cache_ = NULL; | 2172 descriptor_lookup_cache_ = NULL; |
2175 delete context_slot_cache_; | |
2176 context_slot_cache_ = NULL; | |
2177 delete keyed_lookup_cache_; | 2173 delete keyed_lookup_cache_; |
2178 keyed_lookup_cache_ = NULL; | 2174 keyed_lookup_cache_ = NULL; |
2179 | 2175 |
2180 delete load_stub_cache_; | 2176 delete load_stub_cache_; |
2181 load_stub_cache_ = NULL; | 2177 load_stub_cache_ = NULL; |
2182 delete store_stub_cache_; | 2178 delete store_stub_cache_; |
2183 store_stub_cache_ = NULL; | 2179 store_stub_cache_ = NULL; |
2184 delete code_aging_helper_; | 2180 delete code_aging_helper_; |
2185 code_aging_helper_ = NULL; | 2181 code_aging_helper_ = NULL; |
2186 delete stats_table_; | 2182 delete stats_table_; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2317 heap_.SetStackLimits(); | 2313 heap_.SetStackLimits(); |
2318 | 2314 |
2319 #define ASSIGN_ELEMENT(CamelName, hacker_name) \ | 2315 #define ASSIGN_ELEMENT(CamelName, hacker_name) \ |
2320 isolate_addresses_[Isolate::k##CamelName##Address] = \ | 2316 isolate_addresses_[Isolate::k##CamelName##Address] = \ |
2321 reinterpret_cast<Address>(hacker_name##_address()); | 2317 reinterpret_cast<Address>(hacker_name##_address()); |
2322 FOR_EACH_ISOLATE_ADDRESS_NAME(ASSIGN_ELEMENT) | 2318 FOR_EACH_ISOLATE_ADDRESS_NAME(ASSIGN_ELEMENT) |
2323 #undef ASSIGN_ELEMENT | 2319 #undef ASSIGN_ELEMENT |
2324 | 2320 |
2325 compilation_cache_ = new CompilationCache(this); | 2321 compilation_cache_ = new CompilationCache(this); |
2326 keyed_lookup_cache_ = new KeyedLookupCache(); | 2322 keyed_lookup_cache_ = new KeyedLookupCache(); |
2327 context_slot_cache_ = new ContextSlotCache(); | |
2328 descriptor_lookup_cache_ = new DescriptorLookupCache(); | 2323 descriptor_lookup_cache_ = new DescriptorLookupCache(); |
2329 unicode_cache_ = new UnicodeCache(); | 2324 unicode_cache_ = new UnicodeCache(); |
2330 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); | 2325 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); |
2331 global_handles_ = new GlobalHandles(this); | 2326 global_handles_ = new GlobalHandles(this); |
2332 eternal_handles_ = new EternalHandles(); | 2327 eternal_handles_ = new EternalHandles(); |
2333 bootstrapper_ = new Bootstrapper(this); | 2328 bootstrapper_ = new Bootstrapper(this); |
2334 handle_scope_implementer_ = new HandleScopeImplementer(this); | 2329 handle_scope_implementer_ = new HandleScopeImplementer(this); |
2335 load_stub_cache_ = new StubCache(this, Code::LOAD_IC); | 2330 load_stub_cache_ = new StubCache(this, Code::LOAD_IC); |
2336 store_stub_cache_ = new StubCache(this, Code::STORE_IC); | 2331 store_stub_cache_ = new StubCache(this, Code::STORE_IC); |
2337 materialized_object_store_ = new MaterializedObjectStore(this); | 2332 materialized_object_store_ = new MaterializedObjectStore(this); |
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3179 // Then check whether this scope intercepts. | 3174 // Then check whether this scope intercepts. |
3180 if ((flag & intercept_mask_)) { | 3175 if ((flag & intercept_mask_)) { |
3181 intercepted_flags_ |= flag; | 3176 intercepted_flags_ |= flag; |
3182 return true; | 3177 return true; |
3183 } | 3178 } |
3184 return false; | 3179 return false; |
3185 } | 3180 } |
3186 | 3181 |
3187 } // namespace internal | 3182 } // namespace internal |
3188 } // namespace v8 | 3183 } // namespace v8 |
OLD | NEW |