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

#include <local-factory.h>

Inheritance diagram for v8::internal::LocalFactory:
Collaboration diagram for v8::internal::LocalFactory:

Public Member Functions

 LocalFactory (Isolate *isolate)
 
ReadOnlyRoots read_only_roots () const
 
DirectHandle< ObjectNewInvalidStringLengthError ()
 
DirectHandle< ObjectNewRangeError (MessageTemplate template_index)
 
int NumberToStringCacheHash (Tagged< Smi > number)
 
int NumberToStringCacheHash (double number)
 
void NumberToStringCacheSet (DirectHandle< Object > number, int hash, DirectHandle< String > js_string)
 
Handle< ObjectNumberToStringCacheGet (Tagged< Object > number, int hash)
 
- Public Member Functions inherited from v8::internal::FactoryBase< LocalFactory >
Handle< CodeNewCode (const NewCodeOptions &options)
 
DirectHandle< CodeWrapperNewCodeWrapper ()
 
Handle< BooleanToBoolean (bool value)
 
Handle< NumberNewNumber (double value)
 
Handle< NumberNewNumberFromInt (int32_t value)
 
Handle< NumberNewNumberFromUint (uint32_t value)
 
DirectHandle< NumberNewNumberFromSize (size_t value)
 
DirectHandle< NumberNewNumberFromInt64 (int64_t value)
 
Handle< HeapNumberNewHeapNumber (double value)
 
Handle< HeapNumberNewHeapNumber ()
 
Handle< HeapNumberNewHeapNumberFromBits (uint64_t bits)
 
Handle< HeapNumberNewHeapNumberWithHoleNaN ()
 
Handle< HeapNumberNewHeapInt32 (int32_t value)
 
Handle< StructNewStruct (InstanceType type, AllocationType allocation=AllocationType::kYoung)
 
Handle< AccessorPairNewAccessorPair ()
 
Handle< FixedArrayNewFixedArray (int length, AllocationType allocation=AllocationType::kYoung)
 
Handle< TrustedFixedArrayNewTrustedFixedArray (int length, AllocationType allocation=AllocationType::kTrusted)
 
Handle< ProtectedFixedArrayNewProtectedFixedArray (int length)
 
Handle< FixedArrayNewFixedArrayWithMap (DirectHandle< Map > map, int length, AllocationType allocation=AllocationType::kYoung)
 
Handle< FixedArrayNewFixedArrayWithHoles (int length, AllocationType allocation=AllocationType::kYoung)
 
DirectHandle< FixedArrayNewFixedArrayWithZeroes (int length, AllocationType allocation=AllocationType::kYoung)
 
Handle< FixedArrayBaseNewFixedDoubleArray (int length, AllocationType allocation=AllocationType::kYoung)
 
Handle< WeakFixedArrayNewWeakFixedArrayWithMap (Tagged< Map > map, int length, AllocationType allocation=AllocationType::kYoung)
 
Handle< WeakFixedArrayNewWeakFixedArray (int length, AllocationType allocation=AllocationType::kYoung)
 
Handle< TrustedWeakFixedArrayNewTrustedWeakFixedArray (int length)
 
Handle< ProtectedWeakFixedArrayNewProtectedWeakFixedArray (int length)
 
Handle< ByteArrayNewByteArray (int length, AllocationType allocation=AllocationType::kYoung)
 
Handle< TrustedByteArrayNewTrustedByteArray (int length, AllocationType allocation_type=AllocationType::kTrusted)
 
DirectHandle< DeoptimizationLiteralArrayNewDeoptimizationLiteralArray (int length)
 
DirectHandle< DeoptimizationFrameTranslationNewDeoptimizationFrameTranslation (int length)
 
Handle< BytecodeArrayNewBytecodeArray (int length, const uint8_t *raw_bytecodes, int frame_size, uint16_t parameter_count, uint16_t max_arguments, DirectHandle< TrustedFixedArray > constant_pool, DirectHandle< TrustedByteArray > handler_table, AllocationType allocation=AllocationType::kTrusted)
 
DirectHandle< BytecodeWrapperNewBytecodeWrapper (AllocationType allocation=AllocationType::kOld)
 
Handle< ObjectBoilerplateDescriptionNewObjectBoilerplateDescription (int boilerplate, int all_properties, int index_keys, bool has_seen_proto)
 
