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

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 (229) hide show
  1. package/build/libarkts-copy/generator/options.json5 +89 -6
  2. package/build/libarkts-copy/native/meson.build +1 -0
  3. package/build/libarkts-copy/native/src/bridges.cc +10 -4
  4. package/build/libarkts-copy/native/src/common.cc +0 -12
  5. package/build/libarkts-copy/native/src/generated/bridges.cc +416 -723
  6. package/build/libarkts-copy/native/src/memoryTracker.cc +178 -0
  7. package/build/libarkts-copy/native/src/memoryTracker.h +52 -0
  8. package/build/libarkts-copy/package.json +8 -8
  9. package/build/libarkts-copy/src/Es2pandaNativeModule.ts +14 -2
  10. package/build/libarkts-copy/src/arkts-api/class-by-peer.ts +2 -2
  11. package/build/libarkts-copy/src/arkts-api/index.ts +2 -1
  12. package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +1 -1
  13. package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +4 -1
  14. package/{templates/node-map.ts → build/libarkts-copy/src/arkts-api/peers/DiagnosticKind.ts} +8 -19
  15. package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +26 -9
  16. package/build/libarkts-copy/src/arkts-api/utilities/performance.ts +309 -0
  17. package/build/libarkts-copy/src/arkts-api/utilities/private.ts +7 -21
  18. package/build/libarkts-copy/src/arkts-api/utilities/public.ts +61 -7
  19. package/build/libarkts-copy/src/arkts-api/visitor.ts +21 -14
  20. package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +1 -0
  21. package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +88 -172
  22. package/build/libarkts-copy/src/generated/factory.ts +2 -3
  23. package/build/libarkts-copy/src/generated/peers/AnnotatedAstNode.ts +0 -1
  24. package/build/libarkts-copy/src/generated/peers/AnnotatedExpression.ts +0 -1
  25. package/build/libarkts-copy/src/generated/peers/AnnotatedStatement.ts +0 -1
  26. package/build/libarkts-copy/src/generated/peers/AnnotationDeclaration.ts +11 -13
  27. package/build/libarkts-copy/src/generated/peers/AnnotationUsage.ts +1 -2
  28. package/build/libarkts-copy/src/generated/peers/ArkTsConfig.ts +3 -1
  29. package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +0 -5
  30. package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +12 -14
  31. package/build/libarkts-copy/src/generated/peers/AssertStatement.ts +0 -1
  32. package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +0 -1
  33. package/build/libarkts-copy/src/generated/peers/AstDumper.ts +0 -1
  34. package/build/libarkts-copy/src/generated/peers/AstVerifier.ts +0 -1
  35. package/build/libarkts-copy/src/generated/peers/AstVisitor.ts +0 -1
  36. package/build/libarkts-copy/src/generated/peers/AwaitExpression.ts +0 -1
  37. package/build/libarkts-copy/src/generated/peers/BigIntLiteral.ts +0 -1
  38. package/build/libarkts-copy/src/generated/peers/BinaryExpression.ts +0 -1
  39. package/build/libarkts-copy/src/generated/peers/BindingProps.ts +0 -1
  40. package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +0 -1
  41. package/build/libarkts-copy/src/generated/peers/BlockStatement.ts +0 -1
  42. package/build/libarkts-copy/src/generated/peers/BooleanLiteral.ts +0 -1
  43. package/build/libarkts-copy/src/generated/peers/BreakStatement.ts +1 -2
  44. package/build/libarkts-copy/src/generated/peers/CallExpression.ts +6 -2
  45. package/build/libarkts-copy/src/generated/peers/CatchClause.ts +0 -1
  46. package/build/libarkts-copy/src/generated/peers/ChainExpression.ts +0 -1
  47. package/build/libarkts-copy/src/generated/peers/CharLiteral.ts +0 -1
  48. package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +1 -24
  49. package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +26 -20
  50. package/build/libarkts-copy/src/generated/peers/ClassElement.ts +2 -30
  51. package/build/libarkts-copy/src/generated/peers/ClassExpression.ts +1 -2
  52. package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +10 -12
  53. package/build/libarkts-copy/src/generated/peers/ClassStaticBlock.ts +1 -2
  54. package/build/libarkts-copy/src/generated/peers/CodeGen.ts +0 -1
  55. package/build/libarkts-copy/src/generated/peers/ConditionalExpression.ts +0 -1
  56. package/build/libarkts-copy/src/generated/peers/ContinueStatement.ts +1 -2
  57. package/build/libarkts-copy/src/generated/peers/DebuggerStatement.ts +0 -1
  58. package/build/libarkts-copy/src/generated/peers/Declaration.ts +0 -1
  59. package/build/libarkts-copy/src/generated/peers/Decorator.ts +0 -1
  60. package/build/libarkts-copy/src/generated/peers/DiagnosticInfo.ts +0 -1
  61. package/build/libarkts-copy/src/generated/peers/DirectEvalExpression.ts +0 -1
  62. package/build/libarkts-copy/src/generated/peers/DoWhileStatement.ts +0 -1
  63. package/build/libarkts-copy/src/generated/peers/DynamicImportData.ts +0 -1
  64. package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +0 -1
  65. package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +9 -3
  66. package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +0 -1
  67. package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +0 -1
  68. package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +0 -1
  69. package/build/libarkts-copy/src/generated/peers/ETSModule.ts +12 -14
  70. package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +0 -1
  71. package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +0 -1
  72. package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +0 -1
  73. package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +0 -1
  74. package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +0 -1
  75. package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +13 -15
  76. package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +0 -1
  77. package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +1 -2
  78. package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +0 -1
  79. package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +0 -1
  80. package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +0 -1
  81. package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +2 -3
  82. package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +3 -4
  83. package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +0 -1
  84. package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +0 -1
  85. package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +1 -2
  86. package/build/libarkts-copy/src/generated/peers/EmptyStatement.ts +0 -1
  87. package/build/libarkts-copy/src/generated/peers/ErrorLogger.ts +0 -1
  88. package/build/libarkts-copy/src/generated/peers/ExportAllDeclaration.ts +2 -3
  89. package/build/libarkts-copy/src/generated/peers/ExportDefaultDeclaration.ts +0 -1
  90. package/build/libarkts-copy/src/generated/peers/ExportNamedDeclaration.ts +2 -3
  91. package/build/libarkts-copy/src/generated/peers/ExportSpecifier.ts +2 -3
  92. package/build/libarkts-copy/src/generated/peers/Expression.ts +0 -1
  93. package/build/libarkts-copy/src/generated/peers/ExpressionStatement.ts +0 -1
  94. package/build/libarkts-copy/src/generated/peers/ForInStatement.ts +0 -1
  95. package/build/libarkts-copy/src/generated/peers/ForOfStatement.ts +0 -1
  96. package/build/libarkts-copy/src/generated/peers/ForUpdateStatement.ts +0 -1
  97. package/build/libarkts-copy/src/generated/peers/FunctionDeclaration.ts +10 -16
  98. package/build/libarkts-copy/src/generated/peers/FunctionExpression.ts +2 -3
  99. package/build/libarkts-copy/src/generated/peers/FunctionSignature.ts +2 -2
  100. package/build/libarkts-copy/src/generated/peers/IRNode.ts +0 -1
  101. package/build/libarkts-copy/src/generated/peers/Identifier.ts +0 -10
  102. package/build/libarkts-copy/src/generated/peers/IfStatement.ts +0 -1
  103. package/build/libarkts-copy/src/generated/peers/ImportDeclaration.ts +1 -2
  104. package/build/libarkts-copy/src/generated/peers/ImportDefaultSpecifier.ts +1 -2
  105. package/build/libarkts-copy/src/generated/peers/ImportExpression.ts +0 -1
  106. package/build/libarkts-copy/src/generated/peers/ImportNamespaceSpecifier.ts +1 -2
  107. package/build/libarkts-copy/src/generated/peers/ImportSource.ts +0 -1
  108. package/build/libarkts-copy/src/generated/peers/ImportSpecifier.ts +2 -3
  109. package/build/libarkts-copy/src/generated/peers/IndexInfo.ts +0 -1
  110. package/build/libarkts-copy/src/generated/peers/LabelPair.ts +0 -1
  111. package/build/libarkts-copy/src/generated/peers/LabelledStatement.ts +1 -2
  112. package/build/libarkts-copy/src/generated/peers/Literal.ts +0 -1
  113. package/build/libarkts-copy/src/generated/peers/LoopStatement.ts +0 -1
  114. package/build/libarkts-copy/src/generated/peers/MaybeOptionalExpression.ts +0 -1
  115. package/build/libarkts-copy/src/generated/peers/MemberExpression.ts +0 -1
  116. package/build/libarkts-copy/src/generated/peers/MetaProperty.ts +0 -1
  117. package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +5 -6
  118. package/build/libarkts-copy/src/generated/peers/NamedType.ts +2 -3
  119. package/build/libarkts-copy/src/generated/peers/NewExpression.ts +0 -1
  120. package/build/libarkts-copy/src/generated/peers/NullLiteral.ts +0 -1
  121. package/build/libarkts-copy/src/generated/peers/NumberLiteral.ts +0 -1
  122. package/build/libarkts-copy/src/generated/peers/ObjectDescriptor.ts +0 -1
  123. package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +0 -5
  124. package/build/libarkts-copy/src/generated/peers/OmittedExpression.ts +0 -1
  125. package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +0 -1
  126. package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +0 -1
  127. package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +0 -1
  128. package/build/libarkts-copy/src/generated/peers/Program.ts +9 -2
  129. package/build/libarkts-copy/src/generated/peers/Property.ts +0 -1
  130. package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +0 -1
  131. package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +0 -1
  132. package/build/libarkts-copy/src/generated/peers/ScopeFindResult.ts +0 -1
  133. package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +22 -19
  134. package/build/libarkts-copy/src/generated/peers/ScriptFunctionData.ts +0 -1
  135. package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +0 -1
  136. package/build/libarkts-copy/src/generated/peers/SignatureInfo.ts +0 -1
  137. package/build/libarkts-copy/src/generated/peers/SourcePosition.ts +2 -1
  138. package/build/libarkts-copy/src/generated/peers/SourceRange.ts +0 -1
  139. package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +0 -5
  140. package/build/libarkts-copy/src/generated/peers/SrcDumper.ts +0 -1
  141. package/build/libarkts-copy/src/generated/peers/Statement.ts +0 -1
  142. package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +0 -1
  143. package/build/libarkts-copy/src/generated/peers/SuggestionInfo.ts +0 -1
  144. package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +0 -1
  145. package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +0 -1
  146. package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +1 -2
  147. package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +0 -1
  148. package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +0 -1
  149. package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +0 -1
  150. package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +0 -1
  151. package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +0 -1
  152. package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +1 -2
  153. package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +0 -1
  154. package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +1 -2
  155. package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +2 -25
  156. package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +0 -1
  157. package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +0 -1
  158. package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +1 -2
  159. package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +1 -2
  160. package/build/libarkts-copy/src/generated/peers/TSImportType.ts +1 -2
  161. package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +0 -1
  162. package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +0 -1
  163. package/build/libarkts-copy/src/generated/peers/TSInferType.ts +1 -2
  164. package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +0 -1
  165. package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +14 -38
  166. package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +0 -1
  167. package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +0 -1
  168. package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +0 -1
  169. package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +1 -2
  170. package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +1 -2
  171. package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +0 -1
  172. package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +0 -1
  173. package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +0 -1
  174. package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +0 -1
  175. package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +0 -1
  176. package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +0 -1
  177. package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +0 -1
  178. package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +0 -1
  179. package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +0 -1
  180. package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +0 -1
  181. package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +0 -1
  182. package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +2 -3
  183. package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +1 -2
  184. package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +0 -1
  185. package/build/libarkts-copy/src/generated/peers/TSThisType.ts +0 -1
  186. package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +0 -1
  187. package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +26 -40
  188. package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +0 -1
  189. package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +0 -1
  190. package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +0 -1
  191. package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +11 -13
  192. package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +1 -2
  193. package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +0 -1
  194. package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +0 -1
  195. package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +0 -1
  196. package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +2 -3
  197. package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +0 -1
  198. package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +0 -1
  199. package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +0 -1
  200. package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +0 -1
  201. package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +2 -3
  202. package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +0 -1
  203. package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +1 -2
  204. package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +0 -1
  205. package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +0 -1
  206. package/build/libarkts-copy/src/generated/peers/TryStatement.ts +1 -2
  207. package/build/libarkts-copy/src/generated/peers/TypeNode.ts +10 -12
  208. package/build/libarkts-copy/src/generated/peers/TypedAstNode.ts +0 -1
  209. package/build/libarkts-copy/src/generated/peers/TypedStatement.ts +0 -1
  210. package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +0 -1
  211. package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +0 -1
  212. package/build/libarkts-copy/src/generated/peers/UndefinedLiteral.ts +0 -1
  213. package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +0 -1
  214. package/build/libarkts-copy/src/generated/peers/VReg.ts +0 -1
  215. package/build/libarkts-copy/src/generated/peers/ValidationInfo.ts +0 -1
  216. package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +11 -20
  217. package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +0 -1
  218. package/build/libarkts-copy/src/generated/peers/VerificationContext.ts +0 -1
  219. package/build/libarkts-copy/src/generated/peers/VerifierMessage.ts +0 -1
  220. package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +0 -1
  221. package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +0 -1
  222. package/build/libarkts-copy/src/index.ts +2 -1
  223. package/build/libarkts-copy/src/plugin-utils.ts +0 -10
  224. package/build/libarkts-copy/src/reexport-for-generated.ts +1 -20
  225. package/lib/index.js +115 -38
  226. package/package.json +4 -3
  227. package/templates/factory.ts +0 -1
  228. package/templates/peer.ts +0 -1
  229. package/build/libarkts-copy/src/arkts-api/ChainExpressionFilter.ts +0 -79
