Search in sources :

Example 1 with PromiseConstructor

use of com.github.anba.es6draft.runtime.objects.promise.PromiseConstructor in project es6draft by anba.

the class Realm method initializePromiseObjects.

/**
     * <h1>25 Control Abstraction Objects</h1><br>
     * <h2>25.4 Promise Objects</h2>
     * 
     * @param realm
     *            the realm instance
     */
private static void initializePromiseObjects(Realm realm) {
    EnumMap<Intrinsics, OrdinaryObject> intrinsics = realm.intrinsics;
    // allocation phase
    PromiseConstructor promiseConstructor = new PromiseConstructor(realm);
    PromisePrototype promisePrototype = new PromisePrototype(realm);
    // registration phase
    intrinsics.put(Intrinsics.Promise, promiseConstructor);
    intrinsics.put(Intrinsics.PromisePrototype, promisePrototype);
    // initialization phase
    promiseConstructor.initialize(realm);
    promisePrototype.initialize(realm);
}
Also used : PromiseConstructor(com.github.anba.es6draft.runtime.objects.promise.PromiseConstructor) PromisePrototype(com.github.anba.es6draft.runtime.objects.promise.PromisePrototype) Intrinsics(com.github.anba.es6draft.runtime.types.Intrinsics) OrdinaryObject(com.github.anba.es6draft.runtime.types.builtins.OrdinaryObject)

Aggregations

PromiseConstructor (com.github.anba.es6draft.runtime.objects.promise.PromiseConstructor)1 PromisePrototype (com.github.anba.es6draft.runtime.objects.promise.PromisePrototype)1 Intrinsics (com.github.anba.es6draft.runtime.types.Intrinsics)1 OrdinaryObject (com.github.anba.es6draft.runtime.types.builtins.OrdinaryObject)1