@idlizer/arktscgen 2.1.10-arktscgen-3a → 2.1.10-arktscgen-5

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.
Files changed (284) hide show
  1. package/build/libarkts-copy/native/meson.build +1 -1
  2. package/build/libarkts-copy/native/src/bridges.cc +72 -115
  3. package/build/libarkts-copy/native/src/common.cc +225 -84
  4. package/build/libarkts-copy/native/src/common.h +22 -22
  5. package/build/libarkts-copy/native/src/memoryTracker.cc +30 -37
  6. package/build/libarkts-copy/native/src/memoryTracker.h +5 -5
  7. package/build/libarkts-copy/package.json +23 -19
  8. package/build/libarkts-copy/src/Es2pandaNativeModule.ts +176 -100
  9. package/build/libarkts-copy/src/InteropNativeModule.ts +18 -15
  10. package/build/libarkts-copy/src/arkts-api/AbstractVisitor.ts +17 -18
  11. package/build/libarkts-copy/src/arkts-api/ImportStorage.ts +31 -30
  12. package/build/libarkts-copy/src/arkts-api/ProgramProvider.ts +20 -17
  13. package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +12 -12
  14. package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +44 -29
  15. package/build/libarkts-copy/src/arkts-api/index.ts +24 -24
  16. package/build/libarkts-copy/src/arkts-api/node-cache.ts +12 -12
  17. package/build/libarkts-copy/src/arkts-api/node-utilities/ArkTsConfig.ts +8 -8
  18. package/build/libarkts-copy/src/arkts-api/node-utilities/ArrayExpression.ts +9 -21
  19. package/build/libarkts-copy/src/arkts-api/node-utilities/AssignmentExpression.ts +12 -14
  20. package/build/libarkts-copy/src/arkts-api/node-utilities/BlockStatement.ts +5 -5
  21. package/build/libarkts-copy/src/arkts-api/node-utilities/CallExpression.ts +47 -13
  22. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +62 -32
  23. package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +14 -13
  24. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +24 -21
  25. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +10 -12
  26. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSModule.ts +14 -18
  27. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +15 -16
  28. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSStructDeclaration.ts +5 -8
  29. package/build/libarkts-copy/src/arkts-api/node-utilities/ETSTuple.ts +6 -12
  30. package/build/libarkts-copy/src/arkts-api/node-utilities/MemberExpression.ts +12 -11
  31. package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +14 -33
  32. package/build/libarkts-copy/src/arkts-api/node-utilities/NumberLiteral.ts +12 -23
  33. package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +17 -21
  34. package/build/libarkts-copy/src/arkts-api/node-utilities/OpaqueTypeNode.ts +9 -8
  35. package/build/libarkts-copy/src/arkts-api/node-utilities/Program.ts +21 -16
  36. package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +80 -35
  37. package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +22 -32
  38. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeParameter.ts +12 -14
  39. package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeReferencePart.ts +10 -12
  40. package/build/libarkts-copy/src/arkts-api/node-utilities/TryStatement.ts +10 -9
  41. package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclarator.ts +10 -12
  42. package/build/libarkts-copy/src/arkts-api/peers/ArktsObject.ts +8 -8
  43. package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +53 -49
  44. package/build/libarkts-copy/src/arkts-api/peers/Config.ts +17 -24
  45. package/build/libarkts-copy/src/arkts-api/peers/Context.ts +29 -37
  46. package/build/libarkts-copy/src/arkts-api/peers/DiagnosticKind.ts +5 -6
  47. package/build/libarkts-copy/src/arkts-api/peers/ExternalSource.ts +9 -9
  48. package/build/libarkts-copy/src/arkts-api/peers/ImportPathManager.ts +6 -8
  49. package/build/libarkts-copy/src/arkts-api/peers/Options.ts +8 -8
  50. package/build/libarkts-copy/src/arkts-api/plugins.ts +98 -30
  51. package/build/libarkts-copy/src/arkts-api/static/global.ts +35 -36
  52. package/build/libarkts-copy/src/arkts-api/static/globalUtils.ts +5 -5
  53. package/build/libarkts-copy/src/arkts-api/static/profiler.ts +107 -91
  54. package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +54 -37
  55. package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +86 -69
  56. package/build/libarkts-copy/src/arkts-api/utilities/performance.ts +39 -23
  57. package/build/libarkts-copy/src/arkts-api/utilities/private.ts +73 -61
  58. package/build/libarkts-copy/src/arkts-api/utilities/public.ts +220 -173
  59. package/build/libarkts-copy/src/arkts-api/visitor.ts +606 -742
  60. package/build/libarkts-copy/src/arkts-api/wrapper-compat.ts +8 -8
  61. package/build/libarkts-copy/src/checkSdk.ts +15 -18
  62. package/build/libarkts-copy/src/index.ts +29 -29
  63. package/build/libarkts-copy/src/plugin-utils.ts +52 -40
  64. package/build/libarkts-copy/src/reexport-for-generated.ts +11 -10
  65. package/build/libarkts-copy/src/tracer.ts +75 -69
  66. package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +134 -274
  67. package/build/libarkts-copy/src/ts-api/factory/nodeTests.ts +23 -23
  68. package/build/libarkts-copy/src/ts-api/index.ts +27 -35
  69. package/build/libarkts-copy/src/ts-api/static/enums.ts +3 -3
  70. package/build/libarkts-copy/src/ts-api/types.ts +535 -395
  71. package/build/libarkts-copy/src/ts-api/utilities/private.ts +115 -112
  72. package/build/libarkts-copy/src/ts-api/utilities/public.ts +18 -18
  73. package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +33 -49
  74. package/build/libarkts-copy/src/utils.ts +97 -70
  75. package/build/libarkts-copy/tsconfig.json +3 -2
  76. package/lib/index.js +428 -159
  77. package/package.json +51 -53
  78. package/templates/Es2pandaNativeModule.ts +1 -0
  79. package/templates/factory.ts +1 -1
  80. package/templates/peer.ts +2 -1
  81. package/build/libarkts-copy/native/src/generated/bridges.cc +0 -16382
  82. package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +0 -1350
  83. package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +0 -5195
  84. package/build/libarkts-copy/src/generated/factory.ts +0 -1286
  85. package/build/libarkts-copy/src/generated/index.ts +0 -222
  86. package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +0 -44
  87. package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +0 -54
  88. package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +0 -45
  89. package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +0 -165
  90. package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +0 -84
  91. package/build/libarkts-copy/src/generated/peers/ArkTsConfig.ts +0 -73
  92. package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +0 -109
  93. package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +0 -119
  94. package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +0 -65
  95. package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +0 -111
  96. package/build/libarkts-copy/src/generated/peers/AstDumper.ts +0 -49
  97. package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +0 -40
  98. package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +0 -40
  99. package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +0 -61
  100. package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +0 -61
  101. package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +0 -110
  102. package/build/libarkts-copy/src/generated/peers/BindingProps.ts +0 -40
  103. package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +0 -72
  104. package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +0 -94
  105. package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +0 -61
  106. package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +0 -78
  107. package/build/libarkts-copy/src/generated/peers/CallExpression.ts +0 -129
  108. package/build/libarkts-copy/src/generated/peers/CatchClause.ts +0 -74
  109. package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +0 -68
  110. package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +0 -58
  111. package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +0 -76
  112. package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +0 -365
  113. package/build/libarkts-copy/src/generated/peers/ClassElement.ts +0 -76
  114. package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +0 -62
  115. package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +0 -137
  116. package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +0 -66
  117. package/build/libarkts-copy/src/generated/peers/CodeGen.ts +0 -40
  118. package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +0 -82
  119. package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +0 -78
  120. package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +0 -58
  121. package/build/libarkts-copy/src/generated/peers/Declaration.ts +0 -40
  122. package/build/libarkts-copy/src/generated/peers/Decorator.ts +0 -62
  123. package/build/libarkts-copy/src/generated/peers/DiagnosticInfo.ts +0 -40
  124. package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +0 -60
  125. package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +0 -66
  126. package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +0 -40
  127. package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +0 -62
  128. package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +0 -102
  129. package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +0 -90
  130. package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +0 -75
  131. package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +0 -61
  132. package/build/libarkts-copy/src/generated/peers/ETSModule.ts +0 -129
  133. package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +0 -75
  134. package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +0 -79
  135. package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +0 -75
  136. package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +0 -58
  137. package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +0 -59
  138. package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +0 -189
  139. package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +0 -62
  140. package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +0 -55
  141. package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +0 -58
  142. package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +0 -59
  143. package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +0 -89
  144. package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +0 -66
  145. package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +0 -78
  146. package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +0 -58
  147. package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +0 -75
  148. package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +0 -63
  149. package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +0 -66
  150. package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +0 -40
  151. package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +0 -66
  152. package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +0 -64
  153. package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +0 -94
  154. package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +0 -82
  155. package/build/libarkts-copy/src/generated/peers/Expression.ts +0 -84
  156. package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +0 -67
  157. package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +0 -69
  158. package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +0 -72
  159. package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +0 -67
  160. package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +0 -106
  161. package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +0 -74
  162. package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +0 -70
  163. package/build/libarkts-copy/src/generated/peers/IRNode.ts +0 -40
  164. package/build/libarkts-copy/src/generated/peers/Identifier.ts +0 -162
  165. package/build/libarkts-copy/src/generated/peers/IfStatement.ts +0 -78
  166. package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +0 -87
  167. package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +0 -62
  168. package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +0 -61
  169. package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +0 -62
  170. package/build/libarkts-copy/src/generated/peers/ImportSource.ts +0 -40
  171. package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +0 -73
  172. package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +0 -40
  173. package/build/libarkts-copy/src/generated/peers/LabelPair.ts +0 -40
  174. package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +0 -68
  175. package/build/libarkts-copy/src/generated/peers/Literal.ts +0 -53
  176. package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +0 -45
  177. package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +0 -53
  178. package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +0 -115
  179. package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +0 -62
  180. package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +0 -152
  181. package/build/libarkts-copy/src/generated/peers/NamedType.ts +0 -84
  182. package/build/libarkts-copy/src/generated/peers/NewExpression.ts +0 -64
  183. package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +0 -58
  184. package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +0 -78
  185. package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +0 -40
  186. package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +0 -94
  187. package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +0 -58
  188. package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +0 -58
  189. package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +0 -101
  190. package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +0 -65
  191. package/build/libarkts-copy/src/generated/peers/Program.ts +0 -206
  192. package/build/libarkts-copy/src/generated/peers/Property.ts +0 -92
  193. package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +0 -65
  194. package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +0 -75
  195. package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +0 -40
  196. package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +0 -310
  197. package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +0 -40
  198. package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +0 -61
  199. package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +0 -40
  200. package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +0 -48
  201. package/build/libarkts-copy/src/generated/peers/SourceRange.ts +0 -40
  202. package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +0 -83
  203. package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +0 -120
  204. package/build/libarkts-copy/src/generated/peers/Statement.ts +0 -44
  205. package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +0 -66
  206. package/build/libarkts-copy/src/generated/peers/SuggestionInfo.ts +0 -40
  207. package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +0 -58
  208. package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +0 -70
  209. package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +0 -71
  210. package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +0 -58
  211. package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +0 -61
  212. package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +0 -84
  213. package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +0 -58
  214. package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +0 -58
  215. package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +0 -70
  216. package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +0 -71
  217. package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +0 -73
  218. package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +0 -112
  219. package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +0 -76
  220. package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +0 -61
  221. package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +0 -75
  222. package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +0 -69
  223. package/build/libarkts-copy/src/generated/peers/TSImportType.ts +0 -72
  224. package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +0 -73
  225. package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +0 -64
  226. package/build/libarkts-copy/src/generated/peers/TSInferType.ts +0 -62
  227. package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +0 -61
  228. package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +0 -160
  229. package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +0 -62
  230. package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +0 -62
  231. package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +0 -62
  232. package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +0 -72
  233. package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +0 -79
  234. package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +0 -61
  235. package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +0 -71
  236. package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +0 -68
  237. package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +0 -58
  238. package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +0 -66
  239. package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +0 -58
  240. package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +0 -58
  241. package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +0 -58
  242. package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +0 -74
  243. package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +0 -62
  244. package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +0 -80
  245. package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +0 -71
  246. package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +0 -75
  247. package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +0 -58
  248. package/build/libarkts-copy/src/generated/peers/TSThisType.ts +0 -58
  249. package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +0 -61
  250. package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +0 -151
  251. package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +0 -71
  252. package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +0 -61
  253. package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +0 -71
  254. package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +0 -121
  255. package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +0 -75
  256. package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +0 -62
  257. package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +0 -68
  258. package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +0 -62
  259. package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +0 -70
  260. package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +0 -58
  261. package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +0 -61
  262. package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +0 -58
  263. package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +0 -58
  264. package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +0 -69
  265. package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +0 -69
  266. package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +0 -68
  267. package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +0 -58
  268. package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +0 -62
  269. package/build/libarkts-copy/src/generated/peers/TryStatement.ts +0 -89
  270. package/build/libarkts-copy/src/generated/peers/TypeNode.ts +0 -81
  271. package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +0 -44
  272. package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +0 -45
  273. package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +0 -61
  274. package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +0 -70
  275. package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +0 -58
  276. package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +0 -68
  277. package/build/libarkts-copy/src/generated/peers/VReg.ts +0 -40
  278. package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +0 -50
  279. package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +0 -113
  280. package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +0 -79
  281. package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +0 -40
  282. package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +0 -40
  283. package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +0 -71
  284. package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +0 -64
