v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::Compiler Class Reference

#include <compiler.h>

Inheritance diagram for v8::internal::Compiler:
Collaboration diagram for v8::internal::Compiler:

Public Types

enum  ClearExceptionFlag { KEEP_EXCEPTION , CLEAR_EXCEPTION }
 

Static Public Member Functions

static bool Compile (Isolate *isolate, Handle< SharedFunctionInfo > shared, ClearExceptionFlag flag, IsCompiledScope *is_compiled_scope, CreateSourcePositions create_source_positions_flag=CreateSourcePositions::kNo)
 
static bool Compile (Isolate *isolate, DirectHandle< JSFunction > function, ClearExceptionFlag flag, IsCompiledScope *is_compiled_scope)
 
static MaybeHandle< SharedFunctionInfoCompileToplevel (ParseInfo *parse_info, Handle< Script > script, Isolate *isolate, IsCompiledScope *is_compiled_scope)
 
static bool CompileSharedWithBaseline (Isolate *isolate, Handle< SharedFunctionInfo > shared, ClearExceptionFlag flag, IsCompiledScope *is_compiled_scope)
 
static bool CompileBaseline (Isolate *isolate, DirectHandle< JSFunction > function, ClearExceptionFlag flag, IsCompiledScope *is_compiled_scope)
 
static void CompileOptimized (Isolate *isolate, DirectHandle< JSFunction > function, ConcurrencyMode mode, CodeKind code_kind)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< CodeCompileOptimizedOSR (Isolate *isolate, DirectHandle< JSFunction > function, BytecodeOffset osr_offset, ConcurrencyMode mode, CodeKind code_kind)
 
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< SharedFunctionInfoCompileForLiveEdit (ParseInfo *parse_info, Handle< Script > script, MaybeDirectHandle< ScopeInfo > outer_scope_info, Isolate *isolate)
 
static bool CollectSourcePositions (Isolate *isolate, DirectHandle< SharedFunctionInfo > shared)
 
static bool FinalizeBackgroundCompileTask (BackgroundCompileTask *task, Isolate *isolate, ClearExceptionFlag flag)
 
static void DisposeTurbofanCompilationJob (Isolate *isolate, TurbofanCompilationJob *job)
 
static void FinalizeTurbofanCompilationJob (TurbofanCompilationJob *job, Isolate *isolate)
 
static void FinalizeMaglevCompilationJob (maglev::MaglevCompilationJob *job, Isolate *isolate)
 
static void DisposeMaglevCompilationJob (maglev::MaglevCompilationJob *job, Isolate *isolate)
 
static void PostInstantiation (Isolate *isolate, DirectHandle< JSFunction > function, IsCompiledScope *is_compiled_scope)
 
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< JSFunctionGetFunctionFromEval (DirectHandle< String > source, DirectHandle< SharedFunctionInfo > outer_info, DirectHandle< Context > context, LanguageMode language_mode, ParseRestriction restriction, int parameters_end_pos, int eval_position, ParsingWhileDebugging parsing_while_debugging=ParsingWhileDebugging::kNo)
 
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< JSFunctionGetWrappedFunction (Handle< String > source, DirectHandle< Context > context, const ScriptDetails &script_details, AlignedCachedData *cached_data, v8::ScriptCompiler::CompileOptions compile_options, v8::ScriptCompiler::NoCacheReason no_cache_reason)
 
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< JSFunctionGetFunctionFromString (DirectHandle< NativeContext > context, Handle< i::Object > source, int parameters_end_pos, bool is_code_like)
 
static V8_WARN_UNUSED_RESULT std::pair< MaybeDirectHandle< String >, boolValidateDynamicCompilationSource (Isolate *isolate, DirectHandle< NativeContext > context, Handle< i::Object > source_object, bool is_code_like=false)
 
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< JSFunctionGetFunctionFromValidatedString (DirectHandle< NativeContext > context, MaybeDirectHandle< String > source, ParseRestriction restriction, int parameters_end_pos)
 
static MaybeDirectHandle< SharedFunctionInfoGetSharedFunctionInfoForScript (Isolate *isolate, Handle< String > source, const ScriptDetails &script_details, ScriptCompiler::CompileOptions compile_options, ScriptCompiler::NoCacheReason no_cache_reason, NativesFlag is_natives_code, ScriptCompiler::CompilationDetails *compilation_details)
 
