Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add NARWHAL_OPTIMIZATION environment variable.

  • Loading branch information...
commit 8f459a79b0de5077bbe2a24ba6bd96005f6402cb 1 parent d42bea9
Tom Robinson authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 narwhal.js
View
8 narwhal.js
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.