|
v8
9.0.257(node16.0.0)
V8 is Google's open source JavaScript engine
|
Go to the documentation of this file.
5 #ifndef V8_V8_PLATFORM_H_
6 #define V8_V8_PLATFORM_H_
47 virtual ~
Task() =
default;
49 virtual void Run() = 0;
61 virtual void Run(
double deadline_in_seconds) = 0;
101 double delay_in_seconds) = 0;
120 double delay_in_seconds) {}
211 virtual void Join() = 0;
217 virtual void Cancel() = 0;
309 #if !defined(V8_USE_PERFETTO)
318 static uint8_t no = 0;
331 char phase,
const uint8_t* category_enabled_flag,
const char* name,
332 const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,
333 const char** arg_names,
const uint8_t* arg_types,
334 const uint64_t* arg_values,
336 unsigned int flags) {
340 char phase,
const uint8_t* category_enabled_flag,
const char* name,
341 const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,
342 const char** arg_names,
const uint8_t* arg_types,
343 const uint64_t* arg_values,
345 unsigned int flags, int64_t timestamp) {
354 const char* name, uint64_t handle) {}
425 virtual void*
AllocatePages(
void* address, size_t length, size_t alignment,
431 virtual bool FreePages(
void* address, size_t length) = 0;
437 size_t new_length) = 0;
473 void* new_address)
const = 0;
475 virtual size_t
GetSize()
const = 0;
501 size_t length,
const void* original_address) {
603 double delay_in_seconds) = 0;
virtual size_t GetMaxConcurrency() const
virtual bool IsCompleted()
virtual void PostTask(std::unique_ptr< Task > task)=0
virtual void PostDelayedTask(std::unique_ptr< Task > task, double delay_in_seconds)=0
virtual size_t GetMaxConcurrency(size_t worker_count) const =0
virtual void UpdatePriority(TaskPriority new_priority)
virtual ~IdleTask()=default
virtual void OnTraceDisabled()=0
virtual uint64_t AddTraceEvent(char phase, const uint8_t *category_enabled_flag, const char *name, const char *scope, uint64_t id, uint64_t bind_id, int32_t num_args, const char **arg_names, const uint8_t *arg_types, const uint64_t *arg_values, std::unique_ptr< ConvertableToTraceFormat > *arg_convertables, unsigned int flags)
virtual std::unique_ptr< SharedMemory > AllocateSharedPages(size_t length, const void *original_address)
virtual bool IdleTasksEnabled()=0
virtual bool UpdatePriorityEnabled() const
virtual bool SetPermissions(void *address, size_t length, Permission permissions)=0
virtual ~SharedMemory()=default
virtual bool CanAllocateSharedPages()
virtual void * GetRandomMmapAddr()=0
virtual ~TraceStateObserver()=default
virtual void Run(JobDelegate *delegate)=0
virtual void Run(double deadline_in_seconds)=0
virtual bool IsActive()=0
virtual void PostNonNestableTask(std::unique_ptr< Task > task)
virtual void UpdateTraceEventDuration(const uint8_t *category_enabled_flag, const char *name, uint64_t handle)
virtual uint64_t AddTraceEventWithTimestamp(char phase, const uint8_t *category_enabled_flag, const char *name, const char *scope, uint64_t id, uint64_t bind_id, int32_t num_args, const char **arg_names, const uint8_t *arg_types, const uint64_t *arg_values, std::unique_ptr< ConvertableToTraceFormat > *arg_convertables, unsigned int flags, int64_t timestamp)
virtual void * AllocatePages(void *address, size_t length, size_t alignment, Permission permissions)=0
virtual bool NonNestableTasksEnabled() const
virtual ~SharedMemoryMapping()=default
virtual bool NonNestableDelayedTasksEnabled() const
virtual size_t CommitPageSize()=0
virtual std::unique_ptr< SharedMemoryMapping > RemapTo(void *new_address) const =0
virtual ~PageAllocator()=default
virtual void CancelAndDetach()
virtual bool ReleasePages(void *address, size_t length, size_t new_length)=0
virtual uint8_t GetTaskId()=0
virtual void OnTraceEnabled()=0
virtual bool IsJoiningThread() const
virtual size_t AllocatePageSize()=0
virtual void PostNonNestableDelayedTask(std::unique_ptr< Task > task, double delay_in_seconds)
virtual void NotifyConcurrencyIncrease()=0
virtual bool ShouldYield()=0
#define V8_DEPRECATED(message)
virtual void * GetMemory() const =0
virtual ~JobHandle()=default
virtual bool FreePages(void *address, size_t length)=0
virtual void AddTraceStateObserver(TraceStateObserver *)
virtual void RemoveTraceStateObserver(TraceStateObserver *)
virtual void NotifyConcurrencyIncrease()=0
virtual bool DiscardSystemPages(void *address, size_t size)
TaskRunner(const TaskRunner &)=delete
virtual ~TracingController()=default
virtual const uint8_t * GetCategoryGroupEnabled(const char *name)
virtual ~TaskRunner()=default
virtual ~JobTask()=default
virtual void * GetMemory() const =0
TaskRunner & operator=(const TaskRunner &)=delete
virtual bool ReserveForSharedMemoryMapping(void *address, size_t size)
virtual void SetRandomMmapSeed(int64_t seed)=0
virtual size_t GetSize() const =0
virtual void PostIdleTask(std::unique_ptr< IdleTask > task)=0