@@ -87,7 +87,25 @@
87
87
  interface: "es2panda_Impl",
88
88
  methods: [
89
89
  "LogSyntaxError", "LogWarning", "LogTypeError", // wrong idl
90
- "DestroyContext", // cleanup arena (Improve: move this cleanup to another method)
90
+ "DestroyContext", // cleanup arena (Improve: move this cleanup to another method)
91
+
92
+ // Handwritten bridges
93
+ "AstNodeRebind",
94
+ "ConfigGetOptions",
95
+ "CreateCacheContextFromFile",
96
+ "CreateContextFromFile",
97
+ "CreateContextFromString",
98
+ "CreateContextGenerateAbcForExternalSourceFiles",
99
+ "CreateDiagnosticInfo",
100
+ "CreateDiagnosticKind",
101
+ "CreateGlobalContext",
102
+ "CreateSuggestionInfo",
103
+ "DestroyGlobalContext",
104
+ "SourcePositionCol",
105
+ "ExternalSourceName",
106
+ "ExternalSourcePrograms",
107
+ "GenerateTsDeclarationsFromContext",
108
+ "LogDiagnostic",
91
109
  ],
92
110
  },
93
111
  {
@@ -96,6 +114,46 @@
96
114
  "GetOverloadInfo", // return type is wrong
97
115
  ]
