Public Member Functions | Static Public Member Functions

v8::ScriptData Class Reference

#include <v8.h>

List of all members.

Public Member Functions

virtual int Length ()=0
virtual const char * Data ()=0
virtual bool HasError ()=0

Static Public Member Functions

static ScriptDataPreCompile (const char *input, int length)
static ScriptDataPreCompile (Handle< String > source)
static ScriptDataNew (const char *data, int length)

Detailed Description

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.


Member Function Documentation

virtual const char* v8::ScriptData::Data (  )  [pure virtual]

Returns a serialized representation of this ScriptData that can later be passed to New(). NOTE: Serialized data is platform-dependent.

virtual bool v8::ScriptData::HasError (  )  [pure virtual]

Returns true if the source code could not be parsed.

virtual int v8::ScriptData::Length (  )  [pure virtual]

Returns the length of Data().

static ScriptData* v8::ScriptData::New ( const char *  data,
int  length 
) [static]

Load previous pre-compilation data.

Parameters:
data Pointer to data returned by a call to Data() of a previous ScriptData. Ownership is not transferred.
length Length of data.
static ScriptData* v8::ScriptData::PreCompile ( const char *  input,
int  length 
) [static]

Pre-compiles the specified script (context-independent).

Parameters:
input Pointer to UTF-8 script source code.
length Length of UTF-8 script source code.
static ScriptData* v8::ScriptData::PreCompile ( Handle< String source  )  [static]

Pre-compiles the specified script (context-independent).

NOTE: Pre-compilation using this method cannot happen on another thread without using Lockers.

Parameters:
source Script source code.

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