use of com.github.anba.es6draft.compiler.StatementGenerator.Completion in project es6draft by anba.
the class CodeGenerator method generatorBody.
private boolean generatorBody(FunctionNode node) {
MethodCode method = newMethod(node, FunctionName.Code);
GeneratorCodeVisitor body = new GeneratorCodeVisitor(method, node);
body.lineInfo(node);
body.begin();
GeneratorState generatorState = body.generatorPrologue();
body.enterFunction(node);
Completion result = statements(node.getStatements(), body);
body.exitFunction();
if (!result.isAbrupt()) {
// fall-thru, return undefined from function
body.loadUndefined();
body._return();
}
body.generatorEpilogue(generatorState);
body.end();
return body.hasTailCalls();
}
Aggregations