V8 Project
v8::internal::StoreGlobalStub Class Reference

#include <code-stubs.h>

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

Classes

class  CheckGlobalBits
 
class  IsConstantBits
 
class  RepresentationBits
 

Public Member Functions

 StoreGlobalStub (Isolate *isolate, bool is_constant, bool check_global)
 
Handle< CodeGetCodeCopyFromTemplate (Handle< GlobalObject > global, Handle< PropertyCell > cell)
 
virtual Code::Kind kind () const
 
bool is_constant () const
 
bool check_global () const
 
void set_is_constant (bool value)
 
Representation representation ()
 
void set_representation (Representation r)
 
- Public Member Functions inherited from v8::internal::HandlerStub
virtual Code::Kind GetCodeKind () const
 
virtual ExtraICState GetExtraICState () const
 
virtual InlineCacheState GetICState () const
 
virtual void InitializeDescriptor (CodeStubDescriptor *descriptor) OVERRIDE
 
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor () OVERRIDE
 
- Public Member Functions inherited from v8::internal::HydrogenCodeStub
virtual Handle< CodeGenerateCode ()=0
 
bool IsUninitialized () const
 
Handle< CodeGenerateLightweightMissCode (ExternalReference miss)
 
template<class StateType >
void TraceTransition (StateType from, StateType to)
 

Static Public Member Functions

static Handle< HeapObjectglobal_placeholder (Isolate *isolate)
 
- Static Public Member Functions inherited from v8::internal::HydrogenCodeStub
template<class SubClass >
static Handle< CodeGetUninitialized (Isolate *isolate)
 

Private Member Functions

 DEFINE_HANDLER_CODE_STUB (StoreGlobal, HandlerStub)
 

Additional Inherited Members

- Public Types inherited from v8::internal::HydrogenCodeStub
enum  InitializationState { UNINITIALIZED , INITIALIZED }
 
- Protected Member Functions inherited from v8::internal::HandlerStub
 HandlerStub (Isolate *isolate)
 
 DEFINE_CODE_STUB_BASE (HandlerStub, HydrogenCodeStub)
 
- Protected Member Functions inherited from v8::internal::HydrogenCodeStub
 HydrogenCodeStub (Isolate *isolate, InitializationState state=INITIALIZED)
 
void set_sub_minor_key (uint32_t key)
 
uint32_t sub_minor_key () const
 
- Static Protected Attributes inherited from v8::internal::HydrogenCodeStub
static const int kSubMinorKeyBits = kStubMinorKeyBits - 1
 

Detailed Description

Definition at line 1001 of file code-stubs.h.

Constructor & Destructor Documentation

◆ StoreGlobalStub()

v8::internal::StoreGlobalStub::StoreGlobalStub ( Isolate isolate,
bool  is_constant,
bool  check_global 
)
inline

Definition at line 1003 of file code-stubs.h.

1004  : HandlerStub(isolate) {
1007  }
static U encode(T value)
Definition: utils.h:217
HandlerStub(Isolate *isolate)
Definition: code-stubs.h:889
void set_sub_minor_key(uint32_t key)
Definition: code-stubs.h:463

References check_global(), v8::internal::BitFieldBase< T, shift, size, U >::encode(), is_constant(), and v8::internal::HydrogenCodeStub::set_sub_minor_key().

+ Here is the call graph for this function:

Member Function Documentation

◆ check_global()

bool v8::internal::StoreGlobalStub::check_global ( ) const
inline

Definition at line 1032 of file code-stubs.h.

static T decode(U value)
Definition: utils.h:228
uint32_t sub_minor_key() const
Definition: code-stubs.h:467

References v8::internal::BitFieldBase< T, shift, size, U >::decode(), and v8::internal::HydrogenCodeStub::sub_minor_key().

Referenced by v8::internal::CodeStubGraphBuilder< Stub >::BuildCodeInitializedStub(), GetCodeCopyFromTemplate(), and StoreGlobalStub().

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

