首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GWT maven编译的默认优化级别是多少?

GWT maven编译的默认优化级别是多少?
EN

Stack Overflow用户
提问于 2013-01-17 00:25:56
回答 2查看 1.8K关注 0票数 1

根据Maven GWT Plugin docs,默认优化级别为-1。目前还不清楚这与哪个优化级别相对应。那么,-1是否意味着代码在0到9之间的某个级别进行了优化?或者是完全不同的东西?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-01-17 00:33:16

GWT有9种不同的优化技巧,从级别1到级别9,除了常规的编译器级别的东西。但是,我们可以通过将其设置为0来选择退出这些优化。正如代码中注释的那样,不建议这样做。

您可能可以从ArgHandlerOptimize.java中的GWT源代码中获得更多信息。

代码语言:javascript
复制
 @Override
  public String getPurpose() {
    return "Sets the optimization level used by the compiler.  0=none 9=maximum.";
  }

来自ArgHandlerOptimize.java的注释部分

代码语言:javascript
复制
 * Set the optimization level from the command line.  For now, level 1 is the same
 * as draft compile, and level 9 is the same as the default (maximium optimization).
 * 
 * TODO(zundel): In theory, a level 0 should be possible, where all optimizers 
 * are eliminated for the fastest possible compile.  In practice, code generation 
 * depends on some optimizers being run.
票数 3
EN

Stack Overflow用户

发布于 2013-01-17 00:32:09

这意味着它使用来自GWT编译器的默认值。我相信默认值是9。

请参阅https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging#DevGuideCompilerOptions

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14363018

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档