use of com.github.anba.es6draft.ast.MethodDefinition in project es6draft by anba.
the class FunctionCodeGenerator method generateClassCall.
private void generateClassCall(ClassDefinition node) {
MethodDefinition constructor = node.getConstructor();
MethodDefinition callConstructor = node.getCallConstructor();
MethodCode method = codegen.newMethod(constructor, FunctionName.Call);
InstructionVisitor mv = new CallMethodGenerator(method, targetName(constructor), targetType(constructor));
mv.lineInfo(callConstructor);
mv.begin();
generateFunctionCall(callConstructor, OrdinaryConstructorFunction.class, mv);
mv.end();
}
use of com.github.anba.es6draft.ast.MethodDefinition in project es6draft by anba.
the class FunctionCodeGenerator method generate.
void generate(ClassDefinition node, boolean tailCall, boolean tailConstruct) {
MethodDefinition constructor = node.getConstructor();
MethodDefinition callConstructor = node.getCallConstructor();
if (callConstructor == null) {
generateCall(constructor);
} else {
generateClassCall(node);
}
generateConstruct(constructor, tailConstruct);
}
Aggregations