v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <v8.h>
Public Member Functions | |
virtual | ~ScriptData () |
virtual int | Length ()=0 |
virtual const char * | Data ()=0 |
virtual bool | HasError ()=0 |
Static Public Member Functions | |
static ScriptData * | PreCompile (Handle< String > source) |
static ScriptData * | New (const char *data, int length) |
Pre-compilation data that can be associated with a script. This data can be calculated for a script in advance of actually compiling it, and can be stored between compilations. When script data is given to the compile method compilation will be faster.
|
inlinevirtual |
|
pure virtual |
Returns a serialized representation of this ScriptData that can later be passed to New(). NOTE: Serialized data is platform-dependent.
Implemented in ScriptDataImpl.
Referenced by Script::Compile(), and TEST().
|
pure virtual |
Returns true if the source code could not be parsed.
Implemented in ScriptDataImpl.
Referenced by TEST().
|
pure virtual |
Returns the length of Data().
Implemented in ScriptDataImpl.
Referenced by Script::Compile(), and TEST().
|
static |
Load previous pre-compilation data.
data | Pointer to data returned by a call to Data() of a previous ScriptData. Ownership is not transferred. |
length | Length of data. |
Definition at line 1587 of file api.cc.
References v8::internal::CopyBytes().
Referenced by ScriptCompiler::CompileUnbound(), and TEST().
|
static |
Pre-compiles the specified script (context-independent).
NOTE: Pre-compilation using this method cannot happen on another thread without using Lockers.
source | Script source code. |
Definition at line 1573 of file api.cc.
References Utils::OpenHandle(), and PreParserApi::PreParse().
Referenced by TEST().