#ifndef V8_HEAP_FACTORY_INL_H_
#define V8_HEAP_FACTORY_INL_H_
#include "src/common/globals.h"
#include "src/heap/factory.h"
#include "src/execution/isolate-inl.h"
#include "src/handles/handles-inl.h"
#include "src/heap/factory-base-inl.h"
#include "src/heap/heap-inl.h"
#include "src/objects/feedback-cell.h"
#include "src/objects/heap-number-inl.h"
#include "src/objects/heap-object.h"
#include "src/objects/objects-inl.h"
#include "src/objects/oddball.h"
#include "src/objects/string-inl.h"
#include "src/objects/string-table-inl.h"
#include "src/strings/string-hasher.h"
namespace v8 {
namespace internal {
#define ROOT_ACCESSOR …
MUTABLE_ROOT_LIST(…)
#undef ROOT_ACCESSOR
template <typename T, typename>
Handle<String> Factory::InternalizeString(Handle<T> string) { … }
template <typename T, typename>
Handle<Name> Factory::InternalizeName(Handle<T> name) { … }
#ifdef V8_ENABLE_DIRECT_HANDLE
template <typename T, typename>
DirectHandle<String> Factory::InternalizeString(DirectHandle<T> string) {
if (IsInternalizedString(*string)) return string;
return isolate()->string_table()->LookupString(isolate(), string);
}
template <typename T, typename>
DirectHandle<Name> Factory::InternalizeName(DirectHandle<T> name) {
if (IsUniqueName(*name)) return name;
return isolate()->string_table()->LookupString(isolate(), Cast<String>(name));
}
#endif
template <size_t N>
Handle<String> Factory::NewStringFromStaticChars(const char (&str)[N],
AllocationType allocation) { … }
Handle<String> Factory::NewStringFromAsciiChecked(const char* str,
AllocationType allocation) { … }
Handle<String> Factory::NewSubString(Handle<String> str, int begin, int end) { … }
Handle<JSArray> Factory::NewJSArrayWithElements(
DirectHandle<FixedArrayBase> elements, ElementsKind elements_kind,
AllocationType allocation) { … }
Handle<JSObject> Factory::NewFastOrSlowJSObjectFromMap(
DirectHandle<Map> map, int number_of_slow_properties,
AllocationType allocation, DirectHandle<AllocationSite> allocation_site,
NewJSObjectType new_js_object_type) { … }
Handle<JSObject> Factory::NewFastOrSlowJSObjectFromMap(DirectHandle<Map> map) { … }
template <ExternalPointerTag tag>
Handle<Foreign> Factory::NewForeign(Address addr,
AllocationType allocation_type) { … }
Handle<Object> Factory::NewURIError() { … }
ReadOnlyRoots Factory::read_only_roots() const { … }
HeapAllocator* Factory::allocator() const { … }
Factory::CodeBuilder& Factory::CodeBuilder::set_empty_source_position_table() { … }
Factory::CodeBuilder& Factory::CodeBuilder::set_interpreter_data(
Handle<TrustedObject> interpreter_data) { … }
void Factory::NumberToStringCacheSet(DirectHandle<Object> number, int hash,
DirectHandle<String> js_string) { … }
Handle<Object> Factory::NumberToStringCacheGet(Tagged<Object> number,
int hash) { … }
}
}
#endif