static MaybeDirectHandle< SharedFunctionInfoGetSharedFunctionInfoForScriptWithExtension (Isolate *isolate, Handle< String > source, const ScriptDetails &script_details, v8::Extension *extension, ScriptCompiler::CompileOptions compile_options, NativesFlag is_natives_code, ScriptCompiler::CompilationDetails *compilation_details)
 
static MaybeDirectHandle< SharedFunctionInfoGetSharedFunctionInfoForScriptWithCachedData (Isolate *isolate, Handle< String > source, const ScriptDetails &script_details, AlignedCachedData *cached_data, ScriptCompiler::CompileOptions compile_options, ScriptCompiler::NoCacheReason no_cache_reason, NativesFlag is_natives_code, ScriptCompiler::CompilationDetails *compilation_details)
 
static MaybeDirectHandle< SharedFunctionInfoGetSharedFunctionInfoForScriptWithDeserializeTask (Isolate *isolate, Handle< String > source, const ScriptDetails &script_details, BackgroundDeserializeTask *deserialize_task, ScriptCompiler::CompileOptions compile_options, ScriptCompiler::NoCacheReason no_cache_reason, NativesFlag is_natives_code, ScriptCompiler::CompilationDetails *compilation_details)
 
static MaybeDirectHandle< SharedFunctionInfoGetSharedFunctionInfoForScriptWithCompileHints (Isolate *isolate, Handle< String > source, const ScriptDetails &script_details, v8::CompileHintCallback compile_hint_callback, void *compile_hint_callback_data, ScriptCompiler::CompileOptions compile_options, ScriptCompiler::NoCacheReason no_cache_reason, NativesFlag is_natives_code, ScriptCompiler::CompilationDetails *compilation_details)
 
static MaybeDirectHandle< SharedFunctionInfoGetSharedFunctionInfoForStreamedScript (Isolate *isolate, Handle< String > source, const ScriptDetails &script_details, ScriptStreamingData *streaming_data, ScriptCompiler::CompilationDetails *compilation_details)
 
template<typename IsolateT >
static DirectHandle< SharedFunctionInfoGetSharedFunctionInfo (FunctionLiteral *node, DirectHandle< Script > script, IsolateT *isolate)
 
static void LogFunctionCompilation (Isolate *isolate, LogEventListener::CodeTag code_type, DirectHandle< Script > script, DirectHandle< SharedFunctionInfo > shared, DirectHandle< FeedbackVector > vector, DirectHandle< AbstractCode > abstract_code, CodeKind kind, double time_taken_ms)
 
static void InstallInterpreterTrampolineCopy (Isolate *isolate, DirectHandle< SharedFunctionInfo > shared_info, LogEventListener::CodeTag log_tag)
 

Detailed Description

Definition at line 75 of file compiler.h.

Member Enumeration Documentation

◆ ClearExceptionFlag

Enumerator
KEEP_EXCEPTION 
CLEAR_EXCEPTION 

Definition at line 77 of file compiler.h.

Member Function Documentation

◆ CollectSourcePositions()

bool v8::internal::Compiler::CollectSourcePositions ( Isolate * isolate,
DirectHandle< SharedFunctionInfo > shared )
static

Definition at line 2799 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Compile() [1/2]

bool v8::internal::Compiler::Compile ( Isolate * isolate,
DirectHandle< JSFunction > function,
ClearExceptionFlag flag,
IsCompiledScope * is_compiled_scope )
static

Definition at line 3001 of file compiler.cc.

Here is the call graph for this function:

◆ Compile() [2/2]

bool v8::internal::Compiler::Compile ( Isolate * isolate,
Handle< SharedFunctionInfo > shared,
ClearExceptionFlag flag,
IsCompiledScope * is_compiled_scope,
CreateSourcePositions create_source_positions_flag = CreateSourcePositions::kNo )
static

Definition at line 2906 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CompileBaseline()

bool v8::internal::Compiler::CompileBaseline ( Isolate * isolate,
DirectHandle< JSFunction > function,
ClearExceptionFlag flag,
IsCompiledScope * is_compiled_scope )
static

Definition at line 3132 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CompileForLiveEdit()

MaybeDirectHandle< SharedFunctionInfo > v8::internal::Compiler::CompileForLiveEdit ( ParseInfo * parse_info,
Handle< Script > script,
MaybeDirectHandle< ScopeInfo > outer_scope_info,
Isolate * isolate )
static

Definition at line 3241 of file compiler.cc.

◆ CompileOptimized()

