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

Public Types

enum  HeapNumberMode { kNormalHeapNumbers , kHeapNumbersGuaranteedUniquelyOwned }
 

Public Member Functions

 JSDataObjectBuilder (Isolate *isolate, ElementsKind elements_kind, int expected_named_properties, DirectHandle< Map > expected_final_map, HeapNumberMode heap_number_mode)
 
template<typename PropertyIterator >
Handle< JSObjectBuildFromIterator (PropertyIterator &&it, MaybeHandle< FixedArrayBase > maybe_elements={})
 
template<typename Char , typename GetKeyFunction , typename GetValueFunction >
V8_INLINE bool TryAddFastPropertyForValue (base::Vector< const Char > key_chars, GetKeyFunction &&get_key, GetValueFunction &&get_value)
 
template<typename ValueIterator >
V8_INLINE void CreateAndInitialiseObject (ValueIterator value_it, DirectHandle< FixedArrayBase > elements)
 
void AddSlowProperty (DirectHandle< String > key, Handle< Object > value)
 
Handle< JSObjectobject ()
 

Private Member Functions

template<typename Char , typename GetKeyFunction >
V8_INLINE bool TryFastTransitionToPropertyKey (base::Vector< const Char > key_chars, GetKeyFunction &&get_key, Handle< String > *key_out)
 
V8_INLINE bool TryGeneralizeFieldToValue (DirectHandle< Object > value)
 
bool TryInitializeMapFromExpectedFinalMap ()
 
void InitializeMapFromZero ()
 
V8_INLINE bool IsOnExpectedFinalMapFastPath () const
 
void RewindExpectedFinalMapFastPathToBeforeCurrent ()
 
void RewindExpectedFinalMapFastPathToIncludeCurrent ()
 
V8_INLINE void RegisterFieldNeedsFreshHeapNumber (DirectHandle< Object > value)
 
V8_INLINE void AdvanceToNextProperty ()
 

Private Attributes

Isolateisolate_
 
ElementsKind elements_kind_
 
int expected_property_count_
 
HeapNumberMode heap_number_mode_
 
DirectHandle< Mapmap_
 
int current_property_index_ = 0
 
int extra_heap_numbers_needed_ = 0
 
Handle< JSObjectobject_
 
DirectHandle< Mapexpected_final_map_ = {}
 
int property_count_in_expected_final_map_ = 0
 

Detailed Description

Definition at line 735 of file json-parser.cc.

Member Enumeration Documentation

◆ HeapNumberMode

Enumerator
kNormalHeapNumbers 
kHeapNumbersGuaranteedUniquelyOwned 

Definition at line 740 of file json-parser.cc.

Constructor & Destructor Documentation

◆ JSDataObjectBuilder()

v8::internal::JSDataObjectBuilder::JSDataObjectBuilder ( Isolate * isolate,
ElementsKind elements_kind,
int expected_named_properties,
DirectHandle< Map > expected_final_map,
HeapNumberMode heap_number_mode )
inline

Definition at line 744 of file json-parser.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AddSlowProperty()

void v8::internal::JSDataObjectBuilder::AddSlowProperty ( DirectHandle< String > key,
Handle< Object > value )
inline

Definition at line 979 of file json-parser.cc.

Here is the call graph for this function:

◆ AdvanceToNextProperty()

V8_INLINE void v8::internal::JSDataObjectBuilder::AdvanceToNextProperty ( )
inlineprivate

Definition at line 1193 of file json-parser.cc.

Here is the caller graph for this function:

◆ BuildFromIterator()

template<typename PropertyIterator >
Handle< JSObject > v8::internal::JSDataObjectBuilder::BuildFromIterator ( PropertyIterator && it,
MaybeHandle< FixedArrayBase > maybe_elements = {} )
inline

Definition at line 780 of file json-parser.cc.

Here is the caller graph for this function:

◆ CreateAndInitialiseObject()

template<typename ValueIterator >
V8_INLINE void v8::internal::JSDataObjectBuilder::CreateAndInitialiseObject ( ValueIterator value_it,
DirectHandle< FixedArrayBase > elements )
inline

Definition at line 883 of file json-parser.cc.

Here is the call graph for this function:

◆ InitializeMapFromZero()

void v8::internal::JSDataObjectBuilder::InitializeMapFromZero ( )
inlineprivate

