v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Code Class Reference

#include <objects.h>

Inheritance diagram for Code:
Collaboration diagram for Code:

Data Structures

class  BackEdgesPatchedForOSRField
 
class  BackEdgeTableOffsetField
 
class  CacheHolderField
 
class  ExtraICStateField
 
class  FindAndReplacePattern
 
class  FullCodeFlagsHasDebugBreakSlotsField
 
class  FullCodeFlagsHasDeoptimizationSupportField
 
class  FullCodeFlagsIsCompiledOptimizable
 
class  HasFunctionCacheField
 
class  ICStateField
 
class  IsCrankshaftedField
 
class  KindField
 
class  MarkedForDeoptimizationField
 
class  SafepointTableOffsetField
 
class  StackSlotsField
 
class  StubMajorKeyField
 
class  TypeField
 

Public Types

enum  Kind { NUMBER_OF_KINDS }
 
enum  StubType { NORMAL, FAST }
 
enum  Age {
  kNotExecutedCodeAge = -2, kExecutedOnceCodeAge = -1, kNoAgeCodeAge = 0, kAfterLastCodeAge,
  kFirstCodeAge = kNotExecutedCodeAge, kLastCodeAge = kAfterLastCodeAge - 1, kCodeAgeCount = kAfterLastCodeAge - kNotExecutedCodeAge - 1, kIsOldCodeAge = kSexagenarianCodeAge,
  kPreAgedCodeAge = kIsOldCodeAge - 1
}
 
typedef uint32_t Flags
 
- Public Types inherited from Object
enum  ValueType { OPTIMAL_REPRESENTATION, FORCE_TAGGED }
 

Public Member Functions

 STATIC_ASSERT (NUMBER_OF_KINDS<=16)
 
int instruction_size ()
 
void set_instruction_size (int value)
 
void InvalidateRelocation ()
 
void InvalidateEmbeddedObjects ()
 
Objecttype_feedback_info ()
 
