v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::MapUpdater Class Reference

#include <map-updater.h>

Collaboration diagram for v8::internal::MapUpdater:

Public Member Functions

 MapUpdater (Isolate *isolate, DirectHandle< Map > old_map)
 
Handle< MapReconfigureToDataField (InternalIndex descriptor, PropertyAttributes attributes, PropertyConstness constness, Representation representation, DirectHandle< FieldType > field_type)
 
DirectHandle< MapReconfigureElementsKind (ElementsKind elements_kind)
 
Handle< MapApplyPrototypeTransition (DirectHandle< JSPrototype > prototype)
 
Handle< MapUpdate ()
 

Static Public Member Functions

static std::optional< Tagged< Map > > TryUpdateNoLock (Isolate *isolate, Tagged< Map > old_map, ConcurrencyMode cmode) V8_WARN_UNUSED_RESULT
 
static Handle< MapReconfigureExistingProperty (Isolate *isolate, DirectHandle< Map > map, InternalIndex descriptor, PropertyKind kind, PropertyAttributes attributes, PropertyConstness constness)
 
static void GeneralizeField (Isolate *isolate, DirectHandle< Map > map, InternalIndex modify_index, PropertyConstness new_constness, Representation new_representation, DirectHandle< FieldType > new_field_type)
 
static void CompleteInobjectSlackTracking (Isolate *isolate, Tagged< Map > initial_map)
 

Private Types

enum  State {
  kInitialized , kAtRootMap , kAtTargetMap , kAtIntegrityLevelSource ,
  kEnd
}
 

Private Member Functions

Handle< MapUpdateImpl ()
 
State TryReconfigureToDataFieldInplace ()
 
State FindRootMap ()
 
State FindTargetMap ()
 
DirectHandle< DescriptorArrayBuildDescriptorArray ()
 
DirectHandle< MapFindSplitMap (DirectHandle< DescriptorArray > descriptors)
 
State ConstructNewMap ()
 
State ConstructNewMapWithIntegrityLevelTransition ()
 
State Normalize (const char *reason)
 
Tagged< NameGetKey (InternalIndex descriptor) const
 
PropertyDetails GetDetails (InternalIndex descriptor) const
 
Tagged< ObjectGetValue (InternalIndex descriptor) const
 
Tagged< FieldTypeGetFieldType (InternalIndex descriptor) const
 
DirectHandle< FieldTypeGetOrComputeFieldType (InternalIndex descriptor, PropertyLocation location, Representation representation) const
 
DirectHandle< FieldTypeGetOrComputeFieldType (DirectHandle< DescriptorArray > descriptors, InternalIndex descriptor, PropertyLocation location, Representation representation)
 
void GeneralizeField (DirectHandle< Map > map, InternalIndex modify_index, PropertyConstness new_constness, Representation new_representation, DirectHandle< FieldType > new_field_type)
 
bool TrySaveIntegrityLevelTransitions ()
 

Static Private Member Functions

static DirectHandle< MapUpdateMapNoLock (Isolate *isolate, DirectHandle< Map > old_map)
 
static void UpdateFieldType (Isolate *isolate, DirectHandle< Map > map, InternalIndex descriptor_number, DirectHandle< Name > name, PropertyConstness new_constness, Representation new_representation, DirectHandle< FieldType > new_type)
 

Private Attributes

Isolateisolate_
 
DirectHandle< Mapold_map_
 
DirectHandle< DescriptorArrayold_descriptors_
 
Handle< Maproot_map_
 
Handle< Maptarget_map_
 
Handle< Mapresult_map_
 
int old_nof_
 
bool has_integrity_level_transition_ = false
 
PropertyAttributes integrity_level_ = NONE
 
DirectHandle< Symbolintegrity_level_symbol_
 
DirectHandle< Mapintegrity_source_map_
 
State state_ = kInitialized
 
ElementsKind new_elements_kind_
 
bool is_transitionable_fast_elements_kind_
 
DirectHandle< JSPrototypenew_prototype_
 
InternalIndex modified_descriptor_ = InternalIndex::NotFound()
 
PropertyKind new_kind_ = PropertyKind::kData
 
PropertyAttributes new_attributes_ = NONE
 
PropertyConstness new_constness_ = PropertyConstness::kMutable
 
PropertyLocation new_location_ = PropertyLocation::kField
 
Representation new_representation_ = Representation::None()
 
DirectHandle< FieldTypenew_field_type_
 

Detailed Description

Definition at line 51 of file map-updater.h.

Member Enumeration Documentation

◆ State

Enumerator
kInitialized 
kAtRootMap 
kAtTargetMap 
kAtIntegrityLevelSource 
kEnd 

Definition at line 107 of file map-updater.h.

Constructor & Destructor Documentation

◆ MapUpdater()

v8::internal::MapUpdater::MapUpdater ( Isolate * isolate,
DirectHandle< Map > old_map )

Definition at line 90 of file map-updater.cc.

Member Function Documentation

