Permalink
Browse files

Update UglifyJS to 1.2.3

  • Loading branch information...
1 parent a358e5c commit f9a72a7311c61710f510659bce1038a73e43c90c @lautis committed Dec 26, 2011
Showing with 8 additions and 6 deletions.
  1. +7 −5 lib/uglify.js
  2. +1 −1 vendor/uglifyjs
View
@@ -115,6 +115,7 @@ var KEYWORDS = array_to_hash([
"catch",
"const",
"continue",
+ "debugger",
"default",
"delete",
"do",
@@ -143,7 +144,6 @@ var RESERVED_WORDS = array_to_hash([
"byte",
"char",
"class",
- "debugger",
"double",
"enum",
"export",
@@ -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) ];
},
@@ -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;
@@ -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);

0 comments on commit f9a72a7

Please sign in to comment.