acfc8c96 by Adam Heath

Disable optimization when loading r.js, as it has a method that is too

large when compiled as bytecode.
1 parent 2b75b07e
......@@ -97,7 +97,13 @@ public class Require {
if (configPath != null && configPath.length() > 0) {
container.processSource(cx, this, configPath);
}
cx.evaluateReader(this, new FileReader(rLocation.getPath()), "r.js", 1, null);
int optLevel = cx.getOptimizationLevel();
try {
cx.setOptimizationLevel(-1);
cx.evaluateReader(this, new FileReader(rLocation.getPath()), "r.js", 1, null);
} finally {
cx.setOptimizationLevel(optLevel);
}
return (Function) cx.evaluateString(this, "require", null, -1, null);
}
......