@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
|
@@ -31,21 +31,23 @@
|
|
|
31
31
|
* limitations under the License.
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
|
+
#include <iostream>
|
|
35
|
+
#include <string>
|
|
36
|
+
#include <vector>
|
|
37
|
+
|
|
38
|
+
#include "common-interop.h"
|
|
34
39
|
#include "dynamic-loader.h"
|
|
35
40
|
#include "es2panda_lib.h"
|
|
36
|
-
#include "common-interop.h"
|
|
37
|
-
#include "stdexcept"
|
|
38
41
|
#include "interop-utils.h"
|
|
39
|
-
#include
|
|
40
|
-
#include <iostream>
|
|
41
|
-
#include <vector>
|
|
42
|
+
#include "stdexcept"
|
|
42
43
|
|
|
43
44
|
using std::string, std::cout, std::endl, std::vector;
|
|
44
45
|
|
|
45
|
-
extern es2panda_Impl
|
|
46
|
+
extern es2panda_Impl* es2pandaImplementation;
|
|
46
47
|
|
|
47
|
-
es2panda_Impl
|
|
48
|
-
inline es2panda_Impl
|
|
48
|
+
es2panda_Impl* GetImplSlow();
|
|
49
|
+
inline es2panda_Impl* GetImpl()
|
|
50
|
+
{
|
|
49
51
|
if (es2pandaImplementation) {
|
|
50
52
|
return es2pandaImplementation;
|
|
51
53
|
}
|
|
@@ -53,6 +55,7 @@ inline es2panda_Impl *GetImpl() {
|
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
string getString(KStringPtr ptr);
|
|
58
|
+
const char** getStringArray(KStringArray& ptr);
|
|
56
59
|
|
|
57
60
|
char* getStringCopy(KStringPtr& ptr);
|
|
58
61
|
|
|
@@ -66,12 +69,8 @@ inline KUInt unpackUInt(const KByte* bytes)
|
|
|
66
69
|
const KUInt BYTE_1_SHIFT = 8;
|
|
67
70
|
const KUInt BYTE_2_SHIFT = 16;
|
|
68
71
|
const KUInt BYTE_3_SHIFT = 24;
|
|
69
|
-
return (
|
|
70
|
-
|
|
71
|
-
| (bytes[BYTE_1] << BYTE_1_SHIFT)
|
|
72
|
-
| (bytes[BYTE_2] << BYTE_2_SHIFT)
|
|
73
|
-
| (bytes[BYTE_3] << BYTE_3_SHIFT)
|
|
74
|
-
);
|
|
72
|
+
return (bytes[BYTE_0] | (bytes[BYTE_1] << BYTE_1_SHIFT) | (bytes[BYTE_2] << BYTE_2_SHIFT) |
|
|
73
|
+
(bytes[BYTE_3] << BYTE_3_SHIFT));
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
es2panda_ContextState intToState(KInt state);
|
|
@@ -79,32 +78,33 @@ es2panda_ContextState intToState(KInt state);
|
|
|
79
78
|
class StageArena {
|
|
80
79
|
std::vector<void*> allocated;
|
|
81
80
|
size_t totalSize;
|
|
82
|
-
|
|
81
|
+
|
|
82
|
+
public:
|
|
83
83
|
StageArena();
|
|
84
84
|
~StageArena();
|
|
85
85
|
static StageArena* instance();
|
|
86
|
-
template
|
|
86
|
+
template<typename T>
|
|
87
87
|
static T* alloc()
|
|
88
88
|
{
|
|
89
89
|
auto* arena = StageArena::instance();
|
|
90
90
|
void* memory = arena->alloc(sizeof(T));
|
|
91
91
|
return new (memory) T();
|
|
92
92
|
}
|
|
93
|
-
template
|
|
93
|
+
template<class T, class T1>
|
|
94
94
|
static T* alloc(T1 arg1)
|
|
95
95
|
{
|
|
96
96
|
auto* arena = StageArena::instance();
|
|
97
97
|
void* memory = arena->alloc(sizeof(T));
|
|
98
98
|
return new (memory) T(std::forward(arg1));
|
|
99
99
|
}
|
|
100
|
-
template
|
|
100
|
+
template<class T, class T1, class T2>
|
|
101
101
|
static T* alloc(T1 arg1, T2 arg2)
|
|
102
102
|
{
|
|
103
103
|
auto* arena = StageArena::instance();
|
|
104
104
|
void* memory = arena->alloc(sizeof(T));
|
|
105
105
|
return new (memory) T(arg1, arg2);
|
|
106
106
|
}
|
|
107
|
-
template
|
|
107
|
+
template<typename T>
|
|
108
108
|
static T* allocArray(size_t count)
|
|
109
109
|
{
|
|
110
110
|
auto* arena = StageArena::instance();
|
|
@@ -112,14 +112,14 @@ class StageArena {
|
|
|
112
112
|
void* memory = arena->alloc(sizeof(T) * count);
|
|
113
113
|
return new (memory) T();
|
|
114
114
|
}
|
|
115
|
-
template
|
|
115
|
+
template<class T>
|
|
116
116
|
static T* clone(const T& arg)
|
|
117
117
|
{
|
|
118
118
|
auto* arena = StageArena::instance();
|
|
119
119
|
void* memory = arena->alloc(sizeof(T));
|
|
120
120
|
return new (memory) T(arg);
|
|
121
121
|
}
|
|
122
|
-
template
|
|
122
|
+
template<class T>
|
|
123
123
|
static std::vector<const void*>* cloneVector(const T* arg, size_t count)
|
|
124
124
|
{
|
|
125
125
|
return alloc<std::vector<const void*>, const T*, const T*>(arg, arg + count);
|
|
@@ -130,4 +130,4 @@ class StageArena {
|
|
|
130
130
|
void cleanup();
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
-
#endif // COMMON_H
|
|
133
|
+
#endif // COMMON_H
|
|
@@ -169,10 +169,10 @@ void MemoryTracker::Report(MemoryStats stats)
|
|
|
169
169
|
return std::to_string(bytes) + " B";
|
|
170
170
|
};
|
|
171
171
|
|
|
172
|
-
std::cout << "Current RSS: " << formatBytes(stats.currentRss) << "\n";
|
|
173
|
-
std::cout << "Peak RSS : " << formatBytes(stats.peakRss) << "\n";
|
|
174
|
-
std::cout << "VSS : " << formatBytes(stats.currentVss) << "\n";
|
|
175
|
-
std::cout << "FaultsMinor: " << stats.pageFaultsMinor << "\n";
|
|
176
|
-
std::cout << "FaultsMajor: " << stats.pageFaultsMajor << "\n";
|
|
172
|
+
std::cout << "Current RSS: " << formatBytes(stats.currentRss) << "\n" << std::endl;
|
|
173
|
+
std::cout << "Peak RSS : " << formatBytes(stats.peakRss) << "\n" << std::endl;
|
|
174
|
+
std::cout << "VSS : " << formatBytes(stats.currentVss) << "\n" << std::endl;
|
|
175
|
+
std::cout << "FaultsMinor: " << stats.pageFaultsMinor << "\n" << std::endl;
|
|
176
|
+
std::cout << "FaultsMajor: " << stats.pageFaultsMajor << "\n" << std::endl;
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
|
|
22
22
|
// 内存统计结构体
|
|
23
23
|
struct MemoryStats {
|
|
24
|
-
size_t currentRss = 0;
|
|
25
|
-
size_t peakRss = 0;
|
|
26
|
-
size_t currentVss = 0;
|
|
27
|
-
size_t pageFaultsMinor = 0;
|
|
28
|
-
size_t pageFaultsMajor = 0;
|
|
24
|
+
size_t currentRss = 0; // 当前驻留集大小 (字节)
|
|
25
|
+
size_t peakRss = 0; // 峰值驻留集大小 (字节)
|
|
26
|
+
size_t currentVss = 0; // 当前虚拟内存大小 (字节)
|
|
27
|
+
size_t pageFaultsMinor = 0; // 小页错误次数
|
|
28
|
+
size_t pageFaultsMajor = 0; // 大页错误次数
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
class MemoryTracker {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koalaui/libarkts",
|
|
3
3
|
"version": "1.7.10+devel",
|
|
4
|
-
"
|
|
4
|
+
"main": "./lib/libarkts.js",
|
|
5
5
|
"typesVersions": {
|
|
6
6
|
"*": {
|
|
7
7
|
"./compat/*": [
|
|
8
8
|
"./lib/types/wrapper-compat/index.d.ts"
|
|
9
9
|
],
|
|
10
10
|
"*": [
|
|
11
|
-
"./lib/types/index.d.ts"
|
|
11
|
+
"./lib/types/src/index.d.ts"
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
},
|
|
@@ -23,49 +23,52 @@
|
|
|
23
23
|
"./plugins/build/src/**/*"
|
|
24
24
|
],
|
|
25
25
|
"config": {
|
|
26
|
-
"panda_sdk_path": "
|
|
26
|
+
"panda_sdk_path": "../incremental/tools/panda/node_modules/@panda/sdk",
|
|
27
27
|
"panda_sdk_version": "next"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@koalaui/ets-tsc": "4.9.5-r6",
|
|
31
|
-
"@koalaui/build-common": "1.7.10+devel",
|
|
32
30
|
"@koalaui/compat": "1.7.10+devel",
|
|
33
31
|
"@koalaui/common": "1.7.10+devel",
|
|
34
|
-
"@koalaui/harness": "1.7.10+devel",
|
|
35
32
|
"@koalaui/interop": "1.7.10+devel",
|
|
36
|
-
"@koalaui/fast-arktsc": "1.7.10+devel",
|
|
37
|
-
"@idlizer/arktscgen": "2.1.10-arktscgen-3a",
|
|
38
|
-
"@types/mocha": "^9.1.0",
|
|
39
|
-
"mocha": "^9.2.2",
|
|
40
|
-
"node-addon-api": "8.0.0",
|
|
41
|
-
"node-api-headers": "0.0.5",
|
|
42
33
|
"commander": "10.0.1"
|
|
43
34
|
},
|
|
44
35
|
"devDependencies": {
|
|
36
|
+
"tslib": "^2.3.1",
|
|
45
37
|
"rollup": "^4.13.0",
|
|
46
38
|
"@rollup/plugin-commonjs": "^26.0.1",
|
|
47
39
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
48
40
|
"@rollup/plugin-terser": "^0.4.4",
|
|
49
41
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
50
|
-
"
|
|
42
|
+
"tsconfig-paths": "^4.2.0",
|
|
43
|
+
"rimraf": "^6.0.1",
|
|
44
|
+
"@koalaui/fast-arktsc": "1.7.10+devel",
|
|
45
|
+
"@idlizer/arktscgen": "2.1.10-arktscgen-5",
|
|
46
|
+
"mocha": "^9.2.2",
|
|
47
|
+
"@koalaui/harness": "1.7.10+devel",
|
|
48
|
+
"@koalaui/ets-tsc": "4.9.5-r6",
|
|
49
|
+
"@koalaui/build-common": "1.7.10+devel",
|
|
50
|
+
"node-addon-api": "8.0.0",
|
|
51
|
+
"node-api-headers": "0.0.5"
|
|
51
52
|
},
|
|
52
53
|
"scripts": {
|
|
53
|
-
"clean": "rimraf build native/build* ./.rollup.cache tsconfig.tsbuildinfo lib",
|
|
54
|
+
"clean": "rimraf generated build native/build* ./.rollup.cache tsconfig.tsbuildinfo lib",
|
|
54
55
|
"clean:plugins": "rimraf plugins/build",
|
|
55
|
-
"compile:koala:interop": "npm run --prefix
|
|
56
|
+
"compile:koala:interop": "npm run --prefix ../interop compile",
|
|
56
57
|
"compile:meson": "cd native && meson setup build && meson compile -C build",
|
|
57
58
|
"compile:meson:mingw": "cd native && meson setup --cross-file ./mingw.cross mingw_build && meson compile -C mingw_build",
|
|
58
59
|
"crosscompile:meson": "cd native && CXX=clang++ meson setup -D cross_compile=true build && CXX=clang++ meson compile -C build",
|
|
59
60
|
"copy:.node": "mkdir -p ./build/native/build && cp ./native/build/es2panda_*.node ./build/native/build",
|
|
60
61
|
"compile:native": "npm run compile:koala:interop && npm run compile:meson && npm run copy:.node",
|
|
61
62
|
"crosscompile:native": "npm run compile:koala:interop && npm run crosscompile:meson && npm run copy:.node",
|
|
62
|
-
"compile": "npm run compile:native && npm run compile:js",
|
|
63
|
-
"compile:
|
|
63
|
+
"compile": "npm run regenerate && npm run compile:native && npm run compile:js",
|
|
64
|
+
"compile:current": "npm run regenerate:current && npm run compile:native && npm run compile:js",
|
|
65
|
+
"compile:release": "npm run regenerate && npm run crosscompile:native && npm run compile:js",
|
|
64
66
|
"compile:js": "rm -rf lib/ && rollup -c rollup.lib.mjs && rollup -c rollup.es2panda.mjs",
|
|
65
67
|
"compile:plugins": "rollup -c ./rollup.printer-plugin.mjs",
|
|
66
|
-
"direct": "fast-arktsc --config arktsconfig.json --compiler
|
|
67
|
-
"simultaneous": "mkdir -p build/abc && bash
|
|
68
|
+
"direct": "fast-arktsc --config arktsconfig.json --compiler ../incremental/tools/panda/arkts/ui2abc --link-name ./build/abc/main.abc && ninja -f build/abc/build.ninja",
|
|
69
|
+
"simultaneous": "mkdir -p build/abc && bash ../incremental/tools/panda/arkts/ui2abc --simultaneous --arktsconfig arktsconfig.json --output ./build/abc/main.abc:./build/abc/library.abc plugins/input/main.ets:plugins/input/library.ets",
|
|
68
70
|
"run": "npm run compile && npm run compile:plugins && npm run simultaneous",
|
|
71
|
+
"run:current": "npm run compile:current && npm run compile:plugins && npm run simultaneous",
|
|
69
72
|
"run:memo": "npm run compile && npm run compile:plugins && npm run compile --prefix ../memo-plugin-ng && npm run memo",
|
|
70
73
|
"run:abc": "$npm_package_config_panda_sdk_path/linux_host_tools/bin/ark --load-runtimes=ets --boot-panda-files=$npm_package_config_panda_sdk_path/ets/etsstdlib.abc ./main.abc main.ETSGLOBAL::main",
|
|
71
74
|
"mocha": "PANDA_SDK_PATH=${PANDA_SDK_PATH:=$npm_package_config_panda_sdk_path} TS_NODE_PROJECT=./test/tsconfig.json mocha -r tsconfig-paths/register --reporter-option maxDiffSize=0",
|
|
@@ -73,12 +76,15 @@
|
|
|
73
76
|
"test": "npm run compile:native && npm run test:light",
|
|
74
77
|
"test:golden": "npm run compile:native && TEST_GOLDEN=1 npm run test:light",
|
|
75
78
|
"compile:playground": "cd playground && meson setup build && meson compile -C build",
|
|
76
|
-
"run:playground": "npm run compile:playground && mkdir -p build && ./playground/build/playground _ --extension ets --stdlib
|
|
77
|
-
"panda:sdk:clean": "cd
|
|
78
|
-
"panda:sdk:install": "cd
|
|
79
|
+
"run:playground": "npm run compile:playground && mkdir -p build && ./playground/build/playground _ --extension ets --stdlib ../incremental/tools/panda/node_modules/@panda/sdk/ets/stdlib --output build/playground.abc ./playground/src/main.ets",
|
|
80
|
+
"panda:sdk:clean": "cd ../incremental/tools/panda && rimraf node_modules",
|
|
81
|
+
"panda:sdk:install": "cd ../incremental/tools/panda && echo \"Installing panda sdk $npm_package_config_panda_sdk_version\" && PANDA_SDK_VERSION=$npm_package_config_panda_sdk_version npm run panda:sdk:install",
|
|
79
82
|
"panda:sdk:reinstall": "npm run panda:sdk:clean && npm run panda:sdk:install",
|
|
80
|
-
"regenerate:current": "rimraf -rf
|
|
81
|
-
"regenerate": "rimraf -rf
|
|
82
|
-
"reinstall:regenerate": "npm run panda:sdk:reinstall && npm run regenerate && git diff --shortstat"
|
|
83
|
+
"regenerate:current": "rimraf -rf ./generated && npm run compile -C ../../arktscgen && node ../../arktscgen --panda-sdk-path $npm_package_config_panda_sdk_path --output-dir ../ --options-file ./generator/options.json5 --no-initialize --debug",
|
|
84
|
+
"regenerate": "rimraf -rf ./generated && arktscgen --panda-sdk-path ${PANDA_SDK_PATH:=$npm_package_config_panda_sdk_path} --output-dir ../ --options-file ./generator/options.json5 --no-initialize",
|
|
85
|
+
"reinstall:regenerate": "npm run panda:sdk:reinstall && npm run regenerate && git diff --shortstat",
|
|
86
|
+
"format:src:ts": "npx prettier --config .prettierrc --write \"./src/**/*.ts\"",
|
|
87
|
+
"format:generated:ts": "npx prettier --config .prettierrc --write \"./generated/**/*.ts\"",
|
|
88
|
+
"format:ts": "npm run format:src:ts && npm run format:generated:ts"
|
|
83
89
|
}
|
|
84
90
|
}
|
|
@@ -23,200 +23,227 @@ import {
|
|
|
23
23
|
KDouble,
|
|
24
24
|
KUInt,
|
|
25
25
|
KStringArrayPtr,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
import
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
KStringPtr,
|
|
27
|
+
} from '@koalaui/interop';
|
|
28
|
+
import {
|
|
29
|
+
Es2pandaNativeModule as GeneratedEs2pandaNativeModule,
|
|
30
|
+
KNativePointerArray,
|
|
31
|
+
} from '../generated/Es2pandaNativeModule';
|
|
32
|
+
import * as path from 'path';
|
|
33
|
+
import * as fs from 'fs';
|
|
34
|
+
import { Es2pandaPluginDiagnosticType } from '../generated/Es2pandaEnums';
|
|
31
35
|
|
|
32
36
|
// Improve: this type should be in interop
|
|
33
|
-
export type KPtrArray = BigUint64Array
|
|
37
|
+
export type KPtrArray = BigUint64Array;
|
|
34
38
|
|
|
35
39
|
export class Es2pandaNativeModule {
|
|
36
40
|
_AnnotationAllowedAnnotations(context: KPtr, node: KPtr, returnLen: KPtr): KPtr {
|
|
37
|
-
throw new Error(
|
|
41
|
+
throw new Error('Not implemented');
|
|
38
42
|
}
|
|
39
43
|
_AstNodeRebind(context: KPtr, node: KPtr): void {
|
|
40
|
-
throw new Error(
|
|
44
|
+
throw new Error('Not implemented');
|
|
41
45
|
}
|
|
42
46
|
_ContextState(context: KPtr): KInt {
|
|
43
|
-
throw new Error(
|
|
47
|
+
throw new Error('Not implemented');
|
|
44
48
|
}
|
|
45
49
|
_AstNodeChildren(context: KPtr, node: KPtr): KPtr {
|
|
46
|
-
throw new Error(
|
|
50
|
+
throw new Error('Not implemented');
|
|
47
51
|
}
|
|
48
52
|
_AstNodeDumpModifiers(context: KPtr, node: KPtr): KPtr {
|
|
49
|
-
throw new Error(
|
|
53
|
+
throw new Error('Not implemented');
|
|
50
54
|
}
|
|
51
55
|
_CreateConfig(argc: number, argv: string[]): KPtr {
|
|
52
|
-
throw new Error(
|
|
56
|
+
throw new Error('Not implemented');
|
|
53
57
|
}
|
|
54
58
|
_DestroyConfig(peer: KNativePointer): void {
|
|
55
|
-
throw new Error(
|
|
56
|
-
}
|
|
57
|
-
_CreateContextFromString(config: KPtr, source: String, filename: String): KPtr {
|
|
58
|
-
throw new Error("Not implemented")
|
|
59
|
-
}
|
|
60
|
-
_CreateContextFromFile(config: KPtr, filename: String): KPtr {
|
|
61
|
-
throw new Error("Not implemented")
|
|
62
|
-
}
|
|
63
|
-
_CreateCacheContextFromFile(config: KNativePointer, sourceFileName: String, globalContext: KNativePointer, isExternal: KBoolean): KNativePointer {
|
|
64
|
-
throw new Error("Not implemented");
|
|
59
|
+
throw new Error('Not implemented');
|
|
65
60
|
}
|
|
66
61
|
_InsertGlobalStructInfo(context: KNativePointer, str: String): void {
|
|
67
|
-
throw new Error(
|
|
62
|
+
throw new Error('Not implemented');
|
|
68
63
|
}
|
|
69
64
|
_HasGlobalStructInfo(context: KNativePointer, str: String): KBoolean {
|
|
70
|
-
throw new Error(
|
|
71
|
-
}
|
|
72
|
-
_CreateGlobalContext(config: KNativePointer, externalFileList: KStringArrayPtr, fileNum: KUInt, lspUsage: KBoolean): KNativePointer {
|
|
73
|
-
throw new Error("Not implemented");
|
|
74
|
-
}
|
|
75
|
-
_DestroyGlobalContext(context: KNativePointer): void {
|
|
76
|
-
throw new Error("Not implemented");
|
|
65
|
+
throw new Error('Not implemented');
|
|
77
66
|
}
|
|
78
67
|
_DestroyContext(context: KPtr): void {
|
|
79
|
-
throw new Error(
|
|
68
|
+
throw new Error('Not implemented');
|
|
80
69
|
}
|
|
81
70
|
_ProceedToState(context: KPtr, state: number): void {
|
|
82
|
-
throw new Error(
|
|
71
|
+
throw new Error('Not implemented');
|
|
83
72
|
}
|
|
84
73
|
_CheckerStartChecker(context: KPtr): KBoolean {
|
|
85
|
-
throw new Error(
|
|
74
|
+
throw new Error('Not implemented');
|
|
86
75
|
}
|
|
87
76
|
_AstNodeVariableConst(context: KPtr, ast: KPtr): KPtr {
|
|
88
|
-
throw new Error(
|
|
77
|
+
throw new Error('Not implemented');
|
|
89
78
|
}
|
|
90
79
|
_CreateNumberLiteral(context: KPtr, value: KDouble): KPtr {
|
|
91
|
-
throw new Error(
|
|
80
|
+
throw new Error('Not implemented');
|
|
92
81
|
}
|
|
93
82
|
_AstNodeSetChildrenParentPtr(context: KPtr, node: KPtr): void {
|
|
94
|
-
throw new Error(
|
|
83
|
+
throw new Error('Not implemented');
|
|
95
84
|
}
|
|
96
85
|
_AstNodeOnUpdate(context: KPtr, newNode: KPtr, replacedNode: KPtr): void {
|
|
97
|
-
throw new Error(
|
|
86
|
+
throw new Error('Not implemented');
|
|
98
87
|
}
|
|
99
88
|
_AstNodeUpdateAll(context: KPtr, node: KPtr): void {
|
|
100
|
-
throw new Error(
|
|
89
|
+
throw new Error('Not implemented');
|
|
101
90
|
}
|
|
102
91
|
_VariableDeclaration(context: KPtr, variable: KPtr): KPtr {
|
|
103
|
-
throw new Error(
|
|
92
|
+
throw new Error('Not implemented');
|
|
104
93
|
}
|
|
105
94
|
_DeclNode(context: KPtr, decl: KPtr): KPtr {
|
|
106
|
-
throw new Error(
|
|
95
|
+
throw new Error('Not implemented');
|
|
107
96
|
}
|
|
108
97
|
_ProgramSourceFilePath(context: KNativePointer, instance: KNativePointer): KNativePointer {
|
|
109
|
-
throw new Error(
|
|
98
|
+
throw new Error('Not implemented');
|
|
110
99
|
}
|
|
111
100
|
_ProgramExternalSources(context: KNativePointer, instance: KNativePointer): KNativePointer {
|
|
112
|
-
throw new Error(
|
|
101
|
+
throw new Error('Not implemented');
|
|
113
102
|
}
|
|
114
103
|
_ProgramDirectExternalSources(context: KNativePointer, instance: KNativePointer): KNativePointer {
|
|
115
|
-
throw new Error(
|
|
104
|
+
throw new Error('Not implemented');
|
|
116
105
|
}
|
|
117
106
|
_ExternalSourceName(instance: KNativePointer): KNativePointer {
|
|
118
|
-
throw new Error(
|
|
107
|
+
throw new Error('Not implemented');
|
|
119
108
|
}
|
|
120
109
|
_ExternalSourcePrograms(instance: KNativePointer): KNativePointer {
|
|
121
|
-
throw new Error(
|
|
110
|
+
throw new Error('Not implemented');
|
|
122
111
|
}
|
|
123
|
-
_ETSParserBuildImportDeclaration(
|
|
124
|
-
|
|
112
|
+
_ETSParserBuildImportDeclaration(
|
|
113
|
+
context: KNativePointer,
|
|
114
|
+
importKinds: KInt,
|
|
115
|
+
specifiers: KNativePointerArray,
|
|
116
|
+
specifiersSequenceLength: KUInt,
|
|
117
|
+
source: KNativePointer,
|
|
118
|
+
program: KNativePointer,
|
|
119
|
+
flags: KInt
|
|
120
|
+
): KNativePointer {
|
|
121
|
+
throw new Error('Not implemented');
|
|
125
122
|
}
|
|
126
|
-
_ImportPathManagerResolvePathConst(
|
|
127
|
-
|
|
123
|
+
_ImportPathManagerResolvePathConst(
|
|
124
|
+
context: KNativePointer,
|
|
125
|
+
importPathManager: KNativePointer,
|
|
126
|
+
currentModulePath: String,
|
|
127
|
+
importPath: String,
|
|
128
|
+
sourcePosition: KNativePointer
|
|
129
|
+
): KNativePointer {
|
|
130
|
+
throw new Error('Not implemented');
|
|
128
131
|
}
|
|
129
132
|
_ETSParserGetImportPathManager(context: KNativePointer): KPtr {
|
|
130
|
-
throw new Error(
|
|
131
|
-
}
|
|
132
|
-
_SourcePositionCol(context: KNativePointer, instance: KNativePointer): KUInt {
|
|
133
|
-
throw new Error("Not implemented");
|
|
133
|
+
throw new Error('Not implemented');
|
|
134
134
|
}
|
|
135
135
|
_ConfigGetOptions(config: KNativePointer): KNativePointer {
|
|
136
|
-
throw new Error(
|
|
136
|
+
throw new Error('Not implemented');
|
|
137
|
+
}
|
|
138
|
+
_SourcePositionCol(context: KNativePointer, instance: KNativePointer): KUInt {
|
|
139
|
+
throw new Error('Not implemented');
|
|
137
140
|
}
|
|
138
141
|
_OptionsArkTsConfig(context: KNativePointer, options: KNativePointer): KNativePointer {
|
|
139
|
-
throw new Error(
|
|
142
|
+
throw new Error('Not implemented');
|
|
140
143
|
}
|
|
141
144
|
_Checker_CreateOpaqueTypeNode(context: KNativePointer, type: KNativePointer): KNativePointer {
|
|
142
|
-
throw new Error(
|
|
145
|
+
throw new Error('Not implemented');
|
|
143
146
|
}
|
|
144
147
|
_Checker_ScriptFunctionSignature(context: KNativePointer, node: KNativePointer): KNativePointer {
|
|
145
|
-
throw new Error(
|
|
148
|
+
throw new Error('Not implemented');
|
|
146
149
|
}
|
|
147
|
-
_Checker_ScriptFunctionSetSignature(
|
|
148
|
-
|
|
150
|
+
_Checker_ScriptFunctionSetSignature(
|
|
151
|
+
context: KNativePointer,
|
|
152
|
+
node: KNativePointer,
|
|
153
|
+
signature: KNativePointer
|
|
154
|
+
): void {
|
|
155
|
+
throw new Error('Not implemented');
|
|
149
156
|
}
|
|
150
157
|
_Checker_SignatureReturnType(context: KNativePointer, signature: KNativePointer): KNativePointer {
|
|
151
|
-
throw new Error(
|
|
158
|
+
throw new Error('Not implemented');
|
|
152
159
|
}
|
|
153
160
|
_Checker_ScriptFunctionGetPreferredReturnType(context: KNativePointer, node: KNativePointer): KNativePointer {
|
|
154
|
-
throw new Error(
|
|
161
|
+
throw new Error('Not implemented');
|
|
155
162
|
}
|
|
156
|
-
_Checker_ScriptFunctionSetPreferredReturnType(
|
|
157
|
-
|
|
163
|
+
_Checker_ScriptFunctionSetPreferredReturnType(
|
|
164
|
+
context: KNativePointer,
|
|
165
|
+
node: KNativePointer,
|
|
166
|
+
type: KNativePointer
|
|
167
|
+
): void {
|
|
168
|
+
throw new Error('Not implemented');
|
|
158
169
|
}
|
|
159
170
|
_Checker_ExpressionGetPreferredType(context: KNativePointer, node: KNativePointer): KNativePointer {
|
|
160
|
-
throw new Error(
|
|
171
|
+
throw new Error('Not implemented');
|
|
161
172
|
}
|
|
162
173
|
_Checker_ExpressionSetPreferredType(context: KNativePointer, node: KNativePointer, type: KNativePointer): void {
|
|
163
|
-
throw new Error(
|
|
174
|
+
throw new Error('Not implemented');
|
|
164
175
|
}
|
|
165
176
|
_Checker_TypeToString(context: KNativePointer, type: KNativePointer): KNativePointer {
|
|
166
|
-
throw new Error(
|
|
177
|
+
throw new Error('Not implemented');
|
|
167
178
|
}
|
|
168
179
|
_Checker_TypeClone(context: KNativePointer, type: KNativePointer): KNativePointer {
|
|
169
|
-
throw new Error(
|
|
180
|
+
throw new Error('Not implemented');
|
|
170
181
|
}
|
|
171
182
|
_Checker_TypeNodeGetType(context: KNativePointer, node: KNativePointer): KNativePointer {
|
|
172
|
-
throw new Error(
|
|
183
|
+
throw new Error('Not implemented');
|
|
173
184
|
}
|
|
174
|
-
_ScriptFunctionSetParams(
|
|
175
|
-
|
|
185
|
+
_ScriptFunctionSetParams(
|
|
186
|
+
context: KNativePointer,
|
|
187
|
+
receiver: KNativePointer,
|
|
188
|
+
paramsList: BigUint64Array,
|
|
189
|
+
paramsListLength: KUInt
|
|
190
|
+
): void {
|
|
191
|
+
throw new Error('Not implemented');
|
|
176
192
|
}
|
|
177
|
-
_ClassDefinitionSetBody(
|
|
178
|
-
|
|
193
|
+
_ClassDefinitionSetBody(
|
|
194
|
+
context: KNativePointer,
|
|
195
|
+
receiver: KNativePointer,
|
|
196
|
+
body: BigUint64Array,
|
|
197
|
+
bodyLength: KUInt
|
|
198
|
+
): void {
|
|
199
|
+
throw new Error('Not implemented');
|
|
200
|
+
}
|
|
201
|
+
_FilterNodes(context: KNativePointer, root: KNativePointer, filters: KStringPtr, deeperAfterMatch: KBoolean): KNativePointer {
|
|
202
|
+
throw new Error('Not implemented');
|
|
203
|
+
}
|
|
204
|
+
_FilterNodes2(context: KNativePointer, root: KNativePointer, type: KInt): KNativePointer {
|
|
205
|
+
throw new Error('Not implemented');
|
|
206
|
+
}
|
|
207
|
+
_FilterNodes3(context: KNativePointer, root: KNativePointer, types: Int32Array, typesSize: KInt): KNativePointer {
|
|
208
|
+
throw new Error('Not implemented');
|
|
179
209
|
}
|
|
180
210
|
|
|
181
211
|
// From koala-wrapper
|
|
182
212
|
_ClassVariableDeclaration(context: KNativePointer, classInstance: KNativePointer): KNativePointer {
|
|
183
|
-
throw new Error(
|
|
213
|
+
throw new Error('Not implemented');
|
|
184
214
|
}
|
|
185
215
|
_ETSParserGetGlobalProgramAbsName(context: KNativePointer): KNativePointer {
|
|
186
|
-
throw new Error(
|
|
187
|
-
}
|
|
188
|
-
_CreateDiagnosticKind(context: KNativePointer, message: string, type: Es2pandaPluginDiagnosticType): KNativePointer {
|
|
189
|
-
throw new Error("Not implemented")
|
|
190
|
-
}
|
|
191
|
-
_CreateDiagnosticInfo(context: KNativePointer, kind: KNativePointer, args: string[], argc: number, pos: KNativePointer): KNativePointer {
|
|
192
|
-
throw new Error("Not implemented")
|
|
216
|
+
throw new Error('Not implemented');
|
|
193
217
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
218
|
+
_CreateDiagnosticKind(
|
|
219
|
+
context: KNativePointer,
|
|
220
|
+
message: string,
|
|
221
|
+
type: Es2pandaPluginDiagnosticType
|
|
222
|
+
): KNativePointer {
|
|
223
|
+
throw new Error('Not implemented');
|
|
197
224
|
}
|
|
198
|
-
_LogDiagnostic(
|
|
199
|
-
|
|
225
|
+
_LogDiagnostic(
|
|
226
|
+
context: KNativePointer,
|
|
227
|
+
kind: KNativePointer,
|
|
228
|
+
argv: string[],
|
|
229
|
+
argc: number,
|
|
230
|
+
pos: KNativePointer
|
|
231
|
+
): void {
|
|
232
|
+
throw new Error('Not implemented');
|
|
200
233
|
}
|
|
201
234
|
_SetUpSoPath(soPath: string): void {
|
|
202
|
-
throw new Error(
|
|
235
|
+
throw new Error('Not implemented');
|
|
203
236
|
}
|
|
204
237
|
_MemInitialize(): void {
|
|
205
|
-
throw new Error(
|
|
238
|
+
throw new Error('Not implemented');
|
|
206
239
|
}
|
|
207
240
|
_MemFinalize(): void {
|
|
208
|
-
throw new Error(
|
|
209
|
-
}
|
|
210
|
-
_ProgramCanSkipPhases(context: KNativePointer, program: KNativePointer): boolean {
|
|
211
|
-
throw new Error("Not implemented")
|
|
241
|
+
throw new Error('Not implemented');
|
|
212
242
|
}
|
|
213
|
-
|
|
214
|
-
throw new Error(
|
|
243
|
+
_ProgramCanSkipPhases(context: KNativePointer, program: KNativePointer): KBoolean {
|
|
244
|
+
throw new Error('Not implemented');
|
|
215
245
|
}
|
|
216
246
|
_AstNodeProgram(context: KNativePointer, instance: KNativePointer): KNativePointer {
|
|
217
|
-
throw new Error("Not implemented")
|
|
218
|
-
}
|
|
219
|
-
_CreateContextGenerateAbcForExternalSourceFiles(config: KPtr, fileCount: KInt, filenames: string[]): KPtr {
|
|
220
247
|
throw new Error('Not implemented');
|
|
221
248
|
}
|
|
222
249
|
|
|
@@ -242,33 +269,29 @@ export class Es2pandaNativeModule {
|
|
|
242
269
|
}
|
|
243
270
|
|
|
244
271
|
export function findNativeModule(): string {
|
|
245
|
-
const candidates = [
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
]
|
|
249
|
-
let result = undefined
|
|
250
|
-
candidates.forEach(path => {
|
|
272
|
+
const candidates = [path.resolve(__dirname, '../native/build'), path.resolve(__dirname, '../build/native/build')];
|
|
273
|
+
let result = undefined;
|
|
274
|
+
candidates.forEach((path) => {
|
|
251
275
|
if (fs.existsSync(path)) {
|
|
252
|
-
result = path
|
|
253
|
-
return
|
|
276
|
+
result = path;
|
|
277
|
+
return;
|
|
254
278
|
}
|
|
255
|
-
})
|
|
256
|
-
if (result)
|
|
257
|
-
|
|
258
|
-
throw new Error("Cannot find native module")
|
|
279
|
+
});
|
|
280
|
+
if (result) return path.join(result, 'es2panda');
|
|
281
|
+
throw new Error('Cannot find native module');
|
|
259
282
|
}
|
|
260
283
|
|
|
261
284
|
export function initEs2panda(): Es2pandaNativeModule {
|
|
262
|
-
registerNativeModuleLibraryName(
|
|
263
|
-
const instance = new Es2pandaNativeModule()
|
|
264
|
-
loadNativeModuleLibrary(
|
|
265
|
-
return instance
|
|
285
|
+
registerNativeModuleLibraryName('NativeModule', findNativeModule());
|
|
286
|
+
const instance = new Es2pandaNativeModule();
|
|
287
|
+
loadNativeModuleLibrary('NativeModule', instance);
|
|
288
|
+
return instance;
|
|
266
289
|
}
|
|
267
290
|
|
|
268
291
|
export function initGeneratedEs2panda(): GeneratedEs2pandaNativeModule {
|
|
269
|
-
registerNativeModuleLibraryName(
|
|
270
|
-
const instance = new GeneratedEs2pandaNativeModule()
|
|
292
|
+
registerNativeModuleLibraryName('NativeModule', findNativeModule());
|
|
293
|
+
const instance = new GeneratedEs2pandaNativeModule();
|
|
271
294
|
// registerNativeModule("InteropNativeModule", NativeModule)
|
|
272
|
-
loadNativeModuleLibrary(
|
|
273
|
-
return instance
|
|
295
|
+
loadNativeModuleLibrary('NativeModule', instance);
|
|
296
|
+
return instance;
|
|
274
297
|
}
|