void v8::internal::Compiler::CompileOptimized ( Isolate * isolate,
DirectHandle< JSFunction > function,
ConcurrencyMode mode,
CodeKind code_kind )
static

Definition at line 3176 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CompileOptimizedOSR()

MaybeHandle< Code > v8::internal::Compiler::CompileOptimizedOSR ( Isolate * isolate,
DirectHandle< JSFunction > function,
BytecodeOffset osr_offset,
ConcurrencyMode mode,
CodeKind code_kind )
static

Definition at line 4368 of file compiler.cc.

Here is the caller graph for this function:

◆ CompileSharedWithBaseline()

bool v8::internal::Compiler::CompileSharedWithBaseline ( Isolate * isolate,
Handle< SharedFunctionInfo > shared,
Compiler::ClearExceptionFlag flag,
IsCompiledScope * is_compiled_scope )
static

Definition at line 3081 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CompileToplevel()

MaybeHandle< SharedFunctionInfo > v8::internal::Compiler::CompileToplevel ( ParseInfo * parse_info,
Handle< Script > script,
Isolate * isolate,
IsCompiledScope * is_compiled_scope )
static

Definition at line 3151 of file compiler.cc.

◆ DisposeMaglevCompilationJob()

void v8::internal::Compiler::DisposeMaglevCompilationJob ( maglev::MaglevCompilationJob * job,
Isolate * isolate )
static

Definition at line 4476 of file compiler.cc.

◆ DisposeTurbofanCompilationJob()

void v8::internal::Compiler::DisposeTurbofanCompilationJob ( Isolate * isolate,
TurbofanCompilationJob * job )
static

Definition at line 4400 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FinalizeBackgroundCompileTask()

bool v8::internal::Compiler::FinalizeBackgroundCompileTask ( BackgroundCompileTask * task,
Isolate * isolate,
ClearExceptionFlag flag )
static

Definition at line 3159 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FinalizeMaglevCompilationJob()

void v8::internal::Compiler::FinalizeMaglevCompilationJob ( maglev::MaglevCompilationJob * job,
Isolate * isolate )
static

Definition at line 4485 of file compiler.cc.

Here is the call graph for this function:

◆ FinalizeTurbofanCompilationJob()

void v8::internal::Compiler::FinalizeTurbofanCompilationJob ( TurbofanCompilationJob * job,
Isolate * isolate )
static

Definition at line 4410 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFunctionFromEval()

MaybeDirectHandle< JSFunction > v8::internal::Compiler::GetFunctionFromEval ( DirectHandle< String > source,
DirectHandle< SharedFunctionInfo > outer_info,
DirectHandle< Context > context,
LanguageMode language_mode,
ParseRestriction restriction,
int parameters_end_pos,
int eval_position,
ParsingWhileDebugging parsing_while_debugging = ParsingWhileDebugging::kNo )
static

Definition at line 3250 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFunctionFromString()

MaybeDirectHandle< JSFunction > v8::internal::Compiler::GetFunctionFromString ( DirectHandle< NativeContext > context,
Handle< i::Object > source,
int parameters_end_pos,
bool is_code_like )
static

Definition at line 3494 of file compiler.cc.

Here is the call graph for this function:

◆ GetFunctionFromValidatedString()

MaybeDirectHandle< JSFunction > v8::internal::Compiler::GetFunctionFromValidatedString ( DirectHandle< NativeContext > context,
MaybeDirectHandle< String > source,
ParseRestriction restriction,
int parameters_end_pos )
static

Definition at line 3470 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSharedFunctionInfo()

template<typename IsolateT >
template DirectHandle< SharedFunctionInfo > v8::internal::Compiler::GetSharedFunctionInfo ( FunctionLiteral * node,
DirectHandle< Script > script,
IsolateT * isolate )
static

Definition at line 4312 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSharedFunctionInfoForScript()

MaybeDirectHandle< SharedFunctionInfo > v8::internal::Compiler::GetSharedFunctionInfoForScript ( Isolate * isolate,
Handle< String > source,
const ScriptDetails & script_details,
ScriptCompiler::CompileOptions compile_options,
ScriptCompiler::NoCacheReason no_cache_reason,
NativesFlag is_natives_code,
ScriptCompiler::CompilationDetails * compilation_details )
static

Definition at line 4062 of file compiler.cc.

◆ GetSharedFunctionInfoForScriptWithCachedData()

