Use getProto and setProto helpers (#7675)

Depends on #7674.
This commit is contained in:
Justin Ridgewell 2018-04-06 02:54:08 +01:00 committed by GitHub
parent e9ed0f5f21
commit 450a1678f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
64 changed files with 117 additions and 126 deletions

View File

@ -11,7 +11,7 @@ function (_Bar) {
this;
};
return babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this, parentOptions));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this, parentOptions));
}
return Foo;

View File

@ -28,22 +28,14 @@ function isMemberExpressionSuper(node) {
*
* CLASS.prototype.__proto__ || Object.getPrototypeOf(CLASS.prototype)
*/
function getPrototypeOfExpression(objectRef, isStatic) {
function getPrototypeOfExpression(objectRef, isStatic, file) {
const targetRef = isStatic
? objectRef
: t.memberExpression(objectRef, t.identifier("prototype"));
return t.logicalExpression(
"||",
t.memberExpression(targetRef, t.identifier("__proto__")),
t.callExpression(
t.memberExpression(
t.identifier("Object"),
t.identifier("getPrototypeOf"),
),
[t.cloneNode(targetRef)],
),
);
return t.callExpression(file.addHelper("getPrototypeOf"), [
t.cloneNode(targetRef),
]);
}
const visitor = {
@ -160,7 +152,7 @@ export default class ReplaceSupers {
isComputed: boolean,
): Object {
return t.callExpression(this.file.addHelper("set"), [
getPrototypeOfExpression(this.getObjectRef(), this.isStatic),
getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file),
isComputed ? property : t.stringLiteral(property.name),
value,
t.thisExpression(),
@ -186,7 +178,7 @@ export default class ReplaceSupers {
}
return t.callExpression(this.file.addHelper("get"), [
getPrototypeOfExpression(this.getObjectRef(), this.isStatic),
getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file),
isComputed ? property : t.stringLiteral(property.name),
thisExpr,
]);

View File

@ -7,7 +7,7 @@ function (_Bar) {
var _temp, _this;
babelHelpers.classCallCheck(this, Foo);
return babelHelpers.possibleConstructorReturn(_this, (_temp = _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this, ...args)), _this.bar = "foo", _temp));
return babelHelpers.possibleConstructorReturn(_this, (_temp = _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this, ...args)), _this.bar = "foo", _temp));
}
return Foo;

View File

@ -7,7 +7,7 @@ function (_Parent) {
var _this;
babelHelpers.classCallCheck(this, Child);
_this = babelHelpers.possibleConstructorReturn(this, (Child.__proto__ || Object.getPrototypeOf(Child)).call(this));
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Child).call(this));
_this.scopedFunctionWithThis = function () {
_this.name = {};

View File

@ -8,7 +8,7 @@ function withContext(ComposedComponent) {
function WithContext() {
babelHelpers.classCallCheck(this, WithContext);
return babelHelpers.possibleConstructorReturn(this, (WithContext.__proto__ || Object.getPrototypeOf(WithContext)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(WithContext).apply(this, arguments));
}
return WithContext;

View File

@ -23,7 +23,7 @@ function (_A) {
var _temp, _this;
babelHelpers.classCallCheck(this, B);
return babelHelpers.possibleConstructorReturn(_this, (_temp = _this = babelHelpers.possibleConstructorReturn(this, (B.__proto__ || Object.getPrototypeOf(B)).call(this, ...args)), _this.foo = babelHelpers.get(B.prototype.__proto__ || Object.getPrototypeOf(B.prototype), "foo", babelHelpers.assertThisInitialized(_this)).call(_this), _temp));
return babelHelpers.possibleConstructorReturn(_this, (_temp = _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(B).call(this, ...args)), _this.foo = babelHelpers.get(babelHelpers.getPrototypeOf(B.prototype), "foo", babelHelpers.assertThisInitialized(_this)).call(_this), _temp));
}
return B;

View File

@ -7,7 +7,7 @@ function (_Bar) {
var _temp, _this;
babelHelpers.classCallCheck(this, Foo);
foo((_temp = _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this)), _this.bar = "foo", _temp));
foo((_temp = _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this)), _this.bar = "foo", _temp));
return _this;
}

View File

@ -7,7 +7,7 @@ function (_Bar) {
var _this;
babelHelpers.classCallCheck(this, Foo);
_this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
_this.bar = "foo";
return _this;
}

View File

