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 "include/v8-debug.h" | 8 #include "include/v8-debug.h" |
9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 // Get (and lazily initialize) the registry for per-isolate symbols. | 1074 // Get (and lazily initialize) the registry for per-isolate symbols. |
1075 Handle<JSObject> GetSymbolRegistry(); | 1075 Handle<JSObject> GetSymbolRegistry(); |
1076 | 1076 |
1077 void AddCallCompletedCallback(CallCompletedCallback callback); | 1077 void AddCallCompletedCallback(CallCompletedCallback callback); |
1078 void RemoveCallCompletedCallback(CallCompletedCallback callback); | 1078 void RemoveCallCompletedCallback(CallCompletedCallback callback); |
1079 void FireCallCompletedCallback(); | 1079 void FireCallCompletedCallback(); |
1080 | 1080 |
1081 void EnqueueMicrotask(Handle<Object> microtask); | 1081 void EnqueueMicrotask(Handle<Object> microtask); |
1082 void RunMicrotasks(); | 1082 void RunMicrotasks(); |
1083 | 1083 |
| 1084 void SetUseCounterCallback(v8::Isolate::UseCounterCallback callback); |
| 1085 void CountUsage(v8::Isolate::UseCounterFeature feature); |
| 1086 |
1084 private: | 1087 private: |
1085 Isolate(); | 1088 Isolate(); |
1086 | 1089 |
1087 friend struct GlobalState; | 1090 friend struct GlobalState; |
1088 friend struct InitializeGlobalState; | 1091 friend struct InitializeGlobalState; |
1089 | 1092 |
1090 enum State { | 1093 enum State { |
1091 UNINITIALIZED, // Some components may not have been allocated. | 1094 UNINITIALIZED, // Some components may not have been allocated. |
1092 INITIALIZED // All components are fully initialized. | 1095 INITIALIZED // All components are fully initialized. |
1093 }; | 1096 }; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1293 int num_sweeper_threads_; | 1296 int num_sweeper_threads_; |
1294 | 1297 |
1295 // Counts deopt points if deopt_every_n_times is enabled. | 1298 // Counts deopt points if deopt_every_n_times is enabled. |
1296 unsigned int stress_deopt_count_; | 1299 unsigned int stress_deopt_count_; |
1297 | 1300 |
1298 int next_optimization_id_; | 1301 int next_optimization_id_; |
1299 | 1302 |
1300 // List of callbacks when a Call completes. | 1303 // List of callbacks when a Call completes. |
1301 List<CallCompletedCallback> call_completed_callbacks_; | 1304 List<CallCompletedCallback> call_completed_callbacks_; |
1302 | 1305 |
| 1306 v8::Isolate::UseCounterCallback use_counter_callback_; |
| 1307 |
1303 friend class ExecutionAccess; | 1308 friend class ExecutionAccess; |
1304 friend class HandleScopeImplementer; | 1309 friend class HandleScopeImplementer; |
1305 friend class IsolateInitializer; | 1310 friend class IsolateInitializer; |
1306 friend class OptimizingCompilerThread; | 1311 friend class OptimizingCompilerThread; |
1307 friend class SweeperThread; | 1312 friend class SweeperThread; |
1308 friend class ThreadManager; | 1313 friend class ThreadManager; |
1309 friend class Simulator; | 1314 friend class Simulator; |
1310 friend class StackGuard; | 1315 friend class StackGuard; |
1311 friend class ThreadId; | 1316 friend class ThreadId; |
1312 friend class TestMemoryAllocatorScope; | 1317 friend class TestMemoryAllocatorScope; |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 } | 1503 } |
1499 | 1504 |
1500 EmbeddedVector<char, 128> filename_; | 1505 EmbeddedVector<char, 128> filename_; |
1501 FILE* file_; | 1506 FILE* file_; |
1502 int scope_depth_; | 1507 int scope_depth_; |
1503 }; | 1508 }; |
1504 | 1509 |
1505 } } // namespace v8::internal | 1510 } } // namespace v8::internal |
1506 | 1511 |
1507 #endif // V8_ISOLATE_H_ | 1512 #endif // V8_ISOLATE_H_ |
OLD | NEW |