Skip to content

Commit

Permalink
Update UglifyJS to 1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
lautis committed Dec 26, 2011
1 parent a358e5c commit f9a72a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions lib/uglify.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ var KEYWORDS = array_to_hash([
"catch",
"const",
"continue",
"debugger",
"default",
"delete",
"do",
Expand Down Expand Up @@ -143,7 +144,6 @@ var RESERVED_WORDS = array_to_hash([
"byte",
"char",
"class",
"debugger",
"double",
"enum",
"export",
Expand Down Expand Up @@ -1528,6 +1528,9 @@ function ast_walker() {
"function": function(name, args, body) {
return [ this[0], name, args.slice(), MAP(body, walk) ];
},
"debugger": function() {
return [ this[0] ];
},
"defun": function(name, args, body) {
return [ this[0], name, args.slice(), MAP(body, walk) ];
},
Expand Down Expand Up @@ -2199,17 +2202,15 @@ function prepare_ifs(ast) {

var conditional = walk(fi[1]);

var e_body = statements.slice(i + 1);
var e_body = redo_if(statements.slice(i + 1));
var e = e_body.length == 1 ? e_body[0] : [ "block", e_body ];

var ret = statements.slice(0, i).concat([ [
return statements.slice(0, i).concat([ [
fi[0], // "if"
conditional, // conditional
t, // then
e // else
] ]);

return redo_if(ret);
}

return statements;
Expand Down Expand Up @@ -2928,6 +2929,7 @@ function gen_code(ast, options) {
"string": encode_string,
"num": make_num,
"name": make_name,
"debugger": function(){ return "debugger" },
"toplevel": function(statements) {
return make_block_statements(statements)
.join(newline + newline);
Expand Down
2 changes: 1 addition & 1 deletion vendor/uglifyjs

0 comments on commit f9a72a7

Please sign in to comment.