v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <contexts.h>
Static Public Member Functions | |
static Context * | cast (Object *context) |
static int | SlotOffset (int index) |
static int | FunctionMapIndex (StrictMode strict_mode, bool is_generator) |
Static Public Member Functions inherited from FixedArray | |
static int | SizeFor (int length) |
static int | OffsetOfElementAt (int index) |
static FixedArray * | cast (Object *obj) |
Static Public Member Functions inherited from FixedArrayBase | |
static FixedArrayBase * | cast (Object *object) |
Static Public Member Functions inherited from HeapObject | |
static HeapObject * | FromAddress (Address address) |
static Object ** | RawField (HeapObject *obj, int offset) |
static void | UpdateMapCodeCache (Handle< HeapObject > object, Handle< Name > name, Handle< Code > code) |
static HeapObject * | cast (Object *obj) |
Static Public Member Functions inherited from Object | |
static MUST_USE_RESULT Handle < Object > | ToSmi (Isolate *isolate, Handle< Object > object) |
static Handle< Object > | GetPropertyWithReceiver (Handle< Object > object, Handle< Object > receiver, Handle< Name > name, PropertyAttributes *attributes) |
static Handle< Object > | GetProperty (Handle< Object > object, Handle< Name > key) |
static Handle< Object > | GetProperty (Handle< Object > object, Handle< Object > receiver, LookupResult *result, Handle< Name > key, PropertyAttributes *attributes) |
static MUST_USE_RESULT MaybeObject * | GetPropertyOrFail (Handle< Object > object, Handle< Object > receiver, LookupResult *result, Handle< Name > key, PropertyAttributes *attributes) |
static Handle< Object > | GetElement (Isolate *isolate, Handle< Object > object, uint32_t index) |
static Handle< Object > | GetElementNoExceptionThrown (Isolate *isolate, Handle< Object > object, uint32_t index) |
static Handle< Object > | GetElementWithReceiver (Isolate *isolate, Handle< Object > object, Handle< Object > receiver, uint32_t index) |
static Handle< Object > | GetOrCreateHash (Handle< Object > object, Isolate *isolate) |
static Object * | cast (Object *value) |
Static Public Attributes | |
static const int | kSize = kHeaderSize + NATIVE_CONTEXT_SLOTS * kPointerSize |
Static Public Attributes inherited from FixedArray | |
static const int | kMaxSize = 128 * MB * kPointerSize |
static const int | kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize |
Static Public Attributes inherited from FixedArrayBase | |
static const int | kLengthOffset = HeapObject::kHeaderSize |
static const int | kHeaderSize = kLengthOffset + kPointerSize |
Static Public Attributes inherited from HeapObject | |
static const int | kMapOffset = Object::kHeaderSize |
static const int | kHeaderSize = kMapOffset + kPointerSize |
Static Public Attributes inherited from Object | |
static const int | kHeaderSize = 0 |
Additional Inherited Members | |
Protected Member Functions inherited from HeapObject | |
void | IteratePointers (ObjectVisitor *v, int start, int end) |
void | IteratePointer (ObjectVisitor *v, int offset) |
void | IterateNextCodeLink (ObjectVisitor *v, int offset) |
Static Protected Member Functions inherited from FixedArray | |
static void | NoWriteBarrierSet (FixedArray *array, int index, Object *value) |
static void | NoIncrementalWriteBarrierSet (FixedArray *array, int index, Object *value) |
Definition at line 241 of file contexts.h.
typedef FixedBodyDescriptor< kHeaderSize, kHeaderSize + FIRST_WEAK_SLOT * kPointerSize, kSize> MarkCompactBodyDescriptor |
Definition at line 521 of file contexts.h.
typedef FixedBodyDescriptor< kHeaderSize, kSize, kSize> ScavengeBodyDescriptor |
Definition at line 516 of file contexts.h.
anonymous enum |
Definition at line 250 of file contexts.h.
void AddOptimizedCode | ( | Code * | code | ) |
Definition at line 334 of file contexts.cc.
References ASSERT, Context::IsNativeContext(), Code::kind(), Context::OPTIMIZED_CODE_LIST, and FixedArray::set().
void AddOptimizedFunction | ( | JSFunction * | function | ) |
Definition at line 260 of file contexts.cc.
References ASSERT, Context::cast(), JSFunction::cast(), CHECK, MarkCompactCollector::code_flusher(), CodeFlusher::EvictCandidate(), v8::internal::FLAG_enable_slow_asserts, FixedArray::get(), HeapObject::GetHeap(), Context::IsNativeContext(), Heap::mark_compact_collector(), Heap::native_contexts_list(), Context::NEXT_CONTEXT_LINK, Context::OPTIMIZED_FUNCTIONS_LIST, and FixedArray::set().
Referenced by JSFunction::ReplaceCode().
JSBuiltinsObject * builtins | ( | ) |
Definition at line 47 of file contexts.cc.
References ASSERT, JSGlobalObject::cast(), JSBuiltinsObject::cast(), and Context::global_object().
Referenced by TypeFeedbackOracle::CanRetainOtherContext().
Definition at line 244 of file contexts.h.
References ASSERT.
Referenced by Context::AddOptimizedFunction(), Heap::ClearJSFunctionResultCaches(), Heap::ClearNormalizedMapCaches(), JSFunction::context(), CountNativeContexts(), Deoptimizer::DeoptimizeAll(), Deoptimizer::DeoptimizeMarkedCode(), Isolate::GetCallingNativeContext(), Deoptimizer::GetDeoptimizedCodeCount(), SloppyArgumentsElementsAccessor::GetImpl(), IncrementalMarking::Hurry(), Context::native_context(), JSFunction::NativeContextFromLiterals(), Snapshot::NewContextFromSnapshot(), JavaScriptFrame::Print(), v8::internal::RUNTIME_FUNCTION(), TEST(), Deoptimizer::VisitAllOptimizedFunctions(), IncrementalMarkingMarkingVisitor::VisitNativeContextIncremental(), and GlobalObjectsEnumerator::VisitPointers().
|
inline |
Definition at line 367 of file contexts.h.
References JSFunction::cast(), and Context::CLOSURE_INDEX.
Referenced by Context::declaration_context(), Scope::DeserializeScopeChain(), CompilationCacheTable::Lookup(), CompilationCacheTable::LookupEval(), Context::native_context(), CompilationCacheTable::Put(), CompilationCacheTable::PutEval(), and v8::internal::RUNTIME_FUNCTION().
Context * declaration_context | ( | ) |
Definition at line 37 of file contexts.cc.
References ASSERT, Context::closure(), Context::IsFunctionContext(), Context::IsNativeContext(), and Context::previous().
Object * DeoptimizedCodeListHead | ( | ) |
Definition at line 361 of file contexts.cc.
References ASSERT, Context::DEOPTIMIZED_CODE_LIST, and Context::IsNativeContext().
Referenced by Deoptimizer::GetDeoptimizedCodeCount().
Definition at line 367 of file contexts.cc.
References Isolate::factory(), HeapObject::GetIsolate(), Value::IsUndefined(), Factory::NewStringFromOneByte(), and STATIC_ASCII_VECTOR.
|
inline |
Definition at line 378 of file contexts.h.
References Context::EXTENSION_INDEX.
Referenced by Scope::DeserializeScopeChain(), Context::has_extension(), JSObject::ReferencesObject(), and v8::internal::RUNTIME_FUNCTION().
|
inlinestatic |
Definition at line 502 of file contexts.h.
References v8::internal::SLOPPY, Context::SLOPPY_FUNCTION_MAP_INDEX, Context::SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Context::STRICT_FUNCTION_MAP_INDEX, and Context::STRICT_GENERATOR_FUNCTION_MAP_INDEX.
Referenced by CodeStubGraphBuilder< Stub >::BuildCodeStub().
Context * global_context | ( | ) |
Definition at line 58 of file contexts.cc.
References Context::IsGlobalContext(), and Context::previous().
Referenced by v8::internal::RUNTIME_FUNCTION().
|
inline |
Definition at line 388 of file contexts.h.
References ASSERT, HeapObject::GetIsolate(), and Context::GLOBAL_OBJECT_INDEX.
Referenced by Heap::AllocateBlockContext(), Heap::AllocateCatchContext(), Heap::AllocateWithContext(), Context::builtins(), TypeFeedbackOracle::CanRetainOtherContext(), Promise::Catch(), Promise::Chain(), Isolate::GetCurrentContext(), Isolate::global_context(), Isolate::global_object(), JSFunction::IsBuiltin(), Value::IsPromise(), Context::native_context(), Isolate::native_context(), Promise::Resolver::New(), Promise::Resolver::Reject(), Promise::Resolver::Resolve(), v8::internal::RUNTIME_FUNCTION(), and TEST().
JSObject * global_proxy | ( | ) |
Definition at line 87 of file contexts.cc.
References Context::native_context().
Referenced by Isolate::global_proxy(), Script::Run(), and GlobalObjectsEnumerator::VisitPointers().
|
inline |
Definition at line 377 of file contexts.h.
References Context::extension(), and v8::internal::NULL.
Referenced by JSObject::ReferencesObject(), and v8::internal::RUNTIME_FUNCTION().
|
inline |
Definition at line 429 of file contexts.h.
References HeapObject::GetHeap(), and HeapObject::map().
Referenced by Scope::DeserializeScopeChain().
|
inline |
Definition at line 421 of file contexts.h.
References HeapObject::GetHeap(), and HeapObject::map().
Referenced by Scope::DeserializeScopeChain(), and JSObject::ReferencesObject().
|
inline |
Definition at line 417 of file contexts.h.
References HeapObject::GetHeap(), and HeapObject::map().
Referenced by Context::declaration_context(), Scope::DeserializeScopeChain(), and v8::internal::RUNTIME_FUNCTION().
|
inline |
Definition at line 437 of file contexts.h.
References HeapObject::GetHeap(), and HeapObject::map().
Referenced by Heap::AllocateGlobalContext(), Scope::DeserializeScopeChain(), Context::global_context(), and JSObject::ReferencesObject().
|
inline |
Definition at line 433 of file contexts.h.
References HeapObject::GetHeap(), and HeapObject::map().
Referenced by Scope::DeserializeScopeChain().
|
inline |
Definition at line 413 of file contexts.h.
References HeapObject::GetHeap(), and HeapObject::map().
Referenced by Context::AddOptimizedCode(), Context::AddOptimizedFunction(), SharedFunctionInfo::AddToOptimizedCodeMap(), Heap::AllocateNativeContext(), Context::declaration_context(), Context::DeoptimizedCodeListHead(), Scope::DeserializeScopeChain(), Context::native_context(), Context::OptimizedCodeListHead(), Context::OptimizedFunctionsListHead(), JSObject::ReferencesObject(), Context::RemoveOptimizedFunction(), SharedFunctionInfo::SearchOptimizedCodeMap(), Context::SetDeoptimizedCodeListHead(), Context::SetOptimizedCodeListHead(), and Context::SetOptimizedFunctionsListHead().
|
inline |
Definition at line 425 of file contexts.h.
References HeapObject::GetHeap(), and HeapObject::map().
Referenced by Scope::DeserializeScopeChain().
Handle< Object > Lookup | ( | Handle< String > | name, |
ContextLookupFlags | flags, | ||
int * | index, | ||
PropertyAttributes * | attributes, | ||
BindingFlags * | binding_flags | ||
) |
Definition at line 97 of file contexts.cc.
References ABSENT, ASSERT, JSReceiver::cast(), ScopeInfo::cast(), String::cast(), v8::internal::CONST, v8::internal::CONST_LEGACY, v8::internal::DYNAMIC, v8::internal::DYNAMIC_GLOBAL, v8::internal::DYNAMIC_LOCAL, v8::internal::FOLLOW_CONTEXT_CHAIN, v8::internal::FOLLOW_PROTOTYPE_CHAIN, HeapObject::GetIsolate(), JSReceiver::GetLocalPropertyAttribute(), JSReceiver::GetPropertyAttribute(), Isolate::has_pending_exception(), v8::internal::IMMUTABLE_CHECK_INITIALIZED, v8::internal::IMMUTABLE_CHECK_INITIALIZED_HARMONY, v8::internal::IMMUTABLE_IS_INITIALIZED, v8::internal::IMMUTABLE_IS_INITIALIZED_HARMONY, v8::internal::INTERNAL, v8::internal::kNeedsInitialization, v8::internal::LET, Context::MIN_CONTEXT_SLOTS, v8::internal::MISSING_BINDING, v8::internal::mode(), v8::internal::MODULE, v8::internal::MUTABLE_CHECK_INITIALIZED, v8::internal::MUTABLE_IS_INITIALIZED, NONE, Handle< T >::null(), v8::internal::PrintF(), READ_ONLY, v8::internal::TEMPORARY, Context::THROWN_OBJECT_INDEX, UNREACHABLE, and v8::internal::VAR.
Referenced by v8::internal::RUNTIME_FUNCTION().
|
inline |
Definition at line 381 of file contexts.h.
References JSModule::cast(), and Context::EXTENSION_INDEX.
Referenced by Scope::DeserializeScopeChain(), and v8::internal::RUNTIME_FUNCTION().
Context * native_context | ( | ) |
Definition at line 67 of file contexts.cc.
References ASSERT, Context::cast(), JSFunction::cast(), Context::closure(), JSFunction::context(), HeapObject::GetIsolate(), Context::global_object(), and Context::IsNativeContext().
Referenced by Heap::AllocateArgumentsObject(), Runtime::CreateArrayLiteralBoilerplate(), Isolate::get_initial_js_array_map(), Isolate::GetCallingNativeContext(), IC::GetCodeCacheHolder(), JSObject::GetElementsTransitionMap(), Object::GetElementWithReceiver(), v8::internal::GetKeysInFixedArrayFor(), Object::GetPrototype(), Context::global_proxy(), Object::Lookup(), StringStream::PrintSecurityTokenIfChanged(), JSObject::ReferencesObject(), JSFunction::RemovePrototype(), JSFunction::ReplaceCode(), Context::set_global_proxy(), JSFunction::SetInstancePrototype(), JSFunction::SetPrototype(), and Object::ToObject().
Object * OptimizedCodeListHead | ( | ) |
Definition at line 349 of file contexts.cc.
References ASSERT, Context::IsNativeContext(), and Context::OPTIMIZED_CODE_LIST.
Object * OptimizedFunctionsListHead | ( | ) |
Definition at line 328 of file contexts.cc.
References ASSERT, Context::IsNativeContext(), and Context::OPTIMIZED_FUNCTIONS_LIST.
|
inline |
Definition at line 370 of file contexts.h.
References ASSERT.
Referenced by Context::declaration_context(), Scope::DeserializeScopeChain(), Context::global_context(), and v8::internal::RUNTIME_FUNCTION().
void RemoveOptimizedFunction | ( | JSFunction * | function | ) |
Definition at line 298 of file contexts.cc.
References ASSERT, JSFunction::cast(), HeapObject::GetHeap(), Context::IsNativeContext(), v8::internal::NULL, Context::OPTIMIZED_FUNCTIONS_LIST, FixedArray::set(), and UNREACHABLE.
Referenced by JSFunction::ReplaceCode().
|
inline |
Definition at line 368 of file contexts.h.
References Context::CLOSURE_INDEX, and FixedArray::set().
Referenced by Heap::AllocateBlockContext(), Heap::AllocateCatchContext(), Heap::AllocateFunctionContext(), Heap::AllocateGlobalContext(), Heap::AllocateWithContext(), and v8::internal::RUNTIME_FUNCTION().
|
inline |
Definition at line 379 of file contexts.h.
References Context::EXTENSION_INDEX, and FixedArray::set().
Referenced by Heap::AllocateBlockContext(), Heap::AllocateCatchContext(), Heap::AllocateFunctionContext(), Heap::AllocateGlobalContext(), Heap::AllocateModuleContext(), Heap::AllocateWithContext(), and v8::internal::RUNTIME_FUNCTION().
|
inline |
Definition at line 393 of file contexts.h.
References Context::GLOBAL_OBJECT_INDEX, and FixedArray::set().
Referenced by Heap::AllocateBlockContext(), Heap::AllocateCatchContext(), Heap::AllocateFunctionContext(), Heap::AllocateGlobalContext(), Heap::AllocateWithContext(), and v8::internal::RUNTIME_FUNCTION().
void set_global_proxy | ( | JSObject * | global | ) |
Definition at line 92 of file contexts.cc.
References Context::native_context().
|
inline |
Definition at line 382 of file contexts.h.
References Context::EXTENSION_INDEX, and FixedArray::set().
Referenced by v8::internal::RUNTIME_FUNCTION().
|
inline |
Definition at line 375 of file contexts.h.
References Context::PREVIOUS_INDEX, and FixedArray::set().
Referenced by Heap::AllocateBlockContext(), Heap::AllocateCatchContext(), Heap::AllocateFunctionContext(), Heap::AllocateGlobalContext(), Heap::AllocateWithContext(), and v8::internal::RUNTIME_FUNCTION().
void SetDeoptimizedCodeListHead | ( | Object * | head | ) |
Definition at line 355 of file contexts.cc.
References ASSERT, Context::DEOPTIMIZED_CODE_LIST, Context::IsNativeContext(), and FixedArray::set().
void SetOptimizedCodeListHead | ( | Object * | head | ) |
Definition at line 343 of file contexts.cc.
References ASSERT, Context::IsNativeContext(), Context::OPTIMIZED_CODE_LIST, and FixedArray::set().
void SetOptimizedFunctionsListHead | ( | Object * | head | ) |
Definition at line 322 of file contexts.cc.
References ASSERT, Context::IsNativeContext(), Context::OPTIMIZED_FUNCTIONS_LIST, and FixedArray::set().
|
inlinestatic |
Definition at line 498 of file contexts.h.
References FixedArrayBase::kHeaderSize, v8::internal::kHeapObjectTag, and v8::internal::kPointerSize.
Referenced by v8::internal::ContextMemOperand(), and v8::internal::ContextOperand().
|
static |
Definition at line 512 of file contexts.h.