V8 Project
v8::internal::FunctionInfoWrapper Class Reference

#include <liveedit.h>

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

Public Member Functions

 FunctionInfoWrapper (Handle< JSArray > array)
 
void SetInitialProperties (Handle< String > name, int start_position, int end_position, int param_num, int literal_count, int slot_count, int parent_index)
 
void SetFunctionCode (Handle< Code > function_code, Handle< HeapObject > code_scope_info)
 
void SetFunctionScopeInfo (Handle< Object > scope_info_array)
 
void SetSharedFunctionInfo (Handle< SharedFunctionInfo > info)
 
int GetLiteralCount ()
 
int GetParentIndex ()
 
Handle< CodeGetFunctionCode ()
 
Handle< TypeFeedbackVectorGetFeedbackVector ()
 
Handle< ObjectGetCodeScopeInfo ()
 
int GetStartPosition ()
 
int GetEndPosition ()
 
int GetSlotCount ()
 
- Public Member Functions inherited from v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >
 JSArrayBasedStruct (Handle< JSArray > array)
 
Handle< JSArrayGetJSArray ()
 
Isolateisolate () const
 

Static Private Attributes

static const int kFunctionNameOffset_ = 0
 
static const int kStartPositionOffset_ = 1
 
static const int kEndPositionOffset_ = 2
 
static const int kParamNumOffset_ = 3
 
static const int kCodeOffset_ = 4
 
static const int kCodeScopeInfoOffset_ = 5
 
static const int kFunctionScopeInfoOffset_ = 6
 
static const int kParentIndexOffset_ = 7
 
static const int kSharedFunctionInfoOffset_ = 8
 
static const int kLiteralNumOffset_ = 9
 
static const int kSlotNumOffset_ = 10
 
static const int kSize_ = 11
 

Friends

class JSArrayBasedStruct< FunctionInfoWrapper >
 

Additional Inherited Members

- Static Public Member Functions inherited from v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >
static FunctionInfoWrapper Create (Isolate *isolate)
 
static FunctionInfoWrapper cast (Object *object)
 
- Protected Member Functions inherited from v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >
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 277 of file liveedit.h.

Constructor & Destructor Documentation

◆ FunctionInfoWrapper()

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

Definition at line 279 of file liveedit.h.

281  }
friend class JSArrayBasedStruct< FunctionInfoWrapper >
Definition: liveedit.h:338

Member Function Documentation

◆ GetCodeScopeInfo()

Handle< Object > v8::internal::FunctionInfoWrapper::GetCodeScopeInfo ( )

Definition at line 672 of file liveedit.cc.

672  {
673  Handle<Object> element = this->GetField(kCodeScopeInfoOffset_);
674  return UnwrapJSValue(Handle<JSValue>::cast(element));
675 }
static const int kCodeScopeInfoOffset_
Definition: liveedit.h:330
static Handle< T > cast(Handle< S > that)
Definition: handles.h:116
Handle< Object > GetField(int field_position)
Definition: liveedit.h:259
static Handle< Object > UnwrapJSValue(Handle< JSValue > jsValue)
Definition: liveedit.cc:576

References v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::GetField(), kCodeScopeInfoOffset_, and v8::internal::UnwrapJSValue().

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

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

◆ GetEndPosition()

int v8::internal::FunctionInfoWrapper::GetEndPosition ( )
inline

Definition at line 318 of file liveedit.h.

318 { return this->GetSmiValueField(kEndPositionOffset_); }
static const int kEndPositionOffset_
Definition: liveedit.h:327

References v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::GetSmiValueField(), and kEndPositionOffset_.

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

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

◆ GetFeedbackVector()

Handle< TypeFeedbackVector > v8::internal::FunctionInfoWrapper::GetFeedbackVector ( )

Definition at line 652 of file liveedit.cc.

652  {
653  Handle<Object> element = this->GetField(kSharedFunctionInfoOffset_);
654  Handle<TypeFeedbackVector> result;
655  if (element->IsJSValue()) {
656  Handle<JSValue> value_wrapper = Handle<JSValue>::cast(element);
657  Handle<Object> raw_result = UnwrapJSValue(value_wrapper);
658  Handle<SharedFunctionInfo> shared =
660  result = Handle<TypeFeedbackVector>(shared->feedback_vector(), isolate());
661  CHECK_EQ(result->length(), GetSlotCount());
662  } else {
663  // Scripts may never have a SharedFunctionInfo created, so
664  // create a type feedback vector here.
665  int slot_count = GetSlotCount();
666  result = isolate()->factory()->NewTypeFeedbackVector(slot_count);
667  }
668  return result;
669 }
static const int kSharedFunctionInfoOffset_
Definition: liveedit.h:333
Factory * factory()
Definition: isolate.h:982
#define CHECK_EQ(expected, value)
Definition: logging.h:169

