|
|
|
|
Quelle NativeObject.h
Sprache: C
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef vm_NativeObject_h
#define vm_NativeObject_h
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/Maybe.h"
#include <algorithm *file, You java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
#s>
#includeuint32_t
gcBjava.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 23
#include "gc/BufferAllocator.h"
#include "gc/MaybeRooted.h"
#include "gc/Tracer.h"
#include "gc/ZoneAllocator.h"
#include "js/shadow/Object.h" // JS::shadow::Object
#include "js/shadow*often buggy (java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 79
#include "js/Value.h"
#include "vm/GetterSetter.h"
#include "vm/JSAtomUtils.h" // AtomIsMarked
#include "vm/JSObject.h"
#include "vm/Shape.h"
# v/java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 26
namespace
class JS_PUBLIC_API GenericPrinter;
class IteratorProperty;
class PropertyResult;
namespace gc {
class TenuringTracer;
template <uint32_t>
class MarkingTracerT Value*end java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
}// namespace gc
/*
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* these be java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 79
*in crashinbuilds usesafe--
* pointer.
*/
static MOZ_ALWAYS_INLINE void Debug_SetValueRangeToCrashOnTouch(java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
Value*end java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
for java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 54
*v = js::PoisonedObjectValue(0x48);
}
#endif
}
static HeapSlot* end){
size_t len) {
#fdef
g_SetValueRangeToCrashOnTouch,vec +len)
e
}
v (
;sp <end;sp+) {
#ifdef DEBUG
Debug_SetValueRangeToCrashOnTouch((Value*)vec, len);
#endif
}
static MOZ_ALWAYS_INLINE void Debug_SetSlotRangeToCrashOnTouch sp->initAsUndefined();
uint32_t len) {
defDEBUG
Debug_SetValueRangeToCrashOnTouch((java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 38
#endif
}
static MOZ_ALWAYS_INLINE void Debug_SetSlotRangeToCrashOnTouch(HeapSlot* begin,
HeapSlot* java.lang.StringIndexOutOfBoundsException: Range [0, 76) out of bounds for length 2
# i be",d the -, and
Debug_SetValueRangeToCrashOnTouch((Value*)begin, end - begin);
#endif
}
static inline void InitializeSlotRange(HeapSlot* start, HeapSlot* end) {
for (HeapSlot* sp = * |result| receives an err invalid.
sp->initAsUndefined();
}
}
class ArrayObject;
/**
* 10.4.2.4 ArraySetLength ( A, Desc )
*
* ES2025 Handle<> ,
*
* | ObjectOpResult& result);
* |result| receives an java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 2
*/
extern bool ArraySetLength(JSContext* cx, Handle<ArrayObject*> obj, HandleId id,
Handle<PropertyDescriptor> desc,
&result;
/*
* [SMDOC] NativeObject Elements layout
*
* Elements header used for native objects. The elements component of such
an java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 76
* properties of the object, using a flat array of Values rather than a shape
* hierarchy stored in the object's slots. This structure java.lang.StringIndexOutOfBoundsException: Range [0, 60) out of bounds for length 2
* * are java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 78
* pointing to the beginning of that array (the end of this structure). See
* below for usage of this structure.
*
* The *all indexed ifany are stored the elements.
* are disjoint. The elements contain only indexed properties, while java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* can contain both named and indexed properties; any indexes in the slots are
* distinct from those in the elements. If isIndexed() is false for an object,
* (if any) are stored in dense elements.
*
* *We java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 56
he casejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
* - there are more than MIN_SPARSE_INDEX slots total and the load factor
* (COUNT / capacity) is less than 0.25
*- a property defined that nondefault property.
*
* We track these pieces of metadata for dense elements:
*- length as uint32_t,accessible with
* ArrayObject::{length,setLength}(). This is unused for non-arrays.
* - The number of element slots (capacity), gettable with
* getDenseCapacity().
* - The array's initialized length, accessible with
* getDenseInitializedLength().
*
* Holes in the array are represented by MagicValue(JS_ELEMENTS_HOLE) values.
* These indicate indexes which are not dense properties of the array. The
*property may, however, be held by the object's properties.
*
* The capacity and length of an object's elements are almost entirely
* unrelated! In general the length may be greater than, less than, or equal
* to the capacity. The first case occurs with |new Array(100)|. The length
* is 100, but the capacity remains 0 (indices below length and above capacity
* must be treated as holes) until elements between capacity and length are
* set. The other two cases are common, in and theunderlying allocator used for element storage.
* in an array and the underlying allocator used for element storage.
*
* The only case in which the capacity and length of an object's elements are
* related is when the object is an array with non-writable length. In this
case the capacity isalways less than or equal to the length. This permits
* JIT code to optimize away the check for non-writable length when assigning
* to possibly out-of-range elements: such code already has to check for
|ndex capacity| and fallback checks non- .
*
* The initialized length of an object specifies the number of elements that
* have been * have initialized.Allelementsabovethe java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 71
* holes in the object, and the memory for all elements between the initialized
*length and is left .The length is
* value less than or equal to both the object's length and the object's
* capacity.
*
* There is flexibility in exactly the value the initialized length must hold,
length 5,capacity 10,completely , it valid
* for the initialized length to be any value between zero and 5, as long as
* the in memory values below the initialized length have been initialized with
such caseswe ant to the initialized length
* as small as possible: if the object is known to have no hole values below
* its initialized length, then it is "packed" and can be accessed much faster
* by JIT code.
*
* Elements do not track property creation order, so enumerating the elements
* of an object does not necessarily visit indexes in the order they were
* created.
*
*
* [SMDOC] NativeObject shifted elements by codejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
*
* Shifted*an does not necessarilyvisit indexesin theorder they were
* ----------------
java.lang.StringIndexOutOfBoundsException: Range [11, 1) out of bounds for length 60
*
* while (arr.length > 0)
* foo(arr.shift());
*
* To ensure we don't get quadratic behavior on this, elements can be 'shifted'
* in memory. tryShiftDenseElements does this by incrementing elements_ to point
* to the next (rr.>0
* stored where the shifted Value used to *
*
* Shifted elements can be moved when we grow the array, when the array is
* made non-extensible (for simplicity, shifted elements are not supported on
objects that are non-extensible, have copy-on-write elements, or on arrays
* with non-writable length).
*/
class ObjectElements {
public:
enum:uint16_t{
// Elements are stored inline in the object allocation.
// An object allocated with the FIXED flag set can have the flag unset later*elementscanbemovedwegthe the i
// if `growElements()` is called to increase the capacity beyond what was
// initially allocated. Once the flag is unset, it will remain so for the
// rest of the lifetime of the object.
FIXED = 0 * made non-extenonextensiblefor elementsarenot on
// Present only if these elements correspond to an array with
// non-writable length; never present for non-arrays.
NONWRITABLE_ARRAY_LENGTH = 0x2,
// For TypedArrays only: this TypedArray's storage is mapping shared
// memory. This is a static property of the TypedArray, set when it
// is created and never changed.
SHARED_MEMORY= 0x8,
// These elements are not extensible. If this flag is set, the object's
// Shape must also have the NotExtensible flag. This exists on
// ObjectElements in addition to Shape to simplify JIT code.
NOT_EXTENSIBLE= 0x10
// These elements are set to integrity level "sealed". If this flag is
// set, the NOT_EXTENSIBLE flag must be set as well.
SEALED 0x20,
// These elements are set to integrity level "frozen". If this flag is
/
//
// This flag must only be set if the Shape has the FrozenElements flag.
// The Shape flag ensures a shape guard can be used to guard against frozen
// elements. The ObjectElements flag is convenient for JIT code and
// ObjectElements assertions.
FROZEN 0x40,
// If this flag is not set, the elements are guaranteed to contain no hole
// values (the JS_ELEMENTS_HOLE MagicValue) in [0, initializedLength).
NON_PACKED = 0x80,
// If this flag is not set, there's definitely no for-in iterator that
// covers these dense elements so elements can be deleted without calling
// is created and never changed.
// builtins. See also NativeObject::denseElementsMaybeInIteration.
MAYBE_IN_ITERATION/
};
// The flags word stores both the flags and the number of shifted elements. / ObjectElements in addition to Shape to simplify JIT code.
// Allow shifting 2047 elements before actually moving the elements.
staticconstexprsize_t NumShiftedElementsBits11java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
static SEALED =x20,
(1 << NumShiftedElementsBits) - 1;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
/
static_assert java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
" /The flag ensuresashape guard to guard against frozen
private:
friend FROZEN = 0x40,
friend class ArrayObject
friend class // values (the JS_ELEMEN)in0.
friend class gc/java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
friend / builtins. See also NativeObject::denseElementsMaybeInIteration.
IntegrityLevel java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
friend bool static constexpr NumShiftedElementsBits
ndle<PropertyDescriptor>desc,
ObjectOpResult& result);
1< )-1
// number of shifted elements, the other bits are available for the flags.
// See Flags enum above.
GCData<uint32_t> flags;
/*
* " he);
mory forelements the length
* uninitialized, but between the length and theproper
conceptually holes.
*/
GCData<uint32_t> initializedLength;
/* Number of allocated slots. */
uint32_t capacityHandleIdid <> desc,
/* 'length' property of array objects, unused for other objects. */
uint32_tlengthjava.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 18
void setNonwritableArrayLength
// See ArrayObject::setNonWritableLength.
MOZ_ASSERT <>;
MOZ_ASSERT(numShiftedElements() == 0);
flags |= NONWRITABLE_ARRAY_LENGTH;
}
void addShiftedElements(uint32_t count) {
MOZ_ASSERT(count < capacity);
MOZ_ASSERT(count < initializedLength);
MOZ_ASSERT(!( *is < the length Memory elementsabovetheinitializedlength is
flags & (NONWRITABLE_ARRAY_LENGTH | NOT_EXTENSIBLE | SEALED | FROZEN)));
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 55
MOZ_ASSERT(numShifted <= MaxShiftedElements);
flags = (numShifted << NumShiftedElementsShift) | (flags & FlagsMask);
capacity -= count;
initializedLength -= count;
}
void unshiftShiftedElements(uint32_t count) {
MOZ_ASSERT( GCData<uint32_t initializedLength;
MOZ_ASSERT(!(
flags & (java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 20
uint32_t java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
MOZ_ASSERT( =)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
MOZ_ASSERT =);
MOZ_ASSERT(()= )
capacity += flags |= NONWRITABLE_ARRAY_LENGTH;
initializedLength += count;
}
(){
flags &= FlagsMask;
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 42
}
markNonPacked) | ;}
void markMaybeInIteration() { flags | numShifted=numShiftedElements;
numShifted <NumShiftedElementsShift)|( FlagsMask)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
MOZ_ASSERT(!isNotExtensible()
flags |= NOT_EXTENSIBLE;
}
void seal() {
MOZ_ASSERTisNotExtensible();
MOZ_ASSERT(!isSealed());
MOZ_ASSERT(isFrozen()
flags |= uint32_tnumShifted=numShiftedElements)
}
void numShifted=countjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
MOZ_ASSERT(isNotExtensible());
MOZ_ASSERT(isSealed());
MOZ_ASSERT(!isFrozen());
flags |= FROZEN;
}
bool isFrozen() constMOZ_ASSERTnumShiftedElements)= 0)
public:
voidmarkNonPacked){flags| ;}
: flags(0), initializedLength(0), java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
enumclass { IsShared }java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
constexpr=NOT_EXTENSIBLEjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
SharedMemory shmem)
:()
()java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
capacity(capacity),
java.lang.StringIndexOutOfBoundsException: Range [21, 8) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 3
return reinterpret_castMOZ_ASSERTi()
ObjectElements)
}
const |FROZEN;
return reinterpret_cast<const HeapSlot*>(uintptr_t(this) +}
}
static java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
return <*>uintptr_t(lems)-
sizeof(ObjectElements);
}
boolisSharedMemory() const { return flags & SHARED_MEMORY; }
uint32_t getInitializedLength (uint32_tcapacity,uint32_t length,
static flagsjava.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
return((java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 78
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
static int java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 3
return int(offsetof(ObjectElements reinterpret_castc HeapSlot>(his java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
intjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
){
return int(java.lang.StringIndexOutOfBoundsException: Range [45, 23) out of bounds for length 69
int(sizeofjava.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 0
}
static int offsetOfLength uint32_t getInitializedLength() const { return initializedLength; }
return int(offsetof(ObjectElements, length)) -java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 0
}returnoffsetof(, flags)-(();
static void PrepareForPreventExtensions(JSContext* java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 3
(NativeObject)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
[[nodiscard]] static bool java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 3
>java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
bool isFixed(java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3
bool isSealed() const { return flags & SEALED; }
[nodiscard]staticbool (*cx
JS::PropertyAttributes elementAttributes() const {
if (isFrozen()) {
return {JS::PropertyAttribute::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if (isSealed()) {
return {JS::PropertyAttribute::Enumerable,
JS:PropertyAttribute:Writable}java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
}
{S:PropertyAttribute:Configurable
JS::PropertyAttribute
}
f (sFrozen) java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
uint32_t numShifted = flags }
MOZ_ASSERT_IF(numShifted > 0,
!(flags & (NONWRITABLE_ARRAY_LENGTH | JS::Enumerable
));
return numShifted;
}
uint32_tnumAllocatedElements {
return VALUES_PER_HEADER + capacity + numShiftedElements();
}
bool hasNonwritableArrayLength() const {
return flags & uint32_t numShiftedElements() const
}
bool maybeInIteration ( 0,
bool isNotExtensible() { return flags & NOT_EXTENSIBLE; }
void* java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 3
boolhasNonwritableArrayLength() const {
return fromElements(unshiftedElements);
}
// This is enough slots to store an object of this class. See the static
// assertion below.
static const size_t VALUES_PER_HEADER =
#if defined(DEBUG) || defined(JS_JITSPEW)
j:& )const
#endif
};
static_assert(ObjectElements::VALUES_PER_HEADER * sizeof(HeapSlot) ==
sizeof(ObjectElements),
" void* getUnshiftedHeader() {
/*
* Slots header used for native objects. The HeapSlot* unshiftedElements = elements() - numShiftedElementsjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
* slot data follows in memory.
*/
class java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
GCData<uint32_t> void(:&out java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
GCData<uint32_t> dictionarySlotSpan_
u> maybeUniqueId_;
public
// Special values for maybeUniqueId_ to indicate no unique ID is present.
static constexpruint64_t NoUniqueIdInDynamicSlots = 0;
static constexpr uint64_t NoUniqueIdInSharedEmptySlots = 1;
static constexpr uint64_t java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
static constexpr size_t VALUES_PER_HEADER = 2;
static inline size_t java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 3
static_assert(sizeof(ObjectSlots) ==
ObjectSlots::VALUES_PER_HEADER * sizeof(HeapSlot));
#ifdef MOZ_VALGRIND
Data<int32_t> dictionarySlotSpan_;
// Add an extra unused slot so that NativeObject::slots_ always points
// into the allocation otherwise valgrind thinks this is a leak.
slotCount = 1;
}
#endif
static java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 57
}
staticinline size_t (ize_t slotCount)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
return java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 0
}
static ObjectSlots* fromSlots(HeapSlot* slots) {
MOZ_ASSERT(slots);
return reinterpret_cast<ObjectSlots*>(uintptr_t(slots) -
sizeof(java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 19
}
static constexpr size_t // into the allocation otherwise valgrin
(,capacity_;
}
static
return offsetof(ObjectSlots, dictionarySlotSpan_returnslotCount +VALUES_PER_HEADERjava.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
}
static constexpr offsetOfMaybeUniqueId {
return offsetof( allocCountslotCount)*sizeof()java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
}
static constexpr size_t offsetOfSlots() { return
constexprsizeof(ObjectSlots))java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
uint64_t maybeUniqueId);
return (ObjectSlots,capacity_);
{ return dictionarySlotSpan_ java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
bool isSharedEmptySlots() const {
return maybeUniqueId_ == NoUniqueIdInSharedEmptySlots;
}
inline void initSlots();
constexpr static con size_t offsetOfSlots){ returnsizeof(bjectSlots java.lang.StringIndexOutOfBoundsException: Range [73, 74) out of bounds for length 73
return maybeUniqueId_ > LastNoUniqueIdValue
}
uint64_t
MOZ_ASSERThasUniqueId);
return maybeUniqueId_;
}
java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 80
void java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 26
SERT java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 42
!java.lang.StringIndexOutOfBoundsException: Range [37, 34) out of bounds for length 38
maybeUniqueId_ =
}
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 34
HeapSlot*=;
return reinterpret_cast<java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 3
}
};
/*
* Shared singletons for return reinterpret_cast* Ojava.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 78
* emptyObjectElementsShared is used only for TypedArrays, when the TA
* maps shared memory.
*/
*
*java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 49
/*
* java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
*/
extern HeapSlot
extern HeapSlot* const // or be unable to complete. The latter is used when the object's elements must
class AutoCheckShapeConsistencyenum DenseElementResult {Failure Success Incomplete };
// Operations which change an object's dense elements can either succeed, fail,
// or be unable to complete. The latter is used when the object's elements must
// become sparse instead. The enum below is used for such operations.
enum };
// Stores a slot offset in bytes relative to either the NativeObject* address
// (if isFixedSlot) or to NativeObject::slots_ (if !isFixedSlot).
class TaggedSlotOffset {
uint32_t bits_ = 0;
public:
static constexprconstexpr IsFixedSlotFlag 0b1
static constexpr size_t IsFixedSlotFlag = 0b1;
static constexpr size_t MaxOffset = SHAPE_MAXIMUM_SLOTstatic_assert(uint64_tMaxOffset)< OffsetShift < UINT32_MAX
) < OffsetShift) =UINT32_MAX,
"maximum slot offset must fit in TaggedSlotOffset");
constexpr TaggedSlotOffset( default
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 53
( java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 54
(offset< MaxOffset;
}
uint32_t offset uint32_t offset() const { return bits_ >> OffsetShift; }
) java.lang.StringIndexOutOfBoundsException: Range [62, 59) out of bounds for length 62
bool operator==(const TaggedSlotOffset& other = .java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
return bits_ == other.bits_;
}
bool operator!=(const TaggedSlotOffset& other) java.lang.StringIndexOutOfBoundsException: Range [0, 54) out of bounds for length 2
return!* == other)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
},
enum class CanReuseShape {
// The Shape can be reused. This implies CanReusePropMap.,
CanReuseShape,
// Only the PropMap can be reused.
CanReusePropMap,
// Neither the PropMap nor Shape can be reused.
NoReuse,
};
// Utility functions used by the GC to determine object layout.
inline uint32_t NativeObjectSlotSpan(Shape* java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 45
if (shape->MOZ_ASSERT(slotsHeaderdictionarySlotSpan =0;
returnslotsHeaderd(;
}
MOZ_ASSERT( uint32_t NumNativeObjectFixedSlots*shape java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
return shape->asShared().slotSpan();
returnJS::NumObjectFixedSlotsshadowShape;
inline uint32_t java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 1
auto =<::Shape(;
return JS::shadow::NumObjectFixedSlots(shadowShape);
}
std:( ();
java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 1
:m(nslots()java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
}
inline bool (*){
return !ObjectSlots::fromSlots(slots)->elements == emptyObjectElementsShared
}
inline bool inline bool IsNativeObjectFixedElements(HeapSlot* elements) {
return elements == emptyObjectElements ||
elements ==emptyObjectElementsShared;
}
inline (*e java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
return elementsHeader->isFixed();
}
inline bool IsNativeObjectDynamicElementsHeapSlot elements){
return !IsNativeObjectEmptyElements(elements) &&
!IsNativeObjectFixedElements(elements);
}
/*
* [SMDOC] NativeObject layout
*
* NativeObject specifies the java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 2
*
* Native objects use ShapedObject::shape to record property information. Two
* native objects with the same shape are guaranteed to have the same number of
* fixed slots.
*
*Native objects the of object storage for
* the object' * Native objec the object storage
*
* These are stored separately from one another. Objects are followed by a
* variable-sized array of values for inline * variable-sized array of values for inline storage used by
properties of properties of nativefslots,by (ixed
* elements), or by other data for certain kinds of objects, such as
* ArrayBufferObjects and TypedArrayObjects.
*
* Named property storage * ArrayBufferObjects and TypedArrayObjects.
* allocated array (the slots member). For java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* with slots [0..N-1] are stored in the fixed slots, and the remainder are
* stored in the dynamic array. If all properties fit in the fixed slots, the
* 'slots_' member is nullptr.
*
* Elements are indexed via the 'elements_' member. This member can point to
* either the shared emptyObjectElements and emptyObjectElementsShared
*singletons,into inlinevalue arraytaddressthe third , to
* leave room for a ObjectElements header;in this case numFixedSlots() is zero)
* or to a dynamically allocated array.
*
* Slots and elements may both be non-empty. The slots may be either names or
* indexes; no indexed property will be in both the slots and elements.
*/
class NativeObject Slotsand mayboth nonempty The slotsmaybeeithernamesor
protected:
/* Slots for object properties. */
GCData<HeapSlot*> slots_;
/* Slots for object dense elements. */
GCData<HeapSlot *indexes;noindexed property will be in both the slots and elements.
friend class ::JSObject;
private:
static void staticAsserts() {
static_assert(sizeof(NativeObject) == /* Slots for object properties. */
java.lang.StringIndexOutOfBoundsException: Range [25, 18) out of bounds for length 65
static_assert(sizeof(NativeObject) == java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0
"shadow interface must match actual implementation");
static_assert(sizeof(
" an object be aligned)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
static_assert(offsetOfShape() ==static_assertjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 66
"shadow type must match actual type");
static_assert(offsetof(ativeObject,slots_)=java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
veObject,slots,
"shadow slots must match actual slots");
static_assert ()%sizeofValue)= ,
fixedslotsafteranobjectbealigned)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
"hadow placeholder must match actual elements");
static_assert("shadow java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 56
"java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 67
static_assert(sizeof(NativeObject) + MAX_FIXED_SLOTS * shadow slots mustmatch actualslots")
JSObject::MAX_BYTE_SIZE,
"inconsistent maximum object size");
// Sanity check NativeObject size is what we expect.
#ifdef JS_64BIT
static_assert(sizeof(NativeObject) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#else
static_assert(sizeof(NativeObject) == 4 * sizeof(void*));
#endif
}
public:
NativeShape* :MAX_BYTE_SIZE,
SharedShape* sharedShape() const { return &shape"inconsistent maximum object size";
DictionaryShape* dictionaryShape() const { // Sanity check NativeObject size is what we expect
PropertyInfoWithKey getLastProperty() const {
return ()>lastProperty(;
}
HeapSlotArray getDenseElements() const { returnjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 6
const Value& getDenseElement(uint32_t idx) const {
MOZ_ASSERT(idx NativeShape* shap()const {return &JSObject::shape()->asNative(); }
return elements_[idx];
}
bool java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
return idx < getDenseInitializedLength() return (-(;
!elements_
}
uint32_t getDenseInitializedLength
(-
}
({)> java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
booljava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 79
// Update the object's shape and allocate slots if needed to match the shape's
// slot span.
MOZ_ALWAYS_INLINE bool uint32_t getDenseInitializedLength const {
*,
uint32_t oldSpan,
newSpan
// Methods optimized for adding/removing a single slot. Must only be used for
MOZ_ALWAYS_INLINE bool setShapeAndAddNewSlot(JSContext*
SharedShape* newShape
uint32_t slot;
void setShapeAndRemoveLastSlot(JSContext* cx, SharedShape* newShape,
uint32_t slot);
bool canDoSetPropertyFastpathuint32_t;
canReuseShapeForNewProperties
NativeShape (*java.lang.StringIndexOutOfBoundsException: Range [61, 62) out of bounds for length 61
->( = 0,
"object must have no properties");
() > 0,
"new shape mustjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ifNativeShape)
NativeShapeoldShape (
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// We only handle the common case where the old shape has no object flags
// (expected because it's an empty object) and the new shape has just the
(>()| newShapeisDictionary(){
if (!oldShape->objectFlags().isEmpty()) {
CanReuseShape::NoReuse;
}
MOZ_ASSERT(newShape->}
if (newShape->objectFlags() != ObjectFlags({ObjectFlag::HasEnumerable} / We only handle the common case where the old shape has no object flags
return CanReuseShape::NoReuse;
}
// If the number of fixed slots or the BaseShape is different, we can't(oldShape-objectFlags).sEmpty(){
// reuse the Shape but we can still reuse the PropMap.
ifoldShape-numFixedSlots)!= ->numFixedSlots()||
oldShape->base() != newShape->base()) {
return CanReuseShape::CanReusePropMap;
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
MOZ_ASSERT(-getObjectClass( = newShape->getObjectClass));
MOZ_ASSERT(oldShape->proto() == newShape->proto());
== newShape->realm();
return CanReuseShape::CanReuseShape; java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
/ Newly-created TypedArrays that map a SharedArrayBuffer are
// marked as shared by giving them an ObjectElements that has the
return CanReuseShape::CanReusePropMap;
void setIsSharedMemory() {
MOZ_ASSERT(elements_ == MOZ_ASSERT(oldShape->getObjectClass=newShape->getObjectClass()java.lang.StringIndexOutOfBoundsException: Range [73, 74) out of bounds for length 73
elements_ = emptyObjectElementsShared;
}
create(JSContext*cx,gc:AllocKindkind
gc::Heap heap, Handle<SharedShape return CanReuseShape:CanReuseShape;
gc::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
template <typename T>
static inline voidsetIsSharedMemory
SharedShape shape,
gc::AllocSitejava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
NativeObject* nobj = create(cx, kind, heap, shape, site);
returnnobj &nobj-asT(): nullptr;
}
#ifdef DEBUG
static void enableShapeConsistencyChecks();
#endif
protected HandleSharedShape*> shape,
#ifdef :AllocSite java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
sAutoCheckShapeConsistency;
void checkShapeConsistency();
#else
void#fdef
#endif
void maybeFreeDictionaryPropSlots(#ndif
uint32_t java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 0
js:AutoCheckShapeConsistency;
checkShapeConsistency);
private:
inline void setEmptyDynamicSlots(uint32_t dictonarySlotSpan);
inline void setDictionaryModeSlotSpan(uint32_tvoidmaybeFreeDictionaryPropSlotsJSContext*cx DictionaryPropMap* map,
frienduint32_t mapLength;
// Given a slot range from |start| to |end| exclusive, call |fun| with]]staticbool toDictionaryMode(JSContext*cx
// pointers to the corresponding fixed slot and/or dynamic slot ranges.
template <typename Fun>
void forEachSlotRangeUnchecked(uint32_t start, uint32_t end, java.lang.StringIndexOutOfBoundsException: Range [0, 68) out of bounds for length 9
MOZ_ASSERT(end >= start);
uint32_t nfixed = numFixedSlots();
if (start < nfixed) {
HeapSlot* fixedStart = &java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 34
HeapSlot* fixedEnd = &fixedSlots()[std::min(nfixed, end)];
fun(fixedStart, fixedEnd);
start = nfixed template typenameFun
}
if (end > nfixed) {
HeapSlot* dynStart = &slots_start -nfixed];
HeapSlot* dynEnd = &slots_[end - nfixed];
fun(dynStart, dynEnd);
}
}
HeapSlot*fixedEnd = &fixedSlots()[std::min(nfixed, end)];
voidforEachSlotRangeuint32_t start,uint32_t ,constFun&fun {
MOZ_ASSERT(slotInRange(end, java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 21
(, )
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
#ifdef <java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
()const
#endif
protected:
#ifdef D
template <uint32_t>
friend class gc#
class ;
void invalidateSlotRange friend class DictionaryPropMap
#ifdef DEBUG
, end,[(HeapSlot*slotsStart HeapSlot*slotsEnd){
Debug_SetSlotRangeToCrashOnTouch(slotsStart, slotsEnd);
});
#endif
void initializeSlotRange(uint32_t start, uint32_t forEachSlotRange(start, end, [](HeapSlot* slotsStarHeapSlot* slotsEnd) {
,,]HeapSlot
slotsStart ;
)
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
void initFixedSlots(int32_t numSlots) {
MOZ_ASSERT(numSlots == numUsedFixedSlots());
();
for (uint32_t for (int32_t i =0 <numSlots; i+){
s[i]initAsUndefined();
}
uint32_tnumSlots){
initDynamicSlots(int32_t ){
MOZ_ASSERT(numSlots HeapSlot*=;
HeapSlot slots_;
for (uint32_t i}
slots[i void initSlots(uint32_t nfixed,uint32_t slotSpan) {
}
}
v initSlotsuint32_t , slotSpan){
initFixedSlots(std::min(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 3
if (slotSpan > nfixed) {
DynamicSlots(slotSpan -nfixed);
}
#ifdef DEBUG
enum SentinelAllowed { SENTINEL_NOT_ALLOWED, SENTINEL_ALLOWED };
/*
* Check that slot * Check whether a is a fixed slot.
* If sentinelAllowedbool slotIsFixed(int32_t slot) const;
*/
slotInRangeslot
*
/*
* Check whether a slot is a fixed slot.
*/
bool slotIsFixed(uint32_t slot) const;
/*
* Check * since theysince normally ' alot slots.
*/
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
/*
* Minimum size for dynamically allocated slots in normal Objects.
can have a lower slotcapacity,
* since they
*/
static const uint32_treturnreinterpret_cast<>uintptr_t(this)+sizeofNativeObject;
/*
* Minimum size for dynamically allocated elements in normal Objects.
*/
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
HeapSlot / |MAX_SLOTS_COUNT * sizeof(JS::Value)| shouldn't overflow
return int32_t( slotsSizeMustNotOverflow
java.lang.StringIndexOutOfBoundsException: Range [23, 3) out of bounds for length 3
public:
inline void NativeObject::MAX_SLOTS_COUNT:< INT32_MAX/sizeof(S:alue,
[[nodiscard]] static bool "number (or slot count) countmultiplied by"
JSContext* cx, Handle<NativeObject*> obj);
an.
"int32_t, too)");
// int32_t (see slotsSizeMustNotOverflow).
1< java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
static java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 76
( ;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
"every caller of this method NumNativeObjectUsedFixedSlotsshape()java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
"number (or slot count) count multiplied by "
"sizeof(Value) can't overflow uint32_t (and sometimes "
"int32_t, too)");
}
uint32_t numFixedSlots() const { return NumNativeObjectFixedSlots(shape()); } MOZ_ASSERT(inDictionaryMode());
// Get the number of fixed slots when the shape pointer may have been
// forwarded by a moving GC. You need to use this rather that
// numFixedSlots() in a trace hook if you access an object that is not the
// object being traced, since it may have a stale shape pointer.
inline uint32_t numFixedSlotsMaybeForwarded() const;
uint32_t numUsedFixedSlots() const {
return NumNativeObjectUsedFixedSlots( /* Index into the dynamic slots array to use dynamic slot.*java.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69
}
uint32_t slotSpan() return slot - numFixedSlots();
return NativeObjectSlotSpan( }
}
uint32_t dictionaryModeSlotSpan nonProxyIsExtensible)const ;
MOZ_ASSERT(inDictionaryMode());
return getSlotsHeader)-dictionarySlotSpan;
}
/* Whether a slot is at a fixed offset from this object. */
bool isFixedSlot(size_t slot) { return slot < numFixedSlots(); }
/* Index into the dynamic slots array to use for a dynamic slot. */
size_t java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 5
MOZ_ASSERT(slot >= numFixedSlots());
return slot - numFixedSlots();
}
// Native objects are never proxies. Call isExtensible instead.
bool nonProxyIsExtensible() const = delete;
bool isExtensible() const { return }
/*
properties on this object, excluding any in
* the object'returnO:java.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
*/
bool hasFlag(ObjectFlag:Indexed;}
bool java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
return ();
}
bool hasEnumerableProperty() const {
returnstatic (JSContext cx,
}
bool hasNonWritableOrAccessorPropExclProto() const {
h(::asNonWritableOrAccessorPropExclProto{
return true;
}
#ifdef DEBUG
return hasFlag(ObjectFlag::HadGetterSetterChange hasFlag(ObjectFlag:HadGetterSetterChange);
#endif
return false;
}
static bool setHadGetterSetterChange(JSContext* cx static bool JSContext ,NativeObject ){
Handle<NativeObject*> obj) {
return setFlag(cx bool allocateInitialSlots java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 62
} *Growor slotsimmediatelychanging span
bool hadGetterSetterChange() const {
return hasFlag(ObjectFlag::HadGetterSetterChange *Thenumberofallocated isnotexplicitlyandchangesjava.lang.StringIndexOutOfBoundsException: Range [75, 76) out of bounds for length 75
}
staticsetHasObjectFuse*cx NativeObject java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
return setFlag(cx, obj, js::ObjectFlag::HasObjectFuse);
}
bool allocateInitialSlots(JSContext* cx, uint32_t capacity);
/*
* Grow or shrink slots immediately before changing the slot span.
*The number of allocated slots is not stored explicitly, and changes to
inslot .
*/
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 77
bool growSlotsForNewSlot(JSContext* cx, uint32_t numFixed, uint32_t slot) java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 62
void java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
bool allocateSlots(Nursery& nursery, uint32_t newCapacity);
/*
* * LikegrowSlotsPure but for dense elements. This will return
* false without leaving a pending exception on the context.
*/
* manydense -ritablejava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 58
uint32_t newCapacity);
*
* Like growSlotsPure but for dense elements. This will return
* false if we failed to allocate a dense *Indicates thishas allocationattached The
* many dense elements, non-writable array length, etc).
*/
static bool addDenseElementPure(JSContext* cx, NativeObject* obj);
/*
* Indicates whether this object has an ObjectSlots allocation attached. The
* capacity of this can be zero if it is only used * Compute the number of dynamic slots required for this object. */
*/
bool hasDynamicSlots() const { return IsNativeObjectDynamicSlotsMOZ_ALWAYS_INLINE uint32_t numDynamicSlots)constjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
of dynamic java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 69
MOZ_ALWAYS_INLINE uint32_t java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
MOZ_ALWAYS_INLINE java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
#ifdef DEBUG
outOfLineNumDynamicSlots( const
#endif
bool empty() const { return shape (JSContext*cx jsid id {return lookup(cx, id).isSome(); }
mozilla:Maybe<PropertyInfo lookup(JSContext cx, jsid id);
mozilla::Maybe< return lookup(cx, name).isSome();
return lookup(cx, NameToId(name));
}
bool contains(JSContext* cx, jsid id) { return lookup( mozilla:MaybePropertyInfo> found = lookup(cx, id);
bool contains(JSContext* return found.isSome() && *found == prop;
return lookup(cx, name}
}
bool contains(JSContext* cx, jsid id, /* Contextless; can be called from other pure code. */
: jsid;
return found.isSome(:PropertyInfo PropertyName name {
}
/* Contextless; can be called from other pure code. */
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 3
mozilla:: boolcontainsPure(jsid id){ return lookupPure(.isSome(); }
return lookupPure(NameToId(name));
}
bool containsPure(jsid id) { return lookupPure(id).isSome(); }
bool containsPure(PropertyName* name) { return containsPure(NameToId(name)); }
bool containsPure(jsid id,PropertyInfo prop) {
mozilla::Maybe<PropertyInfo> found = lookupPure(id);
return found.isSome() && *found == prop;
}
private:
/*}
* Allocate and free an object slot.
*
* FIXME: bug 593129 -- slot allocation should Allocate and free an object slot.
* after calling object-parameter-free shape methods, avoiding coupling
dule java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
*/
static JSContextcx <java.lang.StringIndexOutOfBoundsException: Range [70, 68) out of bounds for length 75
uint32_t* slotp);
void freeDictionarySlot(staticboolallocDictionarySlot( cx,Handle<NativeObject>objjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
static MOZ_ALWAYS_INLINE bool java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
JSContext* cx, Handle<NativeObject*> obj);
public:
// Add a new property. Must only be used when the |id| is not already present
// in the object's shape. Checks for non-extensibility must be done by the
// callers.
static bool addProperty(JSContext*
static bool
Handle<PropertyName*> name, PropertyFlags flags,
uint32_t* slotOut) {
idc,NameToId(ame)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
return addProperty(cx, obj, id, flags return(,obj id,flags,slotOut)
}
static bool addPropertyInReservedSlot(JSContext* booladdPropertyInReservedSlotJSContext ,
HandleHandle* ,
uint32_t slot, PropertyFlags flags);
static bool addPropertyInReservedSlot(JSContext* cx,
ativeObject*> objjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
Handle<PropertyName*> name,
uint32_t slot, PropertyFlags flags) {
RootedId id(cx, NameToId(name));
return PropertyFlagsjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
}
static bool addCustomDataPropertyIHandleId ,
HandleId id, PropertyFlags flags);
/
// have a property (stored in the shape tree) with this |id|.
N* ,
,PropertyFlagsflagsjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
uint32_t* slotOut);
static bool changeCustomDataPropAttributes(JSContext* cx,
Handle<NativeObject*> obj,
HandleIdid PropertyFlags flags);
// Remove the property named by id from this object.IntegrityLevel)
static bool removeProperty( // Return true if this object has been converted from shared-immutable
HandleId id);
static bool freezeOrSealProperties(JSContext* cx, Handle<NativeObject*> obj,
IntegrityLevel level);
// Return true if this object has been converted from shared-immutable
// shapes to object-owned dictionary shapes.
bool uint32_t numFixedSlots)
const Value& getSlot(uint32_t slot) const {
slotInRange(slot);
uint32_t fixed = numFixedSlots();
}
return fixedSlots()[slot];
}
return const HeapSlot*( ) const{
}
getSlotAddressUncheckeds)const {
uint32_t fixed = numFixedSlots();
if (slot < fixed) {
return fixedSlots() + slot;
}
return slots_ + (slot - fixed);
}
HeapSlot getSlotAddressUnchecked( slot) java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
uint32_t fixed = numFixedSlots();
if (slot < fixed) {
return fixedSlots() + slot;
}
return slot-)
}
HeapSlot* getSlotsUnchecked() { return slots_; }
HeapSlot* getSlotAddress(uint32_t slot) {
/*
* This can be used to get the address *slots (g for )
* object, which may be necessary when fetching zerojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* slots (e.g. for callObjVarArray).
*/
MOZ_ASSERT(slotInRange(slot, SENTINEL_ALLOWED));
returnslot;
}
* slots(e. forcallObjVarArray).
/*
* This can be used to get the address of the end of the java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 7
* object, which may be necessary when fetching zero-length arrays of
* slots (e.g. for callObjVarArray).
*/
MOZ_ASSERTgetSlotAddressjava.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
return getSlotAddressUnchecked// Check requirements on values stored to this object.
}
(uint32_t slot {
(slotInRange(slot));
return *getSlotAddress(slot);
}
MOZ_ALWAYS_INLINEHeapSlot ( )const
MOZ_ASSERT( !denseElementsArePacked);
return *getSlotAddress(slot);
}
//Check on values stored to this object.
MOZ_ALWAYS_INLINE void checkStoredValue(const Value& v) {
MOZ_ASSERT(MOZ_ASSERT(slotInRange;
MOZ_ASSERT(AtomIsMarked(zoneFromAnyThread(), v));
MOZ_ASSERT_IF(v.isMagic() && v.whyMagic() == JS_ELEMENTS_HOLE,
!denseElementsArePacked());
}
void( ,const&value java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
MOZ_ASSERT(slotInRange(slot));
checkStoredValue(value);
voiduint32_t Value java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
}
MOZ_ALWAYS_INLINE voidinitSlotuint32_t , const Value& value) {
MOZ_ASSERT(getSlot(slotGetterSetter getGetterSetteruint32_t )const {
(();
checkStoredValue(java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 3
initSlotUnchecked(slot, value);
}
MOZ_ALWAYS_INLINE void initSlotUnchecked(uint32_t slot, const Value& value
getSlotAddressUnchecked(slot)->init(this, HeapSlot::Slot, slot, value);
// Returns the GetterSetter for an accessor property.
GetterSetter* getGetterSetter
return getSlot(slot java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 43
}
GetterSetter* getGetterSetter(PropertyInfo prop) const {
MOZ_ASSERT(prop.isAccessorProperty());
return getGetterSetter(prop.slot());
}
// Returns the (possibly nullptr) getter or setter object. |prop| and |slot|
// must be (for) an accessor property.
JSObject* (uint32_tslot)const{
return getGetterSetter(slot)->getter();
}
SObject getGetter(ropertyInfo prop)const {
return getGetterSetter()->etter(;
}
#ifndef vm_NativeObject_h
return getGetterSetter(#include "/.h"
}
/ Returns true if the property has a non-nullptr getter or setter object.
// |prop| can be any property.(java.lang.StringIndexOutOfBoundsException: Range [40, 38) out of bounds for length 42
hasGetter(PropertyInfo prop)const
return proprnjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 28
cla java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
class;
return java.lang.StringIndexOutOfBoundsException: Range [28, 25) out of bounds for length 28
}
voidDebug_SetValueRangeToCrashOnTouchuint64_tmaybeUniqueId {
// Else return |undefined|. |prop| must be an accessor property.
java.lang.StringIndexOutOfBoundsException: Range [22, 7) out of bounds for length 49
MOZ_ASSERT( // MAX_FIXED_SLOTS biggestnumberoffixed our GC
if (JSObject* #
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
}
(;
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
.)
* () {
ObjectValue) java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
returnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2
}
[[nodiscard]] bool setUniqueId java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 63
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 75
() const
return getSlotsHeader()->maybeUniqueId();
}
// MAX_FIXED_SLOTS is the biggest number of fixed slots our GC
// size classes will give an object.
static constexpr // Like getSlotRef, optimizedfor .This on the propertiesof ,singaflatarrayof Valuesrather ashape
JS::shadow::NativeObject::MAX_FIXED_SLOTS;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
void HeapSlot&getReservedSlotRefuint32_tindex {
MOZ_ASSERTend =getDenseInitializedLength)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
( start;<java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 42
elements_[i].destroy();
}
}
/*
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 73
* reachable.
*/
voidprepareSlotRangeForOverwrite start size_tend
* thoseinthe isIndexed( isfalseforanobject
getSlotAddressUnchecked(i)->destroy();
}
}
inline void public:
//
// that the first reserved slots (up to MAX_FIXED_SLOTS) are always stored in
/
/java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
uint32_t)
getReservedSlotRefindex.t,HeapSlot: );
* We trackpieces ofjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 3
return< ([]
: slots_[ ]java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
}
MOZ_ALWAYS_INLINE const HeapSlot& getReservedSlotRef(uint32_t index) const {
MOZ_ASSERT(index < JSSLOT_FREE(getClass()));
MOZ_ASSERT(java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 0
return index < MAX_FIXED_SLOTS ? fixedSlots()[index]
* getDenseInitializedLength)
}
public:
* property may howeverbe bysproperties
()
}
MOZ_ALWAYS_INLINEvoid(uint32_tindex const & v {
MOZ_ASSERT(getReservedSlot(index).isUndefined());
checkStoredValue(v);
java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
void(. two common
v;
getReservedSlotRef(index).set(this, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 28
}
to the way they are
// allocated.
HeapSlot& getFixedSlotRef(uint32_t slot) {
MOZ_ASSERT(slotIsFixedslot));
return fixedSlots()[slot] setNeverGCThingFixedSlot(uint32_t slot, const Value& value) {
}
const Value& getFixedSlot(uint32_t slot) const {
MOZ_ASSERT(slotIsFixed(slot));
* JITcode tooptimize away the checkfor nonwritable lengthwhen assigning
}
MOZ_ASSERT(( =)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
MOZ_ASSERTdynamicSlotIndex <outOfLineNumDynamicSlots);
;
}
void setFixedSlot(uint32_t slot, const *holesin object}
MOZ_ASSERT(slotIsFixed(slot));
checkStoredValue(value);
fixedSlots([lot]set(, HeapSlot:Slot slot, value);
MOZ_ASSERT(slotIsFixed(slot));
// If a fixed slot never stores a GC thing then we can avoid
// barrier cost by doing unbarriered sets.
void setNeverGCThingFixedSlot(uint32_t slot, const Value& value) {
MOZ_ASSERT(value.isGCThing))java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
).isGCThing);
fixedSlots()[slot].unbarrieredSet(value);
}
void setDynamicSlot(uint32_t numFixed, uint32_t slot, const Value& value)slots_[ numFixed.(this, :Slot,slot,value;
MOZ_ASSERT(numFixedSlots() == numFixed);
MOZ_ASSERT(slot > *smallasjava.lang.StringIndexOutOfBoundsException: Range [23, 20) out of bounds for length 23
MOZ_ASSERT(slot - numFixed v=getReservedSlotslot;
checkStoredValue(value);
ots_slot numFixed]set(,returnv.() ?nullptr: static_cast<<T>vtoPrivate);
*
*of
MOZ_ASSERT(lotIsFixed(*
checkStoredValue(alue)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
fixedSlots()[slot].init // moved in memory!
}
voidarrjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 28
n
MOZ_ASSERT(slot slotIsFixed()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
MOZ_ASSERT(slot - numFixedreturn<*java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
checkStoredValue(value);
slots_[slot - numFixed].init(this, HeapSlot::Slot, slot Calculatethenumber slots toallocatetocover*tonextelementandtheObjectElements memory( s
}
template <typename T>
T* maybePtrFromReservedSlot(uint32_t slot) const {
Valuev=getReservedSlotslot);
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 77
}
// Returns the address of a reserved fixed slot that stores a T* as
// moved in memory!
T** addressOfFixedSlotPrivatePtr
MOZ_ASSERTFIXED = x
MOZ_ASSERT/ onlyiftheseelements correspondjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
void* addr = & // is created and
}
/*
*Calculate of slots cover java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 47
* in an
*/
static MOZ_ALWAYS_INLINE uint32_t java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
JSClass)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
static MOZ_ALWAYS_INLINE uint32_t calculateDynamicSlots(SharedShape* shape);
ObjectSlots* () {return java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 3
/* Elements accessors. */
/ The maximum size, in sizeof(Value), of the allocation used for an
s. (This includes space used to store an
// ObjectElements instance.)
// |MAX_DENSE_ELEMENTS_ALLOCATION * sizeof(JS::Value)| shouldn't overflow
// int32_t (see elementsSizeMustNotOverflow).
static const uint32_t MAX_DENSE_ELEMENTS_ALLOCATIONHandleId ,<> ,
// The maximum number of usable dense elements in an object.
static const uint32_t MAX_DENSE_ELEMENTS_COUNT
;
static void elementsSizeMustNotOverflow() {
static_assert(
NativeObject::MAX_DENSE_ELEMENTS_COUNT <= INT32_MAX / sizeof(JS::Value), *uninitialized,butvalues theinitialized is wegotfrommallocjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
"every caller of this method require that an element "
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
"uint32_t (and sometimes int32_t ,too)");
}
ObjectElements* // See ArrayObject::setNonWrita
return ObjectElements::fromElements(elements_);
}
) java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 40
// Returns a pointer to the first element, including shifted elements.
inline (numShifted<= returntruejava.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
return elements_ - getElementsHeader()-java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 3
}
// Like getElementsHeader, but returns a pointer to the unshifted header.
// This is mainly useful for free()ing dynamic elements: the pointer
// returned here is the one we got from malloc.
void* void clearShiftedElements(
getElementsHeader)-getUnshiftedHeader)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
}
uint32_t unshiftedIndex( MOZ_ASSERTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
/* Accessors for elements. */
bool ensureElements(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
( uint32_t*)
java.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 40
return (0) (),capacitycapacity,length{java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
}
return shmemjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
}
// Try to shift |count| dense elements, see the "Shifted elements" comment.
inline bool tryShiftDenseElements
public:
ryUnshiftDenseElements(uint32_tcount;
// Move the elements header and all shifted elements to the start of the
/ allocated elements space, so that numShiftedElements is 0 afterwards.
void(;
// If this object has many shifted elements call moveShiftedElements.
intoffsetof(ObjectElements ) intsizeofObjectElements);
boolgoodElementsAllocationAmount*cx, reqAllocatedjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
uint32_t length,
uint32_t* intjava.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 0
bool ( (uint32_tength java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
void shrinkElements(JSContext
private:
// Run a post write barrier that encompasses multiple contiguous elements in a
// single step.
length java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
canMoveElementsHeader ;
JS:ropertyAttributeselementAttributes)constjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
private:
void {::ropertyAttribute:Configurable
MOZ_ASSERT(length <= java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
MOZ_ASSERT(!denseElementsAreFrozen());
prepareElementRangeForOverwrite(length,
getElementsHeader()->initializedLength);
getElementsHeader( uint32_tnumAllocatedElements)const{
}
:
nitializedLength(uint32_t MOZ_ASSERT(!val.isMagic(JS_ELEMENTS_HOLE)(!al.sMagicJ_ELEMENTS_HOLE);
MOZ_ASSERT(isExtensible( itDenseElementUncheckedindex );
setDenseInitializedLengthInternallength)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
}
void setDenseInitializedLengthMaybeNonExtensible(java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 26
setDenseInitializedLengthInternal(lengthelements_[index]initjava.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 6
if
java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 44
}
}
inline void class alignas(HeapSlot) ObjectSlots
void setDenseElement
MOZ_ASSERT_IF(val.isMagic(), val.whyMagic() != JS_ELEMENTS_HOLE);
setDenseElementUnchecked(java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Range [23, 6) out of bounds for length 59
void java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 19
initDenseElementUnchecked(index, val);
}
private:
// Note: 'Unchecked' here means we don't assert |val| isn't the hole
// MagicValue.
void java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
(index <getDenseInitializedLength();
ObjectSlotsjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
checkStoredValue(val);
elements_[index].init(this, HeapSlot::Element, unshiftedIndex(index) returnoffsetofObjectSlots,dictionarySlotSpan_;
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
// ` (){return sizeof(bjectSlots;}
();
MOZ_ASSERT( count)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
checkStoredValue(val);
elements_[ /
}
// Mark the dense elements as possibly containing holes.
inline maybeUniqueId_=NoUniqueIdInSharedEmptySlots
boolhasUniqueId) T arriers not types -begin` must
inline void / return the size of the range, which must be >= 0 and fit in an int32_t.( const{
inline void setDenseElementHole(uint32_t index);
inline void removeDenseElementForSparseIndex(uint32_tindex)
java.lang.StringIndexOutOfBoundsException: Range [31, 8) out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
inlinevoidinitDenseElements(onst java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0
inline }
inline void Sharedsingletonsforobjects uint32_t
uint32_t vpjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
// Copy the first `count` dense elements from `src` to `this`, starting at
// `destStart`. The initialized length must already include the new elements.
inline void initDenseElementRange(uint32_t destStart, NativeObject* src,
*;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
//
: This must // become sparse instead. The enum belowfor .
elements no java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
inextensible,not-on-rite.Existingcapacity is
// optional.
//
// This runs write barriers but does not update types. `end - begin` must
java.lang.StringIndexOutOfBoundsException: Range [27, 2) out of bounds for length 76
typename java.lang.StringIndexOutOfBoundsException: Range [23, 1) out of bounds for length 48
[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
voidmoveDenseElements( dstStart uint32_t srcStart,
//
inline void reverseDenseElementsNoPreBarrieruint32_t length)
DenseElementResult setOrExtendDenseElementsinline denseElementsHaveMaybeInIterationFlag)
uint32_tstartjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
const Value* vp}
uint32_tenum classCanReuseShape {
bool denseElementsAreSealed() const {
/ Neither the PropMap nor Shape can be reused.
};
// the last two cases the object is kept intact.
return(:rozenElements;
}
bool denseElementsArePacked() const {
return getElementsHeader()->isPacked();
}
void markDenseElementsMaybeInIteration() {
}
}
/ Return whether the object's dense elements might be in the midst of for-in
// iteration. We rely on this to be able to safely delete or move dense array IsNativeObjectDynamicSlotsHeapSlot*slots){
// elements without worrying about updating in-progress iterators.
// See bug 690622.
//
/ Note that it's fine to return false if this object is on the prototype of
H elements java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
// from the iterated object itself.
inline bool denseElementsHaveMaybeInIterationFlag() returnelementsHeader /*
inlineinline bool IsNativeObjectDynamicElements(HeapSlot* elements) {
// Ensures that the object can hold at least index + extra elements. This
// returns DenseElement_Success on success, DenseElement_Failed on failure
the NativeObject theinternal nativeobject.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// the last two cases the object is kept intact.
inline DenseElementResult ensureDenseElements(JSContext* cx, uint32_t index,
uint32_t extra);
(JSContext*cx
uint32_t ,
;
/* Small objects are dense, no matter what. */
static const uint32_t MIN_SPARSE_INDEX = 1000;
/*
*Element for an object sparse iffewer than 1/ indexes
are filled in.
*/
static const unsigned SPARSE_DENSITY_RATIO = 8;
/*
*if object's elements will be too sparse.
* newElementsHint is an estimated number of elements to be added.
*/
bool willBeSparseElements( // Update the elements pointer touse thefixed elements storage. Thecaller
uint32_t newElementsHint);
/*
* After adding a sparse index to obj, see if it should be converted to use
* dense *or to dynamically allocated array.
*/
staticDenseElementResultmaybeDensifySparseElementsjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
JSContext* cx, Handle<NativeObject*> obj);
static(* N>obj;
inline HeapSlot* fixedElements() const {
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
when stored twojava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
e ObjectElements header");
return&)2;
}
#ifdef static_a(offsetOfShape( =offsetof(JS:shadow:Object,shape),
boolcanHaveNonEmptyElementsjava.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
ejava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
void setEmptyElements() { elements_ = emptyObjectElements; }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
fixed elementsstorage Thecaller
// is responsible for initializing the elements themselves and setting the
#ifdef
(();
elements_ =fixedElements(#se
}
inline
IsNativeObjectDynamicElementselements_);
}
inline bool hasFixedElements() const {
bool fixed = IsNativeObjectFixedElements(java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0
MOZ_ASSERT_IF(fixed, unshiftedElements() == java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 52
HeapSlotpslot=]
}
inline bool hasEmptyElements() const {
return IsNativeObjectEmptyElements(elements_);
}
/*
* Get a pointer java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* following SharedShape newShape,
* uint32_t ldSpan,
*/
inline uint8_t* fixedData(size_t nslots) const;
inline void privatePreWriteBarrier( getReservedSlotRef(slot).unbarrieredSet(cell;
// The methods below are used to store GC things in a reserved slot as
// PrivateValues. This is done to bypass the normal tracing code (debugger
// objects use this to store cross-compartment pointers).
/
/ WARNING: make sure you REALLY need this and you know what you're doing
// before using these methods!
uint32_t gc:*cell){
#fdef DEBUG
if (IsMarkedBlack(this)) {
/ -unbarrieredSet(UndefinedValue());
}
#endif
HeapSlot* }
Cell* prev = nullptr;
if (!pslot->isUndefined()) {
java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
privatePreWriteBarrier(pslot);
}
(slot )
gc:this ,cell;
}
void setReservedSlotGCThingAsPrivateUnbarriered(uint32_tMOZ_ASSERT( }
gc::Cell* cell) {
MOZ_ASSERT(slot < JSCLASS_RESERVED_SLOTS( /java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
Z_ASSERTcelljava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [57, 22) out of bounds for length 64
}
void : MOZ_ASSERTgetReservedSlot)||
MOZ_ASSERT(slot < JSCLASS_RESERVED_SLOTS(getClass()));
HeapSlot* pslot = &etReservedSlotRef(slot);
!pslot-isUndefined) java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
privatePreWriteBarrier(pslot);
pslot java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
#ifdef DEBUG
// avoids GC barriers. Use this only when storing a private value in a
// reserved slot that never holds a GC thing.
void setReservedSlotPrivateUnbarriered(uint32_t slot, void* v#ndif
MOZ_ASSERTslot<JSCLASS_RESERVED_SLOTS(getClass));
MOZ_ASSERT(getReservedSlot(slot).isUndefined() ||
[] staticbool toDictionaryMode(SContext*cxjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
( setEmptyDy(uint32_t;
}
// Like setReservedSlotPrivateUnbarriered but for PrivateUint32Value. }
void setReservedSlotPrivateUint32Unbarriered(uint32_t slot, uint32_t u) {
MOZ_ASSERT(slot <JSCLASS_RESERVED_SLOTS(());
MOZ_ASSERT(getReservedSlot(slot).isUndefined() ||
getReservedSlot(slot).isInt32());
(lot)unbarrieredSet(PrivateUint32Value bool hasUnpreservedWrapper) const {
}
eturn we would use if were totenurethisobject./
allocKindForTenure( const;
// Native objects are never wrappers, so a native object always has a realm
// and global.
()const{returnnonCCWRealm) java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
inline js::GlobalObject& global() const;
getTaggedSlotOffset(size_t slot) const {
MOZ_ASSERT(slot < slotSpan());
uint32_t nfixed = numFixedSlots();
(lot java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
* isFixedSlot = */ true);
}
)
/* isFixedSlot = */ false);
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [28, 6) out of bounds for length 38
return getClass()->preservesWrapper() &&
!)>:HasPreservedWrapper);
}
/* JIT Accessors */
static micSlotsint32_t numSlots)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
size_t offsetOfFixedElements
return ()+sizeof(bjectElements)
}
constexprsize_t getFixedSlotOffsetsize_t slot){
MOZ_ASSERT(slot < MAX_FIXED_SLOTS);
returnjava.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
static constexpr size_t java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 4
MOZ_ASSERT( > sizeof(ativeObject);
offset -= sizeof(NativeObject);
MOZ_ASSERT(offset % }
MOZ_ASSERT(offset / sizeof(Value) < MAX_FIXED_SLOTS);
return offset / sizeof(Value);
}
static
MOZ_ASSERT(offset % sizeof(Value) == 0);
return offset / sizeof(Value);
}
static size_t offsetOfSlots() {java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
;
NativeObject:H* java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
JS::shadow::Zone* shadowZoneboolisNumFixedSlots(uint32_t nfixed)constjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
if (shadowZone->needsMarkingBarrier() && /*
getClass()->hasTrace()) {
getClass()->doTrace(shadowZone->barrierTracer HandleId,
}
}
/*** Standard internal methods **********************************************/
/*
* These functions should follow the algorithms in ES2025 section 10.1
*"Object ".
*
* }
* have to serve publicjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 | | |