org.mozilla.javascript.Context.checkOptimizationLevel()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 JavaScript  
字(6.9k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中org.mozilla.javascript.Context.checkOptimizationLevel()方法的一些代码示例,展示了Context.checkOptimizationLevel()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.checkOptimizationLevel()方法的具体详情如下:
包路径:org.mozilla.javascript.Context
类名称:Context
方法名:checkOptimizationLevel

Context.checkOptimizationLevel介绍

暂无

代码示例

代码示例来源:origin: rhino/js

public void setOptimizationLevel(int level)
{
  Context.checkOptimizationLevel(level);
  this.optimizationLevel = level;
}

代码示例来源:origin: geogebra/geogebra

public void setOptimizationLevel(int level)
{
  Context.checkOptimizationLevel(level);
  this.optimizationLevel = level;
}

代码示例来源:origin: io.apigee/rhino

public void setOptimizationLevel(int level)
{
  Context.checkOptimizationLevel(level);
  this.optimizationLevel = level;
}

代码示例来源:origin: com.sun.phobos/phobos-rhino

public void setOptimizationLevel(int level)
{
  Context.checkOptimizationLevel(level);
  this.optimizationLevel = level;
}

代码示例来源:origin: com.github.tntim96/rhino

public void setOptimizationLevel(int level)
{
  Context.checkOptimizationLevel(level);
  this.optimizationLevel = level;
}

代码示例来源:origin: ro.isdc.wro4j/rhino

public void setOptimizationLevel(int level)
{
  Context.checkOptimizationLevel(level);
  this.optimizationLevel = level;
}

代码示例来源:origin: ro.isdc.wro4j/rhino

public void setOptimizationLevel(int optimizationLevel)
{
  Context.checkOptimizationLevel(optimizationLevel);
  checkNotSealed();
  this.optimizationLevel = optimizationLevel;
}

代码示例来源:origin: com.github.tntim96/rhino

public void setOptimizationLevel(int optimizationLevel)
{
  Context.checkOptimizationLevel(optimizationLevel);
  checkNotSealed();
  this.optimizationLevel = optimizationLevel;
}

代码示例来源:origin: com.github.tntim96/rhino

/**
 * Set the current optimization level.
 * <p>
 * The optimization level is expected to be an integer between -1 and
 * 9. Any negative values will be interpreted as -1, and any values
 * greater than 9 will be interpreted as 9.
 * An optimization level of -1 indicates that interpretive mode will
 * always be used. Levels 0 through 9 indicate that class files may
 * be generated. Higher optimization levels trade off compile time
 * performance for runtime performance.
 * The optimizer level can't be set greater than -1 if the optimizer
 * package doesn't exist at run time.
 * @param optimizationLevel an integer indicating the level of
 *        optimization to perform
 * @since 1.3
 *
 */
public final void setOptimizationLevel(int optimizationLevel)
{
  if (sealed) onSealedMutation();
  if (optimizationLevel == -2) {
    // To be compatible with Cocoon fork
    optimizationLevel = -1;
  }
  checkOptimizationLevel(optimizationLevel);
  if (codegenClass == null)
    optimizationLevel = -1;
  this.optimizationLevel = optimizationLevel;
}

代码示例来源:origin: rhino/js

/**
 * Set the current optimization level.
 * <p>
 * The optimization level is expected to be an integer between -1 and
 * 9. Any negative values will be interpreted as -1, and any values
 * greater than 9 will be interpreted as 9.
 * An optimization level of -1 indicates that interpretive mode will
 * always be used. Levels 0 through 9 indicate that class files may
 * be generated. Higher optimization levels trade off compile time
 * performance for runtime performance.
 * The optimizer level can't be set greater than -1 if the optimizer
 * package doesn't exist at run time.
 * @param optimizationLevel an integer indicating the level of
 *        optimization to perform
 * @since 1.3
 *
 */
public final void setOptimizationLevel(int optimizationLevel)
{
  if (sealed) onSealedMutation();
  if (optimizationLevel == -2) {
    // To be compatible with Cocoon fork
    optimizationLevel = -1;
  }
  checkOptimizationLevel(optimizationLevel);
  if (codegenClass == null)
    optimizationLevel = -1;
  this.optimizationLevel = optimizationLevel;
}

代码示例来源:origin: geogebra/geogebra

/**
 * Set the current optimization level.
 * <p>
 * The optimization level is expected to be an integer between -1 and
 * 9. Any negative values will be interpreted as -1, and any values
 * greater than 9 will be interpreted as 9.
 * An optimization level of -1 indicates that interpretive mode will
 * always be used. Levels 0 through 9 indicate that class files may
 * be generated. Higher optimization levels trade off compile time
 * performance for runtime performance.
 * The optimizer level can't be set greater than -1 if the optimizer
 * package doesn't exist at run time.
 * @param optimizationLevel an integer indicating the level of
 *        optimization to perform
 * @since 1.3
 *
 */
public final void setOptimizationLevel(int optimizationLevel)
{
  if (sealed) onSealedMutation();
  if (optimizationLevel == -2) {
    // To be compatible with Cocoon fork
    optimizationLevel = -1;
  }
  checkOptimizationLevel(optimizationLevel);
  if (codegenClass == null)
    optimizationLevel = -1;
  this.optimizationLevel = optimizationLevel;
}

代码示例来源:origin: io.apigee/rhino

/**
 * Set the current optimization level.
 * <p>
 * The optimization level is expected to be an integer between -1 and
 * 9. Any negative values will be interpreted as -1, and any values
 * greater than 9 will be interpreted as 9.
 * An optimization level of -1 indicates that interpretive mode will
 * always be used. Levels 0 through 9 indicate that class files may
 * be generated. Higher optimization levels trade off compile time
 * performance for runtime performance.
 * The optimizer level can't be set greater than -1 if the optimizer
 * package doesn't exist at run time.
 * @param optimizationLevel an integer indicating the level of
 *        optimization to perform
 * @since 1.3
 *
 */
public final void setOptimizationLevel(int optimizationLevel)
{
  if (sealed) onSealedMutation();
  if (optimizationLevel == -2) {
    // To be compatible with Cocoon fork
    optimizationLevel = -1;
  }
  checkOptimizationLevel(optimizationLevel);
  if (codegenClass == null)
    optimizationLevel = -1;
  this.optimizationLevel = optimizationLevel;
}

代码示例来源:origin: ro.isdc.wro4j/rhino

/**
 * Set the current optimization level.
 * <p>
 * The optimization level is expected to be an integer between -1 and
 * 9. Any negative values will be interpreted as -1, and any values
 * greater than 9 will be interpreted as 9.
 * An optimization level of -1 indicates that interpretive mode will
 * always be used. Levels 0 through 9 indicate that class files may
 * be generated. Higher optimization levels trade off compile time
 * performance for runtime performance.
 * The optimizer level can't be set greater than -1 if the optimizer
 * package doesn't exist at run time.
 * @param optimizationLevel an integer indicating the level of
 *        optimization to perform
 * @since 1.3
 *
 */
public final void setOptimizationLevel(int optimizationLevel)
{
  if (sealed) onSealedMutation();
  if (optimizationLevel == -2) {
    // To be compatible with Cocoon fork
    optimizationLevel = -1;
  }
  checkOptimizationLevel(optimizationLevel);
  if (codegenClass == null)
    optimizationLevel = -1;
  this.optimizationLevel = optimizationLevel;
}

代码示例来源:origin: com.sun.phobos/phobos-rhino

/**
 * Set the current optimization level.
 * <p>
 * The optimization level is expected to be an integer between -1 and
 * 9. Any negative values will be interpreted as -1, and any values
 * greater than 9 will be interpreted as 9.
 * An optimization level of -1 indicates that interpretive mode will
 * always be used. Levels 0 through 9 indicate that class files may
 * be generated. Higher optimization levels trade off compile time
 * performance for runtime performance.
 * The optimizer level can't be set greater than -1 if the optimizer
 * package doesn't exist at run time.
 * @param optimizationLevel an integer indicating the level of
 *        optimization to perform
 * @since 1.3
 *
 */
public final void setOptimizationLevel(int optimizationLevel)
{
  if (sealed) onSealedMutation();
  if (optimizationLevel == -2) {
    // To be compatible with Cocoon fork
    optimizationLevel = -1;
  }
  checkOptimizationLevel(optimizationLevel);
  if (codegenClass == null)
    optimizationLevel = -1;
  this.optimizationLevel = optimizationLevel;
}

相关文章

微信公众号

Context类方法