98
116
  },
117
+ {
118
+ interface: "Decl", // handwritten bridge
119
+ methods: [
120
+ "Node"
121
+ ]
122
+ },
123
+ {
124
+ interface: "ETSParser", // handwritten bridge
125
+ methods: [
126
+ "BuildImportDeclaration",
127
+ "CreateExpression",
128
+ "GetGlobalProgramAbsName",
129
+ "GetImportPathManager",
130
+ ]
131
+ },
132
+ {
133
+ interface: "Program", // handwritten bridge
134
+ methods: [
135
+ "DirectExternalSources",
136
+ "ExternalSources",
137
+ ]
138
+ },
139
+ {
140
+ interface: "Scope", // handwritten bridge
141
+ methods: [
142
+ "SetParent",
143
+ ]
144
+ },
145
+ {
146
+ interface: "Signature", // handwritten bridge
147
+ methods: [
148
+ "Function",
149
+ ]
150
+ },
151
+ {
152
+ interface: "TSInterfaceBody", // handwritten bridge
153
+ methods: [
154
+ "BodyPtr",
155
+ ]
156
+ },
99
157
  {
100
158
  interface: "AnnotationDeclaration",
101
159
  methods: [
@@ -192,10 +250,14 @@
192
250
  {
193
251
  name: "ArrowFunctionExpression",
194
252
  methods: [
253
+ {
254
+ name: "Function",
255
+ types: ["returnType"]
256
+ },
195
257
  {
196
258
  name: "FunctionConst",
197
259
  types: ["returnType"]
198
- }
260
+ },
199
261
  ]
200
262
  },
201
263
  {
@@ -281,6 +343,10 @@
281
343
  {
282
344
  name: "MethodDefinition",
283
345
  methods: [
346
+ {
347
+ name: "Function",
348
+ types: ["returnType"]
349
+ },
284
350
  {
285
351
  name: "FunctionConst",
286
352
  types: ["returnType"]
@@ -358,6 +424,10 @@
358
424
  name: "setSignaturePointer",
359
425
  definition: "extension_ScriptFunctionSetSignaturePointer",
360
426
  },
427
+ {
428
+ name: "getParamsCasted",
429
+ definition: "extension_ScriptFunctionGetParamsCasted",
430
+ },
361
431
  {
362
432
  name: "getPreferredReturnTypePointer",
363
433
  definition: "extension_ScriptFunctionGetPreferredReturnTypePointer",
@@ -366,10 +436,6 @@
366
436
  name: "setPreferredReturnTypePointer",
367
437
  definition: "extension_ScriptFunctionSetPreferredReturnTypePointer",
368
438
  },
369
- {
370
- name: "setParams",
371
- definition: "extension_ScriptFunctionSetParams",
372
- },
373
439
  ]
374
440
  },
375
441
  {
@@ -397,6 +463,10 @@
397
463
  {
398
464
  interface: "Program",
399
465
  methods: [
466
+ {
467
+ name: "getAstCasted",
468
+ definition: "extension_ProgramGetAstCasted",
469
+ },
400
470
  {
401
471
  name: "getExternalSources",
402
472
  definition: "extension_ProgramGetExternalSources",
@@ -414,6 +484,10 @@
414
484
  name: "getCol",
415
485
  definition: "extension_SourcePositionGetCol",
416
486
  },
487
+ {
488
+ name: "getIndex",
489
+ definition: "extension_SourcePositionGetIndex",
490
+ },
417
491
  {
418
492
  name: "toString",
419
493
  definition: "extension_SourcePositionToString",
@@ -429,6 +503,15 @@
429
503
  },
430
504
  ],
431
505
  },
506
+ {
507
+ interface: "ETSFunctionType",
508
+ methods: [
509
+ {
510
+ name: "getParamsCasted",
511
+ definition: "extension_ETSFunctionTypeGetParamsCasted",
512
+ },
513
+ ],
514
+ },
432
515
  ],
433
516
  parameters: [
434
517
  {
@@ -24,6 +24,7 @@ is_cross = get_option('cross_compile')
24
24
 
25
25
  sources = [
26
26
  './src/common.cc',
27
+ './src/memoryTracker.cc',
27
28
  './src/bridges.cc',
28
29
  './src/generated/bridges.cc',
29
30
  get_option('interop_src_dir') / 'common-interop.cc',
@@ -19,6 +19,10 @@
19
19
  #include <string>
20
20
  #include <mutex>
21
21
 
22
+ /** XXX: If you add or remove methods that exist in C API,
23
+ * please change generator/options.json5 accordingly.
24
+ */
25
+
22
26
  KNativePointer impl_AstNodeRebind(KNativePointer contextPtr, KNativePointer nodePtr)
23
27
  {
24
28
  auto context = reinterpret_cast<es2panda_Context*>(contextPtr);
@@ -433,10 +437,11 @@ KOALA_INTEROP_5(CreateDiagnosticInfo, KNativePointer, KNativePointer, KNativePoi
433
437
  KStringArray, KInt, KNativePointer)
434
438
 
435
439
  KNativePointer impl_CreateSuggestionInfo(KNativePointer context, KNativePointer kind, KStringArray argsPtr,
436
- KInt argc, KStringPtr& substitutionCode, KNativePointer range)
440
+ KInt argc, KStringPtr& substitutionCode, KStringPtr& title, KNativePointer range)
437
441
  {
438
442
  const auto _context = reinterpret_cast<es2panda_Context*>(context);
439
443
  const auto _kind = reinterpret_cast<es2panda_DiagnosticKind *>(kind);
444
+ const auto _title = getStringCopy(title);
440
445
  const auto _range = reinterpret_cast<es2panda_SourceRange *>(range);
441
446
  const std::size_t headerLen = 4;
442
447
  const char** _args = new const char*[argc];
@@ -449,9 +454,10 @@ KNativePointer impl_CreateSuggestionInfo(KNativePointer context, KNativePointer
449
454
  position += strLen;
450
455
  }
451
456
  const auto _substitutionCode = getStringCopy(substitutionCode);
452
- return GetImpl()->CreateSuggestionInfo(_context, _kind, _args, argc, _substitutionCode, _range);
457
+ return GetImpl()->CreateSuggestionInfo(_context, _kind, _args, argc, _substitutionCode, _title, _range);
453
458
  }
454
- KOALA_INTEROP_6(CreateSuggestionInfo, KNativePointer, KNativePointer, KNativePointer, KStringArray, KInt, KStringPtr, KNativePointer)
459
+ KOALA_INTEROP_7(CreateSuggestionInfo, KNativePointer, KNativePointer, KNativePointer, KStringArray, KInt,
460
+ KStringPtr, KStringPtr, KNativePointer)
455
461
 
456
462
  void impl_LogDiagnostic(KNativePointer context, KNativePointer kind, KStringArray argvPtr,
457
463
  KInt argc, KNativePointer pos)
@@ -538,4 +544,4 @@ KNativePointer impl_CreateTypeNodeFromTsType(KNativePointer context, KNativePoin
538
544
  auto _typeAnnotation = GetImpl()->CreateOpaqueTypeNode(_context, _nodeTsType);
539
545
  return _typeAnnotation;
540
546
  }
541
- KOALA_INTEROP_2(CreateTypeNodeFromTsType, KNativePointer, KNativePointer, KNativePointer);
547
+ KOALA_INTEROP_2(CreateTypeNodeFromTsType, KNativePointer, KNativePointer, KNativePointer);
@@ -268,18 +268,6 @@ KInt impl_IdentifierIdentifierFlags(KNativePointer contextPtr, KNativePointer no
268
268
  }
269
269
  KOALA_INTEROP_2(IdentifierIdentifierFlags, KInt, KNativePointer, KNativePointer)
270
270
 
271
- void impl_ScriptFunctionSetParams(KNativePointer context, KNativePointer receiver, KNativePointerArray paramsList, KUInt paramsListLength) {
272
- const auto _context = reinterpret_cast<es2panda_Context*>(context);
273
- const auto _receiver = reinterpret_cast<es2panda_AstNode*>(receiver);
274
- const auto _paramsList = reinterpret_cast<es2panda_AstNode**>(paramsList);
275
- const auto _paramsListLength = static_cast<KUInt>(paramsListLength);
276
- GetImpl()->ScriptFunctionClearParams(_context, _receiver);
277
- for (size_t i = 0; i < _paramsListLength; i++) {
278
- GetImpl()->ScriptFunctionEmplaceParams(_context, _receiver, _paramsList[i]);
279
- }
280
- }
281
- KOALA_INTEROP_V4(ScriptFunctionSetParams, KNativePointer, KNativePointer, KNativePointerArray, KUInt)
282
-
283
271
  void impl_ClassDefinitionSetBody(KNativePointer context, KNativePointer receiver, KNativePointerArray body, KUInt bodyLength) {
284
272
  const auto _context = reinterpret_cast<es2panda_Context*>(context);
285
273
  const auto _receiver = reinterpret_cast<es2panda_AstNode*>(receiver);