void set_type_feedback_info (Object *value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
int stub_info ()
 
void set_stub_info (int info)
 
void set_ic_age (int count)
 
int ic_age ()
 
int prologue_offset ()
 
void set_prologue_offset (int offset)
 
ByteArrayunchecked_relocation_info ()
 
int relocation_size ()
 
Flags flags ()
 
void set_flags (Flags flags)
 
Kind kind ()
 
InlineCacheState ic_state ()
 
ExtraICState extra_ic_state ()
 
StubType type ()
 
bool is_inline_cache_stub ()
 
bool is_debug_stub ()
 
bool is_handler ()
 
bool is_load_stub ()
 
bool is_keyed_load_stub ()
 
bool is_store_stub ()
 
bool is_keyed_store_stub ()
 
bool is_binary_op_stub ()
 
bool is_compare_ic_stub ()
 
bool is_compare_nil_ic_stub ()
 
bool is_to_boolean_ic_stub ()
 
bool is_keyed_stub ()
 
bool is_optimized_code ()
 
void set_raw_kind_specific_flags1 (int value)
 
void set_raw_kind_specific_flags2 (int value)
 
int major_key ()
 
void set_major_key (int value)
 
bool has_major_key ()
 
bool is_crankshafted ()
 
void set_is_crankshafted (bool value)
 
bool optimizable ()
 
void set_optimizable (bool value)
 
bool has_deoptimization_support ()
 
void set_has_deoptimization_support (bool value)
 
bool has_debug_break_slots ()
 
void set_has_debug_break_slots (bool value)
 
bool is_compiled_optimizable ()
 
void set_compiled_optimizable (bool value)
 
void set_allow_osr_at_loop_nesting_level (int level)
 
int allow_osr_at_loop_nesting_level ()
 
int profiler_ticks ()
 
void set_profiler_ticks (int ticks)
 
unsigned stack_slots ()
 
void set_stack_slots (unsigned slots)
 
unsigned safepoint_table_offset ()
 
void set_safepoint_table_offset (unsigned offset)
 
unsigned back_edge_table_offset ()
 
void set_back_edge_table_offset (unsigned offset)
 
bool back_edges_patched_for_osr ()
 
void set_back_edges_patched_for_osr (bool value)
 
byte to_boolean_state ()
 
bool has_function_cache ()
 
void set_has_function_cache (bool flag)
 
bool marked_for_deoptimization ()
 
void set_marked_for_deoptimization (bool flag)
 
ConstantPoolArrayconstant_pool ()
 
void set_constant_pool (Object *constant_pool)
 
SafepointEntry GetSafepointEntry (Address pc)
 
ObjectFindNthObject (int n, Map *match_map)
 
AllocationSiteFindFirstAllocationSite ()
 
MapFindFirstMap ()
 
void FindAllMaps (MapHandleList *maps)
 
void FindAllTypes (TypeHandleList *types)
 
CodeFindFirstHandler ()
 
bool FindHandlers (CodeHandleList *code_list, int length=-1)
 
NameFindFirstName ()
 
void FindAndReplace (const FindAndReplacePattern &pattern)
 
void WipeOutHeader ()
 
byteinstruction_start ()
 
byteinstruction_end ()
 
int body_size ()
 
byterelocation_start ()
 
byteentry ()
 
bool contains (byte *pc)
 
void Relocate (intptr_t delta)
 
void CopyFrom (const CodeDesc &desc)
 
int ExecutableSize ()
 
int SourcePosition (Address pc)
 
int SourceStatementPosition (Address pc)
 
int CodeSize ()
 
void CodeIterateBody (ObjectVisitor *v)
 
template<typename StaticVisitor >
void CodeIterateBody (Heap *heap)
 
void ClearInlineCaches ()
 
void ClearInlineCaches (Kind kind)
 
void ClearTypeFeedbackInfo (Heap *heap)
 
BailoutId TranslatePcOffsetToAstId (uint32_t pc_offset)
 
uint32_t TranslateAstIdToPcOffset (BailoutId ast_id)
 
void MakeOlder (MarkingParity)
 
bool IsOld ()
 
Age GetAge ()
 
Age GetRawAge ()
 
void PrintDeoptLocation (FILE *out, int bailout_id)
 
bool CanDeoptAt (Address pc)
 
bool IsWeakObject (Object *object)
 
bool IsWeakObjectInOptimizedCode (Object *object)
 
 STATIC_ASSERT (kStackSlotsFirstBit+kStackSlotsBitCount<=32)
 
 STATIC_ASSERT (kHasFunctionCacheFirstBit+kHasFunctionCacheBitCount<=32)
 
 STATIC_ASSERT (kMarkedForDeoptimizationFirstBit+kMarkedForDeoptimizationBitCount<=32)
 
 STATIC_ASSERT (kStubMajorKeyFirstBit+kStubMajorKeyBits<=32)
 
 STATIC_ASSERT (kSafepointTableOffsetFirstBit+kSafepointTableOffsetBitCount<=32)
 
 STATIC_ASSERT (1+kStubMajorKeyBits+kSafepointTableOffsetBitCount<=32)
 
- Public Member Functions inherited from HeapObject
Mapmap ()
 
void set_map (Map *value)
 
void set_map_no_write_barrier (Map *value)
 
MapWord map_word ()
 
void set_map_word (MapWord map_word)
 
HeapGetHeap ()
 
IsolateGetIsolate ()
 
Address address ()
 
void Iterate (ObjectVisitor *v)
 
void IterateBody (InstanceType type, int object_size, ObjectVisitor *v)
 
int Size ()
 
int SizeFromMap (Map *map)
 
WriteBarrierMode GetWriteBarrierMode (const DisallowHeapAllocation &promise)
 
void HeapObjectShortPrint (StringStream *accumulator)
 
 STATIC_CHECK (kMapOffset==Internals::kHeapObjectMapOffset)
 
- Public Member Functions inherited from Object
bool IsObject ()
 
bool IsFixedArrayBase ()
 
bool IsExternal ()
 
bool IsAccessorInfo ()
 
bool IsStruct ()
 
 INLINE (bool IsSpecObject())
 
 INLINE (bool IsSpecFunction())
 
bool IsCallable ()
 
 INLINE (bool IsUndefined())
 
 INLINE (bool IsNull())
 
 INLINE (bool IsTheHole())
 
 INLINE (bool IsUninitialized())
 
 INLINE (bool IsTrue())
 
 INLINE (bool IsFalse())
 
bool IsArgumentsMarker ()
 
bool NonFailureIsHeapObject ()
 
bool IsFiller ()
 
double Number ()
 
bool IsNaN ()
 
bool ToInt32 (int32_t *value)
 
bool ToUint32 (uint32_t *value)
 
Representation OptimalRepresentation (ValueType type=OPTIMAL_REPRESENTATION)
 
bool FitsRepresentation (Representation representation)
 
MaybeObject * AllocateNewStorageFor (Heap *heap, Representation representation)
 
bool HasValidElements ()
 
bool HasSpecificClassOf (String *name)
 
MUST_USE_RESULT MaybeObject * ToObject (Isolate *isolate)
 
bool BooleanValue ()
 
MUST_USE_RESULT MaybeObject * ToObject (Context *native_context)
 
MUST_USE_RESULT MaybeObject * ToSmi ()
 
void Lookup (Name *name, LookupResult *result)
 
MUST_USE_RESULT MaybeObject * GetProperty (Name *key)
 
MUST_USE_RESULT MaybeObject * GetProperty (Name *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithReceiver (Object *receiver, Name *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetProperty (Object *receiver, LookupResult *result, Name *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithDefinedGetter (Object *receiver, JSReceiver *getter)
 
ObjectGetPrototype (Isolate *isolate)
 
MapGetMarkerMap (Isolate *isolate)
 
ObjectGetHash ()
 
bool SameValue (Object *other)
 
bool ToArrayIndex (uint32_t *index)
 
bool IsStringObjectWithCharacterAt (uint32_t index)
 
void VerifyApiCallResultType ()
 
void ShortPrint (FILE *out=stdout)
 
void ShortPrint (StringStream *accumulator)
 

Static Public Member Functions

static const char * Kind2String (Kind kind)
 
static Flags ComputeFlags (Kind kind, InlineCacheState ic_state=UNINITIALIZED, ExtraICState extra_ic_state=kNoExtraICState, StubType type=NORMAL, InlineCacheHolderFlag holder=OWN_MAP)
 
static Flags ComputeMonomorphicFlags (Kind kind, ExtraICState extra_ic_state=kNoExtraICState, InlineCacheHolderFlag holder=OWN_MAP, StubType type=NORMAL)
 
static Flags ComputeHandlerFlags (Kind handler_kind, StubType type=NORMAL, InlineCacheHolderFlag holder=OWN_MAP)
 
static InlineCacheState ExtractICStateFromFlags (Flags flags)
 
static StubType ExtractTypeFromFlags (Flags flags)
 
static Kind ExtractKindFromFlags (Flags flags)
 
static InlineCacheHolderFlag ExtractCacheHolderFromFlags (Flags flags)
 
static ExtraICState ExtractExtraICStateFromFlags (Flags flags)
 
static Flags RemoveTypeFromFlags (Flags flags)
 
static CodeGetCodeFromTargetAddress (Address address)
 
static ObjectGetObjectFromEntryAddress (Address location_of_address)
 
static int SizeFor (int body_size)
 
static Codecast (Object *obj)
 
static void MakeCodeAgeSequenceYoung (byte *sequence, Isolate *isolate)
 
static void MarkCodeAsExecuted (byte *sequence, Isolate *isolate)
 
static bool IsYoungSequence (byte *sequence)
 
static CodeGetPreAgedCodeAgeStub (Isolate *isolate)
 
- Static Public Member Functions inherited from HeapObject
static HeapObjectFromAddress (Address address)
 
static Object ** RawField (HeapObject *obj, int offset)
 
static void UpdateMapCodeCache (Handle< HeapObject > object, Handle< Name > name, Handle< Code > code)
 
static HeapObjectcast (Object *obj)
 
- Static Public Member Functions inherited from Object
static MUST_USE_RESULT Handle
< Object
ToSmi (Isolate *isolate, Handle< Object > object)
 
static Handle< ObjectGetPropertyWithReceiver (Handle< Object > object, Handle< Object > receiver, Handle< Name > name, PropertyAttributes *attributes)
 
static Handle< ObjectGetProperty (Handle< Object > object, Handle< Name > key)
 
static Handle< ObjectGetProperty (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< ObjectGetElement (Isolate *isolate, Handle< Object > object, uint32_t index)
 
static Handle< ObjectGetElementNoExceptionThrown (Isolate *isolate, Handle< Object > object, uint32_t index)
 
static Handle< ObjectGetElementWithReceiver (Isolate *isolate, Handle< Object > object, Handle< Object > receiver, uint32_t index)
 
static Handle< ObjectGetOrCreateHash (Handle< Object > object, Isolate *isolate)
 
static Objectcast (Object *value)
 

Static Public Attributes

static const int kPrologueOffsetNotSet = -1
 
static const int kMaxLoopNestingMarker = 6
 
static const int kInstructionSizeOffset = HeapObject::kHeaderSize
 
static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize
 
static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize
 
static const int kDeoptimizationDataOffset
 
static const int kTypeFeedbackInfoOffset
 
static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset + kPointerSize
 
static const int kGCMetadataOffset = kNextCodeLinkOffset + kPointerSize
 
static const int kICAgeOffset
 
static const int kFlagsOffset = kICAgeOffset + kIntSize
 
static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize
 
static const int kKindSpecificFlags2Offset
 
static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize
 
static const int kConstantPoolOffset = kPrologueOffset + kPointerSize
 
static const int kHeaderPaddingStart = kConstantPoolOffset + kIntSize
 
static const int kHeaderSize
 
static const int kOptimizableOffset = kKindSpecificFlags1Offset
 
static const int kFullCodeFlags = kOptimizableOffset + 1
 
static const int kAllowOSRAtLoopNestingLevelOffset = kFullCodeFlags + 1
 
static const int kProfilerTicksOffset = kAllowOSRAtLoopNestingLevelOffset + 1
 
static const int kStackSlotsFirstBit = 0
 
static const int kStackSlotsBitCount = 24
 
static const int kHasFunctionCacheFirstBit
 
static const int kHasFunctionCacheBitCount = 1
 
static const int kMarkedForDeoptimizationFirstBit
 
static const int kMarkedForDeoptimizationBitCount = 1
 
static const int kIsCrankshaftedBit = 0
 
static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1
 
static const int kSafepointTableOffsetFirstBit
 
static const int kSafepointTableOffsetBitCount = 24
 
static const int kArgumentsBits = 16
 
static const int kMaxArguments = (1 << kArgumentsBits) - 1
 
static const int kFlagsNotUsedInLookup
 
- 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
 

Friends

class RelocIterator
 
class Deoptimizer
 

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)
 

Detailed Description

Definition at line 5180 of file objects.h.

Member Typedef Documentation

typedef uint32_t Flags

Definition at line 5184 of file objects.h.

Member Enumeration Documentation

enum Age
Enumerator
kNotExecutedCodeAge 
kExecutedOnceCodeAge 
kNoAgeCodeAge 
kAfterLastCodeAge 
kFirstCodeAge 
kLastCodeAge 
kCodeAgeCount 
kIsOldCodeAge 
kPreAgedCodeAge 

Definition at line 5532 of file objects.h.

enum Kind
Enumerator
NUMBER_OF_KINDS 

Definition at line 5208 of file objects.h.

enum StubType
Enumerator
NORMAL 
FAST 

Definition at line 5222 of file objects.h.

Member Function Documentation

unsigned back_edge_table_offset ( )
inline
bool back_edges_patched_for_osr ( )
inline
int body_size ( )
inline
void ClearInlineCaches ( )
void ClearInlineCaches ( Code::Kind  kind)

Definition at line 10568 of file objects.cc.

References Code::ClearInlineCaches().

int CodeSize ( )
inline

Definition at line 5514 of file objects.h.

Referenced by Logger::CodeDeoptEvent(), and RuntimeProfiler::OptimizeNow().

Code::Flags ComputeHandlerFlags ( Kind  handler_kind,
StubType  type = NORMAL,
InlineCacheHolderFlag  holder = OWN_MAP 
)
inlinestatic
Code::Flags ComputeMonomorphicFlags ( Kind  kind,
ExtraICState  extra_ic_state = kNoExtraICState,
InlineCacheHolderFlag  holder = OWN_MAP,
StubType  type = NORMAL 
)
inlinestatic

Definition at line 4616 of file objects-inl.h.

References Code::ComputeFlags(), and v8::internal::MONOMORPHIC.

int ExecutableSize ( )
inline

Definition at line 5499 of file objects.h.

References ASSERT_EQ, and Code::kHeaderSize.

Referenced by CpuProfiler::CodeCreateEvent(), CpuProfiler::RegExpCodeCreateEvent(), and TEST().

InlineCacheHolderFlag ExtractCacheHolderFromFlags ( Flags  flags)
inlinestatic
ExtraICState ExtractExtraICStateFromFlags ( Flags  flags)
inlinestatic
InlineCacheState ExtractICStateFromFlags ( Flags  flags)
inlinestatic
Code::Kind ExtractKindFromFlags ( Flags  flags)
inlinestatic

Definition at line 4631 of file objects-inl.h.

References BitFieldBase< Kind, shift, size, uint32_t >::decode().

Referenced by Code::kind().

Code::StubType ExtractTypeFromFlags ( Flags  flags)
inlinestatic

Definition at line 4646 of file objects-inl.h.

References BitFieldBase< StubType, shift, size, uint32_t >::decode().

Referenced by Code::type().

void FindAllTypes ( TypeHandleList types)
AllocationSite * FindFirstAllocationSite ( )
Map * FindFirstMap ( )
Name * FindFirstName ( )
bool FindHandlers ( CodeHandleList code_list,
int  length = -1 
)
Object * FindNthObject ( int  n,
Map match_map 
)
Code::Age GetAge ( )

Definition at line 10686 of file objects.cc.

References Code::GetRawAge().

Referenced by Code::IsOld().

Object * GetObjectFromEntryAddress ( Address  location_of_address)
inlinestatic
static Code* GetPreAgedCodeAgeStub ( Isolate isolate)
inlinestatic

Definition at line 5559 of file objects.h.

References v8::internal::NO_MARKING_PARITY.

Code::Age GetRawAge ( )

Definition at line 10691 of file objects.cc.

References Code::kNoAgeCodeAge, and v8::internal::NULL.

Referenced by Code::GetAge().

SafepointEntry GetSafepointEntry ( Address  pc)

Definition at line 10435 of file objects.cc.

Referenced by OptimizedFrame::GetDeoptimizationData().

bool has_debug_break_slots ( )
inline
bool has_major_key ( )
inline

Definition at line 4371 of file objects-inl.h.

References v8::internal::HANDLER, Code::kind(), and v8::internal::STUB.

Referenced by Code::major_key(), and Code::set_major_key().

int ic_age ( )
inline
byte * instruction_end ( )
inline
void InvalidateEmbeddedObjects ( )
void InvalidateRelocation ( )

Definition at line 10298 of file objects.cc.

References HeapObject::GetHeap().

bool is_binary_op_stub ( )
inline

Definition at line 5306 of file objects.h.

bool is_compare_ic_stub ( )
inline

Definition at line 5307 of file objects.h.

Referenced by IC::SetTargetAtAddress().

bool is_compare_nil_ic_stub ( )
inline

Definition at line 5308 of file objects.h.

bool is_compiled_optimizable ( )
inline
bool is_debug_stub ( )
inline

Definition at line 4584 of file objects-inl.h.

References v8::internal::DEBUG_STUB, and Code::ic_state().

Referenced by IC::Clear().

bool is_handler ( )
inline

Definition at line 5301 of file objects.h.

References v8::internal::HANDLER.

Referenced by Code::FindAndReplace().

bool is_keyed_load_stub ( )
inline

Definition at line 5303 of file objects.h.

Referenced by Code::is_keyed_stub().

bool is_keyed_store_stub ( )
inline

Definition at line 5305 of file objects.h.

Referenced by Code::is_keyed_stub().

bool is_keyed_stub ( )
inline

Definition at line 4579 of file objects-inl.h.

References Code::is_keyed_load_stub(), and Code::is_keyed_store_stub().

bool is_load_stub ( )
inline

Definition at line 5302 of file objects.h.

bool is_optimized_code ( )
inline

Definition at line 5311 of file objects.h.

Referenced by Code::IsWeakObjectInOptimizedCode().

bool is_store_stub ( )
inline

Definition at line 5304 of file objects.h.

bool is_to_boolean_ic_stub ( )
inline

Definition at line 5309 of file objects.h.

bool IsOld ( )

Definition at line 10671 of file objects.cc.

References Code::GetAge(), and Code::kIsOldCodeAge.

bool IsWeakObject ( Object object)
inline

Definition at line 5570 of file objects.h.

bool IsWeakObjectInOptimizedCode ( Object object)
inline
static bool IsYoungSequence ( byte sequence)
static
Code::Kind kind ( )
inline

Definition at line 4303 of file objects-inl.h.

References Code::ExtractKindFromFlags(), and Code::flags().

Referenced by Context::AddOptimizedCode(), SharedFunctionInfo::AddToOptimizedCodeMap(), Code::allow_osr_at_loop_nesting_level(), Code::back_edge_table_offset(), Code::back_edges_patched_for_osr(), BackEdgeTable::BackEdgeTable(), IC::Clear(), Heap::ClearAllICsByKind(), Code::ClearTypeFeedbackInfo(), Heap::CreateCode(), Deoptimizer::DeoptimizeFunction(), Code::FindFirstHandler(), Code::FindHandlers(), OptimizedFrame::GetDeoptimizationData(), Deoptimizer::GetDeoptimizedCodeCount(), Code::has_debug_break_slots(), Code::has_deoptimization_support(), SharedFunctionInfo::has_deoptimization_support(), Code::has_function_cache(), Code::has_major_key(), Code::is_compiled_optimizable(), Code::is_inline_cache_stub(), JSFunction::IsOptimizable(), JSFunction::IsOptimized(), Code::marked_for_deoptimization(), Code::optimizable(), RuntimeProfiler::OptimizeNow(), IC::PostPatching(), JavaScriptFrame::Print(), Code::profiler_ticks(), JSFunction::ReplaceCode(), v8::internal::RUNTIME_FUNCTION(), Code::set_allow_osr_at_loop_nesting_level(), Code::set_back_edge_table_offset(), Code::set_back_edges_patched_for_osr(), Code::set_compiled_optimizable(), Code::set_has_debug_break_slots(), Code::set_has_deoptimization_support(), Code::set_has_function_cache(), Code::set_marked_for_deoptimization(), Code::set_optimizable(), Code::set_profiler_ticks(), Code::set_stub_info(), Code::set_type_feedback_info(), IC::SetTargetAtAddress(), Code::stub_info(), V8HeapExplorer::TagCodeObject(), Code::TranslateAstIdToPcOffset(), Code::TranslatePcOffsetToAstId(), and Code::type_feedback_info().

const char * Kind2String ( Kind  kind)
static

Definition at line 10803 of file objects.cc.

References CASE, CODE_KIND_LIST, v8::internal::NULL, Code::NUMBER_OF_KINDS, and UNREACHABLE.

void MakeCodeAgeSequenceYoung ( byte sequence,
Isolate isolate 
)
static

Definition at line 10631 of file objects.cc.

References Code::kNoAgeCodeAge, and v8::internal::NO_MARKING_PARITY.

void MakeOlder ( MarkingParity  current_parity)

Definition at line 10654 of file objects.cc.

References HeapObject::GetIsolate(), Code::kLastCodeAge, and v8::internal::NULL.

void MarkCodeAsExecuted ( byte sequence,
Isolate isolate 
)
static

Definition at line 10636 of file objects.cc.

References Code::kExecutedOnceCodeAge, and v8::internal::NO_MARKING_PARITY.

bool optimizable ( )
inline

Definition at line 4385 of file objects-inl.h.

References ASSERT_EQ, Code::kind(), Code::kOptimizableOffset, and READ_BYTE_FIELD.

Referenced by JSFunction::IsOptimizable().

void PrintDeoptLocation ( FILE *  out,
int  bailout_id 
)
int profiler_ticks ( )
inline
int prologue_offset ( )
inline
void Relocate ( intptr_t  delta)
int relocation_size ( )
inline
byte * relocation_start ( )
inline
Code::Flags RemoveTypeFromFlags ( Flags  flags)
inlinestatic

Definition at line 4656 of file objects-inl.h.

Referenced by CodeCache::Lookup().

unsigned safepoint_table_offset ( )
inline
void set_allow_osr_at_loop_nesting_level ( int  level)
inline
void set_back_edges_patched_for_osr ( bool  value)
inline
void set_compiled_optimizable ( bool  value)
inline
void set_constant_pool ( Object constant_pool)
inline
void set_has_debug_break_slots ( bool  value)
inline
void set_ic_age ( int  count)
inline

Referenced by Heap::CreateCode().

void set_instruction_size ( int  value)
inline

Referenced by Heap::CreateCode().

void set_is_crankshafted ( bool  value)
inline
void set_optimizable ( bool  value)
inline

Definition at line 4391 of file objects-inl.h.

References ASSERT_EQ, Code::kind(), Code::kOptimizableOffset, and WRITE_BYTE_FIELD.

void set_profiler_ticks ( int  ticks)
inline
void set_prologue_offset ( int  offset)
inline

Referenced by Heap::CreateCode().

void set_raw_kind_specific_flags1 ( int  value)
inline

Definition at line 4332 of file objects-inl.h.

References Code::kKindSpecificFlags1Offset, and WRITE_INT_FIELD.

Referenced by Heap::CreateCode().

void set_raw_kind_specific_flags2 ( int  value)
inline

Definition at line 4337 of file objects-inl.h.

References Code::kKindSpecificFlags2Offset, and WRITE_INT_FIELD.

Referenced by Heap::CreateCode().

void set_stub_info ( int  info)
inline

Definition at line 5840 of file objects-inl.h.

References ASSERT, Smi::FromInt(), Code::kind(), and v8::internal::STUB.

void set_type_feedback_info ( Object value,
WriteBarrierMode  mode = UPDATE_WRITE_BARRIER 
)
inline
static int SizeFor ( int  body_size)
inlinestatic
int SourceStatementPosition ( Address  pc)
STATIC_ASSERT ( NUMBER_OF_KINDS<=  16)
STATIC_ASSERT ( kStackSlotsFirstBit+kStackSlotsBitCount<=  32)
STATIC_ASSERT ( kStubMajorKeyFirstBit+kStubMajorKeyBits<=  32)
int stub_info ( )
inline

Definition at line 5833 of file objects-inl.h.

References ASSERT, Smi::cast(), Code::kind(), and Smi::value().

Referenced by ICStub::Describes().

byte to_boolean_state ( )
inline

Definition at line 4533 of file objects-inl.h.

References Code::extra_ic_state().

uint32_t TranslateAstIdToPcOffset ( BailoutId  ast_id)
BailoutId TranslatePcOffsetToAstId ( uint32_t  pc_offset)
Object * type_feedback_info ( )
inline

Definition at line 5819 of file objects-inl.h.

References ASSERT, and Code::kind().

Referenced by Code::ClearTypeFeedbackInfo(), and IC::PostPatching().

ByteArray * unchecked_relocation_info ( )
inline

Definition at line 5872 of file objects-inl.h.

References Code::kRelocationInfoOffset, and READ_FIELD.

Referenced by Code::relocation_size(), and Code::relocation_start().

void WipeOutHeader ( )
inline

Definition at line 5807 of file objects-inl.h.

References v8::internal::NULL, READ_FIELD, and WRITE_FIELD.

Friends And Related Function Documentation

friend class Deoptimizer
friend

Definition at line 5689 of file objects.h.

friend class RelocIterator
friend

Definition at line 5688 of file objects.h.

Field Documentation

const int kAllowOSRAtLoopNestingLevelOffset = kFullCodeFlags + 1
static
const int kArgumentsBits = 16
static

Definition at line 5680 of file objects.h.

const int kConstantPoolOffset = kPrologueOffset + kPointerSize
static

Definition at line 5598 of file objects.h.

Referenced by Code::CodeIterateBody(), Code::constant_pool(), and Code::set_constant_pool().

const int kDeoptimizationDataOffset
static
Initial value:

Definition at line 5584 of file objects.h.

Referenced by Code::CodeIterateBody().

const int kFlagsNotUsedInLookup
static
Initial value:

Definition at line 5684 of file objects.h.

const int kFlagsOffset = kICAgeOffset + kIntSize
static

Definition at line 5592 of file objects.h.

Referenced by Code::flags(), and Code::set_flags().

const int kGCMetadataOffset = kNextCodeLinkOffset + kPointerSize
static

Definition at line 5589 of file objects.h.

const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize
static

Definition at line 5583 of file objects.h.

Referenced by Code::CodeIterateBody().

const int kHasFunctionCacheBitCount = 1
static

Definition at line 5633 of file objects.h.

const int kHasFunctionCacheFirstBit
static
Initial value:

Definition at line 5631 of file objects.h.

const int kHeaderPaddingStart = kConstantPoolOffset + kIntSize
static

Definition at line 5600 of file objects.h.

const int kICAgeOffset
static
Initial value:

Definition at line 5590 of file objects.h.

const int kInstructionSizeOffset = HeapObject::kHeaderSize
static

Definition at line 5581 of file objects.h.

const int kIsCrankshaftedBit = 0
static

Definition at line 5652 of file objects.h.

const int kMarkedForDeoptimizationBitCount = 1
static

Definition at line 5636 of file objects.h.

const int kMarkedForDeoptimizationFirstBit
static
Initial value:

Definition at line 5634 of file objects.h.

const int kMaxArguments = (1 << kArgumentsBits) - 1
static

Definition at line 5681 of file objects.h.

Referenced by ParserBase< Traits >::ParseArguments().

const int kMaxLoopNestingMarker = 6
static
const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset + kPointerSize
static

Definition at line 5588 of file objects.h.

Referenced by Code::CodeIterateBody(), and WeakListVisitor< Code >::WeakNextOffset().

const int kOptimizableOffset = kKindSpecificFlags1Offset
static

Definition at line 5608 of file objects.h.

Referenced by Code::optimizable(), and Code::set_optimizable().

const int kProfilerTicksOffset = kAllowOSRAtLoopNestingLevelOffset + 1
static

Definition at line 5617 of file objects.h.

Referenced by Code::profiler_ticks(), and Code::set_profiler_ticks().

const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize
static

Definition at line 5597 of file objects.h.

const int kPrologueOffsetNotSet = -1
static
const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize
static

Definition at line 5582 of file objects.h.

Referenced by Code::CodeIterateBody(), and Code::unchecked_relocation_info().

const int kSafepointTableOffsetBitCount = 24
static

Definition at line 5660 of file objects.h.

Referenced by Code::set_safepoint_table_offset().

const int kSafepointTableOffsetFirstBit
static
Initial value:

Definition at line 5658 of file objects.h.

const int kStackSlotsBitCount = 24
static

Definition at line 5630 of file objects.h.

Referenced by Code::set_stack_slots().

const int kStackSlotsFirstBit = 0
static

Definition at line 5629 of file objects.h.

const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1
static

Definition at line 5657 of file objects.h.

const int kTypeFeedbackInfoOffset
static
Initial value:

Definition at line 5586 of file objects.h.

Referenced by Code::CodeIterateBody(), and Code::set_type_feedback_info().


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