Definition at line 1139 of file json-parser.cc.

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

◆ IsOnExpectedFinalMapFastPath()

V8_INLINE bool v8::internal::JSDataObjectBuilder::IsOnExpectedFinalMapFastPath ( ) const
inlineprivate

Definition at line 1152 of file json-parser.cc.

Here is the caller graph for this function:

◆ object()

Handle< JSObject > v8::internal::JSDataObjectBuilder::object ( )
inline

Definition at line 986 of file json-parser.cc.

Here is the caller graph for this function:

◆ RegisterFieldNeedsFreshHeapNumber()

V8_INLINE void v8::internal::JSDataObjectBuilder::RegisterFieldNeedsFreshHeapNumber ( DirectHandle< Object > value)
inlineprivate

Definition at line 1180 of file json-parser.cc.

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

◆ RewindExpectedFinalMapFastPathToBeforeCurrent()

void v8::internal::JSDataObjectBuilder::RewindExpectedFinalMapFastPathToBeforeCurrent ( )
inlineprivate

Definition at line 1158 of file json-parser.cc.

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

◆ RewindExpectedFinalMapFastPathToIncludeCurrent()

void v8::internal::JSDataObjectBuilder::RewindExpectedFinalMapFastPathToIncludeCurrent ( )
inlineprivate

Definition at line 1173 of file json-parser.cc.

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

◆ TryAddFastPropertyForValue()

template<typename Char , typename GetKeyFunction , typename GetValueFunction >
V8_INLINE bool v8::internal::JSDataObjectBuilder::TryAddFastPropertyForValue ( base::Vector< const Char > key_chars,
GetKeyFunction && get_key,
GetValueFunction && get_value )
inline

Definition at line 822 of file json-parser.cc.

Here is the call graph for this function:

◆ TryFastTransitionToPropertyKey()

template<typename Char , typename GetKeyFunction >
V8_INLINE bool v8::internal::JSDataObjectBuilder::TryFastTransitionToPropertyKey ( base::Vector< const Char > key_chars,
GetKeyFunction && get_key,
Handle< String > * key_out )
inlineprivate

Definition at line 993 of file json-parser.cc.

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

◆ TryGeneralizeFieldToValue()

V8_INLINE bool v8::internal::JSDataObjectBuilder::TryGeneralizeFieldToValue ( DirectHandle< Object > value)
inlineprivate

Definition at line 1052 of file json-parser.cc.

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

◆ TryInitializeMapFromExpectedFinalMap()

bool v8::internal::JSDataObjectBuilder::TryInitializeMapFromExpectedFinalMap ( )
inlineprivate

Definition at line 1124 of file json-parser.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ current_property_index_

int v8::internal::JSDataObjectBuilder::current_property_index_ = 0
private

Definition at line 1201 of file json-parser.cc.

◆ elements_kind_

ElementsKind v8::internal::JSDataObjectBuilder::elements_kind_
private

Definition at line 1196 of file json-parser.cc.

◆ expected_final_map_

DirectHandle<Map> v8::internal::JSDataObjectBuilder::expected_final_map_ = {}
private

Definition at line 1206 of file json-parser.cc.

◆ expected_property_count_

int v8::internal::JSDataObjectBuilder::expected_property_count_
private

Definition at line 1197 of file json-parser.cc.

◆ extra_heap_numbers_needed_

int v8::internal::JSDataObjectBuilder::extra_heap_numbers_needed_ = 0
private

Definition at line 1202 of file json-parser.cc.

◆ heap_number_mode_

HeapNumberMode v8::internal::JSDataObjectBuilder::heap_number_mode_
private

Definition at line 1198 of file json-parser.cc.

◆ isolate_

Isolate* v8::internal::JSDataObjectBuilder::isolate_
private

Definition at line 1195 of file json-parser.cc.

◆ map_

DirectHandle<Map> v8::internal::JSDataObjectBuilder::map_
private

Definition at line 1200 of file json-parser.cc.

◆ object_

Handle<JSObject> v8::internal::JSDataObjectBuilder::object_
private

Definition at line 1204 of file json-parser.cc.

◆ property_count_in_expected_final_map_

int v8::internal::JSDataObjectBuilder::property_count_in_expected_final_map_ = 0
private

Definition at line 1207 of file json-parser.cc.


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