Fix name generation scoping (#58418)

This commit is contained in:
Ron Buckton authored and GitHub committed 2024-05-06 11:59:37 -04:00
1 parent e154d47851
commit 70d8ec2f26
11 files changed
+180 -155

No files matched your search

+105 -105
View File
@@ -2125,13 +2125,9 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
}
function emitComputedPropertyName(node: ComputedPropertyName) {
const savedPrivateNameTempFlags = privateNameTempFlags;
const savedReservedMemberNames = reservedPrivateNames;
popPrivateNameGenerationScope();
writePunctuation("[");
emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfComputedPropertyName);
writePunctuation("]");
pushPrivateNameGenerationScope(savedPrivateNameTempFlags, savedReservedMemberNames);
}
//
@@ -2198,15 +2194,10 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
}
function emitMethodSignature(node: MethodSignature) {
pushNameGenerationScope(node);
emitModifierList(node, node.modifiers);
emit(node.name);
emit(node.questionToken);
emitTypeParameters(node, node.typeParameters);
emitParameters(node, node.parameters);
emitTypeAnnotation(node.type);
writeTrailingSemicolon();
popNameGenerationScope(node);
emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);
}
function emitMethodDeclaration(node: MethodDeclaration) {
@@ -2214,18 +2205,20 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
emit(node.asteriskToken);
emit(node.name);
emit(node.questionToken);
emitSignatureAndBody(node, emitSignatureHead);
emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
}
function emitClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration) {
writeKeyword("static");
pushNameGenerationScope(node);
emitBlockFunctionBody(node.body);
popNameGenerationScope(node);
}
function emitConstructor(node: ConstructorDeclaration) {
emitDecoratorsAndModifiers(node, node.modifiers, /*allowDecorators*/ false);
writeKeyword("constructor");
emitSignatureAndBody(node, emitSignatureHead);
emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
}
function emitAccessorDeclaration(node: AccessorDeclaration) {
@@ -2234,27 +2227,17 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
emitTokenWithComment(token, pos, writeKeyword, node);
writeSpace();
emit(node.name);
emitSignatureAndBody(node, emitSignatureHead);
emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
}
function emitCallSignature(node: CallSignatureDeclaration) {
pushNameGenerationScope(node);
emitTypeParameters(node, node.typeParameters);
emitParameters(node, node.parameters);
emitTypeAnnotation(node.type);
writeTrailingSemicolon();
popNameGenerationScope(node);
emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);
}
function emitConstructSignature(node: ConstructSignatureDeclaration) {
pushNameGenerationScope(node);
writeKeyword("new");
writeSpace();
emitTypeParameters(node, node.typeParameters);
emitParameters(node, node.parameters);
emitTypeAnnotation(node.type);
writeTrailingSemicolon();
popNameGenerationScope(node);
emitSignatureAndBody(node, emitSignatureHead, emitEmptyFunctionBody);
}
function emitIndexSignature(node: IndexSignatureDeclaration) {
@@ -2297,14 +2280,19 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
}
function emitFunctionType(node: FunctionTypeNode) {
pushNameGenerationScope(node);
emitSignatureAndBody(node, emitFunctionTypeHead, emitFunctionTypeBody);
}
function emitFunctionTypeHead(node: FunctionTypeNode | ConstructorTypeNode) {
emitTypeParameters(node, node.typeParameters);
emitParametersForArrow(node, node.parameters);
writeSpace();
writePunctuation("=>");
}
function emitFunctionTypeBody(node: FunctionTypeNode | ConstructorTypeNode) {
writeSpace();
emit(node.type);
popNameGenerationScope(node);
}
function emitJSDocFunctionType(node: JSDocFunctionType) {
@@ -2330,17 +2318,10 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
}
function emitConstructorType(node: ConstructorTypeNode) {
pushNameGenerationScope(node);
emitModifierList(node, node.modifiers);
writeKeyword("new");
writeSpace();
emitTypeParameters(node, node.typeParameters);
emitParameters(node, node.parameters);
writeSpace();
writePunctuation("=>");
writeSpace();
emit(node.type);
popNameGenerationScope(node);
emitSignatureAndBody(node, emitFunctionTypeHead, emitFunctionTypeBody);
}
function emitTypeQuery(node: TypeQueryNode) {
@@ -2351,16 +2332,15 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
}
function emitTypeLiteral(node: TypeLiteralNode) {
// Type literals don't have private names, but we need to push a new scope so that
// we can step out of it when emitting a computed property.
pushPrivateNameGenerationScope(TempFlags.Auto, /*newReservedMemberNames*/ undefined);
pushNameGenerationScope(node);
forEach(node.members, generateMemberNames);
writePunctuation("{");
const flags = getEmitFlags(node) & EmitFlags.SingleLine ? ListFormat.SingleLineTypeLiteralMembers : ListFormat.MultiLineTypeLiteralMembers;
emitList(node, node.members, flags | ListFormat.NoSpaceIfEmpty);
writePunctuation("}");
popPrivateNameGenerationScope();
popNameGenerationScope(node);
}
function emitArrayType(node: ArrayTypeNode) {
@@ -2569,9 +2549,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
}
function emitObjectLiteralExpression(node: ObjectLiteralExpression) {
// Object literals don't have private names, but we need to push a new scope so that
// we can step out of it when emitting a computed property.
pushPrivateNameGenerationScope(TempFlags.Auto, /*newReservedMemberNames*/ undefined);
pushNameGenerationScope(node);
forEach(node.properties, generateMemberNames);
const indentedFlag = getEmitFlags(node) & EmitFlags.Indented;
@@ -2587,7 +2565,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
decreaseIndent();
}
popPrivateNameGenerationScope();
popNameGenerationScope(node);
}
function emitPropertyAccessExpression(node: PropertyAccessExpression) {
@@ -2714,7 +2692,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
function emitArrowFunction(node: ArrowFunction) {
emitModifierList(node, node.modifiers);
emitSignatureAndBody(node, emitArrowFunctionHead);
emitSignatureAndBody(node, emitArrowFunctionHead, emitArrowFunctionBody);
}
function emitArrowFunctionHead(node: ArrowFunction) {
@@ -2725,6 +2703,16 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
emit(node.equalsGreaterThanToken);
}
function emitArrowFunctionBody(node: ArrowFunction) {
if (isBlock(node.body)) {
emitBlockFunctionBody(node.body);
}
else {
writeSpace();
emitExpression(node.body, parenthesizer.parenthesizeConciseBodyOfArrowFunction);
}
}
function emitDeleteExpression(node: DeleteExpression) {
emitTokenWithComment(SyntaxKind.DeleteKeyword, node.pos, writeKeyword, node);
writeSpace();
@@ -3305,42 +3293,40 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
emit(node.asteriskToken);
writeSpace();
emitIdentifierName(node.name);
emitSignatureAndBody(node, emitSignatureHead);
emitSignatureAndBody(node, emitSignatureHead, emitFunctionBody);
}
function emitSignatureAndBody<T extends FunctionLikeDeclaration>(node: T, emitSignatureHead: (node: T) => void) {
function emitSignatureAndBody<T extends SignatureDeclaration>(node: T, emitSignatureHead: (node: T) => void, emitBody: (node: T) => void) {
const indentedFlag = getEmitFlags(node) & EmitFlags.Indented;
if (indentedFlag) {
increaseIndent();
}
pushNameGenerationScope(node);
forEach(node.parameters, generateNames);
emitSignatureHead(node);
emitBody(node);
popNameGenerationScope(node);
if (indentedFlag) {
decreaseIndent();
}
}
function emitFunctionBody<T extends Exclude<FunctionLikeDeclaration, ArrowFunction>>(node: T) {
const body = node.body;
if (body) {
if (isBlock(body)) {
const indentedFlag = getEmitFlags(node) & EmitFlags.Indented;
if (indentedFlag) {
increaseIndent();
}
pushNameGenerationScope(node);
forEach(node.parameters, generateNames);
generateNames(node.body);
emitSignatureHead(node);
emitBlockFunctionBody(body);
popNameGenerationScope(node);
if (indentedFlag) {
decreaseIndent();
}
}
else {
emitSignatureHead(node);
writeSpace();
emitExpression(body, parenthesizer.parenthesizeConciseBodyOfArrowFunction);
}
emitBlockFunctionBody(body);
}
else {
emitSignatureHead(node);
writeTrailingSemicolon();
}
}
function emitEmptyFunctionBody(_node: SignatureDeclaration) {
writeTrailingSemicolon();
}
function emitSignatureHead(node: SignatureDeclaration) {
emitTypeParameters(node, node.typeParameters);
emitParameters(node, node.parameters);
@@ -3388,6 +3374,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
}
function emitBlockFunctionBody(body: Block) {
generateNames(body);
onBeforeEmitNode?.(body);
writeSpace();
writePunctuation("{");
@@ -3428,10 +3415,6 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
}
function emitClassDeclarationOrExpression(node: ClassDeclaration | ClassExpression) {
pushPrivateNameGenerationScope(TempFlags.Auto, /*newReservedMemberNames*/ undefined);
forEach(node.members, generateMemberNames);
emitDecoratorsAndModifiers(node, node.modifiers, /*allowDecorators*/ true);
emitTokenWithComment(SyntaxKind.ClassKeyword, moveRangePastModifiers(node).pos, writeKeyword, node);
if (node.name) {
@@ -3446,24 +3429,22 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
emitTypeParameters(node, node.typeParameters);
emitList(node, node.heritageClauses, ListFormat.ClassHeritageClauses);
writeSpace();
writePunctuation("{");
pushNameGenerationScope(node);
forEach(node.members, generateMemberNames);
emitList(node, node.members, ListFormat.ClassMembers);
popNameGenerationScope(node);
writePunctuation("}");
if (indentedFlag) {
decreaseIndent();
}
popPrivateNameGenerationScope();
}
function emitInterfaceDeclaration(node: InterfaceDeclaration) {
// Interfaces don't have private names, but we need to push a new scope so that
// we can step out of it when emitting a computed property.
pushPrivateNameGenerationScope(TempFlags.Auto, /*newReservedMemberNames*/ undefined);
emitDecoratorsAndModifiers(node, node.modifiers, /*allowDecorators*/ false);
writeKeyword("interface");
writeSpace();
@@ -3472,10 +3453,13 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
emitList(node, node.heritageClauses, ListFormat.HeritageClauses);
writeSpace();
writePunctuation("{");
emitList(node, node.members, ListFormat.InterfaceMembers);
writePunctuation("}");
popPrivateNameGenerationScope();
pushNameGenerationScope(node);
forEach(node.members, generateMemberNames);
emitList(node, node.members, ListFormat.InterfaceMembers);
popNameGenerationScope(node);
writePunctuation("}");
}
function emitTypeAliasDeclaration(node: TypeAliasDeclaration) {
@@ -4488,7 +4472,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
emitList(parentNode, parameters, ListFormat.Parameters);
}
function canEmitSimpleArrowHead(parentNode: FunctionTypeNode | ArrowFunction, parameters: NodeArray<ParameterDeclaration>) {
function canEmitSimpleArrowHead(parentNode: FunctionTypeNode | ConstructorTypeNode | ArrowFunction, parameters: NodeArray<ParameterDeclaration>) {
const parameter = singleOrUndefined(parameters);
return parameter
&& parameter.pos === parentNode.pos // may not have parsed tokens between parent and parameter
@@ -4504,7 +4488,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
&& isIdentifier(parameter.name); // parameter name must be identifier
}
function emitParametersForArrow(parentNode: FunctionTypeNode | ArrowFunction, parameters: NodeArray<ParameterDeclaration>) {
function emitParametersForArrow(parentNode: FunctionTypeNode | ConstructorTypeNode | ArrowFunction, parameters: NodeArray<ParameterDeclaration>) {
if (canEmitSimpleArrowHead(parentNode, parameters)) {
emitList(parentNode, parameters, ListFormat.Parameters & ~ListFormat.Parenthesis);
}
@@ -5172,9 +5156,14 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
* Push a new name generation scope.
*/
function pushNameGenerationScope(node: Node | undefined) {
privateNameTempFlagsStack.push(privateNameTempFlags);
privateNameTempFlags = TempFlags.Auto;
reservedPrivateNamesStack.push(reservedPrivateNames);
if (node && getEmitFlags(node) & EmitFlags.ReuseTempVariableScope) {
return;
}
tempFlagsStack.push(tempFlags);
tempFlags = TempFlags.Auto;
formattedNameTempFlagsStack.push(formattedNameTempFlags);
@@ -5186,9 +5175,13 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
* Pop the current name generation scope.
*/
function popNameGenerationScope(node: Node | undefined) {
privateNameTempFlags = privateNameTempFlagsStack.pop()!;
reservedPrivateNames = reservedPrivateNamesStack.pop();
if (node && getEmitFlags(node) & EmitFlags.ReuseTempVariableScope) {
return;
}
tempFlags = tempFlagsStack.pop()!;
formattedNameTempFlags = formattedNameTempFlagsStack.pop();
reservedNames = reservedNamesStack.pop();
@@ -5201,24 +5194,6 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
reservedNames.add(name);
}
/**
* Push a new member name generation scope.
*/
function pushPrivateNameGenerationScope(newPrivateNameTempFlags: TempFlags, newReservedMemberNames: Set<string> | undefined) {
privateNameTempFlagsStack.push(privateNameTempFlags);
privateNameTempFlags = newPrivateNameTempFlags;
reservedPrivateNamesStack.push(reservedNames);
reservedPrivateNames = newReservedMemberNames;
}
/**
* Pop the current member name generation scope.
*/
function popPrivateNameGenerationScope() {
privateNameTempFlags = privateNameTempFlagsStack.pop()!;
reservedPrivateNames = reservedPrivateNamesStack.pop();
}
function reservePrivateNameInNestedScopes(name: string) {
if (!reservedPrivateNames || reservedPrivateNames === lastOrUndefined(reservedPrivateNamesStack)) {
reservedPrivateNames = new Set();
@@ -5318,7 +5293,9 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
case SyntaxKind.PropertyAssignment:
case SyntaxKind.ShorthandPropertyAssignment:
case SyntaxKind.PropertyDeclaration:
case SyntaxKind.PropertySignature:
case SyntaxKind.MethodDeclaration:
case SyntaxKind.MethodSignature:
case SyntaxKind.GetAccessor:
case SyntaxKind.SetAccessor:
generateNameIfNeeded((node as NamedDeclaration).name);
@@ -5372,7 +5349,30 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
}
function isReservedName(name: string, privateName: boolean): boolean {
return privateName ? !!reservedPrivateNames?.has(name) : !!reservedNames?.has(name);
let set: Set<string> | undefined;
let stack: (Set<string> | undefined)[];
if (privateName) {
set = reservedPrivateNames;
stack = reservedPrivateNamesStack;
}
else {
set = reservedNames;
stack = reservedNamesStack;
}
if (set?.has(name)) {
return true;
}
for (let i = stack.length - 1; i >= 0; i--) {
if (set === stack[i]) {
continue;
}
set = stack[i];
if (set?.has(name)) {
return true;
}
}
return false;
}
/**
@@ -17,4 +17,29 @@ describe("unittests:: evaluation:: asyncArrowEvaluation", () => {
await result.main();
assert.instanceOf(result.output[0].a(), result.A);
});
// https://github.com/microsoft/TypeScript/issues/57897
it("Class alias (es5)", async () => {
const result = evaluator.evaluateTypeScript(`
class X {
public static a = async (someVar: boolean = true) => {
return await X.b();
};
public static b = async () => {
return "GOOD";
};
}
export async function main() {
try {
return await X.a();
}
catch (e) {
return "BAD";
}
}`);
const output = await result.main();
assert.equal(output, "GOOD");
});
});
@@ -79,17 +79,17 @@ function f12() { return (...args_1) => {
function f() {
const a1 = (x_1, ...args_1) => __awaiter(this, [x_1, ...args_1], void 0, function* (x, y = z) { });
const a2 = (_a) => __awaiter(this, [_a], void 0, function* ({ [z]: x }) { });
const a3 = (...args_2) => {
const a3 = (...args_1) => {
var arguments_10 = arguments;
return __awaiter(this, [...args_2], void 0, function* (x = z) { return () => __awaiter(this, void 0, void 0, function* () { return arguments_10; }); });
return __awaiter(this, [...args_1], void 0, function* (x = z) { return () => __awaiter(this, void 0, void 0, function* () { return arguments_10; }); });
};
const a4 = (...args_2) => __awaiter(this, [...args_2], void 0, function* (x = z) { return () => __awaiter(this, void 0, void 0, function* () { return () => __awaiter(this, void 0, void 0, function* () { return arguments_10; }); }); });
const a5 = (...args_3) => __awaiter(this, [...args_3], void 0, function* (x = z, ...args) { });
const a6 = (...args_4) => __awaiter(this, [...args_4], void 0, function* (x = z, ...args) { return () => __awaiter(this, void 0, void 0, function* () { return arguments_10; }); });
const a7 = (...args_5) => __awaiter(this, [...args_5], void 0, function* (x = z, ...args) { return () => __awaiter(this, void 0, void 0, function* () { return () => __awaiter(this, void 0, void 0, function* () { return arguments_10; }); }); });
const a8 = () => __awaiter(this, void 0, void 0, function* () { return (...args_6) => __awaiter(this, [...args_6], void 0, function* (x = z) { return arguments_10; }); });
const a9 = () => __awaiter(this, void 0, void 0, function* () { return (...args_7) => __awaiter(this, [...args_7], void 0, function* (x = z) { return () => __awaiter(this, void 0, void 0, function* () { return arguments_10; }); }); });
const a10 = (...args_8) => __awaiter(this, [...args_8], void 0, function* (x = z) { return () => __awaiter(this, void 0, void 0, function* () { return function () {
const a4 = (...args_1) => __awaiter(this, [...args_1], void 0, function* (x = z) { return () => __awaiter(this, void 0, void 0, function* () { return () => __awaiter(this, void 0, void 0, function* () { return arguments_10; }); }); });
const a5 = (...args_1) => __awaiter(this, [...args_1], void 0, function* (x = z, ...args) { });
const a6 = (...args_1) => __awaiter(this, [...args_1], void 0, function* (x = z, ...args) { return () => __awaiter(this, void 0, void 0, function* () { return arguments_10; }); });
const a7 = (...args_1) => __awaiter(this, [...args_1], void 0, function* (x = z, ...args) { return () => __awaiter(this, void 0, void 0, function* () { return () => __awaiter(this, void 0, void 0, function* () { return arguments_10; }); }); });
const a8 = () => __awaiter(this, void 0, void 0, function* () { return (...args_1) => __awaiter(this, [...args_1], void 0, function* (x = z) { return arguments_10; }); });
const a9 = () => __awaiter(this, void 0, void 0, function* () { return (...args_1) => __awaiter(this, [...args_1], void 0, function* (x = z) { return () => __awaiter(this, void 0, void 0, function* () { return arguments_10; }); }); });
const a10 = (...args_1) => __awaiter(this, [...args_1], void 0, function* (x = z) { return () => __awaiter(this, void 0, void 0, function* () { return function () {
var arguments_11 = arguments;
return __awaiter(this, void 0, void 0, function* () { return () => __awaiter(this, void 0, void 0, function* () { return arguments_11; }); });
}; }); });
@@ -30,7 +30,7 @@ class C1 {
static set ["z"](value) { C1.#_d_accessor_storage = value; }
}
class C2 {
#_e_accessor_storage = 1;
get [_a = f()]() { return this.#_e_accessor_storage; }
set [_a](value) { this.#_e_accessor_storage = value; }
#_a_accessor_storage = 1;
get [_a = f()]() { return this.#_a_accessor_storage; }
set [_a](value) { this.#_a_accessor_storage = value; }
}
@@ -189,10 +189,10 @@ let C = (() => {
set x(value) { }
/*13*/
y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, 1));
#z_accessor_storage = (__runInitializers(this, _y_extraInitializers), __runInitializers(this, _z_initializers, 1));
#z_1_accessor_storage = (__runInitializers(this, _y_extraInitializers), __runInitializers(this, _z_initializers, 1));
/*16*/
get z() { return this.#z_accessor_storage; }
set z(value) { this.#z_accessor_storage = value; }
get z() { return this.#z_1_accessor_storage; }
set z(value) { this.#z_1_accessor_storage = value; }
static {
/*28*/
_C_y = { value: (__runInitializers(_classThis, _staticExtraInitializers), __runInitializers(_classThis, _static_private_y_initializers, 1)) };
@@ -189,10 +189,10 @@ let C = (() => {
set x(value) { }
/*13*/
y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, 1));
#z_accessor_storage = (__runInitializers(this, _y_extraInitializers), __runInitializers(this, _z_initializers, 1));
#z_1_accessor_storage = (__runInitializers(this, _y_extraInitializers), __runInitializers(this, _z_initializers, 1));
/*16*/
get z() { return this.#z_accessor_storage; }
set z(value) { this.#z_accessor_storage = value; }
get z() { return this.#z_1_accessor_storage; }
set z(value) { this.#z_1_accessor_storage = value; }
static {
/*28*/
_C_y = { value: (__runInitializers(_classThis, _staticExtraInitializers), __runInitializers(_classThis, _static_private_y_initializers, 1)) };
@@ -166,9 +166,9 @@ let C = (() => {
get x() { return 1; }
set x(value) { }
y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, 1));
#z_accessor_storage = (__runInitializers(this, _y_extraInitializers), __runInitializers(this, _z_initializers, 1));
get z() { return this.#z_accessor_storage; }
set z(value) { this.#z_accessor_storage = value; }
#z_1_accessor_storage = (__runInitializers(this, _y_extraInitializers), __runInitializers(this, _z_initializers, 1));
get z() { return this.#z_1_accessor_storage; }
set z(value) { this.#z_1_accessor_storage = value; }
static {
_C_y = { value: (__runInitializers(_classThis, _staticExtraInitializers), __runInitializers(_classThis, _static_private_y_initializers, 1)) };
}
@@ -1,6 +1,6 @@
//// [esDecorators-classDeclaration-sourceMap.js.map]
{"version":3,"file":"esDecorators-classDeclaration-sourceMap.js","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;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CnZhciBfX2NsYXNzUHJpdmF0ZUZpZWxkU2V0ID0gKHRoaXMgJiYgdGhpcy5fX2NsYXNzUHJpdmF0ZUZpZWxkU2V0KSB8fCBmdW5jdGlvbiAocmVjZWl2ZXIsIHN0YXRlLCB2YWx1ZSwga2luZCwgZikgew0KICAgIGlmIChraW5kID09PSAibSIpIHRocm93IG5ldyBUeXBlRXJyb3IoIlByaXZhdGUgbWV0aG9kIGlzIG5vdCB3cml0YWJsZSIpOw0KICAgIGlmIChraW5kID09PSAiYSIgJiYgIWYpIHRocm93IG5ldyBUeXBlRXJyb3IoIlByaXZhdGUgYWNjZXNzb3Igd2FzIGRlZmluZWQgd2l0aG91dCBhIHNldHRlciIpOw0KICAgIGlmICh0eXBlb2Ygc3RhdGUgPT09ICJmdW5jdGlvbiIgPyByZWNlaXZlciAhPT0gc3RhdGUgfHwgIWYgOiAhc3RhdGUuaGFzKHJlY2VpdmVyKSkgdGhyb3cgbmV3IFLine truncated
{"version":3,"file":"esDecorators-classDeclaration-sourceMap.js","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIM,CAAC;;4BAFN,GAAG,EACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAEC,GAAG,EACH,GAAG;iCAGH,GAAG,EACH,GAAG;iCAGH,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,GAAG;6BAGH,GAAG,EACH,GAAG;iDAGH,GAAG,EACH,GAAG;gDAGH,GAAG,EACH,GAAG;gDAGH,GAAG,EACH,GAAG;4CAGH,GAAG,EACH,GAAG;4CAGH,GAAG,EACH,GAAG;YAfJ,yDAAA,yBAAA,cAAkB,CAAC,YAAA,uSAAA;YAInB,wDAAA,uBAAA,cAAkB,OAAO,CAAC,CAAC,CAAC,CAAC,cAAA,4RAAA;YAI7B,wDAAA,uBAAA,UAAc,KAAa,IAA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AgICAgY29udGV4dC5hZGRJbml0aWFsaXplciA9IGZ1bmN0aW9uIChmKSB7IGlmIChkb25lKSB0aHJvdyBuZXcgVHlwZUVycm9yKCJDYW5ub3QgYWRkIGluaXRpYWxpemVycyBhZnRlciBkZWNvcmF0aW9uIGhhcyBjb21wbGV0ZWQiKTsgZXh0cmFJbml0aWFsaXplcnMucHVzaChhY2NlcHQoZiB8fCBudWxsKSk7IH07DQogICAgICAgIHZhciByZXN1bHQgPSAoMCwgZGVjb3JhdG9yc1tpXSkoa2luZCA9PT0gImFjY2Vzc29yIiA/IHsgZ2V0OiBkZXNjcmlwdG9yLmdldCwgc2V0OiBkZXNjcmlwdG9yLnNldCB9IDogZGVzY3JpcHRvcltrZXldLCBjb250ZXh0KTsNCiAgICAgICAgaWYgKGtpbmQgPT09ICJhY2Nlc3NvciIpIHsNCiAgICAgICAgICAgIGlmIChyZXN1bHQgPT09IHZvaWQgMCkgY29udGludWU7DQogICAgICAgICAgICBpZiAocmVzdWx0ID09PSBudWxsIHx8IHR5cGVvZiByZXN1bHQgIT09ICJvYmplY3QiKSB0aHJvdyBuZXcgVHlwZUVycm9yKCJPYmplY3QgZXhwZWN0ZWQiKTsNCiAgICAgICAgICAgIGlmIChfID0gYWNjZXB0KHJlc3VsdC5nZXQpKSBkZXNjcmlwdG9yLmdldCA9IF87DQogICAgICAgICAgICBpZiAoXyA9IGFjY2VwdChyZXN1bHQuc2V0KSkgZGVzY3JpcHRvci5zZXQgPSBfOw0KICAgICAgICAgICAgaWYgKF8gPSBhY2NlcHQocmVzdWx0LmluaXQpKSBpbml0aWFsaXplcnMudW5zaGlmdChfKTsNCiAgICAgICAgfQ0KICAgICAgICBlbHNlIGlmIChfID0gYWNjZXB0KHJlc3VsdCkpIHsNCiAgICAgICAgICAgIGlmIChraW5kID09PSAiZmllbGQiKSBpbml0aWFsaXplcnMudW5zaGlmdChfKTsNCiAgICAgICAgICAgIGVsc2UgZGVzY3JpcHRvcltrZXldID0gXzsNCiAgIC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0gc3RhdGUgfHwgIWYgOiAhc3RhdGUuaGFzKHJlY2VpdmVyKSkgdGhyb3cgbmV3IFLine truncated
//// [esDecorators-classDeclaration-sourceMap.d.ts.map]
{"version":3,"file":"esDecorators-classDeclaration-sourceMap.d.ts","sourceRoot":"","sources":["esDecorators-classDeclaration-sourceMap.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,IAAI,GAAG,EAAE,GAAG,CAAC;AAErB,cAEM,CAAC;;IAGH,MAAM;IAEN,IAEI,CAAC,IAIQ,MAAM,CAJE;IAErB,IAEI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAK;IAIxB,CAAC,SAAK;IAIN,QAAQ,CAAC,CAAC,SAAK;CAqBlB"}
@@ -707,7 +707,7 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 > ^
7 > ^^^
8 > ^^^^^^^^^^^^^->
8 > ^^^^^^^^^^^^^^^->
1->
>
> @dec
@@ -742,30 +742,30 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts
6 >Emitted(117, 109) Source(20, 10) + SourceIndex(0)
7 >Emitted(117, 112) Source(20, 11) + SourceIndex(0)
---
>>> #z_accessor_storage = (__runInitializers(this, _y_extraInitializers), __runInitializers(this, _z_initializers, 1));
>>> #z_1_accessor_storage = (__runInitializers(this, _y_extraInitializers), __runInitializers(this, _z_initializers, 1));
1->^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 > ^
4 > ^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 > ^
4 > ^^^
1->
>
> @dec
> @dec
>
2 > accessor z =
3 > 1
4 > ;
3 > 1
4 > ;
1->Emitted(118, 9) Source(24, 5) + SourceIndex(0)
2 >Emitted(118, 120) Source(24, 18) + SourceIndex(0)
3 >Emitted(118, 121) Source(24, 19) + SourceIndex(0)
4 >Emitted(118, 124) Source(24, 20) + SourceIndex(0)
2 >Emitted(118, 122) Source(24, 18) + SourceIndex(0)
3 >Emitted(118, 123) Source(24, 19) + SourceIndex(0)
4 >Emitted(118, 126) Source(24, 20) + SourceIndex(0)
---
>>> get z() { return this.#z_accessor_storage; }
>>> get z() { return this.#z_1_accessor_storage; }
1 >^^^^^^^^
2 > ^^^^
3 > ^
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 > ^^^^^^^->
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 > ^^^^^^^->
1 >
2 > accessor
3 > z
@@ -773,13 +773,13 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts
1 >Emitted(119, 9) Source(24, 5) + SourceIndex(0)
2 >Emitted(119, 13) Source(24, 14) + SourceIndex(0)
3 >Emitted(119, 14) Source(24, 15) + SourceIndex(0)
4 >Emitted(119, 53) Source(24, 20) + SourceIndex(0)
4 >Emitted(119, 55) Source(24, 20) + SourceIndex(0)
---
>>> set z(value) { this.#z_accessor_storage = value; }
>>> set z(value) { this.#z_1_accessor_storage = value; }
1->^^^^^^^^
2 > ^^^^
3 > ^
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1->
2 > accessor
3 > z
@@ -787,7 +787,7 @@ sourceFile:esDecorators-classDeclaration-sourceMap.ts
1->Emitted(120, 9) Source(24, 5) + SourceIndex(0)
2 >Emitted(120, 13) Source(24, 14) + SourceIndex(0)
3 >Emitted(120, 14) Source(24, 15) + SourceIndex(0)
4 >Emitted(120, 59) Source(24, 20) + SourceIndex(0)
4 >Emitted(120, 61) Source(24, 20) + SourceIndex(0)
---
>>> static {
>>> _C_y = { value: (__runInitializers(_classThis, _staticExtraInitializers), __runInitializers(_classThis, _static_private_y_initializers, 1)) };
@@ -154,10 +154,10 @@ class C {
set x(value) { }
/*14*/
y = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _y_initializers, 1));
#z_accessor_storage = (__runInitializers(this, _y_extraInitializers), __runInitializers(this, _z_initializers, 1));
#z_1_accessor_storage = (__runInitializers(this, _y_extraInitializers), __runInitializers(this, _z_initializers, 1));
/*17*/
get z() { return this.#z_accessor_storage; }
set z(value) { this.#z_accessor_storage = value; }
get z() { return this.#z_1_accessor_storage; }
set z(value) { this.#z_1_accessor_storage = value; }
static {
/*29*/
_C_y = { value: (__runInitializers(_classThis, _staticExtraInitializers), __runInitializers(_classThis, _static_private_y_initializers, 1)) };
@@ -45,13 +45,13 @@ class A {
var _c;
this.otherClass = _b;
let y;
({ x: ({ set value(_b) { __classPrivateFieldSet(_b, _b, _b, "f", _A_field); } }).value, y } = this.testObject());
([({ set value(_b) { __classPrivateFieldSet(_b, _b, _b, "f", _A_field); } }).value, y] = this.testArray());
({ a: ({ set value(_b) { __classPrivateFieldSet(_b, _b, _b, "f", _A_field); } }).value, b: [({ set value(_b) { __classPrivateFieldSet(_b, _b, _b, "f", _A_field); } }).value] } = { a: 1, b: [2] });
[({ set value(_b) { __classPrivateFieldSet(_b, _b, _b, "f", _A_field); } }).value, [({ set value(_b) { __classPrivateFieldSet(_b, _b, _b, "f", _A_field); } }).value]] = [1, [2]];
({ a: ({ set value(_b) { __classPrivateFieldSet(_b, _b, _b, "f", _A_field); } }).value = 1, b: [({ set value(_b) { __classPrivateFieldSet(_b, _b, _b, "f", _A_field); } }).value = 1] } = { b: [] });
[({ set value(_b) { __classPrivateFieldSet(_b, _b, _b, "f", _A_field); } }).value = 2] = [];
_c = this.otherClass, [({ set value(_b) { __classPrivateFieldSet(_c, _b, _b, "f", _A_field); } }).value = 2] = [];
({ x: ({ set value(_d) { __classPrivateFieldSet(_b, _b, _d, "f", _A_field); } }).value, y } = this.testObject());
([({ set value(_d) { __classPrivateFieldSet(_b, _b, _d, "f", _A_field); } }).value, y] = this.testArray());
({ a: ({ set value(_d) { __classPrivateFieldSet(_b, _b, _d, "f", _A_field); } }).value, b: [({ set value(_d) { __classPrivateFieldSet(_b, _b, _d, "f", _A_field); } }).value] } = { a: 1, b: [2] });
[({ set value(_d) { __classPrivateFieldSet(_b, _b, _d, "f", _A_field); } }).value, [({ set value(_d) { __classPrivateFieldSet(_b, _b, _d, "f", _A_field); } }).value]] = [1, [2]];
({ a: ({ set value(_d) { __classPrivateFieldSet(_b, _b, _d, "f", _A_field); } }).value = 1, b: [({ set value(_d) { __classPrivateFieldSet(_b, _b, _d, "f", _A_field); } }).value = 1] } = { b: [] });
[({ set value(_d) { __classPrivateFieldSet(_b, _b, _d, "f", _A_field); } }).value = 2] = [];
_c = this.otherClass, [({ set value(_d) { __classPrivateFieldSet(_c, _b, _d, "f", _A_field); } }).value = 2] = [];
}
static test(_a) {
[({ set value(_c) { __classPrivateFieldSet(_a, _b, _c, "f", _A_field); } }).value] = [2];