MaybeDirectHandle< SharedFunctionInfo > v8::internal::Compiler::GetSharedFunctionInfoForScriptWithCachedData ( Isolate * isolate,
Handle< String > source,
const ScriptDetails & script_details,
AlignedCachedData * cached_data,
ScriptCompiler::CompileOptions compile_options,
ScriptCompiler::NoCacheReason no_cache_reason,
NativesFlag is_natives_code,
ScriptCompiler::CompilationDetails * compilation_details )
static

Definition at line 4086 of file compiler.cc.

◆ GetSharedFunctionInfoForScriptWithCompileHints()

MaybeDirectHandle< SharedFunctionInfo > v8::internal::Compiler::GetSharedFunctionInfoForScriptWithCompileHints ( Isolate * isolate,
Handle< String > source,
const ScriptDetails & script_details,
v8::CompileHintCallback compile_hint_callback,
void * compile_hint_callback_data,
ScriptCompiler::CompileOptions compile_options,
ScriptCompiler::NoCacheReason no_cache_reason,
NativesFlag is_natives_code,
ScriptCompiler::CompilationDetails * compilation_details )
static

Definition at line 4112 of file compiler.cc.

◆ GetSharedFunctionInfoForScriptWithDeserializeTask()

MaybeDirectHandle< SharedFunctionInfo > v8::internal::Compiler::GetSharedFunctionInfoForScriptWithDeserializeTask ( Isolate * isolate,
Handle< String > source,
const ScriptDetails & script_details,
BackgroundDeserializeTask * deserialize_task,
ScriptCompiler::CompileOptions compile_options,
ScriptCompiler::NoCacheReason no_cache_reason,
NativesFlag is_natives_code,
ScriptCompiler::CompilationDetails * compilation_details )
static

Definition at line 4098 of file compiler.cc.

◆ GetSharedFunctionInfoForScriptWithExtension()

MaybeDirectHandle< SharedFunctionInfo > v8::internal::Compiler::GetSharedFunctionInfoForScriptWithExtension ( Isolate * isolate,
Handle< String > source,
const ScriptDetails & script_details,
v8::Extension * extension,
ScriptCompiler::CompileOptions compile_options,
NativesFlag is_natives_code,
ScriptCompiler::CompilationDetails * compilation_details )
static

Definition at line 4074 of file compiler.cc.

Here is the caller graph for this function:

◆ GetSharedFunctionInfoForStreamedScript()

MaybeDirectHandle< SharedFunctionInfo > v8::internal::Compiler::GetSharedFunctionInfoForStreamedScript ( Isolate * isolate,
Handle< String > source,
const ScriptDetails & script_details,
ScriptStreamingData * streaming_data,
ScriptCompiler::CompilationDetails * compilation_details )
static

Definition at line 4241 of file compiler.cc.

Here is the call graph for this function:

◆ GetWrappedFunction()

MaybeDirectHandle< JSFunction > v8::internal::Compiler::GetWrappedFunction ( Handle< String > source,
DirectHandle< Context > context,
const ScriptDetails & script_details,
AlignedCachedData * cached_data,
v8::ScriptCompiler::CompileOptions compile_options,
v8::ScriptCompiler::NoCacheReason no_cache_reason )
static

Definition at line 4127 of file compiler.cc.

Here is the call graph for this function:

◆ InstallInterpreterTrampolineCopy()

void v8::internal::Compiler::InstallInterpreterTrampolineCopy ( Isolate * isolate,
DirectHandle< SharedFunctionInfo > shared_info,
LogEventListener::CodeTag log_tag )
static

Definition at line 681 of file compiler.cc.

Here is the call graph for this function:

◆ LogFunctionCompilation()

void v8::internal::Compiler::LogFunctionCompilation ( Isolate * isolate,
LogEventListener::CodeTag code_type,
DirectHandle< Script > script,
DirectHandle< SharedFunctionInfo > shared,
DirectHandle< FeedbackVector > vector,
DirectHandle< AbstractCode > abstract_code,
CodeKind kind,
double time_taken_ms )
static

Definition at line 298 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PostInstantiation()

void v8::internal::Compiler::PostInstantiation ( Isolate * isolate,
DirectHandle< JSFunction > function,
IsCompiledScope * is_compiled_scope )
static

Definition at line 4550 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ValidateDynamicCompilationSource()

std::pair< MaybeDirectHandle< String >, bool > v8::internal::Compiler::ValidateDynamicCompilationSource ( Isolate * isolate,
DirectHandle< NativeContext > context,
Handle< i::Object > source_object,
bool is_code_like = false )
static

Definition at line 3427 of file compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: