写点什么

Groovy 记录(2)-CompilationUnit

用户头像
闲云野鹤
关注
发布于: 刚刚
Groovy 记录(2)-CompilationUnit

编译的几个阶段


/** Opening of files and such */    public static final int INITIALIZATION = 1;    /** Lexing, parsing, and AST building */    public static final int PARSING = 2;    /** CST to AST conversion */    public static final int CONVERSION = 3;    /** AST semantic analysis and elucidation */    public static final int SEMANTIC_ANALYSIS = 4;    /** AST completion */    public static final int CANONICALIZATION = 5;    /** Class generation (pt.1) */    public static final int INSTRUCTION_SELECTION = 6;    /** Class generation (pt.2) */    public static final int CLASS_GENERATION = 7;   //    /** Output of class to disk */    public static final int OUTPUT = 8;    /** Cleanup */    public static final int FINALIZATION = 9;
/** Synonym for full compilation */ public static final int ALL = FINALIZATION;
复制代码


compile

(1)重启编译器,从 INITIALIZATION 阶段开始

(2)从第一个阶段依次执行操作,直到 Phases.ALL 结束,最后会回调 ProgressCallback.call 方法

用户头像

闲云野鹤

关注

州亦难添诗亦难改,然闲云孤鹤,何天而不可飞 2017.01.02 加入

闲言碎语,杂七杂八

评论

发布
暂无评论
Groovy 记录(2)-CompilationUnit