@@ -18,29 +18,29 @@
18
18
  #include <cstdint>
19
19
  #include <fstream>
20
20
  #include <iostream>
21
+ #include <regex>
21
22
  #include <sstream>
22
23
  #include <system_error>
23
24
  #include <vector>
24
- #include <regex>
25
25
 
26
26
  #ifdef _WIN32
27
- #include <windows.h>
28
- #include <psapi.h>
27
+ #include <psapi.h>
28
+ #include <windows.h>
29
29
  #elif defined(__APPLE__)
30
- #include <mach/mach.h>
31
- #include <sys/resource.h>
30
+ #include <mach/mach.h>
31
+ #include <sys/resource.h>
32
32
  #elif defined(__linux__)
33
- #include <sys/resource.h>
34
- #include <unistd.h>
33
+ #include <sys/resource.h>
34
+ #include <unistd.h>
35
35
  #endif
36
36
 
37
37
  constexpr const char* UNIT_K = "kB";
38
38
  constexpr size_t BYTES_PER_KB = 1024;
39
39
  constexpr const char* MEMORY_STATUS_FILE = "/proc/self/status";
40
- const std::regex VM_RSS_REGEX(R"#(VmRSS:\s*(\d+)\s*([kKmMgG]?B))#",
41
- std::regex_constants::ECMAScript | std::regex_constants::icase);
42
- const std::regex VM_SIZE_REGEX(R"#(VmSize:\s*(\d+)\s*([kKmMgG]?B))#",
43
- std::regex_constants::ECMAScript | std::regex_constants::icase);
40
+ const std::regex VM_RSS_REGEX(
41
+ R"#(VmRSS:\s*(\d+)\s*([kKmMgG]?B))#", std::regex_constants::ECMAScript | std::regex_constants::icase);
42
+ const std::regex VM_SIZE_REGEX(
43
+ R"#(VmSize:\s*(\d+)\s*([kKmMgG]?B))#", std::regex_constants::ECMAScript | std::regex_constants::icase);
44
44
 
