V8 Project
v8::internal::BoundsCheckKey Class Reference
+ Inheritance diagram for v8::internal::BoundsCheckKey:
+ Collaboration diagram for v8::internal::BoundsCheckKey:

Public Member Functions

HValueIndexBase () const
 
HValueLength () const
 
uint32_t Hash ()
 
- Public Member Functions inherited from v8::internal::ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Static Public Member Functions

static BoundsCheckKeyCreate (Zone *zone, HBoundsCheck *check, int32_t *offset)
 

Private Member Functions

 BoundsCheckKey (HValue *index_base, HValue *length)
 
 DISALLOW_COPY_AND_ASSIGN (BoundsCheckKey)
 

Private Attributes

HValueindex_base_
 
HValuelength_
 

Detailed Description

Definition at line 20 of file hydrogen-bce.cc.

Constructor & Destructor Documentation

◆ BoundsCheckKey()

v8::internal::BoundsCheckKey::BoundsCheckKey ( HValue index_base,
HValue length 
)
inlineprivate

Definition at line 71 of file hydrogen-bce.cc.

72  : index_base_(index_base),
73  length_(length) { }

Referenced by Create().

+ Here is the caller graph for this function:

Member Function Documentation

◆ Create()

static BoundsCheckKey* v8::internal::BoundsCheckKey::Create ( Zone zone,
HBoundsCheck *  check,
int32_t *  offset 
)
inlinestatic

Definition at line 29 of file hydrogen-bce.cc.

31  {
32  if (!check->index()->representation().IsSmiOrInteger32()) return NULL;
33 
34  HValue* index_base = NULL;
35  HConstant* constant = NULL;
36  bool is_sub = false;
37 
38  if (check->index()->IsAdd()) {
39  HAdd* index = HAdd::cast(check->index());
40  if (index->left()->IsConstant()) {
41  constant = HConstant::cast(index->left());
42  index_base = index->right();
43  } else if (index->right()->IsConstant()) {
44  constant = HConstant::cast(index->right());
45  index_base = index->left();
46  }
47  } else if (check->index()->IsSub()) {
48  HSub* index = HSub::cast(check->index());
49  is_sub = true;
50  if (index->right()->IsConstant()) {
51  constant = HConstant::cast(index->right());
52  index_base = index->left();
53  }
54  } else if (check->index()->IsConstant()) {
55  index_base = check->block()->graph()->GetConstant0();
56  constant = HConstant::cast(check->index());
57  }
58 
59  if (constant != NULL && constant->HasInteger32Value()) {
60  *offset = is_sub ? - constant->Integer32Value()
61  : constant->Integer32Value();
62  } else {
63  *offset = 0;
64  index_base = check->index();
65  }
66 
67  return new(zone) BoundsCheckKey(index_base, check->length());
68  }
BoundsCheckKey(HValue *index_base, HValue *length)
Definition: hydrogen-bce.cc:71
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 NULL

References v8::internal::HValue::block(), BoundsCheckKey(), and NULL.

Referenced by v8::internal::HBoundsCheckEliminationPhase::PreProcessBlock().

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

◆ DISALLOW_COPY_AND_ASSIGN()

v8::internal::BoundsCheckKey::DISALLOW_COPY_AND_ASSIGN ( BoundsCheckKey  )
private

◆ Hash()

uint32_t v8::internal::BoundsCheckKey::Hash ( )
inline

Definition at line 25 of file hydrogen-bce.cc.

25  {
26  return static_cast<uint32_t>(index_base_->Hashcode() ^ length_->Hashcode());
27  }
virtual intptr_t Hashcode()

References v8::internal::HValue::Hashcode(), index_base_, and length_.

+ Here is the call graph for this function:

◆ IndexBase()

HValue* v8::internal::BoundsCheckKey::IndexBase ( ) const
inline

Definition at line 22 of file hydrogen-bce.cc.

22 { return index_base_; }

References index_base_.

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

+ Here is the caller graph for this function:

◆ Length()

HValue* v8::internal::BoundsCheckKey::Length ( ) const
inline

Definition at line 23 of file hydrogen-bce.cc.

23 { return length_; }

References length_.

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

+ Here is the caller graph for this function:

Member Data Documentation

◆ index_base_

HValue* v8::internal::BoundsCheckKey::index_base_
private

Definition at line 75 of file hydrogen-bce.cc.

Referenced by Hash(), and IndexBase().

◆ length_

HValue* v8::internal::BoundsCheckKey::length_
private

Definition at line 76 of file hydrogen-bce.cc.

Referenced by Hash(), and Length().


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