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 { ...@@ -97,7 +97,13 @@ public class Require {
97 if (configPath != null && configPath.length() > 0) { 97 if (configPath != null && configPath.length() > 0) {
98 container.processSource(cx, this, configPath); 98 container.processSource(cx, this, configPath);
99 } 99 }
100 cx.evaluateReader(this, new FileReader(rLocation.getPath()), "r.js", 1, null); 100 int optLevel = cx.getOptimizationLevel();
101 try {
102 cx.setOptimizationLevel(-1);
103 cx.evaluateReader(this, new FileReader(rLocation.getPath()), "r.js", 1, null);
104 } finally {
105 cx.setOptimizationLevel(optLevel);
106 }
101 return (Function) cx.evaluateString(this, "require", null, -1, null); 107 return (Function) cx.evaluateString(this, "require", null, -1, null);
102 } 108 }
103 109
......