v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <v8.h>
Data Structures | |
struct | CachedData |
class | Source |
Public Types | |
enum | CompileOptions { kNoCompileOptions, kProduceDataToCache = 1 << 0 } |
Static Public Member Functions | |
static Local< UnboundScript > | CompileUnbound (Isolate *isolate, Source *source, CompileOptions options=kNoCompileOptions) |
static Local< Script > | Compile (Isolate *isolate, Source *source, CompileOptions options=kNoCompileOptions) |
enum CompileOptions |
|
static |
Compiles the specified script (bound to current context).
source | Script source code. |
pre_data | Pre-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. |
Definition at line 1816 of file api.cc.
References ScriptCompiler::CompileUnbound(), ENTER_V8, LOG_API, and ON_BAILOUT.
Referenced by Script::Compile(), and TEST().
|
static |
Compiles the specified script (context-independent).
source | Script source code. |
Definition at line 1723 of file api.cc.
References ASSERT, ScriptCompiler::CachedData::BufferOwned, Compiler::CompileScript(), v8::internal::CONSUME_CACHED_DATA, ScriptCompiler::CachedData::data, ENTER_V8, EXCEPTION_BAILOUT_CHECK, EXCEPTION_PREAMBLE, Isolate::global_context(), Handle< T >::is_null(), Handle< T >::IsEmpty(), ScriptCompiler::kProduceDataToCache, ScriptCompiler::CachedData::length, LOG_API, ScriptData::New(), v8::internal::NO_CACHED_DATA, v8::internal::NOT_NATIVES_CODE, NULL, ON_BAILOUT, Utils::OpenHandle(), v8::internal::PRODUCE_CACHED_DATA, ScriptDataImpl::SanityCheck(), and v8::True().
Referenced by ScriptCompiler::Compile(), Shell::ExecuteString(), Shell::RealmEval(), TEST(), and THREADED_TEST().