Handle< ArrayBoilerplateDescriptionNewArrayBoilerplateDescription (ElementsKind elements_kind, DirectHandle< FixedArrayBase > constant_values)
 
DirectHandle< RegExpDataWrapperNewRegExpDataWrapper ()
 
DirectHandle< RegExpBoilerplateDescriptionNewRegExpBoilerplateDescription (DirectHandle< RegExpData > data, DirectHandle< String > source, Tagged< Smi > flags)
 
Handle< TemplateObjectDescriptionNewTemplateObjectDescription (DirectHandle< FixedArray > raw_strings, DirectHandle< FixedArray > cooked_strings)
 
Handle< ScriptNewScript (DirectHandle< UnionOf< String, Undefined > > source, ScriptEventType event_type=ScriptEventType::kCreate)
 
Handle< ScriptNewScriptWithId (DirectHandle< UnionOf< String, Undefined > > source, int script_id, ScriptEventType event_type=ScriptEventType::kCreate)
 
DirectHandle< SloppyArgumentsElementsNewSloppyArgumentsElements (int length, DirectHandle< Context > context, DirectHandle< FixedArray > arguments, AllocationType allocation=AllocationType::kYoung)
 
DirectHandle< ArrayListNewArrayList (int size, AllocationType allocation=AllocationType::kYoung)
 
Handle< SharedFunctionInfoNewSharedFunctionInfoForLiteral (FunctionLiteral *literal, DirectHandle< Script > script, bool is_toplevel)
 
Handle< SharedFunctionInfoCloneSharedFunctionInfo (DirectHandle< SharedFunctionInfo > other)
 
DirectHandle< SharedFunctionInfoWrapperNewSharedFunctionInfoWrapper (DirectHandle< SharedFunctionInfo > sfi)
 
Handle< PreparseDataNewPreparseData (int data_length, int children_length)
 
DirectHandle< UncompiledDataWithoutPreparseDataNewUncompiledDataWithoutPreparseData (Handle< String > inferred_name, int32_t start_position, int32_t end_position)
 
DirectHandle< UncompiledDataWithPreparseDataNewUncompiledDataWithPreparseData (Handle< String > inferred_name, int32_t start_position, int32_t end_position, Handle< PreparseData >)
 
DirectHandle< UncompiledDataWithoutPreparseDataWithJobNewUncompiledDataWithoutPreparseDataWithJob (Handle< String > inferred_name, int32_t start_position, int32_t end_position)
 
DirectHandle< UncompiledDataWithPreparseDataAndJobNewUncompiledDataWithPreparseDataAndJob (Handle< String > inferred_name, int32_t start_position, int32_t end_position, Handle< PreparseData >)
 
Handle< FeedbackMetadataNewFeedbackMetadata (int slot_count, int create_closure_slot_count, AllocationType allocation=AllocationType::kOld)
 
Handle< CoverageInfoNewCoverageInfo (const ZoneVector< SourceRange > &slots)
 
Handle< StringInternalizeString (base::Vector< const uint8_t > string, bool convert_encoding=false)
 
Handle< StringInternalizeString (base::Vector< const uint16_t > string, bool convert_encoding=false)
 
Handle< StringInternalizeStringWithKey (StringTableKey *key)
 
Handle< SeqOneByteStringNewOneByteInternalizedString (base::Vector< const uint8_t > str, uint32_t raw_hash_field)
 
Handle< SeqTwoByteStringNewTwoByteInternalizedString (base::Vector< const base::uc16 > str, uint32_t raw_hash_field)
 
DirectHandle< SeqOneByteStringNewOneByteInternalizedStringFromTwoByte (base::Vector< const base::uc16 > str, uint32_t raw_hash_field)
 
Handle< SeqOneByteStringAllocateRawOneByteInternalizedString (int length, uint32_t raw_hash_field)
 
Handle< SeqTwoByteStringAllocateRawTwoByteInternalizedString (int length, uint32_t raw_hash_field)
 
Handle< StringLookupSingleCharacterStringFromCode (uint16_t code)
 
MaybeHandle< StringNewStringFromOneByte (base::Vector< const uint8_t > string, AllocationType allocation=AllocationType::kYoung)
 
Handle< StringNewStringFromAsciiChecked (const char *str, AllocationType allocation=AllocationType::kYoung)
 
Handle< StringNewStringFromAsciiChecked (std::string_view str, AllocationType allocation=AllocationType::kYoung)
 
