use of com.github.anba.es6draft.runtime.objects.async.AsyncFunctionPrototype in project es6draft by anba.
the class Realm method initializeAsyncModule.
/**
* <h1>Extension: Async Function Declaration</h1>
*
* @param realm
* the realm instance
*/
private static void initializeAsyncModule(Realm realm) {
EnumMap<Intrinsics, OrdinaryObject> intrinsics = realm.intrinsics;
// allocation phase
AsyncFunctionConstructor asyncFunctionConstructor = new AsyncFunctionConstructor(realm);
AsyncFunctionPrototype asyncFunctionPrototype = new AsyncFunctionPrototype(realm);
// registration phase
intrinsics.put(Intrinsics.AsyncFunction, asyncFunctionConstructor);
intrinsics.put(Intrinsics.AsyncFunctionPrototype, asyncFunctionPrototype);
// initialization phase
asyncFunctionConstructor.initialize(realm);
asyncFunctionPrototype.initialize(realm);
}
Aggregations