Permalink
Browse files

advanced optimizations

  • Loading branch information...
1 parent 7ce415a commit 336ac114ffe50393228134962f84115584d1526f dyoo committed Feb 26, 2010
Showing with 38 additions and 1 deletion.
  1. +38 −0 bin/make-compressed.sh
  2. BIN lib/compiler.jar
  3. +0 −1 src/js-numbers.js
View
38 bin/make-compressed.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+
+# {{{ bindir
+# Make this PATH-independent
+saveP="$PATH"
+PATH="/usr/bin:/bin"
+
+# Remember current directory
+saveD=`pwd`
+
+# Find absolute path to this script,
+# resolving symbolic references to the end
+# (changes the current directory):
+D=`dirname "$0"`
+F=`basename "$0"`
+cd "$D"
+while test -L "$F"; do
+ P=`readlink "$F"`
+ D=`dirname "$P"`
+ F=`basename "$P"`
+ cd "$D"
+done
+D=`pwd`
+
+# Restore current directory
+cd "$saveD"
+
+bindir="$D"
+PATH="$saveP"
+
+
+
+ROOT="${bindir}/.."
+
+mkdir -p ${ROOT}/dist
+
+java -jar ${ROOT}/lib/compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --js ${ROOT}/src/js-numbers.js --js_output_file ${ROOT}/dist/js-numbers.js
View
BIN lib/compiler.jar
Binary file not shown.
View
1 src/js-numbers.js
@@ -246,7 +246,6 @@ if (! this['plt']['lib']['Numbers']) {
} else {
return Rational.makeInstance(x).expt(Rational.makeInstance(y));
}
- return Rational.makeInstance(x).expt(Rational.makeInstance(y));
}
return x.expt(y);
});

0 comments on commit 336ac11

Please sign in to comment.