V8_WARN_UNUSED_RESULT MaybeHandle< SeqOneByteStringNewRawOneByteString (int length, AllocationType allocation=AllocationType::kYoung)
 
V8_WARN_UNUSED_RESULT MaybeHandle< SeqTwoByteStringNewRawTwoByteString (int length, AllocationType allocation=AllocationType::kYoung)
 
V8_WARN_UNUSED_RESULT HandleType< String >::MaybeType NewConsString (HandleType< String > left, HandleType< String > right, AllocationType allocation=AllocationType::kYoung)
 
V8_WARN_UNUSED_RESULT Handle< StringNewConsString (DirectHandle< String > left, DirectHandle< String > right, int length, bool one_byte, AllocationType allocation=AllocationType::kYoung)
 
HandleType< String >::MaybeType NewConsString (HandleType< String > left, HandleType< String > right, AllocationType allocation)
 
V8_WARN_UNUSED_RESULT Handle< StringNumberToString (DirectHandle< Object > number, NumberCacheMode mode=NumberCacheMode::kBoth)
 
V8_WARN_UNUSED_RESULT Handle< StringHeapNumberToString (DirectHandle< HeapNumber > number, double value, NumberCacheMode mode=NumberCacheMode::kBoth)
 
V8_WARN_UNUSED_RESULT Handle< StringSmiToString (Tagged< Smi > number, NumberCacheMode mode=NumberCacheMode::kBoth)
 
V8_WARN_UNUSED_RESULT MaybeHandle< SeqOneByteStringNewRawSharedOneByteString (int length)
 
V8_WARN_UNUSED_RESULT MaybeHandle< SeqTwoByteStringNewRawSharedTwoByteString (int length)
 
Handle< FreshlyAllocatedBigIntNewBigInt (uint32_t length, AllocationType allocation=AllocationType::kYoung)
 
Handle< ScopeInfoNewScopeInfo (int length, AllocationType type=AllocationType::kOld)
 
DirectHandle< SourceTextModuleInfoNewSourceTextModuleInfo ()
 
Handle< DescriptorArrayNewDescriptorArray (int number_of_descriptors, int slack=0, AllocationType allocation=AllocationType::kYoung)
 
Handle< ClassPositionsNewClassPositions (int start, int end)
 
Handle< SwissNameDictionaryNewSwissNameDictionary (int at_least_space_for=kSwissNameDictionaryInitialCapacity, AllocationType allocation=AllocationType::kYoung)
 
Handle< SwissNameDictionaryNewSwissNameDictionaryWithCapacity (int capacity, AllocationType allocation)
 
DirectHandle< FunctionTemplateRareDataNewFunctionTemplateRareData ()
 
MaybeDirectHandle< MapGetInPlaceInternalizedStringMap (Tagged< Map > from_string_map)
 
AllocationType RefineAllocationTypeForInPlaceInternalizableString (AllocationType allocation, Tagged< Map > string_map)
 

Private Member Functions

Tagged< HeapObjectAllocateRaw (int size, AllocationType allocation, AllocationAlignment alignment=kTaggedAligned)
 
LocalIsolateisolate ()
 
bool CanAllocateInReadOnlySpace ()
 
bool EmptyStringRootIsInitialized ()
 
AllocationType AllocationTypeForInPlaceInternalizableString ()
 
void ProcessNewScript (DirectHandle< Script > script, ScriptEventType script_event_type)
 

Private Attributes

ReadOnlyRoots roots_
 

Friends

class FactoryBase< LocalFactory >
 

Additional Inherited Members

- Protected Member Functions inherited from v8::internal::FactoryBase< LocalFactory >
Tagged< HeapObjectAllocateRawArray (int size, AllocationType allocation)
 
Tagged< HeapObjectAllocateRawFixedArray (int length, AllocationType allocation)
 
Tagged< HeapObjectAllocateRawWeakArrayList (int length, AllocationType allocation)
 
Tagged< StructType > NewStructInternal (InstanceType type, AllocationType allocation)
 
Tagged< StructNewStructInternal (ReadOnlyRoots roots, Tagged< Map > map, int size, AllocationType allocation)
 
Tagged< HeapObjectAllocateRawWithImmortalMap (int size, AllocationType allocation, Tagged< Map > map, AllocationAlignment alignment=kTaggedAligned)
 
