From ba548dfd3224bf4029724e4db773008e93b6c74e Mon Sep 17 00:00:00 2001 From: Evan Wallace Date: Wed, 15 May 2024 14:50:29 -0400 Subject: [PATCH] move decorator initializer list to after the class --- .../snapshots/snapshots_lower.txt | 24 +- internal/js_parser/js_parser_lower_class.go | 2 +- internal/js_parser/js_parser_test.go | 14 +- internal/js_parser/ts_parser_test.go | 14 +- scripts/decorator-tests.js | 330 +++++++++--------- 5 files changed, 192 insertions(+), 192 deletions(-) diff --git a/internal/bundler_tests/snapshots/snapshots_lower.txt b/internal/bundler_tests/snapshots/snapshots_lower.txt index 6416316fb8b..ef5fff29b87 100644 --- a/internal/bundler_tests/snapshots/snapshots_lower.txt +++ b/internal/bundler_tests/snapshots/snapshots_lower.txt @@ -624,13 +624,13 @@ TestJavaScriptDecoratorsBundleIssue3768 ---------- /out/base-instance-accessor.js ---------- // base-instance-accessor.js var _foo_dec, _init, _foo; -_init = [, , ,]; _foo_dec = [dec]; var _Foo = class _Foo { constructor() { __privateAdd(this, _foo, __runInitializers(_init, 6, this, _Foo)), __runInitializers(_init, 9, this); } }; +_init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 4, "foo", _foo_dec, _Foo, _foo); var Foo = _Foo; @@ -638,20 +638,19 @@ var Foo = _Foo; ---------- /out/base-instance-field.js ---------- // base-instance-field.js var _foo_dec, _init; -_init = [, , ,]; _foo_dec = [dec]; var _Foo = class _Foo { constructor() { __publicField(this, "foo", __runInitializers(_init, 6, this, _Foo)), __runInitializers(_init, 9, this); } }; +_init = [, , ,]; __decorateElement(_init, 5, "foo", _foo_dec, _Foo); var Foo = _Foo; ---------- /out/base-instance-method.js ---------- // base-instance-method.js var _foo_dec, _init; -_init = [, , ,]; _foo_dec = [dec]; var _Foo = class _Foo { constructor() { @@ -661,16 +660,17 @@ var _Foo = class _Foo { return _Foo; } }; +_init = [, , ,]; __decorateElement(_init, 1, "foo", _foo_dec, _Foo); var Foo = _Foo; ---------- /out/base-static-accessor.js ---------- // base-static-accessor.js var _foo_dec, _init, _foo; -_init = [, , ,]; _foo_dec = [dec]; var _Foo = class _Foo { }; +_init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 12, "foo", _foo_dec, _Foo, _foo); __privateAdd(_Foo, _foo, __runInitializers(_init, 6, _Foo, _Foo)), __runInitializers(_init, 9, _Foo); @@ -679,10 +679,10 @@ var Foo = _Foo; ---------- /out/base-static-field.js ---------- // base-static-field.js var _foo_dec, _init; -_init = [, , ,]; _foo_dec = [dec]; var _Foo = class _Foo { }; +_init = [, , ,]; __decorateElement(_init, 13, "foo", _foo_dec, _Foo); __publicField(_Foo, "foo", __runInitializers(_init, 6, _Foo, _Foo)), __runInitializers(_init, 9, _Foo); var Foo = _Foo; @@ -690,13 +690,13 @@ var Foo = _Foo; ---------- /out/base-static-method.js ---------- // base-static-method.js var _foo_dec, _init; -_init = [, , ,]; _foo_dec = [dec]; var _Foo = class _Foo { static foo() { return _Foo; } }; +_init = [, , ,]; __decorateElement(_init, 9, "foo", _foo_dec, _Foo); __runInitializers(_init, 3, _Foo); var Foo = _Foo; @@ -704,13 +704,13 @@ var Foo = _Foo; ---------- /out/derived-instance-accessor.js ---------- // derived-instance-accessor.js var _foo_dec, _a, _init, _foo; -_init = [, , ,]; var _Foo = class _Foo extends (_a = Bar, _foo_dec = [dec], _a) { constructor() { super(...arguments); __privateAdd(this, _foo, __runInitializers(_init, 6, this, _Foo)), __runInitializers(_init, 9, this); } }; +_init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 4, "foo", _foo_dec, _Foo, _foo); var Foo = _Foo; @@ -718,20 +718,19 @@ var Foo = _Foo; ---------- /out/derived-instance-field.js ---------- // derived-instance-field.js var _foo_dec, _a, _init; -_init = [, , ,]; var _Foo = class _Foo extends (_a = Bar, _foo_dec = [dec], _a) { constructor() { super(...arguments); __publicField(this, "foo", __runInitializers(_init, 6, this, _Foo)), __runInitializers(_init, 9, this); } }; +_init = [, , ,]; __decorateElement(_init, 5, "foo", _foo_dec, _Foo); var Foo = _Foo; ---------- /out/derived-instance-method.js ---------- // derived-instance-method.js var _foo_dec, _a, _init; -_init = [, , ,]; var _Foo = class _Foo extends (_a = Bar, _foo_dec = [dec], _a) { constructor() { super(...arguments); @@ -741,15 +740,16 @@ var _Foo = class _Foo extends (_a = Bar, _foo_dec = [dec], _a) { return _Foo; } }; +_init = [, , ,]; __decorateElement(_init, 1, "foo", _foo_dec, _Foo); var Foo = _Foo; ---------- /out/derived-static-accessor.js ---------- // derived-static-accessor.js var _foo_dec, _a, _init, _foo; -_init = [, , ,]; var _Foo = class _Foo extends (_a = Bar, _foo_dec = [dec], _a) { }; +_init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 12, "foo", _foo_dec, _Foo, _foo); __privateAdd(_Foo, _foo, __runInitializers(_init, 6, _Foo, _Foo)), __runInitializers(_init, 9, _Foo); @@ -758,9 +758,9 @@ var Foo = _Foo; ---------- /out/derived-static-field.js ---------- // derived-static-field.js var _foo_dec, _a, _init; -_init = [, , ,]; var _Foo = class _Foo extends (_a = Bar, _foo_dec = [dec], _a) { }; +_init = [, , ,]; __decorateElement(_init, 13, "foo", _foo_dec, _Foo); __publicField(_Foo, "foo", __runInitializers(_init, 6, _Foo, _Foo)), __runInitializers(_init, 9, _Foo); var Foo = _Foo; @@ -768,12 +768,12 @@ var Foo = _Foo; ---------- /out/derived-static-method.js ---------- // derived-static-method.js var _foo_dec, _a, _init; -_init = [, , ,]; var _Foo = class _Foo extends (_a = Bar, _foo_dec = [dec], _a) { static foo() { return _Foo; } }; +_init = [, , ,]; __decorateElement(_init, 9, "foo", _foo_dec, _Foo); __runInitializers(_init, 3, _Foo); var Foo = _Foo; diff --git a/internal/js_parser/js_parser_lower_class.go b/internal/js_parser/js_parser_lower_class.go index 68fa323dcc2..47e863848a4 100644 --- a/internal/js_parser/js_parser_lower_class.go +++ b/internal/js_parser/js_parser_lower_class.go @@ -2145,7 +2145,7 @@ func (ctx *lowerClassContext) finishAndGenerateCode(p *parser, result visitClass // If there are JavaScript decorators, start by allocating a context object if ctx.decoratorContextRef != ast.InvalidRef { - prefixExprs = append(prefixExprs, js_ast.Assign( + suffixExprs = append(suffixExprs, js_ast.Assign( js_ast.Expr{Loc: ctx.classLoc, Data: &js_ast.EIdentifier{Ref: ctx.decoratorContextRef}}, js_ast.Expr{Loc: ctx.classLoc, Data: &js_ast.EArray{IsSingleLine: true, Items: []js_ast.Expr{ {Loc: ctx.classLoc, Data: js_ast.EMissingShared}, // classExtraInitializers diff --git a/internal/js_parser/js_parser_test.go b/internal/js_parser/js_parser_test.go index 8e91bcc5260..e023095866b 100644 --- a/internal/js_parser/js_parser_test.go +++ b/internal/js_parser/js_parser_test.go @@ -2074,27 +2074,26 @@ func TestDecorators(t *testing.T) { expectPrintedWithUnsupportedFeatures(t, compat.Decorators, "@dec class Foo {}", `var _Foo_decorators, _init; -_init = [, , ,]; _Foo_decorators = [dec]; class Foo { } +_init = [, , ,]; Foo = __decorateElement(_init, 0, "Foo", _Foo_decorators, Foo); __runInitializers(_init, 1, Foo); `) expectPrintedWithUnsupportedFeatures(t, compat.Decorators, "class Foo { @dec x }", `var _x_dec, _init; -_init = [, , ,]; _x_dec = [dec]; class Foo { constructor() { __publicField(this, "x", __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } +_init = [, , ,]; __decorateElement(_init, 5, "x", _x_dec, Foo); `) expectPrintedWithUnsupportedFeatures(t, compat.Decorators, "class Foo { @dec x() {} }", `var _x_dec, _init; -_init = [, , ,]; _x_dec = [dec]; class Foo { constructor() { @@ -2103,46 +2102,47 @@ class Foo { x() { } } +_init = [, , ,]; __decorateElement(_init, 1, "x", _x_dec, Foo); `) expectPrintedWithUnsupportedFeatures(t, compat.Decorators, "class Foo { @dec accessor x }", `var _x_dec, _init, _x; -_init = [, , ,]; _x_dec = [dec]; class Foo { constructor() { __privateAdd(this, _x, __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } +_init = [, , ,]; _x = new WeakMap(); __decorateElement(_init, 4, "x", _x_dec, Foo, _x); `) expectPrintedWithUnsupportedFeatures(t, compat.Decorators, "class Foo { @dec static x }", `var _x_dec, _init; -_init = [, , ,]; _x_dec = [dec]; class Foo { } +_init = [, , ,]; __decorateElement(_init, 13, "x", _x_dec, Foo); __publicField(Foo, "x", __runInitializers(_init, 6, Foo)), __runInitializers(_init, 9, Foo); `) expectPrintedWithUnsupportedFeatures(t, compat.Decorators, "class Foo { @dec static x() {} }", `var _x_dec, _init; -_init = [, , ,]; _x_dec = [dec]; class Foo { static x() { } } +_init = [, , ,]; __decorateElement(_init, 9, "x", _x_dec, Foo); __runInitializers(_init, 3, Foo); `) expectPrintedWithUnsupportedFeatures(t, compat.Decorators, "class Foo { @dec static accessor x }", `var _x_dec, _init, _x; -_init = [, , ,]; _x_dec = [dec]; class Foo { } +_init = [, , ,]; _x = new WeakMap(); __decorateElement(_init, 12, "x", _x_dec, Foo, _x); __privateAdd(Foo, _x, __runInitializers(_init, 6, Foo)), __runInitializers(_init, 9, Foo); diff --git a/internal/js_parser/ts_parser_test.go b/internal/js_parser/ts_parser_test.go index 2b7d5cdd34e..39d50befe65 100644 --- a/internal/js_parser/ts_parser_test.go +++ b/internal/js_parser/ts_parser_test.go @@ -2119,27 +2119,26 @@ func TestTSDecorators(t *testing.T) { expectPrintedWithUnsupportedFeaturesTS(t, compat.Decorators, "@dec class Foo {}", `var _Foo_decorators, _init; -_init = [, , ,]; _Foo_decorators = [dec]; class Foo { } +_init = [, , ,]; Foo = __decorateElement(_init, 0, "Foo", _Foo_decorators, Foo); __runInitializers(_init, 1, Foo); `) expectPrintedWithUnsupportedFeaturesTS(t, compat.Decorators, "class Foo { @dec x }", `var _x_dec, _init; -_init = [, , ,]; _x_dec = [dec]; class Foo { constructor() { __publicField(this, "x", __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } +_init = [, , ,]; __decorateElement(_init, 5, "x", _x_dec, Foo); `) expectPrintedWithUnsupportedFeaturesTS(t, compat.Decorators, "class Foo { @dec x() {} }", `var _x_dec, _init; -_init = [, , ,]; _x_dec = [dec]; class Foo { constructor() { @@ -2148,46 +2147,47 @@ class Foo { x() { } } +_init = [, , ,]; __decorateElement(_init, 1, "x", _x_dec, Foo); `) expectPrintedWithUnsupportedFeaturesTS(t, compat.Decorators, "class Foo { @dec accessor x }", `var _x_dec, _init, _x; -_init = [, , ,]; _x_dec = [dec]; class Foo { constructor() { __privateAdd(this, _x, __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } +_init = [, , ,]; _x = new WeakMap(); __decorateElement(_init, 4, "x", _x_dec, Foo, _x); `) expectPrintedWithUnsupportedFeaturesTS(t, compat.Decorators, "class Foo { @dec static x }", `var _x_dec, _init; -_init = [, , ,]; _x_dec = [dec]; class Foo { } +_init = [, , ,]; __decorateElement(_init, 13, "x", _x_dec, Foo); __publicField(Foo, "x", __runInitializers(_init, 6, Foo)), __runInitializers(_init, 9, Foo); `) expectPrintedWithUnsupportedFeaturesTS(t, compat.Decorators, "class Foo { @dec static x() {} }", `var _x_dec, _init; -_init = [, , ,]; _x_dec = [dec]; class Foo { static x() { } } +_init = [, , ,]; __decorateElement(_init, 9, "x", _x_dec, Foo); __runInitializers(_init, 3, Foo); `) expectPrintedWithUnsupportedFeaturesTS(t, compat.Decorators, "class Foo { @dec static accessor x }", `var _x_dec, _init, _x; -_init = [, , ,]; _x_dec = [dec]; class Foo { } +_init = [, , ,]; _x = new WeakMap(); __decorateElement(_init, 12, "x", _x_dec, Foo, _x); __privateAdd(Foo, _x, __runInitializers(_init, 6, Foo)), __runInitializers(_init, 9, Foo); diff --git a/scripts/decorator-tests.js b/scripts/decorator-tests.js index 9ac783afd88..858e3009aee 100644 --- a/scripts/decorator-tests.js +++ b/scripts/decorator-tests.js @@ -58,10 +58,10 @@ const tests = { assertEq(() => "access" in ctx, false); old = cls; }; - _init = [, , ,]; _Foo_decorators = [dec]; class Foo2 { } + _init = [, , ,]; Foo2 = __decorateElement(_init, 0, "Foo", _Foo_decorators, Foo2); __runInitializers(_init, 1, Foo2); assertEq(() => Foo2, old); @@ -79,8 +79,8 @@ const tests = { assertEq(() => "access" in ctx, false); old = cls; }; - const Foo2 = /* @__PURE__ */ ((x) => x)((_init = [, , ,], _class_decorators = [dec], _a = class { - }, _a = __decorateElement(_init, 0, "", _class_decorators, _a), __runInitializers(_init, 1, _a), _a)); + const Foo2 = /* @__PURE__ */ ((x) => x)((_class_decorators = [dec], _a = class { + }, _init = [, , ,], _a = __decorateElement(_init, 0, "", _class_decorators, _a), __runInitializers(_init, 1, _a), _a)); assertEq(() => Foo2, old); }, "Class decorators: Basic expression: Property value": () => { @@ -97,8 +97,8 @@ const tests = { old = cls; }; const obj = { - Foo: (_init = [, , ,], _Foo_decorators = [dec], _a = class { - }, _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a) + Foo: (_Foo_decorators = [dec], _a = class { + }, _init = [, , ,], _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a) }; assertEq(() => obj.Foo, old); }, @@ -115,8 +115,8 @@ const tests = { assertEq(() => "access" in ctx, false); old = cls; }; - const Foo2 = (_init = [, , ,], _Foo_decorators = [dec], _a = class { - }, _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a); + const Foo2 = (_Foo_decorators = [dec], _a = class { + }, _init = [, , ,], _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a); assertEq(() => Foo2, old); }, "Class decorators: Basic expression: Array binding": () => { @@ -132,8 +132,8 @@ const tests = { assertEq(() => "access" in ctx, false); old = cls; }; - const [Foo2 = (_init = [, , ,], _Foo_decorators = [dec], _a = class { - }, _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a)] = []; + const [Foo2 = (_Foo_decorators = [dec], _a = class { + }, _init = [, , ,], _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a)] = []; assertEq(() => Foo2, old); }, "Class decorators: Basic expression: Object binding": () => { @@ -149,8 +149,8 @@ const tests = { assertEq(() => "access" in ctx, false); old = cls; }; - const { Foo: Foo2 = (_init = [, , ,], _Foo_decorators = [dec], _a = class { - }, _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a) } = {}; + const { Foo: Foo2 = (_Foo_decorators = [dec], _a = class { + }, _init = [, , ,], _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a) } = {}; assertEq(() => Foo2, old); }, "Class decorators: Basic expression: Assignment initializer": () => { @@ -167,8 +167,8 @@ const tests = { old = cls; }; let Foo2; - Foo2 = (_init = [, , ,], _Foo_decorators = [dec], _a = class { - }, _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a); + Foo2 = (_Foo_decorators = [dec], _a = class { + }, _init = [, , ,], _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a); assertEq(() => Foo2, old); }, "Class decorators: Basic expression: Assignment array binding": () => { @@ -185,8 +185,8 @@ const tests = { old = cls; }; let Foo2; - [Foo2 = (_init = [, , ,], _Foo_decorators = [dec], _a = class { - }, _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a)] = []; + [Foo2 = (_Foo_decorators = [dec], _a = class { + }, _init = [, , ,], _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a)] = []; assertEq(() => Foo2, old); }, "Class decorators: Basic expression: Assignment object binding": () => { @@ -203,8 +203,8 @@ const tests = { old = cls; }; let Foo2; - ({ Foo: Foo2 = (_init = [, , ,], _Foo_decorators = [dec], _a = class { - }, _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a) } = {}); + ({ Foo: Foo2 = (_Foo_decorators = [dec], _a = class { + }, _init = [, , ,], _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a) } = {}); assertEq(() => Foo2, old); }, "Class decorators: Basic expression: Instance field initializer": () => { @@ -221,8 +221,8 @@ const tests = { old = cls; }; class Class { - Foo = (_init = [, , ,], _Foo_decorators = [dec], _a = class { - }, _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a); + Foo = (_Foo_decorators = [dec], _a = class { + }, _init = [, , ,], _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a); } const Foo2 = new Class().Foo; assertEq(() => Foo2, old); @@ -241,8 +241,8 @@ const tests = { old = cls; }; class Class { - static Foo = (_init = [, , ,], _Foo_decorators = [dec], _a = class { - }, _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a); + static Foo = (_Foo_decorators = [dec], _a = class { + }, _init = [, , ,], _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a); } assertEq(() => Class.Foo, old); }, @@ -260,8 +260,8 @@ const tests = { old = cls; }; class Class { - #Foo = (_init = [, , ,], _Foo_decorators = [dec], _a = class { - }, _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a); + #Foo = (_Foo_decorators = [dec], _a = class { + }, _init = [, , ,], _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a); get Foo() { return this.#Foo; } @@ -286,8 +286,8 @@ const tests = { old = cls; }; class Class { - static #Foo = (_init = [, , ,], _Foo_decorators = [dec], _a = class { - }, _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a); + static #Foo = (_Foo_decorators = [dec], _a = class { + }, _init = [, , ,], _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 1, _a), _a); static get Foo() { return this.#Foo; } @@ -319,13 +319,13 @@ const tests = { return Baz; }; log.push(0); - _init = [, , ,]; _Foo_decorators = [dec1, dec2]; class Foo2 { constructor() { log.push(6); } } + _init = [, , ,]; Foo2 = __decorateElement(_init, 0, "Foo", _Foo_decorators, Foo2); __runInitializers(_init, 1, Foo2); log.push(3); @@ -340,10 +340,10 @@ const tests = { const dec = (cls, ctx) => { return null; }; - _init = [, , ,]; _Foo_decorators = [dec]; class Foo2 { } + _init = [, , ,]; Foo2 = __decorateElement(_init, 0, "Foo", _Foo_decorators, Foo2); __runInitializers(_init, 1, Foo2); }, TypeError); @@ -354,10 +354,10 @@ const tests = { const dec = (cls, ctx) => { return {}; }; - _init = [, , ,]; _Foo_decorators = [dec]; class Foo2 { } + _init = [, , ,]; Foo2 = __decorateElement(_init, 0, "Foo", _Foo_decorators, Foo2); __runInitializers(_init, 1, Foo2); }, TypeError); @@ -375,10 +375,10 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _Foo_decorators = [dec, dec]; class Foo2 { } + _init = [, , ,]; Foo2 = __decorateElement(_init, 0, "Foo", _Foo_decorators, Foo2); __runInitializers(_init, 1, Foo2); assertEq(() => got.this, Foo2); @@ -403,7 +403,6 @@ const tests = { }; const bar = Symbol("bar"); const baz = Symbol(); - _init = [, , ,]; class Foo2 { constructor() { __runInitializers(_init, 5, this); @@ -415,6 +414,7 @@ const tests = { [_a = (_baz_dec = [dec(baz, "")], baz)]() { } } + _init = [, , ,]; __decorateElement(_init, 1, "foo", _foo_dec, Foo2); __decorateElement(_init, 1, _b, _bar_dec, Foo2); __decorateElement(_init, 1, _a, _baz_dec, Foo2); @@ -440,7 +440,6 @@ const tests = { }; const bar = Symbol("bar"); const baz = Symbol(); - _init = [, , ,]; class Foo2 { static foo() { } @@ -449,6 +448,7 @@ const tests = { static [_a = (_baz_dec = [dec(baz, "")], baz)]() { } } + _init = [, , ,]; __decorateElement(_init, 9, "foo", _foo_dec, Foo2); __decorateElement(_init, 9, _b, _bar_dec, Foo2); __decorateElement(_init, 9, _a, _baz_dec, Foo2); @@ -477,7 +477,6 @@ const tests = { old = fn; }; let $foo; - _init = [, , ,]; _foo_dec = [dec]; const _Foo = class _Foo { constructor() { @@ -485,6 +484,7 @@ const tests = { __privateAdd(this, _Foo_instances); } }; + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_fn = function() { }; @@ -514,10 +514,10 @@ const tests = { old = fn; }; let $foo; - _init = [, , ,]; _foo_dec = [dec]; const _Foo = class _Foo { }; + _init = [, , ,]; _Foo_static = new WeakSet(); foo_fn = function() { }; @@ -538,7 +538,6 @@ const tests = { }; return bar; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -549,6 +548,7 @@ const tests = { return this.bar; } } + _init = [, , ,]; __decorateElement(_init, 1, "foo", _foo_dec, Foo2); assertEq(() => Foo2.prototype.foo, bar); assertEq(() => new Foo2().foo(), 124); @@ -562,13 +562,13 @@ const tests = { }; return bar; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { static foo() { return this.bar; } } + _init = [, , ,]; __decorateElement(_init, 9, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); __publicField(Foo2, "bar", 123); @@ -585,7 +585,6 @@ const tests = { return bar; }; let $foo; - _init = [, , ,]; _foo_dec = [dec]; const _Foo = class _Foo { constructor() { @@ -594,6 +593,7 @@ const tests = { __publicField(this, "bar", 123); } }; + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_fn = function() { return this.bar; @@ -614,10 +614,10 @@ const tests = { return bar; }; let $foo; - _init = [, , ,]; _foo_dec = [dec]; const _Foo = class _Foo { }; + _init = [, , ,]; _Foo_static = new WeakSet(); foo_fn = function() { return this.bar; @@ -653,7 +653,6 @@ const tests = { return baz; }; log.push(0); - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { constructor() { @@ -663,6 +662,7 @@ const tests = { return log.push(6); } } + _init = [, , ,]; __decorateElement(_init, 1, "foo", _foo_dec, Foo2); log.push(3); new Foo2().foo(); @@ -692,13 +692,13 @@ const tests = { return baz; }; log.push(0); - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { static foo() { return log.push(6); } } + _init = [, , ,]; __decorateElement(_init, 9, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); log.push(3); @@ -730,7 +730,6 @@ const tests = { }; log.push(0); let $foo; - _init = [, , ,]; _foo_dec = [dec1, dec2]; const _Foo = class _Foo { constructor() { @@ -738,6 +737,7 @@ const tests = { __privateAdd(this, _Foo_instances); } }; + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_fn = function() { return log.push(6); @@ -774,10 +774,10 @@ const tests = { }; log.push(0); let $foo; - _init = [, , ,]; _foo_dec = [dec1, dec2]; const _Foo = class _Foo { }; + _init = [, , ,]; _Foo_static = new WeakSet(); foo_fn = function() { return log.push(6); @@ -799,7 +799,6 @@ const tests = { const dec = (fn, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -808,6 +807,7 @@ const tests = { foo() { } } + _init = [, , ,]; __decorateElement(_init, 1, "foo", _foo_dec, Foo2); }, TypeError); }, @@ -817,12 +817,12 @@ const tests = { const dec = (fn, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { static foo() { } } + _init = [, , ,]; __decorateElement(_init, 9, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); }, TypeError); @@ -833,7 +833,6 @@ const tests = { const dec = (fn, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -841,6 +840,7 @@ const tests = { __privateAdd(this, _Foo_instances); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_fn = function() { }; @@ -853,10 +853,10 @@ const tests = { const dec = (fn, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_fn = function() { }; @@ -871,7 +871,6 @@ const tests = { const dec = (fn, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -880,6 +879,7 @@ const tests = { foo() { } } + _init = [, , ,]; __decorateElement(_init, 1, "foo", _foo_dec, Foo2); }, TypeError); }, @@ -889,12 +889,12 @@ const tests = { const dec = (fn, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { static foo() { } } + _init = [, , ,]; __decorateElement(_init, 9, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); }, TypeError); @@ -905,7 +905,6 @@ const tests = { const dec = (fn, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -913,6 +912,7 @@ const tests = { __privateAdd(this, _Foo_instances); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_fn = function() { }; @@ -925,10 +925,10 @@ const tests = { const dec = (fn, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_fn = function() { }; @@ -950,7 +950,6 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { constructor() { @@ -959,6 +958,7 @@ const tests = { foo() { } } + _init = [, , ,]; __decorateElement(_init, 1, "foo", _foo_dec, Foo2); assertEq(() => got, void 0); const instance = new Foo2(); @@ -978,12 +978,12 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { static foo() { } } + _init = [, , ,]; __decorateElement(_init, 9, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); assertEq(() => got.this, Foo2); @@ -1002,7 +1002,6 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { constructor() { @@ -1010,6 +1009,7 @@ const tests = { __privateAdd(this, _Foo_instances); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_fn = function() { }; @@ -1032,10 +1032,10 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_fn = function() { }; @@ -1065,7 +1065,6 @@ const tests = { }; const bar = Symbol("bar"); const baz = Symbol(); - _init = [, , ,]; _foo_dec = [dec("foo")], _b = (_bar_dec = [dec(bar)], bar), _a = (_baz_dec = [dec(baz)], baz); class Foo2 { constructor() { @@ -1074,6 +1073,7 @@ const tests = { __publicField(this, _a, __runInitializers(_init, 14, this, 123)), __runInitializers(_init, 17, this); } } + _init = [, , ,]; __decorateElement(_init, 5, "foo", _foo_dec, Foo2); __decorateElement(_init, 5, _b, _bar_dec, Foo2); __decorateElement(_init, 5, _a, _baz_dec, Foo2); @@ -1100,10 +1100,10 @@ const tests = { }; const bar = Symbol("bar"); const baz = Symbol(); - _init = [, , ,]; _foo_dec = [dec("foo")], _b = (_bar_dec = [dec(bar)], bar), _a = (_baz_dec = [dec(baz)], baz); class Foo2 { } + _init = [, , ,]; __decorateElement(_init, 13, "foo", _foo_dec, Foo2); __decorateElement(_init, 13, _b, _bar_dec, Foo2); __decorateElement(_init, 13, _a, _baz_dec, Foo2); @@ -1135,13 +1135,13 @@ const tests = { }; }; let get$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { __privateAdd(this, _foo, __runInitializers(_init, 6, this, 123)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 21, "#foo", _foo_dec, _foo); get$foo = (x) => __privateGet(x, _foo); @@ -1168,10 +1168,10 @@ const tests = { }; }; let get$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 29, "#foo", _foo_dec, _foo); __privateAdd(Foo2, _foo, __runInitializers(_init, 6, Foo2, 123)), __runInitializers(_init, 9, Foo2); @@ -1188,7 +1188,6 @@ const tests = { return log.push("foo" in this, "bar" in this, x); }; }; - _init = [, , ,]; _foo_dec = [dec], _bar_dec = [dec]; class Foo2 { constructor() { @@ -1196,6 +1195,7 @@ const tests = { __publicField(this, "bar", __runInitializers(_init, 10, this)), __runInitializers(_init, 13, this); } } + _init = [, , ,]; __decorateElement(_init, 5, "foo", _foo_dec, Foo2); __decorateElement(_init, 5, "bar", _bar_dec, Foo2); assertEq(() => log + "", ""); @@ -1215,10 +1215,10 @@ const tests = { }; }; assertEq(() => log + "", ""); - _init = [, , ,]; _foo_dec = [dec], _bar_dec = [dec]; const _Foo = class _Foo { }; + _init = [, , ,]; __decorateElement(_init, 13, "foo", _foo_dec, _Foo); __decorateElement(_init, 13, "bar", _bar_dec, _Foo); foo = _Foo; @@ -1242,7 +1242,6 @@ const tests = { let has$bar; let get$foo; let get$bar; - _init = [, , ,]; _foo_dec = [dec], _bar_dec = [dec]; class Foo2 { constructor() { @@ -1250,6 +1249,7 @@ const tests = { __privateAdd(this, _bar, __runInitializers(_init, 10, this)), __runInitializers(_init, 13, this); } } + _init = [, , ,]; _foo = new WeakMap(); _bar = new WeakMap(); __decorateElement(_init, 21, "#foo", _foo_dec, _foo); @@ -1279,10 +1279,10 @@ const tests = { let has$bar; let get$foo; let get$bar; - _init = [, , ,]; _foo_dec = [dec], _bar_dec = [dec]; const _Foo = class _Foo { }; + _init = [, , ,]; _foo = new WeakMap(); _bar = new WeakMap(); __decorateElement(_init, 29, "#foo", _foo_dec, _foo); @@ -1311,13 +1311,13 @@ const tests = { return () => log.push(5); }; log.push(0); - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { constructor() { __publicField(this, "foo", __runInitializers(_init, 6, this, 123)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; __decorateElement(_init, 5, "foo", _foo_dec, Foo2); log.push(3); var obj = new Foo2(); @@ -1337,10 +1337,10 @@ const tests = { return () => log.push(4); }; log.push(0); - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { } + _init = [, , ,]; __decorateElement(_init, 13, "foo", _foo_dec, Foo2); __publicField(Foo2, "foo", __runInitializers(_init, 6, Foo2, 123)), __runInitializers(_init, 9, Foo2); log.push(5); @@ -1360,13 +1360,13 @@ const tests = { }; log.push(0); let get$foo; - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { constructor() { __privateAdd(this, _foo, __runInitializers(_init, 6, this, 123)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 21, "#foo", _foo_dec, _foo); get$foo = (x) => __privateGet(x, _foo); @@ -1389,10 +1389,10 @@ const tests = { }; log.push(0); let get$foo; - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 29, "#foo", _foo_dec, _foo); __privateAdd(Foo2, _foo, __runInitializers(_init, 6, Foo2, 123)), __runInitializers(_init, 9, Foo2); @@ -1407,13 +1407,13 @@ const tests = { const dec = (value, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { __publicField(this, "foo", __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; __decorateElement(_init, 5, "foo", _foo_dec, Foo2); }, TypeError); }, @@ -1423,10 +1423,10 @@ const tests = { const dec = (value, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; __decorateElement(_init, 13, "foo", _foo_dec, Foo2); __publicField(Foo2, "foo", __runInitializers(_init, 6, Foo2)), __runInitializers(_init, 9, Foo2); }, TypeError); @@ -1437,13 +1437,13 @@ const tests = { const dec = (value, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { __privateAdd(this, _foo, __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 21, "#foo", _foo_dec, _foo); }, TypeError); @@ -1454,10 +1454,10 @@ const tests = { const dec = (value, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 29, "#foo", _foo_dec, _foo); __privateAdd(Foo2, _foo, __runInitializers(_init, 6, Foo2)), __runInitializers(_init, 9, Foo2); @@ -1469,13 +1469,13 @@ const tests = { const dec = (value, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { __publicField(this, "foo", __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; __decorateElement(_init, 5, "foo", _foo_dec, Foo2); }, TypeError); }, @@ -1485,10 +1485,10 @@ const tests = { const dec = (value, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; __decorateElement(_init, 13, "foo", _foo_dec, Foo2); __publicField(Foo2, "foo", __runInitializers(_init, 6, Foo2)), __runInitializers(_init, 9, Foo2); }, TypeError); @@ -1499,13 +1499,13 @@ const tests = { const dec = (value, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { __privateAdd(this, _foo, __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 21, "#foo", _foo_dec, _foo); }, TypeError); @@ -1516,10 +1516,10 @@ const tests = { const dec = (value, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 29, "#foo", _foo_dec, _foo); __privateAdd(Foo2, _foo, __runInitializers(_init, 6, Foo2)), __runInitializers(_init, 9, Foo2); @@ -1538,13 +1538,13 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { constructor() { __publicField(this, "foo", __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; __decorateElement(_init, 5, "foo", _foo_dec, Foo2); assertEq(() => got, void 0); const instance = new Foo2(); @@ -1564,10 +1564,10 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { } + _init = [, , ,]; __decorateElement(_init, 13, "foo", _foo_dec, Foo2); __publicField(Foo2, "foo", __runInitializers(_init, 6, Foo2)), __runInitializers(_init, 9, Foo2); assertEq(() => got.this, Foo2); @@ -1586,13 +1586,13 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { constructor() { __privateAdd(this, _foo, __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 21, "#foo", _foo_dec, _foo); assertEq(() => got, void 0); @@ -1613,10 +1613,10 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 29, "#foo", _foo_dec, _foo); __privateAdd(Foo2, _foo, __runInitializers(_init, 6, Foo2)), __runInitializers(_init, 9, Foo2); @@ -1640,7 +1640,6 @@ const tests = { }; const bar = Symbol("bar"); const baz = Symbol(); - _init = [, , ,]; class Foo2 { constructor() { __runInitializers(_init, 5, this); @@ -1656,6 +1655,7 @@ const tests = { return this.bar; } } + _init = [, , ,]; __decorateElement(_init, 2, "foo", _foo_dec, Foo2); __decorateElement(_init, 2, _b, _bar_dec, Foo2); __decorateElement(_init, 2, _a, _baz_dec, Foo2); @@ -1679,7 +1679,6 @@ const tests = { }; const bar = Symbol("bar"); const baz = Symbol(); - _init = [, , ,]; class Foo2 { static get foo() { return this.bar; @@ -1691,6 +1690,7 @@ const tests = { return this.bar; } } + _init = [, , ,]; __decorateElement(_init, 10, "foo", _foo_dec, Foo2); __decorateElement(_init, 10, _b, _bar_dec, Foo2); __decorateElement(_init, 10, _a, _baz_dec, Foo2); @@ -1718,7 +1718,6 @@ const tests = { }; }; let get$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -1727,6 +1726,7 @@ const tests = { __privateAdd(this, _bar, 123); } } + _init = [, , ,]; _bar = new WeakMap(); _Foo_instances = new WeakSet(); foo_get = function() { @@ -1755,10 +1755,10 @@ const tests = { }; }; let get$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _bar = new WeakMap(); _Foo_static = new WeakSet(); foo_get = function() { @@ -1781,7 +1781,6 @@ const tests = { }; return bar; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -1792,6 +1791,7 @@ const tests = { return this.bar; } } + _init = [, , ,]; __decorateElement(_init, 2, "foo", _foo_dec, Foo2); assertEq(() => Object.getOwnPropertyDescriptor(Foo2.prototype, "foo").get, bar); assertEq(() => new Foo2().foo, 124); @@ -1805,13 +1805,13 @@ const tests = { }; return bar; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { static get foo() { return this.bar; } } + _init = [, , ,]; __decorateElement(_init, 10, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); __publicField(Foo2, "bar", 123); @@ -1828,7 +1828,6 @@ const tests = { return bar; }; let get$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -1837,6 +1836,7 @@ const tests = { __privateAdd(this, _bar, 123); } } + _init = [, , ,]; _bar = new WeakMap(); _Foo_instances = new WeakSet(); foo_get = function() { @@ -1856,10 +1856,10 @@ const tests = { return bar; }; let get$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _bar = new WeakMap(); _Foo_static = new WeakSet(); foo_get = function() { @@ -1894,7 +1894,6 @@ const tests = { return baz; }; log.push(0); - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { constructor() { @@ -1904,6 +1903,7 @@ const tests = { return log.push(6); } } + _init = [, , ,]; __decorateElement(_init, 2, "foo", _foo_dec, Foo2); log.push(3); new Foo2().foo; @@ -1933,13 +1933,13 @@ const tests = { return baz; }; log.push(0); - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { static get foo() { return log.push(6); } } + _init = [, , ,]; __decorateElement(_init, 10, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); log.push(3); @@ -1971,7 +1971,6 @@ const tests = { }; log.push(0); let get$foo; - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { constructor() { @@ -1979,6 +1978,7 @@ const tests = { __privateAdd(this, _Foo_instances); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_get = function() { return log.push(6); @@ -2013,10 +2013,10 @@ const tests = { }; log.push(0); let get$foo; - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_get = function() { return log.push(6); @@ -2036,7 +2036,6 @@ const tests = { const dec = (fn, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -2046,6 +2045,7 @@ const tests = { return; } } + _init = [, , ,]; __decorateElement(_init, 2, "foo", _foo_dec, Foo2); }, TypeError); }, @@ -2055,13 +2055,13 @@ const tests = { const dec = (fn, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { static get foo() { return; } } + _init = [, , ,]; __decorateElement(_init, 10, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); }, TypeError); @@ -2072,7 +2072,6 @@ const tests = { const dec = (fn, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -2080,6 +2079,7 @@ const tests = { __privateAdd(this, _Foo_instances); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_get = function() { return; @@ -2093,10 +2093,10 @@ const tests = { const dec = (fn, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_get = function() { return; @@ -2112,7 +2112,6 @@ const tests = { const dec = (fn, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -2122,6 +2121,7 @@ const tests = { return; } } + _init = [, , ,]; __decorateElement(_init, 2, "foo", _foo_dec, Foo2); }, TypeError); }, @@ -2131,13 +2131,13 @@ const tests = { const dec = (fn, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { static get foo() { return; } } + _init = [, , ,]; __decorateElement(_init, 10, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); }, TypeError); @@ -2148,7 +2148,6 @@ const tests = { const dec = (fn, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -2156,6 +2155,7 @@ const tests = { __privateAdd(this, _Foo_instances); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_get = function() { return; @@ -2169,10 +2169,10 @@ const tests = { const dec = (fn, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_get = function() { return; @@ -2195,7 +2195,6 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { constructor() { @@ -2205,6 +2204,7 @@ const tests = { return; } } + _init = [, , ,]; __decorateElement(_init, 2, "foo", _foo_dec, Foo2); assertEq(() => got, void 0); const instance = new Foo2(); @@ -2224,13 +2224,13 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { static get foo() { return; } } + _init = [, , ,]; __decorateElement(_init, 10, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); assertEq(() => got.this, Foo2); @@ -2249,7 +2249,6 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { constructor() { @@ -2257,6 +2256,7 @@ const tests = { __privateAdd(this, _Foo_instances); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_get = function() { return; @@ -2280,10 +2280,10 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_get = function() { return; @@ -2314,7 +2314,6 @@ const tests = { }; const bar = Symbol("bar"); const baz = Symbol(); - _init = [, , ,]; class Foo2 { constructor() { __runInitializers(_init, 5, this); @@ -2330,6 +2329,7 @@ const tests = { this.bar = x; } } + _init = [, , ,]; __decorateElement(_init, 3, "foo", _foo_dec, Foo2); __decorateElement(_init, 3, _b, _bar_dec, Foo2); __decorateElement(_init, 3, _a, _baz_dec, Foo2); @@ -2360,7 +2360,6 @@ const tests = { }; const bar = Symbol("bar"); const baz = Symbol(); - _init = [, , ,]; class Foo2 { static set foo(x) { this.bar = x; @@ -2372,6 +2371,7 @@ const tests = { this.bar = x; } } + _init = [, , ,]; __decorateElement(_init, 11, "foo", _foo_dec, Foo2); __decorateElement(_init, 11, _b, _bar_dec, Foo2); __decorateElement(_init, 11, _a, _baz_dec, Foo2); @@ -2406,7 +2406,6 @@ const tests = { }; }; let set$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -2415,6 +2414,7 @@ const tests = { __publicField(this, "bar", 0); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_set = function(x) { this.bar = x; @@ -2449,10 +2449,10 @@ const tests = { }; }; let set$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_set = function(x) { this.bar = x; @@ -2477,7 +2477,6 @@ const tests = { }; return bar; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -2488,6 +2487,7 @@ const tests = { this.bar = x; } } + _init = [, , ,]; __decorateElement(_init, 3, "foo", _foo_dec, Foo2); assertEq(() => Object.getOwnPropertyDescriptor(Foo2.prototype, "foo").set, bar); var obj = new Foo2(); @@ -2503,13 +2503,13 @@ const tests = { }; return bar; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { static set foo(x) { this.bar = x; } } + _init = [, , ,]; __decorateElement(_init, 11, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); __publicField(Foo2, "bar", 123); @@ -2527,7 +2527,6 @@ const tests = { return bar; }; let set$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -2536,6 +2535,7 @@ const tests = { __publicField(this, "bar", 123); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_set = function(x) { this.bar = x; @@ -2558,10 +2558,10 @@ const tests = { return bar; }; let set$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_set = function(x) { this.bar = x; @@ -2598,7 +2598,6 @@ const tests = { return baz; }; log.push(0); - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { constructor() { @@ -2608,6 +2607,7 @@ const tests = { log.push(6); } } + _init = [, , ,]; __decorateElement(_init, 3, "foo", _foo_dec, Foo2); log.push(3); new Foo2().foo = 123; @@ -2637,13 +2637,13 @@ const tests = { return baz; }; log.push(0); - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { static set foo(x) { log.push(6); } } + _init = [, , ,]; __decorateElement(_init, 11, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); log.push(3); @@ -2675,7 +2675,6 @@ const tests = { }; log.push(0); let set$foo; - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { constructor() { @@ -2683,6 +2682,7 @@ const tests = { __privateAdd(this, _Foo_instances); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_set = function(x) { log.push(6); @@ -2719,10 +2719,10 @@ const tests = { }; log.push(0); let set$foo; - _init = [, , ,]; _foo_dec = [dec1, dec2]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_set = function(x) { log.push(6); @@ -2744,7 +2744,6 @@ const tests = { const dec = (fn, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -2753,6 +2752,7 @@ const tests = { set foo(x) { } } + _init = [, , ,]; __decorateElement(_init, 3, "foo", _foo_dec, Foo2); }, TypeError); }, @@ -2762,12 +2762,12 @@ const tests = { const dec = (fn, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { static set foo(x) { } } + _init = [, , ,]; __decorateElement(_init, 11, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); }, TypeError); @@ -2778,7 +2778,6 @@ const tests = { const dec = (fn, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -2786,6 +2785,7 @@ const tests = { __privateAdd(this, _Foo_instances); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_set = function(x) { }; @@ -2798,10 +2798,10 @@ const tests = { const dec = (fn, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_set = function(x) { }; @@ -2816,7 +2816,6 @@ const tests = { const dec = (fn, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -2825,6 +2824,7 @@ const tests = { set foo(x) { } } + _init = [, , ,]; __decorateElement(_init, 3, "foo", _foo_dec, Foo2); }, TypeError); }, @@ -2834,12 +2834,12 @@ const tests = { const dec = (fn, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { static set foo(x) { } } + _init = [, , ,]; __decorateElement(_init, 11, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); }, TypeError); @@ -2850,7 +2850,6 @@ const tests = { const dec = (fn, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -2858,6 +2857,7 @@ const tests = { __privateAdd(this, _Foo_instances); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_set = function(x) { }; @@ -2870,10 +2870,10 @@ const tests = { const dec = (fn, ctx) => { return {}; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_set = function(x) { }; @@ -2895,7 +2895,6 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { constructor() { @@ -2904,6 +2903,7 @@ const tests = { set foo(x) { } } + _init = [, , ,]; __decorateElement(_init, 3, "foo", _foo_dec, Foo2); assertEq(() => got, void 0); const instance = new Foo2(); @@ -2923,12 +2923,12 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { static set foo(x) { } } + _init = [, , ,]; __decorateElement(_init, 11, "foo", _foo_dec, Foo2); __runInitializers(_init, 3, Foo2); assertEq(() => got.this, Foo2); @@ -2947,7 +2947,6 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { constructor() { @@ -2955,6 +2954,7 @@ const tests = { __privateAdd(this, _Foo_instances); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); foo_set = function(x) { }; @@ -2977,10 +2977,10 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { } + _init = [, , ,]; _Foo_static = new WeakSet(); foo_set = function(x) { }; @@ -3013,7 +3013,6 @@ const tests = { }; const bar = Symbol("bar"); const baz = Symbol(); - _init = [, , ,]; _foo_dec = [dec("foo", "get foo", "set foo")], _b = (_bar_dec = [dec(bar, "get [bar]", "set [bar]")], bar), _a = (_baz_dec = [dec(baz, "get ", "set ")], baz); class Foo2 { constructor() { @@ -3022,6 +3021,7 @@ const tests = { __privateAdd(this, __a, __runInitializers(_init, 14, this, 0)), __runInitializers(_init, 17, this); } } + _init = [, , ,]; _foo = new WeakMap(); __b = new WeakMap(); __a = new WeakMap(); @@ -3058,10 +3058,10 @@ const tests = { }; const bar = Symbol("bar"); const baz = Symbol(); - _init = [, , ,]; _foo_dec = [dec("foo", "get foo", "set foo")], _b = (_bar_dec = [dec(bar, "get [bar]", "set [bar]")], bar), _a = (_baz_dec = [dec(baz, "get ", "set ")], baz); class Foo2 { } + _init = [, , ,]; _foo = new WeakMap(); __b = new WeakMap(); __a = new WeakMap(); @@ -3103,7 +3103,6 @@ const tests = { }; let get$foo; let set$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -3111,6 +3110,7 @@ const tests = { __privateAdd(this, _foo, __runInitializers(_init, 6, this, 0)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; _foo = new WeakMap(); _Foo_instances = new WeakSet(); _a = __decorateElement(_init, 20, "#foo", _foo_dec, _Foo_instances, _foo), foo_get = _a.get, foo_set = _a.set; @@ -3147,10 +3147,10 @@ const tests = { }; let get$foo; let set$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _foo = new WeakMap(); _Foo_static = new WeakSet(); _a = __decorateElement(_init, 28, "#foo", _foo_dec, _Foo_static, _foo), foo_get = _a.get, foo_set = _a.set; @@ -3181,13 +3181,13 @@ const tests = { }; return { get, set, init }; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { __privateAdd(this, _foo, __runInitializers(_init, 6, this, 123)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 4, "foo", _foo_dec, Foo2, _foo); assertEq(() => Object.getOwnPropertyDescriptor(Foo2.prototype, "foo").get, get); @@ -3215,10 +3215,10 @@ const tests = { }; return { get, set, init }; }; - _init = [, , ,]; _foo_dec = [dec]; const _Foo = class _Foo { }; + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 12, "foo", _foo_dec, _Foo, _foo); foo = _Foo; @@ -3249,7 +3249,6 @@ const tests = { }; let get$foo; let set$foo; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -3257,6 +3256,7 @@ const tests = { __privateAdd(this, _foo, __runInitializers(_init, 6, this, 123)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; _foo = new WeakMap(); _Foo_instances = new WeakSet(); _a = __decorateElement(_init, 20, "#foo", _foo_dec, _Foo_instances, _foo), foo_get = _a.get, foo_set = _a.set; @@ -3289,10 +3289,10 @@ const tests = { }; let get$foo; let set$foo; - _init = [, , ,]; _foo_dec = [dec]; const _Foo = class _Foo { }; + _init = [, , ,]; _foo = new WeakMap(); _Foo_static = new WeakSet(); _a = __decorateElement(_init, 28, "#foo", _foo_dec, _Foo_static, _foo), foo_get = _a.get, foo_set = _a.set; @@ -3314,13 +3314,13 @@ const tests = { const dec = (target, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { __privateAdd(this, _foo, __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 4, "foo", _foo_dec, Foo2, _foo); }, TypeError); @@ -3331,10 +3331,10 @@ const tests = { const dec = (target, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 12, "foo", _foo_dec, Foo2, _foo); __privateAdd(Foo2, _foo, __runInitializers(_init, 6, Foo2)), __runInitializers(_init, 9, Foo2); @@ -3346,7 +3346,6 @@ const tests = { const dec = (target, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { constructor() { @@ -3354,6 +3353,7 @@ const tests = { __privateAdd(this, _foo, __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; _foo = new WeakMap(); _Foo_instances = new WeakSet(); _a = __decorateElement(_init, 20, "#foo", _foo_dec, _Foo_instances, _foo), foo_get = _a.get, foo_set = _a.set; @@ -3365,10 +3365,10 @@ const tests = { const dec = (target, ctx) => { return null; }; - _init = [, , ,]; _foo_dec = [dec]; class Foo2 { } + _init = [, , ,]; _foo = new WeakMap(); _Foo_static = new WeakSet(); _a = __decorateElement(_init, 28, "#foo", _foo_dec, _Foo_static, _foo), foo_get = _a.get, foo_set = _a.set; @@ -3389,13 +3389,13 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { constructor() { __privateAdd(this, _foo, __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 4, "foo", _foo_dec, Foo2, _foo); assertEq(() => got, void 0); @@ -3416,10 +3416,10 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { } + _init = [, , ,]; _foo = new WeakMap(); __decorateElement(_init, 12, "foo", _foo_dec, Foo2, _foo); __privateAdd(Foo2, _foo, __runInitializers(_init, 6, Foo2)), __runInitializers(_init, 9, Foo2); @@ -3439,7 +3439,6 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { constructor() { @@ -3447,6 +3446,7 @@ const tests = { __privateAdd(this, _foo, __runInitializers(_init, 6, this)), __runInitializers(_init, 9, this); } } + _init = [, , ,]; _foo = new WeakMap(); _Foo_instances = new WeakSet(); _a = __decorateElement(_init, 20, "#foo", _foo_dec, _Foo_instances, _foo), foo_get = _a.get, foo_set = _a.set; @@ -3468,10 +3468,10 @@ const tests = { assertThrows(() => ctx.addInitializer({}), TypeError); oldAddInitializer = ctx.addInitializer; }; - _init = [, , ,]; _foo_dec = [dec, dec]; class Foo2 { } + _init = [, , ,]; _foo = new WeakMap(); _Foo_static = new WeakSet(); _a = __decorateElement(_init, 28, "#foo", _foo_dec, _Foo_static, _foo), foo_get = _a.get, foo_set = _a.set; @@ -3511,7 +3511,6 @@ const tests = { return Symbol("accessor"); } }; - _init = [, , ,]; _Foo_decorators = [foo(0)]; class Foo2 extends (foo(1), Object) { constructor() { @@ -3535,6 +3534,7 @@ const tests = { static set [(_c = (_dec3 = [foo(16)], computed.setter), _b = (_dec2 = [foo(18)], computed.accessor), _a = (_dec = [foo(20)], computed.accessor), _c)](x) { } } + _init = [, , ,]; __b = new WeakMap(); __a = new WeakMap(); __decorateElement(_init, 9, _i, _dec9, Foo2); @@ -3584,7 +3584,7 @@ const tests = { return Symbol("accessor"); } }; - _init = [, , ,], _class_decorators = [foo(0)], _k = class extends (foo(1), Object) { + _class_decorators = [foo(0)], _k = class extends (foo(1), Object) { constructor() { super(...arguments); __runInitializers(_init, 5, this); @@ -3605,7 +3605,7 @@ const tests = { } static set [(_c = (_dec3 = [foo(16)], computed.setter), _b = (_dec2 = [foo(18)], computed.accessor), _a = (_dec = [foo(20)], computed.accessor), _c)](x) { } - }, __b = new WeakMap(), __a = new WeakMap(), __decorateElement(_init, 9, _i, _dec9, _k), __decorateElement(_init, 10, _e, _dec5, _k), __decorateElement(_init, 11, _c, _dec3, _k), __decorateElement(_init, 12, _a, _dec, _k, __a), __decorateElement(_init, 1, _j, _dec10, _k), __decorateElement(_init, 2, _f, _dec6, _k), __decorateElement(_init, 3, _d, _dec4, _k), __decorateElement(_init, 4, _b, _dec2, _k, __b), __decorateElement(_init, 13, _g, _dec7, _k), __decorateElement(_init, 5, _h, _dec8, _k), _k = __decorateElement(_init, 0, "", _class_decorators, _k), __runInitializers(_init, 3, _k), __publicField(_k, _g, __runInitializers(_init, 14, _k)), __runInitializers(_init, 17, _k), __privateAdd(_k, __a, __runInitializers(_init, 6, _k)), __runInitializers(_init, 9, _k), __runInitializers(_init, 1, _k), _k; + }, _init = [, , ,], __b = new WeakMap(), __a = new WeakMap(), __decorateElement(_init, 9, _i, _dec9, _k), __decorateElement(_init, 10, _e, _dec5, _k), __decorateElement(_init, 11, _c, _dec3, _k), __decorateElement(_init, 12, _a, _dec, _k, __a), __decorateElement(_init, 1, _j, _dec10, _k), __decorateElement(_init, 2, _f, _dec6, _k), __decorateElement(_init, 3, _d, _dec4, _k), __decorateElement(_init, 4, _b, _dec2, _k, __b), __decorateElement(_init, 13, _g, _dec7, _k), __decorateElement(_init, 5, _h, _dec8, _k), _k = __decorateElement(_init, 0, "", _class_decorators, _k), __runInitializers(_init, 3, _k), __publicField(_k, _g, __runInitializers(_init, 14, _k)), __runInitializers(_init, 17, _k), __privateAdd(_k, __a, __runInitializers(_init, 6, _k)), __runInitializers(_init, 9, _k), __runInitializers(_init, 1, _k), _k; assertEq(() => "" + log, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21"); }, 'Decorator list evaluation: "this" (class statement)': () => { @@ -3619,7 +3619,6 @@ const tests = { }; function wrapper() { var _accessor_dec, _accessor_dec2, _setter_dec, _setter_dec2, _getter_dec, _getter_dec2, _field_dec, _field_dec2, _method_dec, _method_dec2, _a, _Foo_decorators, _init, _accessor, _accessor2; - _init = [, , ,]; _Foo_decorators = [(assertEq(() => this.foo(0), void 0), dummy)]; class Foo2 extends (_a = (assertEq(() => this.foo(1), void 0), Object), _method_dec2 = [(assertEq(() => this.foo(2), void 0), dummy)], _method_dec = [(assertEq(() => this.foo(3), void 0), dummy)], _field_dec2 = [(assertEq(() => this.foo(4), void 0), dummy)], _field_dec = [(assertEq(() => this.foo(5), void 0), dummy)], _getter_dec2 = [(assertEq(() => this.foo(6), void 0), dummy)], _getter_dec = [(assertEq(() => this.foo(7), void 0), dummy)], _setter_dec2 = [(assertEq(() => this.foo(8), void 0), dummy)], _setter_dec = [(assertEq(() => this.foo(9), void 0), dummy)], _accessor_dec2 = [(assertEq(() => this.foo(10), void 0), dummy)], _accessor_dec = [(assertEq(() => this.foo(11), void 0), dummy)], _a) { constructor() { @@ -3643,6 +3642,7 @@ const tests = { static set setter(x) { } } + _init = [, , ,]; _accessor = new WeakMap(); _accessor2 = new WeakMap(); __decorateElement(_init, 9, "method", _method_dec, Foo2); @@ -3675,7 +3675,7 @@ const tests = { }; function wrapper() { var _accessor_dec, _accessor_dec2, _setter_dec, _setter_dec2, _getter_dec, _getter_dec2, _field_dec, _field_dec2, _method_dec, _method_dec2, _a, _class_decorators, _init, _b, _accessor, _accessor2; - _init = [, , ,], _class_decorators = [(assertEq(() => this.foo(0), void 0), dummy)], _b = class extends (_a = (assertEq(() => this.foo(1), void 0), Object), _method_dec2 = [(assertEq(() => this.foo(2), void 0), dummy)], _method_dec = [(assertEq(() => this.foo(3), void 0), dummy)], _field_dec2 = [(assertEq(() => this.foo(4), void 0), dummy)], _field_dec = [(assertEq(() => this.foo(5), void 0), dummy)], _getter_dec2 = [(assertEq(() => this.foo(6), void 0), dummy)], _getter_dec = [(assertEq(() => this.foo(7), void 0), dummy)], _setter_dec2 = [(assertEq(() => this.foo(8), void 0), dummy)], _setter_dec = [(assertEq(() => this.foo(9), void 0), dummy)], _accessor_dec2 = [(assertEq(() => this.foo(10), void 0), dummy)], _accessor_dec = [(assertEq(() => this.foo(11), void 0), dummy)], _a) { + _class_decorators = [(assertEq(() => this.foo(0), void 0), dummy)], _b = class extends (_a = (assertEq(() => this.foo(1), void 0), Object), _method_dec2 = [(assertEq(() => this.foo(2), void 0), dummy)], _method_dec = [(assertEq(() => this.foo(3), void 0), dummy)], _field_dec2 = [(assertEq(() => this.foo(4), void 0), dummy)], _field_dec = [(assertEq(() => this.foo(5), void 0), dummy)], _getter_dec2 = [(assertEq(() => this.foo(6), void 0), dummy)], _getter_dec = [(assertEq(() => this.foo(7), void 0), dummy)], _setter_dec2 = [(assertEq(() => this.foo(8), void 0), dummy)], _setter_dec = [(assertEq(() => this.foo(9), void 0), dummy)], _accessor_dec2 = [(assertEq(() => this.foo(10), void 0), dummy)], _accessor_dec = [(assertEq(() => this.foo(11), void 0), dummy)], _a) { constructor() { super(...arguments); __runInitializers(_init, 5, this); @@ -3696,7 +3696,7 @@ const tests = { } static set setter(x) { } - }, _accessor = new WeakMap(), _accessor2 = new WeakMap(), __decorateElement(_init, 9, "method", _method_dec, _b), __decorateElement(_init, 10, "getter", _getter_dec, _b), __decorateElement(_init, 11, "setter", _setter_dec, _b), __decorateElement(_init, 12, "accessor", _accessor_dec, _b, _accessor2), __decorateElement(_init, 1, "method", _method_dec2, _b), __decorateElement(_init, 2, "getter", _getter_dec2, _b), __decorateElement(_init, 3, "setter", _setter_dec2, _b), __decorateElement(_init, 4, "accessor", _accessor_dec2, _b, _accessor), __decorateElement(_init, 13, "field", _field_dec, _b), __decorateElement(_init, 5, "field", _field_dec2, _b), _b = __decorateElement(_init, 0, "", _class_decorators, _b), __runInitializers(_init, 3, _b), __publicField(_b, "field", __runInitializers(_init, 14, _b)), __runInitializers(_init, 17, _b), __privateAdd(_b, _accessor2, __runInitializers(_init, 6, _b)), __runInitializers(_init, 9, _b), __runInitializers(_init, 1, _b), _b; + }, _init = [, , ,], _accessor = new WeakMap(), _accessor2 = new WeakMap(), __decorateElement(_init, 9, "method", _method_dec, _b), __decorateElement(_init, 10, "getter", _getter_dec, _b), __decorateElement(_init, 11, "setter", _setter_dec, _b), __decorateElement(_init, 12, "accessor", _accessor_dec, _b, _accessor2), __decorateElement(_init, 1, "method", _method_dec2, _b), __decorateElement(_init, 2, "getter", _getter_dec2, _b), __decorateElement(_init, 3, "setter", _setter_dec2, _b), __decorateElement(_init, 4, "accessor", _accessor_dec2, _b, _accessor), __decorateElement(_init, 13, "field", _field_dec, _b), __decorateElement(_init, 5, "field", _field_dec2, _b), _b = __decorateElement(_init, 0, "", _class_decorators, _b), __runInitializers(_init, 3, _b), __publicField(_b, "field", __runInitializers(_init, 14, _b)), __runInitializers(_init, 17, _b), __privateAdd(_b, _accessor2, __runInitializers(_init, 6, _b)), __runInitializers(_init, 9, _b), __runInitializers(_init, 1, _b), _b; } wrapper.call(ctx); assertEq(() => "" + log, "0,1,2,3,4,5,6,7,8,9,10,11"); @@ -3707,7 +3707,6 @@ const tests = { }; async function wrapper() { var _accessor_dec, _accessor_dec2, _setter_dec, _setter_dec2, _getter_dec, _getter_dec2, _field_dec, _field_dec2, _method_dec, _method_dec2, _a, _Foo_decorators, _init, _accessor, _accessor2; - _init = [, , ,]; _Foo_decorators = [(log.push(await Promise.resolve(0)), dummy)]; class Foo2 extends (_a = (log.push(await Promise.resolve(1)), Object), _method_dec2 = [(log.push(await Promise.resolve(2)), dummy)], _method_dec = [(log.push(await Promise.resolve(3)), dummy)], _field_dec2 = [(log.push(await Promise.resolve(4)), dummy)], _field_dec = [(log.push(await Promise.resolve(5)), dummy)], _getter_dec2 = [(log.push(await Promise.resolve(6)), dummy)], _getter_dec = [(log.push(await Promise.resolve(7)), dummy)], _setter_dec2 = [(log.push(await Promise.resolve(8)), dummy)], _setter_dec = [(log.push(await Promise.resolve(9)), dummy)], _accessor_dec2 = [(log.push(await Promise.resolve(10)), dummy)], _accessor_dec = [(log.push(await Promise.resolve(11)), dummy)], _a) { constructor() { @@ -3731,6 +3730,7 @@ const tests = { static set setter(x) { } } + _init = [, , ,]; _accessor = new WeakMap(); _accessor2 = new WeakMap(); __decorateElement(_init, 9, "method", _method_dec, Foo2); @@ -3758,7 +3758,7 @@ const tests = { }; async function wrapper() { var _accessor_dec, _accessor_dec2, _setter_dec, _setter_dec2, _getter_dec, _getter_dec2, _field_dec, _field_dec2, _method_dec, _method_dec2, _a, _class_decorators, _init, _b, _accessor, _accessor2; - _init = [, , ,], _class_decorators = [(log.push(await Promise.resolve(0)), dummy)], _b = class extends (_a = (log.push(await Promise.resolve(1)), Object), _method_dec2 = [(log.push(await Promise.resolve(2)), dummy)], _method_dec = [(log.push(await Promise.resolve(3)), dummy)], _field_dec2 = [(log.push(await Promise.resolve(4)), dummy)], _field_dec = [(log.push(await Promise.resolve(5)), dummy)], _getter_dec2 = [(log.push(await Promise.resolve(6)), dummy)], _getter_dec = [(log.push(await Promise.resolve(7)), dummy)], _setter_dec2 = [(log.push(await Promise.resolve(8)), dummy)], _setter_dec = [(log.push(await Promise.resolve(9)), dummy)], _accessor_dec2 = [(log.push(await Promise.resolve(10)), dummy)], _accessor_dec = [(log.push(await Promise.resolve(11)), dummy)], _a) { + _class_decorators = [(log.push(await Promise.resolve(0)), dummy)], _b = class extends (_a = (log.push(await Promise.resolve(1)), Object), _method_dec2 = [(log.push(await Promise.resolve(2)), dummy)], _method_dec = [(log.push(await Promise.resolve(3)), dummy)], _field_dec2 = [(log.push(await Promise.resolve(4)), dummy)], _field_dec = [(log.push(await Promise.resolve(5)), dummy)], _getter_dec2 = [(log.push(await Promise.resolve(6)), dummy)], _getter_dec = [(log.push(await Promise.resolve(7)), dummy)], _setter_dec2 = [(log.push(await Promise.resolve(8)), dummy)], _setter_dec = [(log.push(await Promise.resolve(9)), dummy)], _accessor_dec2 = [(log.push(await Promise.resolve(10)), dummy)], _accessor_dec = [(log.push(await Promise.resolve(11)), dummy)], _a) { constructor() { super(...arguments); __runInitializers(_init, 5, this); @@ -3779,7 +3779,7 @@ const tests = { } static set setter(x) { } - }, _accessor = new WeakMap(), _accessor2 = new WeakMap(), __decorateElement(_init, 9, "method", _method_dec, _b), __decorateElement(_init, 10, "getter", _getter_dec, _b), __decorateElement(_init, 11, "setter", _setter_dec, _b), __decorateElement(_init, 12, "accessor", _accessor_dec, _b, _accessor2), __decorateElement(_init, 1, "method", _method_dec2, _b), __decorateElement(_init, 2, "getter", _getter_dec2, _b), __decorateElement(_init, 3, "setter", _setter_dec2, _b), __decorateElement(_init, 4, "accessor", _accessor_dec2, _b, _accessor), __decorateElement(_init, 13, "field", _field_dec, _b), __decorateElement(_init, 5, "field", _field_dec2, _b), _b = __decorateElement(_init, 0, "", _class_decorators, _b), __runInitializers(_init, 3, _b), __publicField(_b, "field", __runInitializers(_init, 14, _b)), __runInitializers(_init, 17, _b), __privateAdd(_b, _accessor2, __runInitializers(_init, 6, _b)), __runInitializers(_init, 9, _b), __runInitializers(_init, 1, _b), _b; + }, _init = [, , ,], _accessor = new WeakMap(), _accessor2 = new WeakMap(), __decorateElement(_init, 9, "method", _method_dec, _b), __decorateElement(_init, 10, "getter", _getter_dec, _b), __decorateElement(_init, 11, "setter", _setter_dec, _b), __decorateElement(_init, 12, "accessor", _accessor_dec, _b, _accessor2), __decorateElement(_init, 1, "method", _method_dec2, _b), __decorateElement(_init, 2, "getter", _getter_dec2, _b), __decorateElement(_init, 3, "setter", _setter_dec2, _b), __decorateElement(_init, 4, "accessor", _accessor_dec2, _b, _accessor), __decorateElement(_init, 13, "field", _field_dec, _b), __decorateElement(_init, 5, "field", _field_dec2, _b), _b = __decorateElement(_init, 0, "", _class_decorators, _b), __runInitializers(_init, 3, _b), __publicField(_b, "field", __runInitializers(_init, 14, _b)), __runInitializers(_init, 17, _b), __privateAdd(_b, _accessor2, __runInitializers(_init, 6, _b)), __runInitializers(_init, 9, _b), __runInitializers(_init, 1, _b), _b; } await wrapper(); assertEq(() => "" + log, "0,1,2,3,4,5,6,7,8,9,10,11"); @@ -3795,7 +3795,6 @@ const tests = { } static { const dummy = this; - _init = [, , ,]; _Foo_decorators = [dummy.#foo(0)]; class Foo2 extends (_a = (dummy.#foo(1), Object), _method_dec2 = [dummy.#foo(2)], _method_dec = [dummy.#foo(3)], _field_dec2 = [dummy.#foo(4)], _field_dec = [dummy.#foo(5)], _getter_dec2 = [dummy.#foo(6)], _getter_dec = [dummy.#foo(7)], _setter_dec2 = [dummy.#foo(8)], _setter_dec = [dummy.#foo(9)], _accessor_dec2 = [dummy.#foo(10)], _accessor_dec = [dummy.#foo(11)], _a) { constructor() { @@ -3819,6 +3818,7 @@ const tests = { static set setter(x) { } } + _init = [, , ,]; _accessor = new WeakMap(); _accessor2 = new WeakMap(); __decorateElement(_init, 9, "method", _method_dec, Foo2); @@ -3851,7 +3851,7 @@ const tests = { } static { const dummy = this; - _init = [, , ,], _class_decorators = [dummy.#foo(0)], _b = class extends (_a = (dummy.#foo(1), Object), _method_dec2 = [dummy.#foo(2)], _method_dec = [dummy.#foo(3)], _field_dec2 = [dummy.#foo(4)], _field_dec = [dummy.#foo(5)], _getter_dec2 = [dummy.#foo(6)], _getter_dec = [dummy.#foo(7)], _setter_dec2 = [dummy.#foo(8)], _setter_dec = [dummy.#foo(9)], _accessor_dec2 = [dummy.#foo(10)], _accessor_dec = [dummy.#foo(11)], _a) { + _class_decorators = [dummy.#foo(0)], _b = class extends (_a = (dummy.#foo(1), Object), _method_dec2 = [dummy.#foo(2)], _method_dec = [dummy.#foo(3)], _field_dec2 = [dummy.#foo(4)], _field_dec = [dummy.#foo(5)], _getter_dec2 = [dummy.#foo(6)], _getter_dec = [dummy.#foo(7)], _setter_dec2 = [dummy.#foo(8)], _setter_dec = [dummy.#foo(9)], _accessor_dec2 = [dummy.#foo(10)], _accessor_dec = [dummy.#foo(11)], _a) { constructor() { super(...arguments); __runInitializers(_init, 5, this); @@ -3872,7 +3872,7 @@ const tests = { } static set setter(x) { } - }, _accessor = new WeakMap(), _accessor2 = new WeakMap(), __decorateElement(_init, 9, "method", _method_dec, _b), __decorateElement(_init, 10, "getter", _getter_dec, _b), __decorateElement(_init, 11, "setter", _setter_dec, _b), __decorateElement(_init, 12, "accessor", _accessor_dec, _b, _accessor2), __decorateElement(_init, 1, "method", _method_dec2, _b), __decorateElement(_init, 2, "getter", _getter_dec2, _b), __decorateElement(_init, 3, "setter", _setter_dec2, _b), __decorateElement(_init, 4, "accessor", _accessor_dec2, _b, _accessor), __decorateElement(_init, 13, "field", _field_dec, _b), __decorateElement(_init, 5, "field", _field_dec2, _b), _b = __decorateElement(_init, 0, "", _class_decorators, _b), __runInitializers(_init, 3, _b), __publicField(_b, "field", __runInitializers(_init, 14, _b)), __runInitializers(_init, 17, _b), __privateAdd(_b, _accessor2, __runInitializers(_init, 6, _b)), __runInitializers(_init, 9, _b), __runInitializers(_init, 1, _b), _b; + }, _init = [, , ,], _accessor = new WeakMap(), _accessor2 = new WeakMap(), __decorateElement(_init, 9, "method", _method_dec, _b), __decorateElement(_init, 10, "getter", _getter_dec, _b), __decorateElement(_init, 11, "setter", _setter_dec, _b), __decorateElement(_init, 12, "accessor", _accessor_dec, _b, _accessor2), __decorateElement(_init, 1, "method", _method_dec2, _b), __decorateElement(_init, 2, "getter", _getter_dec2, _b), __decorateElement(_init, 3, "setter", _setter_dec2, _b), __decorateElement(_init, 4, "accessor", _accessor_dec2, _b, _accessor), __decorateElement(_init, 13, "field", _field_dec, _b), __decorateElement(_init, 5, "field", _field_dec2, _b), _b = __decorateElement(_init, 0, "", _class_decorators, _b), __runInitializers(_init, 3, _b), __publicField(_b, "field", __runInitializers(_init, 14, _b)), __runInitializers(_init, 17, _b), __privateAdd(_b, _accessor2, __runInitializers(_init, 6, _b)), __runInitializers(_init, 9, _b), __runInitializers(_init, 1, _b), _b; } } assertEq(() => "" + log, "0,1,2,3,4,5,6,7,8,9,10,11"); @@ -3888,7 +3888,6 @@ const tests = { class Dummy { static #foo = NaN; static { - _init = [, , ,]; _Foo_decorators = [capture(() => new Foo2().#foo + 0)], _method_dec2 = [capture(() => __privateGet(new _Foo(), _foo) + 1)], _method_dec = [capture(() => __privateGet(new _Foo(), _foo) + 2)], _field_dec2 = [capture(() => __privateGet(new _Foo(), _foo) + 3)], _field_dec = [capture(() => __privateGet(new _Foo(), _foo) + 4)], _getter_dec2 = [capture(() => __privateGet(new _Foo(), _foo) + 5)], _getter_dec = [capture(() => __privateGet(new _Foo(), _foo) + 6)], _setter_dec2 = [capture(() => __privateGet(new _Foo(), _foo) + 7)], _setter_dec = [capture(() => __privateGet(new _Foo(), _foo) + 8)], _accessor_dec2 = [capture(() => __privateGet(new _Foo(), _foo) + 9)], _accessor_dec = [capture(() => __privateGet(new _Foo(), _foo) + 10)]; let _Foo = class _Foo { constructor() { @@ -3912,6 +3911,7 @@ const tests = { static set setter(x) { } }; + _init = [, , ,]; _foo = new WeakMap(); _accessor = new WeakMap(); _accessor2 = new WeakMap(); @@ -3958,7 +3958,7 @@ const tests = { class Outer { static #foo = 0; static { - _init = [, , ,], _Foo_decorators = [capture(() => Outer.#foo + 0)], _method_dec2 = [capture(() => __privateGet(new _a(), _foo) + 1)], _method_dec = [capture(() => __privateGet(new _a(), _foo) + 2)], _field_dec2 = [capture(() => __privateGet(new _a(), _foo) + 3)], _field_dec = [capture(() => __privateGet(new _a(), _foo) + 4)], _getter_dec2 = [capture(() => __privateGet(new _a(), _foo) + 5)], _getter_dec = [capture(() => __privateGet(new _a(), _foo) + 6)], _setter_dec2 = [capture(() => __privateGet(new _a(), _foo) + 7)], _setter_dec = [capture(() => __privateGet(new _a(), _foo) + 8)], _accessor_dec2 = [capture(() => __privateGet(new _a(), _foo) + 9)], _accessor_dec = [capture(() => __privateGet(new _a(), _foo) + 10)], _a = class { + _Foo_decorators = [capture(() => Outer.#foo + 0)], _method_dec2 = [capture(() => __privateGet(new _a(), _foo) + 1)], _method_dec = [capture(() => __privateGet(new _a(), _foo) + 2)], _field_dec2 = [capture(() => __privateGet(new _a(), _foo) + 3)], _field_dec = [capture(() => __privateGet(new _a(), _foo) + 4)], _getter_dec2 = [capture(() => __privateGet(new _a(), _foo) + 5)], _getter_dec = [capture(() => __privateGet(new _a(), _foo) + 6)], _setter_dec2 = [capture(() => __privateGet(new _a(), _foo) + 7)], _setter_dec = [capture(() => __privateGet(new _a(), _foo) + 8)], _accessor_dec2 = [capture(() => __privateGet(new _a(), _foo) + 9)], _accessor_dec = [capture(() => __privateGet(new _a(), _foo) + 10)], _a = class { constructor() { __runInitializers(_init, 5, this); __privateAdd(this, _foo, 10); @@ -3979,7 +3979,7 @@ const tests = { } static set setter(x) { } - }, _foo = new WeakMap(), _accessor = new WeakMap(), _accessor2 = new WeakMap(), __decorateElement(_init, 9, "method", _method_dec, _a), __decorateElement(_init, 10, "getter", _getter_dec, _a), __decorateElement(_init, 11, "setter", _setter_dec, _a), __decorateElement(_init, 12, "accessor", _accessor_dec, _a, _accessor2), __decorateElement(_init, 1, "method", _method_dec2, _a), __decorateElement(_init, 2, "getter", _getter_dec2, _a), __decorateElement(_init, 3, "setter", _setter_dec2, _a), __decorateElement(_init, 4, "accessor", _accessor_dec2, _a, _accessor), __decorateElement(_init, 13, "field", _field_dec, _a), __decorateElement(_init, 5, "field", _field_dec2, _a), _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 3, _a), __publicField(_a, "field", __runInitializers(_init, 14, _a)), __runInitializers(_init, 17, _a), __privateAdd(_a, _accessor2, __runInitializers(_init, 6, _a)), __runInitializers(_init, 9, _a), __runInitializers(_init, 1, _a), _a; + }, _init = [, , ,], _foo = new WeakMap(), _accessor = new WeakMap(), _accessor2 = new WeakMap(), __decorateElement(_init, 9, "method", _method_dec, _a), __decorateElement(_init, 10, "getter", _getter_dec, _a), __decorateElement(_init, 11, "setter", _setter_dec, _a), __decorateElement(_init, 12, "accessor", _accessor_dec, _a, _accessor2), __decorateElement(_init, 1, "method", _method_dec2, _a), __decorateElement(_init, 2, "getter", _getter_dec2, _a), __decorateElement(_init, 3, "setter", _setter_dec2, _a), __decorateElement(_init, 4, "accessor", _accessor_dec2, _a, _accessor), __decorateElement(_init, 13, "field", _field_dec, _a), __decorateElement(_init, 5, "field", _field_dec2, _a), _a = __decorateElement(_init, 0, "Foo", _Foo_decorators, _a), __runInitializers(_init, 3, _a), __publicField(_a, "field", __runInitializers(_init, 14, _a)), __runInitializers(_init, 17, _a), __privateAdd(_a, _accessor2, __runInitializers(_init, 6, _a)), __runInitializers(_init, 9, _a), __runInitializers(_init, 1, _a), _a; } } const log = []; @@ -3995,7 +3995,6 @@ const tests = { return () => { }; }; - _init = [, , ,]; _Foo_decorators = [capture(() => Foo2)], _method_dec2 = [capture(() => _Foo)], _method_dec = [capture(() => _Foo)], _field_dec2 = [capture(() => _Foo)], _field_dec = [capture(() => _Foo)], _getter_dec2 = [capture(() => _Foo)], _getter_dec = [capture(() => _Foo)], _setter_dec2 = [capture(() => _Foo)], _setter_dec = [capture(() => _Foo)], _accessor_dec2 = [capture(() => _Foo)], _accessor_dec = [capture(() => _Foo)]; let _Foo = class _Foo { constructor() { @@ -4018,6 +4017,7 @@ const tests = { static set setter(x) { } }; + _init = [, , ,]; _accessor = new WeakMap(); _accessor2 = new WeakMap(); __decorateElement(_init, 9, "method", _method_dec, _Foo); @@ -4055,7 +4055,7 @@ const tests = { return () => { }; }; - const originalFoo = (_init = [, , ,], _originalFoo_decorators = [capture(() => Foo)], _method_dec2 = [capture(() => _a)], _method_dec = [capture(() => _a)], _field_dec2 = [capture(() => _a)], _field_dec = [capture(() => _a)], _getter_dec2 = [capture(() => _a)], _getter_dec = [capture(() => _a)], _setter_dec2 = [capture(() => _a)], _setter_dec = [capture(() => _a)], _accessor_dec2 = [capture(() => _a)], _accessor_dec = [capture(() => _a)], _a = class { + const originalFoo = (_originalFoo_decorators = [capture(() => Foo)], _method_dec2 = [capture(() => _a)], _method_dec = [capture(() => _a)], _field_dec2 = [capture(() => _a)], _field_dec = [capture(() => _a)], _getter_dec2 = [capture(() => _a)], _getter_dec = [capture(() => _a)], _setter_dec2 = [capture(() => _a)], _setter_dec = [capture(() => _a)], _accessor_dec2 = [capture(() => _a)], _accessor_dec = [capture(() => _a)], _a = class { constructor() { __runInitializers(_init, 5, this); __publicField(this, "field", __runInitializers(_init, 18, this)), __runInitializers(_init, 21, this); @@ -4075,7 +4075,7 @@ const tests = { } static set setter(x) { } - }, _accessor = new WeakMap(), _accessor2 = new WeakMap(), __decorateElement(_init, 9, "method", _method_dec, _a), __decorateElement(_init, 10, "getter", _getter_dec, _a), __decorateElement(_init, 11, "setter", _setter_dec, _a), __decorateElement(_init, 12, "accessor", _accessor_dec, _a, _accessor2), __decorateElement(_init, 1, "method", _method_dec2, _a), __decorateElement(_init, 2, "getter", _getter_dec2, _a), __decorateElement(_init, 3, "setter", _setter_dec2, _a), __decorateElement(_init, 4, "accessor", _accessor_dec2, _a, _accessor), __decorateElement(_init, 13, "field", _field_dec, _a), __decorateElement(_init, 5, "field", _field_dec2, _a), _a = __decorateElement(_init, 0, "originalFoo", _originalFoo_decorators, _a), __runInitializers(_init, 3, _a), __publicField(_a, "field", __runInitializers(_init, 14, _a)), __runInitializers(_init, 17, _a), __privateAdd(_a, _accessor2, __runInitializers(_init, 6, _a)), __runInitializers(_init, 9, _a), __runInitializers(_init, 1, _a), _a); + }, _init = [, , ,], _accessor = new WeakMap(), _accessor2 = new WeakMap(), __decorateElement(_init, 9, "method", _method_dec, _a), __decorateElement(_init, 10, "getter", _getter_dec, _a), __decorateElement(_init, 11, "setter", _setter_dec, _a), __decorateElement(_init, 12, "accessor", _accessor_dec, _a, _accessor2), __decorateElement(_init, 1, "method", _method_dec2, _a), __decorateElement(_init, 2, "getter", _getter_dec2, _a), __decorateElement(_init, 3, "setter", _setter_dec2, _a), __decorateElement(_init, 4, "accessor", _accessor_dec2, _a, _accessor), __decorateElement(_init, 13, "field", _field_dec, _a), __decorateElement(_init, 5, "field", _field_dec2, _a), _a = __decorateElement(_init, 0, "originalFoo", _originalFoo_decorators, _a), __runInitializers(_init, 3, _a), __publicField(_a, "field", __runInitializers(_init, 14, _a)), __runInitializers(_init, 17, _a), __privateAdd(_a, _accessor2, __runInitializers(_init, 6, _a)), __runInitializers(_init, 9, _a), __runInitializers(_init, 1, _a), _a); const firstFn = fns.shift(); assertThrows(() => firstFn(), ReferenceError); for (const fn of fns) { @@ -4243,7 +4243,6 @@ const tests = { } }; }; log.push("start"); - _init = [, , ,]; _Foo_decorators = [classDec1, classDec2]; class Foo2 extends (_a = (log.push("extends"), Object), _method_dec2 = [methodDec1, methodDec2], _method_dec = [staticMethodDec1, staticMethodDec2], _field_dec2 = [fieldDec1, fieldDec2], _field_dec = [staticFieldDec1, staticFieldDec2], _getter_dec2 = [getterDec1, getterDec2], _getter_dec = [staticGetterDec1, staticGetterDec2], _setter_dec2 = [setterDec1, setterDec2], _setter_dec = [staticSetterDec1, staticSetterDec2], _accessor_dec2 = [accessorDec1, accessorDec2], _accessor_dec = [staticAccessorDec1, staticAccessorDec2], _a) { constructor() { @@ -4269,6 +4268,7 @@ const tests = { static set setter(x) { } } + _init = [, , ,]; _accessor = new WeakMap(); _accessor2 = new WeakMap(); __decorateElement(_init, 9, "method", _method_dec, Foo2); @@ -4453,7 +4453,7 @@ const tests = { } }; }; log.push("start"); - const Foo2 = (_init = [, , ,], _Foo_decorators = [classDec1, classDec2], _b = class extends (_a = (log.push("extends"), Object), _method_dec2 = [methodDec1, methodDec2], _method_dec = [staticMethodDec1, staticMethodDec2], _field_dec2 = [fieldDec1, fieldDec2], _field_dec = [staticFieldDec1, staticFieldDec2], _getter_dec2 = [getterDec1, getterDec2], _getter_dec = [staticGetterDec1, staticGetterDec2], _setter_dec2 = [setterDec1, setterDec2], _setter_dec = [staticSetterDec1, staticSetterDec2], _accessor_dec2 = [accessorDec1, accessorDec2], _accessor_dec = [staticAccessorDec1, staticAccessorDec2], _a) { + const Foo2 = (_Foo_decorators = [classDec1, classDec2], _b = class extends (_a = (log.push("extends"), Object), _method_dec2 = [methodDec1, methodDec2], _method_dec = [staticMethodDec1, staticMethodDec2], _field_dec2 = [fieldDec1, fieldDec2], _field_dec = [staticFieldDec1, staticFieldDec2], _getter_dec2 = [getterDec1, getterDec2], _getter_dec = [staticGetterDec1, staticGetterDec2], _setter_dec2 = [setterDec1, setterDec2], _setter_dec = [staticSetterDec1, staticSetterDec2], _accessor_dec2 = [accessorDec1, accessorDec2], _accessor_dec = [staticAccessorDec1, staticAccessorDec2], _a) { constructor() { log.push("ctor:start"); super(); @@ -4476,7 +4476,7 @@ const tests = { } static set setter(x) { } - }, _accessor = new WeakMap(), _accessor2 = new WeakMap(), __decorateElement(_init, 9, "method", _method_dec, _b), __decorateElement(_init, 10, "getter", _getter_dec, _b), __decorateElement(_init, 11, "setter", _setter_dec, _b), __decorateElement(_init, 12, "accessor", _accessor_dec, _b, _accessor2), __decorateElement(_init, 1, "method", _method_dec2, _b), __decorateElement(_init, 2, "getter", _getter_dec2, _b), __decorateElement(_init, 3, "setter", _setter_dec2, _b), __decorateElement(_init, 4, "accessor", _accessor_dec2, _b, _accessor), __decorateElement(_init, 13, "field", _field_dec, _b), __decorateElement(_init, 5, "field", _field_dec2, _b), _b = __decorateElement(_init, 0, "Foo", _Foo_decorators, _b), __runInitializers(_init, 3, _b), log.push("static:start"), __publicField(_b, "field", __runInitializers(_init, 14, _b)), __runInitializers(_init, 17, _b), __privateAdd(_b, _accessor2, __runInitializers(_init, 6, _b)), __runInitializers(_init, 9, _b), log.push("static:end"), __runInitializers(_init, 1, _b), _b); + }, _init = [, , ,], _accessor = new WeakMap(), _accessor2 = new WeakMap(), __decorateElement(_init, 9, "method", _method_dec, _b), __decorateElement(_init, 10, "getter", _getter_dec, _b), __decorateElement(_init, 11, "setter", _setter_dec, _b), __decorateElement(_init, 12, "accessor", _accessor_dec, _b, _accessor2), __decorateElement(_init, 1, "method", _method_dec2, _b), __decorateElement(_init, 2, "getter", _getter_dec2, _b), __decorateElement(_init, 3, "setter", _setter_dec2, _b), __decorateElement(_init, 4, "accessor", _accessor_dec2, _b, _accessor), __decorateElement(_init, 13, "field", _field_dec, _b), __decorateElement(_init, 5, "field", _field_dec2, _b), _b = __decorateElement(_init, 0, "Foo", _Foo_decorators, _b), __runInitializers(_init, 3, _b), log.push("static:start"), __publicField(_b, "field", __runInitializers(_init, 14, _b)), __runInitializers(_init, 17, _b), __privateAdd(_b, _accessor2, __runInitializers(_init, 6, _b)), __runInitializers(_init, 9, _b), log.push("static:end"), __runInitializers(_init, 1, _b), _b); log.push("after"); new Foo2(); log.push("end"); @@ -4642,7 +4642,6 @@ const tests = { } }; }; log.push("start"); - _init = [, , ,]; _Foo_decorators = [classDec1, classDec2]; class Foo2 extends (_a = (log.push("extends"), Object), _method_dec = [methodDec1, methodDec2], _staticMethod_dec = [staticMethodDec1, staticMethodDec2], _field_dec = [fieldDec1, fieldDec2], _staticField_dec = [staticFieldDec1, staticFieldDec2], _getter_dec = [getterDec1, getterDec2], _staticGetter_dec = [staticGetterDec1, staticGetterDec2], _setter_dec = [setterDec1, setterDec2], _staticSetter_dec = [staticSetterDec1, staticSetterDec2], _accessor_dec = [accessorDec1, accessorDec2], _staticAccessor_dec = [staticAccessorDec1, staticAccessorDec2], _a) { constructor() { @@ -4655,6 +4654,7 @@ const tests = { log.push("ctor:end"); } } + _init = [, , ,]; _Foo_instances = new WeakSet(); method_fn = function() { }; @@ -4858,7 +4858,7 @@ const tests = { } }; }; log.push("start"); - const Foo2 = (_init = [, , ,], _class_decorators = [classDec1, classDec2], _b = class extends (_a = (log.push("extends"), Object), _method_dec = [methodDec1, methodDec2], _staticMethod_dec = [staticMethodDec1, staticMethodDec2], _field_dec = [fieldDec1, fieldDec2], _staticField_dec = [staticFieldDec1, staticFieldDec2], _getter_dec = [getterDec1, getterDec2], _staticGetter_dec = [staticGetterDec1, staticGetterDec2], _setter_dec = [setterDec1, setterDec2], _staticSetter_dec = [staticSetterDec1, staticSetterDec2], _accessor_dec = [accessorDec1, accessorDec2], _staticAccessor_dec = [staticAccessorDec1, staticAccessorDec2], _a) { + const Foo2 = (_class_decorators = [classDec1, classDec2], _b = class extends (_a = (log.push("extends"), Object), _method_dec = [methodDec1, methodDec2], _staticMethod_dec = [staticMethodDec1, staticMethodDec2], _field_dec = [fieldDec1, fieldDec2], _staticField_dec = [staticFieldDec1, staticFieldDec2], _getter_dec = [getterDec1, getterDec2], _staticGetter_dec = [staticGetterDec1, staticGetterDec2], _setter_dec = [setterDec1, setterDec2], _staticSetter_dec = [staticSetterDec1, staticSetterDec2], _accessor_dec = [accessorDec1, accessorDec2], _staticAccessor_dec = [staticAccessorDec1, staticAccessorDec2], _a) { constructor() { log.push("ctor:start"); super(); @@ -4868,7 +4868,7 @@ const tests = { __privateAdd(this, _accessor, __runInitializers(_init, 10, this)), __runInitializers(_init, 13, this); log.push("ctor:end"); } - }, _instances = new WeakSet(), method_fn = function() { + }, _init = [, , ,], _instances = new WeakSet(), method_fn = function() { }, _static = new WeakSet(), staticMethod_fn = function() { }, _field = new WeakMap(), _staticField = new WeakMap(), getter_get = function() { return;