Permalink
Browse files

Add NARWHAL_OPTIMIZATION environment variable.

  • Loading branch information...
1 parent d42bea9 commit 8f459a79b0de5077bbe2a24ba6bd96005f6402cb Tom Robinson committed Mar 4, 2010
Showing with 6 additions and 2 deletions.
  1. +6 −2 narwhal.js
View
@@ -158,8 +158,12 @@ if (options.verbose !== undefined) {
}
// if the engine provides an optimization level, like Rhino, call it through.
-if (system.setOptimizationLevel)
- system.setOptimizationLevel(options.optimize);
+if (system.setOptimizationLevel) {
+ if (system.env.NARWHAL_OPTIMIZATION !== undefined)
+ system.setOptimizationLevel(system.env.NARWHAL_OPTIMIZATION);
+ else
+ system.setOptimizationLevel(options.optimize);
+}
if (deprecated) {
if (options.verbose) {

0 comments on commit 8f459a7

Please sign in to comment.