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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 | 1118 |
1119 BasicBlockProfiler* GetOrCreateBasicBlockProfiler(); | 1119 BasicBlockProfiler* GetOrCreateBasicBlockProfiler(); |
1120 BasicBlockProfiler* basic_block_profiler() { return basic_block_profiler_; } | 1120 BasicBlockProfiler* basic_block_profiler() { return basic_block_profiler_; } |
1121 | 1121 |
1122 std::string GetTurboCfgFileName(); | 1122 std::string GetTurboCfgFileName(); |
1123 | 1123 |
1124 #if TRACE_MAPS | 1124 #if TRACE_MAPS |
1125 int GetNextUniqueSharedFunctionInfoId() { return next_unique_sfi_id_++; } | 1125 int GetNextUniqueSharedFunctionInfoId() { return next_unique_sfi_id_++; } |
1126 #endif | 1126 #endif |
1127 | 1127 |
1128 Address is_promisehook_enabled_address() { | 1128 Address promise_hook_address() { |
1129 return reinterpret_cast<Address>(&is_promisehook_enabled_); | 1129 return reinterpret_cast<Address>(&promise_hook_); |
1130 } | 1130 } |
1131 bool IsPromiseHookEnabled() { return is_promisehook_enabled_; } | 1131 void SetPromiseHook(PromiseHook hook); |
1132 void EnablePromiseHook(); | 1132 void RunPromiseHook(PromiseHookType type, Handle<JSPromise> promise, |
1133 void DisablePromiseHook(); | 1133 Handle<Object> parent); |
1134 | 1134 |
1135 // Support for dynamically disabling tail call elimination. | 1135 // Support for dynamically disabling tail call elimination. |
1136 Address is_tail_call_elimination_enabled_address() { | 1136 Address is_tail_call_elimination_enabled_address() { |
1137 return reinterpret_cast<Address>(&is_tail_call_elimination_enabled_); | 1137 return reinterpret_cast<Address>(&is_tail_call_elimination_enabled_); |
1138 } | 1138 } |
1139 bool is_tail_call_elimination_enabled() const { | 1139 bool is_tail_call_elimination_enabled() const { |
1140 return is_tail_call_elimination_enabled_; | 1140 return is_tail_call_elimination_enabled_; |
1141 } | 1141 } |
1142 void SetTailCallEliminationEnabled(bool enabled); | 1142 void SetTailCallEliminationEnabled(bool enabled); |
1143 | 1143 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 // Whether the isolate has been created for snapshotting. | 1366 // Whether the isolate has been created for snapshotting. |
1367 bool serializer_enabled_; | 1367 bool serializer_enabled_; |
1368 | 1368 |
1369 // True if fatal error has been signaled for this isolate. | 1369 // True if fatal error has been signaled for this isolate. |
1370 bool has_fatal_error_; | 1370 bool has_fatal_error_; |
1371 | 1371 |
1372 // True if this isolate was initialized from a snapshot. | 1372 // True if this isolate was initialized from a snapshot. |
1373 bool initialized_from_snapshot_; | 1373 bool initialized_from_snapshot_; |
1374 | 1374 |
1375 // True if PromiseHook feature is enabled. | 1375 // True if PromiseHook feature is enabled. |
1376 bool is_promisehook_enabled_; | 1376 PromiseHook promise_hook_; |
1377 | 1377 |
1378 // True if ES2015 tail call elimination feature is enabled. | 1378 // True if ES2015 tail call elimination feature is enabled. |
1379 bool is_tail_call_elimination_enabled_; | 1379 bool is_tail_call_elimination_enabled_; |
1380 | 1380 |
1381 // True if the isolate is in background. This flag is used | 1381 // True if the isolate is in background. This flag is used |
1382 // to prioritize between memory usage and latency. | 1382 // to prioritize between memory usage and latency. |
1383 bool is_isolate_in_background_; | 1383 bool is_isolate_in_background_; |
1384 | 1384 |
1385 // Time stamp at initialization. | 1385 // Time stamp at initialization. |
1386 double time_millis_at_init_; | 1386 double time_millis_at_init_; |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1693 | 1693 |
1694 EmbeddedVector<char, 128> filename_; | 1694 EmbeddedVector<char, 128> filename_; |
1695 FILE* file_; | 1695 FILE* file_; |
1696 int scope_depth_; | 1696 int scope_depth_; |
1697 }; | 1697 }; |
1698 | 1698 |
1699 } // namespace internal | 1699 } // namespace internal |
1700 } // namespace v8 | 1700 } // namespace v8 |
1701 | 1701 |
1702 #endif // V8_ISOLATE_H_ | 1702 #endif // V8_ISOLATE_H_ |
OLD | NEW |