use of com.github.anba.es6draft.runtime.objects.atomics.SharedArrayBufferConstructor in project es6draft by anba.
the class Realm method initializeAtomicsModule.
/**
* <h1>Extension: Shared Memory and Atomics</h1>
*
* @param realm
* the realm instance
*/
private static void initializeAtomicsModule(Realm realm) {
EnumMap<Intrinsics, OrdinaryObject> intrinsics = realm.intrinsics;
// allocation phase
AtomicsObject atomicsObject = new AtomicsObject(realm);
SharedArrayBufferConstructor sharedArrayBufferConstructor = new SharedArrayBufferConstructor(realm);
SharedArrayBufferPrototype sharedArrayBufferPrototype = new SharedArrayBufferPrototype(realm);
// registration phase
intrinsics.put(Intrinsics.Atomics, atomicsObject);
intrinsics.put(Intrinsics.SharedArrayBuffer, sharedArrayBufferConstructor);
intrinsics.put(Intrinsics.SharedArrayBufferPrototype, sharedArrayBufferPrototype);
// initialization phase
atomicsObject.initialize(realm);
sharedArrayBufferConstructor.initialize(realm);
sharedArrayBufferPrototype.initialize(realm);
}
Aggregations