V8 Project
|
#include <contexts.h>
Static Public Attributes | |
static const int | kSize = kHeaderSize + NATIVE_CONTEXT_SLOTS * kPointerSize |
![]() | |
static const int | kMaxSize = 128 * MB * kPointerSize |
static const int | kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize |
![]() | |
static const int | kLengthOffset = HeapObject::kHeaderSize |
static const int | kHeaderSize = kLengthOffset + kPointerSize |
![]() | |
static const int | kMapOffset = Object::kHeaderSize |
static const int | kHeaderSize = kMapOffset + kPointerSize |
![]() | |
static const int | kHeaderSize = 0 |
Private Member Functions | |
Object * | unchecked_previous () |
STATIC_ASSERT (kHeaderSize==Internals::kContextHeaderSize) | |
STATIC_ASSERT (EMBEDDER_DATA_INDEX==Internals::kContextEmbedderDataIndex) | |
Additional Inherited Members | |
![]() | |
void | IteratePointers (ObjectVisitor *v, int start, int end) |
void | IteratePointer (ObjectVisitor *v, int offset) |
void | IterateNextCodeLink (ObjectVisitor *v, int offset) |
![]() | |
static void | NoWriteBarrierSet (FixedArray *array, int index, Object *value) |
static void | NoIncrementalWriteBarrierSet (FixedArray *array, int index, Object *value) |
Definition at line 252 of file contexts.h.
typedef FixedBodyDescriptor< kHeaderSize, kHeaderSize + FIRST_WEAK_SLOT * kPointerSize, kSize> v8::internal::Context::MarkCompactBodyDescriptor |
Definition at line 581 of file contexts.h.
typedef FixedBodyDescriptor< kHeaderSize, kSize, kSize> v8::internal::Context::ScavengeBodyDescriptor |
Definition at line 576 of file contexts.h.
anonymous enum |
Definition at line 261 of file contexts.h.
void v8::internal::Context::AddOptimizedCode | ( | Code * | code | ) |
Definition at line 354 of file contexts.cc.
References DCHECK, v8::internal::FixedArray::get(), IsNativeContext(), v8::internal::Code::kind(), OPTIMIZED_CODE_LIST, and v8::internal::FixedArray::set().
void v8::internal::Context::AddOptimizedFunction | ( | JSFunction * | function | ) |
Definition at line 280 of file contexts.cc.
References cast(), CHECK, v8::internal::MarkCompactCollector::code_flusher(), DCHECK, v8::internal::CodeFlusher::EvictCandidate(), v8::internal::FLAG_enable_slow_asserts, v8::internal::FixedArray::get(), v8::internal::HeapObject::GetHeap(), IsNativeContext(), v8::internal::Heap::mark_compact_collector(), v8::internal::Heap::native_contexts_list(), NEXT_CONTEXT_LINK, OPTIMIZED_FUNCTIONS_LIST, and v8::internal::FixedArray::set().
Referenced by v8::internal::JSFunction::ReplaceCode().
JSBuiltinsObject * v8::internal::Context::builtins | ( | ) |
Definition at line 24 of file contexts.cc.
References DCHECK, and global_object().
Referenced by v8::internal::TypeFeedbackOracle::CanRetainOtherContext().
Definition at line 255 of file contexts.h.
References DCHECK.
Referenced by AddOptimizedFunction(), v8::internal::Heap::ClearJSFunctionResultCaches(), v8::internal::Heap::ClearNormalizedMapCaches(), v8::internal::JSFunction::context(), v8::internal::Deoptimizer::DeoptimizeAll(), v8::internal::Deoptimizer::DeoptimizeMarkedCode(), v8::internal::V8HeapExplorer::ExtractReferencesPass2(), v8::internal::Isolate::GetCallingNativeContext(), v8::internal::Deoptimizer::GetDeoptimizedCodeCount(), v8::internal::SloppyArgumentsElementsAccessor::GetImpl(), v8::internal::IncrementalMarking::Hurry(), v8::internal::IsValidNonBuiltinContext(), v8::internal::LoadLookupSlotHelper(), v8::internal::MaterializeLocalContext(), v8::internal::MayAccessPreCheck(), v8::internal::ModuleGetExport(), v8::internal::ModuleSetExport(), native_context(), v8::internal::JSFunction::NativeContextFromLiterals(), v8::internal::Snapshot::NewContextFromSnapshot(), v8::internal::JavaScriptFrame::Print(), v8::internal::RUNTIME_FUNCTION(), v8::internal::JSObject::SetDictionaryElement(), v8::internal::JSObject::SetElementWithoutInterceptor(), v8::internal::V8HeapExplorer::SetGcSubrootReference(), v8::internal::SetLocalVariableValue(), v8::internal::Deoptimizer::VisitAllOptimizedFunctions(), v8::internal::IncrementalMarkingMarkingVisitor::VisitNativeContextIncremental(), and v8::internal::GlobalObjectsEnumerator::VisitPointers().
|
inline |
Definition at line 416 of file contexts.h.
References CLOSURE_INDEX, and v8::internal::FixedArray::get().
Referenced by declaration_context(), v8::internal::Scope::DeserializeScopeChain(), v8::internal::V8HeapExplorer::ExtractContextReferences(), native_context(), v8::internal::RUNTIME_FUNCTION(), and set_closure().
Context * v8::internal::Context::declaration_context | ( | ) |
Definition at line 14 of file contexts.cc.
References closure(), DCHECK, IsFunctionContext(), IsNativeContext(), and previous().
Referenced by v8::internal::V8HeapExplorer::ExtractContextReferences(), and v8::internal::RUNTIME_FUNCTION().
Object * v8::internal::Context::DeoptimizedCodeListHead | ( | ) |
Definition at line 381 of file contexts.cc.
References DCHECK, DEOPTIMIZED_CODE_LIST, v8::internal::FixedArray::get(), and IsNativeContext().
Referenced by v8::internal::Deoptimizer::DeoptimizeMarkedCodeForContext(), v8::internal::Deoptimizer::FindDeoptimizingCode(), and v8::internal::Deoptimizer::GetDeoptimizedCodeCount().
Definition at line 387 of file contexts.cc.
References v8::internal::Isolate::factory(), and v8::internal::HeapObject::GetIsolate().
|
inline |
Definition at line 427 of file contexts.h.
References EXTENSION_INDEX, and v8::internal::FixedArray::get().
Referenced by v8::internal::Scope::DeserializeScopeChain(), has_extension(), and v8::internal::JSObject::ReferencesObject().
|
inlinestatic |
Definition at line 556 of file contexts.h.
References v8::internal::IsArrowFunction(), v8::internal::IsConciseMethod(), v8::internal::IsGeneratorFunction(), v8::internal::SLOPPY, SLOPPY_FUNCTION_MAP_INDEX, SLOPPY_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, STRICT_FUNCTION_MAP_INDEX, STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX, and STRICT_GENERATOR_FUNCTION_MAP_INDEX.
Referenced by v8::internal::CodeStubGraphBuilder< Stub >::BuildCodeStub().
Context * v8::internal::Context::global_context | ( | ) |
Definition at line 35 of file contexts.cc.
References IsGlobalContext(), and previous().
Referenced by v8::internal::RUNTIME_FUNCTION().
|
inline |
Definition at line 437 of file contexts.h.
References DCHECK, v8::internal::FixedArray::get(), v8::internal::HeapObject::GetIsolate(), and GLOBAL_OBJECT_INDEX.
Referenced by builtins(), v8::internal::TypeFeedbackOracle::CanRetainOtherContext(), HasSameSecurityTokenAs(), v8::internal::JSFunction::IsBuiltin(), v8::internal::IsValidNonBuiltinContext(), v8::internal::MayAccessPreCheck(), native_context(), v8::internal::RUNTIME_FUNCTION(), and v8::internal::V8HeapExplorer::SetGcSubrootReference().
JSObject * v8::internal::Context::global_proxy | ( | ) |
Definition at line 64 of file contexts.cc.
References native_context().
Referenced by v8::internal::Isolate::global_proxy(), v8::internal::JSFunction::global_proxy(), and v8::internal::GlobalObjectsEnumerator::VisitPointers().
|
inline |
Definition at line 426 of file contexts.h.
References extension(), and NULL.
Referenced by v8::internal::JSObject::ReferencesObject().
Definition at line 491 of file contexts.h.
References global_object().
Referenced by v8::internal::AllowAccessToFunction().
|
inline |
Definition at line 478 of file contexts.h.
References v8::internal::HeapObject::GetHeap(), and v8::internal::HeapObject::map().
Referenced by v8::internal::Scope::DeserializeScopeChain().
|
inline |
Definition at line 470 of file contexts.h.
References v8::internal::HeapObject::GetHeap(), and v8::internal::HeapObject::map().
Referenced by v8::internal::Scope::DeserializeScopeChain(), and v8::internal::JSObject::ReferencesObject().
|
inline |
Definition at line 466 of file contexts.h.
References v8::internal::HeapObject::GetHeap(), and v8::internal::HeapObject::map().
Referenced by declaration_context(), and v8::internal::Scope::DeserializeScopeChain().
|
inline |
Definition at line 486 of file contexts.h.
References v8::internal::HeapObject::GetHeap(), and v8::internal::HeapObject::map().
Referenced by v8::internal::Scope::DeserializeScopeChain(), global_context(), and v8::internal::JSObject::ReferencesObject().
|
inline |
Definition at line 482 of file contexts.h.
References v8::internal::HeapObject::GetHeap(), and v8::internal::HeapObject::map().
Referenced by v8::internal::Scope::DeserializeScopeChain(), v8::internal::ModuleGetExport(), and v8::internal::ModuleSetExport().
|
inline |
Definition at line 462 of file contexts.h.
References v8::internal::HeapObject::GetHeap(), and v8::internal::HeapObject::map().
Referenced by AddOptimizedCode(), AddOptimizedFunction(), v8::internal::AddToWeakNativeContextList(), declaration_context(), DeoptimizedCodeListHead(), v8::internal::Scope::DeserializeScopeChain(), v8::internal::V8HeapExplorer::ExtractContextReferences(), native_context(), OptimizedCodeListHead(), OptimizedFunctionsListHead(), v8::internal::JSObject::ReferencesObject(), RemoveOptimizedFunction(), v8::internal::SharedFunctionInfo::SearchOptimizedCodeMap(), SetDeoptimizedCodeListHead(), SetOptimizedCodeListHead(), SetOptimizedFunctionsListHead(), and v8::internal::Deoptimizer::VisitAllOptimizedFunctionsForContext().
|
inline |
Definition at line 474 of file contexts.h.
References v8::internal::HeapObject::GetHeap(), and v8::internal::HeapObject::map().
Referenced by v8::internal::Scope::DeserializeScopeChain(), and v8::internal::JavaScriptFrame::Print().
Handle< Object > v8::internal::Context::Lookup | ( | Handle< String > | name, |
ContextLookupFlags | flags, | ||
int * | index, | ||
PropertyAttributes * | attributes, | ||
BindingFlags * | binding_flags | ||
) |
Definition at line 106 of file contexts.cc.
References ABSENT, v8::internal::CONST, v8::internal::CONST_LEGACY, v8::internal::ScopeInfo::ContextSlotIndex(), DCHECK, v8::internal::DYNAMIC, v8::internal::DYNAMIC_GLOBAL, v8::internal::DYNAMIC_LOCAL, v8::internal::String::Equals(), v8::internal::anonymous_namespace{flags.cc}::flags, v8::internal::FOLLOW_CONTEXT_CHAIN, v8::internal::FOLLOW_PROTOTYPE_CHAIN, v8::internal::HeapObject::GetIsolate(), v8::internal::JSReceiver::GetOwnPropertyAttributes(), v8::internal::JSReceiver::GetPropertyAttributes(), v8::internal::handle(), v8::internal::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, v8::internal::Object::LookupIterator, v8::maybe(), MIN_CONTEXT_SLOTS, v8::internal::MISSING_BINDING, mode(), v8::internal::MODULE, v8::internal::MUTABLE_CHECK_INITIALIZED, v8::internal::MUTABLE_IS_INITIALIZED, name, NONE, v8::internal::Handle< T >::null(), v8::internal::PrintF(), READ_ONLY, v8::internal::TEMPORARY, THROWN_OBJECT_INDEX, UNREACHABLE, v8::internal::UnscopableLookup(), and v8::internal::VAR.
|
inline |
Definition at line 430 of file contexts.h.
References EXTENSION_INDEX, and v8::internal::FixedArray::get().
Referenced by v8::internal::Scope::DeserializeScopeChain(), and set_module().
Context * v8::internal::Context::native_context | ( | ) |
Definition at line 44 of file contexts.cc.
References cast(), closure(), v8::internal::JSFunction::context(), DCHECK, v8::internal::HeapObject::GetIsolate(), global_object(), and IsNativeContext().
Referenced by v8::internal::BUILTIN(), v8::internal::ComputeReceiverForNonGlobal(), v8::internal::Runtime::CreateArrayLiteralBoilerplate(), v8::internal::Deoptimizer::DeoptimizeGlobalObject(), v8::internal::Deoptimizer::FindDeoptimizingCode(), v8::internal::Isolate::get_initial_js_array_map(), v8::internal::Isolate::GetCallingNativeContext(), v8::Isolate::GetCurrentContext(), v8::internal::Object::GetRootMap(), v8::internal::GetTypedArrayFun(), global_proxy(), v8::internal::IsJSArrayFastElementMovingAllowed(), v8::internal::JSObject::ReferencesObject(), v8::internal::JSFunction::RemovePrototype(), v8::internal::JSFunction::ReplaceCode(), v8::internal::RUNTIME_FUNCTION(), set_global_proxy(), v8::internal::JSFunction::SetInstancePrototype(), v8::internal::JSFunction::SetPrototype(), v8::internal::Object::ToObject(), and v8::internal::Map::TransitionElementsTo().
Object * v8::internal::Context::OptimizedCodeListHead | ( | ) |
Definition at line 369 of file contexts.cc.
References DCHECK, v8::internal::FixedArray::get(), IsNativeContext(), and OPTIMIZED_CODE_LIST.
Referenced by v8::internal::Deoptimizer::DeoptimizeMarkedCodeForContext(), and v8::internal::Deoptimizer::MarkAllCodeForContext().
Object * v8::internal::Context::OptimizedFunctionsListHead | ( | ) |
Definition at line 348 of file contexts.cc.
References DCHECK, v8::internal::FixedArray::get(), IsNativeContext(), and OPTIMIZED_FUNCTIONS_LIST.
Referenced by v8::internal::Deoptimizer::VisitAllOptimizedFunctionsForContext().
|
inline |
Definition at line 419 of file contexts.h.
References DCHECK, and unchecked_previous().
Referenced by declaration_context(), v8::internal::Scope::DeserializeScopeChain(), global_context(), v8::internal::compiler::JSContextSpecializer::ReduceJSLoadContext(), v8::internal::compiler::JSContextSpecializer::ReduceJSStoreContext(), and v8::internal::RUNTIME_FUNCTION().
void v8::internal::Context::RemoveOptimizedFunction | ( | JSFunction * | function | ) |
Definition at line 318 of file contexts.cc.
References DCHECK, v8::internal::FixedArray::get(), v8::internal::HeapObject::GetHeap(), IsNativeContext(), NULL, OPTIMIZED_FUNCTIONS_LIST, v8::internal::FixedArray::set(), and UNREACHABLE.
Referenced by v8::internal::JSFunction::ReplaceCode().
|
inline |
Definition at line 417 of file contexts.h.
References closure(), CLOSURE_INDEX, and v8::internal::FixedArray::set().
|
inline |
Definition at line 428 of file contexts.h.
References EXTENSION_INDEX, and v8::internal::FixedArray::set().
|
inline |
Definition at line 442 of file contexts.h.
References GLOBAL_OBJECT_INDEX, and v8::internal::FixedArray::set().
void v8::internal::Context::set_global_proxy | ( | JSObject * | global | ) |
Definition at line 69 of file contexts.cc.
References native_context().
|
inline |
Definition at line 431 of file contexts.h.
References EXTENSION_INDEX, module(), and v8::internal::FixedArray::set().
|
inline |
Definition at line 424 of file contexts.h.
References PREVIOUS_INDEX, and v8::internal::FixedArray::set().
void v8::internal::Context::SetDeoptimizedCodeListHead | ( | Object * | head | ) |
Definition at line 375 of file contexts.cc.
References DCHECK, DEOPTIMIZED_CODE_LIST, IsNativeContext(), and v8::internal::FixedArray::set().
Referenced by v8::internal::Deoptimizer::DeoptimizeMarkedCodeForContext().
void v8::internal::Context::SetOptimizedCodeListHead | ( | Object * | head | ) |
Definition at line 363 of file contexts.cc.
References DCHECK, IsNativeContext(), OPTIMIZED_CODE_LIST, and v8::internal::FixedArray::set().
Referenced by v8::internal::Deoptimizer::DeoptimizeMarkedCodeForContext().
void v8::internal::Context::SetOptimizedFunctionsListHead | ( | Object * | head | ) |
Definition at line 342 of file contexts.cc.
References DCHECK, IsNativeContext(), OPTIMIZED_FUNCTIONS_LIST, and v8::internal::FixedArray::set().
Referenced by v8::internal::Deoptimizer::VisitAllOptimizedFunctionsForContext().
Definition at line 552 of file contexts.h.
References v8::internal::FixedArrayBase::kHeaderSize, v8::internal::kHeapObjectTag, and v8::internal::kPointerSize.
Referenced by v8::internal::ContextMemOperand(), and v8::internal::ContextOperand().
|
private |
|
private |
|
inlineprivate |
Definition at line 585 of file contexts.h.
References v8::internal::FixedArray::get(), and PREVIOUS_INDEX.
Referenced by previous().
|
static |
Definition at line 572 of file contexts.h.
Referenced by v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::Initialize().