| 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 #ifndef V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
| 6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <queue> | 9 #include <queue> |
| 10 | 10 |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_ACCESSOR) | 864 ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_ACCESSOR) |
| 865 #undef GLOBAL_ARRAY_ACCESSOR | 865 #undef GLOBAL_ARRAY_ACCESSOR |
| 866 | 866 |
| 867 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \ | 867 #define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \ |
| 868 inline Handle<type> name(); \ | 868 inline Handle<type> name(); \ |
| 869 inline bool is_##name(type* value); | 869 inline bool is_##name(type* value); |
| 870 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR) | 870 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR) |
| 871 #undef NATIVE_CONTEXT_FIELD_ACCESSOR | 871 #undef NATIVE_CONTEXT_FIELD_ACCESSOR |
| 872 | 872 |
| 873 Bootstrapper* bootstrapper() { return bootstrapper_; } | 873 Bootstrapper* bootstrapper() { return bootstrapper_; } |
| 874 Counters* counters() { | 874 // Use for updating counters on a foreground thread. |
| 875 // Call InitializeLoggingAndCounters() if logging is needed before | 875 Counters* counters() { return async_counters().get(); } |
| 876 // the isolate is fully initialized. | 876 // Use for updating counters on a background thread. |
| 877 DCHECK_NOT_NULL(counters_shared_.get()); | 877 const std::shared_ptr<Counters>& async_counters() { |
| 878 return counters_shared_.get(); | 878 DCHECK(!IsIsolateInBackground()); |
| 879 // Make sure InitializeCounters() has been called. |
| 880 DCHECK_NOT_NULL(async_counters_.get()); |
| 881 return async_counters_; |
| 879 } | 882 } |
| 880 std::shared_ptr<Counters> counters_shared() { return counters_shared_; } | |
| 881 RuntimeProfiler* runtime_profiler() { return runtime_profiler_; } | 883 RuntimeProfiler* runtime_profiler() { return runtime_profiler_; } |
| 882 CompilationCache* compilation_cache() { return compilation_cache_; } | 884 CompilationCache* compilation_cache() { return compilation_cache_; } |
| 883 Logger* logger() { | 885 Logger* logger() { |
| 884 // Call InitializeLoggingAndCounters() if logging is needed before | 886 // Call InitializeLoggingAndCounters() if logging is needed before |
| 885 // the isolate is fully initialized. | 887 // the isolate is fully initialized. |
| 886 DCHECK_NOT_NULL(logger_); | 888 DCHECK_NOT_NULL(logger_); |
| 887 return logger_; | 889 return logger_; |
| 888 } | 890 } |
| 889 StackGuard* stack_guard() { return &stack_guard_; } | 891 StackGuard* stack_guard() { return &stack_guard_; } |
| 890 Heap* heap() { return &heap_; } | 892 Heap* heap() { return &heap_; } |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1436 CpuProfiler* cpu_profiler() const { return cpu_profiler_; } | 1438 CpuProfiler* cpu_profiler() const { return cpu_profiler_; } |
| 1437 | 1439 |
| 1438 base::Atomic32 id_; | 1440 base::Atomic32 id_; |
| 1439 EntryStackItem* entry_stack_; | 1441 EntryStackItem* entry_stack_; |
| 1440 int stack_trace_nesting_level_; | 1442 int stack_trace_nesting_level_; |
| 1441 StringStream* incomplete_message_; | 1443 StringStream* incomplete_message_; |
| 1442 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT | 1444 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT |
| 1443 Bootstrapper* bootstrapper_; | 1445 Bootstrapper* bootstrapper_; |
| 1444 RuntimeProfiler* runtime_profiler_; | 1446 RuntimeProfiler* runtime_profiler_; |
| 1445 CompilationCache* compilation_cache_; | 1447 CompilationCache* compilation_cache_; |
| 1446 std::shared_ptr<Counters> counters_shared_; | 1448 std::shared_ptr<Counters> async_counters_; |
| 1447 base::RecursiveMutex break_access_; | 1449 base::RecursiveMutex break_access_; |
| 1448 Logger* logger_; | 1450 Logger* logger_; |
| 1449 StackGuard stack_guard_; | 1451 StackGuard stack_guard_; |
| 1450 StubCache* load_stub_cache_; | 1452 StubCache* load_stub_cache_; |
| 1451 StubCache* store_stub_cache_; | 1453 StubCache* store_stub_cache_; |
| 1452 CodeAgingHelper* code_aging_helper_; | 1454 CodeAgingHelper* code_aging_helper_; |
| 1453 DeoptimizerData* deoptimizer_data_; | 1455 DeoptimizerData* deoptimizer_data_; |
| 1454 bool deoptimizer_lazy_throw_; | 1456 bool deoptimizer_lazy_throw_; |
| 1455 MaterializedObjectStore* materialized_object_store_; | 1457 MaterializedObjectStore* materialized_object_store_; |
| 1456 ThreadLocalTop thread_local_top_; | 1458 ThreadLocalTop thread_local_top_; |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1831 | 1833 |
| 1832 EmbeddedVector<char, 128> filename_; | 1834 EmbeddedVector<char, 128> filename_; |
| 1833 FILE* file_; | 1835 FILE* file_; |
| 1834 int scope_depth_; | 1836 int scope_depth_; |
| 1835 }; | 1837 }; |
| 1836 | 1838 |
| 1837 } // namespace internal | 1839 } // namespace internal |
| 1838 } // namespace v8 | 1840 } // namespace v8 |
| 1839 | 1841 |
| 1840 #endif // V8_ISOLATE_H_ | 1842 #endif // V8_ISOLATE_H_ |
| OLD | NEW |