Search in sources :

Example 1 with InstanceMethod

use of com.github.anba.es6draft.runtime.language.ClassOperations.InstanceMethod in project es6draft by anba.

the class ClassPropertyGenerator method methodDefinitions.

private OutlinedCall methodDefinitions(MethodDefinitionsMethod node, CodeVisitor mv) {
    MethodTypeDescriptor methodDescriptor = MethodDefinitionsCodeVisitor.methodDescriptor(mv);
    MethodCode method = codegen.method(mv, "mdef", methodDescriptor);
    return outlined(new MethodDefinitionsCodeVisitor(node, method, mv), body -> {
        Variable<OrdinaryConstructorFunction> function = body.getFunctionParameter();
        Variable<OrdinaryObject> proto = body.getPrototypeParameter();
        StoreToArray<Object> staticFields = this.staticFields.from(body.getStaticFieldsParameter());
        StoreToArray<Object> instanceFields = this.instanceFields.from(body.getInstanceFieldsParameter());
        StoreToArray<InstanceMethod> instanceMethods = this.instanceMethods.from(body.getInstanceMethodsParameter());
        StoreToArray<Object> decorators = this.decorators.from(body.getDecoratorsParameter());
        ClassPropertyEvaluation(codegen, classDefinition, node.getProperties(), function, proto, staticFields, instanceFields, instanceMethods, decorators, body);
        return Completion.Normal;
    });
}
Also used : OrdinaryConstructorFunction(com.github.anba.es6draft.runtime.types.builtins.OrdinaryConstructorFunction) OrdinaryObject(com.github.anba.es6draft.runtime.types.builtins.OrdinaryObject) OrdinaryObject(com.github.anba.es6draft.runtime.types.builtins.OrdinaryObject) MethodCode(com.github.anba.es6draft.compiler.assembler.Code.MethodCode) MethodTypeDescriptor(com.github.anba.es6draft.compiler.assembler.MethodTypeDescriptor) InstanceMethod(com.github.anba.es6draft.runtime.language.ClassOperations.InstanceMethod)

Aggregations

MethodCode (com.github.anba.es6draft.compiler.assembler.Code.MethodCode)1 MethodTypeDescriptor (com.github.anba.es6draft.compiler.assembler.MethodTypeDescriptor)1 InstanceMethod (com.github.anba.es6draft.runtime.language.ClassOperations.InstanceMethod)1 OrdinaryConstructorFunction (com.github.anba.es6draft.runtime.types.builtins.OrdinaryConstructorFunction)1 OrdinaryObject (com.github.anba.es6draft.runtime.types.builtins.OrdinaryObject)1