@idlizer/arktscgen 2.1.10-arktscgen-4 → 2.1.10-arktscgen-6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/libarkts-copy/generator/options.json5 +24 -47
- package/build/libarkts-copy/native/meson.build +26 -10
- package/build/libarkts-copy/native/meson_options.txt +9 -3
- package/build/libarkts-copy/native/mingw.cross +2 -0
- package/build/libarkts-copy/native/src/bridges.cc +55 -159
- package/build/libarkts-copy/native/src/common.cc +316 -97
- package/build/libarkts-copy/native/src/common.h +22 -22
- package/build/libarkts-copy/native/src/memoryTracker.cc +5 -5
- package/build/libarkts-copy/native/src/memoryTracker.h +5 -5
- package/build/libarkts-copy/package.json +31 -25
- package/build/libarkts-copy/src/Es2pandaNativeModule.ts +139 -116
- package/build/libarkts-copy/src/InteropNativeModule.ts +18 -15
- package/build/libarkts-copy/src/arkts-api/AbstractVisitor.ts +24 -19
- package/build/libarkts-copy/src/arkts-api/ImportStorage.ts +30 -31
- package/build/libarkts-copy/src/arkts-api/ProgramProvider.ts +30 -18
- package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +30 -12
- package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +38 -29
- package/build/libarkts-copy/src/arkts-api/index.ts +23 -24
- package/build/libarkts-copy/src/arkts-api/node-cache.ts +22 -13
- package/build/libarkts-copy/src/arkts-api/node-utilities/ArkTsConfig.ts +8 -8
- package/build/libarkts-copy/src/arkts-api/node-utilities/ArrayExpression.ts +9 -21
- package/build/libarkts-copy/src/arkts-api/node-utilities/AssignmentExpression.ts +12 -14
- package/build/libarkts-copy/src/arkts-api/node-utilities/BlockStatement.ts +5 -5
- package/build/libarkts-copy/src/arkts-api/node-utilities/CallExpression.ts +26 -24
- package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +62 -32
- package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +14 -13
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +24 -21
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +10 -12
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSModule.ts +14 -18
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +15 -16
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSStructDeclaration.ts +5 -8
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSTuple.ts +6 -12
- package/build/libarkts-copy/src/arkts-api/node-utilities/MemberExpression.ts +12 -11
- package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +14 -33
- package/build/libarkts-copy/src/arkts-api/node-utilities/NumberLiteral.ts +12 -23
- package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +17 -21
- package/build/libarkts-copy/src/arkts-api/node-utilities/OpaqueTypeNode.ts +9 -8
- package/build/libarkts-copy/src/arkts-api/node-utilities/Program.ts +21 -16
- package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +52 -53
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +22 -32
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeParameter.ts +12 -14
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeReferencePart.ts +10 -12
- package/build/libarkts-copy/src/arkts-api/node-utilities/TryStatement.ts +10 -9
- package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclarator.ts +10 -12
- package/build/libarkts-copy/src/arkts-api/peers/ArktsObject.ts +8 -8
- package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +53 -65
- package/build/libarkts-copy/src/arkts-api/peers/Config.ts +18 -25
- package/build/libarkts-copy/src/arkts-api/peers/Context.ts +35 -42
- package/build/libarkts-copy/src/arkts-api/peers/ExternalSource.ts +9 -9
- package/build/libarkts-copy/src/arkts-api/peers/ImportPathManager.ts +6 -8
- package/build/libarkts-copy/src/arkts-api/peers/Options.ts +8 -8
- package/build/libarkts-copy/src/arkts-api/plugins.ts +205 -32
- package/build/libarkts-copy/src/arkts-api/static/global.ts +35 -36
- package/build/libarkts-copy/src/arkts-api/static/globalUtils.ts +5 -5
- package/build/libarkts-copy/src/arkts-api/static/profiler.ts +107 -91
- package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +54 -37
- package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +86 -69
- package/build/libarkts-copy/src/arkts-api/utilities/performance.ts +41 -24
- package/build/libarkts-copy/src/arkts-api/utilities/private.ts +69 -62
- package/build/libarkts-copy/src/arkts-api/utilities/public.ts +254 -175
- package/build/libarkts-copy/src/arkts-api/visitor.ts +599 -756
- package/build/libarkts-copy/src/arkts-api/wrapper-compat.ts +8 -8
- package/build/libarkts-copy/src/checkSdk.ts +15 -18
- package/build/libarkts-copy/src/index.ts +29 -29
- package/build/libarkts-copy/src/memo-node-cache.ts +143 -0
- package/build/libarkts-copy/src/plugin-utils.ts +64 -45
- package/build/libarkts-copy/src/reexport-for-generated.ts +13 -10
- package/build/libarkts-copy/src/tracer.ts +76 -70
- package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +134 -274
- package/build/libarkts-copy/src/ts-api/factory/nodeTests.ts +23 -23
- package/build/libarkts-copy/src/ts-api/index.ts +27 -35
- package/build/libarkts-copy/src/ts-api/static/enums.ts +3 -3
- package/build/libarkts-copy/src/ts-api/types.ts +535 -395
- package/build/libarkts-copy/src/ts-api/utilities/private.ts +116 -113
- package/build/libarkts-copy/src/ts-api/utilities/public.ts +18 -18
- package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +33 -49
- package/build/libarkts-copy/src/utils.ts +103 -80
- package/build/libarkts-copy/tsconfig.json +3 -2
- package/lib/index.js +2713 -7729
- package/package.json +53 -52
- package/templates/Es2pandaNativeModule.ts +1 -0
- package/templates/peer.ts +1 -0
- package/build/libarkts-copy/native/src/generated/bridges.cc +0 -16375
- package/build/libarkts-copy/src/arkts-api/peers/DiagnosticKind.ts +0 -24
- package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +0 -1344
- package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +0 -5192
- package/build/libarkts-copy/src/generated/factory.ts +0 -1285
- package/build/libarkts-copy/src/generated/index.ts +0 -222
- package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +0 -44
- package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +0 -54
- package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +0 -45
- package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +0 -165
- package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +0 -84
- package/build/libarkts-copy/src/generated/peers/ArkTsConfig.ts +0 -73
- package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +0 -109
- package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +0 -119
- package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +0 -65
- package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +0 -111
- package/build/libarkts-copy/src/generated/peers/AstDumper.ts +0 -49
- package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +0 -110
- package/build/libarkts-copy/src/generated/peers/BindingProps.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +0 -72
- package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +0 -94
- package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +0 -78
- package/build/libarkts-copy/src/generated/peers/CallExpression.ts +0 -129
- package/build/libarkts-copy/src/generated/peers/CatchClause.ts +0 -74
- package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +0 -68
- package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +0 -76
- package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +0 -365
- package/build/libarkts-copy/src/generated/peers/ClassElement.ts +0 -76
- package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +0 -137
- package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/CodeGen.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +0 -82
- package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +0 -78
- package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/Declaration.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/Decorator.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/DiagnosticInfo.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +0 -60
- package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +0 -102
- package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +0 -90
- package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +0 -69
- package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/ETSModule.ts +0 -129
- package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +0 -79
- package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +0 -59
- package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +0 -189
- package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +0 -55
- package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +0 -59
- package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +0 -89
- package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +0 -78
- package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +0 -63
- package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +0 -64
- package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +0 -94
- package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +0 -82
- package/build/libarkts-copy/src/generated/peers/Expression.ts +0 -84
- package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +0 -67
- package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +0 -69
- package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +0 -72
- package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +0 -67
- package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +0 -106
- package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +0 -74
- package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +0 -70
- package/build/libarkts-copy/src/generated/peers/IRNode.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/Identifier.ts +0 -162
- package/build/libarkts-copy/src/generated/peers/IfStatement.ts +0 -78
- package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +0 -87
- package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/ImportSource.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +0 -73
- package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/LabelPair.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +0 -68
- package/build/libarkts-copy/src/generated/peers/Literal.ts +0 -53
- package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +0 -45
- package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +0 -53
- package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +0 -115
- package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +0 -152
- package/build/libarkts-copy/src/generated/peers/NamedType.ts +0 -84
- package/build/libarkts-copy/src/generated/peers/NewExpression.ts +0 -64
- package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +0 -78
- package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +0 -94
- package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +0 -101
- package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +0 -65
- package/build/libarkts-copy/src/generated/peers/Program.ts +0 -206
- package/build/libarkts-copy/src/generated/peers/Property.ts +0 -92
- package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +0 -65
- package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +0 -310
- package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +0 -48
- package/build/libarkts-copy/src/generated/peers/SourceRange.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +0 -83
- package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +0 -120
- package/build/libarkts-copy/src/generated/peers/Statement.ts +0 -44
- package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/SuggestionInfo.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +0 -70
- package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +0 -84
- package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +0 -70
- package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +0 -73
- package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +0 -112
- package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +0 -76
- package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +0 -69
- package/build/libarkts-copy/src/generated/peers/TSImportType.ts +0 -72
- package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +0 -73
- package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +0 -64
- package/build/libarkts-copy/src/generated/peers/TSInferType.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +0 -160
- package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +0 -72
- package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +0 -79
- package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +0 -68
- package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +0 -66
- package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +0 -74
- package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +0 -80
- package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSThisType.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +0 -151
- package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +0 -121
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +0 -75
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +0 -68
- package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +0 -70
- package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +0 -69
- package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +0 -69
- package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +0 -68
- package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +0 -62
- package/build/libarkts-copy/src/generated/peers/TryStatement.ts +0 -89
- package/build/libarkts-copy/src/generated/peers/TypeNode.ts +0 -81
- package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +0 -44
- package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +0 -45
- package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +0 -61
- package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +0 -70
- package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +0 -58
- package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +0 -68
- package/build/libarkts-copy/src/generated/peers/VReg.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +0 -50
- package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +0 -113
- package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +0 -79
- package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +0 -40
- package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +0 -71
- package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +0 -64
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
|
|
16
16
|
// koala-wrapper compatibility helpers
|
|
17
17
|
|
|
18
|
-
import { KNativePointer } from
|
|
19
|
-
import { ETSModule } from
|
|
20
|
-
import { createETSModuleFromContext } from
|
|
21
|
-
import { global } from
|
|
18
|
+
import { KNativePointer } from '@koalaui/interop';
|
|
19
|
+
import { ETSModule } from '../../generated';
|
|
20
|
+
import { createETSModuleFromContext } from './utilities/public';
|
|
21
|
+
import { global } from './static/global';
|
|
22
22
|
|
|
23
23
|
export class EtsScript {
|
|
24
24
|
public static fromContext(): ETSModule {
|
|
25
|
-
return createETSModuleFromContext()
|
|
25
|
+
return createETSModuleFromContext();
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export function destroyConfig(config: KNativePointer): void {
|
|
30
|
-
global.es2panda._DestroyConfig(config)
|
|
31
|
-
global.resetConfig()
|
|
32
|
-
}
|
|
30
|
+
global.es2panda._DestroyConfig(config);
|
|
31
|
+
global.resetConfig();
|
|
32
|
+
}
|
|
@@ -13,28 +13,25 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import * as fs from
|
|
17
|
-
import * as path from
|
|
16
|
+
import * as fs from 'fs';
|
|
17
|
+
import * as path from 'path';
|
|
18
18
|
|
|
19
19
|
function reportErrorAndExit(message: string): never {
|
|
20
|
-
console.error(message)
|
|
21
|
-
process.exit(1)
|
|
20
|
+
console.error(message);
|
|
21
|
+
process.exit(1);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export function checkSDK() {
|
|
25
|
-
const panda = process.env.PANDA_SDK_PATH
|
|
26
|
-
if (!panda)
|
|
27
|
-
reportErrorAndExit(`Variable PANDA_SDK_PATH is not set, please fix`)
|
|
25
|
+
const panda = process.env.PANDA_SDK_PATH;
|
|
26
|
+
if (!panda) reportErrorAndExit(`Variable PANDA_SDK_PATH is not set, please fix`);
|
|
28
27
|
if (!fs.existsSync(path.join(panda, 'package.json')))
|
|
29
|
-
reportErrorAndExit(`Variable PANDA_SDK_PATH not points to SDK`)
|
|
30
|
-
const packageJson = JSON.parse(fs.readFileSync(path.join(panda, 'package.json')).toString())
|
|
31
|
-
const version = packageJson.version as string
|
|
32
|
-
if (!version)
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
else
|
|
39
|
-
console.log(`Using Panda ${version}`)
|
|
28
|
+
reportErrorAndExit(`Variable PANDA_SDK_PATH not points to SDK`);
|
|
29
|
+
const packageJson = JSON.parse(fs.readFileSync(path.join(panda, 'package.json')).toString());
|
|
30
|
+
const version = packageJson.version as string;
|
|
31
|
+
if (!version) reportErrorAndExit(`version is unknown`);
|
|
32
|
+
const packageJsonOur = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json')).toString());
|
|
33
|
+
const expectedVersion = packageJsonOur.config.panda_sdk_version;
|
|
34
|
+
if (expectedVersion && expectedVersion !== 'next' && version !== expectedVersion)
|
|
35
|
+
console.log(`WARNING: Panda SDK version "${version}" doesn't match expected "${expectedVersion}"`);
|
|
36
|
+
else console.log(`Using Panda ${version}`);
|
|
40
37
|
}
|
|
@@ -13,35 +13,35 @@
|
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
16
|
+
export * from './checkSdk';
|
|
17
|
+
export * from './utils';
|
|
18
|
+
export * from './reexport-for-generated';
|
|
19
|
+
export * from '../generated/Es2pandaEnums';
|
|
20
|
+
export * from '../generated';
|
|
21
21
|
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
22
|
+
export * from './arkts-api/utilities/performance';
|
|
23
|
+
export * from './arkts-api/utilities/private';
|
|
24
|
+
export * from './arkts-api/utilities/public';
|
|
25
|
+
export * from './arkts-api/factory/nodeFactory';
|
|
26
|
+
export * from './arkts-api/visitor';
|
|
27
|
+
export * from './arkts-api/AbstractVisitor';
|
|
28
|
+
export * from './arkts-api/plugins';
|
|
29
|
+
export * from './arkts-api/ImportStorage';
|
|
30
|
+
export * from './arkts-api/ProgramProvider';
|
|
31
|
+
export * from './arkts-api/node-utilities/Program';
|
|
32
|
+
export * from './arkts-api/node-utilities/ArkTsConfig';
|
|
33
33
|
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
37
|
-
export { GlobalContext } from
|
|
38
|
-
export * from
|
|
39
|
-
export * from
|
|
40
|
-
export * from
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export * from
|
|
44
|
-
export * as arkts from "./arkts-api"
|
|
34
|
+
export * from './arkts-api/peers/AstNode';
|
|
35
|
+
export * from './arkts-api/peers/Config';
|
|
36
|
+
export * from './arkts-api/peers/Context';
|
|
37
|
+
export { GlobalContext } from './arkts-api/peers/Context';
|
|
38
|
+
export * from './arkts-api/peers/ExternalSource';
|
|
39
|
+
export * from './arkts-api/peers/ImportPathManager';
|
|
40
|
+
export * from './arkts-api/peers/Options';
|
|
41
|
+
export { global as arktsGlobal } from './arkts-api/static/global';
|
|
42
|
+
export * from './arkts-api/static/globalUtils';
|
|
43
|
+
export * as arkts from './arkts-api';
|
|
45
44
|
|
|
46
|
-
export * from
|
|
47
|
-
export * from
|
|
45
|
+
export * from './plugin-utils';
|
|
46
|
+
export * from './tracer';
|
|
47
|
+
export * from './memo-node-cache';
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 Huawei Device Co., Ltd.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
* See the License for the specific language governing permissions and
|
|
13
|
+
* limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { KNativePointer } from "@koalaui/interop";
|
|
17
|
+
import { AstNode, Es2pandaAstNodeType, factory, unpackString } from "./arkts-api";
|
|
18
|
+
import { global } from "./arkts-api/static/global";
|
|
19
|
+
|
|
20
|
+
// Improve: this should actually belong to plugin contexts, not to libarkts
|
|
21
|
+
|
|
22
|
+
export interface AstNodeCacheValue {
|
|
23
|
+
peer: KNativePointer;
|
|
24
|
+
type: Es2pandaAstNodeType;
|
|
25
|
+
metadata?: AstNodeCacheValueMetadata;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface AstNodeCacheValueMetadata {
|
|
29
|
+
callName?: string;
|
|
30
|
+
hasReceiver?: boolean;
|
|
31
|
+
isSetter?: boolean;
|
|
32
|
+
isGetter?: boolean;
|
|
33
|
+
forbidTypeRewrite?: boolean;
|
|
34
|
+
isWithinTypeParams?: boolean;
|
|
35
|
+
hasMemoSkip?: boolean;
|
|
36
|
+
hasMemoIntrinsic?: boolean;
|
|
37
|
+
hasMemoEntry?: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export class MemoNodeCache {
|
|
41
|
+
private _isCollected: boolean = false;
|
|
42
|
+
private cacheMap: Map<KNativePointer, AstNodeCacheValue>;
|
|
43
|
+
private static instance: MemoNodeCache;
|
|
44
|
+
static disableMemoNodeCache = false;
|
|
45
|
+
|
|
46
|
+
private constructor() {
|
|
47
|
+
this.cacheMap = new Map();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static getInstance(): MemoNodeCache {
|
|
51
|
+
if (!this.instance) {
|
|
52
|
+
this.instance = new MemoNodeCache();
|
|
53
|
+
}
|
|
54
|
+
if (this.disableMemoNodeCache) {
|
|
55
|
+
return this.instance
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Please provide the another way to force cache update on when node updates
|
|
59
|
+
wrapFuncWithNodeCache(this.instance, "updateArrowFunctionExpression")
|
|
60
|
+
wrapFuncWithNodeCache(this.instance, "updateBreakStatement")
|
|
61
|
+
wrapFuncWithNodeCache(this.instance, "updateCallExpression")
|
|
62
|
+
wrapFuncWithNodeCache(this.instance, "updateClassProperty")
|
|
63
|
+
wrapFuncWithNodeCache(this.instance, "updateETSFunctionType")
|
|
64
|
+
wrapFuncWithNodeCache(this.instance, "updateETSParameterExpression")
|
|
65
|
+
wrapFuncWithNodeCache(this.instance, "updateETSUnionType")
|
|
66
|
+
wrapFuncWithNodeCache(this.instance, "updateIdentifier")
|
|
67
|
+
wrapFuncWithNodeCache(this.instance, "updateMethodDefinition")
|
|
68
|
+
wrapFuncWithNodeCache(this.instance, "updateProperty")
|
|
69
|
+
wrapFuncWithNodeCache(this.instance, "updateReturnStatement")
|
|
70
|
+
wrapFuncWithNodeCache(this.instance, "updateScriptFunction")
|
|
71
|
+
wrapFuncWithNodeCache(this.instance, "updateTSTypeAliasDeclaration")
|
|
72
|
+
wrapFuncWithNodeCache(this.instance, "updateVariableDeclarator")
|
|
73
|
+
|
|
74
|
+
return this.instance;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
collect(node: AstNode, metadata?: AstNodeCacheValueMetadata): void {
|
|
78
|
+
if (MemoNodeCache.disableMemoNodeCache) {
|
|
79
|
+
return
|
|
80
|
+
}
|
|
81
|
+
const peer = node.peer;
|
|
82
|
+
const type = global.generatedEs2panda._AstNodeTypeConst(global.context, node.peer);
|
|
83
|
+
let currMetadata: AstNodeCacheValueMetadata | undefined = metadata ?? {};
|
|
84
|
+
if (this.cacheMap.has(peer)) {
|
|
85
|
+
const oldMetadata = this.cacheMap.get(peer)!.metadata ?? {};
|
|
86
|
+
currMetadata = { ...oldMetadata, ...currMetadata };
|
|
87
|
+
}
|
|
88
|
+
currMetadata = Object.keys(currMetadata).length === 0 ? undefined : currMetadata;
|
|
89
|
+
this.cacheMap.set(peer, { peer, type, metadata: currMetadata });
|
|
90
|
+
this._isCollected = true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
refresh(original: AstNode, node: AstNode): void {
|
|
94
|
+
let metadata: AstNodeCacheValueMetadata | undefined;
|
|
95
|
+
if (this.has(original)) {
|
|
96
|
+
metadata = this.get(original)?.metadata;
|
|
97
|
+
this.cacheMap.delete(original.peer);
|
|
98
|
+
}
|
|
99
|
+
this.collect(node, metadata);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
isCollected(): boolean {
|
|
103
|
+
return this._isCollected;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
has(node: AstNode): boolean {
|
|
107
|
+
return this.cacheMap.has(node.peer);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
get(node: AstNode): AstNodeCacheValue | undefined {
|
|
111
|
+
return this.cacheMap.get(node.peer);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
clear(): void {
|
|
115
|
+
this.cacheMap.clear();
|
|
116
|
+
this._isCollected = false;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
visualize(): void {
|
|
120
|
+
Array.from(this.cacheMap.values()).forEach(({ peer, type, metadata }) => {
|
|
121
|
+
const src = global.generatedEs2panda._AstNodeDumpEtsSrcConst(global.context, peer)
|
|
122
|
+
console.log(
|
|
123
|
+
`[NODE CACHE] ptr ${peer}, type: ${type}, metadata: ${JSON.stringify(metadata)}, node: `,
|
|
124
|
+
unpackString(src)
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function wrapFuncWithNodeCache(cache: MemoNodeCache, funcName: keyof typeof factory) {
|
|
131
|
+
if ((funcName+"__orig") in factory) return;
|
|
132
|
+
|
|
133
|
+
let orig = factory[funcName] as any;
|
|
134
|
+
let wrapped = function (this: any, original: AstNode, ...args: any[]) {
|
|
135
|
+
let newNode = orig.call(this, original, ...args);
|
|
136
|
+
if (cache.has(original)) {
|
|
137
|
+
cache.refresh(original, newNode);
|
|
138
|
+
}
|
|
139
|
+
return newNode
|
|
140
|
+
};
|
|
141
|
+
(factory as any)[funcName] = wrapped as any;
|
|
142
|
+
(factory as any)[funcName+"__orig"] = orig as any;
|
|
143
|
+
}
|
|
@@ -23,102 +23,121 @@ import {
|
|
|
23
23
|
ProgramProvider,
|
|
24
24
|
CompilationOptions,
|
|
25
25
|
dumpProgramSrcFormatted,
|
|
26
|
-
} from
|
|
27
|
-
import { Tracer } from
|
|
26
|
+
} from './arkts-api';
|
|
27
|
+
import { Tracer } from './tracer';
|
|
28
28
|
|
|
29
29
|
export interface RunTransformerHooks {
|
|
30
|
-
onProgramTransformStart?(options: CompilationOptions, program: Program): void
|
|
31
|
-
onProgramTransformEnd?(options: CompilationOptions, program: Program): void
|
|
30
|
+
onProgramTransformStart?(options: CompilationOptions, program: Program): void;
|
|
31
|
+
onProgramTransformEnd?(options: CompilationOptions, program: Program): void;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
class ASTCache {
|
|
35
|
-
processedPrograms = new Set<string>()
|
|
36
|
-
constructor() {
|
|
35
|
+
processedPrograms = new Set<string>();
|
|
36
|
+
constructor() {}
|
|
37
37
|
find(program: Program): boolean {
|
|
38
|
-
return this.processedPrograms.has(program.absoluteName)
|
|
38
|
+
return this.processedPrograms.has(program.absoluteName);
|
|
39
39
|
}
|
|
40
40
|
update(program: Program) {
|
|
41
|
-
this.processedPrograms.add(program.absoluteName)
|
|
41
|
+
this.processedPrograms.add(program.absoluteName);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export class DumpingHooks implements RunTransformerHooks {
|
|
46
|
-
constructor(
|
|
46
|
+
constructor(
|
|
47
|
+
private state: Es2pandaContextState,
|
|
48
|
+
private pluginName: string,
|
|
49
|
+
private dumpAst: boolean = false
|
|
50
|
+
) {
|
|
47
51
|
if (process.env.KOALA_DUMP_PLUGIN_AST) {
|
|
48
|
-
this.dumpAst = true
|
|
52
|
+
this.dumpAst = true;
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
55
|
onProgramTransformStart(options: CompilationOptions, program: Program) {
|
|
52
|
-
if (this.dumpAst) {
|
|
53
|
-
console.log(`BEFORE ${this.pluginName}:`)
|
|
54
|
-
dumpProgramSrcFormatted(program, true)
|
|
56
|
+
if (this.dumpAst && !program.absoluteName.includes("absolute-sdk-patched")) {
|
|
57
|
+
console.log(`BEFORE ${this.pluginName}:`);
|
|
58
|
+
dumpProgramSrcFormatted(program, true);
|
|
55
59
|
}
|
|
56
|
-
if (!options.isProgramForCodegeneration) arktsGlobal.profiler.transformDepStarted()
|
|
60
|
+
if (!options.isProgramForCodegeneration) arktsGlobal.profiler.transformDepStarted();
|
|
57
61
|
}
|
|
58
62
|
onProgramTransformEnd(options: CompilationOptions, program: Program) {
|
|
59
|
-
if (!options.isProgramForCodegeneration) arktsGlobal.profiler.transformDepEnded(this.state, this.pluginName)
|
|
60
|
-
if (this.dumpAst) {
|
|
61
|
-
console.log(`AFTER ${this.pluginName}:`)
|
|
62
|
-
dumpProgramSrcFormatted(program, true)
|
|
63
|
+
if (!options.isProgramForCodegeneration) arktsGlobal.profiler.transformDepEnded(this.state, this.pluginName);
|
|
64
|
+
if (this.dumpAst && !program.absoluteName.includes("absolute-sdk-patched")) {
|
|
65
|
+
console.log(`AFTER ${this.pluginName}:`);
|
|
66
|
+
dumpProgramSrcFormatted(program, true);
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
70
|
|
|
71
|
+
export function runTransformerOnProgram(
|
|
72
|
+
program: Program,
|
|
73
|
+
options: CompilationOptions,
|
|
74
|
+
transform: ProgramTransformer | undefined,
|
|
75
|
+
pluginContext: PluginContext,
|
|
76
|
+
hooks: RunTransformerHooks = {},
|
|
77
|
+
stableDeps: boolean = false,
|
|
78
|
+
) {
|
|
79
|
+
arktsGlobal.filePath = program.absoluteName;
|
|
67
80
|
|
|
68
|
-
|
|
69
|
-
arktsGlobal.filePath = program.absoluteName
|
|
70
|
-
|
|
71
|
-
Tracer.startProgramTracing(program)
|
|
81
|
+
Tracer.startProgramTracing(program);
|
|
72
82
|
|
|
73
83
|
// Perform some additional actions before the transformation start
|
|
74
|
-
hooks.onProgramTransformStart?.(options, program)
|
|
84
|
+
hooks.onProgramTransformStart?.(options, program);
|
|
75
85
|
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
if (stableDeps) {
|
|
87
|
+
// Run the plugin itself
|
|
88
|
+
transform?.(program, options, pluginContext);
|
|
89
|
+
} else {
|
|
90
|
+
// Save currently existing imports in the program
|
|
91
|
+
const importStorage = new ImportStorage(program, options.state === Es2pandaContextState.ES2PANDA_STATE_PARSED);
|
|
78
92
|
|
|
79
|
-
|
|
80
|
-
|
|
93
|
+
// Run the plugin itself
|
|
94
|
+
transform?.(program, options, pluginContext);
|
|
81
95
|
|
|
82
|
-
|
|
83
|
-
|
|
96
|
+
// Update internal import information based on import modification by plugin
|
|
97
|
+
importStorage.update();
|
|
98
|
+
}
|
|
84
99
|
|
|
85
100
|
// Perform some additional actions after the transformation end
|
|
86
|
-
hooks.onProgramTransformEnd?.(options, program)
|
|
101
|
+
hooks.onProgramTransformEnd?.(options, program);
|
|
87
102
|
|
|
88
|
-
Tracer.stopProgramTracing()
|
|
103
|
+
Tracer.stopProgramTracing();
|
|
89
104
|
}
|
|
90
105
|
|
|
91
|
-
export function runTransformer(
|
|
106
|
+
export function runTransformer(
|
|
107
|
+
prog: Program,
|
|
108
|
+
state: Es2pandaContextState,
|
|
109
|
+
transform: ProgramTransformer | undefined,
|
|
110
|
+
pluginContext: PluginContext,
|
|
111
|
+
hooks: RunTransformerHooks = {},
|
|
112
|
+
stableDeps: boolean = false,
|
|
113
|
+
) {
|
|
92
114
|
// Program provider used to provide programs to transformer dynamically relative to inserted imports
|
|
93
|
-
const provider = new ProgramProvider(prog)
|
|
115
|
+
const provider = new ProgramProvider(prog, stableDeps);
|
|
94
116
|
|
|
95
117
|
// The first program provided by program provider is the main program
|
|
96
|
-
let currentProgram = provider.next()
|
|
97
|
-
let isMainProgram = true
|
|
118
|
+
let currentProgram = provider.next();
|
|
119
|
+
let isMainProgram = true;
|
|
98
120
|
|
|
99
121
|
while (currentProgram) {
|
|
100
122
|
// Options passed to plugin and hooks
|
|
101
123
|
const options: CompilationOptions = {
|
|
102
124
|
isProgramForCodegeneration: isProgramForCodegeneration(currentProgram, isMainProgram),
|
|
103
125
|
state,
|
|
104
|
-
}
|
|
126
|
+
};
|
|
105
127
|
|
|
106
|
-
runTransformerOnProgram(currentProgram, options, transform, pluginContext, hooks)
|
|
128
|
+
runTransformerOnProgram(currentProgram, options, transform, pluginContext, hooks, stableDeps);
|
|
107
129
|
|
|
108
130
|
// The first program is always the main program
|
|
109
|
-
isMainProgram = false
|
|
131
|
+
isMainProgram = false;
|
|
110
132
|
|
|
111
133
|
// Proceed to the next program
|
|
112
|
-
currentProgram = provider.next()
|
|
134
|
+
currentProgram = provider.next();
|
|
113
135
|
}
|
|
114
136
|
}
|
|
115
137
|
|
|
116
|
-
function isProgramForCodegeneration(
|
|
117
|
-
program: Program,
|
|
118
|
-
isMainProgram: boolean,
|
|
119
|
-
): boolean {
|
|
138
|
+
function isProgramForCodegeneration(program: Program, isMainProgram: boolean): boolean {
|
|
120
139
|
if (!arktsGlobal.isContextGenerateAbcForExternalSourceFiles) {
|
|
121
|
-
return isMainProgram
|
|
140
|
+
return isMainProgram;
|
|
122
141
|
}
|
|
123
|
-
return program.isGenAbcForExternal
|
|
142
|
+
return program.isGenAbcForExternal;
|
|
124
143
|
}
|
|
@@ -12,21 +12,24 @@
|
|
|
12
12
|
* See the License for the specific language governing permissions and
|
|
13
13
|
* limitations under the License.
|
|
14
14
|
*/
|
|
15
|
-
export { KNativePointer } from
|
|
16
|
-
export { AstNode } from
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
15
|
+
export { KNativePointer } from '@koalaui/interop';
|
|
16
|
+
export { AstNode } from './arkts-api/peers/AstNode';
|
|
17
|
+
export { Config } from './arkts-api/peers/Config';
|
|
18
|
+
export { Context, GlobalContext } from './arkts-api/peers/Context';
|
|
19
|
+
export { ArktsObject, isSameNativeObject } from './arkts-api/peers/ArktsObject';
|
|
20
|
+
export { NodeCache } from './arkts-api/node-cache';
|
|
19
21
|
export {
|
|
20
22
|
passNode,
|
|
21
23
|
unpackNonNullableNode,
|
|
22
24
|
unpackNodeArray,
|
|
23
25
|
passNodeArray,
|
|
26
|
+
passStringArray,
|
|
24
27
|
unpackNode,
|
|
25
28
|
unpackString,
|
|
26
29
|
assertValidPeer,
|
|
27
|
-
updateNodeByNode
|
|
28
|
-
} from
|
|
29
|
-
export { nodeByType } from
|
|
30
|
-
export { global } from
|
|
31
|
-
export { Es2pandaMemberExpressionKind } from
|
|
32
|
-
export * from
|
|
30
|
+
updateNodeByNode,
|
|
31
|
+
} from './arkts-api/utilities/private';
|
|
32
|
+
export { nodeByType } from './arkts-api/class-by-peer';
|
|
33
|
+
export { global } from './arkts-api/static/global';
|
|
34
|
+
export { Es2pandaMemberExpressionKind } from '../generated/Es2pandaEnums';
|
|
35
|
+
export * from './arkts-api/utilities/extensions';
|