V8 Project
v8::internal::JSArrayBasedStruct< S > Class Template Reference

#include <liveedit.h>

+ Inheritance diagram for v8::internal::JSArrayBasedStruct< S >:
+ Collaboration diagram for v8::internal::JSArrayBasedStruct< S >:

Public Member Functions

 JSArrayBasedStruct (Handle< JSArray > array)
 
Handle< JSArrayGetJSArray ()
 
Isolateisolate () const
 

Static Public Member Functions

static S Create (Isolate *isolate)
 
static S cast (Object *object)
 

Protected Member Functions

void SetField (int field_position, Handle< Object > value)
 
void SetSmiValueField (int field_position, int value)
 
Handle< ObjectGetField (int field_position)
 
int GetSmiValueField (int field_position)
 

Private Attributes

Handle< JSArrayarray_
 

Detailed Description

template<typename S>
class v8::internal::JSArrayBasedStruct< S >

Definition at line 225 of file liveedit.h.

Constructor & Destructor Documentation

◆ JSArrayBasedStruct()

template<typename S >
v8::internal::JSArrayBasedStruct< S >::JSArrayBasedStruct ( Handle< JSArray array)
inlineexplicit

Definition at line 239 of file liveedit.h.

239  : array_(array) {
240  }
Handle< JSArray > array_
Definition: liveedit.h:270

Member Function Documentation

◆ cast()

template<typename S >
static S v8::internal::JSArrayBasedStruct< S >::cast ( Object object)
inlinestatic

Definition at line 233 of file liveedit.h.

233  {
234  JSArray* array = JSArray::cast(object);
235  Handle<JSArray> array_handle(array);
236  return S(array_handle);
237  }

References v8::internal::S.

◆ Create()

template<typename S >
static S v8::internal::JSArrayBasedStruct< S >::Create ( Isolate isolate)
inlinestatic

Definition at line 227 of file liveedit.h.

227  {
228  Factory* factory = isolate->factory();
229  Handle<JSArray> array = factory->NewJSArray(S::kSize_);
230  return S(array);
231  }
Factory * factory()
Definition: isolate.h:982
Isolate * isolate() const
Definition: liveedit.h:246

References v8::internal::Isolate::factory(), v8::internal::JSArrayBasedStruct< S >::isolate(), and v8::internal::S.

+ Here is the call graph for this function:

◆ GetField()

template<typename S >
Handle<Object> v8::internal::JSArrayBasedStruct< S >::GetField ( int  field_position)
inlineprotected

Definition at line 259 of file liveedit.h.

259  {
260  return Object::GetElement(
261  isolate(), array_, field_position).ToHandleChecked();
262  }
static MUST_USE_RESULT MaybeHandle< Object > GetElement(Isolate *isolate, Handle< Object > object, uint32_t index)
Definition: objects-inl.h:1113

References v8::internal::JSArrayBasedStruct< S >::array_, v8::internal::Object::GetElement(), and v8::internal::JSArrayBasedStruct< S >::isolate().

Referenced by v8::internal::JSArrayBasedStruct< S >::GetSmiValueField().

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

◆ GetJSArray()

template<typename S >
Handle<JSArray> v8::internal::JSArrayBasedStruct< S >::GetJSArray ( )
inline

Definition at line 242 of file liveedit.h.

242  {
243  return array_;
244  }

References v8::internal::JSArrayBasedStruct< S >::array_.

Referenced by v8::internal::FunctionInfoListener::FunctionStarted(), and v8::internal::LiveEdit::WrapSharedFunctionInfos().

+ Here is the caller graph for this function:

◆ GetSmiValueField()

template<typename S >
int v8::internal::JSArrayBasedStruct< S >::GetSmiValueField ( int  field_position)
inlineprotected

Definition at line 264 of file liveedit.h.

264  {
265  Handle<Object> res = GetField(field_position);
266  return Handle<Smi>::cast(res)->value();
267  }
static Handle< T > cast(Handle< S > that)
Definition: handles.h:116
Handle< Object > GetField(int field_position)
Definition: liveedit.h:259

References v8::internal::Handle< T >::cast(), and v8::internal::JSArrayBasedStruct< S >::GetField().

+ Here is the call graph for this function:

◆ isolate()

template<typename S >
Isolate* v8::internal::JSArrayBasedStruct< S >::isolate ( ) const
inline

Definition at line 246 of file liveedit.h.

246  {
247  return array_->GetIsolate();
248  }

References v8::internal::JSArrayBasedStruct< S >::array_.

Referenced by v8::internal::JSArrayBasedStruct< S >::Create(), v8::internal::JSArrayBasedStruct< S >::GetField(), and v8::internal::JSArrayBasedStruct< S >::SetSmiValueField().

+ Here is the caller graph for this function:

◆ SetField()

template<typename S >
void v8::internal::JSArrayBasedStruct< S >::SetField ( int  field_position,
Handle< Object value 
)
inlineprotected

Definition at line 251 of file liveedit.h.

251  {
252  JSObject::SetElement(array_, field_position, value, NONE, SLOPPY).Assert();
253  }
static MUST_USE_RESULT MaybeHandle< Object > SetElement(Handle< JSObject > object, uint32_t index, Handle< Object > value, PropertyAttributes attributes, StrictMode strict_mode, bool check_prototype=true, SetPropertyMode set_mode=SET_PROPERTY)
Definition: objects.cc:12336
@ NONE

References v8::internal::JSArrayBasedStruct< S >::array_, NONE, v8::internal::JSObject::SetElement(), and v8::internal::SLOPPY.

Referenced by v8::internal::JSArrayBasedStruct< S >::SetSmiValueField().

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

◆ SetSmiValueField()

template<typename S >
void v8::internal::JSArrayBasedStruct< S >::SetSmiValueField ( int  field_position,
int  value 
)
inlineprotected

Definition at line 255 of file liveedit.h.

255  {
256  SetField(field_position, Handle<Smi>(Smi::FromInt(value), isolate()));
257  }
void SetField(int field_position, Handle< Object > value)
Definition: liveedit.h:251
static Smi * FromInt(int value)
Definition: objects-inl.h:1321

References v8::internal::Smi::FromInt(), v8::internal::JSArrayBasedStruct< S >::isolate(), and v8::internal::JSArrayBasedStruct< S >::SetField().

+ Here is the call graph for this function:

Member Data Documentation

◆ array_


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