Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Side by Side Diff: src/isolate.h

Issue 2575313002: [promisehook] Implement PromiseHook (Closed)
Patch Set: rebase + add comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/external-reference-table.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; 1359 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_;
1360 unibrow::Mapping<unibrow::Ecma262Canonicalize> 1360 unibrow::Mapping<unibrow::Ecma262Canonicalize>
1361 regexp_macro_assembler_canonicalize_; 1361 regexp_macro_assembler_canonicalize_;
1362 RegExpStack* regexp_stack_; 1362 RegExpStack* regexp_stack_;
1363 List<int> regexp_indices_; 1363 List<int> regexp_indices_;
1364 DateCache* date_cache_; 1364 DateCache* date_cache_;
1365 CallInterfaceDescriptorData* call_descriptor_data_; 1365 CallInterfaceDescriptorData* call_descriptor_data_;
1366 AccessCompilerData* access_compiler_data_; 1366 AccessCompilerData* access_compiler_data_;
1367 base::RandomNumberGenerator* random_number_generator_; 1367 base::RandomNumberGenerator* random_number_generator_;
1368 base::AtomicValue<RAILMode> rail_mode_; 1368 base::AtomicValue<RAILMode> rail_mode_;
1369 PromiseHook promise_hook_;
1369 base::Mutex rail_mutex_; 1370 base::Mutex rail_mutex_;
1370 double load_start_time_ms_; 1371 double load_start_time_ms_;
1371 1372
1372 // Whether the isolate has been created for snapshotting. 1373 // Whether the isolate has been created for snapshotting.
1373 bool serializer_enabled_; 1374 bool serializer_enabled_;
1374 1375
1375 // True if fatal error has been signaled for this isolate. 1376 // True if fatal error has been signaled for this isolate.
1376 bool has_fatal_error_; 1377 bool has_fatal_error_;
1377 1378
1378 // True if this isolate was initialized from a snapshot. 1379 // True if this isolate was initialized from a snapshot.
1379 bool initialized_from_snapshot_; 1380 bool initialized_from_snapshot_;
1380 1381
1381 // True if PromiseHook feature is enabled.
1382 bool is_promisehook_enabled_;
1383
1384 // True if ES2015 tail call elimination feature is enabled. 1382 // True if ES2015 tail call elimination feature is enabled.
1385 bool is_tail_call_elimination_enabled_; 1383 bool is_tail_call_elimination_enabled_;
1386 1384
1387 // True if the isolate is in background. This flag is used 1385 // True if the isolate is in background. This flag is used
1388 // to prioritize between memory usage and latency. 1386 // to prioritize between memory usage and latency.
1389 bool is_isolate_in_background_; 1387 bool is_isolate_in_background_;
1390 1388
1391 // Time stamp at initialization. 1389 // Time stamp at initialization.
1392 double time_millis_at_init_; 1390 double time_millis_at_init_;
1393 1391
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 1697
1700 EmbeddedVector<char, 128> filename_; 1698 EmbeddedVector<char, 128> filename_;
1701 FILE* file_; 1699 FILE* file_;
1702 int scope_depth_; 1700 int scope_depth_;
1703 }; 1701 };
1704 1702
1705 } // namespace internal 1703 } // namespace internal
1706 } // namespace v8 1704 } // namespace v8
1707 1705
1708 #endif // V8_ISOLATE_H_ 1706 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/external-reference-table.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698