support for CallExpression in Scope.prototype.generateUidBasedOnNode

This commit is contained in:
Sebastian McKenzie
2015-01-04 07:59:43 +11:00
parent 0c0f40d14a
commit 7f4efecb7d
5 changed files with 31 additions and 44 deletions

View File

@@ -22,8 +22,8 @@ var Test = (function () {
_Foo.prototype.test.call(this);
foob(_Foo);
_Foo.call.apply(null, [this].concat(_slice.call(arguments)));
_Foo.call.apply(null, [this, "test"].concat(_slice.call(arguments)));
_Foo.call.apply(_Foo, [this].concat(_slice.call(arguments)));
_Foo.call.apply(_Foo, [this, "test"].concat(_slice.call(arguments)));
(_Foo$prototype$test = _Foo.prototype.test).call.apply(_Foo$prototype$test, [this].concat(_slice.call(arguments)));
(_Foo$prototype$test2 = _Foo.prototype.test).call.apply(_Foo$prototype$test2, [this, "test"].concat(_slice.call(arguments)));

View File

@@ -1,6 +1,6 @@
"use strict";
var _foo, _foo$bar, _foo2;
var _foo, _foo$bar, _foo$bar2;
var _defaults = function (obj, defaults) {
for (var key in defaults) {
if (obj[key] === undefined) {
@@ -15,4 +15,4 @@ console.log((_foo = foo, _defaults(_foo, bar), _foo));
console.log((_foo$bar = foo[bar], _defaults(_foo$bar, bar), _foo$bar));
console.log((_foo2 = foo[bar()], _defaults(_foo2, bar), _foo2));
console.log((_foo$bar2 = foo[bar()], _defaults(_foo$bar2, bar), _foo$bar2));

View File

@@ -1,6 +1,6 @@
"use strict";
var _obj2, _obj4, _ref2, _obj6, _ref4;
var _obj2, _obj4, _x2, _obj$y2, _x4;
var _hasOwn = Object.prototype.hasOwnProperty;
var obj = {};
@@ -11,17 +11,17 @@ if (!_hasOwn.call(_obj, "x")) _obj.x = 2;
console.log((_obj2 = obj, !_hasOwn.call(_obj2, "x") && (_obj2.x = 2), _obj2.x));
var _obj3 = obj;
var _ref = x();
var _x = x();
if (!_hasOwn.call(_obj3, _ref)) _obj3[_ref] = 2;
if (!_hasOwn.call(_obj3, _x)) _obj3[_x] = 2;
console.log((_obj4 = obj, _ref2 = x(), !_hasOwn.call(_obj4, _ref2) && (_obj4[_ref2] = 2), _obj4[_ref2]));
console.log((_obj4 = obj, _x2 = x(), !_hasOwn.call(_obj4, _x2) && (_obj4[_x2] = 2), _obj4[_x2]));
var _obj5 = obj[y()];
var _ref3 = x();
var _obj$y = obj[y()];
var _x3 = x();
if (!_hasOwn.call(_obj5, _ref3)) _obj5[_ref3] = 2;
if (!_hasOwn.call(_obj$y, _x3)) _obj$y[_x3] = 2;
console.log((_obj6 = obj[y()], _ref4 = x(), !_hasOwn.call(_obj6, _ref4) && (_obj6[_ref4] = 2), _obj6[_ref4]));
console.log((_obj$y2 = obj[y()], _x4 = x(), !_hasOwn.call(_obj$y2, _x4) && (_obj$y2[_x4] = 2), _obj$y2[_x4]));

View File

@@ -1,11 +1,11 @@
"use strict";
var _obj, _obj2, _obj$foo, _obj$foo2, _obj3, _args, _args2, _args3;
var _obj, _obj2, _obj$foo, _obj$foo2, _obj$foo3, _args, _args2, _args3;
var fn = (_obj = obj, _obj.method.bind(_obj));
var fn = (_obj2 = obj, _obj2.method.bind(_obj2, "foob"));
var fn = (_obj$foo = obj[foo], _obj$foo.method.bind(_obj$foo));
var fn = (_obj$foo2 = obj.foo, _obj$foo2.method.bind(_obj$foo2));
var fn = (_obj3 = obj[foo()], _obj3.method.bind(_obj3));
var fn = (_obj$foo3 = obj[foo()], _obj$foo3.method.bind(_obj$foo3));
["foo", "bar"].map((_args = [], function (_val) {
return _val.toUpperCase();