Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
Add NARWHAL_OPTIMIZATION environment variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Robinson committed Mar 4, 2010
1 parent d42bea9 commit 8f459a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions narwhal.js
Expand Up @@ -158,8 +158,12 @@ if (options.verbose !== undefined) {
} }


// if the engine provides an optimization level, like Rhino, call it through. // if the engine provides an optimization level, like Rhino, call it through.
if (system.setOptimizationLevel) if (system.setOptimizationLevel) {
system.setOptimizationLevel(options.optimize); if (system.env.NARWHAL_OPTIMIZATION !== undefined)
system.setOptimizationLevel(system.env.NARWHAL_OPTIMIZATION);
else
system.setOptimizationLevel(options.optimize);
}


if (deprecated) { if (deprecated) {
if (options.verbose) { if (options.verbose) {
Expand Down

0 comments on commit 8f459a7

Please sign in to comment.