Skip to content

Commit 0a977a4

Browse files
committed
snapshot
1 parent 1e87ac7 commit 0a977a4

File tree

1 file changed

+47
-14
lines changed

1 file changed

+47
-14
lines changed

dist/r.js

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license r.js 2.0.2+ Mon, 18 Jun 2012 20:53:28 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
2+
* @license r.js 2.0.2+ Tue, 26 Jun 2012 23:04:40 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
33
* Available via the MIT or new BSD license.
44
* see: http://github.com/jrburke/requirejs for details
55
*/
@@ -20,7 +20,7 @@ var requirejs, require, define;
2020

2121
var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
2222
nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode,
23-
version = '2.0.2+ Mon, 18 Jun 2012 20:53:28 GMT',
23+
version = '2.0.2+ Tue, 26 Jun 2012 23:04:40 GMT',
2424
jsSuffixRegExp = /\.js$/,
2525
commandOption = '',
2626
useLibLoaded = {},
@@ -8031,7 +8031,8 @@ exports['ast_consolidate'] = function(oAbstractSyntaxTree) {
80318031
/* End: */
80328032
/* vim: set ft=javascript fenc=utf-8 et ts=2 sts=2 sw=2: */
80338033
/* :mode=javascript:noTabs=true:tabSize=2:indentSize=2:deepIndent=true: */
8034-
});define('uglifyjs/parse-js', ["exports"], function(exports) {
8034+
});
8035+
define('uglifyjs/parse-js', ["exports"], function(exports) {
80358036
/***********************************************************************
80368037

80378038
A JavaScript tokenizer / parser / beautifier / compressor.
@@ -9391,12 +9392,14 @@ exports.KEYWORDS = KEYWORDS;
93919392
exports.ATOMIC_START_TOKEN = ATOMIC_START_TOKEN;
93929393
exports.OPERATORS = OPERATORS;
93939394
exports.is_alphanumeric_char = is_alphanumeric_char;
9395+
exports.is_identifier_start = is_identifier_start;
9396+
exports.is_identifier_char = is_identifier_char;
93949397
exports.set_logger = function(logger) {
93959398
warn = logger;
93969399
};
9397-
});define('uglifyjs/squeeze-more', ["require", "exports", "module", "./parse-js", "./process"], function(require, exports, module) {
9398-
9399-
var jsp = require("./parse-js"),
9400+
});
9401+
define('uglifyjs/squeeze-more', ["require", "exports", "module", "./parse-js", "./process"], function(require, exports, module) {
9402+
var jsp = require("./parse-js"),
94009403
pro = require("./process"),
94019404
slice = jsp.slice,
94029405
member = jsp.member,
@@ -9470,7 +9473,9 @@ function ast_squeeze_more(ast) {
94709473
};
94719474

94729475
exports.ast_squeeze_more = ast_squeeze_more;
9473-
});define('uglifyjs/process', ["require", "exports", "module", "./parse-js", "./squeeze-more"], function(require, exports, module) {
9476+
});
9477+
define('uglifyjs/process', ["require", "exports", "module", "./parse-js", "./squeeze-more"], function(require, exports, module) {
9478+
94749479
/***********************************************************************
94759480

94769481
A JavaScript tokenizer / parser / beautifier / compressor.
@@ -9534,6 +9539,7 @@ exports.ast_squeeze_more = ast_squeeze_more;
95349539
var jsp = require("./parse-js"),
95359540
slice = jsp.slice,
95369541
member = jsp.member,
9542+
is_identifier_char = jsp.is_identifier_char,
95379543
PRECEDENCE = jsp.PRECEDENCE,
95389544
OPERATORS = jsp.OPERATORS;
95399545

@@ -9982,7 +9988,13 @@ function ast_add_scope(ast) {
99829988

99839989
function ast_mangle(ast, options) {
99849990
var w = ast_walker(), walk = w.walk, scope;
9985-
options = options || {};
9991+
options = defaults(options, {
9992+
mangle : true,
9993+
toplevel : false,
9994+
defines : null,
9995+
except : null,
9996+
no_functions : false
9997+
});
99869998

99879999
function get_mangled(name, newMangle) {
998810000
if (!options.mangle) return name;
@@ -10009,7 +10021,7 @@ function ast_mangle(ast, options) {
1000910021
};
1001010022

1001110023
function _lambda(name, args, body) {
10012-
if (!options.no_functions) {
10024+
if (!options.no_functions && options.mangle) {
1001310025
var is_defun = this[0] == "defun", extra;
1001410026
if (name) {
1001510027
if (is_defun) name = get_mangled(name);
@@ -10709,6 +10721,9 @@ function ast_squeeze(ast, options) {
1070910721
t = walk(t);
1071010722
e = walk(e);
1071110723

10724+
if (empty(e) && empty(t))
10725+
return [ "stat", c ];
10726+
1071210727
if (empty(t)) {
1071310728
c = negate(c);
1071410729
t = e;
@@ -10729,8 +10744,6 @@ function ast_squeeze(ast, options) {
1072910744
}
1073010745
})();
1073110746
}
10732-
if (empty(e) && empty(t))
10733-
return [ "stat", c ];
1073410747
var ret = [ "if", c, t, e ];
1073510748
if (t[0] == "if" && empty(t[3]) && empty(e)) {
1073610749
ret = best_of(ret, walk([ "if", [ "binary", "&&", c, t[1] ], t[2] ]));
@@ -10874,6 +10887,15 @@ function ast_squeeze(ast, options) {
1087410887
return expr[1];
1087510888
}
1087610889
return [ this[0], expr, MAP(args, walk) ];
10890+
},
10891+
"num": function (num) {
10892+
if (!isFinite(num))
10893+
return [ "binary", "/", num === 1 / 0
10894+
? [ "num", 1 ] : num === -1 / 0
10895+
? [ "unary-prefix", "-", [ "num", 1 ] ]
10896+
: [ "num", 0 ], [ "num", 0 ] ];
10897+
10898+
return [ this[0], num ];
1087710899
}
1087810900
}, function() {
1087910901
for (var i = 0; i < 2; ++i) {
@@ -10974,6 +10996,15 @@ function gen_code(ast, options) {
1097410996
finally { indentation -= incr; }
1097510997
};
1097610998

10999+
function last_char(str) {
11000+
str = str.toString();
11001+
return str.charAt(str.length - 1);
11002+
};
11003+
11004+
function first_char(str) {
11005+
return str.toString().charAt(0);
11006+
};
11007+
1097711008
function add_spaces(a) {
1097811009
if (beautify)
1097911010
return a.join(" ");
@@ -10982,7 +11013,8 @@ function gen_code(ast, options) {
1098211013
var next = a[i + 1];
1098311014
b.push(a[i]);
1098411015
if (next &&
10985-
((/[a-z0-9_\x24]$/i.test(a[i].toString()) && /^[a-z0-9_\x24]/i.test(next.toString())) ||
11016+
((is_identifier_char(last_char(a[i])) && (is_identifier_char(first_char(next))
11017+
|| first_char(next) == "\\")) ||
1098611018
(/[\+\-]$/.test(a[i].toString()) && /^[\+\-]/.test(next.toString())))) {
1098711019
b.push(" ");
1098811020
}
@@ -11042,7 +11074,7 @@ function gen_code(ast, options) {
1104211074
};
1104311075

1104411076
function make_num(num) {
11045-
var str = num.toString(10), a = [ str.replace(/^0\./, ".") ], m;
11077+
var str = num.toString(10), a = [ str.replace(/^0\./, ".").replace('e+', 'e') ], m;
1104611078
if (Math.floor(num) === num) {
1104711079
if (num >= 0) {
1104811080
a.push("0x" + num.toString(16).toLowerCase(), // probably pointless
@@ -11535,7 +11567,8 @@ exports.MAP = MAP;
1153511567

1153611568
// keep this last!
1153711569
exports.ast_squeeze_more = require("./squeeze-more").ast_squeeze_more;
11538-
});define('uglifyjs/index', ["require", "exports", "module", "./parse-js", "./process", "./consolidator"], function(require, exports, module) {
11570+
});
11571+
define('uglifyjs/index', ["require", "exports", "module", "./parse-js", "./process", "./consolidator"], function(require, exports, module) {
1153911572
//convienence function(src, [options]);
1154011573
function uglify(orig_code, options){
1154111574
options || (options = {});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy