Search in sources :

Example 1 with AsyncFunctionConstructor

use of com.github.anba.es6draft.runtime.objects.async.AsyncFunctionConstructor 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);
}
Also used : Intrinsics(com.github.anba.es6draft.runtime.types.Intrinsics) AsyncFunctionConstructor(com.github.anba.es6draft.runtime.objects.async.AsyncFunctionConstructor) AsyncFunctionPrototype(com.github.anba.es6draft.runtime.objects.async.AsyncFunctionPrototype) OrdinaryObject(com.github.anba.es6draft.runtime.types.builtins.OrdinaryObject)

Aggregations

AsyncFunctionConstructor (com.github.anba.es6draft.runtime.objects.async.AsyncFunctionConstructor)1 AsyncFunctionPrototype (com.github.anba.es6draft.runtime.objects.async.AsyncFunctionPrototype)1 Intrinsics (com.github.anba.es6draft.runtime.types.Intrinsics)1 OrdinaryObject (com.github.anba.es6draft.runtime.types.builtins.OrdinaryObject)1