![]() |
v8 13.6.233 (node 24.1.0)
V8 is Google's open source JavaScript engine
|
#include <v8-script.h>
Public Member Functions | |
V8_WARN_UNUSED_RESULT MaybeLocal< Value > | Run (Local< Context > context) |
V8_WARN_UNUSED_RESULT MaybeLocal< Value > | Run (Local< Context > context, Local< Data > host_defined_options) |
Local< UnboundScript > | GetUnboundScript () |
Local< Value > | GetResourceName () |
std::vector< int > | GetProducedCompileHints () const |
Local< CompileHintsCollector > | GetCompileHintsCollector () const |
![]() | |
bool | IsValue () const |
bool | IsModule () const |
bool | IsModuleRequest () const |
bool | IsFixedArray () const |
bool | IsPrivate () const |
bool | IsObjectTemplate () const |
bool | IsFunctionTemplate () const |
bool | IsContext () const |
Static Public Member Functions | |
static V8_WARN_UNUSED_RESULT MaybeLocal< Script > | Compile (Local< Context > context, Local< String > source, ScriptOrigin *origin=nullptr) |
A compiled JavaScript script, tied to a Context which was active when the script was compiled.
Definition at line 353 of file v8-script.h.
|
static |
A shorthand for ScriptCompiler::Compile().
References V8_WARN_UNUSED_RESULT.
Local< CompileHintsCollector > GetCompileHintsCollector | ( | ) | const |
Get a compile hints collector object which we can use later for retrieving compile hints (= positions of lazy functions which were compiled and executed).
References GetCompileHintsCollector().
Referenced by GetCompileHintsCollector().
std::vector< int > GetProducedCompileHints | ( | ) | const |
If the script was compiled, returns the positions of lazy functions which were eventually compiled and executed.
References GetProducedCompileHints().
Referenced by GetProducedCompileHints().
The name that was passed by the embedder as ResourceName to the ScriptOrigin. This can be either a v8::String or v8::Undefined.
Local< UnboundScript > GetUnboundScript | ( | ) |
Returns the corresponding context-unbound script.
V8_WARN_UNUSED_RESULT MaybeLocal< Value > Run | ( | Local< Context > | context | ) |
Runs the script returning the resulting value. It will be run in the context in which it was created (ScriptCompiler::CompileBound or UnboundScript::BindToCurrentContext()).
References V8_WARN_UNUSED_RESULT.
V8_WARN_UNUSED_RESULT MaybeLocal< Value > Run | ( | Local< Context > | context, |
Local< Data > | host_defined_options ) |
References V8_WARN_UNUSED_RESULT.