◆ ApplyPrototypeTransition()

Handle< Map > v8::internal::MapUpdater::ApplyPrototypeTransition ( DirectHandle< JSPrototype > prototype)

Definition at line 242 of file map-updater.cc.

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

◆ BuildDescriptorArray()

DirectHandle< DescriptorArray > v8::internal::MapUpdater::BuildDescriptorArray ( )
private

Definition at line 822 of file map-updater.cc.

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

◆ CompleteInobjectSlackTracking()

void v8::internal::MapUpdater::CompleteInobjectSlackTracking ( Isolate * isolate,
Tagged< Map > initial_map )
static

Definition at line 455 of file map-updater.cc.

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

◆ ConstructNewMap()

MapUpdater::State v8::internal::MapUpdater::ConstructNewMap ( )
private

Definition at line 1039 of file map-updater.cc.

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

◆ ConstructNewMapWithIntegrityLevelTransition()

MapUpdater::State v8::internal::MapUpdater::ConstructNewMapWithIntegrityLevelTransition ( )
private

Definition at line 1147 of file map-updater.cc.

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

◆ FindRootMap()

MapUpdater::State v8::internal::MapUpdater::FindRootMap ( )
private

Definition at line 588 of file map-updater.cc.

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

◆ FindSplitMap()

DirectHandle< Map > v8::internal::MapUpdater::FindSplitMap ( DirectHandle< DescriptorArray > descriptors)
private

Definition at line 1002 of file map-updater.cc.

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

◆ FindTargetMap()

MapUpdater::State v8::internal::MapUpdater::FindTargetMap ( )
private

Definition at line 693 of file map-updater.cc.

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

◆ GeneralizeField() [1/2]

void v8::internal::MapUpdater::GeneralizeField ( DirectHandle< Map > map,
InternalIndex modify_index,
PropertyConstness new_constness,
Representation new_representation,
DirectHandle< FieldType > new_field_type )
private

Definition at line 433 of file map-updater.cc.

Here is the call graph for this function:

◆ GeneralizeField() [2/2]

void v8::internal::MapUpdater::GeneralizeField ( Isolate * isolate,
DirectHandle< Map > map,
InternalIndex modify_index,
PropertyConstness new_constness,
Representation new_representation,
DirectHandle< FieldType > new_field_type )
static

Definition at line 1308 of file map-updater.cc.

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

◆ GetDetails()

PropertyDetails v8::internal::MapUpdater::GetDetails ( InternalIndex descriptor) const
inlineprivate

Definition at line 107 of file map-updater.cc.

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

◆ GetFieldType()

Tagged< FieldType > v8::internal::MapUpdater::GetFieldType ( InternalIndex descriptor) const
inlineprivate

Definition at line 138 of file map-updater.cc.

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

◆ GetKey()

Tagged< Name > v8::internal::MapUpdater::GetKey ( InternalIndex descriptor) const
inlineprivate

Definition at line 103 of file map-updater.cc.

Here is the caller graph for this function:

◆ GetOrComputeFieldType() [1/2]

DirectHandle< FieldType > v8::internal::MapUpdater::GetOrComputeFieldType ( DirectHandle< DescriptorArray > descriptors,
InternalIndex descriptor,
PropertyLocation location,
Representation representation )
inlineprivate

Definition at line 161 of file map-updater.cc.

Here is the call graph for this function:

◆ GetOrComputeFieldType() [2/2]

DirectHandle< FieldType > v8::internal::MapUpdater::GetOrComputeFieldType ( InternalIndex descriptor,
PropertyLocation location,
Representation representation ) const
inlineprivate

Definition at line 148 of file map-updater.cc.

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

◆ GetValue()

Tagged< Object > v8::internal::MapUpdater::GetValue ( InternalIndex descriptor) const
inlineprivate

Definition at line 128 of file map-updater.cc.

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

◆ Normalize()

MapUpdater::State v8::internal::MapUpdater::Normalize ( const char * reason)
private

Definition at line 446 of file map-updater.cc.

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

◆ ReconfigureElementsKind()

DirectHandle< Map > v8::internal::MapUpdater::ReconfigureElementsKind ( ElementsKind elements_kind)

Definition at line 231 of file map-updater.cc.

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

◆ ReconfigureExistingProperty()

Handle< Map > v8::internal::MapUpdater::ReconfigureExistingProperty ( Isolate * isolate,
DirectHandle< Map > map,
InternalIndex descriptor,
PropertyKind kind,
PropertyAttributes attributes,
PropertyConstness constness )
static

Definition at line 1188 of file map-updater.cc.

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

◆ ReconfigureToDataField()

Handle< Map > v8::internal::MapUpdater::ReconfigureToDataField ( InternalIndex descriptor,
PropertyAttributes attributes,
PropertyConstness constness,
Representation representation,
DirectHandle< FieldType > field_type )

Definition at line 174 of file map-updater.cc.

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

◆ TryReconfigureToDataFieldInplace()

MapUpdater::State v8::internal::MapUpdater::TryReconfigureToDataFieldInplace ( )
private

Definition at line 499 of file map-updater.cc.

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

◆ TrySaveIntegrityLevelTransitions()

bool v8::internal::MapUpdater::TrySaveIntegrityLevelTransitions ( )
private

Definition at line 546 of file map-updater.cc.

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

◆ TryUpdateNoLock()

std::optional< Tagged< Map > > v8::internal::MapUpdater::TryUpdateNoLock ( Isolate * isolate,
Tagged< Map > old_map,
ConcurrencyMode cmode )
static

Definition at line 353 of file map-updater.cc.

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

◆ Update()

Handle< Map > v8::internal::MapUpdater::Update ( )

Definition at line 274 of file map-updater.cc.

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

◆ UpdateFieldType()

void v8::internal::MapUpdater::UpdateFieldType ( Isolate * isolate,
DirectHandle< Map > map,
InternalIndex descriptor_number,
DirectHandle< Name > name,
PropertyConstness new_constness,
Representation new_representation,
DirectHandle< FieldType > new_type )
staticprivate

Definition at line 1213 of file map-updater.cc.

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

◆ UpdateImpl()

Handle< Map > v8::internal::MapUpdater::UpdateImpl ( )
private

Definition at line 279 of file map-updater.cc.

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

◆ UpdateMapNoLock()

DirectHandle< Map > v8::internal::MapUpdater::UpdateMapNoLock ( Isolate * isolate,
DirectHandle< Map > old_map )
inlinestaticprivate

Definition at line 264 of file map-updater.cc.

Member Data Documentation

◆ has_integrity_level_transition_

bool v8::internal::MapUpdater::has_integrity_level_transition_ = false
private

Definition at line 232 of file map-updater.h.

◆ integrity_level_

PropertyAttributes v8::internal::MapUpdater::integrity_level_ = NONE
private

Definition at line 233 of file map-updater.h.

◆ integrity_level_symbol_

DirectHandle<Symbol> v8::internal::MapUpdater::integrity_level_symbol_
private

Definition at line 234 of file map-updater.h.

◆ integrity_source_map_

DirectHandle<Map> v8::internal::MapUpdater::integrity_source_map_
private

Definition at line 235 of file map-updater.h.

◆ is_transitionable_fast_elements_kind_

bool v8::internal::MapUpdater::is_transitionable_fast_elements_kind_
private

Definition at line 239 of file map-updater.h.

◆ isolate_

Isolate* v8::internal::MapUpdater::isolate_
private

Definition at line 223 of file map-updater.h.

◆ modified_descriptor_

InternalIndex v8::internal::MapUpdater::modified_descriptor_ = InternalIndex::NotFound()
private

Definition at line 245 of file map-updater.h.

◆ new_attributes_

PropertyAttributes v8::internal::MapUpdater::new_attributes_ = NONE
private

Definition at line 247 of file map-updater.h.

◆ new_constness_

PropertyConstness v8::internal::MapUpdater::new_constness_ = PropertyConstness::kMutable
private

Definition at line 248 of file map-updater.h.

◆ new_elements_kind_

ElementsKind v8::internal::MapUpdater::new_elements_kind_
private

Definition at line 238 of file map-updater.h.

◆ new_field_type_

DirectHandle<FieldType> v8::internal::MapUpdater::new_field_type_
private

Definition at line 253 of file map-updater.h.

◆ new_kind_

PropertyKind v8::internal::MapUpdater::new_kind_ = PropertyKind::kData
private

Definition at line 246 of file map-updater.h.

◆ new_location_

PropertyLocation v8::internal::MapUpdater::new_location_ = PropertyLocation::kField
private

Definition at line 249 of file map-updater.h.

◆ new_prototype_

DirectHandle<JSPrototype> v8::internal::MapUpdater::new_prototype_
private

Definition at line 241 of file map-updater.h.

◆ new_representation_

Representation v8::internal::MapUpdater::new_representation_ = Representation::None()
private

Definition at line 250 of file map-updater.h.

◆ old_descriptors_

DirectHandle<DescriptorArray> v8::internal::MapUpdater::old_descriptors_
private

Definition at line 225 of file map-updater.h.

◆ old_map_

DirectHandle<Map> v8::internal::MapUpdater::old_map_
private

Definition at line 224 of file map-updater.h.

◆ old_nof_

int v8::internal::MapUpdater::old_nof_
private

Definition at line 229 of file map-updater.h.

◆ result_map_

Handle<Map> v8::internal::MapUpdater::result_map_
private

Definition at line 228 of file map-updater.h.

◆ root_map_

Handle<Map> v8::internal::MapUpdater::root_map_
private

Definition at line 226 of file map-updater.h.

◆ state_

State v8::internal::MapUpdater::state_ = kInitialized
private

Definition at line 237 of file map-updater.h.

◆ target_map_

Handle<Map> v8::internal::MapUpdater::target_map_
private

Definition at line 227 of file map-updater.h.


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