v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
js-objects.h
Go to the documentation of this file.
1// Copyright 2018 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_OBJECTS_JS_OBJECTS_H_
6#define V8_OBJECTS_JS_OBJECTS_H_
7
8#include <optional>
9
10#include "src/common/globals.h"
11#include "src/handles/handles.h"
14// TODO(jkummerow): Consider forward-declaring instead.
16#include "src/objects/objects.h"
18
19// Has to be the last include (doesn't have include guards):
21
22namespace v8::internal {
23
24// Enum for functions that offer a second mode that does not cause allocations.
25// Used in conjunction with LookupIterator and unboxed double fields.
27
28enum InstanceType : uint16_t;
29class JSGlobalObject;
30class JSGlobalProxy;
31class LookupIterator;
33class PropertyKey;
34class NativeContext;
35class IsCompiledScope;
36class StackTraceInfo;
37class SwissNameDictionary;
38class ElementsAccessor;
39class Undefined;
40class Null;
41
42#include "torque-generated/src/objects/js-objects-tq.inc"
43
44// JSReceiver includes types on which properties can be defined, i.e.,
45// JSObject and JSProxy.
46class JSReceiver : public TorqueGeneratedJSReceiver<JSReceiver, HeapObject> {
47 public:
49 // Returns true if there is no slow (ie, dictionary) backing store.
50 DECL_GETTER(HasFastProperties, bool)
51
52 // Returns the properties array backing store if it
53 // exists. Otherwise, returns an empty_property_array when there's a
54 // Smi (hash code) or an empty_fixed_array for a fast properties
55 // map.
56 DECL_GETTER(property_array, Tagged<PropertyArray>)
57
58 // Gets slow properties for non-global objects (if
59 // v8_enable_swiss_name_dictionary is not set).
60 DECL_GETTER(property_dictionary, Tagged<NameDictionary>)
61
62 // Gets slow properties for non-global objects (if
63 // v8_enable_swiss_name_dictionary is set).
64 DECL_GETTER(property_dictionary_swiss, Tagged<SwissNameDictionary>)
65
66 // Sets the properties backing store and makes sure any existing hash is moved
67 // to the new properties store. To clear out the properties store, pass in the
68 // empty_fixed_array(), the hash will be maintained in this case as well.
69 void SetProperties(Tagged<HeapObject> properties);
70
71 // There are five possible values for the properties offset.
72 // 1) EmptyFixedArray/EmptyPropertyDictionary - This is the standard
73 // placeholder.
74 //
75 // 2) Smi - This is the hash code of the object.
76 //
77 // 3) PropertyArray - This is similar to a FixedArray but stores
78 // the hash code of the object in its length field. This is a fast
79 // backing store.
80 //
81 // 4) NameDictionary - This is the dictionary-mode backing store.
82 //
83 // 4) GlobalDictionary - This is the backing store for the
84 // GlobalObject.
85 //
86 // This is used only in the deoptimizer and heap. Please use the
87 // above typed getters and setters to access the properties.
90
91 inline void initialize_properties(Isolate* isolate);
92
93 // Deletes an existing named property in a normalized object.
95 InternalIndex entry);
96
97 // ES6 section 7.1.1 ToPrimitive
98 template <template <typename> typename HandleType>
99 requires(
100 std::is_convertible_v<HandleType<JSReceiver>, DirectHandle<JSReceiver>>)
101 V8_WARN_UNUSED_RESULT static typename HandleType<Object>::MaybeType
102 ToPrimitive(Isolate* isolate, HandleType<JSReceiver> receiver,
104
105 // ES6 section 7.1.1.1 OrdinaryToPrimitive
106 template <template <typename> typename HandleType>
107 requires(std::is_convertible_v<HandleType<Object>, DirectHandle<Object>>)
108 V8_WARN_UNUSED_RESULT static typename HandleType<Object>::MaybeType
111
112 // Unwraps the chain of potential function wrappers or JSProxy objects and
113 // return the leaf function's creation context.
114 // Throws TypeError in case there's a revoked JSProxy on the way.
115 // https://tc39.es/ecma262/#sec-getfunctionrealm
118
121
122 // Get the first non-hidden prototype.
125
127 Isolate* isolate, DirectHandle<JSReceiver> object,
129
130 // Reads all enumerable own properties of source and adds them to
131 // target, using either Set or CreateDataProperty depending on the
132 // use_set argument. This only copies values not present in the
133 // maybe_excluded_properties list.
134 // If direct handles are enabled, it is the responsibility of the caller to
135 // ensure that the memory pointed to by `excluded_properties` is scanned
136 // during CSS, e.g., it comes from a `DirectHandleVector<Object>`.
138 Isolate* isolate, DirectHandle<JSReceiver> target,
140 base::Vector<DirectHandle<Object>> excluded_properties = {},
141 bool use_set = true);
142
143 // Implementation of [[HasProperty]], ECMA-262 5th edition, section 8.12.6.
145 LookupIterator* it);
147 Isolate* isolate, DirectHandle<JSReceiver> object,
148 DirectHandle<Name> name);
150 Isolate* isolate, DirectHandle<JSReceiver> object, uint32_t index);
153
155 Isolate* isolate, DirectHandle<JSReceiver> object,
156 DirectHandle<Name> name);
158 Isolate* isolate, DirectHandle<JSReceiver> object, uint32_t index);
159
161 Isolate* isolate, DirectHandle<JSReceiver> receiver, const char* key);
164 DirectHandle<Name> name);
166 Isolate* isolate, DirectHandle<JSReceiver> receiver, uint32_t index);
167
168 // Implementation of ES6 [[Delete]]
172 LanguageMode language_mode = LanguageMode::kSloppy);
176 LanguageMode language_mode = LanguageMode::kSloppy);
178 Isolate* isolate, DirectHandle<JSReceiver> object,
180 LanguageMode language_mode = LanguageMode::kSloppy);
182 LookupIterator* it, LanguageMode language_mode);
184 Isolate* isolate, DirectHandle<JSReceiver> object, uint32_t index,
185 LanguageMode language_mode = LanguageMode::kSloppy);
186
189 Handle<Object> attributes);
191 Isolate* isolate, DirectHandle<Object> object,
192 DirectHandle<Object> properties);
193
194 // "virtual" dispatcher to the correct [[DefineOwnProperty]] implementation.
196 Isolate* isolate, DirectHandle<JSReceiver> object,
198 Maybe<ShouldThrow> should_throw);
199
200 // Check if private name property can be store on the object. It will return
201 // false with an error when it cannot but didn't throw, or a Nothing if
202 // it throws.
204 LookupIterator* it, bool is_define);
205
206 // ES6 7.3.4 (when passed kDontThrow)
209 DirectHandle<Object> value, Maybe<ShouldThrow> should_throw);
211 Isolate* isolate, DirectHandle<JSAny> object, PropertyKey key,
212 DirectHandle<Object> value, Maybe<ShouldThrow> should_throw);
215 DirectHandle<Object> value, Maybe<ShouldThrow> should_throw);
216
217 // Add private fields to the receiver, ignoring extensibility and the
218 // traps. The caller should check that the private field does not already
219 // exist on the receiver before calling this method.
222 Maybe<ShouldThrow> should_throw);
223
224 // ES6 9.1.6.1
227 PropertyDescriptor* desc, Maybe<ShouldThrow> should_throw);
229 Isolate* isolate, DirectHandle<JSObject> object, const PropertyKey& key,
230 PropertyDescriptor* desc, Maybe<ShouldThrow> should_throw);
233 Maybe<ShouldThrow> should_throw);
234 // ES6 9.1.6.2
236 Isolate* isolate, bool extensible, PropertyDescriptor* desc,
237 PropertyDescriptor* current, DirectHandle<Name> property_name,
238 Maybe<ShouldThrow> should_throw);
239 // ES6 9.1.6.3
240 // |it| can be NULL in cases where the ES spec passes |undefined| as the
241 // receiver. Exactly one of |it| and |property_name| must be provided.
243 Isolate* isolate, LookupIterator* it, bool extensible,
245 Maybe<ShouldThrow> should_throw, DirectHandle<Name> property_name);
246
252
254
255 // ES6 7.3.14 (when passed kDontThrow)
256 // 'level' must be SEALED or FROZEN.
258 Isolate* isolate, DirectHandle<JSReceiver> object, IntegrityLevel lvl,
259 ShouldThrow should_throw);
260
261 // ES6 7.3.15
262 // 'level' must be SEALED or FROZEN.
264 Isolate* isolate, DirectHandle<JSReceiver> object, IntegrityLevel lvl);
265
266 // ES6 [[PreventExtensions]] (when passed kDontThrow)
268 Isolate* isolate, DirectHandle<JSReceiver> object,
269 ShouldThrow should_throw);
270
272 Isolate* isolate, DirectHandle<JSReceiver> object);
273
274 // Returns the class name.
276
277 // Returns the constructor (the function that was used to instantiate the
278 // object).
281
282 // Returns the constructor name (the (possibly inferred) name of the function
283 // that was used to instantiate the object), if any. If a FunctionTemplate is
284 // used to instantiate the object, the class_name of the FunctionTemplate is
285 // returned instead.
288
289 V8_EXPORT_PRIVATE inline std::optional<Tagged<NativeContext>>
292 Isolate* isolate);
293
296 DirectHandle<Name> name);
299 DirectHandle<Name> name);
302 uint32_t index);
303
306 uint32_t index);
309 uint32_t index);
310
312 LookupIterator* it);
313
314 // Set the object's prototype (only JSReceiver and null are allowed values).
316 Isolate* isolate, DirectHandle<JSReceiver> object,
317 DirectHandle<Object> value, bool from_javascript,
318 ShouldThrow should_throw);
319
320 inline static Handle<Object> GetDataProperty(Isolate* isolate,
322 DirectHandle<Name> name);
324 LookupIterator* it, AllocationPolicy allocation_policy =
326
327 // Retrieves a permanent object identity hash code. The undefined value might
328 // be returned in case no hash was created yet.
330
331 // Retrieves a permanent object identity hash code. May create and store a
332 // hash code if needed and none exists.
333 static Tagged<Smi> CreateIdentityHash(Isolate* isolate,
336
337 // Stores the hash code. The hash passed in must be masked with
338 // JSReceiver::kHashMask.
339 V8_EXPORT_PRIVATE void SetIdentityHash(int masked_hash);
340
341 // ES6 [[OwnPropertyKeys]] (modulo return type)
344
346 Isolate* isolate, DirectHandle<JSReceiver> object, PropertyFilter filter,
347 bool try_fast_path = true);
348
350 Isolate* isolate, DirectHandle<JSReceiver> object, PropertyFilter filter,
351 bool try_fast_path = true);
352
354
355 bool HasProxyInPrototype(Isolate* isolate);
356
357 // TC39 "Dynamic Code Brand Checks"
358 bool IsCodeLike(Isolate* isolate) const;
359
360 private:
361 // Hide generated accessors; custom accessors are called
362 // "raw_properties_or_hash".
363 DECL_ACCESSORS(properties_or_hash, Tagged<Object>)
364
366};
367
368// The JSObject describes real heap allocated JavaScript objects with
369// properties.
370// Note that the map of JSObject changes during execution to enable inline
371// caching.
372class JSObject : public TorqueGeneratedJSObject<JSObject, JSReceiver> {
373 public:
375
380
382 Isolate* isolate, DirectHandle<Map> initial_map,
385
386 // 9.1.12 ObjectCreate ( proto [ , internalSlotsList ] )
387 // Notice: This is NOT 19.1.2.2 Object.create ( O, Properties )
389 Isolate* isolate, DirectHandle<JSPrototype> prototype);
390
393
394 // Acquire/release semantics on this field are explicitly forbidden to avoid
395 // confusion, since the default setter uses relaxed semantics. If
396 // acquire/release semantics ever become necessary, the default setter should
397 // be reverted to non-atomic behavior, and setters with explicit tags
398 // introduced and used when required.
400 AcquireLoadTag tag) const = delete;
402 WriteBarrierMode mode = UPDATE_WRITE_BARRIER) = delete;
403
404 inline void initialize_elements();
405 static inline void SetMapAndElements(DirectHandle<JSObject> object,
408 DECL_GETTER(GetElementsKind, ElementsKind)
409 DECL_GETTER(GetElementsAccessor, ElementsAccessor*)
410
411 // Returns true if an object has elements of PACKED_SMI_ELEMENTS or
412 // HOLEY_SMI_ELEMENTS ElementsKind.
413 DECL_GETTER(HasSmiElements, bool)
414 // Returns true if an object has elements of PACKED_ELEMENTS or
415 // HOLEY_ELEMENTS ElementsKind.
416 DECL_GETTER(HasObjectElements, bool)
417 // Returns true if an object has elements of PACKED_SMI_ELEMENTS,
418 // HOLEY_SMI_ELEMENTS, PACKED_ELEMENTS, or HOLEY_ELEMENTS.
419 DECL_GETTER(HasSmiOrObjectElements, bool)
420 // Returns true if an object has any of the "fast" elements kinds.
421 DECL_GETTER(HasFastElements, bool)
422 // Returns true if an object has any of the PACKED elements kinds.
423 DECL_GETTER(HasFastPackedElements, bool)
424 // Returns true if an object has elements of PACKED_DOUBLE_ELEMENTS or
425 // HOLEY_DOUBLE_ELEMENTS ElementsKind.
426 DECL_GETTER(HasDoubleElements, bool)
427 // Returns true if an object has elements of HOLEY_SMI_ELEMENTS,
428 // HOLEY_DOUBLE_ELEMENTS, or HOLEY_ELEMENTS ElementsKind.
429 DECL_GETTER(HasHoleyElements, bool)
430 DECL_GETTER(HasSloppyArgumentsElements, bool)
431 DECL_GETTER(HasStringWrapperElements, bool)
432 DECL_GETTER(HasDictionaryElements, bool)
433
434 // Returns true if an object has elements of PACKED_ELEMENTS
435 DECL_GETTER(HasPackedElements, bool)
436 DECL_GETTER(HasAnyNonextensibleElements, bool)
437 DECL_GETTER(HasSealedElements, bool)
438 DECL_GETTER(HasSharedArrayElements, bool)
439 DECL_GETTER(HasNonextensibleElements, bool)
440
441 DECL_GETTER(HasTypedArrayOrRabGsabTypedArrayElements, bool)
442
443 DECL_GETTER(HasFixedUint8ClampedElements, bool)
444 DECL_GETTER(HasFixedArrayElements, bool)
445 DECL_GETTER(HasFixedInt8Elements, bool)
446 DECL_GETTER(HasFixedUint8Elements, bool)
447 DECL_GETTER(HasFixedInt16Elements, bool)
448 DECL_GETTER(HasFixedUint16Elements, bool)
449 DECL_GETTER(HasFixedInt32Elements, bool)
450 DECL_GETTER(HasFixedUint32Elements, bool)
451 DECL_GETTER(HasFixedFloat16Elements, bool)
452 DECL_GETTER(HasFixedFloat32Elements, bool)
453 DECL_GETTER(HasFixedFloat64Elements, bool)
454 DECL_GETTER(HasFixedBigInt64Elements, bool)
455 DECL_GETTER(HasFixedBigUint64Elements, bool)
456
457 DECL_GETTER(HasFastArgumentsElements, bool)
458 DECL_GETTER(HasSlowArgumentsElements, bool)
459 DECL_GETTER(HasFastStringWrapperElements, bool)
460 DECL_GETTER(HasSlowStringWrapperElements, bool)
462
463 // Gets slow elements.
465
466 // Requires: HasFastElements().
468
471 Maybe<ShouldThrow> should_throw,
473
474 // The API currently still wants DefineOwnPropertyIgnoreAttributes to convert
475 // AccessorInfo objects to data fields. We allow FORCE_FIELD as an exception
476 // to the default behavior that calls the setter.
478
479 template <typename T, template <typename> typename HandleType>
480 requires(std::is_convertible_v<HandleType<T>, DirectHandle<T>>)
481 V8_WARN_UNUSED_RESULT static inline typename HandleType<Object>::MaybeType
483 LookupIterator* it, HandleType<T> value, PropertyAttributes attributes,
486
489 PropertyAttributes attributes, Maybe<ShouldThrow> should_throw,
492 StoreOrigin store_origin = StoreOrigin::kNamed);
493
498 PropertyAttributes attributes);
499
503 PropertyAttributes attributes);
504
505 // Equivalent to one of the above depending on whether |name| can be converted
506 // to an array index.
511 PropertyAttributes attributes = NONE);
512
513 // Adds or reconfigures a property to attributes NONE. It will fail when it
514 // cannot.
518 Maybe<ShouldThrow> should_throw = Just(kDontThrow));
519
520 V8_EXPORT_PRIVATE static void AddProperty(Isolate* isolate,
524 PropertyAttributes attributes);
525
526 // {name} must be a UTF-8 encoded, null-terminated string.
527 static void AddProperty(Isolate* isolate, DirectHandle<JSObject> object,
528 const char* name, DirectHandle<Object> value,
529 PropertyAttributes attributes);
530
532 DirectHandle<JSObject> receiver, uint32_t index,
533 DirectHandle<Object> value, PropertyAttributes attributes);
534
535 // Extend the receiver with a single fast property appeared first in the
536 // passed map. This also extends the property backing store if necessary.
539
540 // Migrates the given object to a map whose field representations are the
541 // lowest upper bound of all known representations for that field.
542 static void MigrateInstance(Isolate* isolate,
543 DirectHandle<JSObject> instance);
544
545 // Migrates the given object only if the target map is already available,
546 // or returns false if such a map is not yet available.
547 static bool TryMigrateInstance(Isolate* isolate,
548 DirectHandle<JSObject> instance);
549
550 // Sets the property value in a normalized object given (key, value, details).
551 // Handles the special representation of JS global objects.
555 PropertyDetails details);
557 uint32_t index, DirectHandle<Object> value,
558 PropertyDetails details);
559
561 bool enable_setup_mode = true);
564 WhereToStart where_to_start, Isolate* isolate);
566 Isolate* isolate);
568 DirectHandle<Map> new_map,
569 Isolate* isolate);
570 static bool UnregisterPrototypeUser(DirectHandle<Map> user, Isolate* isolate);
573
574 // Updates prototype chain tracking information when an object changes its
575 // map from |old_map| to |new_map|.
576 static void NotifyMapChange(DirectHandle<Map> old_map,
577 DirectHandle<Map> new_map, Isolate* isolate);
578
579 // Utility used by many Array builtins and runtime functions
580 static inline bool PrototypeHasNoElements(Isolate* isolate,
581 Tagged<JSObject> object);
582
583 // To be passed to PrototypeUsers::Compact.
585 int old_index, int new_index);
586
587 // Retrieve interceptors.
588 DECL_GETTER(GetNamedInterceptor, Tagged<InterceptorInfo>)
589 DECL_GETTER(GetIndexedInterceptor, Tagged<InterceptorInfo>)
590
591 // Used from JSReceiver.
596
597 // Defines an AccessorPair property on the given object.
603 PropertyAttributes attributes);
607
608 // Defines an AccessorInfo property on the given object.
612
613 // Check if a data property can be created on the object. It will fail with
614 // an error when it cannot.
616 Isolate* isolate, LookupIterator* it, DirectHandle<Object> value,
617 Maybe<ShouldThrow> should_throw);
618
619 // The result must be checked first for exceptions. If there's no exception,
620 // the output parameter |done| indicates whether the interceptor has a result
621 // or not.
623 LookupIterator* it, bool* done);
624
625 static void ValidateElements(Tagged<JSObject> object);
626
627 // Makes sure that this object can contain HeapObject as elements.
628 static inline void EnsureCanContainHeapObjectElements(
630
631 // Makes sure that this object can contain the specified elements.
632 // TSlot here is either ObjectSlot or FullObjectSlot.
633 template <typename TSlot>
634 static inline void EnsureCanContainElements(DirectHandle<JSObject> object,
635 TSlot elements, uint32_t count,
636 EnsureElementsMode mode);
637 static inline void EnsureCanContainElements(
639 uint32_t length, EnsureElementsMode mode);
641 JavaScriptArguments* arguments,
642 uint32_t arg_count,
643 EnsureElementsMode mode);
644
645 // Would we convert a fast elements array to dictionary mode given
646 // an access at key?
647 bool WouldConvertToSlowElements(uint32_t index);
648
649 static const uint32_t kMinAddedElementsCapacity = 16;
650
651 // Computes the new capacity when expanding the elements of a JSObject.
652 static constexpr uint32_t NewElementsCapacity(uint32_t old_capacity) {
653 // (old_capacity + 50%) + kMinAddedElementsCapacity
654 uint32_t new_capacity =
655 old_capacity + (old_capacity >> 1) + kMinAddedElementsCapacity;
656
657 // If we go past kMaxFixedArrayCapacity, but kMaxFixedArrayCapacity is still
658 // more than the old_capacity plus the minimum growth amount, limit the
659 // capacity to kMinAddedElementsCapacity.
660 if (new_capacity > kMaxFixedArrayCapacity &&
663 }
664 return new_capacity;
665 }
666
667 // These methods do not perform access checks!
668 template <AllocationSiteUpdateMode update_or_check =
671 ElementsKind to_kind);
672
673 // Lookup interceptors are used for handling properties controlled by host
674 // objects.
675 DECL_GETTER(HasNamedInterceptor, bool)
676 DECL_GETTER(HasIndexedInterceptor, bool)
677
678 // Support functions for v8 api (needed for correct interceptor behavior).
680 Isolate* isolate, DirectHandle<JSObject> object, DirectHandle<Name> name);
682 Isolate* isolate, DirectHandle<JSObject> object, uint32_t index);
684 Isolate* isolate, DirectHandle<JSObject> object, DirectHandle<Name> name);
685
686 // Get the header size for a JSObject. Used to compute the index of
687 // embedder fields as well as the number of embedder fields.
688 // The |function_has_prototype_slot| parameter is needed only for
689 // JSFunction objects.
691 InstanceType instance_type, bool function_has_prototype_slot = false);
692 static inline int GetHeaderSize(Tagged<Map> map);
693
694 static inline bool MayHaveEmbedderFields(Tagged<Map> map);
695 inline bool MayHaveEmbedderFields() const;
696
697 static inline int GetEmbedderFieldsStartOffset(Tagged<Map> map);
698 inline int GetEmbedderFieldsStartOffset();
699
700 static inline int GetEmbedderFieldCount(Tagged<Map> map);
701 inline int GetEmbedderFieldCount() const;
702 inline int GetEmbedderFieldOffset(int index);
703 inline Tagged<Object> GetEmbedderField(int index);
704 inline void SetEmbedderField(int index, Tagged<Object> value);
705 inline void SetEmbedderField(int index, Tagged<Smi> value);
706
707 // Returns true if this object is an Api object which can, if unmodified, be
708 // dropped during minor GC because the embedder can recreate it again later.
709 static inline bool IsDroppableApiObject(Tagged<Map>);
710 inline bool IsDroppableApiObject() const;
711
712 // Returns a new map with all transitions dropped from the object's current
713 // map and the ElementsKind set.
715 DirectHandle<JSObject> object, ElementsKind to_kind);
717 DirectHandle<JSObject> object, ElementsKind to_kind);
718
719 // Always use this to migrate an object to a new map.
720 // |expected_additional_properties| is only used for fast-to-slow transitions
721 // and ignored otherwise.
723 Isolate* isolate, DirectHandle<JSObject> object,
724 DirectHandle<Map> new_map, int expected_additional_properties = 0);
725
726 // Forces a prototype without any of the checks that the regular SetPrototype
727 // would do.
728 static void ForceSetPrototype(Isolate* isolate, DirectHandle<JSObject> object,
730
731 // Convert the object to use the canonical dictionary
732 // representation. If the object is expected to have additional properties
733 // added this number can be indicated to have the backing store allocated to
734 // an initial capacity for holding these properties.
736 Isolate* isolate, DirectHandle<JSObject> object,
737 PropertyNormalizationMode mode, int expected_additional_properties,
738 bool use_cache, const char* reason);
739
741 Isolate* isolate, DirectHandle<JSObject> object,
742 PropertyNormalizationMode mode, int expected_additional_properties,
743 const char* reason) {
744 const bool kUseCache = true;
745 NormalizeProperties(isolate, object, mode, expected_additional_properties,
746 kUseCache, reason);
747 }
748
749 // Convert and update the elements backing store to be a
750 // NumberDictionary dictionary. Returns the backing after conversion.
753
755
756 // Transform slow named properties to fast variants.
758 int unused_property_fields,
759 const char* reason);
760
761 // Access property in dictionary mode object at the given dictionary index.
764 InternalIndex dict_index);
765 // Same as above, but it will return {} if we would be reading out of the
766 // bounds of the object or if the dictionary is pending allocation. Use this
767 // version for concurrent access.
768 static std::optional<Tagged<Object>> DictionaryPropertyAt(
769 DirectHandle<JSObject> object, InternalIndex dict_index, Heap* heap);
770
771 // Access fast-case object properties at index.
772 static Handle<JSAny> FastPropertyAt(Isolate* isolate,
774 Representation representation,
775 FieldIndex index);
778 Representation representation,
779 FieldIndex index,
780 SeqCstAccessTag tag);
781 inline Tagged<JSAny> RawFastPropertyAt(FieldIndex index) const;
783 FieldIndex index) const;
785 SeqCstAccessTag tag) const;
787 FieldIndex index,
788 SeqCstAccessTag tag) const;
789
790 // See comment in the body of the method to understand the conditions
791 // in which this method is meant to be used, and what guarantees it
792 // provides against invalid reads from another thread during object
793 // mutation.
794 inline std::optional<Tagged<Object>> RawInobjectPropertyAt(
795 PtrComprCageBase cage_base, Tagged<Map> original_map,
796 FieldIndex index) const;
797
798 inline void FastPropertyAtPut(FieldIndex index, Tagged<Object> value,
800 inline void FastPropertyAtPut(FieldIndex index, Tagged<Object> value,
801 SeqCstAccessTag tag);
803 FieldIndex index, Tagged<Object> value,
806 Tagged<Object> value,
807 SeqCstAccessTag tag);
808 inline void WriteToField(InternalIndex descriptor, PropertyDetails details,
809 Tagged<Object> value);
810
812 Tagged<Object> value,
813 SeqCstAccessTag tag);
815 Tagged<Object> value,
816 SeqCstAccessTag tag);
818 Tagged<Object> expected,
819 Tagged<Object> value,
820 SeqCstAccessTag tag);
822 FieldIndex index, Tagged<Object> expected, Tagged<Object> value,
823 SeqCstAccessTag tag);
824
825 // Access to in object properties.
826 inline int GetInObjectPropertyOffset(int index);
827 inline Tagged<Object> InObjectPropertyAt(int index);
829 int index, Tagged<Object> value,
831
832 // Set the object's prototype (only JSReceiver and null are allowed values).
834 Isolate* isolate, DirectHandle<JSObject> object,
835 DirectHandle<Object> value, bool from_javascript,
836 ShouldThrow should_throw);
837
838 // Makes the object prototype immutable
839 // Never called from JavaScript
840 static void SetImmutableProto(Isolate* isolate,
842
843 // Initializes the body starting at |start_offset|. It is responsibility of
844 // the caller to initialize object header. Fill the pre-allocated fields with
845 // undefined_value and the rest with filler_map.
846 // Note: this call does not update write barrier, the caller is responsible
847 // to ensure that |filler_map| can be collected without WB here.
848 inline void InitializeBody(Tagged<Map> map, int start_offset,
849 bool is_slack_tracking_in_progress,
850 MapWord filler_map,
851 Tagged<Object> undefined_value);
852
853 // Check whether this object references another object
855
857 Isolate* isolate, DirectHandle<JSObject> object, IntegrityLevel lvl);
858
860 Isolate* isolate, DirectHandle<JSObject> object,
861 ShouldThrow should_throw);
862
863 static bool IsExtensible(Isolate* isolate, DirectHandle<JSObject> object);
864
866 DirectHandle<Object> options, DirectHandle<String> option_name,
867 Isolate* isolate);
868
869 // Dispatched behavior.
870 void JSObjectShortPrint(StringStream* accumulator);
873#ifdef OBJECT_PRINT
874 bool PrintProperties(std::ostream& os);
875 void PrintElements(std::ostream& os);
876#endif
877#if defined(DEBUG) || defined(OBJECT_PRINT)
878 void PrintTransitions(std::ostream& os);
879#endif
880
881 static void PrintElementsTransition(
882 FILE* file, DirectHandle<JSObject> object, ElementsKind from_kind,
883 DirectHandle<FixedArrayBase> from_elements, ElementsKind to_kind,
884 DirectHandle<FixedArrayBase> to_elements);
885
886 void PrintInstanceMigration(FILE* file, Tagged<Map> original_map,
887 Tagged<Map> new_map);
888
889#ifdef DEBUG
890 // Structure for collecting spill information about JSObjects.
891 class SpillInformation {
892 public:
893 void Clear();
894 void Print();
895 int number_of_objects_;
896 int number_of_objects_with_fast_properties_;
897 int number_of_objects_with_fast_elements_;
898 int number_of_fast_used_fields_;
899 int number_of_fast_unused_fields_;
900 int number_of_slow_used_properties_;
901 int number_of_slow_unused_properties_;
902 int number_of_fast_used_elements_;
903 int number_of_fast_unused_elements_;
904 int number_of_slow_used_elements_;
905 int number_of_slow_unused_elements_;
906 };
907
908 void IncrementSpillStatistics(Isolate* isolate, SpillInformation* info);
909#endif
910
911#ifdef VERIFY_HEAP
912 // If a GC was caused while constructing this object, the elements pointer
913 // may point to a one pointer filler map. The object won't be rooted, but
914 // our heap verification code could stumble across it.
915 V8_EXPORT_PRIVATE bool ElementsAreSafeToExamine(
916 PtrComprCageBase cage_base) const;
917#endif
918
920
921 // Maximal number of elements (numbered 0 .. kMaxElementCount - 1).
922 // Also maximal value of JSArray's length property.
923 static constexpr uint32_t kMaxElementCount = kMaxUInt32;
924 static constexpr uint32_t kMaxElementIndex = kMaxElementCount - 1;
925
926 // Constants for heuristics controlling conversion of fast elements
927 // to slow elements.
928
929 // Maximal gap that can be introduced by adding an element beyond
930 // the current elements length.
931 static const uint32_t kMaxGap = 1024;
932
933 // Maximal length of fast elements array that won't be checked for
934 // being dense enough on expansion.
935 static const int kMaxUncheckedFastElementsLength = 5000;
936
937 // Same as above but for old arrays. This limit is more strict. We
938 // don't want to be wasteful with long lived objects.
940
941 // This constant applies only to the initial map of "global.Object" and
942 // not to arbitrary other JSObject maps.
944
945 static const int kMaxInstanceSize = 255 * kTaggedSize;
946 // kMaxInstanceSize in words must fit in one byte.
947 static_assert((kMaxInstanceSize >> kTaggedSizeLog2) <= kMaxUInt8);
948
949 static const int kMapCacheSize = 128;
950
951 // When extending the backing storage for property values, we increase
952 // its size by more than the 1 entry necessary, so sequentially adding fields
953 // to the same object requires fewer allocations and copies.
954 static const int kFieldsAdded = 3;
955 static_assert(kMaxNumberOfDescriptors + kFieldsAdded <=
957
958 static_assert(kHeaderSize == Internals::kJSObjectHeaderSize);
959 static const int kMaxInObjectProperties =
960 (kMaxInstanceSize - kHeaderSize) >> kTaggedSizeLog2;
962
965 static const int kMaxEmbedderFields =
967 static_assert(kHeaderSize +
970
972 (kMaxInstanceSize - kHeaderSize - kCppHeapPointerSlotSize) >>
974 static constexpr int kMaxJSApiObjectEmbedderFields =
975 (kMaxFirstInobjectPropertyOffset - kHeaderSize -
978
979 class BodyDescriptor;
980
981 class FastBodyDescriptor;
982
983 // Gets the number of currently used elements.
985
986 template <typename Dictionary>
987 static void ApplyAttributesToDictionary(Isolate* isolate, ReadOnlyRoots roots,
988 DirectHandle<Dictionary> dictionary,
989 const PropertyAttributes attributes);
990
991 private:
992 friend class JSReceiver;
993 friend class Object;
994
995 // Used from Object::GetProperty().
998
1001 Maybe<ShouldThrow> should_throw);
1002
1005
1008
1009 // Helper for fast versions of preventExtensions, seal, and freeze.
1010 // attrs is one of NONE, SEALED, or FROZEN (depending on the operation).
1011 template <PropertyAttributes attrs>
1013 Isolate* isolate, DirectHandle<JSObject> object,
1014 ShouldThrow should_throw);
1015
1017 FieldIndex index, Tagged<Object> expected, Tagged<Object> value,
1018 SeqCstAccessTag tag);
1019
1021};
1022
1023// A JSObject created through the public api which wraps an external pointer.
1024// See v8::External.
1026 : public TorqueGeneratedJSExternalObject<JSExternalObject, JSObject> {
1027 public:
1028 // [value]: field containing the pointer value.
1030
1031 static constexpr int kEndOfTaggedFieldsOffset = JSObject::kHeaderSize;
1032
1034
1035 class BodyDescriptor;
1036
1037 private:
1039};
1040
1041// An abstract superclass for JSObjects that may contain EmbedderDataSlots.
1043 : public TorqueGeneratedJSObjectWithEmbedderSlots<JSObjectWithEmbedderSlots,
1044 JSObject> {
1045 public:
1046 static_assert(kHeaderSize == JSObject::kHeaderSize);
1048};
1049
1050// An abstract superclass for JSObjects that may contain EmbedderDataSlots and
1051// are used as API wrapper objects.
1053 : public TorqueGeneratedJSAPIObjectWithEmbedderSlots<
1054 JSAPIObjectWithEmbedderSlots, JSObject> {
1055 public:
1056 class BodyDescriptor;
1057
1059};
1060
1061// An abstract superclass for JSObjects that may have elements while having an
1062// empty fixed array as elements backing store. It doesn't carry any
1063// functionality but allows function classes to be identified in the type
1064// system.
1066 : public TorqueGeneratedJSCustomElementsObject<JSCustomElementsObject,
1067 JSObject> {
1068 public:
1069 static_assert(kHeaderSize == JSObject::kHeaderSize);
1071};
1072
1073// An abstract superclass for JSObjects that require non-standard element
1074// access. It doesn't carry any functionality but allows function classes to be
1075// identified in the type system.
1076// These may also contain EmbedderDataSlots, but can't currently inherit from
1077// JSAPIObjectWithEmbedderSlots due to instance_type constraints.
1079 : public TorqueGeneratedJSSpecialObject<JSSpecialObject,
1080 JSCustomElementsObject> {
1081 public:
1083};
1084
1085// Helper union that doesn't actually exist as type. Use by value.
1087 public:
1089
1090 template <CppHeapPointerTag tag>
1092 void*);
1093 V8_INLINE void SetCppHeapWrappable(IsolateForPointerCompression isolate,
1094 void*, CppHeapPointerTag tag);
1095 template <CppHeapPointerTag lower_bound, CppHeapPointerTag upper_bound>
1097 IsolateForPointerCompression isolate) const;
1098 V8_INLINE void* GetCppHeapWrappable(IsolateForPointerCompression isolate,
1099 CppHeapPointerTagRange tag_range) const;
1100
1101 private:
1102 static_assert(JSAPIObjectWithEmbedderSlots::kCppHeapWrappableOffset ==
1103 JSSpecialObject::kCppHeapWrappableOffset);
1104 static constexpr int kCppHeapWrappableOffset =
1105 JSAPIObjectWithEmbedderSlots::kCppHeapWrappableOffset;
1106
1108};
1109
1110// JSAccessorPropertyDescriptor is just a JSObject with a specific initial
1111// map. This initial map adds in-object properties for "get", "set",
1112// "enumerable" and "configurable" properties, as assigned by the
1113// FromPropertyDescriptor function for regular accessor properties.
1115 public:
1116 // Layout description.
1117#define JS_ACCESSOR_PROPERTY_DESCRIPTOR_FIELDS(V) \
1118 V(kGetOffset, kTaggedSize) \
1119 V(kSetOffset, kTaggedSize) \
1120 V(kEnumerableOffset, kTaggedSize) \
1121 V(kConfigurableOffset, kTaggedSize) \
1122 /* Total size. */ \
1123 V(kSize, 0)
1124
1125 DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
1127#undef JS_ACCESSOR_PROPERTY_DESCRIPTOR_FIELDS
1128
1129 // Indices of in-object properties.
1130 static const int kGetIndex = 0;
1131 static const int kSetIndex = 1;
1132 static const int kEnumerableIndex = 2;
1133 static const int kConfigurableIndex = 3;
1134
1135 private:
1137};
1138
1139// JSDataPropertyDescriptor is just a JSObject with a specific initial map.
1140// This initial map adds in-object properties for "value", "writable",
1141// "enumerable" and "configurable" properties, as assigned by the
1142// FromPropertyDescriptor function for regular data properties.
1144 public:
1145 // Layout description.
1146#define JS_DATA_PROPERTY_DESCRIPTOR_FIELDS(V) \
1147 V(kValueOffset, kTaggedSize) \
1148 V(kWritableOffset, kTaggedSize) \
1149 V(kEnumerableOffset, kTaggedSize) \
1150 V(kConfigurableOffset, kTaggedSize) \
1151 /* Total size. */ \
1152 V(kSize, 0)
1153
1154 DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
1156#undef JS_DATA_PROPERTY_DESCRIPTOR_FIELDS
1157
1158 // Indices of in-object properties.
1159 static const int kValueIndex = 0;
1160 static const int kWritableIndex = 1;
1161 static const int kEnumerableIndex = 2;
1162 static const int kConfigurableIndex = 3;
1163
1164 private:
1166};
1167
1168// JSIteratorResult is just a JSObject with a specific initial map.
1169// This initial map adds in-object properties for "done" and "value",
1170// as specified by ES6 section 25.1.1.3 The IteratorResult Interface.
1172 public:
1174
1176
1177 // Layout description.
1178#define JS_ITERATOR_RESULT_FIELDS(V) \
1179 V(kValueOffset, kTaggedSize) \
1180 V(kDoneOffset, kTaggedSize) \
1181 /* Total size. */ \
1182 V(kSize, 0)
1183
1184 DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
1186#undef JS_ITERATOR_RESULT_FIELDS
1187
1188 // Indices of in-object properties.
1189 static const int kValueIndex = 0;
1190 static const int kDoneIndex = 1;
1191
1193};
1194
1195// JSGlobalProxy's prototype must be a JSGlobalObject or null,
1196// and the prototype is hidden. JSGlobalProxy always delegates
1197// property accesses to its prototype if the prototype is not null.
1198//
1199// A JSGlobalProxy can be reinitialized which will preserve its identity.
1200//
1201// Accessing a JSGlobalProxy requires security check.
1202
1204 : public TorqueGeneratedJSGlobalProxy<JSGlobalProxy, JSSpecialObject> {
1205 public:
1206 inline bool IsDetachedFrom(Tagged<JSGlobalObject> global) const;
1207 V8_EXPORT_PRIVATE bool IsDetached();
1208
1209 static int SizeWithEmbedderFields(int embedder_field_count);
1210
1211 // Dispatched behavior.
1214
1216};
1217
1218// JavaScript global object.
1220 : public TorqueGeneratedJSGlobalObject<JSGlobalObject, JSSpecialObject> {
1221 public:
1223
1224 static void InvalidatePropertyCell(DirectHandle<JSGlobalObject> object,
1225 DirectHandle<Name> name);
1226
1227 inline bool IsDetached();
1229
1230 // Dispatched behavior.
1233
1235};
1236
1237// Representation for JS Wrapper objects, String, Number, Boolean, etc.
1239 : public TorqueGeneratedJSPrimitiveWrapper<JSPrimitiveWrapper,
1240 JSCustomElementsObject> {
1241 public:
1242 // Dispatched behavior.
1244
1246};
1247
1248class DateCache;
1249
1250// Representation for JS date objects.
1251class JSDate : public TorqueGeneratedJSDate<JSDate, JSObject> {
1252 public:
1255 double tv);
1256
1257 // Returns the time value (UTC) identifying the current time in milliseconds.
1258 static int64_t CurrentTimeValue(Isolate* isolate);
1259
1260 // Returns the date field with the specified index.
1261 // See FieldIndex for the list of date fields.
1262 // Arguments and result are raw Address values because this is called
1263 // via ExternalReference.
1264 // {raw_date} is a tagged Object pointer.
1265 // {smi_index} is a tagged Smi.
1266 // The return value is a tagged Object pointer.
1267 static Address GetField(Isolate* isolate, Address raw_date,
1268 Address smi_index);
1269
1270 void SetValue(double v);
1271 void SetNanValue();
1272
1273 // Dispatched behavior.
1276
1277 // The order is important. It must be kept in sync with date macros
1278 // in macros.py.
1304
1305 class BodyDescriptor;
1306
1307 private:
1308 Tagged<Object> DoGetField(Isolate* isolate, FieldIndex index);
1309 Tagged<Object> GetUTCField(FieldIndex index, double value,
1310 DateCache* date_cache);
1311
1312 // Computes and caches the cacheable fields of the date.
1313 inline void SetCachedFields(int64_t local_time_ms, DateCache* date_cache);
1314
1316};
1317
1318// Representation of message objects used for error reporting through
1319// the API. The messages are formatted in JavaScript so this object is
1320// a real JavaScript object. The information used for formatting the
1321// error messages are not directly accessible from JavaScript to
1322// prevent leaking information to user code called during error
1323// formatting.
1325 : public TorqueGeneratedJSMessageObject<JSMessageObject, JSObject> {
1326 public:
1327 // [type]: the type of error message.
1328 inline MessageTemplate type() const;
1329 inline void set_type(MessageTemplate value);
1330
1331 // Initializes the source positions in the object if possible. Does nothing if
1332 // called more than once. If called when stack space is exhausted, then the
1333 // source positions will be not be set and calling it again when there is more
1334 // stack space will not have any effect.
1335 static inline void EnsureSourcePositionsAvailable(
1336 Isolate* isolate, DirectHandle<JSMessageObject> message);
1337
1338 // Gets the start and end positions for the message.
1339 // EnsureSourcePositionsAvailable must have been called before calling these.
1340 inline int GetStartPosition() const;
1341 inline int GetEndPosition() const;
1342
1343 // Returns the line number for the error message (1-based), or
1344 // Message::kNoLineNumberInfo if the line cannot be determined.
1345 // EnsureSourcePositionsAvailable must have been called before calling this.
1346 V8_EXPORT_PRIVATE int GetLineNumber() const;
1347
1348 // Returns the offset of the given position within the containing line.
1349 // EnsureSourcePositionsAvailable must have been called before calling this.
1350 V8_EXPORT_PRIVATE int GetColumnNumber() const;
1351
1352 // Returns the source code
1353 V8_EXPORT_PRIVATE Tagged<String> GetSource() const;
1354
1355 // Returns the source code line containing the given source
1356 // position, or the empty string if the position is invalid.
1357 // EnsureSourcePositionsAvailable must have been called before calling this.
1358 DirectHandle<String> GetSourceLine() const;
1359
1360 DECL_INT_ACCESSORS(error_level)
1361
1362 // Dispatched behavior.
1364
1365 // TODO(v8:8989): [torque] Support marker constants.
1366 static const int kPointerFieldsEndOffset = kStartPositionOffset;
1367
1369 FixedBodyDescriptor<HeapObject::kMapOffset, kPointerFieldsEndOffset,
1370 kHeaderSize>;
1371
1372 private:
1373 friend class Factory;
1374
1375 inline bool DidEnsureSourcePositionsAvailable() const;
1376 static void V8_PRESERVE_MOST V8_EXPORT_PRIVATE InitializeSourcePositions(
1377 Isolate* isolate, DirectHandle<JSMessageObject> message);
1378
1379 // [shared]: optional SharedFunctionInfo that can be used to reconstruct the
1380 // source position if not available when the message was generated.
1381 DECL_ACCESSORS(shared_info, Tagged<Object>)
1382
1383 // [bytecode_offset]: optional offset using along with |shared| to generation
1384 // source positions.
1385 DECL_ACCESSORS(bytecode_offset, Tagged<Smi>)
1386
1387 // [start_position]: the start position in the script for the error message.
1388 DECL_INT_ACCESSORS(start_position)
1389
1390 // [end_position]: the end position in the script for the error message.
1391 DECL_INT_ACCESSORS(end_position)
1392
1393 DECL_INT_ACCESSORS(raw_type)
1394
1395 // Hide generated accessors; custom accessors are named "raw_type".
1396 DECL_INT_ACCESSORS(message_type)
1397
1399};
1400
1401// The [Async-from-Sync Iterator] object
1402// (proposal-async-iteration/#sec-async-from-sync-iterator-objects)
1403// An object which wraps an ordinary Iterator and converts it to behave
1404// according to the Async Iterator protocol.
1405// (See https://tc39.github.io/proposal-async-iteration/#sec-iteration)
1407 : public TorqueGeneratedJSAsyncFromSyncIterator<JSAsyncFromSyncIterator,
1408 JSObject> {
1409 public:
1411
1412 // Async-from-Sync Iterator instances are ordinary objects that inherit
1413 // properties from the %AsyncFromSyncIteratorPrototype% intrinsic object.
1414 // Async-from-Sync Iterator instances are initially created with the internal
1415 // slots listed in Table 4.
1416 // (proposal-async-iteration/#table-async-from-sync-iterator-internal-slots)
1417
1419};
1420
1422 : public TorqueGeneratedJSStringIterator<JSStringIterator, JSObject> {
1423 public:
1424 // Dispatched behavior.
1427
1429};
1430
1431// The valid iterator wrapper is the wrapper object created by
1432// Iterator.from(obj), which attempts to wrap iterator-like objects into an
1433// actual iterator with %Iterator.prototype%.
1435 : public TorqueGeneratedJSValidIteratorWrapper<JSValidIteratorWrapper,
1436 JSObject> {
1437 public:
1439
1441};
1442
1443// JSPromiseWithResolversResult is just a JSObject with a specific initial map.
1444// This initial map adds in-object properties for "promise", "resolve", and
1445// "reject", in that order.
1447 public:
1449
1451
1453
1454 // Layout description.
1455#define JS_PROMISE_WITHRESOLVERS_RESULT_FIELDS(V) \
1456 V(kPromiseOffset, kTaggedSize) \
1457 V(kResolveOffset, kTaggedSize) \
1458 V(kRejectOffset, kTaggedSize) \
1459 /* Total size. */ \
1460 V(kSize, 0)
1461
1462 DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
1464#undef JS_PROMISE_WITHRESOLVERS_RESULT_FIELDS
1465
1466 // Indices of in-object properties.
1467 static const int kPromiseIndex = 0;
1468 static const int kResolveIndex = 1;
1469 static const int kRejectIndex = 2;
1470
1472};
1473
1474} // namespace v8::internal
1475
1477
1478#endif // V8_OBJECTS_JS_OBJECTS_H_
Builtins::Kind kind
Definition builtins.cc:40
PropertyT * getter
static constexpr U kMask
Definition bit-field.h:41
static const int kJSObjectHeaderSize
DISALLOW_IMPLICIT_CONSTRUCTORS(JSAccessorPropertyDescriptor)
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JS_ACCESSOR_PROPERTY_DESCRIPTOR_FIELDS) static const int kGetIndex=0
V8_INLINE void SetCppHeapWrappable(IsolateForPointerCompression isolate, void *)
V8_INLINE void * GetCppHeapWrappable(IsolateForPointerCompression isolate) const
V8_INLINE JSApiWrapper(Tagged< JSObject > object)
Tagged< JSObject > object_
DISALLOW_IMPLICIT_CONSTRUCTORS(JSDataPropertyDescriptor)
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JS_DATA_PROPERTY_DESCRIPTOR_FIELDS) static const int kValueIndex=0
static constexpr int kEndOfTaggedFieldsOffset
OBJECT_CONSTRUCTORS(JSIteratorResult, JSObject)
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JS_ITERATOR_RESULT_FIELDS) static const int kValueIndex=0
static bool UnregisterPrototypeUser(DirectHandle< Map > user, Isolate *isolate)
static V8_EXPORT_PRIVATE DirectHandle< NumberDictionary > NormalizeElements(DirectHandle< JSObject > object)
static bool IsExtensible(Isolate *isolate, DirectHandle< JSObject > object)
Tagged< Object > RawFastPropertyAtCompareAndSwapInternal(FieldIndex index, Tagged< Object > expected, Tagged< Object > value, SeqCstAccessTag tag)
bool MayHaveEmbedderFields() const
static bool PrototypeHasNoElements(Isolate *isolate, Tagged< JSObject > object)
static V8_WARN_UNUSED_RESULT Maybe< bool > PreventExtensionsWithTransition(Isolate *isolate, DirectHandle< JSObject > object, ShouldThrow should_throw)
static const int kMaxInObjectProperties
Definition js-objects.h:959
void WriteToField(InternalIndex descriptor, PropertyDetails details, Tagged< Object > value)
static V8_WARN_UNUSED_RESULT MaybeHandle< JSAny > GetPropertyWithInterceptor(LookupIterator *it, bool *done)
static void InvalidatePrototypeValidityCell(Tagged< JSGlobalObject > global)
static V8_WARN_UNUSED_RESULT HandleType< Object >::MaybeType DefineOwnPropertyIgnoreAttributes(LookupIterator *it, HandleType< T > value, PropertyAttributes attributes, AccessorInfoHandling handling=DONT_FORCE_FIELD, EnforceDefineSemantics semantics=EnforceDefineSemantics::kSet)
void RequireSlowElements(Tagged< NumberDictionary > dictionary)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT MaybeDirectHandle< Object > DefinePropertyOrElementIgnoreAttributes(DirectHandle< JSObject > object, DirectHandle< Name > name, DirectHandle< Object > value, PropertyAttributes attributes=NONE)
static void SetNormalizedElement(DirectHandle< JSObject > object, uint32_t index, DirectHandle< Object > value, PropertyDetails details)
static V8_EXPORT_PRIVATE void AddProperty(Isolate *isolate, DirectHandle< JSObject > object, DirectHandle< Name > name, DirectHandle< Object > value, PropertyAttributes attributes)
static V8_EXPORT_PRIVATE void MigrateSlowToFast(DirectHandle< JSObject > object, int unused_property_fields, const char *reason)
Tagged< Object > RawFastInobjectPropertyAtCompareAndSwap(FieldIndex index, Tagged< Object > expected, Tagged< Object > value, SeqCstAccessTag tag)
static V8_EXPORT_PRIVATE void NormalizeProperties(Isolate *isolate, DirectHandle< JSObject > object, PropertyNormalizationMode mode, int expected_additional_properties, const char *reason)
Definition js-objects.h:740
bool ReferencesObjectFromElements(Tagged< FixedArray > elements, ElementsKind kind, Tagged< Object > object)
Tagged< Object > RawFastPropertyAtSwap(FieldIndex index, Tagged< Object > value, SeqCstAccessTag tag)
static void OptimizeAsPrototype(DirectHandle< JSObject > object, bool enable_setup_mode=true)
int GetEmbedderFieldCount() const
Tagged< Object > InObjectPropertyAtPut(int index, Tagged< Object > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
static const int kFieldsAdded
Definition js-objects.h:954
static V8_WARN_UNUSED_RESULT Maybe< InterceptorResult > SetPropertyWithInterceptor(LookupIterator *it, Maybe< ShouldThrow > should_throw, DirectHandle< Object > value)
Tagged< Object > RawFastInobjectPropertyAtSwap(FieldIndex index, Tagged< Object > value, SeqCstAccessTag tag)
static Handle< JSAny > FastPropertyAt(Isolate *isolate, DirectHandle< JSObject > object, Representation representation, FieldIndex index)
static const int kMaxInstanceSize
Definition js-objects.h:945
static void ApplyAttributesToDictionary(Isolate *isolate, ReadOnlyRoots roots, DirectHandle< Dictionary > dictionary, const PropertyAttributes attributes)
void JSObjectShortPrint(StringStream *accumulator)
static MaybeDirectHandle< JSObject > NewWithMap(Isolate *isolate, DirectHandle< Map > initial_map, DirectHandle< AllocationSite > site, NewJSObjectType=NewJSObjectType::kNoAPIWrapper)
Tagged< JSAny > RawFastPropertyAt(FieldIndex index) const
static void LazyRegisterPrototypeUser(DirectHandle< Map > user, Isolate *isolate)
static void ValidateElements(Tagged< JSObject > object)
static V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT MaybeHandle< JSObject > New(DirectHandle< JSFunction > constructor, DirectHandle< JSReceiver > new_target, DirectHandle< AllocationSite > site, NewJSObjectType=NewJSObjectType::kNoAPIWrapper)
int GetInObjectPropertyOffset(int index)
static V8_WARN_UNUSED_RESULT Maybe< PropertyAttributes > GetPropertyAttributesWithInterceptor(LookupIterator *it)
std::optional< Tagged< Object > > RawInobjectPropertyAt(PtrComprCageBase cage_base, Tagged< Map > original_map, FieldIndex index) const
static void ForceSetPrototype(Isolate *isolate, DirectHandle< JSObject > object, DirectHandle< JSPrototype > proto)
static Handle< Object > DictionaryPropertyAt(Isolate *isolate, DirectHandle< JSObject > object, InternalIndex dict_index)
static constexpr uint32_t NewElementsCapacity(uint32_t old_capacity)
Definition js-objects.h:652
static V8_WARN_UNUSED_RESULT Maybe< bool > TestIntegrityLevel(Isolate *isolate, DirectHandle< JSObject > object, IntegrityLevel lvl)
static const int kMapCacheSize
Definition js-objects.h:949
static void EnsureCanContainElements(DirectHandle< JSObject > object, TSlot elements, uint32_t count, EnsureElementsMode mode)
static void UpdatePrototypeUserRegistration(DirectHandle< Map > old_map, DirectHandle< Map > new_map, Isolate *isolate)
static Tagged< Map > InvalidatePrototypeChains(Tagged< Map > map)
static constexpr uint32_t kMaxElementIndex
Definition js-objects.h:924
bool ReferencesObject(Tagged< Object > obj)
static constexpr int kMaxJSApiObjectInObjectProperties
Definition js-objects.h:971
static void EnsureCanContainHeapObjectElements(DirectHandle< JSObject > obj)
static V8_WARN_UNUSED_RESULT Maybe< bool > HasRealNamedCallbackProperty(Isolate *isolate, DirectHandle< JSObject > object, DirectHandle< Name > name)
static void SetImmutableProto(Isolate *isolate, DirectHandle< JSObject > object)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< Object > V8_EXPORT_PRIVATE SetOwnPropertyIgnoreAttributes(DirectHandle< JSObject > object, DirectHandle< Name > name, DirectHandle< Object > value, PropertyAttributes attributes)
Tagged< Object > InObjectPropertyAt(int index)
static V8_WARN_UNUSED_RESULT Maybe< bool > SetPrototype(Isolate *isolate, DirectHandle< JSObject > object, DirectHandle< Object > value, bool from_javascript, ShouldThrow should_throw)
Tagged< FixedArrayBase > elements(PtrComprCageBase cage_base, AcquireLoadTag tag) const =delete
static const int kInitialGlobalObjectUnusedPropertiesCount
Definition js-objects.h:943
static V8_WARN_UNUSED_RESULT Maybe< bool > HasRealElementProperty(Isolate *isolate, DirectHandle< JSObject > object, uint32_t index)
static void SetNormalizedProperty(DirectHandle< JSObject > object, DirectHandle< Name > name, DirectHandle< Object > value, PropertyDetails details)
static void NotifyMapChange(DirectHandle< Map > old_map, DirectHandle< Map > new_map, Isolate *isolate)
static const int kMaxFirstInobjectPropertyOffset
Definition js-objects.h:963
static V8_EXPORT_PRIVATE void NormalizeProperties(Isolate *isolate, DirectHandle< JSObject > object, PropertyNormalizationMode mode, int expected_additional_properties, bool use_cache, const char *reason)
static void SetMapAndElements(DirectHandle< JSObject > object, DirectHandle< Map > map, DirectHandle< FixedArrayBase > elements)
static const uint32_t kMaxGap
Definition js-objects.h:931
void RawFastInobjectPropertyAtPut(FieldIndex index, Tagged< Object > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
static const int kMaxEmbedderFields
Definition js-objects.h:965
static V8_WARN_UNUSED_RESULT Maybe< bool > CheckIfCanDefineAsConfigurable(Isolate *isolate, LookupIterator *it, DirectHandle< Object > value, Maybe< ShouldThrow > should_throw)
static V8_EXPORT_PRIVATE Maybe< bool > AddDataElement(DirectHandle< JSObject > receiver, uint32_t index, DirectHandle< Object > value, PropertyAttributes attributes)
static void PrototypeRegistryCompactionCallback(Tagged< HeapObject > value, int old_index, int new_index)
Tagged< Object > RawFastPropertyAtCompareAndSwap(FieldIndex index, Tagged< Object > expected, Tagged< Object > value, SeqCstAccessTag tag)
static void MakePrototypesFast(DirectHandle< Object > receiver, WhereToStart where_to_start, Isolate *isolate)
static V8_EXPORT_PRIVATE void TransitionElementsKind(DirectHandle< JSObject > object, ElementsKind to_kind)
static void PrintElementsTransition(FILE *file, DirectHandle< JSObject > object, ElementsKind from_kind, DirectHandle< FixedArrayBase > from_elements, ElementsKind to_kind, DirectHandle< FixedArrayBase > to_elements)
static V8_EXPORT_PRIVATE MaybeDirectHandle< Object > DefineOwnAccessorIgnoreAttributes(DirectHandle< JSObject > object, DirectHandle< Name > name, DirectHandle< Object > getter, DirectHandle< Object > setter, PropertyAttributes attributes)
static V8_EXPORT_PRIVATE void MigrateToMap(Isolate *isolate, DirectHandle< JSObject > object, DirectHandle< Map > new_map, int expected_additional_properties=0)
bool WouldConvertToSlowElements(uint32_t index)
static V8_WARN_UNUSED_RESULT MaybeHandle< JSAny > GetPropertyWithFailedAccessCheck(LookupIterator *it)
static constexpr int kMaxJSApiObjectEmbedderFields
Definition js-objects.h:974
static constexpr uint32_t kMaxElementCount
Definition js-objects.h:923
static bool IsUnmodifiedApiObject(FullObjectSlot o)
static DirectHandle< Map > GetElementsTransitionMap(DirectHandle< JSObject > object, ElementsKind to_kind)
Tagged< Object > SlowReverseLookup(Tagged< Object > value)
static V8_WARN_UNUSED_RESULT Maybe< InterceptorResult > DeletePropertyWithInterceptor(LookupIterator *it, ShouldThrow should_throw)
static MaybeDirectHandle< Object > ReadFromOptionsBag(DirectHandle< Object > options, DirectHandle< String > option_name, Isolate *isolate)
static const int kMaxUncheckedFastElementsLength
Definition js-objects.h:935
static V8_WARN_UNUSED_RESULT Maybe< bool > SetPropertyWithFailedAccessCheck(LookupIterator *it, DirectHandle< Object > value, Maybe< ShouldThrow > should_throw)
static void MigrateInstance(Isolate *isolate, DirectHandle< JSObject > instance)
static bool UpdateAllocationSite(DirectHandle< JSObject > object, ElementsKind to_kind)
static bool TryMigrateInstance(Isolate *isolate, DirectHandle< JSObject > instance)
bool IsDroppableApiObject() const
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< Object > SetAccessor(DirectHandle< JSObject > object, DirectHandle< Name > name, DirectHandle< AccessorInfo > info, PropertyAttributes attributes)
static void AllocateStorageForMap(DirectHandle< JSObject > object, DirectHandle< Map > map)
void PrintInstanceMigration(FILE *file, Tagged< Map > original_map, Tagged< Map > new_map)
void set_elements(Tagged< FixedArrayBase > value, ReleaseStoreTag tag, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)=delete
void FastPropertyAtPut(FieldIndex index, Tagged< Object > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
static V8_WARN_UNUSED_RESULT Maybe< bool > HasRealNamedProperty(Isolate *isolate, DirectHandle< JSObject > object, DirectHandle< Name > name)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< JSObject > ObjectCreate(Isolate *isolate, DirectHandle< JSPrototype > prototype)
static V8_WARN_UNUSED_RESULT Maybe< bool > CreateDataProperty(Isolate *isolate, DirectHandle< JSObject > object, PropertyKey key, DirectHandle< Object > value, Maybe< ShouldThrow > should_throw=Just(kDontThrow))
static V8_WARN_UNUSED_RESULT Maybe< bool > PreventExtensions(Isolate *isolate, DirectHandle< JSObject > object, ShouldThrow should_throw)
static void ReoptimizeIfPrototype(DirectHandle< JSObject > object)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< Object > SetOwnElementIgnoreAttributes(DirectHandle< JSObject > object, size_t index, DirectHandle< Object > value, PropertyAttributes attributes)
static void EnsureWritableFastElements(DirectHandle< JSObject > object)
int GetEmbedderFieldOffset(int index)
static const uint32_t kMinAddedElementsCapacity
Definition js-objects.h:649
static const int kMaxUncheckedOldFastElementsLength
Definition js-objects.h:939
void SetEmbedderField(int index, Tagged< Object > value)
Tagged< Object > GetEmbedderField(int index)
void InitializeBody(Tagged< Map > map, int start_offset, bool is_slack_tracking_in_progress, MapWord filler_map, Tagged< Object > undefined_value)
static V8_WARN_UNUSED_RESULT Maybe< PropertyAttributes > GetPropertyAttributesWithFailedAccessCheck(LookupIterator *it)
static V8_EXPORT_PRIVATE int GetHeaderSize(InstanceType instance_type, bool function_has_prototype_slot=false)
OBJECT_CONSTRUCTORS(JSPromiseWithResolversResult, JSObject)
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JS_PROMISE_WITHRESOLVERS_RESULT_FIELDS) static const int kPromiseIndex=0
static const int kHashMask
Definition js-objects.h:353
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT Maybe< bool > GetOwnPropertyDescriptor(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Object > key, PropertyDescriptor *desc)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT Maybe< bool > DeletePropertyOrElement(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Name > name, LanguageMode language_mode=LanguageMode::kSloppy)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT Maybe< bool > SetPrototype(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Object > value, bool from_javascript, ShouldThrow should_throw)
bool HasProxyInPrototype(Isolate *isolate)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< FixedArray > OwnPropertyKeys(Isolate *isolate, DirectHandle< JSReceiver > object)
static V8_WARN_UNUSED_RESULT Maybe< bool > HasElement(Isolate *isolate, DirectHandle< JSReceiver > object, uint32_t index)
static V8_WARN_UNUSED_RESULT MaybeHandle< Object > GetElement(Isolate *isolate, DirectHandle< JSReceiver > receiver, uint32_t index)
static V8_WARN_UNUSED_RESULT Maybe< PropertyAttributes > GetOwnElementAttributes(Isolate *isolate, DirectHandle< JSReceiver > object, uint32_t index)
static V8_WARN_UNUSED_RESULT Maybe< bool > OrdinaryDefineOwnProperty(Isolate *isolate, DirectHandle< JSObject > object, DirectHandle< Object > key, PropertyDescriptor *desc, Maybe< ShouldThrow > should_throw)
static V8_WARN_UNUSED_RESULT Maybe< PropertyAttributes > GetOwnPropertyAttributes(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Name > name)
static Tagged< Smi > CreateIdentityHash(Isolate *isolate, Tagged< JSReceiver > key)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT Maybe< bool > DeleteProperty(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Name > name, LanguageMode language_mode=LanguageMode::kSloppy)
static V8_WARN_UNUSED_RESULT Maybe< bool > TestIntegrityLevel(Isolate *isolate, DirectHandle< JSReceiver > object, IntegrityLevel lvl)
static V8_WARN_UNUSED_RESULT Maybe< bool > SetIntegrityLevel(Isolate *isolate, DirectHandle< JSReceiver > object, IntegrityLevel lvl, ShouldThrow should_throw)
V8_EXPORT_PRIVATE Tagged< String > class_name()
static MaybeDirectHandle< NativeContext > GetFunctionRealm(DirectHandle< JSReceiver > receiver)
static V8_WARN_UNUSED_RESULT Maybe< PropertyAttributes > GetElementAttributes(Isolate *isolate, DirectHandle< JSReceiver > object, uint32_t index)
static V8_WARN_UNUSED_RESULT Maybe< bool > ValidateAndApplyPropertyDescriptor(Isolate *isolate, LookupIterator *it, bool extensible, PropertyDescriptor *desc, PropertyDescriptor *current, Maybe< ShouldThrow > should_throw, DirectHandle< Name > property_name)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT Maybe< bool > HasOwnProperty(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Name > name)
bool IsCodeLike(Isolate *isolate) const
V8_EXPORT_PRIVATE Tagged< Object > GetIdentityHash()
void initialize_properties(Isolate *isolate)
static V8_WARN_UNUSED_RESULT Maybe< bool > OrdinaryDefineOwnProperty(LookupIterator *it, PropertyDescriptor *desc, Maybe< ShouldThrow > should_throw)
static V8_WARN_UNUSED_RESULT Maybe< bool > PreventExtensions(Isolate *isolate, DirectHandle< JSReceiver > object, ShouldThrow should_throw)
static V8_WARN_UNUSED_RESULT Maybe< bool > HasInPrototypeChain(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Object > proto)
static V8_WARN_UNUSED_RESULT HandleType< Object >::MaybeType ToPrimitive(Isolate *isolate, HandleType< JSReceiver > receiver, ToPrimitiveHint hint=ToPrimitiveHint::kDefault)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< FixedArray > GetOwnValues(Isolate *isolate, DirectHandle< JSReceiver > object, PropertyFilter filter, bool try_fast_path=true)
static V8_WARN_UNUSED_RESULT Maybe< bool > DeleteElement(Isolate *isolate, DirectHandle< JSReceiver > object, uint32_t index, LanguageMode language_mode=LanguageMode::kSloppy)
static MaybeDirectHandle< JSPrototype > GetPrototype(Isolate *isolate, DirectHandle< JSReceiver > receiver)
static V8_WARN_UNUSED_RESULT Maybe< bool > CreateDataProperty(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Name > key, DirectHandle< Object > value, Maybe< ShouldThrow > should_throw)
static V8_WARN_UNUSED_RESULT Tagged< Object > DefineProperty(Isolate *isolate, DirectHandle< Object > object, DirectHandle< Object > name, Handle< Object > attributes)
static Handle< Object > GetDataProperty(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Name > name)
static V8_WARN_UNUSED_RESULT Maybe< bool > IsExtensible(Isolate *isolate, DirectHandle< JSReceiver > object)
static V8_WARN_UNUSED_RESULT HandleType< Object >::MaybeType OrdinaryToPrimitive(Isolate *isolate, DirectHandle< JSReceiver > receiver, OrdinaryToPrimitiveHint hint)
static V8_WARN_UNUSED_RESULT Maybe< PropertyAttributes > GetPropertyAttributes(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Name > name)
static V8_WARN_UNUSED_RESULT Maybe< bool > IsCompatiblePropertyDescriptor(Isolate *isolate, bool extensible, PropertyDescriptor *desc, PropertyDescriptor *current, DirectHandle< Name > property_name, Maybe< ShouldThrow > should_throw)
static V8_WARN_UNUSED_RESULT MaybeHandle< Object > GetProperty(Isolate *isolate, DirectHandle< JSReceiver > receiver, const char *key)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< FixedArray > GetOwnEntries(Isolate *isolate, DirectHandle< JSReceiver > object, PropertyFilter filter, bool try_fast_path=true)
static MaybeDirectHandle< JSFunction > GetConstructor(Isolate *isolate, DirectHandle< JSReceiver > receiver)
static V8_WARN_UNUSED_RESULT Maybe< bool > DefineOwnProperty(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Object > key, PropertyDescriptor *desc, Maybe< ShouldThrow > should_throw)
static void DeleteNormalizedProperty(DirectHandle< JSReceiver > object, InternalIndex entry)
static DirectHandle< String > GetConstructorName(Isolate *isolate, DirectHandle< JSReceiver > receiver)
static V8_WARN_UNUSED_RESULT Maybe< bool > CheckPrivateNameStore(LookupIterator *it, bool is_define)
static V8_WARN_UNUSED_RESULT Maybe< bool > SetOrCopyDataProperties(Isolate *isolate, DirectHandle< JSReceiver > target, DirectHandle< Object > source, PropertiesEnumerationMode mode, base::Vector< DirectHandle< Object > > excluded_properties={}, bool use_set=true)
static V8_EXPORT_PRIVATE MaybeHandle< NativeContext > GetContextForMicrotask(DirectHandle< JSReceiver > receiver)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT Maybe< bool > HasProperty(LookupIterator *it)
Definition js-objects.cc:98
V8_EXPORT_PRIVATE void SetIdentityHash(int masked_hash)
V8_EXPORT_PRIVATE Tagged< Smi > GetOrCreateIdentityHash(Isolate *isolate)
static V8_WARN_UNUSED_RESULT Maybe< bool > AddPrivateField(LookupIterator *it, DirectHandle< Object > value, Maybe< ShouldThrow > should_throw)
static V8_WARN_UNUSED_RESULT Maybe< bool > HasPropertyOrElement(Isolate *isolate, DirectHandle< JSReceiver > object, PropertyKey key)
V8_EXPORT_PRIVATE std::optional< Tagged< NativeContext > > GetCreationContext()
NEVER_READ_ONLY_SPACE void SetProperties(Tagged< HeapObject > properties)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< Object > DefineProperties(Isolate *isolate, DirectHandle< Object > object, DirectHandle< Object > properties)
DirectHandle< Object > new_target
Definition execution.cc:75
TNode< Object > receiver
#define JS_ACCESSOR_PROPERTY_DESCRIPTOR_FIELDS(V)
#define JS_PROMISE_WITHRESOLVERS_RESULT_FIELDS(V)
#define JS_ITERATOR_RESULT_FIELDS(V)
#define JS_DATA_PROPERTY_DESCRIPTOR_FIELDS(V)
PropertiesEnumerationMode
Definition globals.h:2856
constexpr int kTaggedSize
Definition globals.h:542
@ UPDATE_WRITE_BARRIER
Definition objects.h:55
constexpr int kMaxUInt8
Definition globals.h:378
OrdinaryToPrimitiveHint
Definition globals.h:1860
static const int kFirstInobjectPropertyOffsetBitCount
constexpr int kEmbedderDataSlotSize
Definition globals.h:664
constexpr int kTaggedSizeLog2
Definition globals.h:543
constexpr int kEmbedderDataSlotSizeInTaggedSlots
Definition globals.h:666
static const int kMaxNumberOfDescriptors
constexpr int kCppHeapPointerSlotSize
Definition globals.h:622
EnforceDefineSemantics
Definition objects.h:116
constexpr uint32_t kMaxUInt32
Definition globals.h:387
static constexpr int kMaxFixedArrayCapacity
Definition fixed-array.h:32
AllocationSiteUpdateMode
Definition globals.h:1940
!IsContextMap !IsContextMap native_context
Definition map-inl.h:877
PropertyNormalizationMode
Definition objects.h:60
IntegrityLevel
Definition v8-object.h:228
V8_INLINE Local< Primitive > Null(Isolate *isolate)
V8_INLINE Local< Primitive > Undefined(Isolate *isolate)
CppHeapPointerTag
Definition v8-sandbox.h:28
Maybe< T > Just(const T &t)
Definition v8-maybe.h:117
#define DECL_ACCESSORS(name,...)
#define DECL_GETTER(name,...)
#define DECL_EXTERNAL_POINTER_ACCESSORS(name, type)
#define DECL_VERIFIER(Name)
#define DECL_RELAXED_ACCESSORS(name,...)
#define NEVER_READ_ONLY_SPACE
#define DECL_RELAXED_GETTER(name,...)
#define DECL_PRINTER(Name)
#define DECL_RELEASE_ACQUIRE_ACCESSORS(name,...)
#define DECL_INT_ACCESSORS(name)
#define TQ_OBJECT_CONSTRUCTORS(Type)
#define V8_EXPORT_PRIVATE
Definition macros.h:460
#define V8_INLINE
Definition v8config.h:500
#define V8_WARN_UNUSED_RESULT
Definition v8config.h:671
#define V8_PRESERVE_MOST
Definition v8config.h:598
wasm::ValueType type