Search in sources :

Example 1 with AsyncGeneratorFunctionConstructor

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

Aggregations

AsyncGeneratorFunctionConstructor (com.github.anba.es6draft.runtime.objects.async.iteration.AsyncGeneratorFunctionConstructor)1 AsyncGeneratorFunctionPrototype (com.github.anba.es6draft.runtime.objects.async.iteration.AsyncGeneratorFunctionPrototype)1 AsyncGeneratorPrototype (com.github.anba.es6draft.runtime.objects.async.iteration.AsyncGeneratorPrototype)1 AsyncIteratorPrototype (com.github.anba.es6draft.runtime.objects.async.iteration.AsyncIteratorPrototype)1 Intrinsics (com.github.anba.es6draft.runtime.types.Intrinsics)1 OrdinaryObject (com.github.anba.es6draft.runtime.types.builtins.OrdinaryObject)1