V8 Project
v8::internal::CodeStubGraphBuilder< KeyedLoadGenericStub > Class Reference
+ Inheritance diagram for v8::internal::CodeStubGraphBuilder< KeyedLoadGenericStub >:
+ Collaboration diagram for v8::internal::CodeStubGraphBuilder< KeyedLoadGenericStub >:

Public Member Functions

 CodeStubGraphBuilder (Isolate *isolate, KeyedLoadGenericStub *stub)
 
- Public Member Functions inherited from v8::internal::CodeStubGraphBuilderBase
 CodeStubGraphBuilderBase (Isolate *isolate, HydrogenCodeStub *stub)
 
virtual bool BuildGraph ()
 
- Public Member Functions inherited from v8::internal::HGraphBuilder
 HGraphBuilder (CompilationInfo *info)
 
virtual ~HGraphBuilder ()
 
Scopescope () const
 
void set_scope (Scope *scope)
 
HBasicBlock * current_block () const
 
void set_current_block (HBasicBlock *block)
 
HEnvironment * environment () const
 
Zonezone () const
 
HGraph * graph () const
 
Isolateisolate () const
 
CompilationInfotop_info ()
 
HGraph * CreateGraph ()
 
void Push (HValue *value)
 
HValuePop ()
 
HInstructionAddInstruction (HInstruction *instr)
 
void FinishCurrentBlock (HControlInstruction *last)
 
void FinishExitCurrentBlock (HControlInstruction *instruction)
 
void Goto (HBasicBlock *from, HBasicBlock *target, FunctionState *state=NULL, bool add_simulate=true)
 
void Goto (HBasicBlock *target, FunctionState *state=NULL, bool add_simulate=true)
 
void GotoNoSimulate (HBasicBlock *from, HBasicBlock *target)
 
void GotoNoSimulate (HBasicBlock *target)
 
void AddLeaveInlined (HBasicBlock *block, HValue *return_value, FunctionState *state)
 
void AddLeaveInlined (HValue *return_value, FunctionState *state)
 
template<class I >
HInstructionNewUncasted ()
 
template<class I >
INew ()
 
template<class I >
HInstructionAddUncasted ()
 
template<class I >
IAdd ()
 
template<class I , class P1 >
HInstructionNewUncasted (P1 p1)
 
template<class I , class P1 >
INew (P1 p1)
 
template<class I , class P1 >
HInstructionAddUncasted (P1 p1)
 
template<class I , class P1 >
IAdd (P1 p1)
 
template<class I , class P1 , class P2 >
HInstructionNewUncasted (P1 p1, P2 p2)
 
template<class I , class P1 , class P2 >
INew (P1 p1, P2 p2)
 
template<class I , class P1 , class P2 >
HInstructionAddUncasted (P1 p1, P2 p2)
 
template<class I , class P1 , class P2 >
IAdd (P1 p1, P2 p2)
 
template<class I , class P1 , class P2 , class P3 >
HInstructionNewUncasted (P1 p1, P2 p2, P3 p3)
 
template<class I , class P1 , class P2 , class P3 >
INew (P1 p1, P2 p2, P3 p3)
 
template<class I , class P1 , class P2 , class P3 >
HInstructionAddUncasted (P1 p1, P2 p2, P3 p3)
 
template<class I , class P1 , class P2 , class P3 >
IAdd (P1 p1, P2 p2, P3 p3)
 
template<class I , class P1 , class P2 , class P3 , class P4 >
HInstructionNewUncasted (P1 p1, P2 p2, P3 p3, P4 p4)
 
template<class I , class P1 , class P2 , class P3 , class P4 >
INew (P1 p1, P2 p2, P3 p3, P4 p4)
 
template<class I , class P1 , class P2 , class P3 , class P4 >
HInstructionAddUncasted (P1 p1, P2 p2, P3 p3, P4 p4)
 
