5#ifndef V8_OBJECTS_LOOKUP_INL_H_
6#define V8_OBJECTS_LOOKUP_INL_H_
37 Cast<
JSAny>(lookup_start_object), configuration) {}
51 Cast<
JSAny>(lookup_start_object), configuration) {
66 Cast<
JSAny>(lookup_start_object), configuration) {}
74 : configuration_(ComputeConfiguration(isolate, configuration, name)),
78 lookup_start_object_(lookup_start_object),
85#
if V8_ENABLE_WEBASSEMBLY
89 if (
name_.is_null()) {
92 name_ = isolate->factory()->InternalizeName(
name_);
93 }
else if (!
name_.is_null() && !IsInternalizedString(*
name_)) {
100 name_ = isolate->factory()->InternalizeName(
name_);
110 size_t integer_index;
121 : configuration_(configuration),
130 DCHECK(*
name_ == *isolate->factory()->error_stack_symbol() ||
131 *
name_ == *isolate->factory()->error_message_symbol());
137 DCHECK_EQ(index,
static_cast<uint64_t
>(index));
138#if V8_TARGET_ARCH_32_BIT
141 std::numeric_limits<size_t>::max());
145 name_ = isolate->factory()->InternalizeString(
146 isolate->factory()->HeapNumberToString(
147 isolate->factory()->NewHeapNumber(index), index));
154template <
template <
typename>
typename HandleType>
159#if V8_TARGET_ARCH_32_BIT
167 size_t integer_index;
173 size_t integer_index;
174 CHECK(!
name_->AsIntegerIndex(&integer_index));
179template <
template <
typename>
typename HandleType>
182 if (name->AsIntegerIndex(&
index_)) {
186 name_ = isolate->factory()->InternalizeName(name);
190template <
typename T,
template <
typename>
typename HandleType>
198 valid_obj = isolate->factory()->NumberToString(valid_obj);
200 DCHECK(IsName(*valid_obj));
204 name_ = isolate->factory()->InternalizeName(
name_);
208template <
typename T,
template <
typename>
typename HandleType>
217 DCHECK(isolate->has_exception());
223 name_ = isolate->factory()->InternalizeName(
name_);
234 if (
name_.is_null()) {
247 if (
name_.is_null()) {
261 object->map()->has_any_typed_array_or_wasm_array_elements());
292 if (receiver_map->is_extensible()) {
302 CHECK(!IsMaybeReadOnlyJSObjectMap(receiver_map));
306 if (IsAlwaysSharedSpaceJSObjectMap(receiver_map)) {
310 DCHECK(!receiver_map->is_extensible());
312 if (
name_->IsPrivateName()) {
330 RCS_SCOPE(isolate, RuntimeCallCounterId::kUpdateProtector);
331 DCHECK(IsInternalizedString(*name) || IsSymbol(*name));
339 bool debug_maybe_protector =
340 *name == roots.constructor_string() || *name == roots.next_string() ||
341 *name == roots.resolve_string() || *name == roots.then_string() ||
342 *name == roots.is_concat_spreadable_symbol() ||
343 *name == roots.iterator_symbol() || *name == roots.species_symbol() ||
344 *name == roots.match_all_symbol() || *name == roots.replace_symbol() ||
345 *name == roots.split_symbol() || *name == roots.to_primitive_symbol() ||
346 *name == roots.valueOf_string() || *name == roots.length_string();
347 DCHECK_EQ(maybe_protector, debug_maybe_protector);
350 if (maybe_protector) {
400 if (IsJSGlobalObject(prototype,
isolate_)) {
407template <
bool is_element>
411 return holder->GetIndexedInterceptor(
isolate_);
413 return holder->GetNamedInterceptor(
isolate_);
@ kExtendingNonExtensibleWithPrivate
Handle< String > SizeToString(size_t value, bool check_cache=true)
void CountUsage(v8::Isolate::UseCounterFeature feature)
static constexpr uint32_t kMaxElementIndex
DirectHandle< UnionOf< Map, PropertyCell > > transition_
uint32_t array_index() const
LookupIterator(Isolate *isolate, DirectHandle< JSAny > receiver, DirectHandle< Name > name, Configuration configuration=DEFAULT)
DirectHandle< InterceptorInfo > GetInterceptor() const
Isolate * isolate() const
static Configuration ComputeConfiguration(Isolate *isolate, Configuration configuration, DirectHandle< Name > name)
InternalIndex dictionary_entry() const
DirectHandle< T > GetStoreTarget() const
DirectHandle< Name > name_
DirectHandle< JSReceiver > holder_
static void InternalUpdateProtector(Isolate *isolate, DirectHandle< JSAny > receiver, DirectHandle< Name > name)
static MaybeDirectHandle< JSReceiver > GetRootForNonJSReceiver(Isolate *isolate, DirectHandle< JSPrimitive > lookup_start_object, size_t index, Configuration configuration)
DirectHandle< PropertyCell > transition_cell() const
const DirectHandle< JSAny > receiver_
PropertyKey GetKey() const
bool IsCacheableTransition()
static const size_t kInvalidIndex
DirectHandle< T > GetHolder() const
DirectHandle< JSAny > lookup_start_object() const
V8_EXPORT_PRIVATE void Start()
bool is_dictionary_holder() const
static MaybeDirectHandle< JSReceiver > GetRoot(Isolate *isolate, DirectHandle< JSAny > lookup_start_object, size_t index, Configuration configuration)
Factory * factory() const
DirectHandle< Name > GetName()
InternalIndex descriptor_number() const
bool ExtendingNonExtensible(DirectHandle< JSReceiver > receiver)
@ PROTOTYPE_CHAIN_SKIP_INTERCEPTOR
DirectHandle< Name > name() const
bool IsPrivateName() const
DirectHandle< Map > transition_map() const
bool check_prototype_chain() const
static V8_WARN_UNUSED_RESULT HandleType< Name >::MaybeType ToName(Isolate *isolate, HandleType< Object > input)
static bool ToIntegerIndex(Tagged< Object > obj, size_t *index)
DirectHandle< Name > name_
PropertyKey(Isolate *isolate, double index)
DirectHandle< Name > GetName(Isolate *isolate)
V8_INLINE bool IsNameForProtector(Tagged< HeapObject > object) const
ZoneVector< RpoNumber > & result
bool IsNumber(Tagged< Object > obj)
V8_INLINE DirectHandle< T > direct_handle(Tagged< T > object, Isolate *isolate)
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in name
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
#define DCHECK_IMPLIES(v1, v2)
#define DCHECK_NE(v1, v2)
#define CHECK_EQ(lhs, rhs)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)