◆ DEFINE_HANDLER_CODE_STUB()

v8::internal::StoreGlobalStub::DEFINE_HANDLER_CODE_STUB ( StoreGlobal  ,
HandlerStub   
)
private

◆ GetCodeCopyFromTemplate()

Handle<Code> v8::internal::StoreGlobalStub::GetCodeCopyFromTemplate ( Handle< GlobalObject global,
Handle< PropertyCell cell 
)
inline

Definition at line 1013 of file code-stubs.h.

1014  {
1015  if (check_global()) {
1016  Code::FindAndReplacePattern pattern;
1017  pattern.Add(Handle<Map>(global_placeholder(isolate())->map()), global);
1018  pattern.Add(isolate()->factory()->meta_map(), Handle<Map>(global->map()));
1019  pattern.Add(isolate()->factory()->global_property_cell_map(), cell);
1020  return CodeStub::GetCodeCopy(pattern);
1021  } else {
1022  Code::FindAndReplacePattern pattern;
1023  pattern.Add(isolate()->factory()->global_property_cell_map(), cell);
1024  return CodeStub::GetCodeCopy(pattern);
1025  }
1026  }
static Handle< HeapObject > global_placeholder(Isolate *isolate)
Definition: code-stubs.h:1009
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 map

References v8::internal::Code::FindAndReplacePattern::Add(), check_global(), global_placeholder(), and map.

Referenced by v8::internal::StoreIC::CompileHandler().

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

◆ global_placeholder()

static Handle<HeapObject> v8::internal::StoreGlobalStub::global_placeholder ( Isolate isolate)
inlinestatic

Definition at line 1009 of file code-stubs.h.

1009  {
1010  return isolate->factory()->uninitialized_value();
1011  }

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

Referenced by v8::internal::CodeStubGraphBuilder< Stub >::BuildCodeInitializedStub(), and GetCodeCopyFromTemplate().

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

◆ is_constant()

bool v8::internal::StoreGlobalStub::is_constant ( ) const
inline

Definition at line 1030 of file code-stubs.h.

References v8::internal::BitFieldBase< T, shift, size, U >::decode(), and v8::internal::HydrogenCodeStub::sub_minor_key().

Referenced by v8::internal::CodeStubGraphBuilder< Stub >::BuildCodeInitializedStub(), and StoreGlobalStub().

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

◆ kind()

virtual Code::Kind v8::internal::StoreGlobalStub::kind ( ) const
inlinevirtual

Implements v8::internal::HandlerStub.

Definition at line 1028 of file code-stubs.h.

1028 { return Code::STORE_IC; }

◆ representation()

Representation v8::internal::StoreGlobalStub::representation ( )
inline

Definition at line 1038 of file code-stubs.h.

1038  {
1039  return Representation::FromKind(
1041  }
static Representation FromKind(Kind kind)

References v8::internal::BitFieldBase< T, shift, size, U >::decode(), v8::internal::Representation::FromKind(), and v8::internal::HydrogenCodeStub::sub_minor_key().

+ Here is the call graph for this function:

◆ set_is_constant()

void v8::internal::StoreGlobalStub::set_is_constant ( bool  value)
inline

Definition at line 1034 of file code-stubs.h.

1034  {
1036  }
static U update(U previous, T value)
Definition: utils.h:223

References v8::internal::HydrogenCodeStub::set_sub_minor_key(), v8::internal::HydrogenCodeStub::sub_minor_key(), and v8::internal::BitFieldBase< T, shift, size, U >::update().

+ Here is the call graph for this function:

◆ set_representation()

void v8::internal::StoreGlobalStub::set_representation ( Representation  r)
inline

Definition at line 1043 of file code-stubs.h.

1043  {
1045  }

References v8::internal::Representation::kind(), v8::internal::HydrogenCodeStub::set_sub_minor_key(), v8::internal::HydrogenCodeStub::sub_minor_key(), and v8::internal::BitFieldBase< T, shift, size, U >::update().

+ Here is the call graph for this function:

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