References v8::internal::Handle< T >::cast(), CHECK_EQ, v8::internal::Isolate::factory(), v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::GetField(), GetSlotCount(), v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::isolate(), kSharedFunctionInfoOffset_, and v8::internal::UnwrapJSValue().

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

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

◆ GetFunctionCode()

Handle< Code > v8::internal::FunctionInfoWrapper::GetFunctionCode ( )

Definition at line 643 of file liveedit.cc.

643  {
644  Handle<Object> element = this->GetField(kCodeOffset_);
645  Handle<JSValue> value_wrapper = Handle<JSValue>::cast(element);
646  Handle<Object> raw_result = UnwrapJSValue(value_wrapper);
647  CHECK(raw_result->IsCode());
648  return Handle<Code>::cast(raw_result);
649 }
static const int kCodeOffset_
Definition: liveedit.h:329
#define CHECK(condition)
Definition: logging.h:36

References v8::internal::Handle< T >::cast(), CHECK, v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::GetField(), kCodeOffset_, and v8::internal::UnwrapJSValue().

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

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

◆ GetLiteralCount()

int v8::internal::FunctionInfoWrapper::GetLiteralCount ( )
inline

Definition at line 300 of file liveedit.h.

300  {
301  return this->GetSmiValueField(kLiteralNumOffset_);
302  }
static const int kLiteralNumOffset_
Definition: liveedit.h:334

References v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::GetSmiValueField(), and kLiteralNumOffset_.

Referenced by v8::internal::LiteralFixer::PatchLiterals().

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

◆ GetParentIndex()

int v8::internal::FunctionInfoWrapper::GetParentIndex ( )
inline

Definition at line 304 of file liveedit.h.

304  {
306  }
static const int kParentIndexOffset_
Definition: liveedit.h:332

References v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::GetSmiValueField(), and kParentIndexOffset_.

Referenced by v8::internal::FunctionInfoListener::FunctionDone().

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

◆ GetSlotCount()

int v8::internal::FunctionInfoWrapper::GetSlotCount ( )
inline

Definition at line 320 of file liveedit.h.

320  {
321  return this->GetSmiValueField(kSlotNumOffset_);
322  }
static const int kSlotNumOffset_
Definition: liveedit.h:335

References v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::GetSmiValueField(), and kSlotNumOffset_.

Referenced by GetFeedbackVector().

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

◆ GetStartPosition()

int v8::internal::FunctionInfoWrapper::GetStartPosition ( )
inline

Definition at line 314 of file liveedit.h.

314  {
316  }
static const int kStartPositionOffset_
Definition: liveedit.h:326

References v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::GetSmiValueField(), and kStartPositionOffset_.

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

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

◆ SetFunctionCode()

void v8::internal::FunctionInfoWrapper::SetFunctionCode ( Handle< Code function_code,
Handle< HeapObject code_scope_info 
)

Definition at line 626 of file liveedit.cc.

627  {
628  Handle<JSValue> code_wrapper = WrapInJSValue(function_code);
629  this->SetField(kCodeOffset_, code_wrapper);
630 
631  Handle<JSValue> scope_wrapper = WrapInJSValue(code_scope_info);
632  this->SetField(kCodeScopeInfoOffset_, scope_wrapper);
633 }
void SetField(int field_position, Handle< Object > value)
Definition: liveedit.h:251
static Handle< JSValue > WrapInJSValue(Handle< HeapObject > object)
Definition: liveedit.cc:583

References kCodeOffset_, kCodeScopeInfoOffset_, v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::SetField(), and v8::internal::WrapInJSValue().

Referenced by v8::internal::FunctionInfoListener::FunctionCode(), and v8::internal::FunctionInfoListener::FunctionInfo().

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

◆ SetFunctionScopeInfo()

void v8::internal::FunctionInfoWrapper::SetFunctionScopeInfo ( Handle< Object scope_info_array)
inline

Definition at line 294 of file liveedit.h.

294  {
295  this->SetField(kFunctionScopeInfoOffset_, scope_info_array);
296  }
static const int kFunctionScopeInfoOffset_
Definition: liveedit.h:331

References kFunctionScopeInfoOffset_, and v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::SetField().

Referenced by v8::internal::FunctionInfoListener::FunctionInfo().

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

◆ SetInitialProperties()

void v8::internal::FunctionInfoWrapper::SetInitialProperties ( Handle< String name,
int  start_position,
int  end_position,
int  param_num,
int  literal_count,
int  slot_count,
int  parent_index 
)

