V8 Project
v8::internal::BreakPointInfo Class Reference

#include <objects.h>

+ Inheritance diagram for v8::internal::BreakPointInfo:
+ Collaboration diagram for v8::internal::BreakPointInfo:

Public Member Functions

int GetBreakPointCount ()
 
- Public Member Functions inherited from v8::internal::Struct
void InitializeBody (int object_size)
 
- Public Member Functions inherited from v8::internal::HeapObject
Mapmap () const
 
void set_map (Map *value)
 
void set_map_no_write_barrier (Map *value)
 
Mapsynchronized_map ()
 
MapWord synchronized_map_word () const
 
void synchronized_set_map (Map *value)
 
void synchronized_set_map_no_write_barrier (Map *value)
 
void synchronized_set_map_word (MapWord map_word)
 
MapWord map_word () const
 
void set_map_word (MapWord map_word)
 
HeapGetHeap () const
 
IsolateGetIsolate () const
 
Address address ()
 
void Iterate (ObjectVisitor *v)
 
void IterateBody (InstanceType type, int object_size, ObjectVisitor *v)
 
int Size ()
 
bool MayContainRawValues ()
 
int SizeFromMap (Map *map)
 
WriteBarrierMode GetWriteBarrierMode (const DisallowHeapAllocation &promise)
 
void HeapObjectShortPrint (OStream &os)
 
 STATIC_ASSERT (kMapOffset==Internals::kHeapObjectMapOffset)
 
- Public Member Functions inherited from v8::internal::Object
bool IsObject () const
 
 INLINE (bool IsFixedArrayBase() const)
 
 INLINE (bool IsExternal() const)
 
 INLINE (bool IsAccessorInfo() const)
 
 INLINE (bool IsStruct() const)
 
 INLINE (bool IsSpecObject()) const
 
 INLINE (bool IsSpecFunction()) const
 
 INLINE (bool IsTemplateInfo()) const
 
 INLINE (bool IsNameDictionary() const)
 
 INLINE (bool IsSeededNumberDictionary() const)
 
 INLINE (bool IsUnseededNumberDictionary() const)
 
 INLINE (bool IsOrderedHashSet() const)
 
 INLINE (bool IsOrderedHashMap() const)
 
bool IsCallable () const
 
 INLINE (bool IsUndefined() const)
 
 INLINE (bool IsNull() const)
 
 INLINE (bool IsTheHole() const)
 
 INLINE (bool IsException() const)
 
 INLINE (bool IsUninitialized() const)
 
 INLINE (bool IsTrue() const)
 
 INLINE (bool IsFalse() const)
 
 INLINE (bool IsArgumentsMarker() const)
 
 INLINE (bool IsFiller() const)
 
double Number ()
 
 INLINE (bool IsNaN() const)
 
 INLINE (bool IsMinusZero() const)
 
bool ToInt32 (int32_t *value)
 
bool ToUint32 (uint32_t *value)
 
Representation OptimalRepresentation ()
 
bool FitsRepresentation (Representation representation)
 
Handle< HeapTypeOptimalType (Isolate *isolate, Representation representation)
 
bool HasValidElements ()
 
bool HasSpecificClassOf (String *name)
 
bool BooleanValue ()
 
ObjectGetHash ()
 
bool SameValue (Object *other)
 
