@idlizer/arktscgen 2.1.9-arktscgen-5 → 2.1.9-arktscgen-8
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 +151 -0
- package/build/libarkts-copy/native/meson.build +11 -12
- package/build/libarkts-copy/native/meson_options.txt +1 -1
- package/build/libarkts-copy/native/mingw.cross +14 -0
- package/build/libarkts-copy/native/src/bridges.cc +77 -1
- package/build/libarkts-copy/native/src/common.cc +5 -5
- package/build/libarkts-copy/native/src/generated/bridges.cc +312 -33
- package/build/libarkts-copy/package.json +24 -20
- package/build/libarkts-copy/src/Es2pandaNativeModule.ts +19 -1
- package/build/libarkts-copy/src/arkts-api/ChainExpressionFilter.ts +2 -1
- package/build/libarkts-copy/src/arkts-api/ImportStorage.ts +18 -12
- package/build/libarkts-copy/src/arkts-api/ProgramProvider.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/factory/nodeFactory.ts +15 -26
- package/build/libarkts-copy/src/arkts-api/index.ts +2 -4
- package/build/libarkts-copy/src/arkts-api/node-utilities/BlockStatement.ts +0 -4
- package/build/libarkts-copy/src/arkts-api/node-utilities/CallExpression.ts +1 -22
- package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDefinition.ts +7 -8
- package/build/libarkts-copy/src/arkts-api/node-utilities/ClassProperty.ts +1 -22
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSFunctionType.ts +2 -5
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSImportDeclaration.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSModule.ts +44 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ETSParameterExpression.ts +1 -4
- package/build/libarkts-copy/src/arkts-api/node-utilities/MethodDefinition.ts +3 -7
- package/build/libarkts-copy/src/arkts-api/node-utilities/ObjectExpression.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/node-utilities/Program.ts +10 -0
- package/build/libarkts-copy/src/arkts-api/node-utilities/ScriptFunction.ts +11 -7
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +3 -6
- package/build/libarkts-copy/src/arkts-api/peers/AstNode.ts +13 -12
- package/build/libarkts-copy/src/arkts-api/peers/Config.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/peers/Context.ts +35 -4
- package/build/libarkts-copy/src/arkts-api/plugins.ts +12 -3
- package/build/libarkts-copy/src/arkts-api/static/global.ts +2 -2
- package/build/libarkts-copy/src/{wrapper-compat/arkts-api → arkts-api}/static/globalUtils.ts +4 -4
- package/build/libarkts-copy/src/arkts-api/static/profiler.ts +0 -8
- package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +57 -0
- package/build/libarkts-copy/src/arkts-api/utilities/nativePtrDecoder.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/utilities/private.ts +6 -8
- package/build/libarkts-copy/src/arkts-api/utilities/public.ts +153 -29
- package/build/libarkts-copy/src/arkts-api/visitor.ts +16 -10
- package/build/libarkts-copy/src/checkSdk.ts +15 -0
- package/build/libarkts-copy/src/generated/Es2pandaEnums.ts +343 -321
- package/build/libarkts-copy/src/generated/Es2pandaNativeModule.ts +93 -12
- package/build/libarkts-copy/src/generated/factory.ts +38 -25
- package/build/libarkts-copy/src/generated/index.ts +2 -0
- package/build/libarkts-copy/src/generated/peers/ArrayExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ArrowFunctionExpression.ts +15 -3
- package/build/libarkts-copy/src/generated/peers/AssignmentExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/BlockExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/CallExpression.ts +10 -2
- package/build/libarkts-copy/src/generated/peers/ClassDeclaration.ts +11 -2
- package/build/libarkts-copy/src/generated/peers/ClassDefinition.ts +20 -4
- package/build/libarkts-copy/src/generated/peers/ClassProperty.ts +10 -2
- package/build/libarkts-copy/src/generated/peers/ETSClassLiteral.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSFunctionType.ts +12 -9
- package/build/libarkts-copy/src/generated/peers/ETSImportDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSIntrinsicNode.ts +77 -0
- package/build/libarkts-copy/src/generated/peers/ETSKeyofType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSModule.ts +3 -1
- package/build/libarkts-copy/src/generated/peers/ETSNewArrayInstanceExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSNewClassInstanceExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSNullType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSPackageDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSParameterExpression.ts +29 -5
- package/build/libarkts-copy/src/generated/peers/ETSPrimitiveType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSReExportDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSStringLiteralType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSStructDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSTuple.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSTypeReference.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSTypeReferencePart.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSUndefinedType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ETSUnionType.ts +12 -3
- package/build/libarkts-copy/src/generated/peers/ETSWildcardType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/MethodDefinition.ts +14 -2
- package/build/libarkts-copy/src/generated/peers/ObjectExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/OpaqueTypeNode.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/OverloadDeclaration.ts +103 -0
- package/build/libarkts-copy/src/generated/peers/PrefixAssertionExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/Program.ts +8 -0
- package/build/libarkts-copy/src/generated/peers/Property.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/RegExpLiteral.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ReturnStatement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ScriptFunction.ts +26 -9
- package/build/libarkts-copy/src/generated/peers/SequenceExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/SpreadElement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/StringLiteral.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/SuperExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/SwitchCaseStatement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/SwitchStatement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSAnyKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSArrayType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSAsExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSBigintKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSBooleanKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSClassImplements.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSConditionalType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSConstructorType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSEnumDeclaration.ts +12 -3
- package/build/libarkts-copy/src/generated/peers/TSEnumMember.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSExternalModuleReference.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSFunctionType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSImportEqualsDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSImportType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSIndexSignature.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSIndexedAccessType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSInferType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSInterfaceBody.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSInterfaceDeclaration.ts +12 -3
- package/build/libarkts-copy/src/generated/peers/TSInterfaceHeritage.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSIntersectionType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSLiteralType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSMappedType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSMethodSignature.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSModuleBlock.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSModuleDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSNamedTupleMember.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSNeverKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSNonNullExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSNullKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSNumberKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSObjectKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSParameterProperty.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSParenthesizedType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSPropertySignature.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSQualifiedName.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSSignatureDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSStringKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSThisType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTupleType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeAliasDeclaration.ts +29 -4
- package/build/libarkts-copy/src/generated/peers/TSTypeAssertion.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeLiteral.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeOperator.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeParameter.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterDeclaration.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeParameterInstantiation.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypePredicate.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeQuery.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSTypeReference.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSUndefinedKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSUnionType.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSUnknownKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TSVoidKeyword.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TaggedTemplateExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TemplateElement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TemplateLiteral.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ThisExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/ThrowStatement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TryStatement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/TypeofExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/UnaryExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/UpdateExpression.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/VariableDeclaration.ts +11 -3
- package/build/libarkts-copy/src/generated/peers/VariableDeclarator.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/WhileStatement.ts +1 -1
- package/build/libarkts-copy/src/generated/peers/YieldExpression.ts +1 -1
- package/build/libarkts-copy/src/index.ts +1 -4
- package/build/libarkts-copy/src/plugin-utils.ts +37 -37
- package/build/libarkts-copy/src/reexport-for-generated.ts +7 -0
- package/build/libarkts-copy/src/ts-api/factory/nodeFactory.ts +14 -14
- package/build/libarkts-copy/src/ts-api/index.ts +1 -1
- package/build/libarkts-copy/src/ts-api/types.ts +56 -56
- package/build/libarkts-copy/src/ts-api/utilities/private.ts +6 -6
- package/build/libarkts-copy/src/ts-api/utilities/public.ts +3 -3
- package/build/libarkts-copy/src/ts-api/visitor/visitor.ts +4 -4
- package/build/libarkts-copy/src/utils.ts +13 -159
- package/build/libarkts-copy/src/wrapper-compat/README.md +4 -0
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/index.ts +3 -4
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ArrayExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ArrowFunctionExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/AssignmentExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/BlockStatement.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/CallExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ClassDeclaration.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ClassDefinition.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ClassProperty.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ETSFunctionType.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ETSImportDeclaration.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ETSParameterExpression.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ExpressionStatement.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/FunctionDeclaration.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/FunctionExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/IfStatement.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/MemberExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/MethodDefinition.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/NumberLiteral.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ObjectExpression.ts +3 -3
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/Property.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/ScriptFunction.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/StructDeclaration.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TSInterfaceDeclaration.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TSTypeAliasDeclaration.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TSTypeParameter.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/TryStatement.ts +3 -3
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/VariableDeclaration.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/node-utilities/VariableDeclarator.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Diagnostic.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/DiagnosticInfo.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/DiagnosticKind.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/ImportPathManager.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Program.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/SourceRange.ts +2 -2
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/SuggestionInfo.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/to-be-generated/MemberExpression.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/types.ts +10 -11
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/utilities/nativePtrDecoder.ts +1 -1
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/utilities/private.ts +4 -4
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/utilities/public.ts +6 -6
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/visitor.ts +10 -10
- package/lib/index.js +7194 -7097
- package/package.json +2 -2
- package/templates/Es2pandaNativeModule.ts +1 -1
- package/templates/bridges.cc +5 -0
- package/build/libarkts-copy/src/arkts-api/CheckedBackFilter.ts +0 -131
- package/build/libarkts-copy/src/arkts-api/CompileWithCache.ts +0 -193
- package/build/libarkts-copy/src/arkts-api/InferVoidReturnType.ts +0 -89
- package/build/libarkts-copy/src/arkts-api/SetBaseOverloads.ts +0 -44
- package/build/libarkts-copy/src/arkts-api/node-utilities/AnnotationUsage.ts +0 -29
- package/build/libarkts-copy/src/arkts-api/node-utilities/ArrowFunctionExpression.ts +0 -49
- package/build/libarkts-copy/src/arkts-api/node-utilities/ClassDeclaration.ts +0 -54
- package/build/libarkts-copy/src/arkts-api/node-utilities/TSTypeAliasDeclaration.ts +0 -68
- package/build/libarkts-copy/src/arkts-api/node-utilities/VariableDeclaration.ts +0 -54
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/ArktsObject.ts +0 -45
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Config.ts +0 -53
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/Context.ts +0 -60
- package/build/libarkts-copy/src/wrapper-compat/arkts-api/peers/SourcePosition.ts +0 -38
|
@@ -255,4 +255,155 @@
|
|
|
255
255
|
]
|
|
256
256
|
}
|
|
257
257
|
],
|
|
258
|
+
fragments: [
|
|
259
|
+
{
|
|
260
|
+
interface: "MethodDefinition",
|
|
261
|
+
methods: [
|
|
262
|
+
{
|
|
263
|
+
name: "setChildrenParentPtr",
|
|
264
|
+
definition: "extension_MethodDefinitionSetChildrenParentPtr",
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "onUpdate",
|
|
268
|
+
definition: "extension_MethodDefinitionOnUpdate",
|
|
269
|
+
},
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
interface: "ETSModule",
|
|
274
|
+
methods: [
|
|
275
|
+
{
|
|
276
|
+
name: "getNamespaceFlag",
|
|
277
|
+
definition: "extension_ETSModuleGetNamespaceFlag",
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
interface: "ScriptFunction",
|
|
283
|
+
methods: [
|
|
284
|
+
{
|
|
285
|
+
name: "getPreferredReturnTypePointer",
|
|
286
|
+
definition: "extension_ScriptFunctionGetPreferredReturnTypePointer",
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
name: "setPreferredReturnTypePointer",
|
|
290
|
+
definition: "extension_ScriptFunctionSetPreferredReturnTypePointer",
|
|
291
|
+
},
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
],
|
|
295
|
+
parameters: [
|
|
296
|
+
{
|
|
297
|
+
interface: "ArrowFunctionExpression",
|
|
298
|
+
parameters: [
|
|
299
|
+
{
|
|
300
|
+
name: "annotations",
|
|
301
|
+
},
|
|
302
|
+
],
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
interface: "CallExpression",
|
|
306
|
+
parameters: [
|
|
307
|
+
{
|
|
308
|
+
name: "trailingBlock",
|
|
309
|
+
},
|
|
310
|
+
],
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
interface: "ClassDeclaration",
|
|
314
|
+
parameters: [
|
|
315
|
+
{
|
|
316
|
+
name: "modifierFlags",
|
|
317
|
+
},
|
|
318
|
+
],
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
interface: "ClassDefinition",
|
|
322
|
+
parameters: [
|
|
323
|
+
{
|
|
324
|
+
name: "annotations",
|
|
325
|
+
},
|
|
326
|
+
],
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
interface: "ClassProperty",
|
|
330
|
+
parameters: [
|
|
331
|
+
{
|
|
332
|
+
name: "annotations",
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
interface: "ETSFunctionType",
|
|
338
|
+
parameters: [
|
|
339
|
+
{
|
|
340
|
+
name: "annotations",
|
|
341
|
+
},
|
|
342
|
+
],
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
interface: "ETSParameterExpression",
|
|
346
|
+
parameters: [
|
|
347
|
+
{
|
|
348
|
+
name: "annotations",
|
|
349
|
+
},
|
|
350
|
+
],
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
interface: "ETSUnionType",
|
|
354
|
+
parameters: [
|
|
355
|
+
{
|
|
356
|
+
name: "annotations",
|
|
357
|
+
},
|
|
358
|
+
],
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
interface: "MethodDefinition",
|
|
362
|
+
parameters: [
|
|
363
|
+
{
|
|
364
|
+
name: "overloads",
|
|
365
|
+
},
|
|
366
|
+
],
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
interface: "ScriptFunction",
|
|
370
|
+
parameters: [
|
|
371
|
+
{
|
|
372
|
+
name: "ident",
|
|
373
|
+
setter: "setIdent",
|
|
374
|
+
getter: "id",
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
name: "annotations",
|
|
378
|
+
},
|
|
379
|
+
],
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
interface: "TSInterfaceDeclaration",
|
|
383
|
+
parameters: [
|
|
384
|
+
{
|
|
385
|
+
name: "modifierFlags",
|
|
386
|
+
},
|
|
387
|
+
],
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
interface: "TSTypeAliasDeclaration",
|
|
391
|
+
parameters: [
|
|
392
|
+
{
|
|
393
|
+
name: "annotations",
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
name: "modifierFlags",
|
|
397
|
+
},
|
|
398
|
+
],
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
interface: "VariableDeclaration",
|
|
402
|
+
parameters: [
|
|
403
|
+
{
|
|
404
|
+
name: "annotations",
|
|
405
|
+
},
|
|
406
|
+
],
|
|
407
|
+
},
|
|
408
|
+
],
|
|
258
409
|
}
|
|
@@ -20,6 +20,7 @@ project(
|
|
|
20
20
|
'buildtype=release',
|
|
21
21
|
],
|
|
22
22
|
)
|
|
23
|
+
is_cross = get_option('cross_compile')
|
|
23
24
|
|
|
24
25
|
sources = [
|
|
25
26
|
'./src/common.cc',
|
|
@@ -28,7 +29,7 @@ sources = [
|
|
|
28
29
|
get_option('interop_src_dir') / 'common-interop.cc',
|
|
29
30
|
get_option('interop_src_dir') / 'callback-resource.cc',
|
|
30
31
|
get_option('interop_src_dir') / 'interop-logging.cc',
|
|
31
|
-
get_option('interop_src_dir') / 'napi/convertors-napi.cc',
|
|
32
|
+
get_option('interop_src_dir') / 'napi' / 'convertors-napi.cc',
|
|
32
33
|
]
|
|
33
34
|
|
|
34
35
|
cflags = [
|
|
@@ -38,14 +39,12 @@ cflags = [
|
|
|
38
39
|
'-DKOALA_NAPI',
|
|
39
40
|
]
|
|
40
41
|
|
|
41
|
-
if (
|
|
42
|
+
if (host_machine.system() == 'windows')
|
|
42
43
|
cflags += ['-DKOALA_WINDOWS']
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
]
|
|
48
|
-
endif
|
|
44
|
+
# apply node.exe symbol loading hook
|
|
45
|
+
sources += [
|
|
46
|
+
get_option('interop_src_dir') / 'napi/win-dynamic-node.cc'
|
|
47
|
+
]
|
|
49
48
|
else
|
|
50
49
|
cflags += ['-DKOALA_LINUX']
|
|
51
50
|
endif
|
|
@@ -62,17 +61,17 @@ arch = archs.get(arch, arch)
|
|
|
62
61
|
|
|
63
62
|
cflags_cross = []
|
|
64
63
|
cflags_host = []
|
|
65
|
-
suffix_host = '_' + arch
|
|
64
|
+
suffix_host = '_' + os + '_' + arch
|
|
66
65
|
suffix_cross = ''
|
|
67
66
|
|
|
68
67
|
if get_option('cross_compile')
|
|
69
68
|
if arch == 'arm64'
|
|
70
69
|
cflags_cross = ['--target=x86_64-linux-gnu']
|
|
71
|
-
suffix_cross = '_x64'
|
|
70
|
+
suffix_cross = '_' + os + '_x64'
|
|
72
71
|
endif
|
|
73
72
|
if arch == 'x64'
|
|
74
73
|
cflags_cross = ['--target=aarch64-linux-gnu']
|
|
75
|
-
suffix_cross = '_arm64'
|
|
74
|
+
suffix_cross = '_' + os + '_arm64'
|
|
76
75
|
endif
|
|
77
76
|
endif
|
|
78
77
|
|
|
@@ -100,7 +99,7 @@ shared_library(
|
|
|
100
99
|
dependencies: []
|
|
101
100
|
)
|
|
102
101
|
|
|
103
|
-
if
|
|
102
|
+
if is_cross
|
|
104
103
|
# sudo apt install g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
|
|
105
104
|
shared_library(
|
|
106
105
|
get_option('lib_name') + suffix_cross,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[binaries]
|
|
2
|
+
c = 'x86_64-w64-mingw32-gcc'
|
|
3
|
+
cpp = 'x86_64-w64-mingw32-g++'
|
|
4
|
+
ar = 'x86_64-w64-mingw32-ar'
|
|
5
|
+
windres = 'x86_64-w64-mingw32-windres'
|
|
6
|
+
strip = 'x86_64-w64-mingw32-strip'
|
|
7
|
+
exe_wrapper = 'wine64'
|
|
8
|
+
|
|
9
|
+
[host_machine]
|
|
10
|
+
system = 'windows'
|
|
11
|
+
cpu_family = 'x86_64'
|
|
12
|
+
cpu = 'x86_64'
|
|
13
|
+
endian = 'little'
|
|
14
|
+
|
|
@@ -190,6 +190,14 @@ KNativePointer impl_ContextErrorMessage(KNativePointer contextPtr)
|
|
|
190
190
|
}
|
|
191
191
|
KOALA_INTEROP_1(ContextErrorMessage, KNativePointer, KNativePointer)
|
|
192
192
|
|
|
193
|
+
KNativePointer impl_GetAllErrorMessages(KNativePointer contextPtr)
|
|
194
|
+
{
|
|
195
|
+
auto context = reinterpret_cast<es2panda_Context*>(contextPtr);
|
|
196
|
+
|
|
197
|
+
return StageArena::strdup(GetImpl()->GetAllErrorMessages(context));
|
|
198
|
+
}
|
|
199
|
+
KOALA_INTEROP_1(GetAllErrorMessages, KNativePointer, KNativePointer)
|
|
200
|
+
|
|
193
201
|
/*
|
|
194
202
|
KNativePointer impl_CallExpressionSignature(KNativePointer context, KNativePointer classInstance)
|
|
195
203
|
{
|
|
@@ -394,15 +402,57 @@ void impl_DestroyGlobalContext(KNativePointer globalContextPtr) {
|
|
|
394
402
|
}
|
|
395
403
|
KOALA_INTEROP_V1(DestroyGlobalContext, KNativePointer)
|
|
396
404
|
|
|
405
|
+
// All these "Checker_" bridges are related to checker namespace in es2panda, so work with them carefully
|
|
406
|
+
// Checker.Type does reset on recheck, so modifying them makes no sence
|
|
407
|
+
// It seems that compiler does not provide API to convert Checker.Type to ir.Type
|
|
408
|
+
KNativePointer impl_Checker_ScriptFunctionGetPreferredReturnType(KNativePointer context, KNativePointer node)
|
|
409
|
+
{
|
|
410
|
+
auto _context = reinterpret_cast<es2panda_Context*>(context);
|
|
411
|
+
auto _node = reinterpret_cast<es2panda_AstNode*>(node);
|
|
412
|
+
return GetImpl()->ScriptFunctionGetPreferredReturnType(_context, _node);
|
|
413
|
+
}
|
|
414
|
+
KOALA_INTEROP_2(Checker_ScriptFunctionGetPreferredReturnType, KNativePointer, KNativePointer, KNativePointer)
|
|
415
|
+
|
|
416
|
+
void impl_Checker_ScriptFunctionSetPreferredReturnType(KNativePointer context, KNativePointer node, KNativePointer type)
|
|
417
|
+
{
|
|
418
|
+
auto _context = reinterpret_cast<es2panda_Context*>(context);
|
|
419
|
+
auto _node = reinterpret_cast<es2panda_AstNode*>(node);
|
|
420
|
+
auto _type = reinterpret_cast<es2panda_Type*>(type);
|
|
421
|
+
GetImpl()->ScriptFunctionSetPreferredReturnType(_context, _node, _type);
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
KOALA_INTEROP_V3(Checker_ScriptFunctionSetPreferredReturnType, KNativePointer, KNativePointer, KNativePointer)
|
|
425
|
+
|
|
426
|
+
KNativePointer impl_Checker_TypeToString(KNativePointer context, KNativePointer type)
|
|
427
|
+
{
|
|
428
|
+
auto _context = reinterpret_cast<es2panda_Context*>(context);
|
|
429
|
+
auto _type = reinterpret_cast<es2panda_Type*>(type);
|
|
430
|
+
auto result = GetImpl()->TypeToStringConst(_context, _type);
|
|
431
|
+
return StageArena::strdup(result);
|
|
432
|
+
}
|
|
433
|
+
KOALA_INTEROP_2(Checker_TypeToString, KNativePointer, KNativePointer, KNativePointer)
|
|
434
|
+
|
|
435
|
+
KNativePointer impl_Checker_TypeNodeGetType(KNativePointer context, KNativePointer astNode)
|
|
436
|
+
{
|
|
437
|
+
auto _context = reinterpret_cast<es2panda_Context*>(context);
|
|
438
|
+
auto _astNode = reinterpret_cast<es2panda_AstNode*>(astNode);
|
|
439
|
+
return GetImpl()->TypeNodeGetType(_context, _astNode);
|
|
440
|
+
}
|
|
441
|
+
KOALA_INTEROP_2(Checker_TypeNodeGetType, KNativePointer, KNativePointer, KNativePointer)
|
|
442
|
+
|
|
397
443
|
// From koala-wrapper
|
|
398
|
-
//
|
|
444
|
+
// Improve: check if some code should be generated
|
|
399
445
|
|
|
400
446
|
std::set<std::string> globalStructInfo;
|
|
447
|
+
#ifdef _GLIBCXX_HAS_GTHREADS
|
|
401
448
|
std::mutex g_structMutex;
|
|
449
|
+
#endif
|
|
402
450
|
|
|
403
451
|
void impl_InsertGlobalStructInfo(KNativePointer contextPtr, KStringPtr& instancePtr)
|
|
404
452
|
{
|
|
453
|
+
#ifdef _GLIBCXX_HAS_GTHREADS
|
|
405
454
|
std::lock_guard<std::mutex> lock(g_structMutex);
|
|
455
|
+
#endif
|
|
406
456
|
globalStructInfo.insert(getStringCopy(instancePtr));
|
|
407
457
|
return;
|
|
408
458
|
}
|
|
@@ -410,7 +460,9 @@ KOALA_INTEROP_V2(InsertGlobalStructInfo, KNativePointer, KStringPtr);
|
|
|
410
460
|
|
|
411
461
|
KBoolean impl_HasGlobalStructInfo(KNativePointer contextPtr, KStringPtr& instancePtr)
|
|
412
462
|
{
|
|
463
|
+
#ifdef _GLIBCXX_HAS_GTHREADS
|
|
413
464
|
std::lock_guard<std::mutex> lock(g_structMutex);
|
|
465
|
+
#endif
|
|
414
466
|
return globalStructInfo.count(getStringCopy(instancePtr));
|
|
415
467
|
}
|
|
416
468
|
KOALA_INTEROP_2(HasGlobalStructInfo, KBoolean, KNativePointer, KStringPtr);
|
|
@@ -594,3 +646,27 @@ KInt impl_GenerateTsDeclarationsFromContext(KNativePointer contextPtr, KStringPt
|
|
|
594
646
|
return GetImpl()->GenerateTsDeclarationsFromContext(context, outputDeclEts.data(), outputEts.data(), exportAll, isolated );
|
|
595
647
|
}
|
|
596
648
|
KOALA_INTEROP_5(GenerateTsDeclarationsFromContext, KInt, KNativePointer, KStringPtr, KStringPtr, KBoolean, KBoolean)
|
|
649
|
+
|
|
650
|
+
// Improve: simplify
|
|
651
|
+
KNativePointer impl_CreateContextGenerateAbcForExternalSourceFiles(
|
|
652
|
+
KNativePointer configPtr, KInt fileNamesCount, KStringArray fileNames)
|
|
653
|
+
{
|
|
654
|
+
auto config = reinterpret_cast<es2panda_Config *>(configPtr);
|
|
655
|
+
const std::size_t headerLen = 4;
|
|
656
|
+
const char **argv =
|
|
657
|
+
new const char *[static_cast<unsigned int>(fileNamesCount)];
|
|
658
|
+
std::size_t position = headerLen;
|
|
659
|
+
std::size_t strLen;
|
|
660
|
+
for (std::size_t i = 0; i < static_cast<std::size_t>(fileNamesCount); ++i) {
|
|
661
|
+
strLen = unpackUInt(fileNames + position);
|
|
662
|
+
position += headerLen;
|
|
663
|
+
argv[i] = strdup(
|
|
664
|
+
std::string(reinterpret_cast<const char *>(fileNames + position),
|
|
665
|
+
strLen)
|
|
666
|
+
.c_str());
|
|
667
|
+
position += strLen;
|
|
668
|
+
}
|
|
669
|
+
return GetImpl()->CreateContextGenerateAbcForExternalSourceFiles(
|
|
670
|
+
config, fileNamesCount, argv);
|
|
671
|
+
}
|
|
672
|
+
KOALA_INTEROP_3(CreateContextGenerateAbcForExternalSourceFiles, KNativePointer, KNativePointer, KInt, KStringArray)
|
|
@@ -127,9 +127,9 @@ void impl_SetUpSoPath(KStringPtr &soPath)
|
|
|
127
127
|
}
|
|
128
128
|
KOALA_INTEROP_V1(SetUpSoPath, KStringPtr);
|
|
129
129
|
|
|
130
|
-
//
|
|
130
|
+
// Improve: simplify this
|
|
131
131
|
void* FindLibrary() {
|
|
132
|
-
void *res =
|
|
132
|
+
void *res = nullptr;
|
|
133
133
|
std::vector<std::string> pathArray;
|
|
134
134
|
|
|
135
135
|
// find by SetUpSoPath
|
|
@@ -165,7 +165,7 @@ void* FindLibrary() {
|
|
|
165
165
|
return res;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
return
|
|
168
|
+
return nullptr;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
es2panda_Impl *GetImplSlow()
|
|
@@ -270,7 +270,7 @@ KInt impl_IdentifierIdentifierFlags(KNativePointer contextPtr, KNativePointer no
|
|
|
270
270
|
KOALA_INTEROP_2(IdentifierIdentifierFlags, KInt, KNativePointer, KNativePointer)
|
|
271
271
|
|
|
272
272
|
/*
|
|
273
|
-
|
|
273
|
+
Improve: NOT FROM API (shouldn't be there)
|
|
274
274
|
-----------------------------------------------------------------------------------------------------------------------------
|
|
275
275
|
*/
|
|
276
276
|
|
|
@@ -336,7 +336,7 @@ KOALA_INTEROP_2(AstNodeChildren, KNativePointer, KNativePointer, KNativePointer)
|
|
|
336
336
|
*/
|
|
337
337
|
|
|
338
338
|
// From koala-wrapper
|
|
339
|
-
//
|
|
339
|
+
// Improve: check if some code should be generated
|
|
340
340
|
|
|
341
341
|
void impl_MemInitialize()
|
|
342
342
|
{
|