{
return;
}
CompilerContext context = unit.getContext();
Context cx = context.getAscContext();
symbolTable.perCompileData.handler = cx.getHandler();
inheritSlots(unit, unit.types, symbolTable);
inheritSlots(unit, unit.namespaces, symbolTable);
// C: If --coach is turned on, do inheritSlots for unit.expressions here...
if (as3Configuration.strict() || as3Configuration.warnings())
{
inheritSlots(unit, unit.expressions, symbolTable);
}
if (as3Configuration.strict())
{
verifyImportPackages(unit.importPackageStatements, context);
verifyImportDefinitions(unit.importDefinitionStatements, context);
}
if (true /*configuration.metadataExport()*/ && ! unit.getSource().isInternal())
{
cx.pushScope(node.frame);
// C: for SWC generation, use debug(). this makes MetaDataEvaluator generate go-to-definition metadata.
// it's okay because compc doesn't use PostLink
// for debug-mode movies, MetaDataEvaluator will generate go-to-definition metadata.
// But PostLink will take them out.
macromedia.asc.parser.MetaDataEvaluator printer =
new macromedia.asc.parser.MetaDataEvaluator(as3Configuration.debug(), !as3Configuration.optimize());
node.evaluate(cx,printer);
if (as3Configuration.doc() && unit.getSource().isDebuggable())
{
StringBuilder out = new StringBuilder();
out.append("<asdoc>").append("\n");
ObjectList comments = printer.doccomments;
int numComments = comments.size();
for(int x = 0; x < numComments; x++)
{
((DocCommentNode) comments.get(x)).emit(cx,out);
}
out.append("\n").append("</asdoc>").append("\n");
}
cx.popScope();
}
if (ThreadLocalToolkit.errorCount() > 0)
{
return;
}
// run ConstantEvaluator
cx.pushScope(node.frame);
ConstantEvaluator analyzer = new ConstantEvaluator(cx);
context.setAttribute("ConstantEvaluator", analyzer);
analyzer.PreprocessDefinitionTypeInfo(cx, node);
cx.popScope();
if (ThreadLocalToolkit.errorCount() > 0)
{
return;
}