bool SameValueZero (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 void ClearBreakPoint (Handle< BreakPointInfo > info, Handle< Object > break_point_object)
 
static void SetBreakPoint (Handle< BreakPointInfo > info, Handle< Object > break_point_object)
 
static bool HasBreakPointObject (Handle< BreakPointInfo > info, Handle< Object > break_point_object)
 
- Static Public Member Functions inherited from v8::internal::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 Public Member Functions inherited from v8::internal::Object
static Handle< ObjectNewStorageFor (Isolate *isolate, Handle< Object > object, Representation representation)
 
static Handle< ObjectWrapForRead (Isolate *isolate, Handle< Object > object, Representation representation)
 
static MaybeHandle< JSReceiverToObject (Isolate *isolate, Handle< Object > object)
 
static MaybeHandle< JSReceiverToObject (Isolate *isolate, Handle< Object > object, Handle< Context > context)
 
static MUST_USE_RESULT MaybeHandle< SmiToSmi (Isolate *isolate, Handle< Object > object)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetProperty (LookupIterator *it)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetProperty (Handle< Object > object, Handle< Name > key, Handle< Object > value, StrictMode strict_mode, StoreFromKeyed store_mode=MAY_BE_STORE_FROM_KEYED)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetProperty (LookupIterator *it, Handle< Object > value, StrictMode strict_mode, StoreFromKeyed store_mode, StorePropertyMode data_store_mode=NORMAL_PROPERTY)
 
static MUST_USE_RESULT MaybeHandle< ObjectWriteToReadOnlyProperty (LookupIterator *it, Handle< Object > value, StrictMode strict_mode)
 
static Handle< ObjectSetDataProperty (LookupIterator *it, Handle< Object > value)
 
static MUST_USE_RESULT MaybeHandle< ObjectAddDataProperty (LookupIterator *it, Handle< Object > value, PropertyAttributes attributes, StrictMode strict_mode, StoreFromKeyed store_mode)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetPropertyOrElement (Handle< Object > object, Handle< Name > key)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetProperty (Isolate *isolate, Handle< Object > object, const char *key)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetProperty (Handle< Object > object, Handle< Name > key)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetPropertyWithAccessor (Handle< Object > receiver, Handle< Name > name, Handle< JSObject > holder, Handle< Object > structure)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetPropertyWithAccessor (Handle< Object > receiver, Handle< Name > name, Handle< Object > value, Handle< JSObject > holder, Handle< Object > structure, StrictMode strict_mode)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetPropertyWithDefinedGetter (Handle< Object > receiver, Handle< JSReceiver > getter)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetPropertyWithDefinedSetter (Handle< Object > receiver, Handle< JSReceiver > setter, Handle< Object > value)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetElement (Isolate *isolate, Handle< Object > object, uint32_t index)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetElementWithReceiver (Isolate *isolate, Handle< Object > object, Handle< Object > receiver, uint32_t index)
 
static Handle< SmiGetOrCreateHash (Isolate *isolate, Handle< Object > object)
 

Static Public Attributes

static const int kCodePositionIndex = Struct::kHeaderSize
 
static const int kSourcePositionIndex = kCodePositionIndex + kPointerSize
 
static const int kStatementPositionIndex
 
static const int kBreakPointObjectsIndex
 
static const int kSize = kBreakPointObjectsIndex + kPointerSize
 
- Static Public Attributes inherited from v8::internal::HeapObject
static const int kMapOffset = Object::kHeaderSize
 
static const int kHeaderSize = kMapOffset + kPointerSize
 
- Static Public Attributes inherited from v8::internal::Object
static const int kHeaderSize = 0
 

Private Member Functions

 DISALLOW_IMPLICIT_CONSTRUCTORS (BreakPointInfo)
 

Additional Inherited Members

- Public Types inherited from v8::internal::Object
enum  StoreFromKeyed { MAY_BE_STORE_FROM_KEYED , CERTAINLY_NOT_STORE_FROM_KEYED }
 
enum  StorePropertyMode { NORMAL_PROPERTY , SUPER_PROPERTY }
 
- Protected Member Functions inherited from v8::internal::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 10636 of file objects.h.

Member Function Documentation

◆ ClearBreakPoint()

void v8::internal::BreakPointInfo::ClearBreakPoint ( Handle< BreakPointInfo info,
Handle< Object break_point_object 
)
static

Definition at line 16020 of file objects.cc.

16021  {
16022  Isolate* isolate = break_point_info->GetIsolate();
16023  // If there are no break points just ignore.
16024  if (break_point_info->break_point_objects()->IsUndefined()) return;
16025  // If there is a single break point clear it if it is the same.
16026  if (!break_point_info->break_point_objects()->IsFixedArray()) {
16027  if (break_point_info->break_point_objects() == *break_point_object) {
16028  break_point_info->set_break_point_objects(
16029  isolate->heap()->undefined_value());
16030  }
16031  return;
16032  }
16033  // If there are multiple break points shrink the array
16034  DCHECK(break_point_info->break_point_objects()->IsFixedArray());
16035  Handle<FixedArray> old_array =
16036  Handle<FixedArray>(
16037  FixedArray::cast(break_point_info->break_point_objects()));
16038  Handle<FixedArray> new_array =
16039  isolate->factory()->NewFixedArray(old_array->length() - 1);
16040  int found_count = 0;
16041  for (int i = 0; i < old_array->length(); i++) {
16042  if (old_array->get(i) == *break_point_object) {
16043  DCHECK(found_count == 0);
16044  found_count++;
16045  } else {
16046  new_array->set(i - found_count, old_array->get(i));
16047  }
16048  }
16049  // If the break point was found in the list change it.
16050  if (found_count > 0) break_point_info->set_break_point_objects(*new_array);
16051 }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, v8::internal::Isolate::factory(), and v8::internal::Isolate::heap().

Referenced by v8::internal::DebugInfo::ClearBreakPoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DISALLOW_IMPLICIT_CONSTRUCTORS()

v8::internal::BreakPointInfo::DISALLOW_IMPLICIT_CONSTRUCTORS ( BreakPointInfo  )
private

◆ GetBreakPointCount()

int v8::internal::BreakPointInfo::GetBreakPointCount ( )

Definition at line 16112 of file objects.cc.

16112  {
16113  // No break point.
16114  if (break_point_objects()->IsUndefined()) return 0;
16115  // Single break point.
16116  if (!break_point_objects()->IsFixedArray()) return 1;
16117  // Multiple break points.
16118  return FixedArray::cast(break_point_objects())->length();
16119 }

Referenced by v8::internal::DebugInfo::GetBreakPointCount(), and v8::internal::Debug::GetSourceBreakLocations().

+ Here is the caller graph for this function:

◆ HasBreakPointObject()

bool v8::internal::BreakPointInfo::HasBreakPointObject ( Handle< BreakPointInfo info,
Handle< Object break_point_object 
)
static

Definition at line 16091 of file objects.cc.

16093  {
16094  // No break point.
16095  if (break_point_info->break_point_objects()->IsUndefined()) return false;
16096  // Single break point.
16097  if (!break_point_info->break_point_objects()->IsFixedArray()) {
16098  return break_point_info->break_point_objects() == *break_point_object;
16099  }
16100  // Multiple break points.
16101  FixedArray* array = FixedArray::cast(break_point_info->break_point_objects());
16102  for (int i = 0; i < array->length(); i++) {
16103  if (array->get(i) == *break_point_object) {
16104  return true;
16105  }
16106  }
16107  return false;
16108 }

References v8::internal::FixedArray::get(), and v8::internal::FixedArrayBase::length().

Referenced by v8::internal::DebugInfo::FindBreakPointInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBreakPoint()

void v8::internal::BreakPointInfo::SetBreakPoint ( Handle< BreakPointInfo info,
Handle< Object break_point_object 
)
static

Definition at line 16055 of file objects.cc.

16056  {
16057  Isolate* isolate = break_point_info->GetIsolate();
16058 
16059  // If there was no break point objects before just set it.
16060  if (break_point_info->break_point_objects()->IsUndefined()) {
16061  break_point_info->set_break_point_objects(*break_point_object);
16062  return;
16063  }
16064  // If the break point object is the same as before just ignore.
16065  if (break_point_info->break_point_objects() == *break_point_object) return;
16066  // If there was one break point object before replace with array.
16067  if (!break_point_info->break_point_objects()->IsFixedArray()) {
16068  Handle<FixedArray> array = isolate->factory()->NewFixedArray(2);
16069  array->set(0, break_point_info->break_point_objects());
16070  array->set(1, *break_point_object);
16071  break_point_info->set_break_point_objects(*array);
16072  return;
16073  }
16074  // If there was more than one break point before extend array.
16075  Handle<FixedArray> old_array =
16076  Handle<FixedArray>(
16077  FixedArray::cast(break_point_info->break_point_objects()));
16078  Handle<FixedArray> new_array =
16079  isolate->factory()->NewFixedArray(old_array->length() + 1);
16080  for (int i = 0; i < old_array->length(); i++) {
16081  // If the break point was there before just ignore.
16082  if (old_array->get(i) == *break_point_object) return;
16083  new_array->set(i, old_array->get(i));
16084  }
16085  // Add the new break point.
16086  new_array->set(old_array->length(), *break_point_object);
16087  break_point_info->set_break_point_objects(*new_array);
16088 }

References v8::internal::Isolate::factory().

Referenced by v8::internal::DebugInfo::SetBreakPoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ kBreakPointObjectsIndex

const int v8::internal::BreakPointInfo::kBreakPointObjectsIndex
static
Initial value:

Definition at line 10670 of file objects.h.

◆ kCodePositionIndex

const int v8::internal::BreakPointInfo::kCodePositionIndex = Struct::kHeaderSize
static

Definition at line 10666 of file objects.h.

◆ kSize

const int v8::internal::BreakPointInfo::kSize = kBreakPointObjectsIndex + kPointerSize
static

Definition at line 10672 of file objects.h.

◆ kSourcePositionIndex

const int v8::internal::BreakPointInfo::kSourcePositionIndex = kCodePositionIndex + kPointerSize
static

Definition at line 10667 of file objects.h.

◆ kStatementPositionIndex

const int v8::internal::BreakPointInfo::kStatementPositionIndex
static
Initial value:

Definition at line 10668 of file objects.h.


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