v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include "api.h"
#include <string.h>
#include <cmath>
#include "../include/v8-debug.h"
#include "../include/v8-profiler.h"
#include "../include/v8-testing.h"
#include "assert-scope.h"
#include "bootstrapper.h"
#include "code-stubs.h"
#include "compiler.h"
#include "conversions-inl.h"
#include "counters.h"
#include "cpu-profiler.h"
#include "debug.h"
#include "deoptimizer.h"
#include "execution.h"
#include "global-handles.h"
#include "heap-profiler.h"
#include "heap-snapshot-generator-inl.h"
#include "icu_util.h"
#include "json-parser.h"
#include "messages.h"
#include "parser.h"
#include "platform.h"
#include "platform/time.h"
#include "profile-generator-inl.h"
#include "property-details.h"
#include "property.h"
#include "runtime.h"
#include "runtime-profiler.h"
#include "scanner-character-streams.h"
#include "snapshot.h"
#include "unicode-inl.h"
#include "utils/random-number-generator.h"
#include "v8threads.h"
#include "version.h"
#include "vm-state-inl.h"
Go to the source code of this file.
Data Structures | |
struct | OneByteMask< size > |
struct | OneByteMask< 4 > |
struct | OneByteMask< 8 > |
class | ContainsOnlyOneByteHelper |
class | Utf8LengthHelper |
class | Utf8LengthHelper::Visitor |
class | Utf8WriterVisitor |
class | VisitorAdapter |
Namespaces | |
v8 | |
v8::internal | |
Macros | |
#define | LOG_API(isolate, expr) LOG(isolate, ApiEntryCall(expr)) |
#define | ENTER_V8(isolate) |
#define | ON_BAILOUT(isolate, location, code) |
#define | EXCEPTION_PREAMBLE(isolate) |
#define | EXCEPTION_BAILOUT_CHECK_GENERIC(isolate, value, do_callback) |
#define | EXCEPTION_BAILOUT_CHECK_DO_CALLBACK(isolate, value) |
#define | EXCEPTION_BAILOUT_CHECK(isolate, value) EXCEPTION_BAILOUT_CHECK_GENERIC(isolate, value, ;) |
#define | SET_FIELD_WRAPPED(obj, setter, cdata) |
#define | VALUE_IS_TYPED_ARRAY(Type, typeName, TYPE, ctype, size) |
#define | CHECK_TYPED_ARRAY_CAST(Type, typeName, TYPE, ctype, size) |
#define | ARRAY_TYPE_TO_ELEMENTS_KIND(Type, type, TYPE, ctype, size) |
#define | INSTANCE_TYPE_TO_ARRAY_TYPE(Type, type, TYPE, ctype, size) |
#define | REGEXP_FLAG_ASSERT_EQ(api_flag, internal_flag) |
#define | TYPED_ARRAY_NEW(Type, type, TYPE, ctype, size) |
Enumerations | |
enum | CompressedStartupDataItems { kSnapshot = 0, kSnapshotContext, kLibraries, kExperimentalLibraries, kCompressedStartupDataCount } |
Functions | |
void V8_EXPORT | RegisterExtension (Extension *extension) |
bool V8_EXPORT | SetResourceConstraints (Isolate *isolate, ResourceConstraints *constraints) |
REGEXP_FLAG_ASSERT_EQ (kNone, NONE) | |
REGEXP_FLAG_ASSERT_EQ (kGlobal, GLOBAL) | |
REGEXP_FLAG_ASSERT_EQ (kIgnoreCase, IGNORE_CASE) | |
REGEXP_FLAG_ASSERT_EQ (kMultiline, MULTILINE) | |
template<typename ElementType , ExternalArrayType array_type, i::ElementsKind elements_kind> | |
i::Handle< i::JSTypedArray > | NewTypedArray (i::Isolate *isolate, Handle< ArrayBuffer > array_buffer, size_t byte_offset, size_t length) |
void | InvokeAccessorGetterCallback (v8::Local< v8::String > property, const v8::PropertyCallbackInfo< v8::Value > &info, v8::AccessorGetterCallback getter) |
void | InvokeFunctionCallback (const v8::FunctionCallbackInfo< v8::Value > &info, v8::FunctionCallback callback) |
#define ARRAY_TYPE_TO_ELEMENTS_KIND | ( | Type, | |
type, | |||
TYPE, | |||
ctype, | |||
size | |||
) |
#define CHECK_TYPED_ARRAY_CAST | ( | Type, | |
typeName, | |||
TYPE, | |||
ctype, | |||
size | |||
) |
#define ENTER_V8 | ( | isolate | ) |
Definition at line 73 of file api.cc.
Referenced by V8::AddMessageListener(), Context::AllowCodeGenerationFromStrings(), StackTrace::AsArray(), Function::Call(), Object::CallAsConstructor(), Object::CallAsFunction(), Promise::Catch(), Promise::Chain(), Object::Clone(), Array::CloneElementAt(), ScriptCompiler::Compile(), ScriptCompiler::CompileUnbound(), String::Concat(), Object::CreationContext(), StackTrace::CurrentStackTrace(), Date::DateTimeConfigurationChangeNotification(), Object::Delete(), Object::DeleteHiddenValue(), Context::DetachGlobal(), V8::EnqueueMicrotask(), Context::Enter(), Value::Equals(), Exception::Error(), Context::Exit(), Object::FindInstanceInPrototypeChain(), Object::ForceDelete(), Object::ForceSet(), Message::Get(), Object::Get(), StackFrame::GetColumn(), Object::GetConstructor(), Object::GetConstructorName(), Function::GetDisplayName(), Message::GetEndColumn(), Message::GetEndPosition(), StackTrace::GetFrame(), StackTrace::GetFrameCount(), FunctionTemplate::GetFunction(), StackFrame::GetFunctionName(), Object::GetHiddenValue(), Object::GetIdentityHash(), Message::GetLineNumber(), StackFrame::GetLineNumber(), Object::GetOwnPropertyNames(), Object::GetPropertyAttributes(), Object::GetPropertyNames(), Object::GetPrototype(), Object::GetRealNamedProperty(), Object::GetRealNamedPropertyInPrototypeChain(), StackFrame::GetScriptId(), StackFrame::GetScriptName(), StackFrame::GetScriptNameOrSourceURL(), Message::GetScriptResourceName(), Message::GetSourceLine(), Message::GetStackTrace(), Message::GetStartColumn(), Message::GetStartPosition(), Object::Has(), Object::HasRealNamedCallbackProperty(), FunctionTemplate::Inherit(), FunctionTemplate::InstanceTemplate(), Value::Int32Value(), Value::IntegerValue(), Object::IsCallable(), StackFrame::IsConstructor(), StackFrame::IsEval(), Value::IsPromise(), Message::IsSharedCrossOrigin(), String::MakeExternal(), ObjectTemplate::MarkAsUndetectable(), NeanderObject::NeanderObject(), ArrayBuffer::Neuter(), Symbol::New(), Private::New(), Number::New(), Integer::New(), Object::New(), Array::New(), Function::New(), Promise::Resolver::New(), ArrayBuffer::New(), DataView::New(), Date::New(), NumberObject::New(), BooleanObject::New(), StringObject::New(), SymbolObject::New(), RegExp::New(), External::New(), FunctionTemplate::New(), Signature::New(), TypeSwitch::New(), String::NewExternal(), Integer::NewFromUnsigned(), Function::NewInstance(), ObjectTemplate::NewInstance(), Value::NumberValue(), Object::ObjectProtoToString(), JSON::Parse(), Message::PrintCurrentStackTrace(), FunctionTemplate::PrototypeTemplate(), Exception::RangeError(), FunctionTemplate::ReadOnlyPrototype(), Exception::ReferenceError(), Promise::Resolver::Reject(), V8::RemoveMessageListeners(), FunctionTemplate::RemovePrototype(), Promise::Resolver::Resolve(), Script::Run(), Object::Set(), Template::Set(), ObjectTemplate::SetAccessCheckCallbacks(), Object::SetAccessorProperty(), Template::SetAccessorProperty(), ObjectTemplate::SetCallAsFunctionHandler(), FunctionTemplate::SetCallHandler(), FunctionTemplate::SetClassName(), FunctionTemplate::SetHiddenPrototype(), Object::SetHiddenValue(), Object::SetIndexedPropertiesToExternalArrayData(), Object::SetIndexedPropertiesToPixelData(), ObjectTemplate::SetIndexedPropertyHandler(), ObjectTemplate::SetInternalFieldCount(), FunctionTemplate::SetLength(), Function::SetName(), ObjectTemplate::SetNamedPropertyHandler(), Object::SetPrototype(), Context::SetSecurityToken(), Exception::SyntaxError(), Isolate::ThrowException(), Value::ToArrayIndex(), Value::ToBoolean(), Value::ToDetailString(), Value::ToInt32(), Value::ToInteger(), Value::ToNumber(), Value::ToObject(), Value::ToString(), Value::ToUint32(), Object::TurnOnAccessCheck(), Exception::TypeError(), Value::Uint32Value(), Context::UseDefaultSecurityToken(), String::Utf8Value::Utf8Value(), String::Value::Value(), and String::WriteUtf8().
#define EXCEPTION_BAILOUT_CHECK | ( | isolate, | |
value | |||
) | EXCEPTION_BAILOUT_CHECK_GENERIC(isolate, value, ;) |
Definition at line 112 of file api.cc.
Referenced by Object::CallAsConstructor(), Object::CallAsFunction(), Promise::Catch(), Promise::Chain(), Object::Clone(), Array::CloneElementAt(), ScriptCompiler::CompileUnbound(), Object::Delete(), Value::Equals(), Object::ForceDelete(), Object::ForceSet(), Object::Get(), Message::GetEndColumn(), FunctionTemplate::GetFunction(), Message::GetLineNumber(), Object::GetPropertyAttributes(), Message::GetSourceLine(), Message::GetStartColumn(), Object::Has(), Value::Int32Value(), Value::IntegerValue(), Value::IsPromise(), Promise::Resolver::New(), Date::New(), RegExp::New(), ObjectTemplate::NewInstance(), Value::NumberValue(), JSON::Parse(), Promise::Resolver::Reject(), Promise::Resolver::Resolve(), Object::Set(), Object::SetPrototype(), Value::ToArrayIndex(), Value::ToDetailString(), Value::ToInt32(), Value::ToInteger(), Value::ToNumber(), Value::ToObject(), Value::ToString(), Value::ToUint32(), and Value::Uint32Value().
#define EXCEPTION_BAILOUT_CHECK_DO_CALLBACK | ( | isolate, | |
value | |||
) |
Definition at line 107 of file api.cc.
Referenced by Function::Call(), Object::CallAsConstructor(), Object::CallAsFunction(), Function::NewInstance(), and Script::Run().
#define EXCEPTION_BAILOUT_CHECK_GENERIC | ( | isolate, | |
value, | |||
do_callback | |||
) |
#define EXCEPTION_PREAMBLE | ( | isolate | ) |
Definition at line 86 of file api.cc.
Referenced by Function::Call(), Object::CallAsConstructor(), Object::CallAsFunction(), Promise::Catch(), Promise::Chain(), Object::Clone(), Array::CloneElementAt(), ScriptCompiler::CompileUnbound(), Object::Delete(), Value::Equals(), Object::ForceDelete(), Object::ForceSet(), Object::Get(), Message::GetEndColumn(), FunctionTemplate::GetFunction(), Message::GetLineNumber(), Object::GetPropertyAttributes(), Message::GetSourceLine(), Message::GetStartColumn(), Object::Has(), Value::Int32Value(), Value::IntegerValue(), Value::IsPromise(), Promise::Resolver::New(), Date::New(), RegExp::New(), Function::NewInstance(), ObjectTemplate::NewInstance(), Value::NumberValue(), JSON::Parse(), Promise::Resolver::Reject(), Promise::Resolver::Resolve(), Script::Run(), Object::Set(), Object::SetPrototype(), Value::ToArrayIndex(), Value::ToDetailString(), Value::ToInt32(), Value::ToInteger(), Value::ToNumber(), Value::ToObject(), Value::ToString(), Value::ToUint32(), and Value::Uint32Value().
#define INSTANCE_TYPE_TO_ARRAY_TYPE | ( | Type, | |
type, | |||
TYPE, | |||
ctype, | |||
size | |||
) |
Referenced by Object::GetIndexedPropertiesExternalArrayDataType().
#define LOG_API | ( | isolate, | |
expr | |||
) | LOG(isolate, ApiEntryCall(expr)) |
Definition at line 71 of file api.cc.
Referenced by Function::Call(), Object::CallAsConstructor(), Object::CallAsFunction(), Promise::Catch(), Promise::Chain(), ScriptCompiler::Compile(), ScriptCompiler::CompileUnbound(), String::Concat(), Date::DateTimeConfigurationChangeNotification(), Value::Equals(), Exception::Error(), FunctionTemplate::GetFunction(), UnboundScript::GetId(), UnboundScript::GetLineNumber(), UnboundScript::GetScriptName(), Value::Int32Value(), Value::IntegerValue(), Value::IsPromise(), TypeSwitch::match(), ArrayBuffer::Neuter(), Symbol::New(), Private::New(), Object::New(), Array::New(), Function::New(), Promise::Resolver::New(), ArrayBuffer::New(), DataView::New(), Date::New(), NumberObject::New(), BooleanObject::New(), StringObject::New(), SymbolObject::New(), RegExp::New(), External::New(), FunctionTemplate::New(), Signature::New(), TypeSwitch::New(), Context::New(), String::NewExternal(), Function::NewInstance(), ObjectTemplate::NewInstance(), Value::NumberValue(), Exception::RangeError(), Exception::ReferenceError(), Promise::Resolver::Reject(), Promise::Resolver::Resolve(), Script::Run(), Value::SameValue(), Value::StrictEquals(), Exception::SyntaxError(), Value::ToArrayIndex(), Value::ToBoolean(), Value::ToDetailString(), Value::ToInt32(), Value::ToInteger(), Value::ToNumber(), Value::ToObject(), Value::ToString(), Value::ToUint32(), Exception::TypeError(), Value::Uint32Value(), Date::ValueOf(), NumberObject::ValueOf(), BooleanObject::ValueOf(), StringObject::ValueOf(), SymbolObject::ValueOf(), and String::WriteUtf8().
#define ON_BAILOUT | ( | isolate, | |
location, | |||
code | |||
) |
Definition at line 79 of file api.cc.
Referenced by V8::AddMessageListener(), Function::Call(), Object::CallAsConstructor(), Object::CallAsFunction(), Object::Clone(), Array::CloneElementAt(), ScriptCompiler::Compile(), ScriptCompiler::CompileUnbound(), Object::CreationContext(), Date::DateTimeConfigurationChangeNotification(), Object::Delete(), Object::DeleteHiddenValue(), Exception::Error(), Object::FindInstanceInPrototypeChain(), Object::ForceDelete(), Object::ForceSet(), Message::Get(), Object::Get(), Object::GetConstructor(), Object::GetConstructorName(), Function::GetDisplayName(), FunctionTemplate::GetFunction(), Object::GetHiddenValue(), UnboundScript::GetId(), Object::GetIdentityHash(), Object::GetIndexedPropertiesExternalArrayData(), Object::GetIndexedPropertiesExternalArrayDataLength(), Object::GetIndexedPropertiesExternalArrayDataType(), Object::GetIndexedPropertiesPixelData(), Object::GetIndexedPropertiesPixelDataLength(), UnboundScript::GetLineNumber(), Message::GetLineNumber(), Object::GetOwnPropertyNames(), Object::GetPropertyAttributes(), Object::GetPropertyNames(), Object::GetPrototype(), Object::GetRealNamedProperty(), Object::GetRealNamedPropertyInPrototypeChain(), UnboundScript::GetScriptName(), Message::GetSourceLine(), Object::Has(), Object::HasIndexedLookupInterceptor(), Object::HasIndexedPropertiesInExternalArrayData(), Object::HasIndexedPropertiesInPixelData(), FunctionTemplate::HasInstance(), Object::HasNamedLookupInterceptor(), Object::HasOwnProperty(), Object::HasRealIndexedProperty(), Object::HasRealNamedCallbackProperty(), Object::HasRealNamedProperty(), Object::IsCallable(), Context::New(), Function::NewInstance(), ObjectTemplate::NewInstance(), Object::ObjectProtoToString(), Exception::RangeError(), Exception::ReferenceError(), V8::RemoveMessageListeners(), Script::Run(), Object::Set(), Object::SetAccessorProperty(), Object::SetHiddenValue(), Object::SetIndexedPropertiesToExternalArrayData(), Object::SetIndexedPropertiesToPixelData(), Object::SetPrototype(), Exception::SyntaxError(), Object::TurnOnAccessCheck(), and Exception::TypeError().
#define REGEXP_FLAG_ASSERT_EQ | ( | api_flag, | |
internal_flag | |||
) |
#define SET_FIELD_WRAPPED | ( | obj, | |
setter, | |||
cdata | |||
) |
Definition at line 1142 of file api.cc.
Referenced by ObjectTemplate::SetAccessCheckCallbacks(), ObjectTemplate::SetCallAsFunctionHandler(), FunctionTemplate::SetCallHandler(), ObjectTemplate::SetIndexedPropertyHandler(), and ObjectTemplate::SetNamedPropertyHandler().
#define TYPED_ARRAY_NEW | ( | Type, | |
type, | |||
TYPE, | |||
ctype, | |||
size | |||
) |