JSAtom* atom that constructor return atom->isIndex(indexp);
}
// The methods below only create dense boxed arrays.
// Create a dense array with no capacity allocated, length set to 0, in the // normal (i.e. non-tenured) heap. extern ArrayObject* NewDenseEmptyArray(JSContextjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
// Create a dense array with no capacity allocated, length set to 0, in the // tenured heap. extern ArrayObject* NewTenuredDenseEmptyArray(JSContext* @canonicalSpeciesFunc_
// Create a dense array with a set length, but without allocating space for the // contents. This is useful, e.g., when accepting length from the user.
ArrayObject(
JSContext* cx, uint32_t length, NewObjectKind newKind = GenericObject);
// Create a dense array with length and capacity == 'length', initialized length // set to 0. extern ArrayObject* NewDenseFullyAllocatedArray(
JSContext* cx, uint32_t length, NewObjectKind newKind = GenericObject,
gc::AllocSite* site = nullptr);
// Create a dense array with length == 'length', initialized length set to 0, // and capacity == 'length' clamped to EagerAllocationMaxLength. externArrayObjectNewDensePartlyAllocatedArrayjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
JSContext* cx, uint32_t length, NewObjectKind newKind = GenericObject,
gc::AllocSite* site = nullptr);
// Like NewDensePartlyAllocatedArray, but the array will have |proto| as // prototype (or Array.prototype if |proto| is nullptr).
*(JSContext
uint32_t length,
HandleObject proto);
// Create a dense array from the given array values, which must be rooted. extern ArrayObject* NewDenseCopiedArray(JSContext* cx, uint32_t length, const Value* values,
* .
// Create a dense array from the given (linear)string values, which must be // rooted extern /Pointer Array Array
JSLinearString* values,
NewObjectKind newKindMOZ_INIT_OUTSIDE_CTORNativeObject*arrayConstructor_;
// Like NewDenseCopiedArray, but the array will have |proto| as prototype (or // Array.prototype if |proto| is nullptr). externArrayObject*NewDenseCopiedArrayWithProtoJSContextcx,uint32_t length
MOZ_INIT_OUTSIDE_CTOR ;
MOZ_INIT_OUTSIDE_CTOR;
// Create a dense array with the given shape and length. extern ArrayObject* NewDenseFullyAllocatedArrayWithShape(
* cx lengthHandle*> shape
externbool Disabled
uint64_tjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
extern (*cx objuint32_t
/* *Copy'length'elementsfromaobjtovp.// in a way that would disable this cache. * tryOptimizeArrayJSContext*cxArrayObject*array)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 *GetLengthPropertyonaobj.vpmustpointtorootedmemory.
*/ externbool GetElements(JSContext* cx, HandleObject aobj, uint32_t length,
js::Value* vp);
/* Natives exposed for optimization by the interpreter and JITs. */
// Pointer to canonical Array.prototype and Array.
MOZ_INIT_OUTSIDE_CTOR NativeObject* arrayProto_;
MOZ_INIT_OUTSIDE_CTOR NativeObject* arrayConstructor_;
// Shape of matching Array, and slot containing the @@species property, and // the canonical value.
MOZ_INIT_OUTSIDE_CTOR Shape* arrayConstructorShape_;
MOZ_INIT_OUTSIDE_CTOR uint32_t arraySpeciesGetterSlot_;
MOZ_INIT_OUTSIDE_CTOR JSFunction* canonicalSpeciesFunc_;
// Shape of matching Array.prototype object, and slot containing the // constructor for it.
MOZ_INIT_OUTSIDE_CTOR Shape* arrayProtoShape_;
MOZ_INIT_OUTSIDE_CTOR uint32_t arrayProtoConstructorSlot_;
enumclass State : uint8_t { // Flags marking the lazy initialization of the above fields.
Uninitialized,
Initialized,
// The disabled flag is set when we don't want to try optimizing // anymore because core objects were changed.
Disabled
};
State state_ = State::Uninitialized;
// Initialize the internal fields. void initialize(JSContext* cx);
// Reset the cache. void reset();
// Check if the global array-related objects have not been messed with // in a way that would disable this cache. bool isArrayStateStillSane();
public: /** Construct an |ArraySpeciesLookup| in the uninitialized state. */
ArraySpeciesLookup() { reset(); }
// Try to optimize the @@species lookup for an array. bool tryOptimizeArray(JSContext* cx, ArrayObject* array);
// Purge the cache and all info associated with it. void purge() { if (state_ == State::Initialized) {
reset();
}
}
};
bool IsArrayConstructor(const JSObject* obj);
} /* namespace js */
#endif/* builtin_Array_h */
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.8Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.