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 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 | 1116 |
1117 BasicBlockProfiler* GetOrCreateBasicBlockProfiler(); | 1117 BasicBlockProfiler* GetOrCreateBasicBlockProfiler(); |
1118 BasicBlockProfiler* basic_block_profiler() { return basic_block_profiler_; } | 1118 BasicBlockProfiler* basic_block_profiler() { return basic_block_profiler_; } |
1119 | 1119 |
1120 std::string GetTurboCfgFileName(); | 1120 std::string GetTurboCfgFileName(); |
1121 | 1121 |
1122 #if TRACE_MAPS | 1122 #if TRACE_MAPS |
1123 int GetNextUniqueSharedFunctionInfoId() { return next_unique_sfi_id_++; } | 1123 int GetNextUniqueSharedFunctionInfoId() { return next_unique_sfi_id_++; } |
1124 #endif | 1124 #endif |
1125 | 1125 |
| 1126 Address is_promisehook_enabled_address() { |
| 1127 return reinterpret_cast<Address>(&is_promisehook_enabled_); |
| 1128 } |
| 1129 bool IsPromiseHookEnabled() { return is_promisehook_enabled_; } |
| 1130 void EnablePromiseHook(); |
| 1131 void DisablePromiseHook(); |
| 1132 |
1126 // Support for dynamically disabling tail call elimination. | 1133 // Support for dynamically disabling tail call elimination. |
1127 Address is_tail_call_elimination_enabled_address() { | 1134 Address is_tail_call_elimination_enabled_address() { |
1128 return reinterpret_cast<Address>(&is_tail_call_elimination_enabled_); | 1135 return reinterpret_cast<Address>(&is_tail_call_elimination_enabled_); |
1129 } | 1136 } |
1130 bool is_tail_call_elimination_enabled() const { | 1137 bool is_tail_call_elimination_enabled() const { |
1131 return is_tail_call_elimination_enabled_; | 1138 return is_tail_call_elimination_enabled_; |
1132 } | 1139 } |
1133 void SetTailCallEliminationEnabled(bool enabled); | 1140 void SetTailCallEliminationEnabled(bool enabled); |
1134 | 1141 |
1135 void AddDetachedContext(Handle<Context> context); | 1142 void AddDetachedContext(Handle<Context> context); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 | 1363 |
1357 // Whether the isolate has been created for snapshotting. | 1364 // Whether the isolate has been created for snapshotting. |
1358 bool serializer_enabled_; | 1365 bool serializer_enabled_; |
1359 | 1366 |
1360 // True if fatal error has been signaled for this isolate. | 1367 // True if fatal error has been signaled for this isolate. |
1361 bool has_fatal_error_; | 1368 bool has_fatal_error_; |
1362 | 1369 |
1363 // True if this isolate was initialized from a snapshot. | 1370 // True if this isolate was initialized from a snapshot. |
1364 bool initialized_from_snapshot_; | 1371 bool initialized_from_snapshot_; |
1365 | 1372 |
| 1373 // True if PromiseHook feature is enabled. |
| 1374 bool is_promisehook_enabled_; |
| 1375 |
1366 // True if ES2015 tail call elimination feature is enabled. | 1376 // True if ES2015 tail call elimination feature is enabled. |
1367 bool is_tail_call_elimination_enabled_; | 1377 bool is_tail_call_elimination_enabled_; |
1368 | 1378 |
1369 // True if the isolate is in background. This flag is used | 1379 // True if the isolate is in background. This flag is used |
1370 // to prioritize between memory usage and latency. | 1380 // to prioritize between memory usage and latency. |
1371 bool is_isolate_in_background_; | 1381 bool is_isolate_in_background_; |
1372 | 1382 |
1373 // Time stamp at initialization. | 1383 // Time stamp at initialization. |
1374 double time_millis_at_init_; | 1384 double time_millis_at_init_; |
1375 | 1385 |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 | 1691 |
1682 EmbeddedVector<char, 128> filename_; | 1692 EmbeddedVector<char, 128> filename_; |
1683 FILE* file_; | 1693 FILE* file_; |
1684 int scope_depth_; | 1694 int scope_depth_; |
1685 }; | 1695 }; |
1686 | 1696 |
1687 } // namespace internal | 1697 } // namespace internal |
1688 } // namespace v8 | 1698 } // namespace v8 |
1689 | 1699 |
1690 #endif // V8_ISOLATE_H_ | 1700 #endif // V8_ISOLATE_H_ |
OLD | NEW |