v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ScriptData Class Referenceabstract

#include <v8.h>

Inheritance diagram for ScriptData:

Public Member Functions

virtual ~ScriptData ()
 
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.

Definition at line 524 of file v8.h.

Constructor & Destructor Documentation

virtual ~ScriptData ( )
inlinevirtual

Definition at line 526 of file v8.h.

Member Function Documentation

virtual const char* Data ( )
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 TEST().

virtual bool HasError ( )
pure virtual

Returns true if the source code could not be parsed.

Implemented in ScriptDataImpl.

Referenced by TEST().

virtual int Length ( )
pure virtual

Returns the length of Data().

Implemented in ScriptDataImpl.

Referenced by TEST().

ScriptData * New ( const char *  data,
int  length 
)
static

Load previous pre-compilation data.

Parameters
dataPointer to data returned by a call to Data() of a previous ScriptData. Ownership is not transferred.
lengthLength of data.

Definition at line 1482 of file api.cc.

References OS::MemCopy().

Referenced by TEST().

ScriptData * PreCompile ( const char *  input,
int  length 
)
static

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

Parameters
inputPointer to UTF-8 script source code.
lengthLength of UTF-8 script source code.

Definition at line 1462 of file api.cc.

References NULL, and ParserApi::PreParse().

Referenced by TEST().

ScriptData * PreCompile ( v8::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
sourceScript source code.

Definition at line 1469 of file api.cc.

References NULL, and ParserApi::PreParse().


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