V8 Project
|
#include <d8.h>
Static Public Attributes | |
static const char * | kPrompt = "d8> " |
static ShellOptions | options |
Static Private Member Functions | |
static Counter * | GetCounter (const char *name, bool is_histogram) |
static void | InstallUtilityScript (Isolate *isolate) |
static void | Initialize (Isolate *isolate) |
static void | InitializeDebugger (Isolate *isolate) |
static void | RunShell (Isolate *isolate) |
static bool | SetOptions (int argc, char *argv[]) |
static Handle< ObjectTemplate > | CreateGlobalTemplate (Isolate *isolate) |
static Handle< FunctionTemplate > | CreateArrayBufferTemplate (FunctionCallback) |
static Handle< FunctionTemplate > | CreateArrayTemplate (FunctionCallback) |
static Handle< Value > | CreateExternalArrayBuffer (Isolate *isolate, Handle< Object > buffer, int32_t size) |
static Handle< Object > | CreateExternalArray (Isolate *isolate, Handle< Object > array, Handle< Object > buffer, ExternalArrayType type, int32_t length, int32_t byteLength, int32_t byteOffset, int32_t element_size) |
static void | CreateExternalArray (const v8::FunctionCallbackInfo< v8::Value > &args, ExternalArrayType type, int32_t element_size) |
static void | ExternalArrayWeakCallback (Isolate *isolate, Persistent< Object > *object, uint8_t *data) |
Static Private Attributes | |
static Persistent< Context > | evaluation_context_ |
static Persistent< Context > | utility_context_ |
static CounterMap * | counter_map_ |
static CounterCollection | local_counters_ |
static CounterCollection * | counters_ = &local_counters_ |
static base::OS::MemoryMappedFile * | counters_file_ = NULL |
static base::Mutex | context_mutex_ |
static const base::TimeTicks | kInitialTicks |
|
static |
Definition at line 781 of file d8.cc.
References v8::Counter::AddSample().
|
static |
Definition at line 709 of file d8-posix.cc.
References ChangeDirectory(), MakeDirectory(), v8::FunctionTemplate::New(), v8::String::NewFromUtf8(), RemoveDirectory(), SetEnvironment(), SetUMask(), System(), and UnsetEnvironment().
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 527 of file d8-posix.cc.
References v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::Length(), v8::String::NewFromUtf8(), NULL, and v8::Isolate::ThrowException().
Referenced by AddOSMethods().
|
static |
Definition at line 181 of file d8.cc.
References v8::ScriptCompiler::CachedData::BufferNotOwned, v8::ScriptCompiler::CompileUnbound(), v8::ScriptCompiler::CachedData::data, DCHECK, v8::ScriptCompiler::Source::GetCachedData(), v8::ScriptCompiler::kConsumeCodeCache, v8::ScriptCompiler::kConsumeParserCache, v8::ScriptCompiler::kProduceCodeCache, v8::ScriptCompiler::kProduceParserCache, v8::ScriptCompiler::CachedData::length, and name.
Referenced by ExecuteString().
|
staticprivate |
|
staticprivate |
Definition at line 960 of file d8.cc.
References v8::internal::CStrVector(), DCHECK, v8::EscapableHandleScope::Escape(), v8::Handle< T >::IsEmpty(), v8::Context::New(), v8::String::NewFromUtf8(), NULL, and v8::Utils::ToLocal().
Referenced by v8::SourceGroup::ExecuteInThread().
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
Definition at line 870 of file d8.cc.
References v8::ObjectTemplate::New(), v8::FunctionTemplate::New(), v8::String::NewFromUtf8(), and v8::internal::ReadLine().
|
static |
Definition at line 673 of file d8.cc.
References v8::Handle< T >::Cast(), v8::EscapableHandleScope::Escape(), v8::Local< T >::New(), and v8::String::NewFromUtf8().
Referenced by v8::HandleDebugEvent().
|
static |
Definition at line 657 of file d8.cc.
References v8::Handle< T >::Cast(), v8::EscapableHandleScope::Escape(), v8::Local< T >::New(), and v8::String::NewFromUtf8().
Referenced by v8::HandleDebugEvent().
|
static |
Definition at line 211 of file d8.cc.
References v8::Handle< T >::Cast(), v8::ShellOptions::compile_options, CompileString(), DCHECK, v8::PerIsolateData::Get(), v8::TryCatch::HasCaught(), v8::Handle< T >::IsEmpty(), v8::String::Utf8Value::length(), name, v8::Local< T >::New(), v8::String::NewFromUtf8(), options, v8::PerIsolateData::realm_current_, v8::PerIsolateData::realm_switch_, v8::PerIsolateData::realms_, ReportException(), v8::ShellOptions::script_executed, v8::TryCatch::SetVerbose(), v8::ShellOptions::test_shell, and utility_context_.
Referenced by v8::SourceGroup::Execute().
|
static |
Definition at line 991 of file d8.cc.
Referenced by v8::SourceGroup::Execute().
|
staticprivate |
|
static |
|
static |
|
static |
Definition at line 638 of file d8.cc.
References v8::Local< T >::Cast(), v8::EscapableHandleScope::Escape(), v8::Local< T >::New(), and v8::String::NewFromUtf8().
Referenced by v8::ReadLineEditor::CompletionGenerator().
Definition at line 746 of file d8.cc.
References v8::Counter::Bind(), DCHECK, v8::Counter::is_histogram(), name, and NULL.
|
staticprivate |
Definition at line 925 of file d8.cc.
References counter_map_, v8::Isolate::SetAddHistogramSampleFunction(), v8::Isolate::SetCounterFunction(), v8::Isolate::SetCreateHistogramFunction(), and v8::internal::StrLength().
|
staticprivate |
Definition at line 949 of file d8.cc.
References v8::Context::New(), and NULL.
|
staticprivate |
Definition at line 787 of file d8.cc.
References v8::Script::Compile(), v8::internal::Debug::debug_context(), v8::internal::Smi::FromInt(), v8::internal::NativesCollection< type >::GetIndex(), v8::internal::NativesCollection< type >::GetRawScriptSource(), v8::internal::NativesCollection< type >::GetScriptName(), v8::HandleDebugEvent(), v8::String::kNormalString, v8::internal::Vector< T >::length(), v8::internal::Debug::Load(), name, v8::Local< T >::New(), v8::String::NewFromUtf8(), v8::Utils::OpenHandle(), v8::Debug::SetDebugEventListener(), v8::internal::Vector< T >::start(), v8::Utils::ToLocal(), v8::internal::Script::TYPE_NATIVE, and v8::Undefined().
|
static |
|
static |
|
static |
|
static |
Definition at line 549 of file d8.cc.
References file(), v8::FunctionCallbackInfo< T >::GetIsolate(), v8::Handle< T >::IsEmpty(), v8::FunctionCallbackInfo< T >::Length(), v8::String::NewFromUtf8(), NULL, v8::internal::ReadFile(), and v8::Throw().
|
static |
Definition at line 762 of file d8.cc.
References name, NULL, and v8::Counter::ptr().
Definition at line 1603 of file d8.cc.
References v8::Isolate::CreateParams::code_event_handler, v8::ResourceConstraints::ConfigureDefaults(), v8::Isolate::CreateParams::constraints, v8::platform::CreateDefaultPlatform(), v8::Testing::DeoptimizeAll(), v8::Isolate::Dispose(), v8::V8::Dispose(), v8::DumpHeapConstants(), v8::Testing::GetStressRuns(), v8::V8::Initialize(), v8::V8::InitializeICU(), v8::V8::InitializePlatform(), vTune::InitializeVtuneForV8(), v8::Testing::kStressTypeDeopt, v8::Testing::kStressTypeOpt, v8::Isolate::New(), v8::Testing::PrepareStressRun(), profiler(), v8::V8::SetArrayBufferAllocator(), v8::SetFlagsFromString(), v8::Testing::SetStressRunType(), and v8::V8::ShutdownPlatform().
Referenced by main().
|
static |
Definition at line 617 of file d8-posix.cc.
References v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::Length(), v8::mkdirp(), v8::String::NewFromUtf8(), NULL, and v8::Isolate::ThrowException().
Referenced by AddOSMethods().
|
static |
Definition at line 719 of file d8.cc.
References v8::base::OS::MemoryMappedFile::create(), name, NULL, v8::Isolate::SetAddHistogramSampleFunction(), v8::Isolate::SetCounterFunction(), and v8::Isolate::SetCreateHistogramFunction().
|
static |
Definition at line 1013 of file d8.cc.
References v8::LineEditor::Close(), v8::Counter::count(), v8::CounterAndKey::counter, v8::LineEditor::Get(), v8::Counter::is_histogram(), v8::CounterAndKey::key, and v8::Counter::sample_total().
|
static |
|
static |
Definition at line 337 of file d8.cc.
References v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::GetReturnValue(), and v8::internal::Heap::synthetic_time().
|
static |
|
static |
|
static |
Definition at line 501 of file d8.cc.
References file(), v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::GetReturnValue(), v8::Handle< T >::IsEmpty(), NULL, v8::internal::ReadFile(), and v8::Throw().
|
static |
Definition at line 1115 of file d8.cc.
References v8::Isolate::AdjustAmountOfExternalAllocatedMemory(), v8::DataAndPersistent::data, DCHECK, v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::GetReturnValue(), v8::DataAndPersistent::handle, v8::ArrayBuffer::New(), NULL, v8::ReadBufferWeakCallback(), v8::ReadChars(), and v8::Throw().
Definition at line 1145 of file d8.cc.
References v8::String::kNormalString, name, v8::String::NewFromUtf8(), NULL, v8::ReadChars(), and size.
Definition at line 516 of file d8.cc.
References v8::String::Concat(), v8::base::anonymous_namespace{semaphore-unittest.cc}::kBufferSize, v8::String::kNormalString, v8::String::NewFromUtf8(), and NULL.
Referenced by v8::DumbLineEditor::Prompt(), and ReadLine().
|
inlinestatic |
Definition at line 308 of file d8.h.
References v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::GetReturnValue(), and ReadFromStdin().
|
static |
Definition at line 387 of file d8.cc.
References v8::PerIsolateData::Get(), v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::GetReturnValue(), v8::Context::New(), NULL, v8::PerIsolateData::realm_count_, and v8::PerIsolateData::realms_.
|
static |
Definition at line 352 of file d8.cc.
References v8::PerIsolateData::Get(), v8::Isolate::GetEnteredContext(), v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::GetReturnValue(), and v8::PerIsolateData::RealmFind().
|
static |
Definition at line 405 of file d8.cc.
References v8::PerIsolateData::Get(), v8::FunctionCallbackInfo< T >::GetIsolate(), v8::PerIsolateData::realm_current_, v8::PerIsolateData::realm_switch_, v8::PerIsolateData::RealmIndexOrThrow(), v8::PerIsolateData::realms_, and v8::Throw().
|
static |
Definition at line 430 of file d8.cc.
References v8::ScriptCompiler::CompileUnbound(), v8::PerIsolateData::Get(), v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::GetReturnValue(), v8::Handle< T >::IsEmpty(), v8::FunctionCallbackInfo< T >::Length(), v8::Local< T >::New(), v8::PerIsolateData::RealmIndexOrThrow(), v8::PerIsolateData::realms_, and v8::Throw().
|
static |
Definition at line 377 of file d8.cc.
References v8::PerIsolateData::Get(), v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::GetReturnValue(), v8::PerIsolateData::RealmIndexOrThrow(), and v8::PerIsolateData::realms_.
|
static |
Definition at line 362 of file d8.cc.
References v8::PerIsolateData::Get(), v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::GetReturnValue(), v8::FunctionCallbackInfo< T >::Length(), v8::PerIsolateData::RealmFind(), and v8::Throw().
|
static |
Definition at line 452 of file d8.cc.
References v8::PerIsolateData::Get(), v8::PropertyCallbackInfo< T >::GetIsolate(), v8::PropertyCallbackInfo< T >::GetReturnValue(), and v8::PerIsolateData::realm_shared_.
|
static |
Definition at line 460 of file d8.cc.
References v8::PerIsolateData::Get(), v8::PropertyCallbackInfo< T >::GetIsolate(), and v8::PerIsolateData::realm_shared_.
|
static |
Definition at line 420 of file d8.cc.
References v8::PerIsolateData::Get(), v8::FunctionCallbackInfo< T >::GetIsolate(), v8::PerIsolateData::realm_switch_, and v8::PerIsolateData::RealmIndexOrThrow().
|
static |
Definition at line 645 of file d8-posix.cc.
References v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::Length(), v8::String::NewFromUtf8(), NULL, and v8::Isolate::ThrowException().
Referenced by AddOSMethods().
|
static |
Definition at line 587 of file d8.cc.
References v8::TryCatch::Exception(), v8::Isolate::InContext(), v8::Handle< T >::IsEmpty(), v8::String::Utf8Value::length(), v8::TryCatch::Message(), v8::Local< T >::New(), and v8::TryCatch::StackTrace().
Referenced by ExecuteString(), and v8::HandleDebugEvent().
Definition at line 1421 of file d8.cc.
References v8::Isolate::ContextDisposedNotification(), v8::PerIsolateData::Get(), v8::Isolate::IdleNotification(), and v8::Isolate::LowMemoryNotification().
|
staticprivate |
Definition at line 1156 of file d8.cc.
References v8::LineEditor::Get(), v8::PerIsolateData::Get(), v8::V8::GetVersion(), v8::Handle< T >::IsEmpty(), kPrompt, v8::LineEditor::name(), name, v8::Local< T >::New(), v8::String::NewFromUtf8(), v8::LineEditor::Open(), and v8::LineEditor::Prompt().
|
static |
Definition at line 663 of file d8-posix.cc.
References v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::Length(), v8::String::NewFromUtf8(), NULL, and v8::Isolate::ThrowException().
Referenced by AddOSMethods().
Definition at line 1302 of file d8.cc.
References v8::SourceGroup::Begin(), v8::SourceGroup::End(), v8::ScriptCompiler::kNoCompileOptions, v8::ScriptCompiler::kProduceCodeCache, v8::ScriptCompiler::kProduceParserCache, NULL, v8::V8::SetFlagsFromCommandLine(), and v8::SetFlagsFromString().
|
static |
Definition at line 549 of file d8-posix.cc.
References v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::GetReturnValue(), v8::FunctionCallbackInfo< T >::Length(), v8::String::NewFromUtf8(), and v8::Isolate::ThrowException().
Referenced by AddOSMethods().
|
static |
Definition at line 440 of file d8-posix.cc.
References v8::Handle< T >::Cast(), v8::ChildLaunchedOK(), v8::ExecSubprocess(), v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::GetReturnValue(), v8::GetStdout(), v8::GetTimeouts(), v8::ExecArgs::Init(), v8::ExecArgs::kMaxArgs, v8::kReadFD, v8::kWriteFD, v8::FunctionCallbackInfo< T >::Length(), v8::Array::New(), v8::String::NewFromUtf8(), NULL, v8::Isolate::ThrowException(), and v8::WaitForChild().
Referenced by AddOSMethods().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 690 of file d8-posix.cc.
References v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::Length(), v8::String::NewFromUtf8(), NULL, and v8::Isolate::ThrowException().
Referenced by AddOSMethods().
|
static |
Definition at line 581 of file d8.cc.
References v8::FunctionCallbackInfo< T >::GetIsolate(), v8::FunctionCallbackInfo< T >::GetReturnValue(), v8::V8::GetVersion(), and v8::String::NewFromUtf8().
|
static |
Definition at line 476 of file d8.cc.
References v8::FunctionCallbackInfo< T >::GetIsolate(), v8::TryCatch::HasCaught(), v8::String::Utf8Value::length(), v8::FunctionCallbackInfo< T >::Length(), and v8::TryCatch::ReThrow().
|
staticprivate |
Definition at line 371 of file d8.h.
Referenced by Initialize().
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
Definition at line 364 of file d8.h.
Referenced by RunShell().
|
staticprivate |
|
static |
Definition at line 365 of file d8.h.
Referenced by v8::SourceGroup::Execute(), v8::SourceGroup::ExecuteInThread(), ExecuteString(), and v8::SourceGroup::WaitForThread().
|
staticprivate |
Definition at line 370 of file d8.h.
Referenced by ExecuteString().