V8 Project
v8::internal::BinaryOpICStub Class Reference

#include <code-stubs.h>

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

Public Member Functions

 BinaryOpICStub (Isolate *isolate, Token::Value op, OverwriteMode mode=NO_OVERWRITE)
 
 BinaryOpICStub (Isolate *isolate, const BinaryOpICState &state)
 
virtual Code::Kind GetCodeKind () const OVERRIDE
 
virtual InlineCacheState GetICState () const FINAL OVERRIDE
 
virtual ExtraICState GetExtraICState () const FINAL OVERRIDE
 
BinaryOpICState state () const
 
virtual void PrintState (OStream &os) const FINAL 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 void GenerateAheadOfTime (Isolate *isolate)
 
- Static Public Member Functions inherited from v8::internal::HydrogenCodeStub
template<class SubClass >
static Handle< CodeGetUninitialized (Isolate *isolate)
 

Static Public Attributes

static const int kLeft = 0
 
static const int kRight = 1
 

Private Member Functions

 DEFINE_CALL_INTERFACE_DESCRIPTOR (BinaryOp)
 
 DEFINE_HYDROGEN_CODE_STUB (BinaryOpIC, HydrogenCodeStub)
 

Static Private Member Functions

static void GenerateAheadOfTime (Isolate *isolate, const BinaryOpICState &state)
 

Additional Inherited Members

- Public Types inherited from v8::internal::HydrogenCodeStub
enum  InitializationState { UNINITIALIZED , INITIALIZED }
 
- 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 1094 of file code-stubs.h.

Constructor & Destructor Documentation

◆ BinaryOpICStub() [1/2]

v8::internal::BinaryOpICStub::BinaryOpICStub ( Isolate isolate,
Token::Value  op,
OverwriteMode  mode = NO_OVERWRITE 
)
inline

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

1098  : HydrogenCodeStub(isolate, UNINITIALIZED) {
1099  BinaryOpICState state(isolate, op, mode);
1100  set_sub_minor_key(state.GetExtraICState());
1101  }
BinaryOpICState state() const
Definition: code-stubs.h:1122
HydrogenCodeStub(Isolate *isolate, InitializationState state=INITIALIZED)
Definition: code-stubs.h:457
void set_sub_minor_key(uint32_t key)
Definition: code-stubs.h:463
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 mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp

References mode(), v8::internal::HydrogenCodeStub::set_sub_minor_key(), and state().

+ Here is the call graph for this function:

◆ BinaryOpICStub() [2/2]

v8::internal::BinaryOpICStub::BinaryOpICStub ( Isolate isolate,
const BinaryOpICState &  state 
)
inline

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

1104  : HydrogenCodeStub(isolate) {
1105  set_sub_minor_key(state.GetExtraICState());
1106  }

References v8::internal::HydrogenCodeStub::set_sub_minor_key(), and state().

+ Here is the call graph for this function:

Member Function Documentation

◆ DEFINE_CALL_INTERFACE_DESCRIPTOR()

v8::internal::BinaryOpICStub::DEFINE_CALL_INTERFACE_DESCRIPTOR ( BinaryOp  )
private

◆ DEFINE_HYDROGEN_CODE_STUB()

v8::internal::BinaryOpICStub::DEFINE_HYDROGEN_CODE_STUB ( BinaryOpIC  ,
HydrogenCodeStub   
)
private

◆ GenerateAheadOfTime() [1/2]

void v8::internal::BinaryOpICStub::GenerateAheadOfTime ( Isolate isolate)
static

Definition at line 266 of file code-stubs.cc.

266  {
267  // Generate the uninitialized versions of the stub.
268  for (int op = Token::BIT_OR; op <= Token::MOD; ++op) {
269  for (int mode = NO_OVERWRITE; mode <= OVERWRITE_RIGHT; ++mode) {
270  BinaryOpICStub stub(isolate,
271  static_cast<Token::Value>(op),
272  static_cast<OverwriteMode>(mode));
273  stub.GetCode();
274  }
275  }
276 
277  // Generate special versions of the stub.
278  BinaryOpICState::GenerateAheadOfTime(isolate, &GenerateAheadOfTime);
279 }
BinaryOpICStub(Isolate *isolate, Token::Value op, OverwriteMode mode=NO_OVERWRITE)
Definition: code-stubs.h:1096
static void GenerateAheadOfTime(Isolate *isolate)
Definition: code-stubs.cc:266
@ NO_OVERWRITE
Definition: ic-state.h:58
@ OVERWRITE_RIGHT
Definition: ic-state.h:58

References mode(), v8::internal::NO_OVERWRITE, and v8::internal::OVERWRITE_RIGHT.

+ Here is the call graph for this function:

◆ GenerateAheadOfTime() [2/2]

void v8::internal::BinaryOpICStub::GenerateAheadOfTime ( Isolate isolate,
const BinaryOpICState &  state 
)
staticprivate

Definition at line 288 of file code-stubs.cc.

289  {
290  BinaryOpICStub stub(isolate, state);
291  stub.GetCode();
292 }

References state().

+ Here is the call graph for this function:

◆ GetCodeKind()

virtual Code::Kind v8::internal::BinaryOpICStub::GetCodeKind ( ) const
inlinevirtual

Reimplemented from v8::internal::HydrogenCodeStub.

Reimplemented in v8::internal::FINAL< kOperandKind, kNumCachedOperands >, and v8::internal::FINAL< kOperandKind, kNumCachedOperands >.

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

1110  {
1111  return Code::BINARY_OP_IC;
1112  }

◆ GetExtraICState()

virtual ExtraICState v8::internal::BinaryOpICStub::GetExtraICState ( ) const
inlinevirtual

Reimplemented in v8::internal::FINAL< kOperandKind, kNumCachedOperands >.

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

1118  {
1119  return static_cast<ExtraICState>(sub_minor_key());
1120  }
uint32_t sub_minor_key() const
Definition: code-stubs.h:467
int ExtraICState
Definition: objects.h:305

References v8::internal::HydrogenCodeStub::sub_minor_key().

Referenced by state().

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

◆ GetICState()

virtual InlineCacheState v8::internal::BinaryOpICStub::GetICState ( ) const
inlinevirtual

Reimplemented in v8::internal::FINAL< kOperandKind, kNumCachedOperands >.

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

1114  {
1115  return state().GetICState();
1116  }

References state().

+ Here is the call graph for this function:

◆ PrintState()

void v8::internal::BinaryOpICStub::PrintState ( OStream os) const
virtual

Reimplemented in v8::internal::FINAL< kOperandKind, kNumCachedOperands >.

Definition at line 282 of file code-stubs.cc.

282  { // NOLINT
283  os << state();
284 }

References state().

+ Here is the call graph for this function:

◆ state()

BinaryOpICState v8::internal::BinaryOpICStub::state ( ) const
inline

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

1122  {
1123  return BinaryOpICState(isolate(), GetExtraICState());
1124  }
virtual ExtraICState GetExtraICState() const FINAL OVERRIDE
Definition: code-stubs.h:1118

References GetExtraICState().

Referenced by BinaryOpICStub(), GenerateAheadOfTime(), GetICState(), and PrintState().

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

Member Data Documentation

◆ kLeft

const int v8::internal::BinaryOpICStub::kLeft = 0
static

◆ kRight

const int v8::internal::BinaryOpICStub::kRight = 1
static

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