mirror of https://github.com/jkjoy/sunpeiwen.git
1 line
20 KiB
Plaintext
1 line
20 KiB
Plaintext
{"version":3,"names":["assignmentExpression","booleanLiteral","callExpression","cloneNode","identifier","memberExpression","sequenceExpression","stringLiteral","thisExpression","getPrototypeOfExpression","objectRef","isStatic","file","isPrivateMethod","targetRef","addHelper","visitor","traverse","visitors","merge","environmentVisitor","Super","path","state","node","parentPath","isMemberExpression","object","handle","unshadowSuperBindingVisitor","Scopable","refName","binding","scope","getOwnBinding","name","rename","specHandlers","memoise","superMember","count","computed","property","memo","maybeGenerateMemoised","memoiser","set","prop","has","get","_get","_getThisRefs","thisRefs","proto","getObjectRef","this","isDerivedConstructor","thisRef","generateDeclaredUidIdentifier","value","isInStrictMode","destructureSet","buildCodeFrameError","call","args","optimiseCall","optionalCall","delete","template","expression","ast","looseHandlers","getSuperRef","ReplaceSupers","constructor","opts","methodPath","isClassMethod","kind","superRef","isObjectMethod","static","isStaticBlock","isPrivate","isMethod","constantSuper","isLoose","replace","refToPreserve","handler","memberExpressionToFunctions","bind","boundGet"],"sources":["../src/index.ts"],"sourcesContent":["import type { File } from \"@babel/core\";\nimport environmentVisitor from \"@babel/helper-environment-visitor\";\nimport memberExpressionToFunctions from \"@babel/helper-member-expression-to-functions\";\nimport type { HandlerState } from \"@babel/helper-member-expression-to-functions\";\nimport optimiseCall from \"@babel/helper-optimise-call-expression\";\nimport template from \"@babel/template\";\nimport traverse from \"@babel/traverse\";\nimport type { NodePath, Scope } from \"@babel/traverse\";\nimport {\n assignmentExpression,\n booleanLiteral,\n callExpression,\n cloneNode,\n identifier,\n memberExpression,\n sequenceExpression,\n stringLiteral,\n thisExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\n// TODO (Babel 8): Don't export this.\nexport {\n default as environmentVisitor,\n skipAllButComputedKey,\n} from \"@babel/helper-environment-visitor\";\n\ntype ThisRef =\n | {\n memo: t.AssignmentExpression;\n this: t.Identifier;\n }\n | { this: t.ThisExpression };\n/**\n * Creates an expression which result is the proto of objectRef.\n *\n * @example <caption>isStatic === true</caption>\n *\n * helpers.getPrototypeOf(CLASS)\n *\n * @example <caption>isStatic === false</caption>\n *\n * helpers.getPrototypeOf(CLASS.prototype)\n */\nfunction getPrototypeOfExpression(\n objectRef: t.Identifier,\n isStatic: boolean,\n file: File,\n isPrivateMethod: boolean,\n) {\n objectRef = cloneNode(objectRef);\n const targetRef =\n isStatic || isPrivateMethod\n ? objectRef\n : memberExpression(objectRef, identifier(\"prototype\"));\n\n return callExpression(file.addHelper(\"getPrototypeOf\"), [targetRef]);\n}\n\nconst visitor = traverse.visitors.merge<\n HandlerState<ReplaceState> & ReplaceState\n>([\n environmentVisitor,\n {\n Super(path, state) {\n const { node, parentPath } = path;\n if (!parentPath.isMemberExpression({ object: node })) return;\n state.handle(parentPath);\n },\n },\n]);\n\nconst unshadowSuperBindingVisitor = traverse.visitors.merge<{\n refName: string;\n}>([\n environmentVisitor,\n {\n Scopable(path, { refName }) {\n // https://github.com/Zzzen/babel/pull/1#pullrequestreview-564833183\n const binding = path.scope.getOwnBinding(refName);\n if (binding && binding.identifier.name === refName) {\n path.scope.rename(refName);\n }\n },\n },\n]);\n\ntype SharedState = {\n file: File;\n scope: Scope;\n isDerivedConstructor: boolean;\n isStatic: boolean;\n isPrivateMethod: boolean;\n getObjectRef: () => t.Identifier;\n getSuperRef: () => t.Identifier;\n // we dont need boundGet here, but memberExpressionToFunctions handler needs it.\n boundGet: HandlerState[\"get\"];\n};\n\ntype Handler = HandlerState<SharedState> & SharedState;\ntype SuperMember = NodePath<\n | t.MemberExpression & {\n object: t.Super;\n property: Exclude<t.MemberExpression[\"property\"], t.PrivateName>;\n }\n>;\n\ninterface SpecHandler\n extends Pick<\n Handler,\n | \"memoise\"\n | \"get\"\n | \"set\"\n | \"destructureSet\"\n | \"call\"\n | \"optionalCall\"\n | \"delete\"\n > {\n _get(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n thisRefs: ThisRef,\n ): t.CallExpression;\n _getThisRefs(): ThisRef;\n prop(this: Handler & SpecHandler, superMember: SuperMember): t.Expression;\n}\n\nconst specHandlers: SpecHandler = {\n memoise(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n count: number,\n ) {\n const { scope, node } = superMember;\n const { computed, property } = node;\n if (!computed) {\n return;\n }\n\n const memo = scope.maybeGenerateMemoised(property);\n if (!memo) {\n return;\n }\n\n this.memoiser.set(property, memo, count);\n },\n\n prop(this: Handler & SpecHandler, superMember: SuperMember) {\n const { computed, property } = superMember.node;\n if (this.memoiser.has(property)) {\n return cloneNode(this.memoiser.get(property));\n }\n\n if (computed) {\n return cloneNode(property);\n }\n\n return stringLiteral((property as t.Identifier).name);\n },\n\n get(this: Handler & SpecHandler, superMember: SuperMember) {\n return this._get(superMember, this._getThisRefs());\n },\n\n _get(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n thisRefs: ThisRef,\n ) {\n const proto = getPrototypeOfExpression(\n this.getObjectRef(),\n this.isStatic,\n this.file,\n this.isPrivateMethod,\n );\n return callExpression(this.file.addHelper(\"get\"), [\n // @ts-expect-error memo does not exist when this.isDerivedConstructor is false\n thisRefs.memo ? sequenceExpression([thisRefs.memo, proto]) : proto,\n this.prop(superMember),\n thisRefs.this,\n ]);\n },\n\n _getThisRefs(this: Handler & SpecHandler): ThisRef {\n if (!this.isDerivedConstructor) {\n return { this: thisExpression() };\n }\n const thisRef = this.scope.generateDeclaredUidIdentifier(\"thisSuper\");\n return {\n memo: assignmentExpression(\"=\", thisRef, thisExpression()),\n this: cloneNode(thisRef),\n };\n },\n\n set(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n value: t.Expression,\n ) {\n const thisRefs = this._getThisRefs();\n const proto = getPrototypeOfExpression(\n this.getObjectRef(),\n this.isStatic,\n this.file,\n this.isPrivateMethod,\n );\n return callExpression(this.file.addHelper(\"set\"), [\n // @ts-expect-error memo does not exist when this.isDerivedConstructor is false\n thisRefs.memo ? sequenceExpression([thisRefs.memo, proto]) : proto,\n this.prop(superMember),\n value,\n thisRefs.this,\n booleanLiteral(superMember.isInStrictMode()),\n ]);\n },\n\n destructureSet(this: Handler & SpecHandler, superMember: SuperMember) {\n throw superMember.buildCodeFrameError(\n `Destructuring to a super field is not supported yet.`,\n );\n },\n\n call(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n const thisRefs = this._getThisRefs();\n return optimiseCall(\n this._get(superMember, thisRefs),\n cloneNode(thisRefs.this),\n args,\n false,\n );\n },\n\n optionalCall(\n this: Handler & SpecHandler,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n const thisRefs = this._getThisRefs();\n return optimiseCall(\n this._get(superMember, thisRefs),\n cloneNode(thisRefs.this),\n args,\n true,\n );\n },\n\n delete(this: Handler & SpecHandler, superMember: SuperMember) {\n if (superMember.node.computed) {\n return sequenceExpression([\n callExpression(this.file.addHelper(\"toPropertyKey\"), [\n cloneNode(superMember.node.property),\n ]),\n template.expression.ast`\n function () { throw new ReferenceError(\"'delete super[expr]' is invalid\"); }()\n `,\n ]);\n } else {\n return template.expression.ast`\n function () { throw new ReferenceError(\"'delete super.prop' is invalid\"); }()\n `;\n }\n },\n};\n\nconst looseHandlers = {\n ...specHandlers,\n\n prop(this: Handler & typeof specHandlers, superMember: SuperMember) {\n const { property } = superMember.node;\n if (this.memoiser.has(property)) {\n return cloneNode(this.memoiser.get(property));\n }\n\n return cloneNode(property);\n },\n\n get(this: Handler & typeof specHandlers, superMember: SuperMember) {\n const { isStatic, getSuperRef } = this;\n const { computed } = superMember.node;\n const prop = this.prop(superMember);\n\n let object;\n if (isStatic) {\n object =\n getSuperRef() ??\n memberExpression(identifier(\"Function\"), identifier(\"prototype\"));\n } else {\n object = memberExpression(\n getSuperRef() ?? identifier(\"Object\"),\n identifier(\"prototype\"),\n );\n }\n\n return memberExpression(object, prop, computed);\n },\n\n set(\n this: Handler & typeof specHandlers,\n superMember: SuperMember,\n value: t.Expression,\n ) {\n const { computed } = superMember.node;\n const prop = this.prop(superMember);\n\n return assignmentExpression(\n \"=\",\n memberExpression(thisExpression(), prop, computed),\n value,\n );\n },\n\n destructureSet(\n this: Handler & typeof specHandlers,\n superMember: SuperMember,\n ) {\n const { computed } = superMember.node;\n const prop = this.prop(superMember);\n\n return memberExpression(thisExpression(), prop, computed);\n },\n\n call(\n this: Handler & typeof specHandlers,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return optimiseCall(this.get(superMember), thisExpression(), args, false);\n },\n\n optionalCall(\n this: Handler & typeof specHandlers,\n superMember: SuperMember,\n args: t.CallExpression[\"arguments\"],\n ) {\n return optimiseCall(this.get(superMember), thisExpression(), args, true);\n },\n};\n\ntype ReplaceSupersOptionsBase = {\n methodPath: NodePath<\n | t.ClassMethod\n | t.ClassProperty\n | t.ObjectMethod\n | t.ClassPrivateMethod\n | t.ClassPrivateProperty\n | t.StaticBlock\n >;\n constantSuper?: boolean;\n file: File;\n // objectRef might have been shadowed in child scopes,\n // in that case, we need to rename related variables.\n refToPreserve?: t.Identifier;\n};\n\ntype ReplaceSupersOptions = ReplaceSupersOptionsBase &\n (\n | { objectRef?: undefined; getObjectRef: () => t.Node }\n | { objectRef: t.Node; getObjectRef?: undefined }\n ) &\n (\n | { superRef?: undefined; getSuperRef: () => t.Node }\n | { superRef: t.Node; getSuperRef?: undefined }\n );\n\ninterface ReplaceState {\n file: File;\n scope: Scope;\n isDerivedConstructor: boolean;\n isStatic: boolean;\n isPrivateMethod: boolean;\n getObjectRef: ReplaceSupers[\"getObjectRef\"];\n getSuperRef: ReplaceSupers[\"getSuperRef\"];\n}\n\nexport default class ReplaceSupers {\n constructor(opts: ReplaceSupersOptions) {\n const path = opts.methodPath;\n\n this.methodPath = path;\n this.isDerivedConstructor =\n path.isClassMethod({ kind: \"constructor\" }) && !!opts.superRef;\n this.isStatic =\n path.isObjectMethod() ||\n // @ts-expect-error static is not in ClassPrivateMethod\n path.node.static ||\n path.isStaticBlock?.();\n this.isPrivateMethod = path.isPrivate() && path.isMethod();\n\n this.file = opts.file;\n this.constantSuper = process.env.BABEL_8_BREAKING\n ? opts.constantSuper\n : // Fallback to isLoose for backward compatibility\n opts.constantSuper ?? (opts as any).isLoose;\n this.opts = opts;\n }\n\n declare file: File;\n declare isDerivedConstructor: boolean;\n declare constantSuper: boolean;\n declare isPrivateMethod: boolean;\n declare isStatic: boolean;\n declare methodPath: NodePath;\n declare opts: ReplaceSupersOptions;\n\n getObjectRef() {\n return cloneNode(this.opts.objectRef || this.opts.getObjectRef());\n }\n\n getSuperRef() {\n if (this.opts.superRef) return cloneNode(this.opts.superRef);\n if (this.opts.getSuperRef) {\n return cloneNode(this.opts.getSuperRef());\n }\n }\n\n replace() {\n // https://github.com/babel/babel/issues/11994\n if (this.opts.refToPreserve) {\n this.methodPath.traverse(unshadowSuperBindingVisitor, {\n refName: this.opts.refToPreserve.name,\n });\n }\n\n const handler = this.constantSuper ? looseHandlers : specHandlers;\n\n memberExpressionToFunctions<ReplaceState>(this.methodPath, visitor, {\n file: this.file,\n scope: this.methodPath.scope,\n isDerivedConstructor: this.isDerivedConstructor,\n isStatic: this.isStatic,\n isPrivateMethod: this.isPrivateMethod,\n getObjectRef: this.getObjectRef.bind(this),\n getSuperRef: this.getSuperRef.bind(this),\n // we dont need boundGet here, but memberExpressionToFunctions handler needs it.\n boundGet: handler.get,\n ...handler,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AACA;AACA;AAEA;AACA;AACA;AAEA;AAUsB;EATpBA,oBAAoB;EACpBC,cAAc;EACdC,cAAc;EACdC,SAAS;EACTC,UAAU;EACVC,gBAAgB;EAChBC,kBAAkB;EAClBC,aAAa;EACbC;AAAc;AA2BhB,SAASC,wBAAwB,CAC/BC,SAAuB,EACvBC,QAAiB,EACjBC,IAAU,EACVC,eAAwB,EACxB;EACAH,SAAS,GAAGP,SAAS,CAACO,SAAS,CAAC;EAChC,MAAMI,SAAS,GACbH,QAA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