V8 Project
v8::internal::SharedInfoWrapper Class Reference

#include <liveedit.h>

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

Public Member Functions

 SharedInfoWrapper (Handle< JSArray > array)
 
void SetProperties (Handle< String > name, int start_position, int end_position, Handle< SharedFunctionInfo > info)
 
Handle< SharedFunctionInfoGetInfo ()
 
- Public Member Functions inherited from v8::internal::JSArrayBasedStruct< SharedInfoWrapper >
 JSArrayBasedStruct (Handle< JSArray > array)
 
Handle< JSArrayGetJSArray ()
 
Isolateisolate () const
 

Static Public Member Functions

static bool IsInstance (Handle< JSArray > array)
 
- Static Public Member Functions inherited from v8::internal::JSArrayBasedStruct< SharedInfoWrapper >
static SharedInfoWrapper Create (Isolate *isolate)
 
static SharedInfoWrapper cast (Object *object)
 

Static Private Attributes

static const int kFunctionNameOffset_ = 0
 
static const int kStartPositionOffset_ = 1
 
static const int kEndPositionOffset_ = 2
 
static const int kSharedInfoOffset_ = 3
 
static const int kSize_ = 4
 

Friends

class JSArrayBasedStruct< SharedInfoWrapper >
 

Additional Inherited Members

- Protected Member Functions inherited from v8::internal::JSArrayBasedStruct< SharedInfoWrapper >
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)
 

Detailed Description

Definition at line 345 of file liveedit.h.

Constructor & Destructor Documentation

◆ SharedInfoWrapper()

v8::internal::SharedInfoWrapper::SharedInfoWrapper ( Handle< JSArray array)
inlineexplicit

Definition at line 357 of file liveedit.h.

359  }
friend class JSArrayBasedStruct< SharedInfoWrapper >
Definition: liveedit.h:375

Member Function Documentation

◆ GetInfo()

Handle< SharedFunctionInfo > v8::internal::SharedInfoWrapper::GetInfo ( )

Definition at line 691 of file liveedit.cc.

691  {
692  Handle<Object> element = this->GetField(kSharedInfoOffset_);
693  Handle<JSValue> value_wrapper = Handle<JSValue>::cast(element);
694  return UnwrapSharedFunctionInfoFromJSValue(value_wrapper);
695 }
static Handle< T > cast(Handle< S > that)
Definition: handles.h:116
Handle< Object > GetField(int field_position)
Definition: liveedit.h:259
static const int kSharedInfoOffset_
Definition: liveedit.h:372
static Handle< SharedFunctionInfo > UnwrapSharedFunctionInfoFromJSValue(Handle< JSValue > jsValue)
Definition: liveedit.cc:593

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

Referenced by v8::internal::LiveEdit::FunctionSourceUpdated(), v8::internal::LiveEdit::PatchFunctionPositions(), and v8::internal::LiveEdit::ReplaceFunctionCode().

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

◆ IsInstance()

static bool v8::internal::SharedInfoWrapper::IsInstance ( Handle< JSArray array)
inlinestatic

Definition at line 347 of file liveedit.h.

347  {
348  if (array->length() != Smi::FromInt(kSize_)) return false;
349  Handle<Object> element(
350  Object::GetElement(array->GetIsolate(),
351  array,
352  kSharedInfoOffset_).ToHandleChecked());
353  if (!element->IsJSValue()) return false;
354  return Handle<JSValue>::cast(element)->value()->IsSharedFunctionInfo();
355  }
static MUST_USE_RESULT MaybeHandle< Object > GetElement(Isolate *isolate, Handle< Object > object, uint32_t index)
Definition: objects-inl.h:1113
static Smi * FromInt(int value)
Definition: objects-inl.h:1321

References v8::internal::Handle< T >::cast(), v8::internal::Smi::FromInt(), v8::internal::Object::GetElement(), kSharedInfoOffset_, and kSize_.

Referenced by v8::internal::RUNTIME_FUNCTION().

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

◆ SetProperties()

void v8::internal::SharedInfoWrapper::SetProperties ( Handle< String name,
int  start_position,
int  end_position,
Handle< SharedFunctionInfo info 
)

Definition at line 678 of file liveedit.cc.

681  {
682  HandleScope scope(isolate());
684  Handle<JSValue> info_holder = WrapInJSValue(info);
685  this->SetField(kSharedInfoOffset_, info_holder);
686  this->SetSmiValueField(kStartPositionOffset_, start_position);
687  this->SetSmiValueField(kEndPositionOffset_, end_position);
688 }
void SetField(int field_position, Handle< Object > value)
Definition: liveedit.h:251
void SetSmiValueField(int field_position, int value)
Definition: liveedit.h:255
static const int kEndPositionOffset_
Definition: liveedit.h:371
static const int kFunctionNameOffset_
Definition: liveedit.h:369
static const int kStartPositionOffset_
Definition: liveedit.h:370
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
static Handle< JSValue > WrapInJSValue(Handle< HeapObject > object)
Definition: liveedit.cc:583

References v8::internal::JSArrayBasedStruct< SharedInfoWrapper >::isolate(), kEndPositionOffset_, kFunctionNameOffset_, kSharedInfoOffset_, kStartPositionOffset_, v8::internal::JSArrayBasedStruct< SharedInfoWrapper >::SetField(), v8::internal::JSArrayBasedStruct< SharedInfoWrapper >::SetSmiValueField(), and v8::internal::WrapInJSValue().

Referenced by v8::internal::LiveEdit::WrapSharedFunctionInfos().

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

Friends And Related Function Documentation

◆ JSArrayBasedStruct< SharedInfoWrapper >

friend class JSArrayBasedStruct< SharedInfoWrapper >
friend

Definition at line 373 of file liveedit.h.

Member Data Documentation

◆ kEndPositionOffset_

const int v8::internal::SharedInfoWrapper::kEndPositionOffset_ = 2
staticprivate

Definition at line 371 of file liveedit.h.

Referenced by SetProperties().

◆ kFunctionNameOffset_

const int v8::internal::SharedInfoWrapper::kFunctionNameOffset_ = 0
staticprivate

Definition at line 369 of file liveedit.h.

Referenced by SetProperties().

◆ kSharedInfoOffset_

const int v8::internal::SharedInfoWrapper::kSharedInfoOffset_ = 3
staticprivate

Definition at line 372 of file liveedit.h.

Referenced by GetInfo(), IsInstance(), and SetProperties().

◆ kSize_

const int v8::internal::SharedInfoWrapper::kSize_ = 4
staticprivate

Definition at line 373 of file liveedit.h.

Referenced by IsInstance().

◆ kStartPositionOffset_

const int v8::internal::SharedInfoWrapper::kStartPositionOffset_ = 1
staticprivate

Definition at line 370 of file liveedit.h.

Referenced by SetProperties().


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