Definition at line 608 of file liveedit.cc.

614  {
615  HandleScope scope(isolate());
617  this->SetSmiValueField(kStartPositionOffset_, start_position);
618  this->SetSmiValueField(kEndPositionOffset_, end_position);
619  this->SetSmiValueField(kParamNumOffset_, param_num);
620  this->SetSmiValueField(kLiteralNumOffset_, literal_count);
621  this->SetSmiValueField(kSlotNumOffset_, slot_count);
622  this->SetSmiValueField(kParentIndexOffset_, parent_index);
623 }
static const int kParamNumOffset_
Definition: liveedit.h:328
static const int kFunctionNameOffset_
Definition: liveedit.h:325
void SetSmiValueField(int field_position, int value)
Definition: liveedit.h:255
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

References v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::isolate(), kEndPositionOffset_, kFunctionNameOffset_, kLiteralNumOffset_, kParamNumOffset_, kParentIndexOffset_, kSlotNumOffset_, kStartPositionOffset_, v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::SetField(), and v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::SetSmiValueField().

Referenced by v8::internal::FunctionInfoListener::FunctionStarted().

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

◆ SetSharedFunctionInfo()

void v8::internal::FunctionInfoWrapper::SetSharedFunctionInfo ( Handle< SharedFunctionInfo info)

Definition at line 636 of file liveedit.cc.

637  {
638  Handle<JSValue> info_holder = WrapInJSValue(info);
639  this->SetField(kSharedFunctionInfoOffset_, info_holder);
640 }

References kSharedFunctionInfoOffset_, v8::internal::JSArrayBasedStruct< FunctionInfoWrapper >::SetField(), and v8::internal::WrapInJSValue().

Referenced by v8::internal::FunctionInfoListener::FunctionInfo().

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

Friends And Related Function Documentation

◆ JSArrayBasedStruct< FunctionInfoWrapper >

friend class JSArrayBasedStruct< FunctionInfoWrapper >
friend

Definition at line 336 of file liveedit.h.

Member Data Documentation

◆ kCodeOffset_

const int v8::internal::FunctionInfoWrapper::kCodeOffset_ = 4
staticprivate

Definition at line 329 of file liveedit.h.

Referenced by GetFunctionCode(), and SetFunctionCode().

◆ kCodeScopeInfoOffset_

const int v8::internal::FunctionInfoWrapper::kCodeScopeInfoOffset_ = 5
staticprivate

Definition at line 330 of file liveedit.h.

Referenced by GetCodeScopeInfo(), and SetFunctionCode().

◆ kEndPositionOffset_

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

Definition at line 327 of file liveedit.h.

Referenced by GetEndPosition(), and SetInitialProperties().

◆ kFunctionNameOffset_

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

Definition at line 325 of file liveedit.h.

Referenced by SetInitialProperties().

◆ kFunctionScopeInfoOffset_

const int v8::internal::FunctionInfoWrapper::kFunctionScopeInfoOffset_ = 6
staticprivate

Definition at line 331 of file liveedit.h.

Referenced by SetFunctionScopeInfo().

◆ kLiteralNumOffset_

const int v8::internal::FunctionInfoWrapper::kLiteralNumOffset_ = 9
staticprivate

Definition at line 334 of file liveedit.h.

Referenced by GetLiteralCount(), and SetInitialProperties().

◆ kParamNumOffset_

const int v8::internal::FunctionInfoWrapper::kParamNumOffset_ = 3
staticprivate

Definition at line 328 of file liveedit.h.

Referenced by SetInitialProperties().

◆ kParentIndexOffset_

const int v8::internal::FunctionInfoWrapper::kParentIndexOffset_ = 7
staticprivate

Definition at line 332 of file liveedit.h.

Referenced by GetParentIndex(), and SetInitialProperties().

◆ kSharedFunctionInfoOffset_

const int v8::internal::FunctionInfoWrapper::kSharedFunctionInfoOffset_ = 8
staticprivate

Definition at line 333 of file liveedit.h.

Referenced by GetFeedbackVector(), and SetSharedFunctionInfo().

◆ kSize_

const int v8::internal::FunctionInfoWrapper::kSize_ = 11
staticprivate

Definition at line 336 of file liveedit.h.

◆ kSlotNumOffset_

const int v8::internal::FunctionInfoWrapper::kSlotNumOffset_ = 10
staticprivate

Definition at line 335 of file liveedit.h.

Referenced by GetSlotCount(), and SetInitialProperties().

◆ kStartPositionOffset_

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

Definition at line 326 of file liveedit.h.

Referenced by GetStartPosition(), and SetInitialProperties().


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