drop tmp. files
authorMihai Bazon <mihai@bazon.net>
Wed, 3 Oct 2012 09:49:33 +0000 (12:49 +0300)
committerMihai Bazon <mihai@bazon.net>
Wed, 3 Oct 2012 09:49:33 +0000 (12:49 +0300)
tmp/browser.js [deleted file]
tmp/index.html [deleted file]
tmp/test-maps.js [deleted file]
tmp/test-node.js [deleted file]
tmp/todo [deleted file]

diff --git a/tmp/browser.js b/tmp/browser.js
deleted file mode 100644 (file)
index 7972d34..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-var func = function TEST () {
-    
-};
-
-console.time("parse");
-var ast = parse(func.toString());
-console.timeEnd("parse");
-
-
-
-ast.walk({
-    _visit: function(node, descend) {
-        console.log(node);
-        console.log(node.TYPE, ":", node.start.pos);
-        if (descend) descend.call(node);
-    }
-});
diff --git a/tmp/index.html b/tmp/index.html
deleted file mode 100644 (file)
index b8380fc..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<script src="utils.js"></script>
-<script src="ast.js"></script>
-<script src="parse.js"></script>
-
-<script src="test.js"></script>
diff --git a/tmp/test-maps.js b/tmp/test-maps.js
deleted file mode 100755 (executable)
index 438d198..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /usr/bin/env node
-
-var sys = require("util");
-var fs = require("fs");
-
-var UglifyJS = require("../tools/node");
-
-var files = process.argv.slice(2);
-var map = UglifyJS.SourceMap();
-var output = UglifyJS.OutputStream({
-    beautify   : false,
-    source_map : map
-});
-
-function do_file(file) {
-    var code = fs.readFileSync(file, "utf8");
-
-    // parse
-    var ast = UglifyJS.parse(code);
-
-    // mangle
-    ast.figure_out_scope();
-    ast.mangle_names();
-
-    // compress
-    var compressor = UglifyJS.Compressor();
-    ast.squeeze(compressor);
-
-    // generate source into the output stream
-    // first reset the current file name in the source map.
-    UglifyJS.time_it("generate", function(){
-        map.set_source(file);
-        ast.print(output);
-    });
-};
-
-files.forEach(do_file);
-
-fs.writeFileSync("/tmp/source-map.json", map, "utf8");
-
-sys.print(output);
diff --git a/tmp/test-node.js b/tmp/test-node.js
deleted file mode 100755 (executable)
index f2e0626..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /usr/bin/env node
-
-var sys = require("util");
-var fs = require("fs");
-
-var UglifyJS = require("../tools/node");
-
-var filename = process.argv[2];
-var code = fs.readFileSync(filename, "utf8");
-
-var ast = UglifyJS.parse(code);
-
-var tt = new UglifyJS.TreeTransformer(
-    function before(node, descend) {
-        if (node instanceof UglifyJS.AST_Var) {
-            //return new UglifyJS.AST_EmptyStatement(node);
-            return UglifyJS.MAP.skip;
-        }
-    },
-    function after(node) {
-        console.log("After ", node.TYPE);
-    }
-);
-
-var x = ast.transform(tt);
-sys.print(x.print_to_string({ beautify: true }));
-
-// ast.figure_out_scope();
-// ast = ast.squeeze(UglifyJS.Compressor());
-
-// ast.compute_char_frequency();
-// UglifyJS.base54.sort();
-
-// ast.figure_out_scope();
-// ast.scope_warnings();
-// ast.mangle_names();
-
-// sys.error(UglifyJS.base54.get());
-// sys.print(ast.print_to_string({ beautify: true }));
diff --git a/tmp/todo b/tmp/todo
deleted file mode 100644 (file)
index b6f58db..0000000
--- a/tmp/todo
+++ /dev/null
@@ -1,79 +0,0 @@
-✓ a = a + x ==> a+=x
-
-*******
-
-✓ join consecutive var statements
-
-*******
-✓
-x == false ==> x == 0
-x == true  ==> x == 1
-
-should warn too;
-JS is so sloppy that this could be an indication of a bug.
-
-*******
-
-✓
-
-x, x ==> x
-x = foo, x ==> x
-
-other similar cases?
-
-*******
-
-Try to concatenate all scripts somehow before starting minification;
-the issue will be keeping track of the current source file for
-generating source maps.  perhaps store that in the AST?  Have a single
-AST_Toplevel for all files.
-
-XXX?  Not sure if this is worth the trouble.
-
-*******
-
-✓
-
-discard spurious break statements
-
-*******
-
-for (...) {
-  if (foo) continue;
-  ...
-}
-
-==>
-
-for (...) {
-  if (!foo) { ... }
-}
-
-*******
-
-The following seems to compress suboptimally.  Should probably run more
-passes somewhere.
-
-function setOpacity(el, o) {
-    if (o != null) {
-        if (o == "" && o != 0) {
-            is_ie
-                ? el.style.filter = ""
-                : el.style.opacity = "";
-        } else {
-            is_ie
-                ? el.style.filter = "alpha(opacity=" + Math.round(o * 100) + ")"
-                : el.style.opacity = o;
-        }
-        return o;
-    } else {
-        if (!is_ie)
-            return parseFloat(el.style.opacity);
-        else
-            if (/alpha\(opacity=([0-9.])+\)/.test(el.style.opacity))
-                return parseFloat(RegExp.$1);
-    }
-}
-
-*******
-