Tagged< HeapObjectNewWithImmortalMap (Tagged< Map > map, AllocationType allocation)
 
Handle< FixedArrayNewFixedArrayWithFiller (DirectHandle< Map > map, int length, DirectHandle< HeapObject > filler, AllocationType allocation)
 
Handle< SharedFunctionInfoNewSharedFunctionInfo (AllocationType allocation)
 
Handle< SharedFunctionInfoNewSharedFunctionInfo (MaybeDirectHandle< String > maybe_name, MaybeDirectHandle< HeapObject > maybe_function_data, Builtin builtin, int len, AdaptArguments adapt, FunctionKind kind=FunctionKind::kNormalFunction)
 
Handle< StringMakeOrFindTwoCharacterString (uint16_t c1, uint16_t c2)
 
MaybeHandle< SeqStringT > NewRawStringWithMap (int length, Tagged< Map > map, AllocationType allocation)
 
- Static Protected Attributes inherited from v8::internal::FactoryBase< LocalFactory >
static constexpr int kNumberToStringBufferSize
 

Detailed Description

Definition at line 25 of file local-factory.h.

Constructor & Destructor Documentation

◆ LocalFactory()

v8::internal::LocalFactory::LocalFactory ( Isolate * isolate)
explicit

Definition at line 24 of file local-factory.cc.

Member Function Documentation

◆ AllocateRaw()

Tagged< HeapObject > v8::internal::LocalFactory::AllocateRaw ( int size,
AllocationType allocation,
AllocationAlignment alignment = kTaggedAligned )
private

Definition at line 48 of file local-factory.cc.

Here is the call graph for this function:

◆ AllocationTypeForInPlaceInternalizableString()

AllocationType v8::internal::LocalFactory::AllocationTypeForInPlaceInternalizableString ( )
inlineprivate

Definition at line 25 of file local-factory-inl.h.

Here is the call graph for this function:

◆ CanAllocateInReadOnlySpace()

bool v8::internal::LocalFactory::CanAllocateInReadOnlySpace ( )
inlineprivate

Definition at line 73 of file local-factory.h.

◆ EmptyStringRootIsInitialized()

bool v8::internal::LocalFactory::EmptyStringRootIsInitialized ( )
inlineprivate

Definition at line 74 of file local-factory.h.

◆ isolate()

LocalIsolate * v8::internal::LocalFactory::isolate ( )
inlineprivate

Definition at line 65 of file local-factory.h.

Here is the caller graph for this function:

◆ NewInvalidStringLengthError()

DirectHandle< Object > v8::internal::LocalFactory::NewInvalidStringLengthError ( )
inline

Definition at line 41 of file local-factory.h.

◆ NewRangeError()

DirectHandle< Object > v8::internal::LocalFactory::NewRangeError ( MessageTemplate template_index)
inline

Definition at line 42 of file local-factory.h.

◆ NumberToStringCacheGet()

Handle< Object > v8::internal::LocalFactory::NumberToStringCacheGet ( Tagged< Object > number,
int hash )

Definition at line 65 of file local-factory.cc.

◆ NumberToStringCacheHash() [1/2]

int v8::internal::LocalFactory::NumberToStringCacheHash ( double number)

Definition at line 60 of file local-factory.cc.

◆ NumberToStringCacheHash() [2/2]

int v8::internal::LocalFactory::NumberToStringCacheHash ( Tagged< Smi > number)

Definition at line 58 of file local-factory.cc.

◆ NumberToStringCacheSet()

void v8::internal::LocalFactory::NumberToStringCacheSet ( DirectHandle< Object > number,
int hash,
DirectHandle< String > js_string )

Definition at line 62 of file local-factory.cc.

◆ ProcessNewScript()

void v8::internal::LocalFactory::ProcessNewScript ( DirectHandle< Script > script,
ScriptEventType script_event_type )
private

Definition at line 26 of file local-factory.cc.

◆ read_only_roots()

ReadOnlyRoots v8::internal::LocalFactory::read_only_roots ( ) const
inline

Definition at line 29 of file local-factory.h.

Friends And Related Symbol Documentation

◆ FactoryBase< LocalFactory >

friend class FactoryBase< LocalFactory >
friend

Definition at line 54 of file local-factory.h.

Member Data Documentation

◆ roots_

ReadOnlyRoots v8::internal::LocalFactory::roots_
private

Definition at line 82 of file local-factory.h.


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