template<class I , class P1 , class P2 , class P3 , class P4 >
IAdd (P1 p1, P2 p2, P3 p3, P4 p4)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 >
HInstructionNewUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 >
INew (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 >
HInstructionAddUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 >
IAdd (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
HInstructionNewUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
INew (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
HInstructionAddUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
IAdd (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
HInstructionNewUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
INew (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
HInstructionAddUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 >
IAdd (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
HInstructionNewUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
INew (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
HInstructionAddUncasted (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
 
template<class I , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 >
IAdd (P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
 
void AddSimulate (BailoutId id, RemovableSimulate removable=FIXED_SIMULATE)
 
template<>
HDeoptimize * Add (const char *reason, Deoptimizer::BailoutType type)
 
template<>
HInstructionAddUncasted (const char *reason, Deoptimizer::BailoutType type)
 
template<>
HSimulate * Add (BailoutId id, RemovableSimulate removable)
 
template<>
HSimulate * Add (BailoutId id)
 
template<>
HInstructionAddUncasted (BailoutId id)
 
template<>
HReturn * Add (HValue *value)
 
template<>
HReturn * Add (HConstant *value)
 
template<>
HInstructionAddUncasted (HValue *value)
 
template<>
HInstructionAddUncasted (HConstant *value)
 
template<>
HCallRuntime * Add (Handle< String > name, const Runtime::Function *c_function, int argument_count)
 
template<>
HInstructionAddUncasted (Handle< String > name, const Runtime::Function *c_function, int argument_count)
 
template<>
HContext * New ()
 
template<>
HInstructionNewUncasted ()
 

Protected Member Functions

virtual HValueBuildCodeStub ()
 
void BuildElementsKindLimitCheck (HGraphBuilder::IfBuilder *if_builder, HValue *bit_field2, ElementsKind kind)
 
void BuildFastElementLoad (HGraphBuilder::IfBuilder *if_builder, HValue *receiver, HValue *key, HValue *instance_type, HValue *bit_field2, ElementsKind kind)
 
void BuildExternalElementLoad (HGraphBuilder::IfBuilder *if_builder, HValue *receiver, HValue *key, HValue *instance_type, HValue *bit_field2, ElementsKind kind)
 
KeyedLoadGenericStubcasted_stub ()
 
- Protected Member Functions inherited from v8::internal::CodeStubGraphBuilderBase
HParameter * GetParameter (int parameter)
 
HValueGetArgumentsLength ()
 
CompilationInfoinfo ()
 
HydrogenCodeStubstub ()
 
HContext * context ()
 
Isolateisolate ()
 
HLoadNamedField * BuildLoadNamedField (HValue *object, FieldIndex index)
 
void BuildStoreNamedField (HValue *object, HValue *value, FieldIndex index, Representation representation)
 
HValueUnmappedCase (HValue *elements, HValue *key)
 
HValueBuildArrayConstructor (ElementsKind kind, AllocationSiteOverrideMode override_mode, ArgumentClass argument_class)
 
HValueBuildInternalArrayConstructor (ElementsKind kind, ArgumentClass argument_class)
 
void BuildCheckAndInstallOptimizedCode (HValue *js_function, HValue *native_context, IfBuilder *builder, HValue *optimized_map, HValue *map_index)
 
void BuildInstallCode (HValue *js_function, HValue *shared_info)
 
HInstructionLoadFromOptimizedCodeMap (HValue *optimized_map, HValue *iterator, int field_offset)
 
void BuildInstallFromOptimizedCodeMap (HValue *js_function, HValue *shared_info, HValue *native_context)
 
- Protected Member Functions inherited from v8::internal::HGraphBuilder
HBasicBlock * CreateBasicBlock (HEnvironment *env)
 
HBasicBlock * CreateLoopHeaderBlock ()
 
template<class BitFieldClass >
HValueBuildDecodeField (HValue *encoded_field)
 
HValueBuildGetElementsKind (HValue *object)
 
HValueBuildCheckHeapObject (HValue *object)
 
HValueBuildCheckString (HValue *string)
 
HValueBuildWrapReceiver (HValue *object, HValue *function)
 
HValueBuildCheckForCapacityGrow (HValue *object, HValue *elements, ElementsKind kind, HValue *length, HValue *key, bool is_js_array, PropertyAccessType access_type)
 
HValueBuildCopyElementsOnWrite (HValue *object, HValue *elements, ElementsKind kind, HValue *length)
 
void BuildTransitionElementsKind (HValue *object, HValue *map, ElementsKind from_kind, ElementsKind to_kind, bool is_jsarray)
 
HValueBuildNumberToString (HValue *object, Type *type)
 
void BuildJSObjectCheck (HValue *receiver, int bit_field_mask)
 
void BuildKeyedIndexCheck (HValue *key, HIfContinuation *join_continuation)
 
void BuildTestForDictionaryProperties (HValue *object, HIfContinuation *continuation)
 
void BuildNonGlobalObjectCheck (HValue *receiver)
 
HValueBuildKeyedLookupCacheHash (HValue *object, HValue *key)
 
HValueBuildUncheckedDictionaryElementLoad (HValue *receiver, HValue *elements, HValue *key, HValue *hash)
 
HValueBuildRegExpConstructResult (HValue *length, HValue *index, HValue *input)
 
HAllocate * BuildAllocate (HValue *object_size, HType type, InstanceType instance_type, HAllocationMode allocation_mode)
 
HValueBuildAddStringLengths (HValue *left_length, HValue *right_length)
 
HValueBuildCreateConsString (HValue *length, HValue *left, HValue *right, HAllocationMode allocation_mode)
 
void BuildCopySeqStringChars (HValue *src, HValue *src_offset, String::Encoding src_encoding, HValue *dst, HValue *dst_offset, String::Encoding dst_encoding, HValue *length)
 
HValueBuildObjectSizeAlignment (HValue *unaligned_size, int header_size)
 
HValueBuildUncheckedStringAdd (HValue *left, HValue *right, HAllocationMode allocation_mode)
 
HValueBuildStringAdd (HValue *left, HValue *right, HAllocationMode allocation_mode)
 
HInstructionBuildUncheckedMonomorphicElementAccess (HValue *checked_object, HValue *key, HValue *val, bool is_js_array, ElementsKind elements_kind, PropertyAccessType access_type, LoadKeyedHoleMode load_mode, KeyedAccessStoreMode store_mode)
 
HInstructionAddElementAccess (HValue *elements, HValue *checked_key, HValue *val, HValue *dependency, ElementsKind elements_kind, PropertyAccessType access_type, LoadKeyedHoleMode load_mode=NEVER_RETURN_HOLE)
 
HInstructionAddLoadStringInstanceType (HValue *string)
 
HInstructionAddLoadStringLength (HValue *string)
 
HStoreNamedField * AddStoreMapConstant (HValue *object, Handle< Map > map)
 
HLoadNamedField * AddLoadMap (HValue *object, HValue *dependency=NULL)
 
HLoadNamedField * AddLoadElements (HValue *object, HValue *dependency=NULL)
 
bool MatchRotateRight (HValue *left, HValue *right, HValue **operand, HValue **shift_amount)
 
HValueBuildBinaryOperation (Token::Value op, HValue *left, HValue *right, Type *left_type, Type *right_type, Type *result_type, Maybe< int > fixed_right_arg, HAllocationMode allocation_mode)
 
HLoadNamedField * AddLoadFixedArrayLength (HValue *object, HValue *dependency=NULL)
 
HLoadNamedField * AddLoadArrayLength (HValue *object, ElementsKind kind, HValue *dependency=NULL)
 
HValueAddLoadJSBuiltin (Builtins::JavaScript builtin)
 
HValueEnforceNumberType (HValue *number, Type *expected)
 
HValueTruncateToNumber (HValue *value, Type **expected)
 
void FinishExitWithHardDeoptimization (const char *reason)
 
void AddIncrementCounter (StatsCounter *counter)
 
HValueBuildNewElementsCapacity (HValue *old_capacity)
 
HValueBuildAllocateArrayFromLength (JSArrayBuilder *array_builder, HValue *length_argument)
 
HValueBuildCalculateElementsSize (ElementsKind kind, HValue *capacity)
 
HAllocate * AllocateJSArrayObject (AllocationSiteMode mode)
 
HConstant * EstablishElementsAllocationSize (ElementsKind kind, int capacity)
 
HAllocate * BuildAllocateElements (ElementsKind kind, HValue *size_in_bytes)
 
void BuildInitializeElementsHeader (HValue *elements, ElementsKind kind, HValue *capacity)
 
HValueBuildAllocateElementsAndInitializeElementsHeader (ElementsKind kind, HValue *capacity)
 
void BuildJSArrayHeader (HValue *array, HValue *array_map, HValue *elements, AllocationSiteMode mode, ElementsKind elements_kind, HValue *allocation_site_payload, HValue *length_field)
 
HValueBuildGrowElementsCapacity (HValue *object, HValue *elements, ElementsKind kind, ElementsKind new_kind, HValue *length, HValue *new_capacity)
 
void BuildFillElementsWithValue (HValue *elements, ElementsKind elements_kind, HValue *from, HValue *to, HValue *value)
 
void BuildFillElementsWithHole (HValue *elements, ElementsKind elements_kind, HValue *from, HValue *to)
 
void BuildCopyElements (HValue *from_elements, ElementsKind from_elements_kind, HValue *to_elements, ElementsKind to_elements_kind, HValue *length, HValue *capacity)
 
HValueBuildCloneShallowArrayCow (HValue *boilerplate, HValue *allocation_site, AllocationSiteMode mode, ElementsKind kind)
 
HValueBuildCloneShallowArrayEmpty (HValue *boilerplate, HValue *allocation_site, AllocationSiteMode mode)
 
HValueBuildCloneShallowArrayNonEmpty (HValue *boilerplate, HValue *allocation_site, AllocationSiteMode mode, ElementsKind kind)
 
HValueBuildElementIndexHash (HValue *index)
 
void BuildCompareNil (HValue *value, Type *type, HIfContinuation *continuation)
 
void BuildCreateAllocationMemento (HValue *previous_object, HValue *previous_object_size, HValue *payload)
 
HInstructionBuildConstantMapCheck (Handle< JSObject > constant)
 
HInstructionBuildCheckPrototypeMaps (Handle< JSObject > prototype, Handle< JSObject > holder)
 
HInstructionBuildGetNativeContext (HValue *closure)
 
HInstructionBuildGetNativeContext ()
 
HInstructionBuildGetArrayFunction ()
 
void SetSourcePosition (int position)
 
void EnterInlinedSource (int start_position, int id)
 
HSourcePosition ScriptPositionToSourcePosition (int position)
 
HSourcePosition source_position ()
 
void set_source_position (HSourcePosition position)
 
template<typename ViewClass >
void BuildArrayBufferViewInitialization (HValue *obj, HValue *buffer, HValue *byte_offset, HValue *byte_length)
 

Additional Inherited Members

- Static Public Attributes inherited from v8::internal::HGraphBuilder
static const int kElementLoopUnrollThreshold = 8
 
- Protected Types inherited from v8::internal::CodeStubGraphBuilderBase
enum  ArgumentClass { NONE , SINGLE , MULTIPLE }
 

Detailed Description

Definition at line 1601 of file code-stubs-hydrogen.cc.

Constructor & Destructor Documentation

◆ CodeStubGraphBuilder()

Member Function Documentation

◆ BuildCodeStub()

HValue * v8::internal::CodeStubGraphBuilder< KeyedLoadGenericStub >::BuildCodeStub ( )
protectedvirtual

Implements v8::internal::CodeStubGraphBuilderBase.

Definition at line 1684 of file code-stubs-hydrogen.cc.

1684  {
1685  HValue* receiver = GetParameter(LoadDescriptor::kReceiverIndex);
1687 
1688  // Split into a smi/integer case and unique string case.
1689  HIfContinuation index_name_split_continuation(graph()->CreateBasicBlock(),
1690  graph()->CreateBasicBlock());
1691 
1692  BuildKeyedIndexCheck(key, &index_name_split_continuation);
1693 
1694  IfBuilder index_name_split(this, &index_name_split_continuation);
1695  index_name_split.Then();
1696  {
1697  // Key is an index (number)
1698  key = Pop();
1699 
1700  int bit_field_mask = (1 << Map::kIsAccessCheckNeeded) |
1702  BuildJSObjectCheck(receiver, bit_field_mask);
1703 
1704  HValue* map = Add<HLoadNamedField>(receiver, static_cast<HValue*>(NULL),
1705  HObjectAccess::ForMap());
1706 
1707  HValue* instance_type =
1708  Add<HLoadNamedField>(map, static_cast<HValue*>(NULL),
1709  HObjectAccess::ForMapInstanceType());
1710 
1711  HValue* bit_field2 = Add<HLoadNamedField>(map,
1712  static_cast<HValue*>(NULL),
1713  HObjectAccess::ForMapBitField2());
1714 
1715  IfBuilder kind_if(this);
1716  BuildFastElementLoad(&kind_if, receiver, key, instance_type, bit_field2,
1718 
1719  kind_if.Else();
1720  {
1721  BuildFastElementLoad(&kind_if, receiver, key, instance_type, bit_field2,
1723  }
1724  kind_if.Else();
1725 
1726  // The DICTIONARY_ELEMENTS check generates a "kind_if.Then"
1727  BuildElementsKindLimitCheck(&kind_if, bit_field2, DICTIONARY_ELEMENTS);
1728  {
1729  HValue* elements = AddLoadElements(receiver);
1730 
1731  HValue* hash = BuildElementIndexHash(key);
1732 
1733  Push(BuildUncheckedDictionaryElementLoad(receiver, elements, key, hash));
1734  }
1735  kind_if.Else();
1736 
1737  // The SLOPPY_ARGUMENTS_ELEMENTS check generates a "kind_if.Then"
1738  BuildElementsKindLimitCheck(&kind_if, bit_field2,
1740  // Non-strict elements are not handled.
1741  Add<HDeoptimize>("non-strict elements in KeyedLoadGenericStub",
1743  Push(graph()->GetConstant0());
1744 
1745  kind_if.Else();
1746  BuildExternalElementLoad(&kind_if, receiver, key, instance_type, bit_field2,
1748 
1749  kind_if.Else();
1750  BuildExternalElementLoad(&kind_if, receiver, key, instance_type, bit_field2,
1752 
1753  kind_if.Else();
1754  BuildExternalElementLoad(&kind_if, receiver, key, instance_type, bit_field2,
1756 
1757  kind_if.Else();
1758  BuildExternalElementLoad(&kind_if, receiver, key, instance_type, bit_field2,
1760 
1761  kind_if.Else();
1762  BuildExternalElementLoad(&kind_if, receiver, key, instance_type, bit_field2,
1764 
1765  kind_if.Else();
1766  BuildExternalElementLoad(&kind_if, receiver, key, instance_type, bit_field2,
1768 
1769  kind_if.Else();
1770  BuildExternalElementLoad(&kind_if, receiver, key, instance_type, bit_field2,
1772 
1773  kind_if.Else();
1774  BuildExternalElementLoad(&kind_if, receiver, key, instance_type, bit_field2,
1776 
1777  kind_if.Else();
1778  BuildExternalElementLoad(&kind_if, receiver, key, instance_type, bit_field2,
1780 
1781  kind_if.ElseDeopt("ElementsKind unhandled in KeyedLoadGenericStub");
1782 
1783  kind_if.End();
1784  }
1785  index_name_split.Else();
1786  {
1787  // Key is a unique string.
1788  key = Pop();
1789 
1790  int bit_field_mask = (1 << Map::kIsAccessCheckNeeded) |
1792  BuildJSObjectCheck(receiver, bit_field_mask);
1793 
1794  HIfContinuation continuation;
1795  BuildTestForDictionaryProperties(receiver, &continuation);
1796  IfBuilder if_dict_properties(this, &continuation);
1797  if_dict_properties.Then();
1798  {
1799  // Key is string, properties are dictionary mode
1800  BuildNonGlobalObjectCheck(receiver);
1801 
1802  HValue* properties = Add<HLoadNamedField>(
1803  receiver, static_cast<HValue*>(NULL),
1804  HObjectAccess::ForPropertiesPointer());
1805 
1806  HValue* hash =
1807  Add<HLoadNamedField>(key, static_cast<HValue*>(NULL),
1808  HObjectAccess::ForNameHashField());
1809 
1810  hash = AddUncasted<HShr>(hash, Add<HConstant>(Name::kHashShift));
1811 
1812  HValue* value = BuildUncheckedDictionaryElementLoad(receiver,
1813  properties,
1814  key,
1815  hash);
1816  Push(value);
1817  }
1818  if_dict_properties.Else();
1819  {
1820  // Key is string, properties are fast mode
1821  HValue* hash = BuildKeyedLookupCacheHash(receiver, key);
1822 
1823  ExternalReference cache_keys_ref =
1824  ExternalReference::keyed_lookup_cache_keys(isolate());
1825  HValue* cache_keys = Add<HConstant>(cache_keys_ref);
1826 
1827  HValue* map = Add<HLoadNamedField>(receiver, static_cast<HValue*>(NULL),
1828  HObjectAccess::ForMap());
1829  HValue* base_index = AddUncasted<HMul>(hash, Add<HConstant>(2));
1830  base_index->ClearFlag(HValue::kCanOverflow);
1831 
1832  HIfContinuation inline_or_runtime_continuation(
1834  {
1835  IfBuilder lookup_ifs[KeyedLookupCache::kEntriesPerBucket];
1836  for (int probe = 0; probe < KeyedLookupCache::kEntriesPerBucket;
1837  ++probe) {
1838  IfBuilder* lookup_if = &lookup_ifs[probe];
1839  lookup_if->Initialize(this);
1840  int probe_base = probe * KeyedLookupCache::kEntryLength;
1841  HValue* map_index = AddUncasted<HAdd>(
1842  base_index,
1843  Add<HConstant>(probe_base + KeyedLookupCache::kMapIndex));
1844  map_index->ClearFlag(HValue::kCanOverflow);
1845  HValue* key_index = AddUncasted<HAdd>(
1846  base_index,
1847  Add<HConstant>(probe_base + KeyedLookupCache::kKeyIndex));
1848  key_index->ClearFlag(HValue::kCanOverflow);
1849  HValue* map_to_check =
1850  Add<HLoadKeyed>(cache_keys, map_index, static_cast<HValue*>(NULL),
1852  lookup_if->If<HCompareObjectEqAndBranch>(map_to_check, map);
1853  lookup_if->And();
1854  HValue* key_to_check =
1855  Add<HLoadKeyed>(cache_keys, key_index, static_cast<HValue*>(NULL),
1857  lookup_if->If<HCompareObjectEqAndBranch>(key_to_check, key);
1858  lookup_if->Then();
1859  {
1860  ExternalReference cache_field_offsets_ref =
1861  ExternalReference::keyed_lookup_cache_field_offsets(isolate());
1862  HValue* cache_field_offsets =
1863  Add<HConstant>(cache_field_offsets_ref);
1864  HValue* index = AddUncasted<HAdd>(hash, Add<HConstant>(probe));
1865  index->ClearFlag(HValue::kCanOverflow);
1866  HValue* property_index = Add<HLoadKeyed>(
1867  cache_field_offsets, index, static_cast<HValue*>(NULL),
1869  Push(property_index);
1870  }
1871  lookup_if->Else();
1872  }
1873  for (int i = 0; i < KeyedLookupCache::kEntriesPerBucket; ++i) {
1874  lookup_ifs[i].JoinContinuation(&inline_or_runtime_continuation);
1875  }
1876  }
1877 
1878  IfBuilder inline_or_runtime(this, &inline_or_runtime_continuation);
1879  inline_or_runtime.Then();
1880  {
1881  // Found a cached index, load property inline.
1882  Push(Add<HLoadFieldByIndex>(receiver, Pop()));
1883  }
1884  inline_or_runtime.Else();
1885  {
1886  // KeyedLookupCache miss; call runtime.
1887  Add<HPushArguments>(receiver, key);
1888  Push(Add<HCallRuntime>(
1889  isolate()->factory()->empty_string(),
1890  Runtime::FunctionForId(Runtime::kKeyedGetProperty), 2));
1891  }
1892  inline_or_runtime.End();
1893  }
1894  if_dict_properties.End();
1895  }
1896  index_name_split.End();
1897 
1898  return Pop();
1899 }
HParameter * GetParameter(int parameter)
void BuildElementsKindLimitCheck(HGraphBuilder::IfBuilder *if_builder, HValue *bit_field2, ElementsKind kind)
void BuildExternalElementLoad(HGraphBuilder::IfBuilder *if_builder, HValue *receiver, HValue *key, HValue *instance_type, HValue *bit_field2, ElementsKind kind)
void BuildFastElementLoad(HGraphBuilder::IfBuilder *if_builder, HValue *receiver, HValue *key, HValue *instance_type, HValue *bit_field2, ElementsKind kind)
HValue * BuildUncheckedDictionaryElementLoad(HValue *receiver, HValue *elements, HValue *key, HValue *hash)
Definition: hydrogen.cc:1667
void BuildJSObjectCheck(HValue *receiver, int bit_field_mask)
Definition: hydrogen.cc:1435
void BuildNonGlobalObjectCheck(HValue *receiver)
Definition: hydrogen.cc:1571
HValue * BuildElementIndexHash(HValue *index)
Definition: hydrogen.cc:1634
void Push(HValue *value)
Definition: hydrogen.h:1070
HLoadNamedField * AddLoadElements(HValue *object, HValue *dependency=NULL)
Definition: hydrogen.cc:2708
HValue * BuildKeyedLookupCacheHash(HValue *object, HValue *key)
Definition: hydrogen.cc:1612
HBasicBlock * CreateBasicBlock(HEnvironment *env)
Definition: hydrogen.cc:1240
void BuildKeyedIndexCheck(HValue *key, HIfContinuation *join_continuation)
Definition: hydrogen.cc:1461
HGraph * graph() const
Definition: hydrogen.h:1063
void BuildTestForDictionaryProperties(HValue *object, HIfContinuation *continuation)
Definition: hydrogen.cc:1596
static const int kKeyIndex
Definition: heap.h:2259
static const int kEntriesPerBucket
Definition: heap.h:2256
static const int kEntryLength
Definition: heap.h:2257
static const int kMapIndex
Definition: heap.h:2258
static const int kHasIndexedInterceptor
Definition: objects.h:6243
static const int kIsAccessCheckNeeded
Definition: objects.h:6246
static const int kHasNamedInterceptor
Definition: objects.h:6242
static const int kHashShift
Definition: objects.h:8499
static const Function * FunctionForId(FunctionId id)
Definition: runtime.cc:9312
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
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
@ EXTERNAL_UINT16_ELEMENTS
Definition: elements-kind.h:36
@ EXTERNAL_INT16_ELEMENTS
Definition: elements-kind.h:35
@ EXTERNAL_UINT8_ELEMENTS
Definition: elements-kind.h:34
@ EXTERNAL_INT32_ELEMENTS
Definition: elements-kind.h:37
@ FAST_HOLEY_DOUBLE_ELEMENTS
Definition: elements-kind.h:27
@ SLOPPY_ARGUMENTS_ELEMENTS
Definition: elements-kind.h:31
@ EXTERNAL_INT8_ELEMENTS
Definition: elements-kind.h:33
@ EXTERNAL_FLOAT32_ELEMENTS
Definition: elements-kind.h:39
@ EXTERNAL_FLOAT64_ELEMENTS
Definition: elements-kind.h:40
@ EXTERNAL_UINT32_ELEMENTS
Definition: elements-kind.h:38
@ EXTERNAL_UINT8_CLAMPED_ELEMENTS
Definition: elements-kind.h:41

References v8::internal::HGraphBuilder::AddLoadElements(), v8::internal::HGraphBuilder::BuildElementIndexHash(), v8::internal::HGraphBuilder::BuildJSObjectCheck(), v8::internal::HGraphBuilder::BuildKeyedIndexCheck(), v8::internal::HGraphBuilder::BuildKeyedLookupCacheHash(), v8::internal::HGraphBuilder::BuildNonGlobalObjectCheck(), v8::internal::HGraphBuilder::BuildTestForDictionaryProperties(), v8::internal::HGraphBuilder::BuildUncheckedDictionaryElementLoad(), v8::internal::HValue::ClearFlag(), v8::internal::HGraphBuilder::CreateBasicBlock(), v8::internal::DICTIONARY_ELEMENTS, v8::internal::Deoptimizer::EAGER, v8::internal::EXTERNAL_FLOAT32_ELEMENTS, v8::internal::EXTERNAL_FLOAT64_ELEMENTS, v8::internal::EXTERNAL_INT16_ELEMENTS, v8::internal::EXTERNAL_INT32_ELEMENTS, v8::internal::EXTERNAL_INT8_ELEMENTS, v8::internal::EXTERNAL_UINT16_ELEMENTS, v8::internal::EXTERNAL_UINT32_ELEMENTS, v8::internal::EXTERNAL_UINT8_CLAMPED_ELEMENTS, v8::internal::EXTERNAL_UINT8_ELEMENTS, v8::internal::FAST_ELEMENTS, v8::internal::FAST_HOLEY_DOUBLE_ELEMENTS, v8::internal::FAST_HOLEY_ELEMENTS, v8::internal::Runtime::FunctionForId(), v8::internal::CodeStubGraphBuilderBase::GetParameter(), v8::internal::HGraphBuilder::graph(), v8::internal::CodeStubGraphBuilderBase::isolate(), v8::internal::HValue::kCanOverflow, v8::internal::KeyedLookupCache::kEntriesPerBucket, v8::internal::KeyedLookupCache::kEntryLength, v8::internal::Name::kHashShift, v8::internal::Map::kHasIndexedInterceptor, v8::internal::Map::kHasNamedInterceptor, v8::internal::Map::kIsAccessCheckNeeded, v8::internal::KeyedLookupCache::kKeyIndex, v8::internal::KeyedLookupCache::kMapIndex, v8::internal::LoadDescriptor::kNameIndex, v8::internal::LoadDescriptor::kReceiverIndex, map, v8::internal::NEVER_RETURN_HOLE, NULL, v8::internal::HGraphBuilder::Pop(), v8::internal::HGraphBuilder::Push(), and v8::internal::SLOPPY_ARGUMENTS_ELEMENTS.

+ Here is the call graph for this function:

◆ BuildElementsKindLimitCheck()

void v8::internal::CodeStubGraphBuilder< KeyedLoadGenericStub >::BuildElementsKindLimitCheck ( HGraphBuilder::IfBuilder *  if_builder,
HValue bit_field2,
ElementsKind  kind 
)
protected

Definition at line 1634 of file code-stubs-hydrogen.cc.

1636  {
1637  ElementsKind next_kind = static_cast<ElementsKind>(kind + 1);
1638  HValue* kind_limit = Add<HConstant>(
1639  static_cast<int>(Map::ElementsKindBits::encode(next_kind)));
1640 
1641  if_builder->If<HCompareNumericAndBranch>(bit_field2, kind_limit, Token::LT);
1642  if_builder->Then();
1643 }
static U encode(T value)
Definition: utils.h:217

References v8::internal::BitFieldBase< T, shift, size, U >::encode().

+ Here is the call graph for this function:

◆ BuildExternalElementLoad()

void v8::internal::CodeStubGraphBuilder< KeyedLoadGenericStub >::BuildExternalElementLoad ( HGraphBuilder::IfBuilder *  if_builder,
HValue receiver,
HValue key,
HValue instance_type,
HValue bit_field2,
ElementsKind  kind 
)
protected

Definition at line 1670 of file code-stubs-hydrogen.cc.

1672  {
1674 
1675  BuildElementsKindLimitCheck(if_builder, bit_field2, kind);
1676 
1678  false, kind,
1680  STANDARD_STORE));
1681 }
HInstruction * BuildUncheckedMonomorphicElementAccess(HValue *checked_object, HValue *key, HValue *val, bool is_js_array, ElementsKind elements_kind, PropertyAccessType access_type, LoadKeyedHoleMode load_mode, KeyedAccessStoreMode store_mode)
Definition: hydrogen.cc:2398
#define DCHECK(condition)
Definition: logging.h:205
bool IsExternalArrayElementsKind(ElementsKind kind)
Definition: elements-kind.h:95
@ STANDARD_STORE
Definition: objects.h:154

References v8::internal::HGraphBuilder::BuildUncheckedMonomorphicElementAccess(), DCHECK, v8::internal::IsExternalArrayElementsKind(), v8::internal::LOAD, v8::internal::NEVER_RETURN_HOLE, NULL, v8::internal::HGraphBuilder::Push(), and v8::internal::STANDARD_STORE.

+ Here is the call graph for this function:

◆ BuildFastElementLoad()

void v8::internal::CodeStubGraphBuilder< KeyedLoadGenericStub >::BuildFastElementLoad ( HGraphBuilder::IfBuilder *  if_builder,
HValue receiver,
HValue key,
HValue instance_type,
HValue bit_field2,
ElementsKind  kind 
)
protected

Definition at line 1646 of file code-stubs-hydrogen.cc.

1648  {
1650 
1651  BuildElementsKindLimitCheck(if_builder, bit_field2, kind);
1652 
1653  IfBuilder js_array_check(this);
1654  js_array_check.If<HCompareNumericAndBranch>(
1655  instance_type, Add<HConstant>(JS_ARRAY_TYPE), Token::EQ);
1656  js_array_check.Then();
1658  true, kind,
1660  STANDARD_STORE));
1661  js_array_check.Else();
1663  false, kind,
1665  STANDARD_STORE));
1666  js_array_check.End();
1667 }
@ JS_ARRAY_TYPE
Definition: objects.h:738

References v8::internal::HGraphBuilder::BuildUncheckedMonomorphicElementAccess(), DCHECK, v8::internal::EQ, v8::internal::IsExternalArrayElementsKind(), v8::internal::JS_ARRAY_TYPE, v8::internal::LOAD, v8::internal::NEVER_RETURN_HOLE, NULL, v8::internal::HGraphBuilder::Push(), and v8::internal::STANDARD_STORE.

+ Here is the call graph for this function:

◆ casted_stub()

Definition at line 1628 of file code-stubs-hydrogen.cc.

1628  {
1629  return static_cast<KeyedLoadGenericStub*>(stub());
1630  }

References v8::internal::CodeStubGraphBuilderBase::stub().

+ Here is the call graph for this function:

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