use of com.github.anba.es6draft.runtime.objects.bigint.BigIntPrototype in project es6draft by anba.
the class Realm method initializeBigIntModule.
/**
* <h1>Extension: BigInt</h1>
*
* @param realm
* the realm instance
*/
private static void initializeBigIntModule(Realm realm) {
EnumMap<Intrinsics, OrdinaryObject> intrinsics = realm.intrinsics;
// allocation phase
BigIntConstructor bigIntConstructor = new BigIntConstructor(realm);
BigIntPrototype bigIntPrototype = new BigIntPrototype(realm);
TypedArrayConstructor int64ArrayConstructor = new TypedArrayConstructor(realm, ElementType.BigInt64);
TypedArrayPrototype int64ArrayPrototype = new TypedArrayPrototype(realm, ElementType.BigInt64);
TypedArrayConstructor uint64ArrayConstructor = new TypedArrayConstructor(realm, ElementType.BigUint64);
TypedArrayPrototype uint64ArrayPrototype = new TypedArrayPrototype(realm, ElementType.BigUint64);
// registration phase
intrinsics.put(Intrinsics.BigInt, bigIntConstructor);
intrinsics.put(Intrinsics.BigIntPrototype, bigIntPrototype);
intrinsics.put(Intrinsics.BigInt64Array, int64ArrayConstructor);
intrinsics.put(Intrinsics.BigInt64ArrayPrototype, int64ArrayPrototype);
intrinsics.put(Intrinsics.BigUint64Array, uint64ArrayConstructor);
intrinsics.put(Intrinsics.BigUint64ArrayPrototype, uint64ArrayPrototype);
// initialization phase
bigIntConstructor.initialize(realm);
bigIntPrototype.initialize(realm);
int64ArrayConstructor.initialize(realm);
int64ArrayPrototype.initialize(realm);
uint64ArrayConstructor.initialize(realm);
uint64ArrayPrototype.initialize(realm);
}
Aggregations