@ -1,5 +1,5 @@
var A = function A(_force) {
babelHelpers.classCallCheck(this, A);
this.force = force;
this.foo = babelHelpers.get(A.prototype.__proto__ || Object.getPrototypeOf(A.prototype), "method", babelHelpers.assertThisInitialized(this)).call(this);
this.foo = babelHelpers.get(babelHelpers.getPrototypeOf(A.prototype), "method", babelHelpers.assertThisInitialized(this)).call(this);
};

View File

@ -7,7 +7,7 @@ function (_Bar) {
var _temp, _this;
babelHelpers.classCallCheck(this, Foo);
return babelHelpers.possibleConstructorReturn(_this, (_temp = _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this, ...args)), Object.defineProperty(babelHelpers.assertThisInitialized(_this), "bar", {
return babelHelpers.possibleConstructorReturn(_this, (_temp = _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this, ...args)), Object.defineProperty(babelHelpers.assertThisInitialized(_this), "bar", {
configurable: true,
enumerable: true,
writable: true,

View File

@ -7,7 +7,7 @@ function (_Parent) {
var _this;
babelHelpers.classCallCheck(this, Child);
_this = babelHelpers.possibleConstructorReturn(this, (Child.__proto__ || Object.getPrototypeOf(Child)).call(this));
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Child).call(this));
Object.defineProperty(babelHelpers.assertThisInitialized(_this), "scopedFunctionWithThis", {
configurable: true,
enumerable: true,

View File

@ -8,7 +8,7 @@ function withContext(ComposedComponent) {
function WithContext() {
babelHelpers.classCallCheck(this, WithContext);
return babelHelpers.possibleConstructorReturn(this, (WithContext.__proto__ || Object.getPrototypeOf(WithContext)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(WithContext).apply(this, arguments));
}
return WithContext;

View File

@ -23,11 +23,11 @@ function (_A) {
var _temp, _this;
babelHelpers.classCallCheck(this, B);
return babelHelpers.possibleConstructorReturn(_this, (_temp = _this = babelHelpers.possibleConstructorReturn(this, (B.__proto__ || Object.getPrototypeOf(B)).call(this, ...args)), Object.defineProperty(babelHelpers.assertThisInitialized(_this), "foo", {
return babelHelpers.possibleConstructorReturn(_this, (_temp = _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(B).call(this, ...args)), Object.defineProperty(babelHelpers.assertThisInitialized(_this), "foo", {
configurable: true,
enumerable: true,
writable: true,
value: babelHelpers.get(B.prototype.__proto__ || Object.getPrototypeOf(B.prototype), "foo", babelHelpers.assertThisInitialized(_this)).call(_this)
value: babelHelpers.get(babelHelpers.getPrototypeOf(B.prototype), "foo", babelHelpers.assertThisInitialized(_this)).call(_this)
}), _temp));
}

View File

@ -7,7 +7,7 @@ function (_Bar) {
var _temp, _this;
babelHelpers.classCallCheck(this, Foo);
foo((_temp = _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this)), Object.defineProperty(babelHelpers.assertThisInitialized(_this), "bar", {
foo((_temp = _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this)), Object.defineProperty(babelHelpers.assertThisInitialized(_this), "bar", {
configurable: true,
enumerable: true,
writable: true,

View File

@ -7,7 +7,7 @@ function (_Bar) {
var _this;
babelHelpers.classCallCheck(this, Foo);
_this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
Object.defineProperty(babelHelpers.assertThisInitialized(_this), "bar", {
configurable: true,
enumerable: true,

View File

@ -10,6 +10,6 @@ var A = function A(_force) {
configurable: true,
enumerable: true,
writable: true,
value: babelHelpers.get(A.prototype.__proto__ || Object.getPrototypeOf(A.prototype), "method", babelHelpers.assertThisInitialized(this)).call(this)
value: babelHelpers.get(babelHelpers.getPrototypeOf(A.prototype), "method", babelHelpers.assertThisInitialized(this)).call(this)
});
};

View File

@ -27,7 +27,7 @@ var Test = function Test() {
_inherits(Other, _Test);
function Other() {
var _ref;
var _getPrototypeOf2;
var _temp, _this;
@ -37,12 +37,12 @@ var Test = function Test() {
args[_key] = arguments[_key];
}
return _possibleConstructorReturn(_this, (_temp = _this = _possibleConstructorReturn(this, (_ref = Other.__proto__ || Object.getPrototypeOf(Other)).call.apply(_ref, [this].concat(args))), Object.defineProperty(_assertThisInitialized(_this), "a", {
return _possibleConstructorReturn(_this, (_temp = _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Other)).call.apply(_getPrototypeOf2, [this].concat(args))), Object.defineProperty(_assertThisInitialized(_this), "a", {
configurable: true,
enumerable: true,
writable: true,
value: function value() {
return _get(Other.prototype.__proto__ || Object.getPrototypeOf(Other.prototype), "test", _assertThisInitialized(_this));
return _get(_getPrototypeOf(Other.prototype), "test", _assertThisInitialized(_this));
}
}), _temp));
}
@ -55,7 +55,7 @@ var Test = function Test() {
enumerable: true,
writable: true,
value: function value() {
return _get(Test.prototype.__proto__ || Object.getPrototypeOf(Test.prototype), "test", _assertThisInitialized(_this2));
return _get(_getPrototypeOf(Test.prototype), "test", _assertThisInitialized(_this2));
}
});
};

View File

@ -8,7 +8,7 @@ function withContext(ComposedComponent) {
function WithContext() {
babelHelpers.classCallCheck(this, WithContext);
return babelHelpers.possibleConstructorReturn(this, (WithContext.__proto__ || Object.getPrototypeOf(WithContext)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(WithContext).apply(this, arguments));
}
return WithContext;

View File

@ -8,6 +8,8 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@ -35,7 +37,7 @@ function (_B) {
_classCallCheck(this, A);
_this = _possibleConstructorReturn(this, (A.__proto__ || Object.getPrototypeOf(A)).call(this));
_this = _possibleConstructorReturn(this, _getPrototypeOf(A).call(this));
_this.timestamp = timestamp;
_this.moment = moment(timestamp);
return _this;

View File

@ -349,20 +349,9 @@ export default function transformClass(
call = t.logicalExpression("||", bareSuperNode, t.thisExpression());
} else {
bareSuperNode = optimiseCall(
t.logicalExpression(
"||",
t.memberExpression(
t.cloneNode(classState.classRef),
t.identifier("__proto__"),
),
t.callExpression(
t.memberExpression(
t.identifier("Object"),
t.identifier("getPrototypeOf"),
),
[t.cloneNode(classState.classRef)],
),
),
t.callExpression(classState.file.addHelper("getPrototypeOf"), [
t.cloneNode(classState.classRef),
]),
t.thisExpression(),
bareSuperNode.arguments,
);

View File

@ -9,7 +9,7 @@ function (_Array) {
function List() {
babelHelpers.classCallCheck(this, List);
return babelHelpers.possibleConstructorReturn(this, (List.__proto__ || Object.getPrototypeOf(List)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(List).apply(this, arguments));
}
return List;

View File

@ -22,7 +22,7 @@ function (_Array) {
function List() {
_classCallCheck(this, List);
return _possibleConstructorReturn(this, (List.__proto__ || Object.getPrototypeOf(List)).apply(this, arguments));
return _possibleConstructorReturn(this, _getPrototypeOf(List).apply(this, arguments));
}
return List;

View File

@ -21,7 +21,7 @@ function (_EventEmitter) {
var _this;
babelHelpers.classCallCheck(this, Connection);
_this = babelHelpers.possibleConstructorReturn(this, (Connection.__proto__ || Object.getPrototypeOf(Connection)).call(this));
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Connection).call(this));
_this.isConnected = false;
_this.roomId = roomId; // ...

View File

@ -14,13 +14,13 @@ function (_BaseFoo) {
function SubFoo() {
babelHelpers.classCallCheck(this, SubFoo);
return babelHelpers.possibleConstructorReturn(this, (SubFoo.__proto__ || Object.getPrototypeOf(SubFoo)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(SubFoo).apply(this, arguments));
}
babelHelpers.createClass(SubFoo, null, [{
key: "talk",
value: function talk() {
babelHelpers.get(SubFoo.__proto__ || Object.getPrototypeOf(SubFoo), "talk", this).call(this);
babelHelpers.get(babelHelpers.getPrototypeOf(SubFoo), "talk", this).call(this);
console.log('SubFoo.talk');
}
}]);

View File

@ -14,7 +14,7 @@ function (_Component) {
function RandomComponent() {
babelHelpers.classCallCheck(this, RandomComponent);
return babelHelpers.possibleConstructorReturn(this, (RandomComponent.__proto__ || Object.getPrototypeOf(RandomComponent)).call(this));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(RandomComponent).call(this));
}
babelHelpers.createClass(RandomComponent, [{

View File

@ -18,7 +18,7 @@ function (_b) {
var _this;
babelHelpers.classCallCheck(this, a1);
_this = babelHelpers.possibleConstructorReturn(this, (a1.__proto__ || Object.getPrototypeOf(a1)).call(this));
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(a1).call(this));
_this.x = function () {
return babelHelpers.assertThisInitialized(_this);
@ -39,7 +39,7 @@ function (_b2) {
var _this2;
babelHelpers.classCallCheck(this, a2);
_this2 = babelHelpers.possibleConstructorReturn(this, (a2.__proto__ || Object.getPrototypeOf(a2)).call(this));
_this2 = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(a2).call(this));
_this2.x = function () {
return babelHelpers.assertThisInitialized(_this2);

View File

@ -7,7 +7,7 @@ function (_B) {
var _this;
babelHelpers.classCallCheck(this, A);
_this = babelHelpers.possibleConstructorReturn(this, (A.__proto__ || Object.getPrototypeOf(A)).call(this));
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(A).call(this));
_this.arrow1 = function (x) {
return x;

View File

@ -6,7 +6,7 @@ var x = {
function _class() {
babelHelpers.classCallCheck(this, _class);
return babelHelpers.possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(_class).apply(this, arguments));
}
return _class;

View File

@ -11,7 +11,7 @@ function (_A) {
var _this;
babelHelpers.classCallCheck(this, B);
return babelHelpers.possibleConstructorReturn(_this, _this = babelHelpers.possibleConstructorReturn(this, (B.__proto__ || Object.getPrototypeOf(B)).call(this)));
return babelHelpers.possibleConstructorReturn(_this, _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(B).call(this)));
}
return B;

View File

@ -4,6 +4,8 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@ -26,7 +28,7 @@ function (_B) {
_classCallCheck(this, A);
if (track !== undefined) _this = _possibleConstructorReturn(this, (A.__proto__ || Object.getPrototypeOf(A)).call(this, track));else _this = _possibleConstructorReturn(this, (A.__proto__ || Object.getPrototypeOf(A)).call(this));
if (track !== undefined) _this = _possibleConstructorReturn(this, _getPrototypeOf(A).call(this, track));else _this = _possibleConstructorReturn(this, _getPrototypeOf(A).call(this));
return _possibleConstructorReturn(_this);
}

View File

@ -4,19 +4,19 @@ function (_Foo) {
babelHelpers.inherits(Test, _Foo);
function Test() {
var _ref, _babelHelpers$get;
var _babelHelpers$getProt, _babelHelpers$get;
var _this;
babelHelpers.classCallCheck(this, Test);
woops.super.test();
_this = babelHelpers.possibleConstructorReturn(this, (Test.__proto__ || Object.getPrototypeOf(Test)).call(this));
babelHelpers.get(Test.prototype.__proto__ || Object.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(_this);
_this = babelHelpers.possibleConstructorReturn(this, (Test.__proto__ || Object.getPrototypeOf(Test)).apply(this, arguments));
_this = babelHelpers.possibleConstructorReturn(this, (_ref = Test.__proto__ || Object.getPrototypeOf(Test)).call.apply(_ref, [this, "test"].concat(Array.prototype.slice.call(arguments))));
babelHelpers.get(Test.prototype.__proto__ || Object.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).apply(_this, arguments);
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Test).call(this));
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(_this);
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Test).apply(this, arguments));
_this = babelHelpers.possibleConstructorReturn(this, (_babelHelpers$getProt = babelHelpers.getPrototypeOf(Test)).call.apply(_babelHelpers$getProt, [this, "test"].concat(Array.prototype.slice.call(arguments))));
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).apply(_this, arguments);
(_babelHelpers$get = babelHelpers.get(Test.prototype.__proto__ || Object.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this))).call.apply(_babelHelpers$get, [_this, "test"].concat(Array.prototype.slice.call(arguments)));
(_babelHelpers$get = babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this))).call.apply(_babelHelpers$get, [_this, "test"].concat(Array.prototype.slice.call(arguments)));
return _this;
}
@ -26,20 +26,20 @@ function (_Foo) {
value: function test() {
var _babelHelpers$get2;
babelHelpers.get(Test.prototype.__proto__ || Object.getPrototypeOf(Test.prototype), "test", this).call(this);
babelHelpers.get(Test.prototype.__proto__ || Object.getPrototypeOf(Test.prototype), "test", this).apply(this, arguments);
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", this).call(this);
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", this).apply(this, arguments);
(_babelHelpers$get2 = babelHelpers.get(Test.prototype.__proto__ || Object.getPrototypeOf(Test.prototype), "test", this)).call.apply(_babelHelpers$get2, [this, "test"].concat(Array.prototype.slice.call(arguments)));
(_babelHelpers$get2 = babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", this)).call.apply(_babelHelpers$get2, [this, "test"].concat(Array.prototype.slice.call(arguments)));
}
}], [{
key: "foo",
value: function foo() {
var _babelHelpers$get3;
babelHelpers.get(Test.__proto__ || Object.getPrototypeOf(Test), "foo", this).call(this);
babelHelpers.get(Test.__proto__ || Object.getPrototypeOf(Test), "foo", this).apply(this, arguments);
babelHelpers.get(babelHelpers.getPrototypeOf(Test), "foo", this).call(this);
babelHelpers.get(babelHelpers.getPrototypeOf(Test), "foo", this).apply(this, arguments);
(_babelHelpers$get3 = babelHelpers.get(Test.__proto__ || Object.getPrototypeOf(Test), "foo", this)).call.apply(_babelHelpers$get3, [this, "test"].concat(Array.prototype.slice.call(arguments)));
(_babelHelpers$get3 = babelHelpers.get(babelHelpers.getPrototypeOf(Test), "foo", this)).call.apply(_babelHelpers$get3, [this, "test"].concat(Array.prototype.slice.call(arguments)));
}
}]);
return Test;

View File

@ -7,9 +7,9 @@ function (_Foo) {
var _this;
babelHelpers.classCallCheck(this, Test);
_this = babelHelpers.possibleConstructorReturn(this, (Test.__proto__ || Object.getPrototypeOf(Test)).call(this));
babelHelpers.get(Test.prototype.__proto__ || Object.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this));
babelHelpers.get(Test.prototype.__proto__ || Object.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).whatever;
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Test).call(this));
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this));
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).whatever;
return _this;
}

View File

@ -7,16 +7,16 @@ function (_Foo) {
var _this;
babelHelpers.classCallCheck(this, Test);
_this = babelHelpers.possibleConstructorReturn(this, (Test.__proto__ || Object.getPrototypeOf(Test)).call(this));
babelHelpers.get(Test.prototype.__proto__ || Object.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).whatever();
babelHelpers.get(Test.prototype.__proto__ || Object.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(_this);
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Test).call(this));
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).whatever();
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(_this);
return _this;
}
babelHelpers.createClass(Test, null, [{
key: "test",
value: function test() {
return babelHelpers.get(Test.__proto__ || Object.getPrototypeOf(Test), "wow", this).call(this);
return babelHelpers.get(babelHelpers.getPrototypeOf(Test), "wow", this).call(this);
}
}]);
return Test;

View File

@ -12,7 +12,7 @@ function (_Bar) {
var _this;
babelHelpers.classCallCheck(this, Foo);
_this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
_this.state = "test";
return _this;
}

View File

@ -7,7 +7,7 @@ function (_Bar) {
var _this;
babelHelpers.classCallCheck(this, Foo);
return _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this, () => {
return _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this, () => {
_this.test;
}));
}

View File

@ -7,7 +7,7 @@ function (_Bar) {
var _this;
babelHelpers.classCallCheck(this, Foo);
if (eval("false")) _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
if (eval("false")) _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
return babelHelpers.possibleConstructorReturn(_this);
}

View File

@ -8,7 +8,7 @@ function (_Bar) {
babelHelpers.classCallCheck(this, Foo);
var fn = () => _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
var fn = () => _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
fn();
return babelHelpers.possibleConstructorReturn(_this);

View File

@ -8,7 +8,7 @@ function (_Bar) {
babelHelpers.classCallCheck(this, Foo);
var fn = () => _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
var fn = () => _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
return babelHelpers.possibleConstructorReturn(_this);
}

View File

@ -5,7 +5,7 @@ function (_A) {
function _default() {
babelHelpers.classCallCheck(this, _default);
return babelHelpers.possibleConstructorReturn(this, (_default.__proto__ || Object.getPrototypeOf(_default)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(_default).apply(this, arguments));
}
return _default;

View File

@ -5,7 +5,7 @@ function (_ref) {
function TestEmpty() {
babelHelpers.classCallCheck(this, TestEmpty);
return babelHelpers.possibleConstructorReturn(this, (TestEmpty.__proto__ || Object.getPrototypeOf(TestEmpty)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestEmpty).apply(this, arguments));
}
return TestEmpty;
@ -26,7 +26,7 @@ function (_ref2) {
function TestConstructorOnly() {
babelHelpers.classCallCheck(this, TestConstructorOnly);
return babelHelpers.possibleConstructorReturn(this, (TestConstructorOnly.__proto__ || Object.getPrototypeOf(TestConstructorOnly)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestConstructorOnly).apply(this, arguments));
}
return TestConstructorOnly;
@ -47,7 +47,7 @@ function (_ref3) {
function TestMethodOnly() {
babelHelpers.classCallCheck(this, TestMethodOnly);
return babelHelpers.possibleConstructorReturn(this, (TestMethodOnly.__proto__ || Object.getPrototypeOf(TestMethodOnly)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestMethodOnly).apply(this, arguments));
}
return TestMethodOnly;
@ -72,7 +72,7 @@ function (_ref4) {
function TestConstructorAndMethod() {
babelHelpers.classCallCheck(this, TestConstructorAndMethod);
return babelHelpers.possibleConstructorReturn(this, (TestConstructorAndMethod.__proto__ || Object.getPrototypeOf(TestConstructorAndMethod)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestConstructorAndMethod).apply(this, arguments));
}
return TestConstructorAndMethod;
@ -97,7 +97,7 @@ function (_ref5) {
function TestMultipleMethods() {
babelHelpers.classCallCheck(this, TestMultipleMethods);
return babelHelpers.possibleConstructorReturn(this, (TestMultipleMethods.__proto__ || Object.getPrototypeOf(TestMultipleMethods)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestMultipleMethods).apply(this, arguments));
}
return TestMultipleMethods;

View File

@ -5,7 +5,7 @@ function (_Chaplin$Controller) {
function BaseController() {
babelHelpers.classCallCheck(this, BaseController);
return babelHelpers.possibleConstructorReturn(this, (BaseController.__proto__ || Object.getPrototypeOf(BaseController)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(BaseController).apply(this, arguments));
}
return BaseController;
@ -18,7 +18,7 @@ function (_Chaplin$Controller$A) {
function BaseController2() {
babelHelpers.classCallCheck(this, BaseController2);
return babelHelpers.possibleConstructorReturn(this, (BaseController2.__proto__ || Object.getPrototypeOf(BaseController2)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(BaseController2).apply(this, arguments));
}
return BaseController2;

View File

@ -5,7 +5,7 @@ function (_Foo) {
function Test() {
babelHelpers.classCallCheck(this, Test);
return babelHelpers.possibleConstructorReturn(this, (Test.__proto__ || Object.getPrototypeOf(Test)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Test).apply(this, arguments));
}
return Test;

View File

@ -1,4 +1,4 @@
var Test = function Test() {
babelHelpers.classCallCheck(this, Test);
babelHelpers.get(Test.prototype.__proto__ || Object.getPrototypeOf(Test.prototype), "hasOwnProperty", babelHelpers.assertThisInitialized(this)).call(this, "test");
babelHelpers.get(babelHelpers.getPrototypeOf(Test.prototype), "hasOwnProperty", babelHelpers.assertThisInitialized(this)).call(this, "test");
};

View File

@ -22,7 +22,7 @@ function (_Bar) {
_classCallCheck(this, Foo);
_get(Foo.prototype.__proto__ || Object.getPrototypeOf(Foo.prototype), "foo", _assertThisInitialized(_this)).call(_this, _this = _possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this)));
_get(_getPrototypeOf(Foo.prototype), "foo", _assertThisInitialized(_this)).call(_this, _this = _possibleConstructorReturn(this, _getPrototypeOf(Foo).call(this)));
return _this;
}

View File

@ -22,9 +22,9 @@ function (_Bar) {
_classCallCheck(this, Foo);
_get(Foo.prototype.__proto__ || Object.getPrototypeOf(Foo.prototype), "foo", _assertThisInitialized(_this)).call(_this);
_get(_getPrototypeOf(Foo.prototype), "foo", _assertThisInitialized(_this)).call(_this);
return _this = _possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
return _this = _possibleConstructorReturn(this, _getPrototypeOf(Foo).call(this));
}
return Foo;

View File

@ -8,10 +8,10 @@ function (_Bar) {
babelHelpers.classCallCheck(this, Foo);
var t = () => babelHelpers.get(Foo.prototype.__proto__ || Object.getPrototypeOf(Foo.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(_this);
var t = () => babelHelpers.get(babelHelpers.getPrototypeOf(Foo.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(_this);
babelHelpers.get(Foo.prototype.__proto__ || Object.getPrototypeOf(Foo.prototype), "foo", babelHelpers.assertThisInitialized(_this)).call(_this);
return _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
babelHelpers.get(babelHelpers.getPrototypeOf(Foo.prototype), "foo", babelHelpers.assertThisInitialized(_this)).call(_this);
return _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
}
return Foo;

View File

@ -8,9 +8,9 @@ function (_Bar) {
babelHelpers.classCallCheck(this, Foo);
var t = () => babelHelpers.get(Foo.prototype.__proto__ || Object.getPrototypeOf(Foo.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(_this);
var t = () => babelHelpers.get(babelHelpers.getPrototypeOf(Foo.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(_this);
_this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
t();
return _this;
}

View File

@ -8,9 +8,9 @@ function (_Bar) {
babelHelpers.classCallCheck(this, Foo);
var t = () => babelHelpers.get(Foo.prototype.__proto__ || Object.getPrototypeOf(Foo.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(_this);
var t = () => babelHelpers.get(babelHelpers.getPrototypeOf(Foo.prototype), "test", babelHelpers.assertThisInitialized(_this)).call(_this);
return _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
return _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
}
return Foo;

View File

@ -7,7 +7,7 @@ function (_Bar) {
var _this;
babelHelpers.classCallCheck(this, Foo);
babelHelpers.get(Foo.prototype.__proto__ || Object.getPrototypeOf(Foo.prototype), (_this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this))).method, babelHelpers.assertThisInitialized(_this)).call(_this);
babelHelpers.get(babelHelpers.getPrototypeOf(Foo.prototype), (_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this))).method, babelHelpers.assertThisInitialized(_this)).call(_this);
return _this;
}

View File

@ -7,7 +7,7 @@ function (_Bar) {
var _this;
babelHelpers.classCallCheck(this, Foo);
return _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this, babelHelpers.assertThisInitialized(_this)));
return _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this, babelHelpers.assertThisInitialized(_this)));
}
return Foo;

View File

@ -11,7 +11,7 @@ function (_Bar) {
var fn = () => babelHelpers.assertThisInitialized(_this);
fn();
return _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
return _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
}
return Foo;

View File

@ -10,7 +10,7 @@ function (_Bar) {
var fn = () => babelHelpers.assertThisInitialized(_this);
_this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
_this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
fn();
return _this;
}

View File

@ -8,7 +8,7 @@ function (_Bar) {
babelHelpers.classCallCheck(this, Foo);
_this.foo = "bar";
return _this = babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).call(this));
return _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).call(this));
}
return Foo;

View File

@ -10,7 +10,7 @@ foo = _obj = {
bar() {
var _ref;
return _ref = _get(_obj.__proto__ || Object.getPrototypeOf(_obj), "baz", this), _set(_obj.__proto__ || Object.getPrototypeOf(_obj), "baz", Math.pow(_ref, 12), this);
return _ref = _get(_getPrototypeOf(_obj), "baz", this), _set(_getPrototypeOf(_obj), "baz", Math.pow(_ref, 12), this);
}
};

View File

@ -14,7 +14,7 @@ function (_React$Component) {
function Login() {
babelHelpers.classCallCheck(this, Login);
return babelHelpers.possibleConstructorReturn(this, (Login.__proto__ || Object.getPrototypeOf(Login)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Login).apply(this, arguments));
}
babelHelpers.createClass(Login, [{

View File

@ -2,6 +2,6 @@ var _obj;
var o = _obj = {
m: function () {
return babelHelpers.get(_obj.__proto__ || Object.getPrototypeOf(_obj), "x", this);
return babelHelpers.get(babelHelpers.getPrototypeOf(_obj), "x", this);
}
};

View File

@ -10,6 +10,6 @@ foo = _obj = {
bar: function () {
var _ref;
return _ref = _get(_obj.__proto__ || Object.getPrototypeOf(_obj), "baz", this), _set(_obj.__proto__ || Object.getPrototypeOf(_obj), "baz", _ref ** 12, this);
return _ref = _get(_getPrototypeOf(_obj), "baz", this), _set(_getPrototypeOf(_obj), "baz", _ref ** 12, this);
}
};

View File

@ -7,7 +7,7 @@ function broken(x) {
function Foo() {
babelHelpers.classCallCheck(this, Foo);
return babelHelpers.possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Foo).apply(this, arguments));
}
return Foo;

View File

@ -21,6 +21,8 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.getPrototypeOf || function _getPrototypeOf(o) { return o.__proto__; }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
@ -33,7 +35,7 @@ function (_Component) {
_inherits(App, _Component);
function App() {
var _ref;
var _getPrototypeOf2;
var _temp, _this;
@ -43,7 +45,7 @@ function (_Component) {
args[_key] = arguments[_key];
}
return _possibleConstructorReturn(_this, (_temp = _this = _possibleConstructorReturn(this, (_ref = App.__proto__ || Object.getPrototypeOf(App)).call.apply(_ref, [this].concat(args))), Object.defineProperty(_assertThisInitialized(_this), "exportType", {
return _possibleConstructorReturn(_this, (_temp = _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(App)).call.apply(_getPrototypeOf2, [this].concat(args))), Object.defineProperty(_assertThisInitialized(_this), "exportType", {
configurable: true,
enumerable: true,
writable: true,

View File

@ -13,7 +13,7 @@ function (_React$Component) {
function App() {
babelHelpers.classCallCheck(this, App);
return babelHelpers.possibleConstructorReturn(this, (App.__proto__ || Object.getPrototypeOf(App)).apply(this, arguments));
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(App).apply(this, arguments));
}
babelHelpers.createClass(App, [{

View File

@ -2,6 +2,8 @@ var _classCallCheck = require("@babel/runtime/helpers/builtin/es6/classCallCheck
var _possibleConstructorReturn = require("@babel/runtime/helpers/builtin/es6/possibleConstructorReturn");
var _getPrototypeOf = require("@babel/runtime/helpers/builtin/es6/getPrototypeOf");
var _inherits = require("@babel/runtime/helpers/builtin/es6/inherits");
let Foo =
@ -12,7 +14,7 @@ function (_Bar) {
function Foo() {
_classCallCheck(this, Foo);
return _possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).apply(this, arguments));
return _possibleConstructorReturn(this, _getPrototypeOf(Foo).apply(this, arguments));
}
return Foo;

View File

@ -2,6 +2,8 @@ var _classCallCheck = require("@babel/runtime/helpers/builtin/classCallCheck");
var _possibleConstructorReturn = require("@babel/runtime/helpers/builtin/possibleConstructorReturn");
var _getPrototypeOf = require("@babel/runtime/helpers/builtin/getPrototypeOf");
var _inherits = require("@babel/runtime/helpers/builtin/inherits");
let Foo =
@ -12,7 +14,7 @@ function (_Bar) {
function Foo() {
_classCallCheck(this, Foo);
return _possibleConstructorReturn(this, (Foo.__proto__ || Object.getPrototypeOf(Foo)).apply(this, arguments));
return _possibleConstructorReturn(this, _getPrototypeOf(Foo).apply(this, arguments));
}
return Foo;

View File

@ -1,9 +1,9 @@
var _Object$getPrototypeOf = require("@babel/runtime/core-js/object/get-prototype-of");
var _classCallCheck = require("@babel/runtime/helpers/es6/classCallCheck");
var _possibleConstructorReturn = require("@babel/runtime/helpers/es6/possibleConstructorReturn");
var _getPrototypeOf = require("@babel/runtime/helpers/es6/getPrototypeOf");
var _inherits = require("@babel/runtime/helpers/es6/inherits");
let Foo =
@ -14,7 +14,7 @@ function (_Bar) {
function Foo() {
_classCallCheck(this, Foo);
return _possibleConstructorReturn(this, (Foo.__proto__ || _Object$getPrototypeOf(Foo)).apply(this, arguments));
return _possibleConstructorReturn(this, _getPrototypeOf(Foo).apply(this, arguments));
}
return Foo;

View File

@ -26,7 +26,7 @@ function (_Date) {
function MyDate(time) {
_classCallCheck(this, MyDate);
return _possibleConstructorReturn(this, (MyDate.__proto__ || Object.getPrototypeOf(MyDate)).call(this, time));
return _possibleConstructorReturn(this, _getPrototypeOf(MyDate).call(this, time));
}
return MyDate;