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
Shell Class Reference

#include <d8.h>

Inheritance diagram for Shell:
Collaboration diagram for Shell:

Static Public Member Functions

static bool ExecuteString (Handle< String > source, Handle< Value > name, bool print_result, bool report_exceptions)
 
static const char * ToCString (const v8::String::Utf8Value &value)
 
static void ReportException (TryCatch *try_catch)
 
static Handle< StringReadFile (const char *name)
 
static Persistent< ContextCreateEvaluationContext ()
 
static int RunMain (int argc, char *argv[])
 
static int Main (int argc, char *argv[])
 
static void Exit (int exit_code)
 
static Handle< ArrayGetCompletions (Handle< String > text, Handle< String > full)
 
static void OnExit ()
 
static int * LookupCounter (const char *name)
 
static void * CreateHistogram (const char *name, int min, int max, size_t buckets)
 
static void AddHistogramSample (void *histogram, int sample)
 
static void MapCounters (const char *name)
 
static Handle< ValuePrint (const Arguments &args)
 
static Handle< ValueWrite (const Arguments &args)
 
static Handle< ValueYield (const Arguments &args)
 
static Handle< ValueQuit (const Arguments &args)
 
static Handle< ValueVersion (const Arguments &args)
 
static Handle< ValueEnableProfiler (const Arguments &args)
 
static Handle< ValueDisableProfiler (const Arguments &args)
 
static Handle< ValueRead (const Arguments &args)
 
static Handle< ValueReadBuffer (const Arguments &args)
 
static Handle< StringReadFromStdin ()
 
static Handle< ValueReadLine (const Arguments &args)
 
static Handle< ValueLoad (const Arguments &args)
 
static Handle< ValueArrayBuffer (const Arguments &args)
 
static Handle< ValueInt8Array (const Arguments &args)
 
static Handle< ValueUint8Array (const Arguments &args)
 
static Handle< ValueInt16Array (const Arguments &args)
 
static Handle< ValueUint16Array (const Arguments &args)
 
static Handle< ValueInt32Array (const Arguments &args)
 
static Handle< ValueUint32Array (const Arguments &args)
 
static Handle< ValueFloat32Array (const Arguments &args)
 
static Handle< ValueFloat64Array (const Arguments &args)
 
static Handle< ValueUint8ClampedArray (const Arguments &args)
 
static Handle< ValueArrayBufferSlice (const Arguments &args)
 
static Handle< ValueArraySubArray (const Arguments &args)
 
static Handle< ValueArraySet (const Arguments &args)
 
static Handle< ValueOSObject (const Arguments &args)
 
static Handle< ValueSystem (const Arguments &args)
 
static Handle< ValueChangeDirectory (const Arguments &args)
 
static Handle< ValueSetEnvironment (const Arguments &args)
 
static Handle< ValueUnsetEnvironment (const Arguments &args)
 
static Handle< ValueSetUMask (const Arguments &args)
 
static Handle< ValueMakeDirectory (const Arguments &args)
 
static Handle< ValueRemoveDirectory (const Arguments &args)
 
static void AddOSMethods (Handle< ObjectTemplate > os_template)
 

Static Public Attributes

static LineEditorconsole = NULL
 
static const char * kPrompt = "d8> "
 
static ShellOptions options
 

Detailed Description

Definition at line 265 of file d8.h.

Member Function Documentation

void AddHistogramSample ( void *  histogram,
int  sample 
)
static

Definition at line 1041 of file d8.cc.

References Counter::AddSample().

Referenced by Shell::MapCounters().

Handle< Value > ChangeDirectory ( const Arguments args)
static

Definition at line 525 of file d8-posix.cc.

References Arguments::Length(), String::New(), NULL, v8::ThrowException(), and v8::Undefined().

Referenced by Shell::AddOSMethods().

Persistent< Context > CreateEvaluationContext ( )
static
void * CreateHistogram ( const char *  name,
int  min,
int  max,
size_t  buckets 
)
static

Definition at line 1033 of file d8.cc.

Referenced by Shell::MapCounters().

Handle< Value > DisableProfiler ( const Arguments args)
static

Definition at line 226 of file d8.cc.

References V8::PauseProfiler(), and v8::Undefined().

Handle< Value > EnableProfiler ( const Arguments args)
static

Definition at line 220 of file d8.cc.

References V8::ResumeProfiler(), and v8::Undefined().

void Exit ( int  exit_code)
static
Handle< Value > Float32Array ( const Arguments args)
static

Definition at line 820 of file d8.cc.

References v8::kExternalFloatArray.

Handle< Value > Float64Array ( const Arguments args)
static

Definition at line 826 of file d8.cc.

