v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ScriptCompiler Class Reference

#include <v8.h>

Data Structures

struct  CachedData
 
class  Source
 

Public Types

enum  CompileOptions { kNoCompileOptions, kProduceDataToCache = 1 << 0 }
 

Static Public Member Functions

static Local< UnboundScriptCompileUnbound (Isolate *isolate, Source *source, CompileOptions options=kNoCompileOptions)
 
static Local< ScriptCompile (Isolate *isolate, Source *source, CompileOptions options=kNoCompileOptions)
 

Detailed Description

For compiling scripts.

Definition at line 1091 of file v8.h.

Member Enumeration Documentation

Enumerator
kNoCompileOptions 
kProduceDataToCache 

Definition at line 1165 of file v8.h.

Member Function Documentation

Local< Script > Compile ( Isolate isolate,
Source source,
CompileOptions  options = kNoCompileOptions 
)
static

Compiles the specified script (bound to current context).

Parameters
sourceScript source code.
pre_dataPre-parsing data, as obtained by ScriptData::PreCompile() using pre_data speeds compilation if it's done multiple times. Owned by caller, no references are kept when this function returns.
Returns
Compiled script object, bound to the context that was active when this function was called. When run it will always use this context.

Definition at line 1816 of file api.cc.

References ScriptCompiler::CompileUnbound(), ENTER_V8, LOG_API, and ON_BAILOUT.

Referenced by Script::Compile(), and TEST().


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