use of com.github.anba.es6draft.runtime.objects.async.iteration.AsyncGeneratorFunctionPrototype in project es6draft by anba.
the class Realm method initializeAsyncIterationModule.
/**
* <h1>Extension: Async Generator Function Declaration</h1>
*
* @param realm
* the realm instance
*/
private static void initializeAsyncIterationModule(Realm realm) {
EnumMap<Intrinsics, OrdinaryObject> intrinsics = realm.intrinsics;
// allocation phase
AsyncGeneratorFunctionConstructor asyncGenFunctionConstructor = new AsyncGeneratorFunctionConstructor(realm);
AsyncGeneratorPrototype asyncGeneratorPrototype = new AsyncGeneratorPrototype(realm);
AsyncGeneratorFunctionPrototype asyncGenerator = new AsyncGeneratorFunctionPrototype(realm);
AsyncIteratorPrototype asyncIteratorPrototype = new AsyncIteratorPrototype(realm);
// registration phase
intrinsics.put(Intrinsics.AsyncGeneratorFunction, asyncGenFunctionConstructor);
intrinsics.put(Intrinsics.AsyncGeneratorPrototype, asyncGeneratorPrototype);
intrinsics.put(Intrinsics.AsyncGenerator, asyncGenerator);
intrinsics.put(Intrinsics.AsyncIteratorPrototype, asyncIteratorPrototype);
// initialization phase
asyncGenFunctionConstructor.initialize(realm);
asyncGeneratorPrototype.initialize(realm);
asyncGenerator.initialize(realm);
asyncIteratorPrototype.initialize(realm);
}
Aggregations