45
45
  constexpr int MATCH_GROUP_VALUE = 1;
46
46
  constexpr int MATCH_GROUP_UNIT = 2;
@@ -49,10 +49,9 @@ constexpr int MATCH_GROUP_SIZE = 3;
49
49
  #if defined(_WIN32)
50
50
  MemoryStats GetMemoryStats()
51
51
  {
52
- MemoryStats stats = {0, 0, 0, 0, 0};
52
+ MemoryStats stats = { 0, 0, 0, 0, 0 };
53
53
  PROCESS_MEMORY_COUNTERS_EX pmc;
54
- if (GetProcessMemoryInfo(GetCurrentProcess(),
55
- reinterpret_cast<PROCESS_MEMORY_COUNTERS*>(&pmc), sizeof(pmc))) {
54
+ if (GetProcessMemoryInfo(GetCurrentProcess(), reinterpret_cast<PROCESS_MEMORY_COUNTERS*>(&pmc), sizeof(pmc))) {
56
55
  stats.currentRss = pmc.WorkingSetSize;
57
56
  stats.peakRss = pmc.PeakWorkingSetSize;
58
57
  stats.currentVss = pmc.PrivateUsage; // 私有内存使用量
@@ -66,19 +65,18 @@ MemoryStats GetMemoryStats()
66
65
  #elif defined(__APPLE__)
67
66
  MemoryStats GetMemoryStats()
68
67
  {
69
- MemoryStats stats = {0, 0, 0, 0, 0};
68
+ MemoryStats stats = { 0, 0, 0, 0, 0 };
70
69
  struct rusage ru;
71
70
  if (getrusage(RUSAGE_SELF, &ru) == 0) {
72
- stats.currentRss = 0; // macOS需要专用API获取当前内存
71
+ stats.currentRss = 0; // macOS需要专用API获取当前内存
73
72
  stats.peakRss = ru.ru_maxrss; // macOS返回字节
74
73
  stats.pageFaultsMinor = ru.ru_minflt;
75
74
  stats.pageFaultsMajor = ru.ru_majflt;
76
-
75
+
77
76
  // 获取当前内存使用 (macOS专用API)
78
77
  task_basic_info info;
79
78
  mach_msg_type_number_t count = TASK_BASIC_INFO_64_COUNT;
80
- if (task_info(mach_task_self(), TASK_BASIC_INFO_64,
81
- (task_info_t)&info, &count) == KERN_SUCCESS) {
79
+ if (task_info(mach_task_self(), TASK_BASIC_INFO_64, (task_info_t)&info, &count) == KERN_SUCCESS) {
82
80
  stats.currentRss = info.resident_size; // 物理内存使用量
83
81
  stats.currentVss = info.virtual_size; // 虚拟内存总量
84
82
  }
@@ -89,7 +87,7 @@ MemoryStats GetMemoryStats()
89
87
  #elif defined(__linux__)
90
88
  MemoryStats GetMemoryStats()
91
89
  {
92
- MemoryStats stats = {0, 0, 0, 0, 0};
90
+ MemoryStats stats = { 0, 0, 0, 0, 0 };
93
91
  struct rusage ru;
94
92
  if (getrusage(RUSAGE_SELF, &ru) == 0) {
95
93
  stats.peakRss = static_cast<size_t>(ru.ru_maxrss) * BYTES_PER_KB; // KB -> 字节
@@ -129,13 +127,9 @@ void MemoryTracker::Reset()
129
127
  MemoryStats MemoryTracker::GetDelta()
130
128
  {
131
129
  MemoryStats current = GetMemoryStats();
132
- MemoryStats delta = {
133
- current.currentRss - baseline.currentRss,
134
- current.peakRss - baseline.peakRss,
135
- current.currentVss - baseline.currentVss,
136
- current.pageFaultsMinor - baseline.pageFaultsMinor,
137
- current.pageFaultsMajor - baseline.pageFaultsMajor
138
- };
130
+ MemoryStats delta = { current.currentRss - baseline.currentRss, current.peakRss - baseline.peakRss,
131
+ current.currentVss - baseline.currentVss, current.pageFaultsMinor - baseline.pageFaultsMinor,
132
+ current.pageFaultsMajor - baseline.pageFaultsMajor };
139
133
  return delta;
140
134
  }
141
135
 
@@ -147,13 +141,9 @@ MemoryStats MemoryTracker::MeasureMemory(Func&& func)
147
141
  func();
148
142
  auto postStats = GetMemoryStats();
149
143
 
150
- return {
151
- postStats.currentRss - preStats.currentRss,
152
- postStats.peakRss - preStats.peakRss,
153
- postStats.currentVss - preStats.currentVss,
154
- postStats.pageFaultsMinor - preStats.pageFaultsMinor,
155
- postStats.pageFaultsMajor - preStats.pageFaultsMajor
156
- };
144
+ return { postStats.currentRss - preStats.currentRss, postStats.peakRss - preStats.peakRss,
145
+ postStats.currentVss - preStats.currentVss, postStats.pageFaultsMinor - preStats.pageFaultsMinor,
146
+ postStats.pageFaultsMajor - preStats.pageFaultsMajor };
157
147
  }
158
148
 
159
149
  void MemoryTracker::Report(MemoryStats stats)
@@ -163,9 +153,12 @@ void MemoryTracker::Report(MemoryStats stats)
163
153
  const double mb = kb * BYTES_PER_KB;
164
154
  const double gb = mb * BYTES_PER_KB;
165
155
 
166
- if (bytes > gb) return std::to_string(bytes / gb) + " GB";
167
- if (bytes > mb) return std::to_string(bytes / mb) + " MB";
168
- if (bytes > kb) return std::to_string(bytes / kb) + " KB";
156
+ if (bytes > gb)
157
+ return std::to_string(bytes / gb) + " GB";
158
+ if (bytes > mb)
159
+ return std::to_string(bytes / mb) + " MB";
160
+ if (bytes > kb)
161
+ return std::to_string(bytes / kb) + " KB";
169
162
  return std::to_string(bytes) + " B";
170
163
  };
171
164
 
@@ -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 {
@@ -8,7 +8,7 @@
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
  },
@@ -27,18 +27,9 @@
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-3",
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": {
@@ -47,10 +38,18 @@
47
38
  "@rollup/plugin-node-resolve": "^15.3.0",
48
39
  "@rollup/plugin-terser": "^0.4.4",
49
40
  "@rollup/plugin-typescript": "^11.1.6",
50
- "rimraf": "^6.0.1"
41
+ "rimraf": "^6.0.1",
42
+ "@koalaui/fast-arktsc": "1.7.10+devel",
43
+ "@idlizer/arktscgen": "2.1.10-arktscgen-4",
44
+ "mocha": "^9.2.2",
45
+ "@koalaui/harness": "1.7.10+devel",
46
+ "@koalaui/ets-tsc": "4.9.5-r6",
47
+ "@koalaui/build-common": "1.7.10+devel",
48
+ "node-addon-api": "8.0.0",
49
+ "node-api-headers": "0.0.5"
51
50
  },
52
51
  "scripts": {
53
- "clean": "rimraf build native/build* ./.rollup.cache tsconfig.tsbuildinfo lib",
52
+ "clean": "rimraf generated build native/build* ./.rollup.cache tsconfig.tsbuildinfo lib",
54
53
  "clean:plugins": "rimraf plugins/build",
55
54
  "compile:koala:interop": "npm run --prefix ../../interop compile",
56
55
  "compile:meson": "cd native && meson setup build && meson compile -C build",
@@ -59,14 +58,16 @@
59
58
  "copy:.node": "mkdir -p ./build/native/build && cp ./native/build/es2panda_*.node ./build/native/build",
60
59
  "compile:native": "npm run compile:koala:interop && npm run compile:meson && npm run copy:.node",
61
60
  "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:release": "npm run crosscompile:native && npm run compile:js",
61
+ "compile": "npm run regenerate && npm run compile:native && npm run compile:js",
62
+ "compile:current": "npm run regenerate:current && npm run compile:native && npm run compile:js",
63
+ "compile:release": "npm run regenerate && npm run crosscompile:native && npm run compile:js",
64
64
  "compile:js": "rm -rf lib/ && rollup -c rollup.lib.mjs && rollup -c rollup.es2panda.mjs",
65
65
  "compile:plugins": "rollup -c ./rollup.printer-plugin.mjs",
66
66
  "direct": "fast-arktsc --config arktsconfig.json --compiler ../../incremental/tools/panda/arkts/ui2abc --link-name ./build/abc/main.abc && ninja -f build/abc/build.ninja",
67
67
  "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
68
  "run": "npm run compile && npm run compile:plugins && npm run simultaneous",
69
- "run:memo": "npm run compile && npm run compile:plugins && npm run compile --prefix ../memo-plugin && npm run memo",
69
+ "run:current": "npm run compile:current && npm run compile:plugins && npm run simultaneous",
70
+ "run:memo": "npm run compile && npm run compile:plugins && npm run compile --prefix ../memo-plugin-ng && npm run memo",
70
71
  "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
72
  "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",
72
73
  "test:light": "npm run mocha",
@@ -77,8 +78,11 @@
77
78
  "panda:sdk:clean": "cd ../../incremental/tools/panda && rimraf node_modules",
78
79
  "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
80
  "panda:sdk:reinstall": "npm run panda:sdk:clean && npm run panda:sdk:install",
80
- "regenerate:current": "rimraf -rf src/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",
81
- "regenerate": "rimraf -rf src/generated && arktscgen --panda-sdk-path ${PANDA_SDK_PATH:=$npm_package_config_panda_sdk_path} --output-dir ../ --options-file ./generator/options.json5 --no-initialize",
82
- "reinstall:regenerate": "npm run panda:sdk:reinstall && npm run regenerate && git diff --shortstat"
81
+ "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",
82
+ "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",
83
+ "reinstall:regenerate": "npm run panda:sdk:reinstall && npm run regenerate && git diff --shortstat",
84
+ "format:src:ts": "npx prettier --config .prettierrc --write \"./src/**/*.ts\"",
85
+ "format:generated:ts": "npx prettier --config .prettierrc --write \"./generated/**/*.ts\"",
86
+ "format:ts": "npm run format:src:ts && npm run format:generated:ts"
83
87
  }
84
- }
88
+ }
@@ -23,198 +23,278 @@ import {
23
23
  KDouble,
24
24
  KUInt,
25
25
  KStringArrayPtr,
26
- } from "@koalaui/interop"
27
- import { Es2pandaNativeModule as GeneratedEs2pandaNativeModule, KNativePointerArray } from "./generated/Es2pandaNativeModule"
28
- import * as path from "path"
29
- import * as fs from "fs"
30
- import { Es2pandaPluginDiagnosticType } from "./generated/Es2pandaEnums"
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("Not implemented")
41
+ throw new Error('Not implemented');
38
42
  }
39
43
  _AstNodeRebind(context: KPtr, node: KPtr): void {
40
- throw new Error("Not implemented")
44
+ throw new Error('Not implemented');
41
45
  }
42
46
  _ContextState(context: KPtr): KInt {
43
- throw new Error("Not implemented")
47
+ throw new Error('Not implemented');
44
48
  }
45
49
  _AstNodeChildren(context: KPtr, node: KPtr): KPtr {
46
- throw new Error("Not implemented")
50
+ throw new Error('Not implemented');
47
51
  }
48
52
  _AstNodeDumpModifiers(context: KPtr, node: KPtr): KPtr {
49
- throw new Error("Not implemented")
53
+ throw new Error('Not implemented');
50
54
  }
51
55
  _CreateConfig(argc: number, argv: string[]): KPtr {
52
- throw new Error("Not implemented")
56
+ throw new Error('Not implemented');
53
57
  }
54
58
  _DestroyConfig(peer: KNativePointer): void {
55
- throw new Error("Not implemented")
59
+ throw new Error('Not implemented');
56
60
  }
57
61
  _CreateContextFromString(config: KPtr, source: String, filename: String): KPtr {
58
- throw new Error("Not implemented")
62
+ throw new Error('Not implemented');
59
63
  }
60
64
  _CreateContextFromFile(config: KPtr, filename: String): KPtr {
61
- throw new Error("Not implemented")
65
+ throw new Error('Not implemented');
62
66
  }
63
- _CreateCacheContextFromFile(config: KNativePointer, sourceFileName: String, globalContext: KNativePointer, isExternal: KBoolean): KNativePointer {
64
- throw new Error("Not implemented");
67
+ _CreateCacheContextFromFile(
68
+ config: KNativePointer,
69
+ sourceFileName: String,
70
+ globalContext: KNativePointer,
71
+ isExternal: KBoolean
72
+ ): KNativePointer {
73
+ throw new Error('Not implemented');
65
74
  }
66
75
  _InsertGlobalStructInfo(context: KNativePointer, str: String): void {
67
- throw new Error("Not implemented");
76
+ throw new Error('Not implemented');
68
77
  }
69
78
  _HasGlobalStructInfo(context: KNativePointer, str: String): KBoolean {
70
- throw new Error("Not implemented");
79
+ throw new Error('Not implemented');
71
80
  }
72
- _CreateGlobalContext(config: KNativePointer, externalFileList: KStringArrayPtr, fileNum: KUInt, lspUsage: KBoolean): KNativePointer {
73
- throw new Error("Not implemented");
81
+ _CreateGlobalContext(
82
+ config: KNativePointer,
83
+ externalFileList: KStringArrayPtr,
84
+ fileNum: KUInt,
85
+ lspUsage: KBoolean
86
+ ): KNativePointer {
87
+ throw new Error('Not implemented');
74
88
  }
75
89
  _DestroyGlobalContext(context: KNativePointer): void {
76
- throw new Error("Not implemented");
90
+ throw new Error('Not implemented');
77
91
  }
78
92
  _DestroyContext(context: KPtr): void {
79
- throw new Error("Not implemented")
93
+ throw new Error('Not implemented');
80
94
  }
81
95
  _ProceedToState(context: KPtr, state: number): void {
82
- throw new Error("Not implemented")
96
+ throw new Error('Not implemented');
83
97
  }
84
98
  _CheckerStartChecker(context: KPtr): KBoolean {
85
- throw new Error("Not implemented")
99
+ throw new Error('Not implemented');
86
100
  }
87
101
  _AstNodeVariableConst(context: KPtr, ast: KPtr): KPtr {
88
- throw new Error("Not implemented")
102
+ throw new Error('Not implemented');
89
103
  }
90
104
  _CreateNumberLiteral(context: KPtr, value: KDouble): KPtr {
91
- throw new Error("Not implemented")
105
+ throw new Error('Not implemented');
92
106
  }
93
107
  _AstNodeSetChildrenParentPtr(context: KPtr, node: KPtr): void {
94
- throw new Error("Not implemented")
108
+ throw new Error('Not implemented');
95
109
  }
96
110
  _AstNodeOnUpdate(context: KPtr, newNode: KPtr, replacedNode: KPtr): void {
97
- throw new Error("Not implemented")
111
+ throw new Error('Not implemented');
98
112
  }
99
113
  _AstNodeUpdateAll(context: KPtr, node: KPtr): void {
100
- throw new Error("Not implemented")
114
+ throw new Error('Not implemented');
101
115
  }
102
116
  _VariableDeclaration(context: KPtr, variable: KPtr): KPtr {
103
- throw new Error("Not implemented")
117
+ throw new Error('Not implemented');
104
118
  }
105
119
  _DeclNode(context: KPtr, decl: KPtr): KPtr {
106
- throw new Error("Not implemented")
120
+ throw new Error('Not implemented');
107
121
  }
108
122
  _ProgramSourceFilePath(context: KNativePointer, instance: KNativePointer): KNativePointer {
109
- throw new Error("Not implemented");
123
+ throw new Error('Not implemented');
110
124
  }
111
125
  _ProgramExternalSources(context: KNativePointer, instance: KNativePointer): KNativePointer {
112
- throw new Error("Not implemented");
126
+ throw new Error('Not implemented');
113
127
  }
114
128
  _ProgramDirectExternalSources(context: KNativePointer, instance: KNativePointer): KNativePointer {
115
- throw new Error("Not implemented")
129
+ throw new Error('Not implemented');
116
130
  }
117
131
  _ExternalSourceName(instance: KNativePointer): KNativePointer {
118
- throw new Error("Not implemented");
132
+ throw new Error('Not implemented');
119
133
  }
120
134
  _ExternalSourcePrograms(instance: KNativePointer): KNativePointer {
121
- throw new Error("Not implemented");
135
+ throw new Error('Not implemented');
122
136
  }
123
- _ETSParserBuildImportDeclaration(context: KNativePointer, importKinds: KInt, specifiers: KNativePointerArray, specifiersSequenceLength: KUInt, source: KNativePointer, program: KNativePointer, flags: KInt): KNativePointer {
124
- throw new Error("Not implemented");
137
+ _ETSParserBuildImportDeclaration(
138
+ context: KNativePointer,
139
+ importKinds: KInt,
140
+ specifiers: KNativePointerArray,
141
+ specifiersSequenceLength: KUInt,
142
+ source: KNativePointer,
143
+ program: KNativePointer,
144
+ flags: KInt
145
+ ): KNativePointer {
146
+ throw new Error('Not implemented');
125
147
  }
126
- _ImportPathManagerResolvePathConst(context: KNativePointer, importPathManager: KNativePointer, currentModulePath: String, importPath: String, sourcePosition: KNativePointer): KNativePointer {
127
- throw new Error("Not implemented");
148
+ _ImportPathManagerResolvePathConst(
149
+ context: KNativePointer,
150
+ importPathManager: KNativePointer,
151
+ currentModulePath: String,
152
+ importPath: String,
153
+ sourcePosition: KNativePointer
154
+ ): KNativePointer {
155
+ throw new Error('Not implemented');
128
156
  }
129
157
  _ETSParserGetImportPathManager(context: KNativePointer): KPtr {
130
- throw new Error("Not implemented");
158
+ throw new Error('Not implemented');
131
159
  }
132
160
  _SourcePositionCol(context: KNativePointer, instance: KNativePointer): KUInt {
133
- throw new Error("Not implemented");
161
+ throw new Error('Not implemented');
134
162
  }
135
163
  _ConfigGetOptions(config: KNativePointer): KNativePointer {
136
- throw new Error("Not implemented");
164
+ throw new Error('Not implemented');
137
165
  }
138
166
  _OptionsArkTsConfig(context: KNativePointer, options: KNativePointer): KNativePointer {
139
- throw new Error("Not implemented");
167
+ throw new Error('Not implemented');
140
168
  }
141
169
  _Checker_CreateOpaqueTypeNode(context: KNativePointer, type: KNativePointer): KNativePointer {
142
- throw new Error("Not implemented");
170
+ throw new Error('Not implemented');
143
171
  }
144
172
  _Checker_ScriptFunctionSignature(context: KNativePointer, node: KNativePointer): KNativePointer {
145
- throw new Error("Not implemented");
173
+ throw new Error('Not implemented');
146
174
  }
147
- _Checker_ScriptFunctionSetSignature(context: KNativePointer, node: KNativePointer, signature: KNativePointer): void {
148
- throw new Error("Not implemented");
175
+ _Checker_ScriptFunctionSetSignature(
176
+ context: KNativePointer,
177
+ node: KNativePointer,
178
+ signature: KNativePointer
179
+ ): void {
180
+ throw new Error('Not implemented');
149
181
  }
150
182
  _Checker_SignatureReturnType(context: KNativePointer, signature: KNativePointer): KNativePointer {
151
- throw new Error("Not implemented");
183
+ throw new Error('Not implemented');
152
184
  }
153
185
  _Checker_ScriptFunctionGetPreferredReturnType(context: KNativePointer, node: KNativePointer): KNativePointer {
154
- throw new Error("Not implemented");
186
+ throw new Error('Not implemented');
155
187
  }
156
- _Checker_ScriptFunctionSetPreferredReturnType(context: KNativePointer, node: KNativePointer, type: KNativePointer): void {
157
- throw new Error("Not implemented");
188
+ _Checker_ScriptFunctionSetPreferredReturnType(
189
+ context: KNativePointer,
190
+ node: KNativePointer,
191
+ type: KNativePointer
192
+ ): void {
193
+ throw new Error('Not implemented');
158
194
  }
159
195
  _Checker_ExpressionGetPreferredType(context: KNativePointer, node: KNativePointer): KNativePointer {
160
- throw new Error("Not implemented");
196
+ throw new Error('Not implemented');
161
197
  }
162
198
  _Checker_ExpressionSetPreferredType(context: KNativePointer, node: KNativePointer, type: KNativePointer): void {
163
- throw new Error("Not implemented");
199
+ throw new Error('Not implemented');
164
200
  }
165
201
  _Checker_TypeToString(context: KNativePointer, type: KNativePointer): KNativePointer {
166
- throw new Error("Not implemented");
202
+ throw new Error('Not implemented');
167
203
  }
168
204
  _Checker_TypeClone(context: KNativePointer, type: KNativePointer): KNativePointer {
169
- throw new Error("Not implemented");
205
+ throw new Error('Not implemented');
170
206
  }
171
207
  _Checker_TypeNodeGetType(context: KNativePointer, node: KNativePointer): KNativePointer {
172
- throw new Error("Not implemented");
208
+ throw new Error('Not implemented');
173
209
  }
174
- _ScriptFunctionSetParams(context: KNativePointer, receiver: KNativePointer, paramsList: BigUint64Array, paramsListLength: KUInt): void {
175
- throw new Error("Not implemented")
210
+ _ScriptFunctionSetParams(
211
+ context: KNativePointer,
212
+ receiver: KNativePointer,
213
+ paramsList: BigUint64Array,
214
+ paramsListLength: KUInt
215
+ ): void {
216
+ throw new Error('Not implemented');
176
217
  }
177
- _ClassDefinitionSetBody(context: KNativePointer, receiver: KNativePointer, body: BigUint64Array, bodyLength: KUInt): void {
178
- throw new Error("Not implemented")
218
+ _ClassDefinitionSetBody(
219
+ context: KNativePointer,
220
+ receiver: KNativePointer,
221
+ body: BigUint64Array,
222
+ bodyLength: KUInt
223
+ ): void {
224
+ throw new Error('Not implemented');
225
+ }
226
+ _FilterNodes(context: KNativePointer, root: KNativePointer, filters: KStringPtr): KNativePointer {
227
+ throw new Error('Not implemented');
179
228
  }
180
229
 
181
230
  // From koala-wrapper
182
231
  _ClassVariableDeclaration(context: KNativePointer, classInstance: KNativePointer): KNativePointer {
183
- throw new Error("Not implemented")
232
+ throw new Error('Not implemented');
184
233
  }
185
234
  _ETSParserGetGlobalProgramAbsName(context: KNativePointer): KNativePointer {
186
- throw new Error("Not implemented")
235
+ throw new Error('Not implemented');
187
236
  }
188
- _CreateDiagnosticKind(context: KNativePointer, message: string, type: Es2pandaPluginDiagnosticType): KNativePointer {
189
- throw new Error("Not implemented")
237
+ _CreateDiagnosticKind(
238
+ context: KNativePointer,
239
+ message: string,
240
+ type: Es2pandaPluginDiagnosticType
241
+ ): KNativePointer {
242
+ throw new Error('Not implemented');
190
243
  }
191
- _CreateDiagnosticInfo(context: KNativePointer, kind: KNativePointer, args: string[], argc: number, pos: KNativePointer): KNativePointer {
192
- throw new Error("Not implemented")
244
+ _CreateDiagnosticInfo(
245
+ context: KNativePointer,
246
+ kind: KNativePointer,
247
+ args: string[],
248
+ argc: number,
249
+ pos: KNativePointer
250
+ ): KNativePointer {
251
+ throw new Error('Not implemented');
193
252
  }
194
- _CreateSuggestionInfo(context: KNativePointer, kind: KNativePointer, args: string[],
195
- argc: number, substitutionCode: string, title: string, range: KNativePointer): KNativePointer {
196
- throw new Error("Not implemented")
253
+ _CreateSuggestionInfo(
254
+ context: KNativePointer,
255
+ kind: KNativePointer,
256
+ args: string[],
257
+ argc: number,
258
+ substitutionCode: string,
259
+ title: string,
260
+ range: KNativePointer
261
+ ): KNativePointer {
262
+ throw new Error('Not implemented');
197
263
  }
198
- _LogDiagnostic(context: KNativePointer, kind: KNativePointer, argv: string[], argc: number, pos: KNativePointer): void {
199
- throw new Error("Not implemented")
264
+ _LogDiagnostic(
265
+ context: KNativePointer,
266
+ kind: KNativePointer,
267
+ argv: string[],
268
+ argc: number,
269
+ pos: KNativePointer
270
+ ): void {
271
+ throw new Error('Not implemented');
200
272
  }
201
273
  _SetUpSoPath(soPath: string): void {
202
- throw new Error("Not implemented")
274
+ throw new Error('Not implemented');
203
275
  }
204
276
  _MemInitialize(): void {
205
- throw new Error("Not implemented")
277
+ throw new Error('Not implemented');
206
278
  }
207
279
  _MemFinalize(): void {
208
- throw new Error("Not implemented")
280
+ throw new Error('Not implemented');
209
281
  }
210
282
  _ProgramCanSkipPhases(context: KNativePointer, program: KNativePointer): boolean {
211
- throw new Error("Not implemented")
283
+ throw new Error('Not implemented');
212
284
  }
213
- _GenerateTsDeclarationsFromContext(config: KPtr, outputDeclEts: String, outputEts: String, exportAll: KBoolean, isolated: KBoolean, recordFile: String): KPtr {
214
- throw new Error("Not implemented")
285
+ _GenerateTsDeclarationsFromContext(
286
+ config: KPtr,
287
+ outputDeclEts: String,
288
+ outputEts: String,
289
+ exportAll: KBoolean,
290
+ isolated: KBoolean,
291
+ recordFile: String,
292
+ genAnnotations: KBoolean
293
+ ): KPtr {
294
+ throw new Error('Not implemented');
215
295
  }
216
296
  _AstNodeProgram(context: KNativePointer, instance: KNativePointer): KNativePointer {
217
- throw new Error("Not implemented")
297
+ throw new Error('Not implemented');
218
298
  }
219
299
  _CreateContextGenerateAbcForExternalSourceFiles(config: KPtr, fileCount: KInt, filenames: string[]): KPtr {
220
300
  throw new Error('Not implemented');
@@ -242,33 +322,29 @@ export class Es2pandaNativeModule {
242
322
  }
243
323
 
244
324
  export function findNativeModule(): string {
245
- const candidates = [
246
- path.resolve(__dirname, "../native/build"),
247
- path.resolve(__dirname, "../build/native/build"),
248
- ]
249
- let result = undefined
250
- candidates.forEach(path => {
325
+ const candidates = [path.resolve(__dirname, '../native/build'), path.resolve(__dirname, '../build/native/build')];
326
+ let result = undefined;
327
+ candidates.forEach((path) => {
251
328
  if (fs.existsSync(path)) {
252
- result = path
253
- return
329
+ result = path;
330
+ return;
254
331
  }
255
- })
256
- if (result)
257
- return path.join(result, "es2panda")
258
- throw new Error("Cannot find native module")
332
+ });
333
+ if (result) return path.join(result, 'es2panda');
334
+ throw new Error('Cannot find native module');
259
335
  }
260
336
 
261
337
  export function initEs2panda(): Es2pandaNativeModule {
262
- registerNativeModuleLibraryName("NativeModule", findNativeModule())
263
- const instance = new Es2pandaNativeModule()
264
- loadNativeModuleLibrary("NativeModule", instance)
265
- return instance
338
+ registerNativeModuleLibraryName('NativeModule', findNativeModule());
339
+ const instance = new Es2pandaNativeModule();
340
+ loadNativeModuleLibrary('NativeModule', instance);
341
+ return instance;
266
342
  }
267
343
 
268
344
  export function initGeneratedEs2panda(): GeneratedEs2pandaNativeModule {
269
- registerNativeModuleLibraryName("NativeModule", findNativeModule())
270
- const instance = new GeneratedEs2pandaNativeModule()
345
+ registerNativeModuleLibraryName('NativeModule', findNativeModule());
346
+ const instance = new GeneratedEs2pandaNativeModule();
271
347
  // registerNativeModule("InteropNativeModule", NativeModule)
272
- loadNativeModuleLibrary("NativeModule", instance)
273
- return instance
348
+ loadNativeModuleLibrary('NativeModule', instance);
349
+ return instance;
274
350
  }