References v8::kExternalDoubleArray.

Handle< Array > GetCompletions ( Handle< String text,
Handle< String full 
)
static

Definition at line 905 of file d8.cc.

References Handle< T >::Cast(), HandleScope::Close(), and String::New().

Handle< Value > Int16Array ( const Arguments args)
static

Definition at line 799 of file d8.cc.

References v8::kExternalShortArray.

Handle< Value > Int32Array ( const Arguments args)
static

Definition at line 810 of file d8.cc.

References v8::kExternalIntArray.

Handle< Value > Int8Array ( const Arguments args)
static

Definition at line 789 of file d8.cc.

References v8::kExternalByteArray.

int * LookupCounter ( const char *  name)
static

Definition at line 1022 of file d8.cc.

References NULL, and Counter::ptr().

Referenced by Shell::MapCounters().

Handle< Value > MakeDirectory ( const Arguments args)
static

Definition at line 601 of file d8-posix.cc.

References Arguments::Length(), String::New(), NULL, v8::ThrowException(), and v8::Undefined().

Referenced by Shell::AddOSMethods().

static Handle<Value> OSObject ( const Arguments args)
static
Handle< Value > Print ( const Arguments args)
static

Definition at line 189 of file d8.cc.

References Shell::Write().

Handle< Value > Quit ( const Arguments args)
static

Definition at line 843 of file d8.cc.

References Shell::OnExit(), and v8::Undefined().

Handle< Value > Read ( const Arguments args)
static

Definition at line 232 of file d8.cc.

References Handle< T >::IsEmpty(), String::New(), NULL, Shell::ReadFile(), and v8::ThrowException().

Handle< String > ReadFile ( const char *  name)
static

Definition at line 1430 of file d8.cc.

References String::New(), and NULL.

Referenced by Shell::Load(), Shell::Read(), and ShellThread::Run().

Handle< String > ReadFromStdin ( )
static

Definition at line 245 of file d8.cc.

References String::Concat(), Isolate::GetCurrent(), String::New(), and NULL.

Referenced by DumbLineEditor::Prompt(), and Shell::ReadLine().

static Handle<Value> ReadLine ( const Arguments args)
inlinestatic

Definition at line 314 of file d8.h.

References Shell::ReadFromStdin().

Handle< Value > RemoveDirectory ( const Arguments args)
static

Definition at line 624 of file d8-posix.cc.

References Arguments::Length(), String::New(), NULL, v8::ThrowException(), and v8::Undefined().

Referenced by Shell::AddOSMethods().

void ReportException ( v8::TryCatch try_catch)
static
Handle< Value > SetEnvironment ( const Arguments args)
static

Definition at line 639 of file d8-posix.cc.

References Arguments::Length(), String::New(), NULL, v8::ThrowException(), and v8::Undefined().

Referenced by Shell::AddOSMethods().

Handle< Value > SetUMask ( const Arguments args)
static

Definition at line 542 of file d8-posix.cc.

References Arguments::Length(), String::New(), Number::New(), and v8::ThrowException().

Referenced by Shell::AddOSMethods().

const char * ToCString ( const v8::String::Utf8Value value)
static

Definition at line 137 of file d8.cc.

Referenced by Shell::ReportException().

Handle< Value > Uint16Array ( const Arguments args)
static

Definition at line 804 of file d8.cc.

References v8::kExternalUnsignedShortArray.

Handle< Value > Uint32Array ( const Arguments args)
static

Definition at line 815 of file d8.cc.

References v8::kExternalUnsignedIntArray.

Handle< Value > Uint8Array ( const Arguments args)
static

Definition at line 794 of file d8.cc.

References v8::kExternalUnsignedByteArray.

Handle< Value > Uint8ClampedArray ( const Arguments args)
static

Definition at line 832 of file d8.cc.

References v8::kExternalPixelArray.

Handle< Value > UnsetEnvironment ( const Arguments args)
static

Definition at line 661 of file d8-posix.cc.

References Arguments::Length(), String::New(), NULL, v8::ThrowException(), and v8::Undefined().

Referenced by Shell::AddOSMethods().

Handle< Value > Version ( const Arguments args)
static

Definition at line 853 of file d8.cc.

References V8::GetVersion(), and String::New().

Handle< Value > Write ( const Arguments args)
static
Handle< Value > Yield ( const Arguments args)
static

Definition at line 837 of file d8.cc.

References v8::Undefined().

Field Documentation

LineEditor * console = NULL
static

Definition at line 368 of file d8.h.

Referenced by Shell::OnExit().

const char * kPrompt = "d8> "
static

Definition at line 369 of file d8.h.

ShellOptions options
static

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