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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1355 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; | 1355 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; |
1356 unibrow::Mapping<unibrow::Ecma262Canonicalize> | 1356 unibrow::Mapping<unibrow::Ecma262Canonicalize> |
1357 regexp_macro_assembler_canonicalize_; | 1357 regexp_macro_assembler_canonicalize_; |
1358 RegExpStack* regexp_stack_; | 1358 RegExpStack* regexp_stack_; |
1359 List<int> regexp_indices_; | 1359 List<int> regexp_indices_; |
1360 DateCache* date_cache_; | 1360 DateCache* date_cache_; |
1361 CallInterfaceDescriptorData* call_descriptor_data_; | 1361 CallInterfaceDescriptorData* call_descriptor_data_; |
1362 AccessCompilerData* access_compiler_data_; | 1362 AccessCompilerData* access_compiler_data_; |
1363 base::RandomNumberGenerator* random_number_generator_; | 1363 base::RandomNumberGenerator* random_number_generator_; |
1364 base::AtomicValue<RAILMode> rail_mode_; | 1364 base::AtomicValue<RAILMode> rail_mode_; |
| 1365 PromiseHook promise_hook_; |
1365 | 1366 |
1366 // Whether the isolate has been created for snapshotting. | 1367 // Whether the isolate has been created for snapshotting. |
1367 bool serializer_enabled_; | 1368 bool serializer_enabled_; |
1368 | 1369 |
1369 // True if fatal error has been signaled for this isolate. | 1370 // True if fatal error has been signaled for this isolate. |
1370 bool has_fatal_error_; | 1371 bool has_fatal_error_; |
1371 | 1372 |
1372 // True if this isolate was initialized from a snapshot. | 1373 // True if this isolate was initialized from a snapshot. |
1373 bool initialized_from_snapshot_; | 1374 bool initialized_from_snapshot_; |
1374 | 1375 |
1375 // True if PromiseHook feature is enabled. | |
1376 bool is_promisehook_enabled_; | |
1377 | |
1378 // True if ES2015 tail call elimination feature is enabled. | 1376 // True if ES2015 tail call elimination feature is enabled. |
1379 bool is_tail_call_elimination_enabled_; | 1377 bool is_tail_call_elimination_enabled_; |
1380 | 1378 |
1381 // True if the isolate is in background. This flag is used | 1379 // True if the isolate is in background. This flag is used |
1382 // to prioritize between memory usage and latency. | 1380 // to prioritize between memory usage and latency. |
1383 bool is_isolate_in_background_; | 1381 bool is_isolate_in_background_; |
1384 | 1382 |
1385 // Time stamp at initialization. | 1383 // Time stamp at initialization. |
1386 double time_millis_at_init_; | 1384 double time_millis_at_init_; |
1387 | 1385 |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1693 | 1691 |
1694 EmbeddedVector<char, 128> filename_; | 1692 EmbeddedVector<char, 128> filename_; |
1695 FILE* file_; | 1693 FILE* file_; |
1696 int scope_depth_; | 1694 int scope_depth_; |
1697 }; | 1695 }; |
1698 | 1696 |
1699 } // namespace internal | 1697 } // namespace internal |
1700 } // namespace v8 | 1698 } // namespace v8 |
1701 | 1699 |
1702 #endif // V8_ISOLATE_H_ | 1700 #endif // V8_ISOLATE_H_ |
OLD | NEW |