From 9e2725c33ccc340683a02a71ad0f9cf5be79f17c Mon Sep 17 00:00:00 2001 From: Keerecles Date: Tue, 10 Jun 2025 17:52:47 +0800 Subject: [PATCH 01/17] update ts wrapper Signed-off-by: Keerecles Change-Id: Idf41e6fc83c8bbcdab001a6c86d449746e110079 --- koala-wrapper/native/BUILD.gn | 2 +- koala-wrapper/native/src/bridges.cc | 184 +-- koala-wrapper/native/src/common.cc | 75 +- .../native/{include => src}/common.h | 58 +- koala-wrapper/native/src/generated/bridges.cc | 1442 ++++++++++++++--- 5 files changed, 1380 insertions(+), 381 deletions(-) rename koala-wrapper/native/{include => src}/common.h (38%) diff --git a/koala-wrapper/native/BUILD.gn b/koala-wrapper/native/BUILD.gn index 1f7e783fa..472bfa511 100644 --- a/koala-wrapper/native/BUILD.gn +++ b/koala-wrapper/native/BUILD.gn @@ -34,7 +34,7 @@ shared_library("es2panda") { "../koalaui/interop/src/cpp/napi", "../node_modules/node-api-headers/include", "../node_modules/node-addon-api", - "./include", + "./src", "//arkcompiler/ets_frontend/ets2panda/public/", "//third_party/node/src", rebase_path("$root_gen_dir/arkcompiler/ets_frontend/ets2panda/"), diff --git a/koala-wrapper/native/src/bridges.cc b/koala-wrapper/native/src/bridges.cc index 5333ea8b5..e81ea292d 100644 --- a/koala-wrapper/native/src/bridges.cc +++ b/koala-wrapper/native/src/bridges.cc @@ -37,38 +37,6 @@ KBoolean impl_HasGlobalStructInfo(KNativePointer contextPtr, KStringPtr& instanc } KOALA_INTEROP_2(HasGlobalStructInfo, KBoolean, KNativePointer, KStringPtr); -KBoolean impl_ClassDefinitionIsFromStructConst(KNativePointer contextPtr, KNativePointer instancePtr) -{ - auto context = reinterpret_cast(contextPtr); - auto node = reinterpret_cast(instancePtr); - return GetImpl()->ClassDefinitionIsFromStructConst(context, node); -} -KOALA_INTEROP_2(ClassDefinitionIsFromStructConst, KBoolean, KNativePointer, KNativePointer); - -void impl_ClassDefinitionSetFromStructModifier(KNativePointer contextPtr, KNativePointer instancePtr) -{ - auto context = reinterpret_cast(contextPtr); - auto node = reinterpret_cast(instancePtr); - return GetImpl()->ClassDefinitionSetFromStructModifier(context, node); -} -KOALA_INTEROP_V2(ClassDefinitionSetFromStructModifier, KNativePointer, KNativePointer); - -KBoolean impl_ImportSpecifierIsRemovableConst(KNativePointer contextPtr, KNativePointer instancePtr) -{ - auto context = reinterpret_cast(contextPtr); - auto node = reinterpret_cast(instancePtr); - return GetImpl()->ImportSpecifierIsRemovableConst(context, node); -} -KOALA_INTEROP_2(ImportSpecifierIsRemovableConst, KBoolean, KNativePointer, KNativePointer); - -void impl_ImportSpecifierSetRemovable(KNativePointer contextPtr, KNativePointer instancePtr) -{ - auto context = reinterpret_cast(contextPtr); - auto node = reinterpret_cast(instancePtr); - return GetImpl()->ImportSpecifierSetRemovable(context, node, true); -} -KOALA_INTEROP_V2(ImportSpecifierSetRemovable, KNativePointer, KNativePointer); - KNativePointer impl_AstNodeRecheck(KNativePointer contextPtr, KNativePointer nodePtr) { auto context = reinterpret_cast(contextPtr); @@ -93,7 +61,7 @@ KNativePointer impl_AnnotationAllowedAnnotations(KNativePointer contextPtr, KNat auto node = reinterpret_cast(nodePtr); std::size_t params_len = 0; auto annotations = GetImpl()->AnnotationAllowedAnnotations(context, node, ¶ms_len); - return new std::vector(annotations, annotations + params_len); + return StageArena::cloneVector(annotations, params_len); } KOALA_INTEROP_3(AnnotationAllowedAnnotations, KNativePointer, KNativePointer, KNativePointer, KNativePointer) @@ -103,7 +71,7 @@ KNativePointer impl_AnnotationAllowedAnnotationsConst(KNativePointer contextPtr, auto node = reinterpret_cast(nodePtr); std::size_t params_len = 0; auto annotations = GetImpl()->AnnotationAllowedAnnotationsConst(context, node, ¶ms_len); - return new std::vector(annotations, annotations + params_len); + return StageArena::cloneVector(annotations, params_len); } KOALA_INTEROP_3(AnnotationAllowedAnnotationsConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer) @@ -152,14 +120,6 @@ KNativePointer impl_ScopeSetParent(KNativePointer contextPtr, KNativePointer nod } KOALA_INTEROP_3(ScopeSetParent, KNativePointer, KNativePointer, KNativePointer, KNativePointer) -KNativePointer impl_CreateNumberLiteral(KNativePointer contextPtr, KDouble value) -{ - auto context = reinterpret_cast(contextPtr); - - return GetImpl()->CreateNumberLiteral(context, value); -} -KOALA_INTEROP_2(CreateNumberLiteral, KNativePointer, KNativePointer, KDouble) - KNativePointer impl_ETSParserCreateExpression(KNativePointer contextPtr, KStringPtr& sourceCodePtr, KInt flagsT) { auto context = reinterpret_cast(contextPtr); @@ -239,7 +199,7 @@ KNativePointer impl_ContextErrorMessage(KNativePointer contextPtr) { auto context = reinterpret_cast(contextPtr); - return new string(GetImpl()->ContextErrorMessage(context)); + return StageArena::strdup(GetImpl()->ContextErrorMessage(context)); } KOALA_INTEROP_1(ContextErrorMessage, KNativePointer, KNativePointer) @@ -274,9 +234,9 @@ static KNativePointer impl_ProgramExternalSources(KNativePointer contextPtr, KNa { auto context = reinterpret_cast(contextPtr); auto&& instance = reinterpret_cast(instancePtr); - std::size_t sourceLen = 0; - auto externalSources = GetImpl()->ProgramExternalSources(context, instance, &sourceLen); - return new std::vector(externalSources, externalSources + sourceLen); + std::size_t source_len = 0; + auto external_sources = GetImpl()->ProgramExternalSources(context, instance, &source_len); + return StageArena::cloneVector(external_sources, source_len); } KOALA_INTEROP_2(ProgramExternalSources, KNativePointer, KNativePointer, KNativePointer); @@ -302,17 +262,17 @@ KOALA_INTEROP_2(ProgramModuleNameConst, KNativePointer, KNativePointer, KNativeP static KNativePointer impl_ExternalSourceName(KNativePointer instance) { auto&& _instance_ = reinterpret_cast(instance); - auto&& _result_ = GetImpl()->ExternalSourceName(_instance_); - return new std::string(_result_); + auto&& result = GetImpl()->ExternalSourceName(_instance_); + return StageArena::strdup(result); } KOALA_INTEROP_1(ExternalSourceName, KNativePointer, KNativePointer); static KNativePointer impl_ExternalSourcePrograms(KNativePointer instance) { auto&& _instance_ = reinterpret_cast(instance); - std::size_t programLen = 0; - auto programs = GetImpl()->ExternalSourcePrograms(_instance_, &programLen); - return new std::vector(programs, programs + programLen); + std::size_t program_len = 0; + auto programs = GetImpl()->ExternalSourcePrograms(_instance_, &program_len); + return StageArena::cloneVector(programs, program_len); } KOALA_INTEROP_1(ExternalSourcePrograms, KNativePointer, KNativePointer); @@ -337,6 +297,20 @@ KBoolean impl_IsETSFunctionType(KNativePointer nodePtr) } KOALA_INTEROP_1(IsETSFunctionType, KBoolean, KNativePointer) +KNativePointer impl_ETSParserBuildImportDeclaration(KNativePointer context, KInt importKinds, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KNativePointer source, KNativePointer program, KInt importFlag) +{ + const auto _context = reinterpret_cast(context); + const auto _kinds = static_cast(importKinds); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + const auto _source = reinterpret_cast(source); + const auto _program = reinterpret_cast(program); + const auto _importFlag = static_cast(importFlag); + + return GetImpl()->ETSParserBuildImportDeclaration(_context, _kinds, _specifiers, _specifiersSequenceLength, _source, _program, _importFlag); +} +KOALA_INTEROP_7(ETSParserBuildImportDeclaration, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KNativePointer, KNativePointer, KInt) + KInt impl_GenerateTsDeclarationsFromContext(KNativePointer contextPtr, KStringPtr &outputDeclEts, KStringPtr &outputEts, KBoolean exportAll) { @@ -351,17 +325,14 @@ KInt impl_GenerateStaticDeclarationsFromContext(KNativePointer contextPtr, KStri return GetImpl()->GenerateStaticDeclarationsFromContext(context, outputPath.data()); } KOALA_INTEROP_2(GenerateStaticDeclarationsFromContext, KInt, KNativePointer, KStringPtr) - -void impl_InsertETSImportDeclarationAndParse(KNativePointer context, KNativePointer program, - KNativePointer importDeclaration) +void impl_InsertETSImportDeclarationAndParse(KNativePointer context, KNativePointer program, KNativePointer importDeclaration) { const auto _context = reinterpret_cast(context); - const auto _program = reinterpret_cast(program); - const auto _ast = reinterpret_cast(importDeclaration); - GetImpl()->InsertETSImportDeclarationAndParse(_context, _program, _ast); - return ; + const auto _program = reinterpret_cast(program); + const auto _import = reinterpret_cast(importDeclaration); + GetImpl()->InsertETSImportDeclarationAndParse(_context, _program, _import); } -KOALA_INTEROP_V3(InsertETSImportDeclarationAndParse, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_V3(InsertETSImportDeclarationAndParse, KNativePointer, KNativePointer, KNativePointer) KNativePointer impl_ETSParserGetImportPathManager(KNativePointer contextPtr) { @@ -402,14 +373,6 @@ KNativePointer impl_CreateSourceRange(KNativePointer context, KNativePointer sta } KOALA_INTEROP_3(CreateSourceRange, KNativePointer, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_CreateETSStringLiteralType(KNativePointer contextPtr, KStringPtr& str) -{ - auto context = reinterpret_cast(contextPtr); - const auto _str = getStringCopy(str); - return GetImpl()->CreateETSStringLiteralType(context, _str); -} -KOALA_INTEROP_2(CreateETSStringLiteralType, KNativePointer, KNativePointer, KStringPtr) - KNativePointer impl_ProgramFileNameConst(KNativePointer contextPtr, KNativePointer programPtr) { auto context = reinterpret_cast(contextPtr); @@ -469,33 +432,25 @@ KBoolean impl_IsMethodDefinition(KNativePointer nodePtr) return GetImpl()->IsMethodDefinition(node); } KOALA_INTEROP_1(IsMethodDefinition, KBoolean, KNativePointer) - -KNativePointer impl_CreateETSImportDeclaration(KNativePointer context, KNativePointer source, - KNativePointerArray specifiers, KUInt specifiersSequenceLength, - KInt importKind, KNativePointer programPtr, KInt flags) +KNativePointer impl_TSInterfaceBodyBodyPtr(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); - const auto _source = reinterpret_cast(source); - const auto _specifiers = reinterpret_cast(specifiers); - const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); - const auto _importKind = static_cast(importKind); - const auto _program = reinterpret_cast(programPtr); - const auto _flags = static_cast(flags); - auto result = GetImpl()->ETSParserBuildImportDeclaration(_context, _importKind, _specifiers, - _specifiersSequenceLength, _source, _program, _flags); - return result; + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceBodyBodyPtr(_context, _receiver, &length); + return new std::vector(result, result + length); } -KOALA_INTEROP_7(CreateETSImportDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, - KUInt, KInt, KNativePointer, KInt) +KOALA_INTEROP_2(TSInterfaceBodyBodyPtr, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_AstNodeRangeConst(KNativePointer context, KNativePointer node) +KNativePointer impl_AnnotationDeclarationPropertiesPtrConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); - const auto _node = reinterpret_cast(node); - auto result = GetImpl()->AstNodeRangeConst(_context, _node); - return (void*)result; + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationDeclarationPropertiesPtrConst(_context, _receiver, &length); + return (void*)new std::vector(result, result + length); } -KOALA_INTEROP_2(AstNodeRangeConst, KNativePointer, KNativePointer, KNativePointer) +KOALA_INTEROP_2(AnnotationDeclarationPropertiesPtrConst, KNativePointer, KNativePointer, KNativePointer); KNativePointer impl_SourceRangeStart(KNativePointer context, KNativePointer range) { @@ -514,49 +469,6 @@ KNativePointer impl_SourceRangeEnd(KNativePointer context, KNativePointer range) return result; } KOALA_INTEROP_2(SourceRangeEnd, KNativePointer, KNativePointer, KNativePointer) -bool impl_ClassPropertyIsDefaultAccessModifierConst(KNativePointer context, KNativePointer receiver) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - return GetImpl()->ClassPropertyIsDefaultAccessModifierConst(_context, _receiver); -} -KOALA_INTEROP_2(ClassPropertyIsDefaultAccessModifierConst, KBoolean, KNativePointer, KNativePointer); - -KNativePointer impl_AstNodeStartConst(KNativePointer context, KNativePointer receiver) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - return const_cast(GetImpl()->AstNodeStartConst(_context, _receiver)); -} -KOALA_INTEROP_2(AstNodeStartConst, KNativePointer, KNativePointer, KNativePointer); - -void impl_AstNodeSetStart(KNativePointer context, KNativePointer receiver, KNativePointer start) -{ - auto _context = reinterpret_cast(context); - auto _receiver = reinterpret_cast(receiver); - auto _start = reinterpret_cast(start); - GetImpl()->AstNodeSetStart(_context, _receiver, _start); - return; -} -KOALA_INTEROP_V3(AstNodeSetStart, KNativePointer, KNativePointer, KNativePointer) - -KNativePointer impl_AstNodeEndConst(KNativePointer context, KNativePointer receiver) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - return const_cast(GetImpl()->AstNodeEndConst(_context, _receiver)); -} -KOALA_INTEROP_2(AstNodeEndConst, KNativePointer, KNativePointer, KNativePointer); - -void impl_AstNodeSetEnd(KNativePointer context, KNativePointer receiver, KNativePointer end) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - const auto _end = reinterpret_cast(end); - GetImpl()->AstNodeSetEnd(_context, _receiver, _end); - return; -} -KOALA_INTEROP_V3(AstNodeSetEnd, KNativePointer, KNativePointer, KNativePointer); KBoolean impl_IsArrayExpression(KNativePointer nodePtr) { @@ -627,6 +539,7 @@ KNativePointer impl_CreateSuggestionInfo(KNativePointer context, KNativePointer } KOALA_INTEROP_5(CreateSuggestionInfo, KNativePointer, KNativePointer, KNativePointer, KStringArray, KInt, KStringPtr); + void impl_LogDiagnostic(KNativePointer context, KNativePointer kind, KStringArray argvPtr, KInt argc, KNativePointer pos) { @@ -646,6 +559,7 @@ void impl_LogDiagnostic(KNativePointer context, KNativePointer kind, KStringArra GetImpl()->LogDiagnostic(_context_, _kind_, argv, argc, _pos_); } KOALA_INTEROP_V5(LogDiagnostic, KNativePointer, KNativePointer, KStringArray, KInt, KNativePointer); + void impl_LogDiagnosticWithSuggestion(KNativePointer context, KNativePointer diagnosticInfo, KNativePointer suggestionInfo, KNativePointer range) { @@ -656,3 +570,13 @@ void impl_LogDiagnosticWithSuggestion(KNativePointer context, KNativePointer dia GetImpl()->LogDiagnosticWithSuggestion(_context, _diagnosticInfo, _suggestionInfo, _range); } KOALA_INTEROP_V4(LogDiagnosticWithSuggestion, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotationUsageIrPropertiesPtrConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationUsageIrPropertiesPtrConst(_context, _receiver, &length); + return (void*)new std::vector(result, result + length); +} +KOALA_INTEROP_2(AnnotationUsageIrPropertiesPtrConst, KNativePointer, KNativePointer, KNativePointer); \ No newline at end of file diff --git a/koala-wrapper/native/src/common.cc b/koala-wrapper/native/src/common.cc index 1f4fee8aa..fc5fca238 100644 --- a/koala-wrapper/native/src/common.cc +++ b/koala-wrapper/native/src/common.cc @@ -14,11 +14,63 @@ */ #include +#include using std::string, std::cout, std::endl, std::vector; static es2panda_Impl *impl = nullptr; +static thread_local StageArena currentArena; + +StageArena* StageArena::instance() +{ + return ¤tArena; +} + +void StageArena::add(void* pointer) +{ + if (pointer) + allocated.push_back(pointer); +} + +void StageArena::cleanup() +{ + if (totalSize > 0 && false) + printf("cleanup %d objects %d bytes\n", (int)allocated.size(), (int)totalSize); + for (auto it : allocated) { + free(it); + } + totalSize = 0; + allocated.clear(); +} + +StageArena::StageArena() +{ + totalSize = 0; +} + +StageArena::~StageArena() +{ + cleanup(); +} + +char* StageArena::strdup(const char* string) +{ + auto* arena = StageArena::instance(); + auto size = strlen(string) + 1; + char* memory = (char*)arena->alloc(size); + memcpy(memory, string, size); + return memory; +} + +void* StageArena::alloc(size_t size) +{ + void* result = malloc(size); + totalSize += size; + add(result); + return result; +} + #ifdef KOALA_WINDOWS #include #define PLUGIN_DIR "windows_host_tools" @@ -107,15 +159,18 @@ es2panda_ContextState intToState(KInt state) return es2panda_ContextState(state); } -string getString(KStringPtr ptr) { +string getString(KStringPtr ptr) +{ return ptr.data(); } -char* getStringCopy(KStringPtr& ptr) { - return strdup(ptr.c_str()); +char* getStringCopy(KStringPtr& ptr) +{ + return StageArena::strdup(ptr.c_str() ? ptr.c_str() : ""); } -inline KUInt unpackUInt(const KByte* bytes) { +inline KUInt unpackUInt(const KByte* bytes) +{ const KUInt BYTE_0 = 0; const KUInt BYTE_1 = 1; const KUInt BYTE_2 = 2; @@ -185,13 +240,13 @@ KOALA_INTEROP_4(CreateCacheContextFromFile, KNativePointer, KNativePointer, KStr KNativePointer impl_CreateConfig(KInt argc, KStringArray argvPtr) { const std::size_t headerLen = 4; - const char** argv = new const char*[argc]; + const char** argv = StageArena::allocArray(argc); std::size_t position = headerLen; std::size_t strLen; for (std::size_t i = 0; i < static_cast(argc); ++i) { strLen = unpackUInt(argvPtr + position); position += headerLen; - argv[i] = strdup(std::string(reinterpret_cast(argvPtr + position), strLen).c_str()); + argv[i] = StageArena::strdup(std::string(reinterpret_cast(argvPtr + position), strLen).c_str()); position += strLen; } return GetImpl()->CreateConfig(argc, argv); @@ -208,6 +263,7 @@ KOALA_INTEROP_1(DestroyConfig, KNativePointer, KNativePointer) KNativePointer impl_DestroyContext(KNativePointer contextPtr) { auto context = reinterpret_cast(contextPtr); GetImpl()->DestroyContext(context); + StageArena::instance()->cleanup(); return nullptr; } KOALA_INTEROP_1(DestroyContext, KNativePointer, KNativePointer) @@ -232,7 +288,7 @@ KNativePointer impl_UpdateCallExpression( auto nn = GetImpl()->CreateCallExpression( context, callee, arguments, argumentsLen, typeParams, optional, trailingComma - ); + ); GetImpl()->AstNodeSetOriginalNode(context, nn, node); return nn; } @@ -304,7 +360,8 @@ KOALA_INTEROP_2(AstNodeUpdateChildren, KNativePointer, KNativePointer, KNativePo thread_local std::vector cachedChildren; -static void visitChild(es2panda_AstNode *node) { +static void visitChild(es2panda_AstNode *node) +{ cachedChildren.emplace_back(node); } @@ -318,7 +375,7 @@ KNativePointer impl_AstNodeChildren( cachedChildren.clear(); GetImpl()->AstNodeIterateConst(context, node, visitChild); - return new std::vector(cachedChildren); + return StageArena::clone(cachedChildren); } KOALA_INTEROP_2(AstNodeChildren, KNativePointer, KNativePointer, KNativePointer) diff --git a/koala-wrapper/native/include/common.h b/koala-wrapper/native/src/common.h similarity index 38% rename from koala-wrapper/native/include/common.h rename to koala-wrapper/native/src/common.h index 399d28d22..f2d8387c3 100644 --- a/koala-wrapper/native/include/common.h +++ b/koala-wrapper/native/src/common.h @@ -13,7 +13,7 @@ * limitations under the License. */ - #ifndef COMMON_H +#ifndef COMMON_H #define COMMON_H #include "dynamic-loader.h" @@ -32,8 +32,62 @@ string getString(KStringPtr ptr); char* getStringCopy(KStringPtr& ptr); -KUInt unpackUInt(const KByte* bytes); +inline KUInt unpackUInt(const KByte* bytes); es2panda_ContextState intToState(KInt state); +class StageArena { + std::vector allocated; + size_t totalSize; + public: + StageArena(); + ~StageArena(); + static StageArena* instance(); + template + static T* alloc() + { + auto* arena = StageArena::instance(); + void* memory = arena->alloc(sizeof(T)); + return new (memory) T(); + } + template + static T* alloc(T1 arg1) + { + auto* arena = StageArena::instance(); + void* memory = arena->alloc(sizeof(T)); + return new (memory) T(std::forward(arg1)); + } + template + static T* alloc(T1 arg1, T2 arg2) + { + auto* arena = StageArena::instance(); + void* memory = arena->alloc(sizeof(T)); + return new (memory) T(arg1, arg2); + } + template + static T* allocArray(size_t count) + { + auto* arena = StageArena::instance(); + // align? + void* memory = arena->alloc(sizeof(T) * count); + return new (memory) T(); + } + template + static T* clone(const T& arg) + { + auto* arena = StageArena::instance(); + void* memory = arena->alloc(sizeof(T)); + return new (memory) T(arg); + } + template + static std::vector* cloneVector(const T* arg, size_t count) + { + return alloc, const T*, const T*>(arg, arg + count); + } + void* alloc(size_t size); + static char* strdup(const char* original); + void add(void* pointer); + void cleanup(); +}; + #endif // COMMON_H \ No newline at end of file diff --git a/koala-wrapper/native/src/generated/bridges.cc b/koala-wrapper/native/src/generated/bridges.cc index d89b383f9..2bf11a7b6 100644 --- a/koala-wrapper/native/src/generated/bridges.cc +++ b/koala-wrapper/native/src/generated/bridges.cc @@ -15,6 +15,91 @@ #include +KNativePointer impl_CreateNumberLiteral(KNativePointer context, KInt value) +{ + const auto _context = reinterpret_cast(context); + const auto _value = static_cast(value); + auto result = GetImpl()->CreateNumberLiteral(_context, _value); + return result; +} +KOALA_INTEROP_2(CreateNumberLiteral, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_CreateNumberLiteral1(KNativePointer context, KLong value) +{ + const auto _context = reinterpret_cast(context); + const auto _value = static_cast(value); + auto result = GetImpl()->CreateNumberLiteral1(_context, _value); + return result; +} +KOALA_INTEROP_2(CreateNumberLiteral1, KNativePointer, KNativePointer, KLong); + +KNativePointer impl_CreateNumberLiteral2(KNativePointer context, KDouble value) +{ + const auto _context = reinterpret_cast(context); + const auto _value = static_cast(value); + auto result = GetImpl()->CreateNumberLiteral2(_context, _value); + return result; +} +KOALA_INTEROP_2(CreateNumberLiteral2, KNativePointer, KNativePointer, KDouble); + +KNativePointer impl_CreateNumberLiteral3(KNativePointer context, KFloat value) +{ + const auto _context = reinterpret_cast(context); + const auto _value = static_cast(value); + auto result = GetImpl()->CreateNumberLiteral3(_context, _value); + return result; +} +KOALA_INTEROP_2(CreateNumberLiteral3, KNativePointer, KNativePointer, KFloat); + +KNativePointer impl_UpdateNumberLiteral(KNativePointer context, KNativePointer original, KInt value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _value = static_cast(value); + auto result = GetImpl()->UpdateNumberLiteral(_context, _original, _value); + return result; +} +KOALA_INTEROP_3(UpdateNumberLiteral, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateNumberLiteral1(KNativePointer context, KNativePointer original, KLong value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _value = static_cast(value); + auto result = GetImpl()->UpdateNumberLiteral1(_context, _original, _value); + return result; +} +KOALA_INTEROP_3(UpdateNumberLiteral1, KNativePointer, KNativePointer, KNativePointer, KLong); + +KNativePointer impl_UpdateNumberLiteral2(KNativePointer context, KNativePointer original, KDouble value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _value = static_cast(value); + auto result = GetImpl()->UpdateNumberLiteral2(_context, _original, _value); + return result; +} +KOALA_INTEROP_3(UpdateNumberLiteral2, KNativePointer, KNativePointer, KNativePointer, KDouble); + +KNativePointer impl_UpdateNumberLiteral3(KNativePointer context, KNativePointer original, KFloat value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _value = static_cast(value); + auto result = GetImpl()->UpdateNumberLiteral3(_context, _original, _value); + return result; +} +KOALA_INTEROP_3(UpdateNumberLiteral3, KNativePointer, KNativePointer, KNativePointer, KFloat); + +KNativePointer impl_NumberLiteralStrConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->NumberLiteralStrConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(NumberLiteralStrConst, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateLabelledStatement(KNativePointer context, KNativePointer ident, KNativePointer body) { const auto _context = reinterpret_cast(context); @@ -36,6 +121,15 @@ KNativePointer impl_UpdateLabelledStatement(KNativePointer context, KNativePoint } KOALA_INTEROP_4(UpdateLabelledStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_LabelledStatementBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->LabelledStatementBody(_context, _receiver); + return result; +} +KOALA_INTEROP_2(LabelledStatementBody, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_LabelledStatementBodyConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -127,6 +221,25 @@ KNativePointer impl_UpdateClassProperty(KNativePointer context, KNativePointer o } KOALA_INTEROP_7(UpdateClassProperty, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt, KBoolean); +KBoolean impl_ClassPropertyIsDefaultAccessModifierConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassPropertyIsDefaultAccessModifierConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassPropertyIsDefaultAccessModifierConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ClassPropertySetDefaultAccessModifier(KNativePointer context, KNativePointer receiver, KBoolean isDefault) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isDefault = static_cast(isDefault); + GetImpl()->ClassPropertySetDefaultAccessModifier(_context, _receiver, _isDefault); + return ; +} +KOALA_INTEROP_V3(ClassPropertySetDefaultAccessModifier, KNativePointer, KNativePointer, KBoolean); + KNativePointer impl_ClassPropertyTypeAnnotationConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -146,13 +259,32 @@ void impl_ClassPropertySetTypeAnnotation(KNativePointer context, KNativePointer } KOALA_INTEROP_V3(ClassPropertySetTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); +KBoolean impl_ClassPropertyNeedInitInStaticBlockConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassPropertyNeedInitInStaticBlockConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassPropertyNeedInitInStaticBlockConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ClassPropertySetInitInStaticBlock(KNativePointer context, KNativePointer receiver, KBoolean needInitInStaticBlock) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _needInitInStaticBlock = static_cast(needInitInStaticBlock); + GetImpl()->ClassPropertySetInitInStaticBlock(_context, _receiver, _needInitInStaticBlock); + return ; +} +KOALA_INTEROP_V3(ClassPropertySetInitInStaticBlock, KNativePointer, KNativePointer, KBoolean); + KNativePointer impl_ClassPropertyAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassPropertyAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassPropertyAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -162,7 +294,7 @@ KNativePointer impl_ClassPropertyAnnotationsConst(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassPropertyAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassPropertyAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -194,7 +326,7 @@ KNativePointer impl_UpdateTSVoidKeyword(KNativePointer context, KNativePointer o } KOALA_INTEROP_2(UpdateTSVoidKeyword, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_CreateETSFunctionTypeIr(KNativePointer context, KNativePointer signature, KInt funcFlags) +KNativePointer impl_CreateETSFunctionType(KNativePointer context, KNativePointer signature, KInt funcFlags) { const auto _context = reinterpret_cast(context); const auto _signature = reinterpret_cast(signature); @@ -202,9 +334,9 @@ KNativePointer impl_CreateETSFunctionTypeIr(KNativePointer context, KNativePoint auto result = GetImpl()->CreateETSFunctionTypeIr(_context, _signature, _funcFlags); return result; } -KOALA_INTEROP_3(CreateETSFunctionTypeIr, KNativePointer, KNativePointer, KNativePointer, KInt); +KOALA_INTEROP_3(CreateETSFunctionType, KNativePointer, KNativePointer, KNativePointer, KInt); -KNativePointer impl_UpdateETSFunctionTypeIr(KNativePointer context, KNativePointer original, KNativePointer signature, KInt funcFlags) +KNativePointer impl_UpdateETSFunctionType(KNativePointer context, KNativePointer original, KNativePointer signature, KInt funcFlags) { const auto _context = reinterpret_cast(context); const auto _original = reinterpret_cast(original); @@ -213,73 +345,73 @@ KNativePointer impl_UpdateETSFunctionTypeIr(KNativePointer context, KNativePoint auto result = GetImpl()->UpdateETSFunctionTypeIr(_context, _original, _signature, _funcFlags); return result; } -KOALA_INTEROP_4(UpdateETSFunctionTypeIr, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); +KOALA_INTEROP_4(UpdateETSFunctionType, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); -KNativePointer impl_ETSFunctionTypeIrTypeParamsConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_ETSFunctionTypeTypeParamsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSFunctionTypeIrTypeParamsConst(_context, _receiver); return (void*)result; } -KOALA_INTEROP_2(ETSFunctionTypeIrTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ETSFunctionTypeTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_ETSFunctionTypeIrTypeParams(KNativePointer context, KNativePointer receiver) +KNativePointer impl_ETSFunctionTypeTypeParams(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSFunctionTypeIrTypeParams(_context, _receiver); return result; } -KOALA_INTEROP_2(ETSFunctionTypeIrTypeParams, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ETSFunctionTypeTypeParams, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_ETSFunctionTypeIrParamsConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_ETSFunctionTypeParamsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSFunctionTypeIrParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } -KOALA_INTEROP_2(ETSFunctionTypeIrParamsConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ETSFunctionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_ETSFunctionTypeIrReturnTypeConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_ETSFunctionTypeReturnTypeConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSFunctionTypeIrReturnTypeConst(_context, _receiver); return (void*)result; } -KOALA_INTEROP_2(ETSFunctionTypeIrReturnTypeConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ETSFunctionTypeReturnTypeConst, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_ETSFunctionTypeIrReturnType(KNativePointer context, KNativePointer receiver) +KNativePointer impl_ETSFunctionTypeReturnType(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSFunctionTypeIrReturnType(_context, _receiver); return result; } -KOALA_INTEROP_2(ETSFunctionTypeIrReturnType, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ETSFunctionTypeReturnType, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_ETSFunctionTypeIrFunctionalInterface(KNativePointer context, KNativePointer receiver) +KNativePointer impl_ETSFunctionTypeFunctionalInterface(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSFunctionTypeIrFunctionalInterface(_context, _receiver); return result; } -KOALA_INTEROP_2(ETSFunctionTypeIrFunctionalInterface, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ETSFunctionTypeFunctionalInterface, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_ETSFunctionTypeIrFunctionalInterfaceConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_ETSFunctionTypeFunctionalInterfaceConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSFunctionTypeIrFunctionalInterfaceConst(_context, _receiver); return (void*)result; } -KOALA_INTEROP_2(ETSFunctionTypeIrFunctionalInterfaceConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ETSFunctionTypeFunctionalInterfaceConst, KNativePointer, KNativePointer, KNativePointer); -void impl_ETSFunctionTypeIrSetFunctionalInterface(KNativePointer context, KNativePointer receiver, KNativePointer functionalInterface) +void impl_ETSFunctionTypeSetFunctionalInterface(KNativePointer context, KNativePointer receiver, KNativePointer functionalInterface) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); @@ -287,43 +419,43 @@ void impl_ETSFunctionTypeIrSetFunctionalInterface(KNativePointer context, KNativ GetImpl()->ETSFunctionTypeIrSetFunctionalInterface(_context, _receiver, _functionalInterface); return ; } -KOALA_INTEROP_V3(ETSFunctionTypeIrSetFunctionalInterface, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_V3(ETSFunctionTypeSetFunctionalInterface, KNativePointer, KNativePointer, KNativePointer); -KInt impl_ETSFunctionTypeIrFlags(KNativePointer context, KNativePointer receiver) +KInt impl_ETSFunctionTypeFlags(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSFunctionTypeIrFlags(_context, _receiver); return result; } -KOALA_INTEROP_2(ETSFunctionTypeIrFlags, KInt, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ETSFunctionTypeFlags, KInt, KNativePointer, KNativePointer); -KBoolean impl_ETSFunctionTypeIrIsThrowingConst(KNativePointer context, KNativePointer receiver) +KBoolean impl_ETSFunctionTypeIsThrowingConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSFunctionTypeIrIsThrowingConst(_context, _receiver); return result; } -KOALA_INTEROP_2(ETSFunctionTypeIrIsThrowingConst, KBoolean, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ETSFunctionTypeIsThrowingConst, KBoolean, KNativePointer, KNativePointer); -KBoolean impl_ETSFunctionTypeIrIsRethrowingConst(KNativePointer context, KNativePointer receiver) +KBoolean impl_ETSFunctionTypeIsRethrowingConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSFunctionTypeIrIsRethrowingConst(_context, _receiver); return result; } -KOALA_INTEROP_2(ETSFunctionTypeIrIsRethrowingConst, KBoolean, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ETSFunctionTypeIsRethrowingConst, KBoolean, KNativePointer, KNativePointer); -KBoolean impl_ETSFunctionTypeIrIsExtensionFunctionConst(KNativePointer context, KNativePointer receiver) +KBoolean impl_ETSFunctionTypeIsExtensionFunctionConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSFunctionTypeIrIsExtensionFunctionConst(_context, _receiver); return result; } -KOALA_INTEROP_2(ETSFunctionTypeIrIsExtensionFunctionConst, KBoolean, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ETSFunctionTypeIsExtensionFunctionConst, KBoolean, KNativePointer, KNativePointer); KNativePointer impl_CreateTSTypeOperator(KNativePointer context, KNativePointer type, KInt operatorType) { @@ -459,6 +591,16 @@ KNativePointer impl_IfStatementAlternateConst(KNativePointer context, KNativePoi } KOALA_INTEROP_2(IfStatementAlternateConst, KNativePointer, KNativePointer, KNativePointer); +void impl_IfStatementSetAlternate(KNativePointer context, KNativePointer receiver, KNativePointer alternate) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _alternate = reinterpret_cast(alternate); + GetImpl()->IfStatementSetAlternate(_context, _receiver, _alternate); + return ; +} +KOALA_INTEROP_V3(IfStatementSetAlternate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateTSConstructorType(KNativePointer context, KNativePointer signature, KBoolean abstract) { const auto _context = reinterpret_cast(context); @@ -504,7 +646,7 @@ KNativePointer impl_TSConstructorTypeParamsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSConstructorTypeParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSConstructorTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -616,7 +758,7 @@ KNativePointer impl_TSEnumDeclarationMembersConst(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSEnumDeclarationMembersConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSEnumDeclarationMembersConst, KNativePointer, KNativePointer, KNativePointer); @@ -625,7 +767,7 @@ KNativePointer impl_TSEnumDeclarationInternalNameConst(KNativePointer context, K const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TSEnumDeclarationInternalNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TSEnumDeclarationInternalNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -673,7 +815,7 @@ KNativePointer impl_TSEnumDeclarationDecoratorsConst(KNativePointer context, KNa const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSEnumDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSEnumDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -762,7 +904,7 @@ KNativePointer impl_ObjectExpressionPropertiesConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ObjectExpressionPropertiesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ObjectExpressionPropertiesConst, KNativePointer, KNativePointer, KNativePointer); @@ -790,7 +932,7 @@ KNativePointer impl_ObjectExpressionDecoratorsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ObjectExpressionDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ObjectExpressionDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -907,6 +1049,25 @@ KNativePointer impl_ImportSpecifierLocalConst(KNativePointer context, KNativePoi } KOALA_INTEROP_2(ImportSpecifierLocalConst, KNativePointer, KNativePointer, KNativePointer); +KBoolean impl_ImportSpecifierIsRemovableConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportSpecifierIsRemovableConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ImportSpecifierIsRemovableConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ImportSpecifierSetRemovable(KNativePointer context, KNativePointer receiver, KBoolean isRemovable) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isRemovable = static_cast(isRemovable); + GetImpl()->ImportSpecifierSetRemovable(_context, _receiver, _isRemovable); + return ; +} +KOALA_INTEROP_V3(ImportSpecifierSetRemovable, KNativePointer, KNativePointer, KBoolean); + KNativePointer impl_CreateConditionalExpression(KNativePointer context, KNativePointer test, KNativePointer consequent, KNativePointer alternate) { const auto _context = reinterpret_cast(context); @@ -1099,7 +1260,7 @@ KNativePointer impl_CallExpressionArgumentsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->CallExpressionArgumentsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(CallExpressionArgumentsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1109,7 +1270,7 @@ KNativePointer impl_CallExpressionArguments(KNativePointer context, KNativePoint const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->CallExpressionArguments(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(CallExpressionArguments, KNativePointer, KNativePointer, KNativePointer); @@ -1179,6 +1340,25 @@ KBoolean impl_CallExpressionIsTrailingBlockInNewLineConst(KNativePointer context } KOALA_INTEROP_2(CallExpressionIsTrailingBlockInNewLineConst, KBoolean, KNativePointer, KNativePointer); +void impl_CallExpressionSetIsTrailingCall(KNativePointer context, KNativePointer receiver, KBoolean isTrailingCall) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isTrailingCall = static_cast(isTrailingCall); + GetImpl()->CallExpressionSetIsTrailingCall(_context, _receiver, _isTrailingCall); + return ; +} +KOALA_INTEROP_V3(CallExpressionSetIsTrailingCall, KNativePointer, KNativePointer, KBoolean); + +KBoolean impl_CallExpressionIsTrailingCallConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CallExpressionIsTrailingCallConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(CallExpressionIsTrailingCallConst, KBoolean, KNativePointer, KNativePointer); + KBoolean impl_CallExpressionIsETSConstructorCallConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -1212,7 +1392,7 @@ KNativePointer impl_BigIntLiteralStrConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->BigIntLiteralStrConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(BigIntLiteralStrConst, KNativePointer, KNativePointer, KNativePointer); @@ -1280,6 +1460,25 @@ KNativePointer impl_ClassElementValueConst(KNativePointer context, KNativePointe } KOALA_INTEROP_2(ClassElementValueConst, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_ClassElementOriginEnumMemberConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassElementOriginEnumMemberConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassElementOriginEnumMemberConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassElementSetOrigEnumMember(KNativePointer context, KNativePointer receiver, KNativePointer enumMember) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _enumMember = reinterpret_cast(enumMember); + GetImpl()->ClassElementSetOrigEnumMember(_context, _receiver, _enumMember); + return ; +} +KOALA_INTEROP_V3(ClassElementSetOrigEnumMember, KNativePointer, KNativePointer, KNativePointer); + KBoolean impl_ClassElementIsPrivateElementConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -1295,7 +1494,7 @@ KNativePointer impl_ClassElementDecoratorsConst(KNativePointer context, KNativeP const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassElementDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassElementDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1518,7 +1717,7 @@ KNativePointer impl_FunctionDeclarationAnnotations(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->FunctionDeclarationAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(FunctionDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -1528,7 +1727,7 @@ KNativePointer impl_FunctionDeclarationAnnotationsConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->FunctionDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(FunctionDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1756,7 +1955,7 @@ KNativePointer impl_TSFunctionTypeParamsConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSFunctionTypeParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSFunctionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1831,7 +2030,7 @@ KNativePointer impl_TemplateElementRawConst(KNativePointer context, KNativePoint const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TemplateElementRawConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TemplateElementRawConst, KNativePointer, KNativePointer, KNativePointer); @@ -1840,7 +2039,7 @@ KNativePointer impl_TemplateElementCookedConst(KNativePointer context, KNativePo const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TemplateElementCookedConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TemplateElementCookedConst, KNativePointer, KNativePointer, KNativePointer); @@ -1916,7 +2115,7 @@ KNativePointer impl_TSInterfaceDeclarationInternalNameConst(KNativePointer conte const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TSInterfaceDeclarationInternalNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TSInterfaceDeclarationInternalNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -1972,7 +2171,7 @@ KNativePointer impl_TSInterfaceDeclarationExtends(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationExtends(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceDeclarationExtends, KNativePointer, KNativePointer, KNativePointer); @@ -1982,7 +2181,7 @@ KNativePointer impl_TSInterfaceDeclarationExtendsConst(KNativePointer context, K const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationExtendsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceDeclarationExtendsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1992,7 +2191,7 @@ KNativePointer impl_TSInterfaceDeclarationDecoratorsConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2030,7 +2229,7 @@ KNativePointer impl_TSInterfaceDeclarationAnnotations(KNativePointer context, KN const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -2040,7 +2239,7 @@ KNativePointer impl_TSInterfaceDeclarationAnnotationsConst(KNativePointer contex const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2084,7 +2283,7 @@ KNativePointer impl_VariableDeclarationDeclaratorsConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->VariableDeclarationDeclaratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(VariableDeclarationDeclaratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2103,7 +2302,7 @@ KNativePointer impl_VariableDeclarationDecoratorsConst(KNativePointer context, K const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->VariableDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(VariableDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2123,7 +2322,7 @@ KNativePointer impl_VariableDeclarationAnnotations(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->VariableDeclarationAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(VariableDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -2133,7 +2332,7 @@ KNativePointer impl_VariableDeclarationAnnotationsConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->VariableDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(VariableDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2296,6 +2495,15 @@ void impl_MemberExpressionRemoveMemberKind(KNativePointer context, KNativePointe } KOALA_INTEROP_V3(MemberExpressionRemoveMemberKind, KNativePointer, KNativePointer, KInt); +KNativePointer impl_MemberExpressionExtensionAccessorTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MemberExpressionExtensionAccessorTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(MemberExpressionExtensionAccessorTypeConst, KNativePointer, KNativePointer, KNativePointer); + KBoolean impl_MemberExpressionIsIgnoreBoxConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -2323,6 +2531,29 @@ KBoolean impl_MemberExpressionIsPrivateReferenceConst(KNativePointer context, KN } KOALA_INTEROP_2(MemberExpressionIsPrivateReferenceConst, KBoolean, KNativePointer, KNativePointer); +void impl_MemberExpressionCompileToRegConst(KNativePointer context, KNativePointer receiver, KNativePointer pg, KNativePointer objReg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _pg = reinterpret_cast(pg); + const auto _objReg = reinterpret_cast(objReg); + GetImpl()->MemberExpressionCompileToRegConst(_context, _receiver, _pg, _objReg); + return ; +} +KOALA_INTEROP_V4(MemberExpressionCompileToRegConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +void impl_MemberExpressionCompileToRegsConst(KNativePointer context, KNativePointer receiver, KNativePointer pg, KNativePointer object_arg, KNativePointer property) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _pg = reinterpret_cast(pg); + const auto _object_arg = reinterpret_cast(object_arg); + const auto _property = reinterpret_cast(property); + GetImpl()->MemberExpressionCompileToRegsConst(_context, _receiver, _pg, _object_arg, _property); + return ; +} +KOALA_INTEROP_V5(MemberExpressionCompileToRegsConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateTSClassImplements(KNativePointer context, KNativePointer expression, KNativePointer typeParameters) { const auto _context = reinterpret_cast(context); @@ -2407,7 +2638,7 @@ KNativePointer impl_UpdateTSObjectKeyword(KNativePointer context, KNativePointer } KOALA_INTEROP_2(UpdateTSObjectKeyword, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_CreateETSUnionTypeIr(KNativePointer context, KNativePointerArray types, KUInt typesSequenceLength) +KNativePointer impl_CreateETSUnionType(KNativePointer context, KNativePointerArray types, KUInt typesSequenceLength) { const auto _context = reinterpret_cast(context); const auto _types = reinterpret_cast(types); @@ -2415,9 +2646,9 @@ KNativePointer impl_CreateETSUnionTypeIr(KNativePointer context, KNativePointerA auto result = GetImpl()->CreateETSUnionTypeIr(_context, _types, _typesSequenceLength); return result; } -KOALA_INTEROP_3(CreateETSUnionTypeIr, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +KOALA_INTEROP_3(CreateETSUnionType, KNativePointer, KNativePointer, KNativePointerArray, KUInt); -KNativePointer impl_UpdateETSUnionTypeIr(KNativePointer context, KNativePointer original, KNativePointerArray types, KUInt typesSequenceLength) +KNativePointer impl_UpdateETSUnionType(KNativePointer context, KNativePointer original, KNativePointerArray types, KUInt typesSequenceLength) { const auto _context = reinterpret_cast(context); const auto _original = reinterpret_cast(original); @@ -2426,17 +2657,45 @@ KNativePointer impl_UpdateETSUnionTypeIr(KNativePointer context, KNativePointer auto result = GetImpl()->UpdateETSUnionTypeIr(_context, _original, _types, _typesSequenceLength); return result; } -KOALA_INTEROP_4(UpdateETSUnionTypeIr, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +KOALA_INTEROP_4(UpdateETSUnionType, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); -KNativePointer impl_ETSUnionTypeIrTypesConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_ETSUnionTypeTypesConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSUnionTypeIrTypesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSUnionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSKeyofType(KNativePointer context, KNativePointer type) +{ + const auto _context = reinterpret_cast(context); + const auto _type = reinterpret_cast(type); + auto result = GetImpl()->CreateETSKeyofType(_context, _type); + return result; } -KOALA_INTEROP_2(ETSUnionTypeIrTypesConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(CreateETSKeyofType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSKeyofType(KNativePointer context, KNativePointer original, KNativePointer type) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _type = reinterpret_cast(type); + auto result = GetImpl()->UpdateETSKeyofType(_context, _original, _type); + return result; +} +KOALA_INTEROP_3(UpdateETSKeyofType, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSKeyofTypeGetTypeRefConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSKeyofTypeGetTypeRefConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSKeyofTypeGetTypeRefConst, KNativePointer, KNativePointer, KNativePointer); KNativePointer impl_CreateTSPropertySignature(KNativePointer context, KNativePointer key, KNativePointer typeAnnotation, KBoolean computed, KBoolean optional_arg, KBoolean readonly_arg) { @@ -2693,7 +2952,7 @@ KNativePointer impl_TSTypeAliasDeclarationDecoratorsConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeAliasDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeAliasDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2707,13 +2966,24 @@ void impl_TSTypeAliasDeclarationSetTypeParameters(KNativePointer context, KNativ } KOALA_INTEROP_V3(TSTypeAliasDeclarationSetTypeParameters, KNativePointer, KNativePointer, KNativePointer); +// no TSTypeAliasDeclarationAnnotations +//KNativePointer impl_TSTypeAliasDeclarationAnnotations(KNativePointer context, KNativePointer receiver) +//{ +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// std::size_t length; +// auto result = GetImpl()->TSTypeAliasDeclarationAnnotations(_context, _receiver, &length); +// return StageArena::cloneVector(result, length); +//} +//KOALA_INTEROP_2(TSTypeAliasDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_TSTypeAliasDeclarationAnnotationsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeAliasDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeAliasDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2828,6 +3098,15 @@ void impl_ReturnStatementSetArgument(KNativePointer context, KNativePointer rece } KOALA_INTEROP_V3(ReturnStatementSetArgument, KNativePointer, KNativePointer, KNativePointer); +KBoolean impl_ReturnStatementIsAsyncImplReturnConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ReturnStatementIsAsyncImplReturnConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ReturnStatementIsAsyncImplReturnConst, KBoolean, KNativePointer, KNativePointer); + KNativePointer impl_CreateExportDefaultDeclaration(KNativePointer context, KNativePointer decl, KBoolean exportEquals) { const auto _context = reinterpret_cast(context); @@ -2925,7 +3204,7 @@ KNativePointer impl_ScriptFunctionParamsConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ScriptFunctionParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2935,7 +3214,7 @@ KNativePointer impl_ScriptFunctionParams(KNativePointer context, KNativePointer const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionParams(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ScriptFunctionParams, KNativePointer, KNativePointer, KNativePointer); @@ -2945,7 +3224,7 @@ KNativePointer impl_ScriptFunctionReturnStatementsConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionReturnStatementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ScriptFunctionReturnStatementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2955,7 +3234,7 @@ KNativePointer impl_ScriptFunctionReturnStatements(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionReturnStatements(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ScriptFunctionReturnStatements, KNativePointer, KNativePointer, KNativePointer); @@ -3315,6 +3594,27 @@ void impl_ScriptFunctionAddFlag(KNativePointer context, KNativePointer receiver, } KOALA_INTEROP_V3(ScriptFunctionAddFlag, KNativePointer, KNativePointer, KInt); +void impl_ScriptFunctionClearFlag(KNativePointer context, KNativePointer receiver, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _flags = static_cast(flags); + GetImpl()->ScriptFunctionClearFlag(_context, _receiver, _flags); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionClearFlag, KNativePointer, KNativePointer, KInt); + +// no ScriptFunctionAddModifier +// void impl_ScriptFunctionAddModifier(KNativePointer context, KNativePointer receiver, KInt flags) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// const auto _flags = static_cast(flags); +// GetImpl()->ScriptFunctionAddModifier(_context, _receiver, _flags); +// return ; +// } +// KOALA_INTEROP_V3(ScriptFunctionAddModifier, KNativePointer, KNativePointer, KInt); + KUInt impl_ScriptFunctionFormalParamsLengthConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -3324,13 +3624,32 @@ KUInt impl_ScriptFunctionFormalParamsLengthConst(KNativePointer context, KNative } KOALA_INTEROP_2(ScriptFunctionFormalParamsLengthConst, KUInt, KNativePointer, KNativePointer); +void impl_ScriptFunctionSetIsolatedDeclgenReturnType(KNativePointer context, KNativePointer receiver, KStringPtr& type) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _type = getStringCopy(type); + GetImpl()->ScriptFunctionSetIsolatedDeclgenReturnType(_context, _receiver, _type); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionSetIsolatedDeclgenReturnType, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_ScriptFunctionGetIsolatedDeclgenReturnTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionGetIsolatedDeclgenReturnTypeConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ScriptFunctionGetIsolatedDeclgenReturnTypeConst, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_ScriptFunctionAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ScriptFunctionAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -3340,7 +3659,7 @@ KNativePointer impl_ScriptFunctionAnnotationsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ScriptFunctionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3477,7 +3796,7 @@ KNativePointer impl_ClassDefinitionInternalNameConst(KNativePointer context, KNa const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ClassDefinitionInternalNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ClassDefinitionInternalNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -3591,6 +3910,33 @@ KBoolean impl_ClassDefinitionIsAnonymousConst(KNativePointer context, KNativePoi } KOALA_INTEROP_2(ClassDefinitionIsAnonymousConst, KBoolean, KNativePointer, KNativePointer); +KBoolean impl_ClassDefinitionIsIntEnumTransformedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsIntEnumTransformedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsIntEnumTransformedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsStringEnumTransformedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsStringEnumTransformedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsStringEnumTransformedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsEnumTransformedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsEnumTransformedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsEnumTransformedConst, KBoolean, KNativePointer, KNativePointer); + KBoolean impl_ClassDefinitionIsNamespaceTransformedConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -3600,6 +3946,15 @@ KBoolean impl_ClassDefinitionIsNamespaceTransformedConst(KNativePointer context, } KOALA_INTEROP_2(ClassDefinitionIsNamespaceTransformedConst, KBoolean, KNativePointer, KNativePointer); +KBoolean impl_ClassDefinitionIsFromStructConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsFromStructConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsFromStructConst, KBoolean, KNativePointer, KNativePointer); + KBoolean impl_ClassDefinitionIsModuleConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -3654,6 +4009,15 @@ void impl_ClassDefinitionSetNamespaceTransformed(KNativePointer context, KNative } KOALA_INTEROP_V2(ClassDefinitionSetNamespaceTransformed, KNativePointer, KNativePointer); +void impl_ClassDefinitionSetFromStructModifier(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionSetFromStructModifier(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionSetFromStructModifier, KNativePointer, KNativePointer); + KInt impl_ClassDefinitionModifiersConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -3690,7 +4054,7 @@ KNativePointer impl_ClassDefinitionBody(KNativePointer context, KNativePointer r const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionBody(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDefinitionBody, KNativePointer, KNativePointer, KNativePointer); @@ -3700,7 +4064,7 @@ KNativePointer impl_ClassDefinitionBodyConst(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionBodyConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDefinitionBodyConst, KNativePointer, KNativePointer, KNativePointer); @@ -3729,7 +4093,7 @@ KNativePointer impl_ClassDefinitionImplements(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionImplements(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDefinitionImplements, KNativePointer, KNativePointer, KNativePointer); @@ -3739,7 +4103,7 @@ KNativePointer impl_ClassDefinitionImplementsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionImplementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDefinitionImplementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3812,7 +4176,7 @@ KNativePointer impl_ClassDefinitionLocalPrefixConst(KNativePointer context, KNat const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ClassDefinitionLocalPrefixConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ClassDefinitionLocalPrefixConst, KNativePointer, KNativePointer, KNativePointer); @@ -3872,6 +4236,15 @@ KBoolean impl_ClassDefinitionHasPrivateMethodConst(KNativePointer context, KNati } KOALA_INTEROP_2(ClassDefinitionHasPrivateMethodConst, KBoolean, KNativePointer, KNativePointer); +KBoolean impl_ClassDefinitionHasNativeMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionHasNativeMethodConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionHasNativeMethodConst, KBoolean, KNativePointer, KNativePointer); + KBoolean impl_ClassDefinitionHasComputedInstanceFieldConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -3891,13 +4264,23 @@ KBoolean impl_ClassDefinitionHasMatchingPrivateKeyConst(KNativePointer context, } KOALA_INTEROP_3(ClassDefinitionHasMatchingPrivateKeyConst, KBoolean, KNativePointer, KNativePointer, KStringPtr); +void impl_ClassDefinitionAddToExportedClasses(KNativePointer context, KNativePointer receiver, KNativePointer cls) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _cls = reinterpret_cast(cls); + GetImpl()->ClassDefinitionAddToExportedClasses(_context, _receiver, _cls); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionAddToExportedClasses, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_ClassDefinitionAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDefinitionAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -3907,7 +4290,7 @@ KNativePointer impl_ClassDefinitionAnnotationsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDefinitionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3968,13 +4351,23 @@ KNativePointer impl_UpdateArrayExpression1(KNativePointer context, KNativePointe } KOALA_INTEROP_6(UpdateArrayExpression1, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KBoolean); +KNativePointer impl_ArrayExpressionGetElementNodeAtIdxConst(KNativePointer context, KNativePointer receiver, KUInt idx) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _idx = static_cast(idx); + auto result = GetImpl()->ArrayExpressionGetElementNodeAtIdxConst(_context, _receiver, _idx); + return (void*)result; +} +KOALA_INTEROP_3(ArrayExpressionGetElementNodeAtIdxConst, KNativePointer, KNativePointer, KNativePointer, KUInt); + KNativePointer impl_ArrayExpressionElementsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrayExpressionElementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ArrayExpressionElementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3984,7 +4377,7 @@ KNativePointer impl_ArrayExpressionElements(KNativePointer context, KNativePoint const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrayExpressionElements(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ArrayExpressionElements, KNativePointer, KNativePointer, KNativePointer); @@ -4042,10 +4435,19 @@ KNativePointer impl_ArrayExpressionDecoratorsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrayExpressionDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ArrayExpressionDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); +void impl_ArrayExpressionClearPreferredType(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ArrayExpressionClearPreferredType(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ArrayExpressionClearPreferredType, KNativePointer, KNativePointer); + KBoolean impl_ArrayExpressionConvertibleToArrayPattern(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -4064,6 +4466,17 @@ KNativePointer impl_ArrayExpressionValidateExpression(KNativePointer context, KN } KOALA_INTEROP_2(ArrayExpressionValidateExpression, KNativePointer, KNativePointer, KNativePointer); +KBoolean impl_ArrayExpressionTrySetPreferredTypeForNestedArrayExprConst(KNativePointer context, KNativePointer receiver, KNativePointer nestedArrayExpr, KUInt idx) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _nestedArrayExpr = reinterpret_cast(nestedArrayExpr); + const auto _idx = static_cast(idx); + auto result = GetImpl()->ArrayExpressionTrySetPreferredTypeForNestedArrayExprConst(_context, _receiver, _nestedArrayExpr, _idx); + return result; +} +KOALA_INTEROP_4(ArrayExpressionTrySetPreferredTypeForNestedArrayExprConst, KBoolean, KNativePointer, KNativePointer, KNativePointer, KUInt); + KNativePointer impl_ArrayExpressionTypeAnnotationConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -4104,23 +4517,13 @@ KNativePointer impl_UpdateTSInterfaceBody(KNativePointer context, KNativePointer } KOALA_INTEROP_4(UpdateTSInterfaceBody, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); -KNativePointer impl_TSInterfaceBodyBodyPtr(KNativePointer context, KNativePointer receiver) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - std::size_t length; - auto result = GetImpl()->TSInterfaceBodyBodyPtr(_context, _receiver, &length); - return new std::vector(result, result + length); -} -KOALA_INTEROP_2(TSInterfaceBodyBodyPtr, KNativePointer, KNativePointer, KNativePointer); - KNativePointer impl_TSInterfaceBodyBody(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceBodyBody(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceBodyBody, KNativePointer, KNativePointer, KNativePointer); @@ -4130,7 +4533,7 @@ KNativePointer impl_TSInterfaceBodyBodyConst(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceBodyBodyConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceBodyBodyConst, KNativePointer, KNativePointer, KNativePointer); @@ -4476,7 +4879,7 @@ KNativePointer impl_StringLiteralStrConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->StringLiteralStrConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(StringLiteralStrConst, KNativePointer, KNativePointer, KNativePointer); @@ -4640,13 +5043,23 @@ KUInt impl_ETSTupleGetTupleSizeConst(KNativePointer context, KNativePointer rece } KOALA_INTEROP_2(ETSTupleGetTupleSizeConst, KUInt, KNativePointer, KNativePointer); +KNativePointer impl_ETSTupleGetTupleTypeAnnotationsList(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSTupleGetTupleTypeAnnotationsList(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSTupleGetTupleTypeAnnotationsList, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_ETSTupleGetTupleTypeAnnotationsListConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSTupleGetTupleTypeAnnotationsListConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSTupleGetTupleTypeAnnotationsListConst, KNativePointer, KNativePointer, KNativePointer); @@ -4661,6 +5074,25 @@ void impl_ETSTupleSetTypeAnnotationsList(KNativePointer context, KNativePointer } KOALA_INTEROP_V4(ETSTupleSetTypeAnnotationsList, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +KNativePointer impl_CreateETSStringLiteralType(KNativePointer context, KStringPtr& value) +{ + const auto _context = reinterpret_cast(context); + const auto _value = getStringCopy(value); + auto result = GetImpl()->CreateETSStringLiteralType(_context, _value); + return result; +} +KOALA_INTEROP_2(CreateETSStringLiteralType, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_UpdateETSStringLiteralType(KNativePointer context, KNativePointer original, KStringPtr& value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _value = getStringCopy(value); + auto result = GetImpl()->UpdateETSStringLiteralType(_context, _original, _value); + return result; +} +KOALA_INTEROP_3(UpdateETSStringLiteralType, KNativePointer, KNativePointer, KNativePointer, KStringPtr); + KNativePointer impl_CreateTryStatement(KNativePointer context, KNativePointer block, KNativePointerArray catchClauses, KUInt catchClausesSequenceLength, KNativePointer finalizer, KNativePointerArray finalizerInsertionsLabelPair, KUInt finalizerInsertionsLabelPairSequenceLength, KNativePointerArray finalizerInsertionsStatement, KUInt finalizerInsertionsStatementSequenceLength) { const auto _context = reinterpret_cast(context); @@ -4755,7 +5187,7 @@ KNativePointer impl_TryStatementCatchClausesConst(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TryStatementCatchClausesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TryStatementCatchClausesConst, KNativePointer, KNativePointer, KNativePointer); @@ -4877,6 +5309,63 @@ KNativePointer impl_AstNodeAsStatementConst(KNativePointer context, KNativePoint } KOALA_INTEROP_2(AstNodeAsStatementConst, KNativePointer, KNativePointer, KNativePointer); +void impl_AstNodeSetRange(KNativePointer context, KNativePointer receiver, KNativePointer loc) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _loc = reinterpret_cast(loc); + GetImpl()->AstNodeSetRange(_context, _receiver, _loc); + return ; +} +KOALA_INTEROP_V3(AstNodeSetRange, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeSetStart(KNativePointer context, KNativePointer receiver, KNativePointer start) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _start = reinterpret_cast(start); + GetImpl()->AstNodeSetStart(_context, _receiver, _start); + return ; +} +KOALA_INTEROP_V3(AstNodeSetStart, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeSetEnd(KNativePointer context, KNativePointer receiver, KNativePointer end) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _end = reinterpret_cast(end); + GetImpl()->AstNodeSetEnd(_context, _receiver, _end); + return ; +} +KOALA_INTEROP_V3(AstNodeSetEnd, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeStartConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeStartConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeStartConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeEndConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeEndConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeEndConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeRangeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeRangeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeRangeConst, KNativePointer, KNativePointer, KNativePointer); + KInt impl_AstNodeTypeConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -4920,7 +5409,7 @@ KNativePointer impl_AstNodeDecoratorsPtrConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AstNodeDecoratorsPtrConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AstNodeDecoratorsPtrConst, KNativePointer, KNativePointer, KNativePointer); @@ -5286,7 +5775,7 @@ KNativePointer impl_AstNodeDumpJSONConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AstNodeDumpJSONConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(AstNodeDumpJSONConst, KNativePointer, KNativePointer, KNativePointer); @@ -5295,10 +5784,28 @@ KNativePointer impl_AstNodeDumpEtsSrcConst(KNativePointer context, KNativePointe const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AstNodeDumpEtsSrcConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(AstNodeDumpEtsSrcConst, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_AstNodeDumpDeclConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeDumpDeclConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(AstNodeDumpDeclConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeIsolatedDumpDeclConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsolatedDumpDeclConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(AstNodeIsolatedDumpDeclConst, KNativePointer, KNativePointer, KNativePointer); + void impl_AstNodeDumpConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) { const auto _context = reinterpret_cast(context); @@ -5319,6 +5826,26 @@ void impl_AstNodeDumpConst1(KNativePointer context, KNativePointer receiver, KNa } KOALA_INTEROP_V3(AstNodeDumpConst1, KNativePointer, KNativePointer, KNativePointer); +void impl_AstNodeCompileConst(KNativePointer context, KNativePointer receiver, KNativePointer pg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _pg = reinterpret_cast(pg); + GetImpl()->AstNodeCompileConst(_context, _receiver, _pg); + return ; +} +KOALA_INTEROP_V3(AstNodeCompileConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeCompileConst1(KNativePointer context, KNativePointer receiver, KNativePointer etsg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _etsg = reinterpret_cast(etsg); + GetImpl()->AstNodeCompileConst1(_context, _receiver, _etsg); + return ; +} +KOALA_INTEROP_V3(AstNodeCompileConst1, KNativePointer, KNativePointer, KNativePointer); + void impl_AstNodeSetTransformedNode(KNativePointer context, KNativePointer receiver, KStringPtr& transformationName, KNativePointer transformedNode) { const auto _context = reinterpret_cast(context); @@ -5330,6 +5857,16 @@ void impl_AstNodeSetTransformedNode(KNativePointer context, KNativePointer recei } KOALA_INTEROP_V4(AstNodeSetTransformedNode, KNativePointer, KNativePointer, KStringPtr, KNativePointer); +void impl_AstNodeAccept(KNativePointer context, KNativePointer receiver, KNativePointer v) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _v = reinterpret_cast(v); + GetImpl()->AstNodeAccept(_context, _receiver, _v); + return ; +} +KOALA_INTEROP_V3(AstNodeAccept, KNativePointer, KNativePointer, KNativePointer); + void impl_AstNodeSetOriginalNode(KNativePointer context, KNativePointer receiver, KNativePointer originalNode) { const auto _context = reinterpret_cast(context); @@ -5349,6 +5886,24 @@ KNativePointer impl_AstNodeOriginalNodeConst(KNativePointer context, KNativePoin } KOALA_INTEROP_2(AstNodeOriginalNodeConst, KNativePointer, KNativePointer, KNativePointer); +void impl_AstNodeCleanUp(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AstNodeCleanUp(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AstNodeCleanUp, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeShallowClone(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeShallowClone(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeShallowClone, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateUnaryExpression(KNativePointer context, KNativePointer argument, KInt unaryOperator) { const auto _context = reinterpret_cast(context); @@ -5558,7 +6113,7 @@ KNativePointer impl_TSMethodSignatureParamsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSMethodSignatureParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSMethodSignatureParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -5760,6 +6315,17 @@ void impl_BinaryExpressionSetOperator(KNativePointer context, KNativePointer rec } KOALA_INTEROP_V3(BinaryExpressionSetOperator, KNativePointer, KNativePointer, KInt); +void impl_BinaryExpressionCompileOperandsConst(KNativePointer context, KNativePointer receiver, KNativePointer etsg, KNativePointer lhs) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _etsg = reinterpret_cast(etsg); + const auto _lhs = reinterpret_cast(lhs); + GetImpl()->BinaryExpressionCompileOperandsConst(_context, _receiver, _etsg, _lhs); + return ; +} +KOALA_INTEROP_V4(BinaryExpressionCompileOperandsConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateSuperExpression(KNativePointer context) { const auto _context = reinterpret_cast(context); @@ -6049,6 +6615,16 @@ KBoolean impl_AssignmentExpressionConvertibleToAssignmentPattern(KNativePointer } KOALA_INTEROP_3(AssignmentExpressionConvertibleToAssignmentPattern, KBoolean, KNativePointer, KNativePointer, KBoolean); +void impl_AssignmentExpressionCompilePatternConst(KNativePointer context, KNativePointer receiver, KNativePointer pg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _pg = reinterpret_cast(pg); + GetImpl()->AssignmentExpressionCompilePatternConst(_context, _receiver, _pg); + return ; +} +KOALA_INTEROP_V3(AssignmentExpressionCompilePatternConst, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateExpressionStatement(KNativePointer context, KNativePointer expr) { const auto _context = reinterpret_cast(context); @@ -6156,7 +6732,7 @@ KNativePointer impl_ETSModuleAnnotations(KNativePointer context, KNativePointer const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSModuleAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSModuleAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -6166,7 +6742,7 @@ KNativePointer impl_ETSModuleAnnotationsConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSModuleAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSModuleAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -6282,7 +6858,7 @@ KNativePointer impl_TSSignatureDeclarationParamsConst(KNativePointer context, KN const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSSignatureDeclarationParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSSignatureDeclarationParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -6360,36 +6936,73 @@ KNativePointer impl_CreateExportSpecifier(KNativePointer context, KNativePointer auto result = GetImpl()->CreateExportSpecifier(_context, _local, _exported); return result; } -KOALA_INTEROP_3(CreateExportSpecifier, KNativePointer, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_3(CreateExportSpecifier, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateExportSpecifier(KNativePointer context, KNativePointer original, KNativePointer local, KNativePointer exported) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _local = reinterpret_cast(local); + const auto _exported = reinterpret_cast(exported); + auto result = GetImpl()->UpdateExportSpecifier(_context, _original, _local, _exported); + return result; +} +KOALA_INTEROP_4(UpdateExportSpecifier, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExportSpecifierLocalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportSpecifierLocalConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExportSpecifierLocalConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExportSpecifierExportedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportSpecifierExportedConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExportSpecifierExportedConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ExportSpecifierSetDefault(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ExportSpecifierSetDefault(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ExportSpecifierSetDefault, KNativePointer, KNativePointer); -KNativePointer impl_UpdateExportSpecifier(KNativePointer context, KNativePointer original, KNativePointer local, KNativePointer exported) +KBoolean impl_ExportSpecifierIsDefaultConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); - const auto _original = reinterpret_cast(original); - const auto _local = reinterpret_cast(local); - const auto _exported = reinterpret_cast(exported); - auto result = GetImpl()->UpdateExportSpecifier(_context, _original, _local, _exported); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportSpecifierIsDefaultConst(_context, _receiver); return result; } -KOALA_INTEROP_4(UpdateExportSpecifier, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ExportSpecifierIsDefaultConst, KBoolean, KNativePointer, KNativePointer); -KNativePointer impl_ExportSpecifierLocalConst(KNativePointer context, KNativePointer receiver) +void impl_ExportSpecifierSetConstantExpression(KNativePointer context, KNativePointer receiver, KNativePointer constantExpression) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - auto result = GetImpl()->ExportSpecifierLocalConst(_context, _receiver); - return (void*)result; + const auto _constantExpression = reinterpret_cast(constantExpression); + GetImpl()->ExportSpecifierSetConstantExpression(_context, _receiver, _constantExpression); + return ; } -KOALA_INTEROP_2(ExportSpecifierLocalConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_V3(ExportSpecifierSetConstantExpression, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_ExportSpecifierExportedConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_ExportSpecifierGetConstantExpressionConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - auto result = GetImpl()->ExportSpecifierExportedConst(_context, _receiver); + auto result = GetImpl()->ExportSpecifierGetConstantExpressionConst(_context, _receiver); return (void*)result; } -KOALA_INTEROP_2(ExportSpecifierExportedConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ExportSpecifierGetConstantExpressionConst, KNativePointer, KNativePointer, KNativePointer); KNativePointer impl_CreateTSTupleType(KNativePointer context, KNativePointerArray elementTypes, KUInt elementTypesSequenceLength) { @@ -6418,7 +7031,7 @@ KNativePointer impl_TSTupleTypeElementTypeConst(KNativePointer context, KNativeP const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTupleTypeElementTypeConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTupleTypeElementTypeConst, KNativePointer, KNativePointer, KNativePointer); @@ -6618,27 +7231,27 @@ KBoolean impl_TSModuleDeclarationIsExternalOrAmbientConst(KNativePointer context } KOALA_INTEROP_2(TSModuleDeclarationIsExternalOrAmbientConst, KBoolean, KNativePointer, KNativePointer); -KNativePointer impl_CreateImportDeclaration(KNativePointer context, KNativePointer source, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KInt importKind) +KNativePointer impl_CreateImportDeclaration(KNativePointer context, KNativePointer source, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KInt importKinds) { const auto _context = reinterpret_cast(context); const auto _source = reinterpret_cast(source); const auto _specifiers = reinterpret_cast(specifiers); const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); - const auto _importKind = static_cast(importKind); - auto result = GetImpl()->CreateImportDeclaration(_context, _source, _specifiers, _specifiersSequenceLength, _importKind); + const auto _importKinds = static_cast(importKinds); + auto result = GetImpl()->CreateImportDeclaration(_context, _source, _specifiers, _specifiersSequenceLength, _importKinds); return result; } KOALA_INTEROP_5(CreateImportDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt); -KNativePointer impl_UpdateImportDeclaration(KNativePointer context, KNativePointer original, KNativePointer source, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KInt importKind) +KNativePointer impl_UpdateImportDeclaration(KNativePointer context, KNativePointer original, KNativePointer source, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KInt importKinds) { const auto _context = reinterpret_cast(context); const auto _original = reinterpret_cast(original); const auto _source = reinterpret_cast(source); const auto _specifiers = reinterpret_cast(specifiers); const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); - const auto _importKind = static_cast(importKind); - auto result = GetImpl()->UpdateImportDeclaration(_context, _original, _source, _specifiers, _specifiersSequenceLength, _importKind); + const auto _importKinds = static_cast(importKinds); + auto result = GetImpl()->UpdateImportDeclaration(_context, _original, _source, _specifiers, _specifiersSequenceLength, _importKinds); return result; } KOALA_INTEROP_6(UpdateImportDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt); @@ -6667,10 +7280,21 @@ KNativePointer impl_ImportDeclarationSpecifiersConst(KNativePointer context, KNa const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ImportDeclarationSpecifiersConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ImportDeclarationSpecifiersConst, KNativePointer, KNativePointer, KNativePointer); +// node ImportDeclarationSpecifiers +//KNativePointer impl_ImportDeclarationSpecifiers(KNativePointer context, KNativePointer receiver) +//{ +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// std::size_t length; +// auto result = GetImpl()->ImportDeclarationSpecifiers(_context, _receiver, &length); +// return StageArena::cloneVector(result, length); +//} +//KOALA_INTEROP_2(ImportDeclarationSpecifiers, KNativePointer, KNativePointer, KNativePointer); + KBoolean impl_ImportDeclarationIsTypeKindConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -6744,25 +7368,97 @@ KNativePointer impl_UpdateETSPackageDeclaration(KNativePointer context, KNativeP } KOALA_INTEROP_3(UpdateETSPackageDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_UpdateETSImportDeclaration(KNativePointer context, KNativePointer original, KNativePointer source, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KInt importKind) +KNativePointer impl_CreateETSImportDeclaration(KNativePointer context, KNativePointer importPath, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KInt importKinds) +{ + const auto _context = reinterpret_cast(context); + const auto _importPath = reinterpret_cast(importPath); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + const auto _importKinds = static_cast(importKinds); + auto result = GetImpl()->CreateETSImportDeclaration(_context, _importPath, _specifiers, _specifiersSequenceLength, _importKinds); + return result; +} +KOALA_INTEROP_5(CreateETSImportDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt); + +KNativePointer impl_UpdateETSImportDeclaration(KNativePointer context, KNativePointer original, KNativePointer importPath, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KInt importKinds) { const auto _context = reinterpret_cast(context); const auto _original = reinterpret_cast(original); - const auto _source = reinterpret_cast(source); + const auto _importPath = reinterpret_cast(importPath); const auto _specifiers = reinterpret_cast(specifiers); const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); - const auto _importKind = static_cast(importKind); - auto result = GetImpl()->UpdateETSImportDeclaration(_context, _original, _source, _specifiers, _specifiersSequenceLength, _importKind); + const auto _importKinds = static_cast(importKinds); + auto result = GetImpl()->UpdateETSImportDeclaration(_context, _original, _importPath, _specifiers, _specifiersSequenceLength, _importKinds); return result; } KOALA_INTEROP_6(UpdateETSImportDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt); +void impl_ETSImportDeclarationSetImportMetadata(KNativePointer context, KNativePointer receiver, KInt importFlags, KInt lang, KStringPtr& resolvedSource, KStringPtr& declPath, KStringPtr& ohmUrl) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _importFlags = static_cast(importFlags); + const auto _lang = static_cast(lang); + const auto _resolvedSource = getStringCopy(resolvedSource); + const auto _declPath = getStringCopy(declPath); + const auto _ohmUrl = getStringCopy(ohmUrl); + GetImpl()->ETSImportDeclarationSetImportMetadata(_context, _receiver, _importFlags, _lang, _resolvedSource, _declPath, _ohmUrl); + return ; +} +KOALA_INTEROP_V7(ETSImportDeclarationSetImportMetadata, KNativePointer, KNativePointer, KInt, KInt, KStringPtr, KStringPtr, KStringPtr); + +KNativePointer impl_ETSImportDeclarationDeclPathConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSImportDeclarationDeclPathConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ETSImportDeclarationDeclPathConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSImportDeclarationOhmUrlConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSImportDeclarationOhmUrlConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ETSImportDeclarationOhmUrlConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ETSImportDeclarationIsValidConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSImportDeclarationIsValidConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSImportDeclarationIsValidConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ETSImportDeclarationIsPureDynamicConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSImportDeclarationIsPureDynamicConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSImportDeclarationIsPureDynamicConst, KBoolean, KNativePointer, KNativePointer); + +// no ETSImportDeclarationAssemblerName +//KNativePointer impl_ETSImportDeclarationAssemblerName(KNativePointer context, KNativePointer receiver) +//{ +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// auto result = GetImpl()->ETSImportDeclarationAssemblerName(_context, _receiver); +// return StageArena::strdup(result); +//} +//KOALA_INTEROP_2(ETSImportDeclarationAssemblerName, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_ETSImportDeclarationAssemblerNameConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSImportDeclarationAssemblerNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ETSImportDeclarationAssemblerNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -6771,7 +7467,7 @@ KNativePointer impl_ETSImportDeclarationResolvedSourceConst(KNativePointer conte const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSImportDeclarationResolvedSourceConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ETSImportDeclarationResolvedSourceConst, KNativePointer, KNativePointer, KNativePointer); @@ -6821,7 +7517,7 @@ KNativePointer impl_TSModuleBlockStatementsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSModuleBlockStatementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSModuleBlockStatementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -6892,6 +7588,15 @@ void impl_ETSNewArrayInstanceExpressionSetDimension(KNativePointer context, KNat } KOALA_INTEROP_V3(ETSNewArrayInstanceExpressionSetDimension, KNativePointer, KNativePointer, KNativePointer); +void impl_ETSNewArrayInstanceExpressionClearPreferredType(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ETSNewArrayInstanceExpressionClearPreferredType(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ETSNewArrayInstanceExpressionClearPreferredType, KNativePointer, KNativePointer); + KNativePointer impl_CreateAnnotationDeclaration(KNativePointer context, KNativePointer expr) { const auto _context = reinterpret_cast(context); @@ -6939,7 +7644,7 @@ KNativePointer impl_AnnotationDeclarationInternalNameConst(KNativePointer contex const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AnnotationDeclarationInternalNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(AnnotationDeclarationInternalNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -6977,7 +7682,7 @@ KNativePointer impl_AnnotationDeclarationProperties(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationProperties(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AnnotationDeclarationProperties, KNativePointer, KNativePointer, KNativePointer); @@ -6987,20 +7692,10 @@ KNativePointer impl_AnnotationDeclarationPropertiesConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationPropertiesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AnnotationDeclarationPropertiesConst, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_AnnotationDeclarationPropertiesPtrConst(KNativePointer context, KNativePointer receiver) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - std::size_t length; - auto result = GetImpl()->AnnotationDeclarationPropertiesPtrConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); -} -KOALA_INTEROP_2(AnnotationDeclarationPropertiesPtrConst, KNativePointer, KNativePointer, KNativePointer); - void impl_AnnotationDeclarationAddProperties(KNativePointer context, KNativePointer receiver, KNativePointerArray properties, KUInt propertiesSequenceLength) { const auto _context = reinterpret_cast(context); @@ -7081,7 +7776,7 @@ KNativePointer impl_AnnotationDeclarationAnnotations(KNativePointer context, KNa const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AnnotationDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -7091,7 +7786,7 @@ KNativePointer impl_AnnotationDeclarationAnnotationsConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AnnotationDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -7106,16 +7801,16 @@ void impl_AnnotationDeclarationSetAnnotations(KNativePointer context, KNativePoi } KOALA_INTEROP_V4(AnnotationDeclarationSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); -KNativePointer impl_CreateAnnotationUsageIr(KNativePointer context, KNativePointer expr) +KNativePointer impl_CreateAnnotationUsage(KNativePointer context, KNativePointer expr) { const auto _context = reinterpret_cast(context); const auto _expr = reinterpret_cast(expr); auto result = GetImpl()->CreateAnnotationUsageIr(_context, _expr); return result; } -KOALA_INTEROP_2(CreateAnnotationUsageIr, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(CreateAnnotationUsage, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_UpdateAnnotationUsageIr(KNativePointer context, KNativePointer original, KNativePointer expr) +KNativePointer impl_UpdateAnnotationUsage(KNativePointer context, KNativePointer original, KNativePointer expr) { const auto _context = reinterpret_cast(context); const auto _original = reinterpret_cast(original); @@ -7123,9 +7818,9 @@ KNativePointer impl_UpdateAnnotationUsageIr(KNativePointer context, KNativePoint auto result = GetImpl()->UpdateAnnotationUsageIr(_context, _original, _expr); return result; } -KOALA_INTEROP_3(UpdateAnnotationUsageIr, KNativePointer, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_3(UpdateAnnotationUsage, KNativePointer, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_CreateAnnotationUsageIr1(KNativePointer context, KNativePointer expr, KNativePointerArray properties, KUInt propertiesSequenceLength) +KNativePointer impl_CreateAnnotationUsage1(KNativePointer context, KNativePointer expr, KNativePointerArray properties, KUInt propertiesSequenceLength) { const auto _context = reinterpret_cast(context); const auto _expr = reinterpret_cast(expr); @@ -7134,9 +7829,9 @@ KNativePointer impl_CreateAnnotationUsageIr1(KNativePointer context, KNativePoin auto result = GetImpl()->CreateAnnotationUsageIr1(_context, _expr, _properties, _propertiesSequenceLength); return result; } -KOALA_INTEROP_4(CreateAnnotationUsageIr1, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +KOALA_INTEROP_4(CreateAnnotationUsage1, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); -KNativePointer impl_UpdateAnnotationUsageIr1(KNativePointer context, KNativePointer original, KNativePointer expr, KNativePointerArray properties, KUInt propertiesSequenceLength) +KNativePointer impl_UpdateAnnotationUsage1(KNativePointer context, KNativePointer original, KNativePointer expr, KNativePointerArray properties, KUInt propertiesSequenceLength) { const auto _context = reinterpret_cast(context); const auto _original = reinterpret_cast(original); @@ -7146,48 +7841,38 @@ KNativePointer impl_UpdateAnnotationUsageIr1(KNativePointer context, KNativePoin auto result = GetImpl()->UpdateAnnotationUsageIr1(_context, _original, _expr, _properties, _propertiesSequenceLength); return result; } -KOALA_INTEROP_5(UpdateAnnotationUsageIr1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +KOALA_INTEROP_5(UpdateAnnotationUsage1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); -KNativePointer impl_AnnotationUsageIrExpr(KNativePointer context, KNativePointer receiver) +KNativePointer impl_AnnotationUsageExpr(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AnnotationUsageIrExpr(_context, _receiver); return result; } -KOALA_INTEROP_2(AnnotationUsageIrExpr, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(AnnotationUsageExpr, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_AnnotationUsageIrProperties(KNativePointer context, KNativePointer receiver) +KNativePointer impl_AnnotationUsageProperties(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationUsageIrProperties(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } -KOALA_INTEROP_2(AnnotationUsageIrProperties, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(AnnotationUsageProperties, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_AnnotationUsageIrPropertiesConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_AnnotationUsagePropertiesConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationUsageIrPropertiesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); -} -KOALA_INTEROP_2(AnnotationUsageIrPropertiesConst, KNativePointer, KNativePointer, KNativePointer); - -KNativePointer impl_AnnotationUsageIrPropertiesPtrConst(KNativePointer context, KNativePointer receiver) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - std::size_t length; - auto result = GetImpl()->AnnotationUsageIrPropertiesPtrConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } -KOALA_INTEROP_2(AnnotationUsageIrPropertiesPtrConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(AnnotationUsagePropertiesConst, KNativePointer, KNativePointer, KNativePointer); -void impl_AnnotationUsageIrAddProperty(KNativePointer context, KNativePointer receiver, KNativePointer property) +void impl_AnnotationUsageAddProperty(KNativePointer context, KNativePointer receiver, KNativePointer property) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); @@ -7195,9 +7880,9 @@ void impl_AnnotationUsageIrAddProperty(KNativePointer context, KNativePointer re GetImpl()->AnnotationUsageIrAddProperty(_context, _receiver, _property); return ; } -KOALA_INTEROP_V3(AnnotationUsageIrAddProperty, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_V3(AnnotationUsageAddProperty, KNativePointer, KNativePointer, KNativePointer); -void impl_AnnotationUsageIrSetProperties(KNativePointer context, KNativePointer receiver, KNativePointerArray properties, KUInt propertiesSequenceLength) +void impl_AnnotationUsageSetProperties(KNativePointer context, KNativePointer receiver, KNativePointerArray properties, KUInt propertiesSequenceLength) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); @@ -7206,16 +7891,16 @@ void impl_AnnotationUsageIrSetProperties(KNativePointer context, KNativePointer GetImpl()->AnnotationUsageIrSetProperties(_context, _receiver, _properties, _propertiesSequenceLength); return ; } -KOALA_INTEROP_V4(AnnotationUsageIrSetProperties, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +KOALA_INTEROP_V4(AnnotationUsageSetProperties, KNativePointer, KNativePointer, KNativePointerArray, KUInt); -KNativePointer impl_AnnotationUsageIrGetBaseNameConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_AnnotationUsageGetBaseNameConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AnnotationUsageIrGetBaseNameConst(_context, _receiver); return (void*)result; } -KOALA_INTEROP_2(AnnotationUsageIrGetBaseNameConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(AnnotationUsageGetBaseNameConst, KNativePointer, KNativePointer, KNativePointer); KNativePointer impl_CreateEmptyStatement(KNativePointer context) { @@ -7234,6 +7919,34 @@ KNativePointer impl_UpdateEmptyStatement(KNativePointer context, KNativePointer } KOALA_INTEROP_2(UpdateEmptyStatement, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_CreateEmptyStatement1(KNativePointer context, KBoolean isBrokenStatement) +{ + const auto _context = reinterpret_cast(context); + const auto _isBrokenStatement = static_cast(isBrokenStatement); + auto result = GetImpl()->CreateEmptyStatement1(_context, _isBrokenStatement); + return result; +} +KOALA_INTEROP_2(CreateEmptyStatement1, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateEmptyStatement1(KNativePointer context, KNativePointer original, KBoolean isBrokenStatement) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _isBrokenStatement = static_cast(isBrokenStatement); + auto result = GetImpl()->UpdateEmptyStatement1(_context, _original, _isBrokenStatement); + return result; +} +KOALA_INTEROP_3(UpdateEmptyStatement1, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KBoolean impl_EmptyStatementIsBrokenStatement(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->EmptyStatementIsBrokenStatement(_context, _receiver); + return result; +} +KOALA_INTEROP_2(EmptyStatementIsBrokenStatement, KBoolean, KNativePointer, KNativePointer); + KNativePointer impl_CreateWhileStatement(KNativePointer context, KNativePointer test, KNativePointer body) { const auto _context = reinterpret_cast(context); @@ -7310,7 +8023,7 @@ KNativePointer impl_FunctionSignatureParamsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->FunctionSignatureParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(FunctionSignatureParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -7320,7 +8033,7 @@ KNativePointer impl_FunctionSignatureParams(KNativePointer context, KNativePoint const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->FunctionSignatureParams(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(FunctionSignatureParams, KNativePointer, KNativePointer, KNativePointer); @@ -7425,6 +8138,17 @@ KNativePointer impl_ChainExpressionGetExpression(KNativePointer context, KNative } KOALA_INTEROP_2(ChainExpressionGetExpression, KNativePointer, KNativePointer, KNativePointer); +void impl_ChainExpressionCompileToRegConst(KNativePointer context, KNativePointer receiver, KNativePointer pg, KNativePointer objReg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _pg = reinterpret_cast(pg); + const auto _objReg = reinterpret_cast(objReg); + GetImpl()->ChainExpressionCompileToRegConst(_context, _receiver, _pg, _objReg); + return ; +} +KOALA_INTEROP_V4(ChainExpressionCompileToRegConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateTSIntersectionType(KNativePointer context, KNativePointerArray types, KUInt typesSequenceLength) { const auto _context = reinterpret_cast(context); @@ -7452,7 +8176,7 @@ KNativePointer impl_TSIntersectionTypeTypesConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSIntersectionTypeTypesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSIntersectionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); @@ -7542,7 +8266,7 @@ KNativePointer impl_BlockExpressionStatementsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->BlockExpressionStatementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(BlockExpressionStatementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -7552,7 +8276,7 @@ KNativePointer impl_BlockExpressionStatements(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->BlockExpressionStatements(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(BlockExpressionStatements, KNativePointer, KNativePointer, KNativePointer); @@ -7604,7 +8328,7 @@ KNativePointer impl_TSTypeLiteralMembersConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeLiteralMembersConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeLiteralMembersConst, KNativePointer, KNativePointer, KNativePointer); @@ -7727,7 +8451,7 @@ KNativePointer impl_TSTypeParameterAnnotations(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeParameterAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeParameterAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -7737,7 +8461,7 @@ KNativePointer impl_TSTypeParameterAnnotationsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeParameterAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeParameterAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -7823,7 +8547,7 @@ KNativePointer impl_SpreadElementDecoratorsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SpreadElementDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(SpreadElementDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -8052,10 +8776,21 @@ KNativePointer impl_ExportNamedDeclarationSpecifiersConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ExportNamedDeclarationSpecifiersConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ExportNamedDeclarationSpecifiersConst, KNativePointer, KNativePointer, KNativePointer); +void impl_ExportNamedDeclarationReplaceSpecifiers(KNativePointer context, KNativePointer receiver, KNativePointerArray specifiers, KUInt specifiersSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + GetImpl()->ExportNamedDeclarationReplaceSpecifiers(_context, _receiver, _specifiers, _specifiersSequenceLength); + return ; +} +KOALA_INTEROP_V4(ExportNamedDeclarationReplaceSpecifiers, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + KNativePointer impl_CreateETSParameterExpression(KNativePointer context, KNativePointer identOrSpread, KBoolean isOptional) { const auto _context = reinterpret_cast(context); @@ -8103,7 +8838,7 @@ KNativePointer impl_ETSParameterExpressionNameConst(KNativePointer context, KNat const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSParameterExpressionNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ETSParameterExpressionNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -8186,7 +8921,7 @@ KNativePointer impl_ETSParameterExpressionLexerSavedConst(KNativePointer context const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSParameterExpressionLexerSavedConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ETSParameterExpressionLexerSavedConst, KNativePointer, KNativePointer, KNativePointer); @@ -8281,7 +9016,7 @@ KNativePointer impl_ETSParameterExpressionAnnotations(KNativePointer context, KN const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSParameterExpressionAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSParameterExpressionAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -8291,7 +9026,7 @@ KNativePointer impl_ETSParameterExpressionAnnotationsConst(KNativePointer contex const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSParameterExpressionAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSParameterExpressionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -8333,7 +9068,7 @@ KNativePointer impl_TSTypeParameterInstantiationParamsConst(KNativePointer conte const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeParameterInstantiationParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeParameterInstantiationParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -8423,13 +9158,23 @@ KNativePointer impl_SwitchCaseStatementTestConst(KNativePointer context, KNative } KOALA_INTEROP_2(SwitchCaseStatementTestConst, KNativePointer, KNativePointer, KNativePointer); +void impl_SwitchCaseStatementSetTest(KNativePointer context, KNativePointer receiver, KNativePointer test) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _test = reinterpret_cast(test); + GetImpl()->SwitchCaseStatementSetTest(_context, _receiver, _test); + return ; +} +KOALA_INTEROP_V3(SwitchCaseStatementSetTest, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_SwitchCaseStatementConsequentConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SwitchCaseStatementConsequentConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(SwitchCaseStatementConsequentConst, KNativePointer, KNativePointer, KNativePointer); @@ -8609,7 +9354,7 @@ KNativePointer impl_ClassStaticBlockNameConst(KNativePointer context, KNativePoi const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ClassStaticBlockNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ClassStaticBlockNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -8848,7 +9593,7 @@ KNativePointer impl_TemplateLiteralQuasisConst(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TemplateLiteralQuasisConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TemplateLiteralQuasisConst, KNativePointer, KNativePointer, KNativePointer); @@ -8858,7 +9603,7 @@ KNativePointer impl_TemplateLiteralExpressionsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TemplateLiteralExpressionsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TemplateLiteralExpressionsConst, KNativePointer, KNativePointer, KNativePointer); @@ -8867,7 +9612,7 @@ KNativePointer impl_TemplateLiteralGetMultilineStringConst(KNativePointer contex const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TemplateLiteralGetMultilineStringConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TemplateLiteralGetMultilineStringConst, KNativePointer, KNativePointer, KNativePointer); @@ -8898,7 +9643,7 @@ KNativePointer impl_TSUnionTypeTypesConst(KNativePointer context, KNativePointer const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSUnionTypeTypesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSUnionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); @@ -8981,7 +9726,7 @@ KNativePointer impl_IdentifierNameConst(KNativePointer context, KNativePointer r const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->IdentifierNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(IdentifierNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -8990,7 +9735,7 @@ KNativePointer impl_IdentifierName(KNativePointer context, KNativePointer receiv const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->IdentifierName(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(IdentifierName, KNativePointer, KNativePointer, KNativePointer); @@ -9010,7 +9755,7 @@ KNativePointer impl_IdentifierDecoratorsConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->IdentifierDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(IdentifierDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -9269,7 +10014,7 @@ KNativePointer impl_BlockStatementStatementsConst(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->BlockStatementStatementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(BlockStatementStatementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -9279,7 +10024,7 @@ KNativePointer impl_BlockStatementStatements(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->BlockStatementStatements(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(BlockStatementStatements, KNativePointer, KNativePointer, KNativePointer); @@ -9294,6 +10039,27 @@ void impl_BlockStatementSetStatements(KNativePointer context, KNativePointer rec } KOALA_INTEROP_V4(BlockStatementSetStatements, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +void impl_BlockStatementAddStatement(KNativePointer context, KNativePointer receiver, KNativePointer stmt) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _stmt = reinterpret_cast(stmt); + GetImpl()->BlockStatementAddStatement(_context, _receiver, _stmt); + return ; +} +KOALA_INTEROP_V3(BlockStatementAddStatement, KNativePointer, KNativePointer, KNativePointer); + +void impl_BlockStatementAddStatements(KNativePointer context, KNativePointer receiver, KNativePointerArray stmts, KUInt stmtsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _stmts = reinterpret_cast(stmts); + const auto _stmtsSequenceLength = static_cast(stmtsSequenceLength); + GetImpl()->BlockStatementAddStatements(_context, _receiver, _stmts, _stmtsSequenceLength); + return ; +} +KOALA_INTEROP_V4(BlockStatementAddStatements, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + void impl_BlockStatementAddTrailingBlock(KNativePointer context, KNativePointer receiver, KNativePointer stmt, KNativePointer trailingBlock) { const auto _context = reinterpret_cast(context); @@ -9363,7 +10129,7 @@ KNativePointer impl_TSTypeParameterDeclarationParamsConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeParameterDeclarationParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeParameterDeclarationParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -9431,6 +10197,15 @@ KBoolean impl_MethodDefinitionIsConstructorConst(KNativePointer context, KNative } KOALA_INTEROP_2(MethodDefinitionIsConstructorConst, KBoolean, KNativePointer, KNativePointer); +KBoolean impl_MethodDefinitionIsMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionIsMethodConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionIsMethodConst, KBoolean, KNativePointer, KNativePointer); + KBoolean impl_MethodDefinitionIsExtensionMethodConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -9440,13 +10215,50 @@ KBoolean impl_MethodDefinitionIsExtensionMethodConst(KNativePointer context, KNa } KOALA_INTEROP_2(MethodDefinitionIsExtensionMethodConst, KBoolean, KNativePointer, KNativePointer); +KBoolean impl_MethodDefinitionIsGetterConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionIsGetterConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionIsGetterConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_MethodDefinitionIsSetterConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionIsSetterConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionIsSetterConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_MethodDefinitionIsDefaultAccessModifierConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionIsDefaultAccessModifierConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionIsDefaultAccessModifierConst, KBoolean, KNativePointer, KNativePointer); + +void impl_MethodDefinitionSetDefaultAccessModifier(KNativePointer context, KNativePointer receiver, KBoolean isDefault) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isDefault = static_cast(isDefault); + GetImpl()->MethodDefinitionSetDefaultAccessModifier(_context, _receiver, _isDefault); + return ; +} +KOALA_INTEROP_V3(MethodDefinitionSetDefaultAccessModifier, KNativePointer, KNativePointer, KBoolean); + KNativePointer impl_MethodDefinitionOverloadsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->MethodDefinitionOverloadsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(MethodDefinitionOverloadsConst, KNativePointer, KNativePointer, KNativePointer); @@ -9564,6 +10376,15 @@ KNativePointer impl_MethodDefinitionFunctionConst(KNativePointer context, KNativ } KOALA_INTEROP_2(MethodDefinitionFunctionConst, KNativePointer, KNativePointer, KNativePointer); +void impl_MethodDefinitionInitializeOverloadInfo(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->MethodDefinitionInitializeOverloadInfo(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(MethodDefinitionInitializeOverloadInfo, KNativePointer, KNativePointer); + KNativePointer impl_CreateTSNullKeyword(KNativePointer context) { const auto _context = reinterpret_cast(context); @@ -9731,7 +10552,7 @@ KNativePointer impl_ExpressionToStringConst(KNativePointer context, KNativePoint const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ExpressionToStringConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ExpressionToStringConst, KNativePointer, KNativePointer, KNativePointer); @@ -9781,6 +10602,17 @@ KNativePointer impl_CreateSrcDumper(KNativePointer context, KNativePointer node) } KOALA_INTEROP_2(CreateSrcDumper, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_CreateSrcDumper1(KNativePointer context, KNativePointer node, KBoolean isDeclgen, KBoolean isIsolatedDeclgen) +{ + const auto _context = reinterpret_cast(context); + const auto _node = reinterpret_cast(node); + const auto _isDeclgen = static_cast(isDeclgen); + const auto _isIsolatedDeclgen = static_cast(isIsolatedDeclgen); + auto result = GetImpl()->CreateSrcDumper1(_context, _node, _isDeclgen, _isIsolatedDeclgen); + return result; +} +KOALA_INTEROP_4(CreateSrcDumper1, KNativePointer, KNativePointer, KNativePointer, KBoolean, KBoolean); + void impl_SrcDumperAdd(KNativePointer context, KNativePointer receiver, KStringPtr& str) { const auto _context = reinterpret_cast(context); @@ -9836,7 +10668,7 @@ KNativePointer impl_SrcDumperStrConst(KNativePointer context, KNativePointer rec const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->SrcDumperStrConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(SrcDumperStrConst, KNativePointer, KNativePointer, KNativePointer); @@ -9868,6 +10700,62 @@ void impl_SrcDumperEndl(KNativePointer context, KNativePointer receiver, KUInt n } KOALA_INTEROP_V3(SrcDumperEndl, KNativePointer, KNativePointer, KUInt); +KBoolean impl_SrcDumperIsDeclgenConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SrcDumperIsDeclgenConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(SrcDumperIsDeclgenConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_SrcDumperIsIsolatedDeclgenConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SrcDumperIsIsolatedDeclgenConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(SrcDumperIsIsolatedDeclgenConst, KBoolean, KNativePointer, KNativePointer); + +void impl_SrcDumperDumpNode(KNativePointer context, KNativePointer receiver, KStringPtr& key) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _key = getStringCopy(key); + GetImpl()->SrcDumperDumpNode(_context, _receiver, _key); + return ; +} +KOALA_INTEROP_V3(SrcDumperDumpNode, KNativePointer, KNativePointer, KStringPtr); + +void impl_SrcDumperRemoveNode(KNativePointer context, KNativePointer receiver, KStringPtr& key) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _key = getStringCopy(key); + GetImpl()->SrcDumperRemoveNode(_context, _receiver, _key); + return ; +} +KOALA_INTEROP_V3(SrcDumperRemoveNode, KNativePointer, KNativePointer, KStringPtr); + +KBoolean impl_SrcDumperIsIndirectDepPhaseConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SrcDumperIsIndirectDepPhaseConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(SrcDumperIsIndirectDepPhaseConst, KBoolean, KNativePointer, KNativePointer); + +void impl_SrcDumperRun(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->SrcDumperRun(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(SrcDumperRun, KNativePointer, KNativePointer); + KNativePointer impl_CreateETSClassLiteral(KNativePointer context, KNativePointer expr) { const auto _context = reinterpret_cast(context); @@ -9959,6 +10847,15 @@ KNativePointer impl_BreakStatementTargetConst(KNativePointer context, KNativePoi } KOALA_INTEROP_2(BreakStatementTargetConst, KNativePointer, KNativePointer, KNativePointer); +KBoolean impl_BreakStatementHasTargetConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BreakStatementHasTargetConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(BreakStatementHasTargetConst, KBoolean, KNativePointer, KNativePointer); + void impl_BreakStatementSetTarget(KNativePointer context, KNativePointer receiver, KNativePointer target) { const auto _context = reinterpret_cast(context); @@ -9997,7 +10894,7 @@ KNativePointer impl_RegExpLiteralPatternConst(KNativePointer context, KNativePoi const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->RegExpLiteralPatternConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(RegExpLiteralPatternConst, KNativePointer, KNativePointer, KNativePointer); @@ -10131,7 +11028,7 @@ KNativePointer impl_ClassDeclarationDecoratorsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -10236,7 +11133,7 @@ KNativePointer impl_TSQualifiedNameNameConst(KNativePointer context, KNativePoin const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TSQualifiedNameNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TSQualifiedNameNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -10294,6 +11191,16 @@ KNativePointer impl_CreateValidationInfo(KNativePointer context) } KOALA_INTEROP_1(CreateValidationInfo, KNativePointer, KNativePointer); +KNativePointer impl_CreateValidationInfo1(KNativePointer context, KStringPtr& m, KNativePointer p) +{ + const auto _context = reinterpret_cast(context); + const auto _m = getStringCopy(m); + const auto _p = reinterpret_cast(p); + auto result = GetImpl()->CreateValidationInfo1(_context, _m, _p); + return result; +} +KOALA_INTEROP_3(CreateValidationInfo1, KNativePointer, KNativePointer, KStringPtr, KNativePointer); + KBoolean impl_ValidationInfoFailConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -10366,6 +11273,15 @@ KNativePointer impl_ContinueStatementTargetConst(KNativePointer context, KNative } KOALA_INTEROP_2(ContinueStatementTargetConst, KNativePointer, KNativePointer, KNativePointer); +KBoolean impl_ContinueStatementHasTargetConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ContinueStatementHasTargetConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ContinueStatementHasTargetConst, KBoolean, KNativePointer, KNativePointer); + void impl_ContinueStatementSetTarget(KNativePointer context, KNativePointer receiver, KNativePointer target) { const auto _context = reinterpret_cast(context); @@ -10442,7 +11358,7 @@ KNativePointer impl_ETSNewMultiDimArrayInstanceExpressionDimensions(KNativePoint const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSNewMultiDimArrayInstanceExpressionDimensions(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSNewMultiDimArrayInstanceExpressionDimensions, KNativePointer, KNativePointer, KNativePointer); @@ -10452,10 +11368,19 @@ KNativePointer impl_ETSNewMultiDimArrayInstanceExpressionDimensionsConst(KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSNewMultiDimArrayInstanceExpressionDimensionsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSNewMultiDimArrayInstanceExpressionDimensionsConst, KNativePointer, KNativePointer, KNativePointer); +void impl_ETSNewMultiDimArrayInstanceExpressionClearPreferredType(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ETSNewMultiDimArrayInstanceExpressionClearPreferredType(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ETSNewMultiDimArrayInstanceExpressionClearPreferredType, KNativePointer, KNativePointer); + KNativePointer impl_CreateTSNamedTupleMember(KNativePointer context, KNativePointer label, KNativePointer elementType, KBoolean optional_arg) { const auto _context = reinterpret_cast(context); @@ -10568,7 +11493,7 @@ KNativePointer impl_AstDumperModifierToString(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); const auto _flags = static_cast(flags); auto result = GetImpl()->AstDumperModifierToString(_context, _receiver, _flags); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_3(AstDumperModifierToString, KNativePointer, KNativePointer, KNativePointer, KInt); @@ -10578,7 +11503,7 @@ KNativePointer impl_AstDumperTypeOperatorToString(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); const auto _operatorType = static_cast(operatorType); auto result = GetImpl()->AstDumperTypeOperatorToString(_context, _receiver, _operatorType); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_3(AstDumperTypeOperatorToString, KNativePointer, KNativePointer, KNativePointer, KInt); @@ -10587,43 +11512,43 @@ KNativePointer impl_AstDumperStrConst(KNativePointer context, KNativePointer rec const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AstDumperStrConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(AstDumperStrConst, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_CreateETSNullTypeIr(KNativePointer context) +KNativePointer impl_CreateETSNullType(KNativePointer context) { const auto _context = reinterpret_cast(context); auto result = GetImpl()->CreateETSNullTypeIr(_context); return result; } -KOALA_INTEROP_1(CreateETSNullTypeIr, KNativePointer, KNativePointer); +KOALA_INTEROP_1(CreateETSNullType, KNativePointer, KNativePointer); -KNativePointer impl_UpdateETSNullTypeIr(KNativePointer context, KNativePointer original) +KNativePointer impl_UpdateETSNullType(KNativePointer context, KNativePointer original) { const auto _context = reinterpret_cast(context); const auto _original = reinterpret_cast(original); auto result = GetImpl()->UpdateETSNullTypeIr(_context, _original); return result; } -KOALA_INTEROP_2(UpdateETSNullTypeIr, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(UpdateETSNullType, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_CreateETSUndefinedTypeIr(KNativePointer context) +KNativePointer impl_CreateETSUndefinedType(KNativePointer context) { const auto _context = reinterpret_cast(context); auto result = GetImpl()->CreateETSUndefinedTypeIr(_context); return result; } -KOALA_INTEROP_1(CreateETSUndefinedTypeIr, KNativePointer, KNativePointer); +KOALA_INTEROP_1(CreateETSUndefinedType, KNativePointer, KNativePointer); -KNativePointer impl_UpdateETSUndefinedTypeIr(KNativePointer context, KNativePointer original) +KNativePointer impl_UpdateETSUndefinedType(KNativePointer context, KNativePointer original) { const auto _context = reinterpret_cast(context); const auto _original = reinterpret_cast(original); auto result = GetImpl()->UpdateETSUndefinedTypeIr(_context, _original); return result; } -KOALA_INTEROP_2(UpdateETSUndefinedTypeIr, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(UpdateETSUndefinedType, KNativePointer, KNativePointer, KNativePointer); KNativePointer impl_CreateTypeofExpression(KNativePointer context, KNativePointer argument) { @@ -10747,7 +11672,7 @@ KNativePointer impl_TSEnumMemberNameConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TSEnumMemberNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TSEnumMemberNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -10792,13 +11717,23 @@ KNativePointer impl_SwitchStatementDiscriminant(KNativePointer context, KNativeP } KOALA_INTEROP_2(SwitchStatementDiscriminant, KNativePointer, KNativePointer, KNativePointer); +void impl_SwitchStatementSetDiscriminant(KNativePointer context, KNativePointer receiver, KNativePointer discriminant) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _discriminant = reinterpret_cast(discriminant); + GetImpl()->SwitchStatementSetDiscriminant(_context, _receiver, _discriminant); + return ; +} +KOALA_INTEROP_V3(SwitchStatementSetDiscriminant, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_SwitchStatementCasesConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SwitchStatementCasesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(SwitchStatementCasesConst, KNativePointer, KNativePointer, KNativePointer); @@ -10808,7 +11743,7 @@ KNativePointer impl_SwitchStatementCases(KNativePointer context, KNativePointer const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SwitchStatementCases(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(SwitchStatementCases, KNativePointer, KNativePointer, KNativePointer); @@ -10890,6 +11825,25 @@ KNativePointer impl_UpdateCatchClause(KNativePointer context, KNativePointer ori } KOALA_INTEROP_4(UpdateCatchClause, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_CreateCatchClause1(KNativePointer context, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->CreateCatchClause1(_context, _other); + return result; +} +KOALA_INTEROP_2(CreateCatchClause1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateCatchClause1(KNativePointer context, KNativePointer original, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->UpdateCatchClause1(_context, _original, _other); + return result; +} +KOALA_INTEROP_3(UpdateCatchClause1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CatchClauseParam(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -10962,7 +11916,7 @@ KNativePointer impl_SequenceExpressionSequenceConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SequenceExpressionSequenceConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(SequenceExpressionSequenceConst, KNativePointer, KNativePointer, KNativePointer); @@ -10972,7 +11926,7 @@ KNativePointer impl_SequenceExpressionSequence(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SequenceExpressionSequence(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(SequenceExpressionSequence, KNativePointer, KNativePointer, KNativePointer); @@ -11047,7 +12001,7 @@ KNativePointer impl_ArrowFunctionExpressionAnnotations(KNativePointer context, K const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrowFunctionExpressionAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ArrowFunctionExpressionAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -11057,7 +12011,7 @@ KNativePointer impl_ArrowFunctionExpressionAnnotationsConst(KNativePointer conte const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrowFunctionExpressionAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ArrowFunctionExpressionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -11146,7 +12100,7 @@ KNativePointer impl_ETSNewClassInstanceExpressionGetArguments(KNativePointer con const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSNewClassInstanceExpressionGetArguments(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSNewClassInstanceExpressionGetArguments, KNativePointer, KNativePointer, KNativePointer); @@ -11156,7 +12110,7 @@ KNativePointer impl_ETSNewClassInstanceExpressionGetArgumentsConst(KNativePointe const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSNewClassInstanceExpressionGetArgumentsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSNewClassInstanceExpressionGetArgumentsConst, KNativePointer, KNativePointer, KNativePointer); @@ -11432,6 +12386,15 @@ KNativePointer impl_ETSTypeReferencePartNameConst(KNativePointer context, KNativ } KOALA_INTEROP_2(ETSTypeReferencePartNameConst, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_ETSTypeReferencePartGetIdent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTypeReferencePartGetIdent(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSTypeReferencePartGetIdent, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_ETSReExportDeclarationGetETSImportDeclarationsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -11455,7 +12418,7 @@ KNativePointer impl_ETSReExportDeclarationGetProgramPathConst(KNativePointer con const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSReExportDeclarationGetProgramPathConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ETSReExportDeclarationGetProgramPathConst, KNativePointer, KNativePointer, KNativePointer); @@ -11493,7 +12456,7 @@ KNativePointer impl_TypeNodeAnnotations(KNativePointer context, KNativePointer r const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TypeNodeAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TypeNodeAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -11503,7 +12466,7 @@ KNativePointer impl_TypeNodeAnnotationsConst(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TypeNodeAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TypeNodeAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -11556,7 +12519,7 @@ KNativePointer impl_NewExpressionArgumentsConst(KNativePointer context, KNativeP const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->NewExpressionArgumentsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(NewExpressionArgumentsConst, KNativePointer, KNativePointer, KNativePointer); @@ -11716,3 +12679,4 @@ KNativePointer impl_CreateFunctionDecl(KNativePointer context, KStringPtr& name, return result; } KOALA_INTEROP_3(CreateFunctionDecl, KNativePointer, KNativePointer, KStringPtr, KNativePointer); + -- Gitee From f631efaec2ae01c7d0446417465097e7131a1488 Mon Sep 17 00:00:00 2001 From: Keerecles Date: Tue, 10 Jun 2025 19:20:59 +0800 Subject: [PATCH 02/17] Update TS Wrapper: update function name Signed-off-by: Keerecles Change-Id: I2d9cb61644cd0beb1df0b4702be0e8a93982dffb --- koala-wrapper/src/Es2pandaNativeModule.ts | 12 ++-- .../src/generated/Es2pandaNativeModule.ts | 63 +++++++++---------- .../src/generated/peers/AnnotationUsage.ts | 16 ++--- .../src/generated/peers/ETSFunctionType.ts | 22 +++---- .../src/generated/peers/ETSNullType.ts | 4 +- .../src/generated/peers/ETSUndefinedType.ts | 4 +- .../src/generated/peers/ETSUnionType.ts | 6 +- 7 files changed, 62 insertions(+), 65 deletions(-) diff --git a/koala-wrapper/src/Es2pandaNativeModule.ts b/koala-wrapper/src/Es2pandaNativeModule.ts index 99942dce5..a92cdcd82 100644 --- a/koala-wrapper/src/Es2pandaNativeModule.ts +++ b/koala-wrapper/src/Es2pandaNativeModule.ts @@ -55,10 +55,10 @@ export class Es2pandaNativeModule { _ClassElementValue(context: KPtr, node: KPtr): KPtr { throw new Error('Not implemented'); } - _AnnotationUsageIrExpr(context: KPtr, node: KPtr): KPtr { + _AnnotationUsageExpr(context: KPtr, node: KPtr): KPtr { throw new Error('Not implemented'); } - _AnnotationUsageIrPropertiesConst(context: KPtr, node: KPtr, returnLen: KPtr): KPtr { + _AnnotationUsagePropertiesConst(context: KPtr, node: KPtr, returnLen: KPtr): KPtr { throw new Error('Not implemented'); } _AnnotationAllowedAnnotations(context: KPtr, node: KPtr, returnLen: KPtr): KPtr { @@ -544,10 +544,10 @@ export class Es2pandaNativeModule { _TSUnionTypeTypesConst(context: KPtr, node: KPtr, returnTypeLen: KPtr): KPtr { throw new Error('Not implemented'); } - _CreateETSUnionTypeIr(context: KPtr, types: KPtrArray, typesLen: KInt): KPtr { + _CreateETSUnionType(context: KPtr, types: KPtrArray, typesLen: KInt): KPtr { throw new Error('Not implemented'); } - _ETSUnionTypeIrTypesConst(context: KPtr, node: KPtr, returnTypeLen: KPtr): KPtr { + _ETSUnionTypTypesConst(context: KPtr, node: KPtr, returnTypeLen: KPtr): KPtr { throw new Error('Not implemented'); } @@ -647,7 +647,7 @@ export class Es2pandaNativeModule { ): KPtr { throw new Error('Not implemented'); } - _CreateETSFunctionTypeIr(context: KPtr, signature: KPtr, funcFlags: KInt): KPtr { + _CreateETSFunctionType(context: KPtr, signature: KPtr, funcFlags: KInt): KPtr { throw new Error('Not implemented'); } _CreateSuperExpression(context: KPtr): KPtr { @@ -722,7 +722,7 @@ export class Es2pandaNativeModule { throw new Error('Not implemented'); } - _CreateAnnotationUsageIr(context: KPtr, ast: KPtr): KPtr { + _CreateAnnotationUsage(context: KPtr, ast: KPtr): KPtr { throw new Error('Not implemented'); } diff --git a/koala-wrapper/src/generated/Es2pandaNativeModule.ts b/koala-wrapper/src/generated/Es2pandaNativeModule.ts index 7dcfda5a9..495ba149d 100644 --- a/koala-wrapper/src/generated/Es2pandaNativeModule.ts +++ b/koala-wrapper/src/generated/Es2pandaNativeModule.ts @@ -82,46 +82,43 @@ export class Es2pandaNativeModule { _UpdateTSVoidKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { throw new Error("'UpdateTSVoidKeyword was not overloaded by native module initialization") } - _CreateETSFunctionTypeIr(context: KNativePointer, signature: KNativePointer, funcFlags: KInt): KNativePointer { + _CreateETSFunctionType(context: KNativePointer, signature: KNativePointer, funcFlags: KInt): KNativePointer { throw new Error("'CreateETSFunctionTypeIr was not overloaded by native module initialization") } - _UpdateETSFunctionTypeIr(context: KNativePointer, original: KNativePointer, signature: KNativePointer, funcFlags: KInt): KNativePointer { + _UpdateETSFunctionType(context: KNativePointer, original: KNativePointer, signature: KNativePointer, funcFlags: KInt): KNativePointer { throw new Error("'UpdateETSFunctionTypeIr was not overloaded by native module initialization") } - _ETSFunctionTypeIrTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _ETSFunctionTypeTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'ETSFunctionTypeIrTypeParamsConst was not overloaded by native module initialization") } - _ETSFunctionTypeIrTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _ETSFunctionTypeTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'ETSFunctionTypeIrTypeParams was not overloaded by native module initialization") } - _ETSFunctionTypeIrParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _ETSFunctionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'ETSFunctionTypeIrParamsConst was not overloaded by native module initialization") } - _ETSFunctionTypeIrReturnTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _ETSFunctionTypeReturnTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'ETSFunctionTypeIrReturnTypeConst was not overloaded by native module initialization") } - _ETSFunctionTypeIrReturnType(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _ETSFunctionTypeReturnType(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'ETSFunctionTypeIrReturnType was not overloaded by native module initialization") } - _ETSFunctionTypeIrFunctionalInterface(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _ETSFunctionTypeFunctionalInterface(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'ETSFunctionTypeIrFunctionalInterface was not overloaded by native module initialization") } - _ETSFunctionTypeIrFunctionalInterfaceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSFunctionTypeIrFunctionalInterfaceConst was not overloaded by native module initialization") - } - _ETSFunctionTypeIrSetFunctionalInterface(context: KNativePointer, receiver: KNativePointer, functionalInterface: KNativePointer): void { + _ETSFunctionTypeSetFunctionalInterface(context: KNativePointer, receiver: KNativePointer, functionalInterface: KNativePointer): void { throw new Error("'ETSFunctionTypeIrSetFunctionalInterface was not overloaded by native module initialization") } - _ETSFunctionTypeIrFlags(context: KNativePointer, receiver: KNativePointer): KInt { + _ETSFunctionTypeFlags(context: KNativePointer, receiver: KNativePointer): KInt { throw new Error("'ETSFunctionTypeIrFlags was not overloaded by native module initialization") } - _ETSFunctionTypeIrIsThrowingConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + _ETSFunctionTypeIsThrowingConst(context: KNativePointer, receiver: KNativePointer): KBoolean { throw new Error("'ETSFunctionTypeIrIsThrowingConst was not overloaded by native module initialization") } - _ETSFunctionTypeIrIsRethrowingConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + _ETSFunctionTypeIsRethrowingConst(context: KNativePointer, receiver: KNativePointer): KBoolean { throw new Error("'ETSFunctionTypeIrIsRethrowingConst was not overloaded by native module initialization") } - _ETSFunctionTypeIrIsExtensionFunctionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + _ETSFunctionTypeIsExtensionFunctionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { throw new Error("'ETSFunctionTypeIrIsExtensionFunctionConst was not overloaded by native module initialization") } _CreateTSTypeOperator(context: KNativePointer, type: KNativePointer, operatorType: KInt): KNativePointer { @@ -787,13 +784,13 @@ export class Es2pandaNativeModule { _UpdateTSObjectKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { throw new Error("'UpdateTSObjectKeyword was not overloaded by native module initialization") } - _CreateETSUnionTypeIr(context: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { + _CreateETSUnionType(context: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { throw new Error("'CreateETSUnionTypeIr was not overloaded by native module initialization") } - _UpdateETSUnionTypeIr(context: KNativePointer, original: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { + _UpdateETSUnionType(context: KNativePointer, original: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { throw new Error("'UpdateETSUnionTypeIr was not overloaded by native module initialization") } - _ETSUnionTypeIrTypesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _ETSUnionTypTypesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'ETSUnionTypeIrTypesConst was not overloaded by native module initialization") } _CreateTSPropertySignature(context: KNativePointer, key: KNativePointer, typeAnnotation: KNativePointer, computed: KBoolean, optional_arg: KBoolean, readonly_arg: KBoolean): KNativePointer { @@ -2269,37 +2266,37 @@ export class Es2pandaNativeModule { _AnnotationDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { throw new Error("'AnnotationDeclarationSetAnnotations was not overloaded by native module initialization") } - _CreateAnnotationUsageIr(context: KNativePointer, expr: KNativePointer): KNativePointer { + _CreateAnnotationUsage(context: KNativePointer, expr: KNativePointer): KNativePointer { throw new Error("'CreateAnnotationUsageIr was not overloaded by native module initialization") } - _UpdateAnnotationUsageIr(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { + _UpdateAnnotationUsage(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { throw new Error("'UpdateAnnotationUsageIr was not overloaded by native module initialization") } - _CreateAnnotationUsageIr1(context: KNativePointer, expr: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): KNativePointer { + _CreateAnnotationUsage1(context: KNativePointer, expr: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): KNativePointer { throw new Error("'CreateAnnotationUsageIr1 was not overloaded by native module initialization") } - _UpdateAnnotationUsageIr1(context: KNativePointer, original: KNativePointer, expr: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): KNativePointer { + _UpdateAnnotationUsage1(context: KNativePointer, original: KNativePointer, expr: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): KNativePointer { throw new Error("'UpdateAnnotationUsageIr1 was not overloaded by native module initialization") } - _AnnotationUsageIrExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _AnnotationUsageExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'AnnotationUsageIrExpr was not overloaded by native module initialization") } - _AnnotationUsageIrProperties(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _AnnotationUsageProperties(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'AnnotationUsageIrProperties was not overloaded by native module initialization") } - _AnnotationUsageIrPropertiesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _AnnotationUsagePropertiesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'AnnotationUsageIrPropertiesConst was not overloaded by native module initialization") } _AnnotationUsageIrPropertiesPtrConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'AnnotationUsageIrPropertiesPtrConst was not overloaded by native module initialization") } - _AnnotationUsageIrAddProperty(context: KNativePointer, receiver: KNativePointer, property: KNativePointer): void { + _AnnotationUsageAddProperty(context: KNativePointer, receiver: KNativePointer, property: KNativePointer): void { throw new Error("'AnnotationUsageIrAddProperty was not overloaded by native module initialization") } - _AnnotationUsageIrSetProperties(context: KNativePointer, receiver: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): void { + _AnnotationUsageSetProperties(context: KNativePointer, receiver: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): void { throw new Error("'AnnotationUsageIrSetProperties was not overloaded by native module initialization") } - _AnnotationUsageIrGetBaseNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _AnnotationUsageGetBaseNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'AnnotationUsageIrGetBaseNameConst was not overloaded by native module initialization") } _CreateEmptyStatement(context: KNativePointer): KNativePointer { @@ -3349,16 +3346,16 @@ export class Es2pandaNativeModule { _AstDumperStrConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { throw new Error("'AstDumperStrConst was not overloaded by native module initialization") } - _CreateETSNullTypeIr(context: KNativePointer): KNativePointer { + _CreateETSNullType(context: KNativePointer): KNativePointer { throw new Error("'CreateETSNullTypeIr was not overloaded by native module initialization") } - _UpdateETSNullTypeIr(context: KNativePointer, original: KNativePointer): KNativePointer { + _UpdateETSNullType(context: KNativePointer, original: KNativePointer): KNativePointer { throw new Error("'UpdateETSNullTypeIr was not overloaded by native module initialization") } - _CreateETSUndefinedTypeIr(context: KNativePointer): KNativePointer { + _CreateETSUndefinedType(context: KNativePointer): KNativePointer { throw new Error("'CreateETSUndefinedTypeIr was not overloaded by native module initialization") } - _UpdateETSUndefinedTypeIr(context: KNativePointer, original: KNativePointer): KNativePointer { + _UpdateETSUndefinedType(context: KNativePointer, original: KNativePointer): KNativePointer { throw new Error("'UpdateETSUndefinedTypeIr was not overloaded by native module initialization") } _CreateTypeofExpression(context: KNativePointer, argument: KNativePointer): KNativePointer { diff --git a/koala-wrapper/src/generated/peers/AnnotationUsage.ts b/koala-wrapper/src/generated/peers/AnnotationUsage.ts index e093c4617..e7ae53061 100644 --- a/koala-wrapper/src/generated/peers/AnnotationUsage.ts +++ b/koala-wrapper/src/generated/peers/AnnotationUsage.ts @@ -39,34 +39,34 @@ export class AnnotationUsage extends Statement { } static createAnnotationUsage(expr?: Expression): AnnotationUsage { - return new AnnotationUsage(global.generatedEs2panda._CreateAnnotationUsageIr(global.context, passNode(expr))) + return new AnnotationUsage(global.generatedEs2panda._CreateAnnotationUsage(global.context, passNode(expr))) } static updateAnnotationUsage(original?: AnnotationUsage, expr?: Expression): AnnotationUsage { - return new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsageIr(global.context, passNode(original), passNode(expr))) + return new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsage(global.context, passNode(original), passNode(expr))) } static create1AnnotationUsage(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage { - return new AnnotationUsage(global.generatedEs2panda._CreateAnnotationUsageIr1(global.context, passNode(expr), passNodeArray(properties), properties.length)) + return new AnnotationUsage(global.generatedEs2panda._CreateAnnotationUsage1(global.context, passNode(expr), passNodeArray(properties), properties.length)) } static update1AnnotationUsage(original: AnnotationUsage | undefined, expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage { - return new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsageIr1(global.context, passNode(original), passNode(expr), passNodeArray(properties), properties.length)) + return new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsage1(global.context, passNode(original), passNode(expr), passNodeArray(properties), properties.length)) } get expr(): Expression | undefined { - return unpackNode(global.generatedEs2panda._AnnotationUsageIrExpr(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._AnnotationUsageExpr(global.context, this.peer)) } get properties(): readonly AstNode[] { - return unpackNodeArray(global.generatedEs2panda._AnnotationUsageIrPropertiesConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._AnnotationUsagePropertiesConst(global.context, this.peer)) } get propertiesPtr(): readonly AstNode[] { return unpackNodeArray(global.generatedEs2panda._AnnotationUsageIrPropertiesPtrConst(global.context, this.peer)) } /** @deprecated */ addProperty(property: AstNode): this { - global.generatedEs2panda._AnnotationUsageIrAddProperty(global.context, this.peer, passNode(property)) + global.generatedEs2panda._AnnotationUsageAddProperty(global.context, this.peer, passNode(property)) return this } /** @deprecated */ setProperties(properties: readonly AstNode[]): this { - global.generatedEs2panda._AnnotationUsageIrSetProperties(global.context, this.peer, passNodeArray(properties), properties.length) + global.generatedEs2panda._AnnotationUsageSetProperties(global.context, this.peer, passNodeArray(properties), properties.length) return this } } diff --git a/koala-wrapper/src/generated/peers/ETSFunctionType.ts b/koala-wrapper/src/generated/peers/ETSFunctionType.ts index 5a630295c..4686b0dc6 100644 --- a/koala-wrapper/src/generated/peers/ETSFunctionType.ts +++ b/koala-wrapper/src/generated/peers/ETSFunctionType.ts @@ -42,39 +42,39 @@ export class ETSFunctionType extends TypeNode { } static createETSFunctionType(signature: FunctionSignature | undefined, funcFlags: Es2pandaScriptFunctionFlags): ETSFunctionType { - return new ETSFunctionType(global.generatedEs2panda._CreateETSFunctionTypeIr(global.context, passNode(signature), funcFlags)) + return new ETSFunctionType(global.generatedEs2panda._CreateETSFunctionType(global.context, passNode(signature), funcFlags)) } static updateETSFunctionType(original: ETSFunctionType | undefined, signature: FunctionSignature | undefined, funcFlags: Es2pandaScriptFunctionFlags): ETSFunctionType { - return new ETSFunctionType(global.generatedEs2panda._UpdateETSFunctionTypeIr(global.context, passNode(original), passNode(signature), funcFlags)) + return new ETSFunctionType(global.generatedEs2panda._UpdateETSFunctionType(global.context, passNode(original), passNode(signature), funcFlags)) } get typeParams(): TSTypeParameterDeclaration | undefined { - return unpackNode(global.generatedEs2panda._ETSFunctionTypeIrTypeParamsConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSFunctionTypeTypeParamsConst(global.context, this.peer)) } get params(): readonly Expression[] { - return unpackNodeArray(global.generatedEs2panda._ETSFunctionTypeIrParamsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ETSFunctionTypeParamsConst(global.context, this.peer)) } get returnType(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._ETSFunctionTypeIrReturnTypeConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSFunctionTypeReturnTypeConst(global.context, this.peer)) } get functionalInterface(): TSInterfaceDeclaration | undefined { - return unpackNode(global.generatedEs2panda._ETSFunctionTypeIrFunctionalInterfaceConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSFunctionTypeFunctionalInterface(global.context, this.peer)) } /** @deprecated */ setFunctionalInterface(functionalInterface: TSInterfaceDeclaration): this { - global.generatedEs2panda._ETSFunctionTypeIrSetFunctionalInterface(global.context, this.peer, passNode(functionalInterface)) + global.generatedEs2panda._ETSFunctionTypeSetFunctionalInterface(global.context, this.peer, passNode(functionalInterface)) return this } get flags(): Es2pandaScriptFunctionFlags { - return global.generatedEs2panda._ETSFunctionTypeIrFlags(global.context, this.peer) + return global.generatedEs2panda._ETSFunctionTypeFlags(global.context, this.peer) } get isThrowing(): boolean { - return global.generatedEs2panda._ETSFunctionTypeIrIsThrowingConst(global.context, this.peer) + return global.generatedEs2panda._ETSFunctionTypeIsThrowingConst(global.context, this.peer) } get isRethrowing(): boolean { - return global.generatedEs2panda._ETSFunctionTypeIrIsRethrowingConst(global.context, this.peer) + return global.generatedEs2panda._ETSFunctionTypeIsRethrowingConst(global.context, this.peer) } get isExtensionFunction(): boolean { - return global.generatedEs2panda._ETSFunctionTypeIrIsExtensionFunctionConst(global.context, this.peer) + return global.generatedEs2panda._ETSFunctionTypeIsExtensionFunctionConst(global.context, this.peer) } } export function isETSFunctionType(node: AstNode): node is ETSFunctionType { diff --git a/koala-wrapper/src/generated/peers/ETSNullType.ts b/koala-wrapper/src/generated/peers/ETSNullType.ts index 6619bf72a..bd8424e40 100644 --- a/koala-wrapper/src/generated/peers/ETSNullType.ts +++ b/koala-wrapper/src/generated/peers/ETSNullType.ts @@ -37,10 +37,10 @@ export class ETSNullType extends TypeNode { } static createETSNullType(): ETSNullType { - return new ETSNullType(global.generatedEs2panda._CreateETSNullTypeIr(global.context)) + return new ETSNullType(global.generatedEs2panda._CreateETSNullType(global.context)) } static updateETSNullType(original?: ETSNullType): ETSNullType { - return new ETSNullType(global.generatedEs2panda._UpdateETSNullTypeIr(global.context, passNode(original))) + return new ETSNullType(global.generatedEs2panda._UpdateETSNullType(global.context, passNode(original))) } } export function isETSNullType(node: AstNode): node is ETSNullType { diff --git a/koala-wrapper/src/generated/peers/ETSUndefinedType.ts b/koala-wrapper/src/generated/peers/ETSUndefinedType.ts index c42dcf76b..4a70b0d8a 100644 --- a/koala-wrapper/src/generated/peers/ETSUndefinedType.ts +++ b/koala-wrapper/src/generated/peers/ETSUndefinedType.ts @@ -37,10 +37,10 @@ export class ETSUndefinedType extends TypeNode { } static createETSUndefinedType(): ETSUndefinedType { - return new ETSUndefinedType(global.generatedEs2panda._CreateETSUndefinedTypeIr(global.context)) + return new ETSUndefinedType(global.generatedEs2panda._CreateETSUndefinedType(global.context)) } static updateETSUndefinedType(original?: ETSUndefinedType): ETSUndefinedType { - return new ETSUndefinedType(global.generatedEs2panda._UpdateETSUndefinedTypeIr(global.context, passNode(original))) + return new ETSUndefinedType(global.generatedEs2panda._UpdateETSUndefinedType(global.context, passNode(original))) } } export function isETSUndefinedType(node: AstNode): node is ETSUndefinedType { diff --git a/koala-wrapper/src/generated/peers/ETSUnionType.ts b/koala-wrapper/src/generated/peers/ETSUnionType.ts index 59b73ebe7..745512c51 100644 --- a/koala-wrapper/src/generated/peers/ETSUnionType.ts +++ b/koala-wrapper/src/generated/peers/ETSUnionType.ts @@ -37,13 +37,13 @@ export class ETSUnionType extends TypeNode { } static createETSUnionType(types: readonly TypeNode[]): ETSUnionType { - return new ETSUnionType(global.generatedEs2panda._CreateETSUnionTypeIr(global.context, passNodeArray(types), types.length)) + return new ETSUnionType(global.generatedEs2panda._CreateETSUnionType(global.context, passNodeArray(types), types.length)) } static updateETSUnionType(original: ETSUnionType | undefined, types: readonly TypeNode[]): ETSUnionType { - return new ETSUnionType(global.generatedEs2panda._UpdateETSUnionTypeIr(global.context, passNode(original), passNodeArray(types), types.length)) + return new ETSUnionType(global.generatedEs2panda._UpdateETSUnionType(global.context, passNode(original), passNodeArray(types), types.length)) } get types(): readonly TypeNode[] { - return unpackNodeArray(global.generatedEs2panda._ETSUnionTypeIrTypesConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ETSUnionTypTypesConst(global.context, this.peer)) } } export function isETSUnionType(node: AstNode): node is ETSUnionType { -- Gitee From 4891ec1f745c3eba1f218673f0f72061f520af11 Mon Sep 17 00:00:00 2001 From: Keerecles Date: Tue, 10 Jun 2025 19:41:27 +0800 Subject: [PATCH 03/17] revert StageArena Signed-off-by: Keerecles Change-Id: I9a7b41d4efcd4adafb6466417fb9f5aa2d06a158 --- koala-wrapper/native/src/bridges.cc | 22 +- koala-wrapper/native/src/common.cc | 9 +- koala-wrapper/native/src/generated/bridges.cc | 249 +++++++++--------- 3 files changed, 140 insertions(+), 140 deletions(-) diff --git a/koala-wrapper/native/src/bridges.cc b/koala-wrapper/native/src/bridges.cc index e81ea292d..319a3f89d 100644 --- a/koala-wrapper/native/src/bridges.cc +++ b/koala-wrapper/native/src/bridges.cc @@ -61,7 +61,7 @@ KNativePointer impl_AnnotationAllowedAnnotations(KNativePointer contextPtr, KNat auto node = reinterpret_cast(nodePtr); std::size_t params_len = 0; auto annotations = GetImpl()->AnnotationAllowedAnnotations(context, node, ¶ms_len); - return StageArena::cloneVector(annotations, params_len); + return new std::vector(annotations, annotations + params_len); } KOALA_INTEROP_3(AnnotationAllowedAnnotations, KNativePointer, KNativePointer, KNativePointer, KNativePointer) @@ -71,7 +71,7 @@ KNativePointer impl_AnnotationAllowedAnnotationsConst(KNativePointer contextPtr, auto node = reinterpret_cast(nodePtr); std::size_t params_len = 0; auto annotations = GetImpl()->AnnotationAllowedAnnotationsConst(context, node, ¶ms_len); - return StageArena::cloneVector(annotations, params_len); + return new std::vector(annotations, annotations + params_len); } KOALA_INTEROP_3(AnnotationAllowedAnnotationsConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer) @@ -199,7 +199,7 @@ KNativePointer impl_ContextErrorMessage(KNativePointer contextPtr) { auto context = reinterpret_cast(contextPtr); - return StageArena::strdup(GetImpl()->ContextErrorMessage(context)); + return new string(GetImpl()->ContextErrorMessage(context)); } KOALA_INTEROP_1(ContextErrorMessage, KNativePointer, KNativePointer) @@ -234,9 +234,9 @@ static KNativePointer impl_ProgramExternalSources(KNativePointer contextPtr, KNa { auto context = reinterpret_cast(contextPtr); auto&& instance = reinterpret_cast(instancePtr); - std::size_t source_len = 0; - auto external_sources = GetImpl()->ProgramExternalSources(context, instance, &source_len); - return StageArena::cloneVector(external_sources, source_len); + std::size_t sourceLen = 0; + auto externalSources = GetImpl()->ProgramExternalSources(context, instance, &sourceLen); + return new std::vector(externalSources, externalSources + sourceLen); } KOALA_INTEROP_2(ProgramExternalSources, KNativePointer, KNativePointer, KNativePointer); @@ -262,17 +262,17 @@ KOALA_INTEROP_2(ProgramModuleNameConst, KNativePointer, KNativePointer, KNativeP static KNativePointer impl_ExternalSourceName(KNativePointer instance) { auto&& _instance_ = reinterpret_cast(instance); - auto&& result = GetImpl()->ExternalSourceName(_instance_); - return StageArena::strdup(result); + auto&& _result_ = GetImpl()->ExternalSourceName(_instance_); + return new std::string(_result_); } KOALA_INTEROP_1(ExternalSourceName, KNativePointer, KNativePointer); static KNativePointer impl_ExternalSourcePrograms(KNativePointer instance) { auto&& _instance_ = reinterpret_cast(instance); - std::size_t program_len = 0; - auto programs = GetImpl()->ExternalSourcePrograms(_instance_, &program_len); - return StageArena::cloneVector(programs, program_len); + std::size_t programLen = 0; + auto programs = GetImpl()->ExternalSourcePrograms(_instance_, &programLen); + return new std::vector(programs, programs + programLen); } KOALA_INTEROP_1(ExternalSourcePrograms, KNativePointer, KNativePointer); diff --git a/koala-wrapper/native/src/common.cc b/koala-wrapper/native/src/common.cc index fc5fca238..6a71c699f 100644 --- a/koala-wrapper/native/src/common.cc +++ b/koala-wrapper/native/src/common.cc @@ -166,7 +166,7 @@ string getString(KStringPtr ptr) char* getStringCopy(KStringPtr& ptr) { - return StageArena::strdup(ptr.c_str() ? ptr.c_str() : ""); + return strdup(ptr.c_str()); } inline KUInt unpackUInt(const KByte* bytes) @@ -240,13 +240,13 @@ KOALA_INTEROP_4(CreateCacheContextFromFile, KNativePointer, KNativePointer, KStr KNativePointer impl_CreateConfig(KInt argc, KStringArray argvPtr) { const std::size_t headerLen = 4; - const char** argv = StageArena::allocArray(argc); + const char** argv = new const char*[argc]; std::size_t position = headerLen; std::size_t strLen; for (std::size_t i = 0; i < static_cast(argc); ++i) { strLen = unpackUInt(argvPtr + position); position += headerLen; - argv[i] = StageArena::strdup(std::string(reinterpret_cast(argvPtr + position), strLen).c_str()); + argv[i] = strdup(std::string(reinterpret_cast(argvPtr + position), strLen).c_str()); position += strLen; } return GetImpl()->CreateConfig(argc, argv); @@ -263,7 +263,6 @@ KOALA_INTEROP_1(DestroyConfig, KNativePointer, KNativePointer) KNativePointer impl_DestroyContext(KNativePointer contextPtr) { auto context = reinterpret_cast(contextPtr); GetImpl()->DestroyContext(context); - StageArena::instance()->cleanup(); return nullptr; } KOALA_INTEROP_1(DestroyContext, KNativePointer, KNativePointer) @@ -375,7 +374,7 @@ KNativePointer impl_AstNodeChildren( cachedChildren.clear(); GetImpl()->AstNodeIterateConst(context, node, visitChild); - return StageArena::clone(cachedChildren); + return new std::vector(cachedChildren); } KOALA_INTEROP_2(AstNodeChildren, KNativePointer, KNativePointer, KNativePointer) diff --git a/koala-wrapper/native/src/generated/bridges.cc b/koala-wrapper/native/src/generated/bridges.cc index 2bf11a7b6..20240f324 100644 --- a/koala-wrapper/native/src/generated/bridges.cc +++ b/koala-wrapper/native/src/generated/bridges.cc @@ -284,7 +284,7 @@ KNativePointer impl_ClassPropertyAnnotations(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassPropertyAnnotations(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ClassPropertyAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -294,7 +294,7 @@ KNativePointer impl_ClassPropertyAnnotationsConst(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassPropertyAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ClassPropertyAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -371,7 +371,7 @@ KNativePointer impl_ETSFunctionTypeParamsConst(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSFunctionTypeIrParamsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ETSFunctionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -646,7 +646,7 @@ KNativePointer impl_TSConstructorTypeParamsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSConstructorTypeParamsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSConstructorTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -758,7 +758,7 @@ KNativePointer impl_TSEnumDeclarationMembersConst(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSEnumDeclarationMembersConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSEnumDeclarationMembersConst, KNativePointer, KNativePointer, KNativePointer); @@ -767,7 +767,7 @@ KNativePointer impl_TSEnumDeclarationInternalNameConst(KNativePointer context, K const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TSEnumDeclarationInternalNameConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(TSEnumDeclarationInternalNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -815,7 +815,7 @@ KNativePointer impl_TSEnumDeclarationDecoratorsConst(KNativePointer context, KNa const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSEnumDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSEnumDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -904,7 +904,7 @@ KNativePointer impl_ObjectExpressionPropertiesConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ObjectExpressionPropertiesConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ObjectExpressionPropertiesConst, KNativePointer, KNativePointer, KNativePointer); @@ -932,7 +932,7 @@ KNativePointer impl_ObjectExpressionDecoratorsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ObjectExpressionDecoratorsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ObjectExpressionDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1260,7 +1260,7 @@ KNativePointer impl_CallExpressionArgumentsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->CallExpressionArgumentsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(CallExpressionArgumentsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1270,7 +1270,7 @@ KNativePointer impl_CallExpressionArguments(KNativePointer context, KNativePoint const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->CallExpressionArguments(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(CallExpressionArguments, KNativePointer, KNativePointer, KNativePointer); @@ -1392,7 +1392,7 @@ KNativePointer impl_BigIntLiteralStrConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->BigIntLiteralStrConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(BigIntLiteralStrConst, KNativePointer, KNativePointer, KNativePointer); @@ -1494,7 +1494,7 @@ KNativePointer impl_ClassElementDecoratorsConst(KNativePointer context, KNativeP const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassElementDecoratorsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ClassElementDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1717,7 +1717,7 @@ KNativePointer impl_FunctionDeclarationAnnotations(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->FunctionDeclarationAnnotations(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(FunctionDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -1727,7 +1727,7 @@ KNativePointer impl_FunctionDeclarationAnnotationsConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->FunctionDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(FunctionDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1955,7 +1955,7 @@ KNativePointer impl_TSFunctionTypeParamsConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSFunctionTypeParamsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSFunctionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2030,7 +2030,7 @@ KNativePointer impl_TemplateElementRawConst(KNativePointer context, KNativePoint const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TemplateElementRawConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(TemplateElementRawConst, KNativePointer, KNativePointer, KNativePointer); @@ -2039,7 +2039,7 @@ KNativePointer impl_TemplateElementCookedConst(KNativePointer context, KNativePo const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TemplateElementCookedConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(TemplateElementCookedConst, KNativePointer, KNativePointer, KNativePointer); @@ -2115,7 +2115,7 @@ KNativePointer impl_TSInterfaceDeclarationInternalNameConst(KNativePointer conte const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TSInterfaceDeclarationInternalNameConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(TSInterfaceDeclarationInternalNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -2171,7 +2171,7 @@ KNativePointer impl_TSInterfaceDeclarationExtends(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationExtends(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(TSInterfaceDeclarationExtends, KNativePointer, KNativePointer, KNativePointer); @@ -2181,7 +2181,7 @@ KNativePointer impl_TSInterfaceDeclarationExtendsConst(KNativePointer context, K const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationExtendsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSInterfaceDeclarationExtendsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2191,7 +2191,7 @@ KNativePointer impl_TSInterfaceDeclarationDecoratorsConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSInterfaceDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2229,7 +2229,7 @@ KNativePointer impl_TSInterfaceDeclarationAnnotations(KNativePointer context, KN const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationAnnotations(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(TSInterfaceDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -2239,7 +2239,7 @@ KNativePointer impl_TSInterfaceDeclarationAnnotationsConst(KNativePointer contex const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSInterfaceDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2283,7 +2283,7 @@ KNativePointer impl_VariableDeclarationDeclaratorsConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->VariableDeclarationDeclaratorsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(VariableDeclarationDeclaratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2302,7 +2302,7 @@ KNativePointer impl_VariableDeclarationDecoratorsConst(KNativePointer context, K const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->VariableDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(VariableDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2322,7 +2322,7 @@ KNativePointer impl_VariableDeclarationAnnotations(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->VariableDeclarationAnnotations(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(VariableDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -2332,7 +2332,7 @@ KNativePointer impl_VariableDeclarationAnnotationsConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->VariableDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(VariableDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2665,7 +2665,7 @@ KNativePointer impl_ETSUnionTypeTypesConst(KNativePointer context, KNativePointe const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSUnionTypeIrTypesConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ETSUnionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); @@ -2952,7 +2952,7 @@ KNativePointer impl_TSTypeAliasDeclarationDecoratorsConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeAliasDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSTypeAliasDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2983,7 +2983,7 @@ KNativePointer impl_TSTypeAliasDeclarationAnnotationsConst(KNativePointer contex const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeAliasDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSTypeAliasDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3204,7 +3204,7 @@ KNativePointer impl_ScriptFunctionParamsConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionParamsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ScriptFunctionParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3214,7 +3214,7 @@ KNativePointer impl_ScriptFunctionParams(KNativePointer context, KNativePointer const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionParams(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ScriptFunctionParams, KNativePointer, KNativePointer, KNativePointer); @@ -3224,7 +3224,7 @@ KNativePointer impl_ScriptFunctionReturnStatementsConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionReturnStatementsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ScriptFunctionReturnStatementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3234,7 +3234,7 @@ KNativePointer impl_ScriptFunctionReturnStatements(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionReturnStatements(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ScriptFunctionReturnStatements, KNativePointer, KNativePointer, KNativePointer); @@ -3649,7 +3649,7 @@ KNativePointer impl_ScriptFunctionAnnotations(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionAnnotations(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ScriptFunctionAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -3659,7 +3659,7 @@ KNativePointer impl_ScriptFunctionAnnotationsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ScriptFunctionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3796,7 +3796,7 @@ KNativePointer impl_ClassDefinitionInternalNameConst(KNativePointer context, KNa const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ClassDefinitionInternalNameConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(ClassDefinitionInternalNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -4054,7 +4054,7 @@ KNativePointer impl_ClassDefinitionBody(KNativePointer context, KNativePointer r const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionBody(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ClassDefinitionBody, KNativePointer, KNativePointer, KNativePointer); @@ -4064,7 +4064,7 @@ KNativePointer impl_ClassDefinitionBodyConst(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionBodyConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ClassDefinitionBodyConst, KNativePointer, KNativePointer, KNativePointer); @@ -4093,7 +4093,7 @@ KNativePointer impl_ClassDefinitionImplements(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionImplements(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ClassDefinitionImplements, KNativePointer, KNativePointer, KNativePointer); @@ -4103,7 +4103,7 @@ KNativePointer impl_ClassDefinitionImplementsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionImplementsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ClassDefinitionImplementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -4176,7 +4176,7 @@ KNativePointer impl_ClassDefinitionLocalPrefixConst(KNativePointer context, KNat const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ClassDefinitionLocalPrefixConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(ClassDefinitionLocalPrefixConst, KNativePointer, KNativePointer, KNativePointer); @@ -4280,7 +4280,7 @@ KNativePointer impl_ClassDefinitionAnnotations(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionAnnotations(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ClassDefinitionAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -4290,7 +4290,7 @@ KNativePointer impl_ClassDefinitionAnnotationsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ClassDefinitionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -4367,7 +4367,7 @@ KNativePointer impl_ArrayExpressionElementsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrayExpressionElementsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ArrayExpressionElementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -4377,7 +4377,7 @@ KNativePointer impl_ArrayExpressionElements(KNativePointer context, KNativePoint const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrayExpressionElements(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ArrayExpressionElements, KNativePointer, KNativePointer, KNativePointer); @@ -4435,7 +4435,7 @@ KNativePointer impl_ArrayExpressionDecoratorsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrayExpressionDecoratorsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ArrayExpressionDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -4523,7 +4523,7 @@ KNativePointer impl_TSInterfaceBodyBody(KNativePointer context, KNativePointer r const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceBodyBody(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(TSInterfaceBodyBody, KNativePointer, KNativePointer, KNativePointer); @@ -4533,7 +4533,7 @@ KNativePointer impl_TSInterfaceBodyBodyConst(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceBodyBodyConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSInterfaceBodyBodyConst, KNativePointer, KNativePointer, KNativePointer); @@ -4879,7 +4879,7 @@ KNativePointer impl_StringLiteralStrConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->StringLiteralStrConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(StringLiteralStrConst, KNativePointer, KNativePointer, KNativePointer); @@ -5049,7 +5049,8 @@ KNativePointer impl_ETSTupleGetTupleTypeAnnotationsList(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSTupleGetTupleTypeAnnotationsList(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + // return StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ETSTupleGetTupleTypeAnnotationsList, KNativePointer, KNativePointer, KNativePointer); @@ -5059,7 +5060,7 @@ KNativePointer impl_ETSTupleGetTupleTypeAnnotationsListConst(KNativePointer cont const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSTupleGetTupleTypeAnnotationsListConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ETSTupleGetTupleTypeAnnotationsListConst, KNativePointer, KNativePointer, KNativePointer); @@ -5187,7 +5188,7 @@ KNativePointer impl_TryStatementCatchClausesConst(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TryStatementCatchClausesConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TryStatementCatchClausesConst, KNativePointer, KNativePointer, KNativePointer); @@ -5409,7 +5410,7 @@ KNativePointer impl_AstNodeDecoratorsPtrConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AstNodeDecoratorsPtrConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(AstNodeDecoratorsPtrConst, KNativePointer, KNativePointer, KNativePointer); @@ -5775,7 +5776,7 @@ KNativePointer impl_AstNodeDumpJSONConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AstNodeDumpJSONConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(AstNodeDumpJSONConst, KNativePointer, KNativePointer, KNativePointer); @@ -5784,7 +5785,7 @@ KNativePointer impl_AstNodeDumpEtsSrcConst(KNativePointer context, KNativePointe const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AstNodeDumpEtsSrcConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(AstNodeDumpEtsSrcConst, KNativePointer, KNativePointer, KNativePointer); @@ -6113,7 +6114,7 @@ KNativePointer impl_TSMethodSignatureParamsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSMethodSignatureParamsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSMethodSignatureParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -6732,7 +6733,7 @@ KNativePointer impl_ETSModuleAnnotations(KNativePointer context, KNativePointer const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSModuleAnnotations(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ETSModuleAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -6742,7 +6743,7 @@ KNativePointer impl_ETSModuleAnnotationsConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSModuleAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ETSModuleAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -6858,7 +6859,7 @@ KNativePointer impl_TSSignatureDeclarationParamsConst(KNativePointer context, KN const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSSignatureDeclarationParamsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSSignatureDeclarationParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -7031,7 +7032,7 @@ KNativePointer impl_TSTupleTypeElementTypeConst(KNativePointer context, KNativeP const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTupleTypeElementTypeConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSTupleTypeElementTypeConst, KNativePointer, KNativePointer, KNativePointer); @@ -7280,7 +7281,7 @@ KNativePointer impl_ImportDeclarationSpecifiersConst(KNativePointer context, KNa const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ImportDeclarationSpecifiersConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ImportDeclarationSpecifiersConst, KNativePointer, KNativePointer, KNativePointer); @@ -7458,7 +7459,7 @@ KNativePointer impl_ETSImportDeclarationAssemblerNameConst(KNativePointer contex const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSImportDeclarationAssemblerNameConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(ETSImportDeclarationAssemblerNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -7467,7 +7468,7 @@ KNativePointer impl_ETSImportDeclarationResolvedSourceConst(KNativePointer conte const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSImportDeclarationResolvedSourceConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(ETSImportDeclarationResolvedSourceConst, KNativePointer, KNativePointer, KNativePointer); @@ -7517,7 +7518,7 @@ KNativePointer impl_TSModuleBlockStatementsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSModuleBlockStatementsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSModuleBlockStatementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -7644,7 +7645,7 @@ KNativePointer impl_AnnotationDeclarationInternalNameConst(KNativePointer contex const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AnnotationDeclarationInternalNameConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(AnnotationDeclarationInternalNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -7682,7 +7683,7 @@ KNativePointer impl_AnnotationDeclarationProperties(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationProperties(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(AnnotationDeclarationProperties, KNativePointer, KNativePointer, KNativePointer); @@ -7692,7 +7693,7 @@ KNativePointer impl_AnnotationDeclarationPropertiesConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationPropertiesConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(AnnotationDeclarationPropertiesConst, KNativePointer, KNativePointer, KNativePointer); @@ -7776,7 +7777,7 @@ KNativePointer impl_AnnotationDeclarationAnnotations(KNativePointer context, KNa const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationAnnotations(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(AnnotationDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -7786,7 +7787,7 @@ KNativePointer impl_AnnotationDeclarationAnnotationsConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(AnnotationDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -7858,7 +7859,7 @@ KNativePointer impl_AnnotationUsageProperties(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationUsageIrProperties(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(AnnotationUsageProperties, KNativePointer, KNativePointer, KNativePointer); @@ -7868,7 +7869,7 @@ KNativePointer impl_AnnotationUsagePropertiesConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationUsageIrPropertiesConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(AnnotationUsagePropertiesConst, KNativePointer, KNativePointer, KNativePointer); @@ -8023,7 +8024,7 @@ KNativePointer impl_FunctionSignatureParamsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->FunctionSignatureParamsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(FunctionSignatureParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -8033,7 +8034,7 @@ KNativePointer impl_FunctionSignatureParams(KNativePointer context, KNativePoint const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->FunctionSignatureParams(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(FunctionSignatureParams, KNativePointer, KNativePointer, KNativePointer); @@ -8176,7 +8177,7 @@ KNativePointer impl_TSIntersectionTypeTypesConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSIntersectionTypeTypesConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSIntersectionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); @@ -8266,7 +8267,7 @@ KNativePointer impl_BlockExpressionStatementsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->BlockExpressionStatementsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(BlockExpressionStatementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -8276,7 +8277,7 @@ KNativePointer impl_BlockExpressionStatements(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->BlockExpressionStatements(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(BlockExpressionStatements, KNativePointer, KNativePointer, KNativePointer); @@ -8328,7 +8329,7 @@ KNativePointer impl_TSTypeLiteralMembersConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeLiteralMembersConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSTypeLiteralMembersConst, KNativePointer, KNativePointer, KNativePointer); @@ -8451,7 +8452,7 @@ KNativePointer impl_TSTypeParameterAnnotations(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeParameterAnnotations(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(TSTypeParameterAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -8461,7 +8462,7 @@ KNativePointer impl_TSTypeParameterAnnotationsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeParameterAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSTypeParameterAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -8547,7 +8548,7 @@ KNativePointer impl_SpreadElementDecoratorsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SpreadElementDecoratorsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(SpreadElementDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -8776,7 +8777,7 @@ KNativePointer impl_ExportNamedDeclarationSpecifiersConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ExportNamedDeclarationSpecifiersConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ExportNamedDeclarationSpecifiersConst, KNativePointer, KNativePointer, KNativePointer); @@ -8838,7 +8839,7 @@ KNativePointer impl_ETSParameterExpressionNameConst(KNativePointer context, KNat const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSParameterExpressionNameConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(ETSParameterExpressionNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -8921,7 +8922,7 @@ KNativePointer impl_ETSParameterExpressionLexerSavedConst(KNativePointer context const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSParameterExpressionLexerSavedConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(ETSParameterExpressionLexerSavedConst, KNativePointer, KNativePointer, KNativePointer); @@ -9016,7 +9017,7 @@ KNativePointer impl_ETSParameterExpressionAnnotations(KNativePointer context, KN const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSParameterExpressionAnnotations(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ETSParameterExpressionAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -9026,7 +9027,7 @@ KNativePointer impl_ETSParameterExpressionAnnotationsConst(KNativePointer contex const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSParameterExpressionAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ETSParameterExpressionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -9068,7 +9069,7 @@ KNativePointer impl_TSTypeParameterInstantiationParamsConst(KNativePointer conte const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeParameterInstantiationParamsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSTypeParameterInstantiationParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -9174,7 +9175,7 @@ KNativePointer impl_SwitchCaseStatementConsequentConst(KNativePointer context, K const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SwitchCaseStatementConsequentConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(SwitchCaseStatementConsequentConst, KNativePointer, KNativePointer, KNativePointer); @@ -9354,7 +9355,7 @@ KNativePointer impl_ClassStaticBlockNameConst(KNativePointer context, KNativePoi const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ClassStaticBlockNameConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(ClassStaticBlockNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -9593,7 +9594,7 @@ KNativePointer impl_TemplateLiteralQuasisConst(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TemplateLiteralQuasisConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TemplateLiteralQuasisConst, KNativePointer, KNativePointer, KNativePointer); @@ -9603,7 +9604,7 @@ KNativePointer impl_TemplateLiteralExpressionsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TemplateLiteralExpressionsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TemplateLiteralExpressionsConst, KNativePointer, KNativePointer, KNativePointer); @@ -9612,7 +9613,7 @@ KNativePointer impl_TemplateLiteralGetMultilineStringConst(KNativePointer contex const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TemplateLiteralGetMultilineStringConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(TemplateLiteralGetMultilineStringConst, KNativePointer, KNativePointer, KNativePointer); @@ -9643,7 +9644,7 @@ KNativePointer impl_TSUnionTypeTypesConst(KNativePointer context, KNativePointer const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSUnionTypeTypesConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSUnionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); @@ -9726,7 +9727,7 @@ KNativePointer impl_IdentifierNameConst(KNativePointer context, KNativePointer r const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->IdentifierNameConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(IdentifierNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -9735,7 +9736,7 @@ KNativePointer impl_IdentifierName(KNativePointer context, KNativePointer receiv const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->IdentifierName(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(IdentifierName, KNativePointer, KNativePointer, KNativePointer); @@ -9755,7 +9756,7 @@ KNativePointer impl_IdentifierDecoratorsConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->IdentifierDecoratorsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(IdentifierDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -10014,7 +10015,7 @@ KNativePointer impl_BlockStatementStatementsConst(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->BlockStatementStatementsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(BlockStatementStatementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -10024,7 +10025,7 @@ KNativePointer impl_BlockStatementStatements(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->BlockStatementStatements(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(BlockStatementStatements, KNativePointer, KNativePointer, KNativePointer); @@ -10129,7 +10130,7 @@ KNativePointer impl_TSTypeParameterDeclarationParamsConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeParameterDeclarationParamsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TSTypeParameterDeclarationParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -10258,7 +10259,7 @@ KNativePointer impl_MethodDefinitionOverloadsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->MethodDefinitionOverloadsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(MethodDefinitionOverloadsConst, KNativePointer, KNativePointer, KNativePointer); @@ -10552,7 +10553,7 @@ KNativePointer impl_ExpressionToStringConst(KNativePointer context, KNativePoint const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ExpressionToStringConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(ExpressionToStringConst, KNativePointer, KNativePointer, KNativePointer); @@ -10668,7 +10669,7 @@ KNativePointer impl_SrcDumperStrConst(KNativePointer context, KNativePointer rec const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->SrcDumperStrConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(SrcDumperStrConst, KNativePointer, KNativePointer, KNativePointer); @@ -10894,7 +10895,7 @@ KNativePointer impl_RegExpLiteralPatternConst(KNativePointer context, KNativePoi const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->RegExpLiteralPatternConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(RegExpLiteralPatternConst, KNativePointer, KNativePointer, KNativePointer); @@ -11028,7 +11029,7 @@ KNativePointer impl_ClassDeclarationDecoratorsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ClassDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -11133,7 +11134,7 @@ KNativePointer impl_TSQualifiedNameNameConst(KNativePointer context, KNativePoin const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TSQualifiedNameNameConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(TSQualifiedNameNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -11358,7 +11359,7 @@ KNativePointer impl_ETSNewMultiDimArrayInstanceExpressionDimensions(KNativePoint const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSNewMultiDimArrayInstanceExpressionDimensions(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ETSNewMultiDimArrayInstanceExpressionDimensions, KNativePointer, KNativePointer, KNativePointer); @@ -11368,7 +11369,7 @@ KNativePointer impl_ETSNewMultiDimArrayInstanceExpressionDimensionsConst(KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSNewMultiDimArrayInstanceExpressionDimensionsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ETSNewMultiDimArrayInstanceExpressionDimensionsConst, KNativePointer, KNativePointer, KNativePointer); @@ -11493,7 +11494,7 @@ KNativePointer impl_AstDumperModifierToString(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); const auto _flags = static_cast(flags); auto result = GetImpl()->AstDumperModifierToString(_context, _receiver, _flags); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_3(AstDumperModifierToString, KNativePointer, KNativePointer, KNativePointer, KInt); @@ -11503,7 +11504,7 @@ KNativePointer impl_AstDumperTypeOperatorToString(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); const auto _operatorType = static_cast(operatorType); auto result = GetImpl()->AstDumperTypeOperatorToString(_context, _receiver, _operatorType); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_3(AstDumperTypeOperatorToString, KNativePointer, KNativePointer, KNativePointer, KInt); @@ -11512,7 +11513,7 @@ KNativePointer impl_AstDumperStrConst(KNativePointer context, KNativePointer rec const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AstDumperStrConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(AstDumperStrConst, KNativePointer, KNativePointer, KNativePointer); @@ -11672,7 +11673,7 @@ KNativePointer impl_TSEnumMemberNameConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TSEnumMemberNameConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(TSEnumMemberNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -11733,7 +11734,7 @@ KNativePointer impl_SwitchStatementCasesConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SwitchStatementCasesConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(SwitchStatementCasesConst, KNativePointer, KNativePointer, KNativePointer); @@ -11743,7 +11744,7 @@ KNativePointer impl_SwitchStatementCases(KNativePointer context, KNativePointer const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SwitchStatementCases(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(SwitchStatementCases, KNativePointer, KNativePointer, KNativePointer); @@ -11916,7 +11917,7 @@ KNativePointer impl_SequenceExpressionSequenceConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SequenceExpressionSequenceConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(SequenceExpressionSequenceConst, KNativePointer, KNativePointer, KNativePointer); @@ -11926,7 +11927,7 @@ KNativePointer impl_SequenceExpressionSequence(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SequenceExpressionSequence(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(SequenceExpressionSequence, KNativePointer, KNativePointer, KNativePointer); @@ -12001,7 +12002,7 @@ KNativePointer impl_ArrowFunctionExpressionAnnotations(KNativePointer context, K const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrowFunctionExpressionAnnotations(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ArrowFunctionExpressionAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -12011,7 +12012,7 @@ KNativePointer impl_ArrowFunctionExpressionAnnotationsConst(KNativePointer conte const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrowFunctionExpressionAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ArrowFunctionExpressionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -12100,7 +12101,7 @@ KNativePointer impl_ETSNewClassInstanceExpressionGetArguments(KNativePointer con const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSNewClassInstanceExpressionGetArguments(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(ETSNewClassInstanceExpressionGetArguments, KNativePointer, KNativePointer, KNativePointer); @@ -12110,7 +12111,7 @@ KNativePointer impl_ETSNewClassInstanceExpressionGetArgumentsConst(KNativePointe const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSNewClassInstanceExpressionGetArgumentsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(ETSNewClassInstanceExpressionGetArgumentsConst, KNativePointer, KNativePointer, KNativePointer); @@ -12418,7 +12419,7 @@ KNativePointer impl_ETSReExportDeclarationGetProgramPathConst(KNativePointer con const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSReExportDeclarationGetProgramPathConst(_context, _receiver); - return StageArena::strdup(result); + return new std::string(result); } KOALA_INTEROP_2(ETSReExportDeclarationGetProgramPathConst, KNativePointer, KNativePointer, KNativePointer); @@ -12456,7 +12457,7 @@ KNativePointer impl_TypeNodeAnnotations(KNativePointer context, KNativePointer r const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TypeNodeAnnotations(_context, _receiver, &length); - return StageArena::cloneVector(result, length); + return new std::vector(result, result + length); } KOALA_INTEROP_2(TypeNodeAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -12466,7 +12467,7 @@ KNativePointer impl_TypeNodeAnnotationsConst(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TypeNodeAnnotationsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(TypeNodeAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -12519,7 +12520,7 @@ KNativePointer impl_NewExpressionArgumentsConst(KNativePointer context, KNativeP const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->NewExpressionArgumentsConst(_context, _receiver, &length); - return (void*)StageArena::cloneVector(result, length); + return (void*)new std::vector(result, result + length); } KOALA_INTEROP_2(NewExpressionArgumentsConst, KNativePointer, KNativePointer, KNativePointer); -- Gitee From f79da0c4641c00d52bf843679e63d05eda85ad25 Mon Sep 17 00:00:00 2001 From: Keerecles Date: Tue, 10 Jun 2025 22:05:45 +0800 Subject: [PATCH 04/17] fix createETSImportDeclaration Signed-off-by: Keerecles Change-Id: I266a3e96fc0937ac4840a9584eec41c29afb0504 --- koala-wrapper/native/src/bridges.cc | 24 +++++++++++-------- koala-wrapper/src/Es2pandaNativeModule.ts | 4 ++-- .../src/generated/Es2pandaNativeModule.ts | 7 ++++-- .../src/generated/peers/ETSFunctionType.ts | 2 +- .../generated/peers/ETSImportDeclaration.ts | 9 ++++++- .../src/generated/peers/ETSUnionType.ts | 2 +- 6 files changed, 31 insertions(+), 17 deletions(-) diff --git a/koala-wrapper/native/src/bridges.cc b/koala-wrapper/native/src/bridges.cc index 319a3f89d..02e25d363 100644 --- a/koala-wrapper/native/src/bridges.cc +++ b/koala-wrapper/native/src/bridges.cc @@ -297,19 +297,23 @@ KBoolean impl_IsETSFunctionType(KNativePointer nodePtr) } KOALA_INTEROP_1(IsETSFunctionType, KBoolean, KNativePointer) -KNativePointer impl_ETSParserBuildImportDeclaration(KNativePointer context, KInt importKinds, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KNativePointer source, KNativePointer program, KInt importFlag) +KNativePointer impl_ETSParserBuildImportDeclaration(KNativePointer context, KNativePointer source, + KNativePointerArray specifiers, KUInt specifiersSequenceLength, + KInt importKind, KNativePointer programPtr, KInt flags) { const auto _context = reinterpret_cast(context); - const auto _kinds = static_cast(importKinds); - const auto _specifiers = reinterpret_cast(specifiers); - const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); const auto _source = reinterpret_cast(source); - const auto _program = reinterpret_cast(program); - const auto _importFlag = static_cast(importFlag); - - return GetImpl()->ETSParserBuildImportDeclaration(_context, _kinds, _specifiers, _specifiersSequenceLength, _source, _program, _importFlag); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + const auto _importKind = static_cast(importKind); + const auto _program = reinterpret_cast(programPtr); + const auto _flags = static_cast(flags); + auto result = GetImpl()->ETSParserBuildImportDeclaration(_context, _importKind, _specifiers, + _specifiersSequenceLength, _source, _program, _flags); + return result; } -KOALA_INTEROP_7(ETSParserBuildImportDeclaration, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KNativePointer, KNativePointer, KInt) +KOALA_INTEROP_7(ETSParserBuildImportDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, + KUInt, KInt, KNativePointer, KInt) KInt impl_GenerateTsDeclarationsFromContext(KNativePointer contextPtr, KStringPtr &outputDeclEts, KStringPtr &outputEts, KBoolean exportAll) @@ -579,4 +583,4 @@ KNativePointer impl_AnnotationUsageIrPropertiesPtrConst(KNativePointer context, auto result = GetImpl()->AnnotationUsageIrPropertiesPtrConst(_context, _receiver, &length); return (void*)new std::vector(result, result + length); } -KOALA_INTEROP_2(AnnotationUsageIrPropertiesPtrConst, KNativePointer, KNativePointer, KNativePointer); \ No newline at end of file +KOALA_INTEROP_2(AnnotationUsageIrPropertiesPtrConst, KNativePointer, KNativePointer, KNativePointer); diff --git a/koala-wrapper/src/Es2pandaNativeModule.ts b/koala-wrapper/src/Es2pandaNativeModule.ts index a92cdcd82..2fb20dcb2 100644 --- a/koala-wrapper/src/Es2pandaNativeModule.ts +++ b/koala-wrapper/src/Es2pandaNativeModule.ts @@ -289,7 +289,7 @@ export class Es2pandaNativeModule { ): KPtr { throw new Error('Not implemented'); } - _CreateETSImportDeclaration( + _ETSParserBuildImportDeclaration( context: KNativePointer, importPath: KNativePointer, specifiers: BigUint64Array, @@ -547,7 +547,7 @@ export class Es2pandaNativeModule { _CreateETSUnionType(context: KPtr, types: KPtrArray, typesLen: KInt): KPtr { throw new Error('Not implemented'); } - _ETSUnionTypTypesConst(context: KPtr, node: KPtr, returnTypeLen: KPtr): KPtr { + _ETSUnionTypeTypesConst(context: KPtr, node: KPtr, returnTypeLen: KPtr): KPtr { throw new Error('Not implemented'); } diff --git a/koala-wrapper/src/generated/Es2pandaNativeModule.ts b/koala-wrapper/src/generated/Es2pandaNativeModule.ts index 495ba149d..9f58edd36 100644 --- a/koala-wrapper/src/generated/Es2pandaNativeModule.ts +++ b/koala-wrapper/src/generated/Es2pandaNativeModule.ts @@ -103,7 +103,7 @@ export class Es2pandaNativeModule { _ETSFunctionTypeReturnType(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'ETSFunctionTypeIrReturnType was not overloaded by native module initialization") } - _ETSFunctionTypeFunctionalInterface(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _ETSFunctionTypeFunctionalInterfaceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'ETSFunctionTypeIrFunctionalInterface was not overloaded by native module initialization") } _ETSFunctionTypeSetFunctionalInterface(context: KNativePointer, receiver: KNativePointer, functionalInterface: KNativePointer): void { @@ -790,7 +790,7 @@ export class Es2pandaNativeModule { _UpdateETSUnionType(context: KNativePointer, original: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { throw new Error("'UpdateETSUnionTypeIr was not overloaded by native module initialization") } - _ETSUnionTypTypesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + _ETSUnionTypeTypesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("'ETSUnionTypeIrTypesConst was not overloaded by native module initialization") } _CreateTSPropertySignature(context: KNativePointer, key: KNativePointer, typeAnnotation: KNativePointer, computed: KBoolean, optional_arg: KBoolean, readonly_arg: KBoolean): KNativePointer { @@ -2143,6 +2143,9 @@ export class Es2pandaNativeModule { _UpdateETSPackageDeclaration(context: KNativePointer, original: KNativePointer, name: KNativePointer): KNativePointer { throw new Error("'UpdateETSPackageDeclaration was not overloaded by native module initialization") } + _CreateETSImportDeclaration(context: KNativePointer, importPath: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKinds: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } _UpdateETSImportDeclaration(context: KNativePointer, original: KNativePointer, source: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKind: KInt): KNativePointer { throw new Error("'UpdateETSImportDeclaration was not overloaded by native module initialization") } diff --git a/koala-wrapper/src/generated/peers/ETSFunctionType.ts b/koala-wrapper/src/generated/peers/ETSFunctionType.ts index 4686b0dc6..bbdd7470f 100644 --- a/koala-wrapper/src/generated/peers/ETSFunctionType.ts +++ b/koala-wrapper/src/generated/peers/ETSFunctionType.ts @@ -57,7 +57,7 @@ export class ETSFunctionType extends TypeNode { return unpackNode(global.generatedEs2panda._ETSFunctionTypeReturnTypeConst(global.context, this.peer)) } get functionalInterface(): TSInterfaceDeclaration | undefined { - return unpackNode(global.generatedEs2panda._ETSFunctionTypeFunctionalInterface(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSFunctionTypeFunctionalInterfaceConst(global.context, this.peer)) } /** @deprecated */ setFunctionalInterface(functionalInterface: TSInterfaceDeclaration): this { diff --git a/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts b/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts index 919394d2a..ac6ba24d9 100644 --- a/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts @@ -40,9 +40,16 @@ export class ETSImportDeclaration extends ImportDeclaration { super(pointer) } + static etsParserBuildImportDeclaration(source: StringLiteral | undefined, specifiers: readonly AstNode[], importKind: Es2pandaImportKinds, program: ArktsObject, flags: Es2pandaImportFlags): ETSImportDeclaration { + return new ETSImportDeclaration(global.es2panda._ETSParserBuildImportDeclaration(global.context, passNode(source), passNodeArray(specifiers), specifiers.length, importKind, passNode(program), flags)) + } static createETSImportDeclaration(source: StringLiteral | undefined, specifiers: readonly AstNode[], importKind: Es2pandaImportKinds, program: ArktsObject, flags: Es2pandaImportFlags): ETSImportDeclaration { - return new ETSImportDeclaration(global.es2panda._CreateETSImportDeclaration(global.context, passNode(source), passNodeArray(specifiers), specifiers.length, importKind, passNode(program), flags)) + return new ETSImportDeclaration(global.es2panda._ETSParserBuildImportDeclaration(global.context, passNode(source), passNodeArray(specifiers), specifiers.length, importKind, passNode(program), flags)) } + + // static createETSImportDeclaration(importPath: StringLiteral | undefined, specifiers: readonly AstNode[], importKinds: Es2pandaImportKinds): ETSImportDeclaration { + // return new ETSImportDeclaration(global.generatedEs2panda._CreateETSImportDeclaration(global.context, passNode(importPath), passNodeArray(specifiers), specifiers.length, importKinds)) + // } static updateETSImportDeclaration(original: ETSImportDeclaration | undefined, source: StringLiteral | undefined, specifiers: readonly AstNode[], importKind: Es2pandaImportKinds): ETSImportDeclaration { return new ETSImportDeclaration(global.generatedEs2panda._UpdateETSImportDeclaration(global.context, passNode(original), passNode(source), passNodeArray(specifiers), specifiers.length, importKind)) } diff --git a/koala-wrapper/src/generated/peers/ETSUnionType.ts b/koala-wrapper/src/generated/peers/ETSUnionType.ts index 745512c51..91efd07d3 100644 --- a/koala-wrapper/src/generated/peers/ETSUnionType.ts +++ b/koala-wrapper/src/generated/peers/ETSUnionType.ts @@ -43,7 +43,7 @@ export class ETSUnionType extends TypeNode { return new ETSUnionType(global.generatedEs2panda._UpdateETSUnionType(global.context, passNode(original), passNodeArray(types), types.length)) } get types(): readonly TypeNode[] { - return unpackNodeArray(global.generatedEs2panda._ETSUnionTypTypesConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ETSUnionTypeTypesConst(global.context, this.peer)) } } export function isETSUnionType(node: AstNode): node is ETSUnionType { -- Gitee From feefc3d5d8623449ecbf4781e625f5f5d68d0c8f Mon Sep 17 00:00:00 2001 From: Keerecles Date: Wed, 11 Jun 2025 10:00:08 +0800 Subject: [PATCH 05/17] code clean Signed-off-by: Keerecles Change-Id: Icb81e0ddcf1eca9403289b5ddc29a9ad8dc00373 --- koala-wrapper/native/src/bridges.cc | 15 --------------- koala-wrapper/native/src/common.cc | 18 ------------------ koala-wrapper/native/src/common.h | 18 +++++++++++++++++- 3 files changed, 17 insertions(+), 34 deletions(-) diff --git a/koala-wrapper/native/src/bridges.cc b/koala-wrapper/native/src/bridges.cc index 02e25d363..1d5ac9370 100644 --- a/koala-wrapper/native/src/bridges.cc +++ b/koala-wrapper/native/src/bridges.cc @@ -490,21 +490,6 @@ KNativePointer impl_CreateDiagnosticKind(KNativePointer context, KStringPtr& mes } KOALA_INTEROP_3(CreateDiagnosticKind, KNativePointer, KNativePointer, KStringPtr, KInt); -inline KUInt unpackUInt(const KByte* bytes) -{ - const KUInt BYTE_0 = 0; - const KUInt BYTE_1 = 1; - const KUInt BYTE_2 = 2; - const KUInt BYTE_3 = 3; - - const KUInt BYTE_1_SHIFT = 8; - const KUInt BYTE_2_SHIFT = 16; - const KUInt BYTE_3_SHIFT = 24; - return (bytes[BYTE_0] | (bytes[BYTE_1] << BYTE_1_SHIFT) - | (bytes[BYTE_2] << BYTE_2_SHIFT) | (bytes[BYTE_3] << BYTE_3_SHIFT) - ); -} - KNativePointer impl_CreateDiagnosticInfo(KNativePointer context, KNativePointer kind, KStringArray argsPtr, KInt argc) { const auto _context = reinterpret_cast(context); diff --git a/koala-wrapper/native/src/common.cc b/koala-wrapper/native/src/common.cc index 6a71c699f..c6fb3bf22 100644 --- a/koala-wrapper/native/src/common.cc +++ b/koala-wrapper/native/src/common.cc @@ -169,24 +169,6 @@ char* getStringCopy(KStringPtr& ptr) return strdup(ptr.c_str()); } -inline KUInt unpackUInt(const KByte* bytes) -{ - const KUInt BYTE_0 = 0; - const KUInt BYTE_1 = 1; - const KUInt BYTE_2 = 2; - const KUInt BYTE_3 = 3; - - const KUInt BYTE_1_SHIFT = 8; - const KUInt BYTE_2_SHIFT = 16; - const KUInt BYTE_3_SHIFT = 24; - return ( - bytes[BYTE_0] - | (bytes[BYTE_1] << BYTE_1_SHIFT) - | (bytes[BYTE_2] << BYTE_2_SHIFT) - | (bytes[BYTE_3] << BYTE_3_SHIFT) - ); -} - void impl_MemInitialize() { GetImpl()->MemInitialize(); diff --git a/koala-wrapper/native/src/common.h b/koala-wrapper/native/src/common.h index f2d8387c3..f92e740d4 100644 --- a/koala-wrapper/native/src/common.h +++ b/koala-wrapper/native/src/common.h @@ -32,7 +32,23 @@ string getString(KStringPtr ptr); char* getStringCopy(KStringPtr& ptr); -inline KUInt unpackUInt(const KByte* bytes); +inline KUInt unpackUInt(const KByte* bytes) +{ + const KUInt BYTE_0 = 0; + const KUInt BYTE_1 = 1; + const KUInt BYTE_2 = 2; + const KUInt BYTE_3 = 3; + + const KUInt BYTE_1_SHIFT = 8; + const KUInt BYTE_2_SHIFT = 16; + const KUInt BYTE_3_SHIFT = 24; + return ( + bytes[BYTE_0] + | (bytes[BYTE_1] << BYTE_1_SHIFT) + | (bytes[BYTE_2] << BYTE_2_SHIFT) + | (bytes[BYTE_3] << BYTE_3_SHIFT) + ); +} es2panda_ContextState intToState(KInt state); -- Gitee From 898acac5fbefcad5c9daea306a06e88ece92e1e3 Mon Sep 17 00:00:00 2001 From: Keerecles Date: Wed, 11 Jun 2025 16:00:13 +0800 Subject: [PATCH 06/17] upate Es2pandaEnums Signed-off-by: Keerecles Change-Id: If9941430ef63b5708fb733df04b59c065ea6ab25 --- arkui-plugins/.gitignore | 2 +- arkui-plugins/common/import-collector.ts | 2 +- arkui-plugins/memo-plugins/memo-factory.ts | 2 +- .../ui-plugins/component-transformer.ts | 2 +- .../ui-plugins/entry-translators/factory.ts | 2 +- .../ui-plugins/preprocessor-transform.ts | 2 +- koala-wrapper/src/arkts-api/class-by-peer.ts | 2 +- koala-wrapper/src/arkts-api/index.ts | 2 +- .../node-utilities/ObjectExpression.ts | 2 +- koala-wrapper/src/arkts-api/peers/AstNode.ts | 2 +- koala-wrapper/src/arkts-api/types.ts | 2 +- .../src/arkts-api/utilities/private.ts | 2 +- koala-wrapper/src/arkts-api/visitor.ts | 2 +- koala-wrapper/src/generated/Es2pandaEnums.ts | 1180 +++++++++-------- .../generated/peers/ETSImportDeclaration.ts | 2 +- koala-wrapper/src/reexport-for-generated.ts | 2 +- 16 files changed, 638 insertions(+), 572 deletions(-) diff --git a/arkui-plugins/.gitignore b/arkui-plugins/.gitignore index 98f9b3e90..66ca0417a 100644 --- a/arkui-plugins/.gitignore +++ b/arkui-plugins/.gitignore @@ -6,7 +6,7 @@ node_modules/ dist/ build/ lib/ - +test/entry/ *.tgz package-lock.json diff --git a/arkui-plugins/common/import-collector.ts b/arkui-plugins/common/import-collector.ts index 935b339af..d92a88303 100644 --- a/arkui-plugins/common/import-collector.ts +++ b/arkui-plugins/common/import-collector.ts @@ -73,7 +73,7 @@ export class ImportCollector { collectImport( imported: string, local?: string, - kind: arkts.Es2pandaImportKinds = arkts.Es2pandaImportKinds.IMPORT_KINDS_TYPE + kind: arkts.Es2pandaImportKinds = arkts.Es2pandaImportKinds.IMPORT_KINDS_TYPES ): void { if (!this.sourceMap.has(imported)) { throw new Error(`ImportCollector: import ${imported}'s source haven't been collected yet.`); diff --git a/arkui-plugins/memo-plugins/memo-factory.ts b/arkui-plugins/memo-plugins/memo-factory.ts index 37eed959b..f337e05a1 100644 --- a/arkui-plugins/memo-plugins/memo-factory.ts +++ b/arkui-plugins/memo-plugins/memo-factory.ts @@ -45,7 +45,7 @@ export class factory { const importDecl: arkts.ETSImportDeclaration = arkts.factory.createImportDeclaration( source, [factory.createContextTypeImportSpecifier(), factory.createIdTypeImportSpecifier()], - arkts.Es2pandaImportKinds.IMPORT_KINDS_TYPE, + arkts.Es2pandaImportKinds.IMPORT_KINDS_TYPES, program!, arkts.Es2pandaImportFlags.IMPORT_FLAGS_NONE ); diff --git a/arkui-plugins/ui-plugins/component-transformer.ts b/arkui-plugins/ui-plugins/component-transformer.ts index 1bde82161..b35560437 100644 --- a/arkui-plugins/ui-plugins/component-transformer.ts +++ b/arkui-plugins/ui-plugins/component-transformer.ts @@ -137,7 +137,7 @@ export class ComponentTransformer extends AbstractVisitor { source, imported, imported, - arkts.Es2pandaImportKinds.IMPORT_KINDS_VALUE, + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL, this.program ); } diff --git a/arkui-plugins/ui-plugins/entry-translators/factory.ts b/arkui-plugins/ui-plugins/entry-translators/factory.ts index 09d1c85b7..115f5d587 100644 --- a/arkui-plugins/ui-plugins/entry-translators/factory.ts +++ b/arkui-plugins/ui-plugins/entry-translators/factory.ts @@ -277,7 +277,7 @@ export class factory { source, imported, imported, - arkts.Es2pandaImportKinds.IMPORT_KINDS_VALUE, + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL, program ); } diff --git a/arkui-plugins/ui-plugins/preprocessor-transform.ts b/arkui-plugins/ui-plugins/preprocessor-transform.ts index 9a8cba2bd..08a9ac735 100644 --- a/arkui-plugins/ui-plugins/preprocessor-transform.ts +++ b/arkui-plugins/ui-plugins/preprocessor-transform.ts @@ -62,7 +62,7 @@ export class PreprocessorTransformer extends AbstractVisitor { const newImport: arkts.ETSImportDeclaration = arkts.factory.createImportDeclaration( node.source?.clone(), [factory.createAdditionalImportSpecifier(interfaceName, interfaceName)], - arkts.Es2pandaImportKinds.IMPORT_KINDS_VALUE, + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL, this.program!, arkts.Es2pandaImportFlags.IMPORT_FLAGS_NONE ); diff --git a/koala-wrapper/src/arkts-api/class-by-peer.ts b/koala-wrapper/src/arkts-api/class-by-peer.ts index f8d79996c..22e2c0661 100644 --- a/koala-wrapper/src/arkts-api/class-by-peer.ts +++ b/koala-wrapper/src/arkts-api/class-by-peer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { Es2pandaAstNodeType } from '../Es2pandaEnums'; +import { Es2pandaAstNodeType } from '../generated/Es2pandaEnums'; import { throwError } from '../utils'; import { global } from './static/global'; import { KNativePointer, nullptr } from '@koalaui/interop'; diff --git a/koala-wrapper/src/arkts-api/index.ts b/koala-wrapper/src/arkts-api/index.ts index f0a9a91d1..92b049304 100644 --- a/koala-wrapper/src/arkts-api/index.ts +++ b/koala-wrapper/src/arkts-api/index.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -export * from "../Es2pandaEnums" +export * from "../generated/Es2pandaEnums" export * from "../generated/Es2pandaEnums" export * from "../generated/peers/AnnotationDeclaration" export * from "../generated/peers/AnnotationUsage" diff --git a/koala-wrapper/src/arkts-api/node-utilities/ObjectExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/ObjectExpression.ts index ac7a9d6b6..e0734d73c 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ObjectExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ObjectExpression.ts @@ -16,7 +16,7 @@ import { ObjectExpression, Property } from '../../generated'; import { isSameNativeObject } from '../peers/ArktsObject'; import { attachModifiers, updateThenAttach } from '../utilities/private'; -import { Es2pandaAstNodeType } from '../../Es2pandaEnums'; +import { Es2pandaAstNodeType } from '../../generated/Es2pandaEnums'; export function updateObjectExpression( original: ObjectExpression, diff --git a/koala-wrapper/src/arkts-api/peers/AstNode.ts b/koala-wrapper/src/arkts-api/peers/AstNode.ts index 54b699cd2..930e04b66 100644 --- a/koala-wrapper/src/arkts-api/peers/AstNode.ts +++ b/koala-wrapper/src/arkts-api/peers/AstNode.ts @@ -19,7 +19,7 @@ import { allFlags, nodeType, unpackNode, unpackNodeArray, unpackNonNullableNode, import { throwError } from '../../utils'; import { Es2pandaModifierFlags } from '../../generated/Es2pandaEnums'; import { ArktsObject } from './ArktsObject'; -import { Es2pandaAstNodeType } from '../../Es2pandaEnums'; +import { Es2pandaAstNodeType } from '../../generated/Es2pandaEnums'; import { SourcePosition } from './SourcePosition'; export abstract class AstNode extends ArktsObject { diff --git a/koala-wrapper/src/arkts-api/types.ts b/koala-wrapper/src/arkts-api/types.ts index be1c31651..6947f6186 100644 --- a/koala-wrapper/src/arkts-api/types.ts +++ b/koala-wrapper/src/arkts-api/types.ts @@ -38,7 +38,7 @@ import { updatePeerByNode, } from './utilities/private'; import { proceedToState } from './utilities/public'; -import { Es2pandaAstNodeType } from '../Es2pandaEnums'; +import { Es2pandaAstNodeType } from '../generated/Es2pandaEnums'; import { AstNode } from './peers/AstNode'; import { ArktsObject } from './peers/ArktsObject'; import { Config } from './peers/Config'; diff --git a/koala-wrapper/src/arkts-api/utilities/private.ts b/koala-wrapper/src/arkts-api/utilities/private.ts index 30db3e472..429ea6ab6 100644 --- a/koala-wrapper/src/arkts-api/utilities/private.ts +++ b/koala-wrapper/src/arkts-api/utilities/private.ts @@ -29,7 +29,7 @@ import { Es2pandaModifierFlags, Es2pandaScriptFunctionFlags } from '../../genera import { classByPeer } from '../class-by-peer'; import type { AstNode } from '../peers/AstNode'; import { ArktsObject } from '../peers/ArktsObject'; -import { Es2pandaAstNodeType } from '../../Es2pandaEnums'; +import { Es2pandaAstNodeType } from '../../generated/Es2pandaEnums'; export const arrayOfNullptr = new BigUint64Array([nullptr]); diff --git a/koala-wrapper/src/arkts-api/visitor.ts b/koala-wrapper/src/arkts-api/visitor.ts index b2bca2336..5199f48f2 100644 --- a/koala-wrapper/src/arkts-api/visitor.ts +++ b/koala-wrapper/src/arkts-api/visitor.ts @@ -65,7 +65,7 @@ import { isAssignmentExpression, } from './factory/nodeTests'; import { classDefinitionFlags } from './utilities/public'; -import { Es2pandaAstNodeType } from '../Es2pandaEnums'; +import { Es2pandaAstNodeType } from '../generated/Es2pandaEnums'; type Visitor = (node: AstNode) => AstNode; diff --git a/koala-wrapper/src/generated/Es2pandaEnums.ts b/koala-wrapper/src/generated/Es2pandaEnums.ts index 1e5ee0d2c..c5a873a54 100644 --- a/koala-wrapper/src/generated/Es2pandaEnums.ts +++ b/koala-wrapper/src/generated/Es2pandaEnums.ts @@ -13,7 +13,6 @@ * limitations under the License. */ -// RENAMED: es2panda_ContextState -> Es2pandaContextState export enum Es2pandaContextState { ES2PANDA_STATE_NEW = 0, ES2PANDA_STATE_PARSED = 1, @@ -24,174 +23,178 @@ export enum Es2pandaContextState { ES2PANDA_STATE_BIN_GENERATED = 6, ES2PANDA_STATE_ERROR = 7 } -// export enum Es2pandaAstNodeType { -// AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION = 0, -// AST_NODE_TYPE_ANNOTATION_DECLARATION = 1, -// AST_NODE_TYPE_ANNOTATION_USAGE = 2, -// AST_NODE_TYPE_ASSERT_STATEMENT = 3, -// AST_NODE_TYPE_AWAIT_EXPRESSION = 4, -// AST_NODE_TYPE_BIGINT_LITERAL = 5, -// AST_NODE_TYPE_BINARY_EXPRESSION = 6, -// AST_NODE_TYPE_BLOCK_STATEMENT = 7, -// AST_NODE_TYPE_BOOLEAN_LITERAL = 8, -// AST_NODE_TYPE_BREAK_STATEMENT = 9, -// AST_NODE_TYPE_CALL_EXPRESSION = 10, -// AST_NODE_TYPE_CATCH_CLAUSE = 11, -// AST_NODE_TYPE_CHAIN_EXPRESSION = 12, -// AST_NODE_TYPE_CHAR_LITERAL = 13, -// AST_NODE_TYPE_CLASS_DEFINITION = 14, -// AST_NODE_TYPE_CLASS_DECLARATION = 15, -// AST_NODE_TYPE_CLASS_EXPRESSION = 16, -// AST_NODE_TYPE_CLASS_PROPERTY = 17, -// AST_NODE_TYPE_CLASS_STATIC_BLOCK = 18, -// AST_NODE_TYPE_CONDITIONAL_EXPRESSION = 19, -// AST_NODE_TYPE_CONTINUE_STATEMENT = 20, -// AST_NODE_TYPE_DEBUGGER_STATEMENT = 21, -// AST_NODE_TYPE_DECORATOR = 22, -// AST_NODE_TYPE_DIRECT_EVAL = 23, -// AST_NODE_TYPE_DO_WHILE_STATEMENT = 24, -// AST_NODE_TYPE_EMPTY_STATEMENT = 25, -// AST_NODE_TYPE_EXPORT_ALL_DECLARATION = 26, -// AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION = 27, -// AST_NODE_TYPE_EXPORT_NAMED_DECLARATION = 28, -// AST_NODE_TYPE_EXPORT_SPECIFIER = 29, -// AST_NODE_TYPE_EXPRESSION_STATEMENT = 30, -// AST_NODE_TYPE_FOR_IN_STATEMENT = 31, -// AST_NODE_TYPE_FOR_OF_STATEMENT = 32, -// AST_NODE_TYPE_FOR_UPDATE_STATEMENT = 33, -// AST_NODE_TYPE_FUNCTION_DECLARATION = 34, -// AST_NODE_TYPE_FUNCTION_EXPRESSION = 35, -// AST_NODE_TYPE_IDENTIFIER = 36, -// AST_NODE_TYPE_DUMMYNODE = 37, -// AST_NODE_TYPE_IF_STATEMENT = 38, -// AST_NODE_TYPE_IMPORT_DECLARATION = 39, -// AST_NODE_TYPE_IMPORT_EXPRESSION = 40, -// AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER = 41, -// AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER = 42, -// AST_NODE_TYPE_IMPORT_SPECIFIER = 43, -// AST_NODE_TYPE_LABELLED_STATEMENT = 44, -// AST_NODE_TYPE_MEMBER_EXPRESSION = 45, -// AST_NODE_TYPE_META_PROPERTY_EXPRESSION = 46, -// AST_NODE_TYPE_METHOD_DEFINITION = 47, -// AST_NODE_TYPE_NAMED_TYPE = 48, -// AST_NODE_TYPE_NAMESPACE_DECLARATION = 49, -// AST_NODE_TYPE_NAMESPACE_DEFINITION = 50, -// AST_NODE_TYPE_NEW_EXPRESSION = 51, -// AST_NODE_TYPE_NULL_LITERAL = 52, -// AST_NODE_TYPE_UNDEFINED_LITERAL = 53, -// AST_NODE_TYPE_NUMBER_LITERAL = 54, -// AST_NODE_TYPE_OMITTED_EXPRESSION = 55, -// AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION = 56, -// AST_NODE_TYPE_PROPERTY = 57, -// AST_NODE_TYPE_REGEXP_LITERAL = 58, -// AST_NODE_TYPE_REEXPORT_STATEMENT = 59, -// AST_NODE_TYPE_RETURN_STATEMENT = 60, -// AST_NODE_TYPE_SCRIPT_FUNCTION = 61, -// AST_NODE_TYPE_SEQUENCE_EXPRESSION = 62, -// AST_NODE_TYPE_STRING_LITERAL = 63, -// AST_NODE_TYPE_ETS_NULL_TYPE = 64, -// AST_NODE_TYPE_ETS_UNDEFINED_TYPE = 65, -// AST_NODE_TYPE_ETS_NEVER_TYPE = 66, -// AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE = 67, -// AST_NODE_TYPE_ETS_FUNCTION_TYPE = 68, -// AST_NODE_TYPE_ETS_WILDCARD_TYPE = 69, -// AST_NODE_TYPE_ETS_PRIMITIVE_TYPE = 70, -// AST_NODE_TYPE_ETS_PACKAGE_DECLARATION = 71, -// AST_NODE_TYPE_ETS_CLASS_LITERAL = 72, -// AST_NODE_TYPE_ETS_TYPE_REFERENCE = 73, -// AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART = 74, -// AST_NODE_TYPE_ETS_UNION_TYPE = 75, -// AST_NODE_TYPE_ETS_LAUNCH_EXPRESSION = 76, -// AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION = 77, -// AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION = 78, -// AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION = 79, -// AST_NODE_TYPE_ETS_IMPORT_DECLARATION = 80, -// AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION = 81, -// AST_NODE_TYPE_ETS_TUPLE = 82, -// AST_NODE_TYPE_ETS_SCRIPT = 83, -// AST_NODE_TYPE_SUPER_EXPRESSION = 84, -// AST_NODE_TYPE_STRUCT_DECLARATION = 85, -// AST_NODE_TYPE_SWITCH_CASE_STATEMENT = 86, -// AST_NODE_TYPE_SWITCH_STATEMENT = 87, -// AST_NODE_TYPE_TS_ENUM_DECLARATION = 88, -// AST_NODE_TYPE_TS_ENUM_MEMBER = 89, -// AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE = 90, -// AST_NODE_TYPE_TS_NUMBER_KEYWORD = 91, -// AST_NODE_TYPE_TS_ANY_KEYWORD = 92, -// AST_NODE_TYPE_TS_STRING_KEYWORD = 93, -// AST_NODE_TYPE_TS_BOOLEAN_KEYWORD = 94, -// AST_NODE_TYPE_TS_VOID_KEYWORD = 95, -// AST_NODE_TYPE_TS_UNDEFINED_KEYWORD = 96, -// AST_NODE_TYPE_TS_UNKNOWN_KEYWORD = 97, -// AST_NODE_TYPE_TS_OBJECT_KEYWORD = 98, -// AST_NODE_TYPE_TS_BIGINT_KEYWORD = 99, -// AST_NODE_TYPE_TS_NEVER_KEYWORD = 100, -// AST_NODE_TYPE_TS_NON_NULL_EXPRESSION = 101, -// AST_NODE_TYPE_TS_NULL_KEYWORD = 102, -// AST_NODE_TYPE_TS_ARRAY_TYPE = 103, -// AST_NODE_TYPE_TS_UNION_TYPE = 104, -// AST_NODE_TYPE_TS_TYPE_LITERAL = 105, -// AST_NODE_TYPE_TS_PROPERTY_SIGNATURE = 106, -// AST_NODE_TYPE_TS_METHOD_SIGNATURE = 107, -// AST_NODE_TYPE_TS_SIGNATURE_DECLARATION = 108, -// AST_NODE_TYPE_TS_PARENT_TYPE = 109, -// AST_NODE_TYPE_TS_LITERAL_TYPE = 110, -// AST_NODE_TYPE_TS_INFER_TYPE = 111, -// AST_NODE_TYPE_TS_CONDITIONAL_TYPE = 112, -// AST_NODE_TYPE_TS_IMPORT_TYPE = 113, -// AST_NODE_TYPE_TS_INTERSECTION_TYPE = 114, -// AST_NODE_TYPE_TS_MAPPED_TYPE = 115, -// AST_NODE_TYPE_TS_MODULE_BLOCK = 116, -// AST_NODE_TYPE_TS_THIS_TYPE = 117, -// AST_NODE_TYPE_TS_TYPE_OPERATOR = 118, -// AST_NODE_TYPE_TS_TYPE_PARAMETER = 119, -// AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION = 120, -// AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION = 121, -// AST_NODE_TYPE_TS_TYPE_PREDICATE = 122, -// AST_NODE_TYPE_TS_PARAMETER_PROPERTY = 123, -// AST_NODE_TYPE_TS_MODULE_DECLARATION = 124, -// AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION = 125, -// AST_NODE_TYPE_TS_FUNCTION_TYPE = 126, -// AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE = 127, -// AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION = 128, -// AST_NODE_TYPE_TS_TYPE_REFERENCE = 129, -// AST_NODE_TYPE_TS_QUALIFIED_NAME = 130, -// AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE = 131, -// AST_NODE_TYPE_TS_INTERFACE_DECLARATION = 132, -// AST_NODE_TYPE_TS_INTERFACE_BODY = 133, -// AST_NODE_TYPE_TS_INTERFACE_HERITAGE = 134, -// AST_NODE_TYPE_TS_TUPLE_TYPE = 135, -// AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER = 136, -// AST_NODE_TYPE_TS_INDEX_SIGNATURE = 137, -// AST_NODE_TYPE_TS_TYPE_QUERY = 138, -// AST_NODE_TYPE_TS_AS_EXPRESSION = 139, -// AST_NODE_TYPE_TS_CLASS_IMPLEMENTS = 140, -// AST_NODE_TYPE_TS_TYPE_ASSERTION = 141, -// AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION = 142, -// AST_NODE_TYPE_TEMPLATE_ELEMENT = 143, -// AST_NODE_TYPE_TEMPLATE_LITERAL = 144, -// AST_NODE_TYPE_THIS_EXPRESSION = 145, -// AST_NODE_TYPE_TYPEOF_EXPRESSION = 146, -// AST_NODE_TYPE_THROW_STATEMENT = 147, -// AST_NODE_TYPE_TRY_STATEMENT = 148, -// AST_NODE_TYPE_UNARY_EXPRESSION = 149, -// AST_NODE_TYPE_UPDATE_EXPRESSION = 150, -// AST_NODE_TYPE_VARIABLE_DECLARATION = 151, -// AST_NODE_TYPE_VARIABLE_DECLARATOR = 152, -// AST_NODE_TYPE_WHILE_STATEMENT = 153, -// AST_NODE_TYPE_YIELD_EXPRESSION = 154, -// AST_NODE_TYPE_OPAQUE_TYPE_NODE = 155, -// AST_NODE_TYPE_BLOCK_EXPRESSION = 156, -// AST_NODE_TYPE_ERROR_TYPE_NODE = 157, -// AST_NODE_TYPE_ARRAY_EXPRESSION = 158, -// AST_NODE_TYPE_ARRAY_PATTERN = 159, -// AST_NODE_TYPE_ASSIGNMENT_EXPRESSION = 160, -// AST_NODE_TYPE_ASSIGNMENT_PATTERN = 161, -// AST_NODE_TYPE_OBJECT_EXPRESSION = 162, -// AST_NODE_TYPE_OBJECT_PATTERN = 163, -// AST_NODE_TYPE_SPREAD_ELEMENT = 164, -// AST_NODE_TYPE_REST_ELEMENT = 165 -// } +export enum Es2pandaPluginDiagnosticType { + ES2PANDA_PLUGIN_WARNING = 0, + ES2PANDA_PLUGIN_ERROR = 1, + ES2PANDA_PLUGIN_SUGGESTION = 2 +} +export enum Es2pandaAstNodeType { + AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION = 0, + AST_NODE_TYPE_ANNOTATION_DECLARATION = 1, + AST_NODE_TYPE_ANNOTATION_USAGE = 2, + AST_NODE_TYPE_ASSERT_STATEMENT = 3, + AST_NODE_TYPE_AWAIT_EXPRESSION = 4, + AST_NODE_TYPE_BIGINT_LITERAL = 5, + AST_NODE_TYPE_BINARY_EXPRESSION = 6, + AST_NODE_TYPE_BLOCK_STATEMENT = 7, + AST_NODE_TYPE_BOOLEAN_LITERAL = 8, + AST_NODE_TYPE_BREAK_STATEMENT = 9, + AST_NODE_TYPE_CALL_EXPRESSION = 10, + AST_NODE_TYPE_CATCH_CLAUSE = 11, + AST_NODE_TYPE_CHAIN_EXPRESSION = 12, + AST_NODE_TYPE_CHAR_LITERAL = 13, + AST_NODE_TYPE_CLASS_DEFINITION = 14, + AST_NODE_TYPE_CLASS_DECLARATION = 15, + AST_NODE_TYPE_CLASS_EXPRESSION = 16, + AST_NODE_TYPE_CLASS_PROPERTY = 17, + AST_NODE_TYPE_CLASS_STATIC_BLOCK = 18, + AST_NODE_TYPE_CONDITIONAL_EXPRESSION = 19, + AST_NODE_TYPE_CONTINUE_STATEMENT = 20, + AST_NODE_TYPE_DEBUGGER_STATEMENT = 21, + AST_NODE_TYPE_DECORATOR = 22, + AST_NODE_TYPE_DIRECT_EVAL = 23, + AST_NODE_TYPE_DO_WHILE_STATEMENT = 24, + AST_NODE_TYPE_EMPTY_STATEMENT = 25, + AST_NODE_TYPE_EXPORT_ALL_DECLARATION = 26, + AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION = 27, + AST_NODE_TYPE_EXPORT_NAMED_DECLARATION = 28, + AST_NODE_TYPE_EXPORT_SPECIFIER = 29, + AST_NODE_TYPE_EXPRESSION_STATEMENT = 30, + AST_NODE_TYPE_FOR_IN_STATEMENT = 31, + AST_NODE_TYPE_FOR_OF_STATEMENT = 32, + AST_NODE_TYPE_FOR_UPDATE_STATEMENT = 33, + AST_NODE_TYPE_FUNCTION_DECLARATION = 34, + AST_NODE_TYPE_FUNCTION_EXPRESSION = 35, + AST_NODE_TYPE_IDENTIFIER = 36, + AST_NODE_TYPE_DUMMYNODE = 37, + AST_NODE_TYPE_IF_STATEMENT = 38, + AST_NODE_TYPE_IMPORT_DECLARATION = 39, + AST_NODE_TYPE_IMPORT_EXPRESSION = 40, + AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER = 41, + AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER = 42, + AST_NODE_TYPE_IMPORT_SPECIFIER = 43, + AST_NODE_TYPE_LABELLED_STATEMENT = 44, + AST_NODE_TYPE_MEMBER_EXPRESSION = 45, + AST_NODE_TYPE_META_PROPERTY_EXPRESSION = 46, + AST_NODE_TYPE_METHOD_DEFINITION = 47, + AST_NODE_TYPE_NAMED_TYPE = 48, + AST_NODE_TYPE_NEW_EXPRESSION = 49, + AST_NODE_TYPE_NULL_LITERAL = 50, + AST_NODE_TYPE_UNDEFINED_LITERAL = 51, + AST_NODE_TYPE_NUMBER_LITERAL = 52, + AST_NODE_TYPE_OMITTED_EXPRESSION = 53, + AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION = 54, + AST_NODE_TYPE_PROPERTY = 55, + AST_NODE_TYPE_REGEXP_LITERAL = 56, + AST_NODE_TYPE_REEXPORT_STATEMENT = 57, + AST_NODE_TYPE_RETURN_STATEMENT = 58, + AST_NODE_TYPE_SCRIPT_FUNCTION = 59, + AST_NODE_TYPE_SEQUENCE_EXPRESSION = 60, + AST_NODE_TYPE_STRING_LITERAL = 61, + AST_NODE_TYPE_ETS_NON_NULLISH_TYPE = 62, + AST_NODE_TYPE_ETS_NULL_TYPE = 63, + AST_NODE_TYPE_ETS_UNDEFINED_TYPE = 64, + AST_NODE_TYPE_ETS_NEVER_TYPE = 65, + AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE = 66, + AST_NODE_TYPE_ETS_FUNCTION_TYPE = 67, + AST_NODE_TYPE_ETS_WILDCARD_TYPE = 68, + AST_NODE_TYPE_ETS_PRIMITIVE_TYPE = 69, + AST_NODE_TYPE_ETS_PACKAGE_DECLARATION = 70, + AST_NODE_TYPE_ETS_CLASS_LITERAL = 71, + AST_NODE_TYPE_ETS_TYPE_REFERENCE = 72, + AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART = 73, + AST_NODE_TYPE_ETS_UNION_TYPE = 74, + AST_NODE_TYPE_ETS_KEYOF_TYPE = 75, + AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION = 76, + AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION = 77, + AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION = 78, + AST_NODE_TYPE_ETS_IMPORT_DECLARATION = 79, + AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION = 80, + AST_NODE_TYPE_ETS_TUPLE = 81, + AST_NODE_TYPE_ETS_MODULE = 82, + AST_NODE_TYPE_SUPER_EXPRESSION = 83, + AST_NODE_TYPE_STRUCT_DECLARATION = 84, + AST_NODE_TYPE_SWITCH_CASE_STATEMENT = 85, + AST_NODE_TYPE_SWITCH_STATEMENT = 86, + AST_NODE_TYPE_TS_ENUM_DECLARATION = 87, + AST_NODE_TYPE_TS_ENUM_MEMBER = 88, + AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE = 89, + AST_NODE_TYPE_TS_NUMBER_KEYWORD = 90, + AST_NODE_TYPE_TS_ANY_KEYWORD = 91, + AST_NODE_TYPE_TS_STRING_KEYWORD = 92, + AST_NODE_TYPE_TS_BOOLEAN_KEYWORD = 93, + AST_NODE_TYPE_TS_VOID_KEYWORD = 94, + AST_NODE_TYPE_TS_UNDEFINED_KEYWORD = 95, + AST_NODE_TYPE_TS_UNKNOWN_KEYWORD = 96, + AST_NODE_TYPE_TS_OBJECT_KEYWORD = 97, + AST_NODE_TYPE_TS_BIGINT_KEYWORD = 98, + AST_NODE_TYPE_TS_NEVER_KEYWORD = 99, + AST_NODE_TYPE_TS_NON_NULL_EXPRESSION = 100, + AST_NODE_TYPE_TS_NULL_KEYWORD = 101, + AST_NODE_TYPE_TS_ARRAY_TYPE = 102, + AST_NODE_TYPE_TS_UNION_TYPE = 103, + AST_NODE_TYPE_TS_TYPE_LITERAL = 104, + AST_NODE_TYPE_TS_PROPERTY_SIGNATURE = 105, + AST_NODE_TYPE_TS_METHOD_SIGNATURE = 106, + AST_NODE_TYPE_TS_SIGNATURE_DECLARATION = 107, + AST_NODE_TYPE_TS_PARENT_TYPE = 108, + AST_NODE_TYPE_TS_LITERAL_TYPE = 109, + AST_NODE_TYPE_TS_INFER_TYPE = 110, + AST_NODE_TYPE_TS_CONDITIONAL_TYPE = 111, + AST_NODE_TYPE_TS_IMPORT_TYPE = 112, + AST_NODE_TYPE_TS_INTERSECTION_TYPE = 113, + AST_NODE_TYPE_TS_MAPPED_TYPE = 114, + AST_NODE_TYPE_TS_MODULE_BLOCK = 115, + AST_NODE_TYPE_TS_THIS_TYPE = 116, + AST_NODE_TYPE_TS_TYPE_OPERATOR = 117, + AST_NODE_TYPE_TS_TYPE_PARAMETER = 118, + AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION = 119, + AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION = 120, + AST_NODE_TYPE_TS_TYPE_PREDICATE = 121, + AST_NODE_TYPE_TS_PARAMETER_PROPERTY = 122, + AST_NODE_TYPE_TS_MODULE_DECLARATION = 123, + AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION = 124, + AST_NODE_TYPE_TS_FUNCTION_TYPE = 125, + AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE = 126, + AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION = 127, + AST_NODE_TYPE_TS_TYPE_REFERENCE = 128, + AST_NODE_TYPE_TS_QUALIFIED_NAME = 129, + AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE = 130, + AST_NODE_TYPE_TS_INTERFACE_DECLARATION = 131, + AST_NODE_TYPE_TS_INTERFACE_BODY = 132, + AST_NODE_TYPE_TS_INTERFACE_HERITAGE = 133, + AST_NODE_TYPE_TS_TUPLE_TYPE = 134, + AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER = 135, + AST_NODE_TYPE_TS_INDEX_SIGNATURE = 136, + AST_NODE_TYPE_TS_TYPE_QUERY = 137, + AST_NODE_TYPE_TS_AS_EXPRESSION = 138, + AST_NODE_TYPE_TS_CLASS_IMPLEMENTS = 139, + AST_NODE_TYPE_TS_TYPE_ASSERTION = 140, + AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION = 141, + AST_NODE_TYPE_TEMPLATE_ELEMENT = 142, + AST_NODE_TYPE_TEMPLATE_LITERAL = 143, + AST_NODE_TYPE_THIS_EXPRESSION = 144, + AST_NODE_TYPE_TYPEOF_EXPRESSION = 145, + AST_NODE_TYPE_THROW_STATEMENT = 146, + AST_NODE_TYPE_TRY_STATEMENT = 147, + AST_NODE_TYPE_UNARY_EXPRESSION = 148, + AST_NODE_TYPE_UPDATE_EXPRESSION = 149, + AST_NODE_TYPE_VARIABLE_DECLARATION = 150, + AST_NODE_TYPE_VARIABLE_DECLARATOR = 151, + AST_NODE_TYPE_WHILE_STATEMENT = 152, + AST_NODE_TYPE_YIELD_EXPRESSION = 153, + AST_NODE_TYPE_OPAQUE_TYPE_NODE = 154, + AST_NODE_TYPE_BLOCK_EXPRESSION = 155, + AST_NODE_TYPE_BROKEN_TYPE_NODE = 156, + AST_NODE_TYPE_ARRAY_EXPRESSION = 157, + AST_NODE_TYPE_ARRAY_PATTERN = 158, + AST_NODE_TYPE_ASSIGNMENT_EXPRESSION = 159, + AST_NODE_TYPE_ASSIGNMENT_PATTERN = 160, + AST_NODE_TYPE_OBJECT_EXPRESSION = 161, + AST_NODE_TYPE_OBJECT_PATTERN = 162, + AST_NODE_TYPE_SPREAD_ELEMENT = 163, + AST_NODE_TYPE_REST_ELEMENT = 164 +} export enum Es2pandaScopeType { SCOPE_TYPE_PARAM = 0, SCOPE_TYPE_CATCH_PARAM = 1, @@ -201,12 +204,11 @@ export enum Es2pandaScopeType { SCOPE_TYPE_ANNOTATION = 5, SCOPE_TYPE_ANNOTATIONPARAMSCOPE = 6, SCOPE_TYPE_LOCAL = 7, - SCOPE_TYPE_LOCAL_WITH_ALIAS = 8, - SCOPE_TYPE_LOOP = 9, - SCOPE_TYPE_LOOP_DECL = 10, - SCOPE_TYPE_FUNCTION = 11, - SCOPE_TYPE_GLOBAL = 12, - SCOPE_TYPE_MODULE = 13 + SCOPE_TYPE_LOOP = 8, + SCOPE_TYPE_LOOP_DECL = 9, + SCOPE_TYPE_FUNCTION = 10, + SCOPE_TYPE_GLOBAL = 11, + SCOPE_TYPE_MODULE = 12 } export enum Es2pandaDeclType { DECL_TYPE_NONE = 0, @@ -243,7 +245,6 @@ export enum Es2pandaResolveBindingOptions { RESOLVE_BINDING_OPTIONS_STATIC_DECLARATION = 64, RESOLVE_BINDING_OPTIONS_TYPE_ALIASES = 128, RESOLVE_BINDING_OPTIONS_ALL = 256, - RESOLVE_BINDING_OPTIONS_ALL_NON_TYPE = 512, RESOLVE_BINDING_OPTIONS_ALL_VARIABLES = 18, RESOLVE_BINDING_OPTIONS_ALL_METHOD = 36, RESOLVE_BINDING_OPTIONS_ALL_DECLARATION = 72, @@ -279,41 +280,6 @@ export enum Es2pandaScopeFlags { SCOPE_FLAGS_STATIC_FIELD_SCOPE = 320, SCOPE_FLAGS_STATIC_METHOD_SCOPE = 384 } -export enum Es2pandaEnum { - ENUM_NODE_HAS_PARENT = 0, - ENUM_NODE_HAS_SOURCE_RANGE = 1, - ENUM_EVERY_CHILD_HAS_VALID_PARENT = 2, - ENUM_EVERY_CHILD_IN_PARENT_RANGE = 3, - ENUM_CHECK_STRUCT_DECLARATION = 4, - ENUM_VARIABLE_HAS_SCOPE = 5, - ENUM_NODE_HAS_TYPE = 6, - ENUM_NO_PRIMITIVE_TYPES = 7, - ENUM_IDENTIFIER_HAS_VARIABLE = 8, - ENUM_REFERENCE_TYPE_ANNOTATION_IS_NULL = 9, - ENUM_ARITHMETIC_OPERATION_VALID = 10, - ENUM_SEQUENCE_EXPRESSION_HAS_LAST_TYPE = 11, - ENUM_CHECK_INFINITE_LOOP = 12, - ENUM_FOR_LOOP_CORRECTLY_INITIALIZED = 13, - ENUM_VARIABLE_HAS_ENCLOSING_SCOPE = 14, - ENUM_MODIFIER_ACCESS_VALID = 15, - ENUM_VARIABLE_NAME_IDENTIFIER_NAME_SAME = 16, - ENUM_CHECK_ABSTRACT_METHOD = 17, - ENUM_GETTER_SETTER_VALIDATION = 18, - ENUM_CHECK_SCOPE_DECLARATION = 19, - ENUM_CHECK_CONST_PROPERTIES = 20, - ENUM_COUNT = 21, - ENUM_BASE_FIRST = 0, - ENUM_BASE_LAST = 3, - ENUM_AFTER_PLUGINS_AFTER_PARSE_FIRST = 4, - ENUM_AFTER_PLUGINS_AFTER_PARSE_LAST = 4, - ENUM_AFTER_SCOPES_INIT_PHASE_FIRST = 5, - ENUM_AFTER_SCOPES_INIT_PHASE_LAST = 5, - ENUM_AFTER_CHECKER_PHASE_FIRST = 6, - ENUM_AFTER_CHECKER_PHASE_LAST = 20, - ENUM_FIRST = 0, - ENUM_LAST = 20, - ENUM_INVALID = 21 -} export enum Es2pandaRegExpFlags { REG_EXP_FLAGS_EMPTY = 0, REG_EXP_FLAGS_GLOBAL = 1, @@ -330,191 +296,6 @@ export enum Es2pandaId { ID_ETS = 3, ID_COUNT = 4 } -export enum Es2pandaTokenType { - TOKEN_TYPE_EOS, - TOKEN_TYPE_LITERAL_IDENT, - TOKEN_TYPE_LITERAL_STRING, - TOKEN_TYPE_LITERAL_CHAR, - TOKEN_TYPE_LITERAL_NUMBER, - TOKEN_TYPE_LITERAL_REGEXP, - TOKEN_TYPE_PUNCTUATOR_BITWISE_AND, - TOKEN_TYPE_PUNCTUATOR_BITWISE_OR, - TOKEN_TYPE_PUNCTUATOR_MULTIPLY, - TOKEN_TYPE_PUNCTUATOR_DIVIDE, - TOKEN_TYPE_PUNCTUATOR_MINUS, - TOKEN_TYPE_PUNCTUATOR_EXCLAMATION_MARK, - TOKEN_TYPE_PUNCTUATOR_TILDE, - TOKEN_TYPE_PUNCTUATOR_MINUS_MINUS, - TOKEN_TYPE_PUNCTUATOR_LEFT_SHIFT, - TOKEN_TYPE_PUNCTUATOR_RIGHT_SHIFT, - TOKEN_TYPE_PUNCTUATOR_LESS_THAN_EQUAL, - TOKEN_TYPE_PUNCTUATOR_GREATER_THAN_EQUAL, - TOKEN_TYPE_PUNCTUATOR_MOD, - TOKEN_TYPE_PUNCTUATOR_BITWISE_XOR, - TOKEN_TYPE_PUNCTUATOR_EXPONENTIATION, - TOKEN_TYPE_PUNCTUATOR_MULTIPLY_EQUAL, - TOKEN_TYPE_PUNCTUATOR_EXPONENTIATION_EQUAL, - TOKEN_TYPE_PUNCTUATOR_ARROW, - TOKEN_TYPE_PUNCTUATOR_BACK_TICK, - TOKEN_TYPE_PUNCTUATOR_HASH_MARK, - TOKEN_TYPE_PUNCTUATOR_DIVIDE_EQUAL, - TOKEN_TYPE_PUNCTUATOR_MOD_EQUAL, - TOKEN_TYPE_PUNCTUATOR_MINUS_EQUAL, - TOKEN_TYPE_PUNCTUATOR_LEFT_SHIFT_EQUAL, - TOKEN_TYPE_PUNCTUATOR_RIGHT_SHIFT_EQUAL, - TOKEN_TYPE_PUNCTUATOR_UNSIGNED_RIGHT_SHIFT, - TOKEN_TYPE_PUNCTUATOR_UNSIGNED_RIGHT_SHIFT_EQUAL, - TOKEN_TYPE_PUNCTUATOR_BITWISE_AND_EQUAL, - TOKEN_TYPE_PUNCTUATOR_BITWISE_OR_EQUAL, - TOKEN_TYPE_PUNCTUATOR_LOGICAL_AND_EQUAL, - TOKEN_TYPE_PUNCTUATOR_NULLISH_COALESCING, - TOKEN_TYPE_PUNCTUATOR_LOGICAL_OR_EQUAL, - TOKEN_TYPE_PUNCTUATOR_LOGICAL_NULLISH_EQUAL, - TOKEN_TYPE_PUNCTUATOR_BITWISE_XOR_EQUAL, - TOKEN_TYPE_PUNCTUATOR_PLUS, - TOKEN_TYPE_PUNCTUATOR_PLUS_PLUS, - TOKEN_TYPE_PUNCTUATOR_PLUS_EQUAL, - TOKEN_TYPE_PUNCTUATOR_LESS_THAN, - TOKEN_TYPE_PUNCTUATOR_GREATER_THAN, - TOKEN_TYPE_PUNCTUATOR_EQUAL, - TOKEN_TYPE_PUNCTUATOR_NOT_EQUAL, - TOKEN_TYPE_PUNCTUATOR_STRICT_EQUAL, - TOKEN_TYPE_PUNCTUATOR_NOT_STRICT_EQUAL, - TOKEN_TYPE_PUNCTUATOR_LOGICAL_AND, - TOKEN_TYPE_PUNCTUATOR_LOGICAL_OR, - TOKEN_TYPE_PUNCTUATOR_SUBSTITUTION, - TOKEN_TYPE_PUNCTUATOR_QUESTION_MARK, - TOKEN_TYPE_PUNCTUATOR_QUESTION_DOT, - TOKEN_TYPE_PUNCTUATOR_AT, - TOKEN_TYPE_PUNCTUATOR_FORMAT, - TOKEN_TYPE_PUNCTUATOR_RIGHT_PARENTHESIS, - TOKEN_TYPE_PUNCTUATOR_LEFT_PARENTHESIS, - TOKEN_TYPE_PUNCTUATOR_RIGHT_SQUARE_BRACKET, - TOKEN_TYPE_PUNCTUATOR_LEFT_SQUARE_BRACKET, - TOKEN_TYPE_PUNCTUATOR_RIGHT_BRACE, - TOKEN_TYPE_PUNCTUATOR_PERIOD, - TOKEN_TYPE_PUNCTUATOR_PERIOD_PERIOD_PERIOD, - TOKEN_TYPE_PUNCTUATOR_PERIOD_QUESTION, - TOKEN_TYPE_PUNCTUATOR_LEFT_BRACE, - TOKEN_TYPE_PUNCTUATOR_SEMI_COLON, - TOKEN_TYPE_PUNCTUATOR_COLON, - TOKEN_TYPE_PUNCTUATOR_COMMA, - TOKEN_TYPE_KEYW_ABSTRACT, - TOKEN_TYPE_KEYW_ANY, - TOKEN_TYPE_KEYW_ANYREF, - TOKEN_TYPE_KEYW_ARGUMENTS, - TOKEN_TYPE_KEYW_AS, - TOKEN_TYPE_KEYW_ASSERT, - TOKEN_TYPE_KEYW_ASSERTS, - TOKEN_TYPE_KEYW_ASYNC, - TOKEN_TYPE_KEYW_AWAIT, - TOKEN_TYPE_KEYW_BIGINT, - TOKEN_TYPE_KEYW_BOOLEAN, - TOKEN_TYPE_KEYW_BREAK, - TOKEN_TYPE_KEYW_BYTE, - TOKEN_TYPE_KEYW_CASE, - TOKEN_TYPE_KEYW_CATCH, - TOKEN_TYPE_KEYW_CHAR, - TOKEN_TYPE_KEYW_CLASS, - TOKEN_TYPE_KEYW_CONST, - TOKEN_TYPE_KEYW_CONSTRUCTOR, - TOKEN_TYPE_KEYW_CONTINUE, - TOKEN_TYPE_KEYW_DATAREF, - TOKEN_TYPE_KEYW_DEBUGGER, - TOKEN_TYPE_KEYW_DECLARE, - TOKEN_TYPE_KEYW_DEFAULT, - TOKEN_TYPE_KEYW_DELETE, - TOKEN_TYPE_KEYW_DO, - TOKEN_TYPE_KEYW_DOUBLE, - TOKEN_TYPE_KEYW_ELSE, - TOKEN_TYPE_KEYW_ENUM, - TOKEN_TYPE_KEYW_EQREF, - TOKEN_TYPE_KEYW_EVAL, - TOKEN_TYPE_KEYW_EXPORT, - TOKEN_TYPE_KEYW_EXTENDS, - TOKEN_TYPE_KEYW_EXTERNREF, - TOKEN_TYPE_KEYW_F32, - TOKEN_TYPE_KEYW_F64, - TOKEN_TYPE_LITERAL_FALSE, - TOKEN_TYPE_KEYW_FINALLY, - TOKEN_TYPE_KEYW_FLOAT, - TOKEN_TYPE_KEYW_FOR, - TOKEN_TYPE_KEYW_FROM, - TOKEN_TYPE_KEYW_FUNCREF, - TOKEN_TYPE_KEYW_FUNCTION, - TOKEN_TYPE_KEYW_GET, - TOKEN_TYPE_KEYW_GLOBAL, - TOKEN_TYPE_KEYW_I8, - TOKEN_TYPE_KEYW_I16, - TOKEN_TYPE_KEYW_I31REF, - TOKEN_TYPE_KEYW_I32, - TOKEN_TYPE_KEYW_I64, - TOKEN_TYPE_KEYW_IF, - TOKEN_TYPE_KEYW_IMPLEMENTS, - TOKEN_TYPE_KEYW_IMPORT, - TOKEN_TYPE_KEYW_IN, - TOKEN_TYPE_KEYW_INFER, - TOKEN_TYPE_KEYW_INSTANCEOF, - TOKEN_TYPE_KEYW_INT, - TOKEN_TYPE_KEYW_INTERFACE, - TOKEN_TYPE_KEYW_IS, - TOKEN_TYPE_KEYW_ISIZE, - TOKEN_TYPE_KEYW_KEYOF, - TOKEN_TYPE_KEYW_LET, - TOKEN_TYPE_KEYW_LONG, - TOKEN_TYPE_KEYW_META, - TOKEN_TYPE_KEYW_MODULE, - TOKEN_TYPE_KEYW_NAMESPACE, - TOKEN_TYPE_KEYW_NATIVE, - TOKEN_TYPE_KEYW_NEVER, - TOKEN_TYPE_KEYW_NEW, - TOKEN_TYPE_LITERAL_NULL, - TOKEN_TYPE_KEYW_NUMBER, - TOKEN_TYPE_KEYW_OBJECT, - TOKEN_TYPE_KEYW_OF, - TOKEN_TYPE_KEYW_FINAL, - TOKEN_TYPE_KEYW_OUT, - TOKEN_TYPE_KEYW_OVERRIDE, - TOKEN_TYPE_KEYW_PACKAGE, - TOKEN_TYPE_KEYW_INTERNAL, - TOKEN_TYPE_KEYW_PRIVATE, - TOKEN_TYPE_KEYW_PROTECTED, - TOKEN_TYPE_KEYW_PUBLIC, - TOKEN_TYPE_KEYW_READONLY, - TOKEN_TYPE_KEYW_RETHROWS, - TOKEN_TYPE_KEYW_RETURN, - TOKEN_TYPE_KEYW_REQUIRE, - TOKEN_TYPE_KEYW_SET, - TOKEN_TYPE_KEYW_SHORT, - TOKEN_TYPE_KEYW_STATIC, - TOKEN_TYPE_KEYW_STRING, - TOKEN_TYPE_KEYW_STRUCT, - TOKEN_TYPE_KEYW_SUPER, - TOKEN_TYPE_KEYW_SWITCH, - TOKEN_TYPE_KEYW_TARGET, - TOKEN_TYPE_KEYW_THIS, - TOKEN_TYPE_KEYW_THROW, - TOKEN_TYPE_KEYW_THROWS, - TOKEN_TYPE_LITERAL_TRUE, - TOKEN_TYPE_KEYW_TRY, - TOKEN_TYPE_KEYW_TYPE, - TOKEN_TYPE_KEYW_TYPEOF, - TOKEN_TYPE_KEYW_U8, - TOKEN_TYPE_KEYW_U16, - TOKEN_TYPE_KEYW_U32, - TOKEN_TYPE_KEYW_U64, - TOKEN_TYPE_KEYW_UNDEFINED, - TOKEN_TYPE_KEYW_UNKNOWN, - TOKEN_TYPE_KEYW_USIZE, - TOKEN_TYPE_KEYW_V128, - TOKEN_TYPE_KEYW_VAR, - TOKEN_TYPE_KEYW_VOID, - TOKEN_TYPE_KEYW_WHILE, - TOKEN_TYPE_KEYW_WITH, - TOKEN_TYPE_KEYW_YIELD, - TOKEN_TYPE_FIRST_PUNCTUATOR = Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_BITWISE_AND, - TOKEN_TYPE_FIRST_KEYW = Es2pandaTokenType.TOKEN_TYPE_KEYW_ABSTRACT -} export enum Es2pandaAstNodeFlags { AST_NODE_FLAGS_NO_OPTS = 0, AST_NODE_FLAGS_CHECKCAST = 1, @@ -522,8 +303,10 @@ export enum Es2pandaAstNodeFlags { AST_NODE_FLAGS_ALLOW_REQUIRED_INSTANTIATION = 4, AST_NODE_FLAGS_HAS_EXPORT_ALIAS = 8, AST_NODE_FLAGS_GENERATE_VALUE_OF = 16, - AST_NODE_FLAGS_GENERATE_GET_NAME = 32, - AST_NODE_FLAGS_RECHECK = 64 + AST_NODE_FLAGS_RECHECK = 32, + AST_NODE_FLAGS_NOCLEANUP = 64, + AST_NODE_FLAGS_RESIZABLE_REST = 128, + AST_NODE_FLAGS_TMP_CONVERT_PRIMITIVE_CAST_METHOD_CALL = 256 } export enum Es2pandaModifierFlags { MODIFIER_FLAGS_NONE = 0, @@ -594,11 +377,10 @@ export enum Es2pandaScriptFunctionFlags { SCRIPT_FUNCTION_FLAGS_GETTER = 32768, SCRIPT_FUNCTION_FLAGS_SETTER = 65536, SCRIPT_FUNCTION_FLAGS_ENTRY_POINT = 131072, - SCRIPT_FUNCTION_FLAGS_INSTANCE_EXTENSION_METHOD = 262144, - SCRIPT_FUNCTION_FLAGS_HAS_RETURN = 524288, - SCRIPT_FUNCTION_FLAGS_ASYNC_IMPL = 1048576, - SCRIPT_FUNCTION_FLAGS_EXTERNAL_OVERLOAD = 2097152, - SCRIPT_FUNCTION_FLAGS_HAS_THROW = 4194304 + SCRIPT_FUNCTION_FLAGS_HAS_RETURN = 262144, + SCRIPT_FUNCTION_FLAGS_ASYNC_IMPL = 524288, + SCRIPT_FUNCTION_FLAGS_EXTERNAL_OVERLOAD = 1048576, + SCRIPT_FUNCTION_FLAGS_HAS_THROW = 2097152 } export enum Es2pandaTSOperatorType { TS_OPERATOR_TYPE_READONLY = 0, @@ -629,9 +411,8 @@ export enum Es2pandaBoxingUnboxingFlags { BOXING_UNBOXING_FLAGS_UNBOX_TO_LONG = 16384, BOXING_UNBOXING_FLAGS_UNBOX_TO_FLOAT = 32768, BOXING_UNBOXING_FLAGS_UNBOX_TO_DOUBLE = 65536, - BOXING_UNBOXING_FLAGS_UNBOX_TO_ENUM = 131072, BOXING_UNBOXING_FLAGS_BOXING_FLAG = 511, - BOXING_UNBOXING_FLAGS_UNBOXING_FLAG = 261632 + BOXING_UNBOXING_FLAGS_UNBOXING_FLAG = 130560 } export enum Es2pandaClassDefinitionModifiers { CLASS_DEFINITION_MODIFIERS_NONE = 0, @@ -649,6 +430,9 @@ export enum Es2pandaClassDefinitionModifiers { CLASS_DEFINITION_MODIFIERS_LOCAL = 2048, CLASS_DEFINITION_MODIFIERS_CLASSDEFINITION_CHECKED = 4096, CLASS_DEFINITION_MODIFIERS_NAMESPACE_TRANSFORMED = 8192, + CLASS_DEFINITION_MODIFIERS_STRING_ENUM_TRANSFORMED = 16384, + CLASS_DEFINITION_MODIFIERS_INT_ENUM_TRANSFORMED = 32768, + CLASS_DEFINITION_MODIFIERS_FROM_STRUCT = 65536, CLASS_DEFINITION_MODIFIERS_DECLARATION_ID_REQUIRED = 3, CLASS_DEFINITION_MODIFIERS_ETS_MODULE = 8196 } @@ -716,9 +500,14 @@ export enum Es2pandaRelationType { RELATION_TYPE_UNCHECKED_CASTABLE = 3, RELATION_TYPE_SUPERTYPE = 4 } +export enum Es2pandaVarianceFlag { + VARIANCE_FLAG_COVARIANT = 0, + VARIANCE_FLAG_CONTRAVARIANT = 1, + VARIANCE_FLAG_INVARIANT = 2 +} export enum Es2pandaImportKinds { - IMPORT_KINDS_VALUE = 0, - IMPORT_KINDS_TYPE = 1 + IMPORT_KINDS_ALL = 0, + IMPORT_KINDS_TYPES = 1 } export enum Es2pandaPropertyKind { PROPERTY_KIND_INIT = 0, @@ -753,8 +542,7 @@ export enum Es2pandaIdentifierFlags { IDENTIFIER_FLAGS_IGNORE_BOX = 32, IDENTIFIER_FLAGS_ANNOTATIONDECL = 64, IDENTIFIER_FLAGS_ANNOTATIONUSAGE = 128, - IDENTIFIER_FLAGS_ERROR_PLACEHOLDER = 256, - IDENTIFIER_FLAGS_IMPLICIT_THIS = 512 + IDENTIFIER_FLAGS_ERROR_PLACEHOLDER = 256 } export enum Es2pandaMemberExpressionKind { MEMBER_EXPRESSION_KIND_NONE = 0, @@ -792,31 +580,29 @@ export enum Es2pandaElementFlags { } export enum Es2pandaSignatureFlags { SIGNATURE_FLAGS_NO_OPTS = 0, - SIGNATURE_FLAGS_VIRTUAL = 1, - SIGNATURE_FLAGS_ABSTRACT = 2, - SIGNATURE_FLAGS_CALL = 4, - SIGNATURE_FLAGS_CONSTRUCT = 8, - SIGNATURE_FLAGS_PUBLIC = 16, - SIGNATURE_FLAGS_PROTECTED = 32, - SIGNATURE_FLAGS_PRIVATE = 64, - SIGNATURE_FLAGS_STATIC = 128, - SIGNATURE_FLAGS_FINAL = 256, - SIGNATURE_FLAGS_CONSTRUCTOR = 512, - SIGNATURE_FLAGS_TYPE = 1024, - SIGNATURE_FLAGS_PROXY = 2048, - SIGNATURE_FLAGS_INTERNAL = 4096, - SIGNATURE_FLAGS_NEED_RETURN_TYPE = 8192, - SIGNATURE_FLAGS_INFERRED_RETURN_TYPE = 16384, - SIGNATURE_FLAGS_THIS_RETURN_TYPE = 32768, - SIGNATURE_FLAGS_GETTER = 65536, - SIGNATURE_FLAGS_SETTER = 131072, - SIGNATURE_FLAGS_THROWS = 262144, - SIGNATURE_FLAGS_RETHROWS = 524288, - SIGNATURE_FLAGS_EXTENSION_FUNCTION_RETURN_THIS = 1048576, - SIGNATURE_FLAGS_INTERNAL_PROTECTED = 4128, - SIGNATURE_FLAGS_GETTER_OR_SETTER = 196608, - SIGNATURE_FLAGS_THROWING = 786432, - SIGNATURE_FLAGS_FUNCTIONAL_INTERFACE_SIGNATURE = 1047 + SIGNATURE_FLAGS_ABSTRACT = 1, + SIGNATURE_FLAGS_CALL = 2, + SIGNATURE_FLAGS_CONSTRUCT = 4, + SIGNATURE_FLAGS_PUBLIC = 8, + SIGNATURE_FLAGS_PROTECTED = 16, + SIGNATURE_FLAGS_PRIVATE = 32, + SIGNATURE_FLAGS_STATIC = 64, + SIGNATURE_FLAGS_FINAL = 128, + SIGNATURE_FLAGS_CONSTRUCTOR = 256, + SIGNATURE_FLAGS_PROXY = 512, + SIGNATURE_FLAGS_INTERNAL = 1024, + SIGNATURE_FLAGS_NEED_RETURN_TYPE = 2048, + SIGNATURE_FLAGS_INFERRED_RETURN_TYPE = 4096, + SIGNATURE_FLAGS_THIS_RETURN_TYPE = 8192, + SIGNATURE_FLAGS_GETTER = 16384, + SIGNATURE_FLAGS_SETTER = 32768, + SIGNATURE_FLAGS_THROWS = 65536, + SIGNATURE_FLAGS_RETHROWS = 131072, + SIGNATURE_FLAGS_EXTENSION_FUNCTION = 262144, + SIGNATURE_FLAGS_DUPLICATE_ASM = 524288, + SIGNATURE_FLAGS_INTERNAL_PROTECTED = 1040, + SIGNATURE_FLAGS_GETTER_OR_SETTER = 49152, + SIGNATURE_FLAGS_THROWING = 196608 } export enum Es2pandaPrimitiveType { PRIMITIVE_TYPE_BYTE = 0, @@ -984,77 +770,113 @@ export enum Es2pandaGlobalTypeId { GLOBAL_TYPE_ID_ETS_TYPE_BUILTIN = 70, GLOBAL_TYPE_ID_ETS_TYPES_BUILTIN = 71, GLOBAL_TYPE_ID_ETS_PROMISE_BUILTIN = 72, - GLOBAL_TYPE_ID_ETS_REGEXP_BUILTIN = 73, - GLOBAL_TYPE_ID_ETS_ARRAY_BUILTIN = 74, - GLOBAL_TYPE_ID_ETS_INTEROP_JSRUNTIME_BUILTIN = 75, - GLOBAL_TYPE_ID_ETS_INTEROP_JSVALUE_BUILTIN = 76, - GLOBAL_TYPE_ID_ETS_BOX_BUILTIN = 77, - GLOBAL_TYPE_ID_ETS_BOOLEAN_BOX_BUILTIN = 78, - GLOBAL_TYPE_ID_ETS_BYTE_BOX_BUILTIN = 79, - GLOBAL_TYPE_ID_ETS_CHAR_BOX_BUILTIN = 80, - GLOBAL_TYPE_ID_ETS_SHORT_BOX_BUILTIN = 81, - GLOBAL_TYPE_ID_ETS_INT_BOX_BUILTIN = 82, - GLOBAL_TYPE_ID_ETS_LONG_BOX_BUILTIN = 83, - GLOBAL_TYPE_ID_ETS_FLOAT_BOX_BUILTIN = 84, - GLOBAL_TYPE_ID_ETS_DOUBLE_BOX_BUILTIN = 85, - GLOBAL_TYPE_ID_ETS_BIG_INT_BUILTIN = 86, - GLOBAL_TYPE_ID_ETS_BIG_INT = 87, - GLOBAL_TYPE_ID_ETS_FUNCTION0_CLASS = 88, - GLOBAL_TYPE_ID_ETS_FUNCTION1_CLASS = 89, - GLOBAL_TYPE_ID_ETS_FUNCTION2_CLASS = 90, - GLOBAL_TYPE_ID_ETS_FUNCTION3_CLASS = 91, - GLOBAL_TYPE_ID_ETS_FUNCTION4_CLASS = 92, - GLOBAL_TYPE_ID_ETS_FUNCTION5_CLASS = 93, - GLOBAL_TYPE_ID_ETS_FUNCTION6_CLASS = 94, - GLOBAL_TYPE_ID_ETS_FUNCTION7_CLASS = 95, - GLOBAL_TYPE_ID_ETS_FUNCTION8_CLASS = 96, - GLOBAL_TYPE_ID_ETS_FUNCTION9_CLASS = 97, - GLOBAL_TYPE_ID_ETS_FUNCTION10_CLASS = 98, - GLOBAL_TYPE_ID_ETS_FUNCTION11_CLASS = 99, - GLOBAL_TYPE_ID_ETS_FUNCTION12_CLASS = 100, - GLOBAL_TYPE_ID_ETS_FUNCTION13_CLASS = 101, - GLOBAL_TYPE_ID_ETS_FUNCTION14_CLASS = 102, - GLOBAL_TYPE_ID_ETS_FUNCTION15_CLASS = 103, - GLOBAL_TYPE_ID_ETS_FUNCTION16_CLASS = 104, - GLOBAL_TYPE_ID_ETS_FUNCTIONN_CLASS = 105, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION0_CLASS = 106, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION1_CLASS = 107, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION2_CLASS = 108, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION3_CLASS = 109, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION4_CLASS = 110, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION5_CLASS = 111, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION6_CLASS = 112, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION7_CLASS = 113, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION8_CLASS = 114, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION9_CLASS = 115, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION10_CLASS = 116, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION11_CLASS = 117, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION12_CLASS = 118, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION13_CLASS = 119, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION14_CLASS = 120, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION15_CLASS = 121, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTION16_CLASS = 122, - GLOBAL_TYPE_ID_ETS_THROWING_FUNCTIONN_CLASS = 123, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION0_CLASS = 124, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION1_CLASS = 125, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION2_CLASS = 126, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION3_CLASS = 127, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION4_CLASS = 128, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION5_CLASS = 129, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION6_CLASS = 130, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION7_CLASS = 131, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION8_CLASS = 132, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION9_CLASS = 133, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION10_CLASS = 134, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION11_CLASS = 135, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION12_CLASS = 136, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION13_CLASS = 137, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION14_CLASS = 138, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION15_CLASS = 139, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTION16_CLASS = 140, - GLOBAL_TYPE_ID_ETS_RETHROWING_FUNCTIONN_CLASS = 141, - GLOBAL_TYPE_ID_TYPE_ERROR = 142, - GLOBAL_TYPE_ID_COUNT = 143 + GLOBAL_TYPE_ID_ETS_FUNCTION_BUILTIN = 73, + GLOBAL_TYPE_ID_ETS_REGEXP_BUILTIN = 74, + GLOBAL_TYPE_ID_ETS_ARRAY_BUILTIN = 75, + GLOBAL_TYPE_ID_ETS_ARRAY = 76, + GLOBAL_TYPE_ID_ETS_INTEROP_JSRUNTIME_BUILTIN = 77, + GLOBAL_TYPE_ID_ETS_INTEROP_JSVALUE_BUILTIN = 78, + GLOBAL_TYPE_ID_ETS_BOX_BUILTIN = 79, + GLOBAL_TYPE_ID_ETS_BOOLEAN_BOX_BUILTIN = 80, + GLOBAL_TYPE_ID_ETS_BYTE_BOX_BUILTIN = 81, + GLOBAL_TYPE_ID_ETS_CHAR_BOX_BUILTIN = 82, + GLOBAL_TYPE_ID_ETS_SHORT_BOX_BUILTIN = 83, + GLOBAL_TYPE_ID_ETS_INT_BOX_BUILTIN = 84, + GLOBAL_TYPE_ID_ETS_LONG_BOX_BUILTIN = 85, + GLOBAL_TYPE_ID_ETS_FLOAT_BOX_BUILTIN = 86, + GLOBAL_TYPE_ID_ETS_DOUBLE_BOX_BUILTIN = 87, + GLOBAL_TYPE_ID_ETS_BIG_INT_BUILTIN = 88, + GLOBAL_TYPE_ID_ETS_BIG_INT = 89, + GLOBAL_TYPE_ID_ETS_FUNCTION0_CLASS = 90, + GLOBAL_TYPE_ID_ETS_FUNCTION1_CLASS = 91, + GLOBAL_TYPE_ID_ETS_FUNCTION2_CLASS = 92, + GLOBAL_TYPE_ID_ETS_FUNCTION3_CLASS = 93, + GLOBAL_TYPE_ID_ETS_FUNCTION4_CLASS = 94, + GLOBAL_TYPE_ID_ETS_FUNCTION5_CLASS = 95, + GLOBAL_TYPE_ID_ETS_FUNCTION6_CLASS = 96, + GLOBAL_TYPE_ID_ETS_FUNCTION7_CLASS = 97, + GLOBAL_TYPE_ID_ETS_FUNCTION8_CLASS = 98, + GLOBAL_TYPE_ID_ETS_FUNCTION9_CLASS = 99, + GLOBAL_TYPE_ID_ETS_FUNCTION10_CLASS = 100, + GLOBAL_TYPE_ID_ETS_FUNCTION11_CLASS = 101, + GLOBAL_TYPE_ID_ETS_FUNCTION12_CLASS = 102, + GLOBAL_TYPE_ID_ETS_FUNCTION13_CLASS = 103, + GLOBAL_TYPE_ID_ETS_FUNCTION14_CLASS = 104, + GLOBAL_TYPE_ID_ETS_FUNCTION15_CLASS = 105, + GLOBAL_TYPE_ID_ETS_FUNCTION16_CLASS = 106, + GLOBAL_TYPE_ID_ETS_FUNCTIONN_CLASS = 107, + GLOBAL_TYPE_ID_ETS_LAMBDA0_CLASS = 108, + GLOBAL_TYPE_ID_ETS_LAMBDA1_CLASS = 109, + GLOBAL_TYPE_ID_ETS_LAMBDA2_CLASS = 110, + GLOBAL_TYPE_ID_ETS_LAMBDA3_CLASS = 111, + GLOBAL_TYPE_ID_ETS_LAMBDA4_CLASS = 112, + GLOBAL_TYPE_ID_ETS_LAMBDA5_CLASS = 113, + GLOBAL_TYPE_ID_ETS_LAMBDA6_CLASS = 114, + GLOBAL_TYPE_ID_ETS_LAMBDA7_CLASS = 115, + GLOBAL_TYPE_ID_ETS_LAMBDA8_CLASS = 116, + GLOBAL_TYPE_ID_ETS_LAMBDA9_CLASS = 117, + GLOBAL_TYPE_ID_ETS_LAMBDA10_CLASS = 118, + GLOBAL_TYPE_ID_ETS_LAMBDA11_CLASS = 119, + GLOBAL_TYPE_ID_ETS_LAMBDA12_CLASS = 120, + GLOBAL_TYPE_ID_ETS_LAMBDA13_CLASS = 121, + GLOBAL_TYPE_ID_ETS_LAMBDA14_CLASS = 122, + GLOBAL_TYPE_ID_ETS_LAMBDA15_CLASS = 123, + GLOBAL_TYPE_ID_ETS_LAMBDA16_CLASS = 124, + GLOBAL_TYPE_ID_ETS_LAMBDAN_CLASS = 125, + GLOBAL_TYPE_ID_ETS_FUNCTIONR0_CLASS = 126, + GLOBAL_TYPE_ID_ETS_FUNCTIONR1_CLASS = 127, + GLOBAL_TYPE_ID_ETS_FUNCTIONR2_CLASS = 128, + GLOBAL_TYPE_ID_ETS_FUNCTIONR3_CLASS = 129, + GLOBAL_TYPE_ID_ETS_FUNCTIONR4_CLASS = 130, + GLOBAL_TYPE_ID_ETS_FUNCTIONR5_CLASS = 131, + GLOBAL_TYPE_ID_ETS_FUNCTIONR6_CLASS = 132, + GLOBAL_TYPE_ID_ETS_FUNCTIONR7_CLASS = 133, + GLOBAL_TYPE_ID_ETS_FUNCTIONR8_CLASS = 134, + GLOBAL_TYPE_ID_ETS_FUNCTIONR9_CLASS = 135, + GLOBAL_TYPE_ID_ETS_FUNCTIONR10_CLASS = 136, + GLOBAL_TYPE_ID_ETS_FUNCTIONR11_CLASS = 137, + GLOBAL_TYPE_ID_ETS_FUNCTIONR12_CLASS = 138, + GLOBAL_TYPE_ID_ETS_FUNCTIONR13_CLASS = 139, + GLOBAL_TYPE_ID_ETS_FUNCTIONR14_CLASS = 140, + GLOBAL_TYPE_ID_ETS_FUNCTIONR15_CLASS = 141, + GLOBAL_TYPE_ID_ETS_FUNCTIONR16_CLASS = 142, + GLOBAL_TYPE_ID_ETS_LAMBDAR0_CLASS = 143, + GLOBAL_TYPE_ID_ETS_LAMBDAR1_CLASS = 144, + GLOBAL_TYPE_ID_ETS_LAMBDAR2_CLASS = 145, + GLOBAL_TYPE_ID_ETS_LAMBDAR3_CLASS = 146, + GLOBAL_TYPE_ID_ETS_LAMBDAR4_CLASS = 147, + GLOBAL_TYPE_ID_ETS_LAMBDAR5_CLASS = 148, + GLOBAL_TYPE_ID_ETS_LAMBDAR6_CLASS = 149, + GLOBAL_TYPE_ID_ETS_LAMBDAR7_CLASS = 150, + GLOBAL_TYPE_ID_ETS_LAMBDAR8_CLASS = 151, + GLOBAL_TYPE_ID_ETS_LAMBDAR9_CLASS = 152, + GLOBAL_TYPE_ID_ETS_LAMBDAR10_CLASS = 153, + GLOBAL_TYPE_ID_ETS_LAMBDAR11_CLASS = 154, + GLOBAL_TYPE_ID_ETS_LAMBDAR12_CLASS = 155, + GLOBAL_TYPE_ID_ETS_LAMBDAR13_CLASS = 156, + GLOBAL_TYPE_ID_ETS_LAMBDAR14_CLASS = 157, + GLOBAL_TYPE_ID_ETS_LAMBDAR15_CLASS = 158, + GLOBAL_TYPE_ID_ETS_LAMBDAR16_CLASS = 159, + GLOBAL_TYPE_ID_ETS_TUPLE0_CLASS = 160, + GLOBAL_TYPE_ID_ETS_TUPLE1_CLASS = 161, + GLOBAL_TYPE_ID_ETS_TUPLE2_CLASS = 162, + GLOBAL_TYPE_ID_ETS_TUPLE3_CLASS = 163, + GLOBAL_TYPE_ID_ETS_TUPLE4_CLASS = 164, + GLOBAL_TYPE_ID_ETS_TUPLE5_CLASS = 165, + GLOBAL_TYPE_ID_ETS_TUPLE6_CLASS = 166, + GLOBAL_TYPE_ID_ETS_TUPLE7_CLASS = 167, + GLOBAL_TYPE_ID_ETS_TUPLE8_CLASS = 168, + GLOBAL_TYPE_ID_ETS_TUPLE9_CLASS = 169, + GLOBAL_TYPE_ID_ETS_TUPLE10_CLASS = 170, + GLOBAL_TYPE_ID_ETS_TUPLE11_CLASS = 171, + GLOBAL_TYPE_ID_ETS_TUPLE12_CLASS = 172, + GLOBAL_TYPE_ID_ETS_TUPLE13_CLASS = 173, + GLOBAL_TYPE_ID_ETS_TUPLE14_CLASS = 174, + GLOBAL_TYPE_ID_ETS_TUPLE15_CLASS = 175, + GLOBAL_TYPE_ID_ETS_TUPLE16_CLASS = 176, + GLOBAL_TYPE_ID_ETS_TUPLEN_CLASS = 177, + GLOBAL_TYPE_ID_TYPE_ERROR = 178, + GLOBAL_TYPE_ID_COUNT = 179 } export enum Es2pandaMethodDefinitionKind { METHOD_DEFINITION_KIND_NONE = 0, @@ -1066,47 +888,6 @@ export enum Es2pandaMethodDefinitionKind { METHOD_DEFINITION_KIND_EXTENSION_GET = 6, METHOD_DEFINITION_KIND_EXTENSION_SET = 7 } -export enum Es2pandaETSObjectFlags { - ETS_OBJECT_FLAGS_NO_OPTS = 0, - ETS_OBJECT_FLAGS_CLASS = 1, - ETS_OBJECT_FLAGS_INTERFACE = 2, - ETS_OBJECT_FLAGS_INSTANCE = 4, - ETS_OBJECT_FLAGS_ABSTRACT = 8, - ETS_OBJECT_FLAGS_GLOBAL = 16, - ETS_OBJECT_FLAGS_ENUM = 32, - ETS_OBJECT_FLAGS_FUNCTIONAL = 64, - ETS_OBJECT_FLAGS_RESOLVED_INTERFACES = 128, - ETS_OBJECT_FLAGS_RESOLVED_SUPER = 256, - ETS_OBJECT_FLAGS_RESOLVED_TYPE_PARAMS = 512, - ETS_OBJECT_FLAGS_CHECKED_COMPATIBLE_ABSTRACTS = 1024, - ETS_OBJECT_FLAGS_STRING = 2048, - ETS_OBJECT_FLAGS_INCOMPLETE_INSTANTIATION = 4096, - ETS_OBJECT_FLAGS_INNER = 8192, - ETS_OBJECT_FLAGS_DYNAMIC = 16384, - ETS_OBJECT_FLAGS_ASYNC_FUNC_RETURN_TYPE = 32768, - ETS_OBJECT_FLAGS_CHECKED_INVOKE_LEGITIMACY = 65536, - ETS_OBJECT_FLAGS_REQUIRED = 131072, - ETS_OBJECT_FLAGS_READONLY = 262144, - ETS_OBJECT_FLAGS_BUILTIN_BIGINT = 524288, - ETS_OBJECT_FLAGS_BUILTIN_STRING = 1048576, - ETS_OBJECT_FLAGS_BUILTIN_BOOLEAN = 2097152, - ETS_OBJECT_FLAGS_BUILTIN_BYTE = 4194304, - ETS_OBJECT_FLAGS_BUILTIN_CHAR = 8388608, - ETS_OBJECT_FLAGS_BUILTIN_SHORT = 16777216, - ETS_OBJECT_FLAGS_BUILTIN_INT = 33554432, - ETS_OBJECT_FLAGS_BUILTIN_LONG = 67108864, - ETS_OBJECT_FLAGS_BUILTIN_FLOAT = 134217728, - ETS_OBJECT_FLAGS_BUILTIN_DOUBLE = 268435456, - ETS_OBJECT_FLAGS_BOXED_ENUM = 536870912, - ETS_OBJECT_FLAGS_EXTENSION_FUNCTION = 1073741824, - ETS_OBJECT_FLAGS_BUILTIN_NUMERIC = 524288000, - ETS_OBJECT_FLAGS_VALUE_TYPED = 535300096, - ETS_OBJECT_FLAGS_UNBOXABLE_TYPE = 1071644672, - ETS_OBJECT_FLAGS_BUILTIN_TYPE = 1073217536, - ETS_OBJECT_FLAGS_GLOBAL_CLASS = 17, - ETS_OBJECT_FLAGS_FUNCTIONAL_INTERFACE = 74, - ETS_OBJECT_FLAGS_RESOLVED_HEADER = 896 -} export enum Es2pandaPropertySearchFlags { PROPERTY_SEARCH_FLAGS_NO_OPTS = 0, PROPERTY_SEARCH_FLAGS_SEARCH_INSTANCE_METHOD = 1, @@ -1120,9 +901,8 @@ export enum Es2pandaPropertySearchFlags { PROPERTY_SEARCH_FLAGS_IGNORE_ABSTRACT = 256, PROPERTY_SEARCH_FLAGS_ALLOW_FUNCTIONAL_INTERFACE = 512, PROPERTY_SEARCH_FLAGS_DISALLOW_SYNTHETIC_METHOD_CREATION = 1024, - PROPERTY_SEARCH_FLAGS_IS_FUNCTIONAL = 2048, - PROPERTY_SEARCH_FLAGS_IS_SETTER = 4096, - PROPERTY_SEARCH_FLAGS_IS_GETTER = 8192, + PROPERTY_SEARCH_FLAGS_IS_SETTER = 2048, + PROPERTY_SEARCH_FLAGS_IS_GETTER = 4096, PROPERTY_SEARCH_FLAGS_SEARCH_INSTANCE = 7, PROPERTY_SEARCH_FLAGS_SEARCH_STATIC = 56, PROPERTY_SEARCH_FLAGS_SEARCH_METHOD = 9, @@ -1150,6 +930,11 @@ export enum Es2pandaAccessibilityOption { ACCESSIBILITY_OPTION_PRIVATE = 2, ACCESSIBILITY_OPTION_PROTECTED = 3 } +export enum Es2pandaRetentionPolicy { + RETENTION_POLICY_SOURCE = 0, + RETENTION_POLICY_BYTECODE = 1, + RETENTION_POLICY_RUNTIME = 2 +} export enum Es2pandaRecordTableFlags { RECORD_TABLE_FLAGS_NONE = 0, RECORD_TABLE_FLAGS_EXTERNAL = 1 @@ -1184,14 +969,17 @@ export enum Es2pandaCheckerStatus { CHECKER_STATUS_IN_BRIDGE_TEST = 33554432, CHECKER_STATUS_IN_GETTER = 67108864, CHECKER_STATUS_IN_SETTER = 134217728, - CHECKER_STATUS_IN_EXTENSION_ACCESSOR_CHECK = 268435456 + CHECKER_STATUS_IN_EXTENSION_ACCESSOR_CHECK = 268435456, + CHECKER_STATUS_IN_TYPE_INFER = 536870912 } export enum Es2pandaOverrideErrorCode { OVERRIDE_ERROR_CODE_NO_ERROR = 0, OVERRIDE_ERROR_CODE_OVERRIDDEN_FINAL = 1, OVERRIDE_ERROR_CODE_INCOMPATIBLE_RETURN = 2, OVERRIDE_ERROR_CODE_INCOMPATIBLE_TYPEPARAM = 3, - OVERRIDE_ERROR_CODE_OVERRIDDEN_WEAKER = 4 + OVERRIDE_ERROR_CODE_OVERRIDDEN_WEAKER = 4, + OVERRIDE_ERROR_CODE_OVERRIDDEN_INTERNAL = 5, + OVERRIDE_ERROR_CODE_ABSTRACT_OVERRIDES_CONCRETE = 6 } export enum Es2pandaResolvedKind { RESOLVED_KIND_PROPERTY = 0, @@ -1249,16 +1037,294 @@ export enum Es2pandaForStatementKind { FOR_STATEMENT_KIND_IN = 1, FOR_STATEMENT_KIND_OF = 2 } +export enum Es2pandaTypeAnnotationParsingOptions { + TYPE_ANNOTATION_PARSING_OPTIONS_NO_OPTS = 0, + TYPE_ANNOTATION_PARSING_OPTIONS_IN_UNION = 1, + TYPE_ANNOTATION_PARSING_OPTIONS_ALLOW_CONST = 2, + TYPE_ANNOTATION_PARSING_OPTIONS_IN_INTERSECTION = 4, + TYPE_ANNOTATION_PARSING_OPTIONS_RESTRICT_EXTENDS = 8, + TYPE_ANNOTATION_PARSING_OPTIONS_REPORT_ERROR = 16, + TYPE_ANNOTATION_PARSING_OPTIONS_CAN_BE_TS_TYPE_PREDICATE = 32, + TYPE_ANNOTATION_PARSING_OPTIONS_BREAK_AT_NEW_LINE = 64, + TYPE_ANNOTATION_PARSING_OPTIONS_RETURN_TYPE = 128, + TYPE_ANNOTATION_PARSING_OPTIONS_POTENTIAL_CLASS_LITERAL = 256, + TYPE_ANNOTATION_PARSING_OPTIONS_ALLOW_INTERSECTION = 512, + TYPE_ANNOTATION_PARSING_OPTIONS_ADD_TYPE_PARAMETER_BINDING = 1024, + TYPE_ANNOTATION_PARSING_OPTIONS_DISALLOW_PRIMARY_TYPE = 2048, + TYPE_ANNOTATION_PARSING_OPTIONS_ALLOW_WILDCARD = 4096, + TYPE_ANNOTATION_PARSING_OPTIONS_IGNORE_FUNCTION_TYPE = 8192, + TYPE_ANNOTATION_PARSING_OPTIONS_ALLOW_DECLARATION_SITE_VARIANCE = 16384, + TYPE_ANNOTATION_PARSING_OPTIONS_DISALLOW_UNION = 32768, + TYPE_ANNOTATION_PARSING_OPTIONS_POTENTIAL_NEW_ARRAY = 65536, + TYPE_ANNOTATION_PARSING_OPTIONS_ANNOTATION_NOT_ALLOW = 131072 +} +export enum Es2pandaScriptKind { + SCRIPT_KIND_SCRIPT = 0, + SCRIPT_KIND_MODULE = 1, + SCRIPT_KIND_STDLIB = 2 +} +export enum Es2pandaEntityType { + ENTITY_TYPE_CLASS_PROPERTY = 0, + ENTITY_TYPE_METHOD_DEFINITION = 1, + ENTITY_TYPE_CLASS_DEFINITION = 2, + ENTITY_TYPE_TS_INTERFACE_DECLARATION = 3 +} +export enum Es2pandaProgramFlags { + PROGRAM_FLAGS_NONE = 0, + PROGRAM_FLAGS_AST_CHECKED = 1, + PROGRAM_FLAGS_AST_CHECK_PROCESSED = 2, + PROGRAM_FLAGS_AST_ENUM_LOWERED = 4, + PROGRAM_FLAGS_AST_BOXED_TYPE_LOWERED = 8, + PROGRAM_FLAGS_AST_CONST_STRING_TO_CHAR_LOWERED = 16, + PROGRAM_FLAGS_AST_CONSTANT_EXPRESSION_LOWERED = 32, + PROGRAM_FLAGS_AST_STRING_CONSTANT_LOWERED = 64, + PROGRAM_FLAGS_AST_IDENTIFIER_ANALYZED = 128, + PROGRAM_FLAGS_AST_HAS_SCOPES_INITIALIZED = 256, + PROGRAM_FLAGS_AST_HAS_OPTIONAL_PARAMETER_ANNOTATION = 512 +} export enum Es2pandaCompilationMode { COMPILATION_MODE_GEN_STD_LIB = 0, COMPILATION_MODE_PROJECT = 1, COMPILATION_MODE_SINGLE_FILE = 2 } -export enum Es2pandaCheckDecision { - CHECK_DECISION_CORRECT = 0, - CHECK_DECISION_INCORRECT = 1 +export enum Es2pandaImportFlags { + IMPORT_FLAGS_NONE = 0, + IMPORT_FLAGS_DEFAULT_IMPORT = 1, + IMPORT_FLAGS_IMPLICIT_PACKAGE_IMPORT = 2 +} +export enum Es2pandaModuleKind { + MODULE_KIND_MODULE = 0, + MODULE_KIND_DECLARATION = 1, + MODULE_KIND_PACKAGE = 2 } -export enum Es2pandaCheckAction { - CHECK_ACTION_CONTINUE = 0, - CHECK_ACTION_SKIP_SUBTREE = 1 +export enum Es2pandaEnum { + ENUM_NODE_HAS_PARENT = 0, + ENUM_NODE_HAS_SOURCE_RANGE = 1, + ENUM_EVERY_CHILD_HAS_VALID_PARENT = 2, + ENUM_EVERY_CHILD_IN_PARENT_RANGE = 3, + ENUM_CHECK_STRUCT_DECLARATION = 4, + ENUM_VARIABLE_HAS_SCOPE = 5, + ENUM_NODE_HAS_TYPE = 6, + ENUM_NO_PRIMITIVE_TYPES = 7, + ENUM_IDENTIFIER_HAS_VARIABLE = 8, + ENUM_REFERENCE_TYPE_ANNOTATION_IS_NULL = 9, + ENUM_ARITHMETIC_OPERATION_VALID = 10, + ENUM_SEQUENCE_EXPRESSION_HAS_LAST_TYPE = 11, + ENUM_FOR_LOOP_CORRECTLY_INITIALIZED = 12, + ENUM_VARIABLE_HAS_ENCLOSING_SCOPE = 13, + ENUM_MODIFIER_ACCESS_VALID = 14, + ENUM_VARIABLE_NAME_IDENTIFIER_NAME_SAME = 15, + ENUM_CHECK_ABSTRACT_METHOD = 16, + ENUM_GETTER_SETTER_VALIDATION = 17, + ENUM_CHECK_SCOPE_DECLARATION = 18, + ENUM_CHECK_CONST_PROPERTIES = 19, + ENUM_COUNT = 20, + ENUM_BASE_FIRST = 0, + ENUM_BASE_LAST = 3, + ENUM_AFTER_PLUGINS_AFTER_PARSE_FIRST = 4, + ENUM_AFTER_PLUGINS_AFTER_PARSE_LAST = 4, + ENUM_AFTER_SCOPES_INIT_PHASE_FIRST = 5, + ENUM_AFTER_SCOPES_INIT_PHASE_LAST = 5, + ENUM_AFTER_CHECKER_PHASE_FIRST = 6, + ENUM_AFTER_CHECKER_PHASE_LAST = 19, + ENUM_FIRST = 0, + ENUM_LAST = 19, + ENUM_INVALID = 20 } +export enum Es2pandaTokenType { + TOKEN_TYPE_EOS = 0, + TOKEN_TYPE_LITERAL_IDENT = 1, + TOKEN_TYPE_LITERAL_STRING = 2, + TOKEN_TYPE_LITERAL_CHAR = 3, + TOKEN_TYPE_LITERAL_NUMBER = 4, + TOKEN_TYPE_LITERAL_REGEXP = 5, + TOKEN_TYPE_PUNCTUATOR_BITWISE_AND = 6, + TOKEN_TYPE_PUNCTUATOR_BITWISE_OR = 7, + TOKEN_TYPE_PUNCTUATOR_MULTIPLY = 8, + TOKEN_TYPE_PUNCTUATOR_DIVIDE = 9, + TOKEN_TYPE_PUNCTUATOR_MINUS = 10, + TOKEN_TYPE_PUNCTUATOR_EXCLAMATION_MARK = 11, + TOKEN_TYPE_PUNCTUATOR_TILDE = 12, + TOKEN_TYPE_PUNCTUATOR_MINUS_MINUS = 13, + TOKEN_TYPE_PUNCTUATOR_LEFT_SHIFT = 14, + TOKEN_TYPE_PUNCTUATOR_RIGHT_SHIFT = 15, + TOKEN_TYPE_PUNCTUATOR_LESS_THAN_EQUAL = 16, + TOKEN_TYPE_PUNCTUATOR_GREATER_THAN_EQUAL = 17, + TOKEN_TYPE_PUNCTUATOR_MOD = 18, + TOKEN_TYPE_PUNCTUATOR_BITWISE_XOR = 19, + TOKEN_TYPE_PUNCTUATOR_EXPONENTIATION = 20, + TOKEN_TYPE_PUNCTUATOR_MULTIPLY_EQUAL = 21, + TOKEN_TYPE_PUNCTUATOR_EXPONENTIATION_EQUAL = 22, + TOKEN_TYPE_PUNCTUATOR_ARROW = 23, + TOKEN_TYPE_PUNCTUATOR_BACK_TICK = 24, + TOKEN_TYPE_PUNCTUATOR_HASH_MARK = 25, + TOKEN_TYPE_PUNCTUATOR_DIVIDE_EQUAL = 26, + TOKEN_TYPE_PUNCTUATOR_MOD_EQUAL = 27, + TOKEN_TYPE_PUNCTUATOR_MINUS_EQUAL = 28, + TOKEN_TYPE_PUNCTUATOR_LEFT_SHIFT_EQUAL = 29, + TOKEN_TYPE_PUNCTUATOR_RIGHT_SHIFT_EQUAL = 30, + TOKEN_TYPE_PUNCTUATOR_UNSIGNED_RIGHT_SHIFT = 31, + TOKEN_TYPE_PUNCTUATOR_UNSIGNED_RIGHT_SHIFT_EQUAL = 32, + TOKEN_TYPE_PUNCTUATOR_BITWISE_AND_EQUAL = 33, + TOKEN_TYPE_PUNCTUATOR_BITWISE_OR_EQUAL = 34, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_AND_EQUAL = 35, + TOKEN_TYPE_PUNCTUATOR_NULLISH_COALESCING = 36, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_OR_EQUAL = 37, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_NULLISH_EQUAL = 38, + TOKEN_TYPE_PUNCTUATOR_BITWISE_XOR_EQUAL = 39, + TOKEN_TYPE_PUNCTUATOR_PLUS = 40, + TOKEN_TYPE_PUNCTUATOR_PLUS_PLUS = 41, + TOKEN_TYPE_PUNCTUATOR_PLUS_EQUAL = 42, + TOKEN_TYPE_PUNCTUATOR_LESS_THAN = 43, + TOKEN_TYPE_PUNCTUATOR_GREATER_THAN = 44, + TOKEN_TYPE_PUNCTUATOR_EQUAL = 45, + TOKEN_TYPE_PUNCTUATOR_NOT_EQUAL = 46, + TOKEN_TYPE_PUNCTUATOR_STRICT_EQUAL = 47, + TOKEN_TYPE_PUNCTUATOR_NOT_STRICT_EQUAL = 48, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_AND = 49, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_OR = 50, + TOKEN_TYPE_PUNCTUATOR_SUBSTITUTION = 51, + TOKEN_TYPE_PUNCTUATOR_QUESTION_MARK = 52, + TOKEN_TYPE_PUNCTUATOR_QUESTION_DOT = 53, + TOKEN_TYPE_PUNCTUATOR_AT = 54, + TOKEN_TYPE_PUNCTUATOR_FORMAT = 55, + TOKEN_TYPE_PUNCTUATOR_RIGHT_PARENTHESIS = 56, + TOKEN_TYPE_PUNCTUATOR_LEFT_PARENTHESIS = 57, + TOKEN_TYPE_PUNCTUATOR_RIGHT_SQUARE_BRACKET = 58, + TOKEN_TYPE_PUNCTUATOR_LEFT_SQUARE_BRACKET = 59, + TOKEN_TYPE_PUNCTUATOR_RIGHT_BRACE = 60, + TOKEN_TYPE_PUNCTUATOR_PERIOD = 61, + TOKEN_TYPE_PUNCTUATOR_PERIOD_PERIOD_PERIOD = 62, + TOKEN_TYPE_PUNCTUATOR_PERIOD_QUESTION = 63, + TOKEN_TYPE_PUNCTUATOR_LEFT_BRACE = 64, + TOKEN_TYPE_PUNCTUATOR_SEMI_COLON = 65, + TOKEN_TYPE_PUNCTUATOR_COLON = 66, + TOKEN_TYPE_PUNCTUATOR_COMMA = 67, + TOKEN_TYPE_KEYW_ABSTRACT = 68, + TOKEN_TYPE_KEYW_ANY = 69, + TOKEN_TYPE_KEYW_ANYREF = 70, + TOKEN_TYPE_KEYW_ARGUMENTS = 71, + TOKEN_TYPE_KEYW_AS = 72, + TOKEN_TYPE_KEYW_ASSERTS = 73, + TOKEN_TYPE_KEYW_ASYNC = 74, + TOKEN_TYPE_KEYW_AWAIT = 75, + TOKEN_TYPE_KEYW_BIGINT = 76, + TOKEN_TYPE_KEYW_BUILTIN_BIGINT = 77, + TOKEN_TYPE_KEYW_BOOLEAN = 78, + TOKEN_TYPE_KEYW_BUILTIN_BOOLEAN = 79, + TOKEN_TYPE_KEYW_BREAK = 80, + TOKEN_TYPE_KEYW_BYTE = 81, + TOKEN_TYPE_KEYW_BUILTIN_BYTE = 82, + TOKEN_TYPE_KEYW_CASE = 83, + TOKEN_TYPE_KEYW_CATCH = 84, + TOKEN_TYPE_KEYW_CHAR = 85, + TOKEN_TYPE_KEYW_BUILTIN_CHAR = 86, + TOKEN_TYPE_KEYW_CLASS = 87, + TOKEN_TYPE_KEYW_CONST = 88, + TOKEN_TYPE_KEYW_CONSTRUCTOR = 89, + TOKEN_TYPE_KEYW_CONTINUE = 90, + TOKEN_TYPE_KEYW_DATAREF = 91, + TOKEN_TYPE_KEYW_DEBUGGER = 92, + TOKEN_TYPE_KEYW_DECLARE = 93, + TOKEN_TYPE_KEYW_DEFAULT = 94, + TOKEN_TYPE_KEYW_DELETE = 95, + TOKEN_TYPE_KEYW_DO = 96, + TOKEN_TYPE_KEYW_DOUBLE = 97, + TOKEN_TYPE_KEYW_BUILTIN_DOUBLE = 98, + TOKEN_TYPE_KEYW_ELSE = 99, + TOKEN_TYPE_KEYW_ENUM = 100, + TOKEN_TYPE_KEYW_EQREF = 101, + TOKEN_TYPE_KEYW_EVAL = 102, + TOKEN_TYPE_KEYW_EXPORT = 103, + TOKEN_TYPE_KEYW_EXTENDS = 104, + TOKEN_TYPE_KEYW_EXTERNREF = 105, + TOKEN_TYPE_KEYW_F32 = 106, + TOKEN_TYPE_KEYW_F64 = 107, + TOKEN_TYPE_LITERAL_FALSE = 108, + TOKEN_TYPE_KEYW_FINALLY = 109, + TOKEN_TYPE_KEYW_FLOAT = 110, + TOKEN_TYPE_KEYW_BUILTIN_FLOAT = 111, + TOKEN_TYPE_KEYW_FOR = 112, + TOKEN_TYPE_KEYW_FROM = 113, + TOKEN_TYPE_KEYW_FUNCREF = 114, + TOKEN_TYPE_KEYW_FUNCTION = 115, + TOKEN_TYPE_KEYW_GET = 116, + TOKEN_TYPE_KEYW_GLOBAL = 117, + TOKEN_TYPE_KEYW_I8 = 118, + TOKEN_TYPE_KEYW_I16 = 119, + TOKEN_TYPE_KEYW_I31REF = 120, + TOKEN_TYPE_KEYW_I32 = 121, + TOKEN_TYPE_KEYW_I64 = 122, + TOKEN_TYPE_KEYW_IF = 123, + TOKEN_TYPE_KEYW_IMPLEMENTS = 124, + TOKEN_TYPE_KEYW_IMPORT = 125, + TOKEN_TYPE_KEYW_IN = 126, + TOKEN_TYPE_KEYW_INFER = 127, + TOKEN_TYPE_KEYW_INSTANCEOF = 128, + TOKEN_TYPE_KEYW_INT = 129, + TOKEN_TYPE_KEYW_BUILTIN_INT = 130, + TOKEN_TYPE_KEYW_INTERFACE = 131, + TOKEN_TYPE_KEYW_IS = 132, + TOKEN_TYPE_KEYW_ISIZE = 133, + TOKEN_TYPE_KEYW_KEYOF = 134, + TOKEN_TYPE_KEYW_LET = 135, + TOKEN_TYPE_KEYW_LONG = 136, + TOKEN_TYPE_KEYW_BUILTIN_LONG = 137, + TOKEN_TYPE_KEYW_META = 138, + TOKEN_TYPE_KEYW_MODULE = 139, + TOKEN_TYPE_KEYW_NAMESPACE = 140, + TOKEN_TYPE_KEYW_NATIVE = 141, + TOKEN_TYPE_KEYW_NEVER = 142, + TOKEN_TYPE_KEYW_NEW = 143, + TOKEN_TYPE_LITERAL_NULL = 144, + TOKEN_TYPE_KEYW_NUMBER = 145, + TOKEN_TYPE_KEYW_OBJECT = 146, + TOKEN_TYPE_KEYW_BUILTIN_OBJECT = 147, + TOKEN_TYPE_KEYW_OF = 148, + TOKEN_TYPE_KEYW_FINAL = 149, + TOKEN_TYPE_KEYW_OUT = 150, + TOKEN_TYPE_KEYW_OVERRIDE = 151, + TOKEN_TYPE_KEYW_PACKAGE = 152, + TOKEN_TYPE_KEYW_INTERNAL = 153, + TOKEN_TYPE_KEYW_PRIVATE = 154, + TOKEN_TYPE_KEYW_PROTECTED = 155, + TOKEN_TYPE_KEYW_PUBLIC = 156, + TOKEN_TYPE_KEYW_READONLY = 157, + TOKEN_TYPE_KEYW_RETHROWS = 158, + TOKEN_TYPE_KEYW_RETURN = 159, + TOKEN_TYPE_KEYW_REQUIRE = 160, + TOKEN_TYPE_KEYW_SET = 161, + TOKEN_TYPE_KEYW_SHORT = 162, + TOKEN_TYPE_KEYW_BUILTIN_SHORT = 163, + TOKEN_TYPE_KEYW_STATIC = 164, + TOKEN_TYPE_KEYW_STRING = 165, + TOKEN_TYPE_KEYW_BUILTIN_STRING = 166, + TOKEN_TYPE_KEYW_STRUCT = 167, + TOKEN_TYPE_KEYW_SUPER = 168, + TOKEN_TYPE_KEYW_SWITCH = 169, + TOKEN_TYPE_KEYW_TARGET = 170, + TOKEN_TYPE_KEYW_THIS = 171, + TOKEN_TYPE_KEYW_THROW = 172, + TOKEN_TYPE_KEYW_THROWS = 173, + TOKEN_TYPE_LITERAL_TRUE = 174, + TOKEN_TYPE_KEYW_TRY = 175, + TOKEN_TYPE_KEYW_TYPE = 176, + TOKEN_TYPE_KEYW_TYPEOF = 177, + TOKEN_TYPE_KEYW_U8 = 178, + TOKEN_TYPE_KEYW_U16 = 179, + TOKEN_TYPE_KEYW_U32 = 180, + TOKEN_TYPE_KEYW_U64 = 181, + TOKEN_TYPE_KEYW_UNDEFINED = 182, + TOKEN_TYPE_KEYW_UNKNOWN = 183, + TOKEN_TYPE_KEYW_USIZE = 184, + TOKEN_TYPE_KEYW_V128 = 185, + TOKEN_TYPE_KEYW_VAR = 186, + TOKEN_TYPE_KEYW_VOID = 187, + TOKEN_TYPE_KEYW_WHILE = 188, + TOKEN_TYPE_KEYW_WITH = 189, + TOKEN_TYPE_KEYW_YIELD = 190, + TOKEN_TYPE_JS_DOC_START = 191, + TOKEN_TYPE_JS_DOC_END = 192, + TOKEN_TYPE_FIRST_PUNCTUATOR = 6, + TOKEN_TYPE_FIRST_KEYW = 68 +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts b/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts index ac6ba24d9..1a6513b75 100644 --- a/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts @@ -33,7 +33,7 @@ import { ImportDeclaration } from "./ImportDeclaration" import { ImportSource } from "./ImportSource" import { Es2pandaImportKinds } from "./../Es2pandaEnums" import { StringLiteral } from "./StringLiteral" -import { Es2pandaImportFlags } from "./../../Es2pandaEnums" +import { Es2pandaImportFlags } from "./../Es2pandaEnums" export class ETSImportDeclaration extends ImportDeclaration { constructor(pointer: KNativePointer) { assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION) diff --git a/koala-wrapper/src/reexport-for-generated.ts b/koala-wrapper/src/reexport-for-generated.ts index 37e3c6f56..bed26ef7a 100644 --- a/koala-wrapper/src/reexport-for-generated.ts +++ b/koala-wrapper/src/reexport-for-generated.ts @@ -15,7 +15,7 @@ export { KNativePointer } from "@koalaui/interop" export { AstNode } from "./arkts-api/peers/AstNode" export { ArktsObject } from "./arkts-api/peers/ArktsObject" -export { Es2pandaAstNodeType } from "./Es2pandaEnums" +export { Es2pandaAstNodeType } from "./generated/Es2pandaEnums" export { passNode, unpackNonNullableNode, -- Gitee From 2fb4df67261af4b705d5f5cd6fa2fd784a9eb324 Mon Sep 17 00:00:00 2001 From: Keerecles Date: Thu, 12 Jun 2025 21:28:47 +0800 Subject: [PATCH 07/17] sync from rri Signed-off-by: Keerecles Change-Id: Iec1c8f081561afba7e4b7faef1807899c56935e5 --- koala-wrapper/native/src/bridges.cc | 131 +- koala-wrapper/native/src/common.cc | 71 +- koala-wrapper/native/src/common.h | 2 +- koala-wrapper/native/src/generated/bridges.cc | 2716 +++++++++++++++-- koala-wrapper/src/arkts-api/static/global.ts | 13 +- 5 files changed, 2513 insertions(+), 420 deletions(-) diff --git a/koala-wrapper/native/src/bridges.cc b/koala-wrapper/native/src/bridges.cc index 1d5ac9370..05297cd1b 100644 --- a/koala-wrapper/native/src/bridges.cc +++ b/koala-wrapper/native/src/bridges.cc @@ -19,24 +19,6 @@ #include #include -std::set globalStructInfo; -std::mutex g_structMutex; - -void impl_InsertGlobalStructInfo(KNativePointer contextPtr, KStringPtr& instancePtr) -{ - std::lock_guard lock(g_structMutex); - globalStructInfo.insert(getStringCopy(instancePtr)); - return; -} -KOALA_INTEROP_V2(InsertGlobalStructInfo, KNativePointer, KStringPtr); - -KBoolean impl_HasGlobalStructInfo(KNativePointer contextPtr, KStringPtr& instancePtr) -{ - std::lock_guard lock(g_structMutex); - return globalStructInfo.count(getStringCopy(instancePtr)); -} -KOALA_INTEROP_2(HasGlobalStructInfo, KBoolean, KNativePointer, KStringPtr); - KNativePointer impl_AstNodeRecheck(KNativePointer contextPtr, KNativePointer nodePtr) { auto context = reinterpret_cast(contextPtr); @@ -158,14 +140,6 @@ KNativePointer impl_ContextProgram(KNativePointer contextPtr) } KOALA_INTEROP_1(ContextProgram, KNativePointer, KNativePointer) -KNativePointer impl_ProgramAst(KNativePointer contextPtr, KNativePointer programPtr) -{ - auto context = reinterpret_cast(contextPtr); - auto program = reinterpret_cast(programPtr); - return GetImpl()->ProgramAst(context, program); -} -KOALA_INTEROP_2(ProgramAst, KNativePointer, KNativePointer, KNativePointer) - KBoolean impl_IsIdentifier(KNativePointer nodePtr) { auto node = reinterpret_cast(nodePtr); @@ -250,14 +224,14 @@ static KNativePointer impl_ProgramDirectExternalSources(KNativePointer contextPt } KOALA_INTEROP_2(ProgramDirectExternalSources, KNativePointer, KNativePointer, KNativePointer); -static KNativePointer impl_ProgramModuleNameConst(KNativePointer contextPtr, KNativePointer instancePtr) +static KNativePointer impl_ProgramSourceFilePath(KNativePointer contextPtr, KNativePointer instancePtr) { auto context = reinterpret_cast(contextPtr); - auto program = reinterpret_cast(instancePtr); - auto result = GetImpl()->ProgramModuleNameConst(context, program); - return new std::string(result); + auto&& instance = reinterpret_cast(instancePtr); + auto&& result = GetImpl()->ProgramSourceFilePathConst(context, instance); + return StageArena::strdup(result); } -KOALA_INTEROP_2(ProgramModuleNameConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ProgramSourceFilePath, KNativePointer, KNativePointer, KNativePointer); static KNativePointer impl_ExternalSourceName(KNativePointer instance) { @@ -323,12 +297,6 @@ KInt impl_GenerateTsDeclarationsFromContext(KNativePointer contextPtr, KStringPt } KOALA_INTEROP_4(GenerateTsDeclarationsFromContext, KInt, KNativePointer, KStringPtr, KStringPtr, KBoolean) -KInt impl_GenerateStaticDeclarationsFromContext(KNativePointer contextPtr, KStringPtr &outputPath) -{ - auto context = reinterpret_cast(contextPtr); - return GetImpl()->GenerateStaticDeclarationsFromContext(context, outputPath.data()); -} -KOALA_INTEROP_2(GenerateStaticDeclarationsFromContext, KInt, KNativePointer, KStringPtr) void impl_InsertETSImportDeclarationAndParse(KNativePointer context, KNativePointer program, KNativePointer importDeclaration) { const auto _context = reinterpret_cast(context); @@ -377,39 +345,69 @@ KNativePointer impl_CreateSourceRange(KNativePointer context, KNativePointer sta } KOALA_INTEROP_3(CreateSourceRange, KNativePointer, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_ProgramFileNameConst(KNativePointer contextPtr, KNativePointer programPtr) +KNativePointer impl_ConfigGetOptions(KNativePointer config) { - auto context = reinterpret_cast(contextPtr); - auto program = reinterpret_cast(programPtr); - auto result = GetImpl()->ProgramFileNameConst(context, program); - return new std::string(result); + const auto _config = reinterpret_cast(config); + auto result = GetImpl()->ConfigGetOptions(_config); + return (void*)result; } -KOALA_INTEROP_2(ProgramFileNameConst, KNativePointer, KNativePointer, KNativePointer) +KOALA_INTEROP_1(ConfigGetOptions, KNativePointer, KNativePointer) -KNativePointer impl_ProgramFileNameWithExtensionConst(KNativePointer contextPtr, KNativePointer programPtr) +KNativePointer impl_CreateCacheContextFromFile(KNativePointer configPtr, KStringPtr& source_file_namePtr, KNativePointer globalContextPtr, KBoolean isExternal) { + auto config = reinterpret_cast(configPtr); + auto globalContext = reinterpret_cast(globalContextPtr); + return GetImpl()->CreateCacheContextFromFile(config, getStringCopy(source_file_namePtr), globalContext, isExternal); +} +KOALA_INTEROP_4(CreateCacheContextFromFile, KNativePointer, KNativePointer, KStringPtr, KNativePointer, KBoolean) + +KNativePointer impl_CreateGlobalContext(KNativePointer configPtr, KStringArray externalFileListPtr, + KInt fileNum, KBoolean lspUsage) { - auto context = reinterpret_cast(contextPtr); - auto program = reinterpret_cast(programPtr); - auto result = GetImpl()->ProgramFileNameWithExtensionConst(context, program); - return new std::string(result); + auto config = reinterpret_cast(configPtr); + + const std::size_t headerLen = 4; + + const char** externalFileList = new const char* [fileNum]; + std::size_t position = headerLen; + std::size_t strLen; + for (std::size_t i = 0; i < static_cast(fileNum); ++i) { + strLen = unpackUInt(externalFileListPtr + position); + position += headerLen; + externalFileList[i] = strdup(std::string( + reinterpret_cast(externalFileListPtr + position), strLen).c_str()); + position += strLen; + } + + return GetImpl()->CreateGlobalContext(config, externalFileList, fileNum, lspUsage); } -KOALA_INTEROP_2(ProgramFileNameWithExtensionConst, KNativePointer, KNativePointer, KNativePointer) +KOALA_INTEROP_4(CreateGlobalContext, KNativePointer, KNativePointer, KStringArray, KInt, KBoolean) + +// From koala-wrapper +// TODO check if some code should be generated + +void impl_DestroyGlobalContext(KNativePointer contextPtr) { + auto context = reinterpret_cast(contextPtr); + GetImpl()->DestroyGlobalContext(context); +} +KOALA_INTEROP_V1(DestroyGlobalContext, KNativePointer) + +std::set globalStructInfo; +std::mutex g_structMutex; -KBoolean impl_ProgramIsASTLoweredConst(KNativePointer contextPtr, KNativePointer instancePtr) +void impl_InsertGlobalStructInfo(KNativePointer contextPtr, KStringPtr& instancePtr) { - auto context = reinterpret_cast(contextPtr); - auto &&instance = reinterpret_cast(instancePtr); - return GetImpl()->ProgramIsASTLoweredConst(context, instance); + std::lock_guard lock(g_structMutex); + globalStructInfo.insert(getStringCopy(instancePtr)); + return; } -KOALA_INTEROP_2(ProgramIsASTLoweredConst, KBoolean, KNativePointer, KNativePointer); +KOALA_INTEROP_V2(InsertGlobalStructInfo, KNativePointer, KStringPtr); -KNativePointer impl_ETSParserGetGlobalProgramAbsName(KNativePointer contextPtr) +KBoolean impl_HasGlobalStructInfo(KNativePointer contextPtr, KStringPtr& instancePtr) { - auto context = reinterpret_cast(contextPtr); - auto result = GetImpl()->ETSParserGetGlobalProgramAbsName(context); - return new std::string(result); + std::lock_guard lock(g_structMutex); + return globalStructInfo.count(getStringCopy(instancePtr)); } -KOALA_INTEROP_1(ETSParserGetGlobalProgramAbsName, KNativePointer, KNativePointer) +KOALA_INTEROP_2(HasGlobalStructInfo, KBoolean, KNativePointer, KStringPtr); KNativePointer impl_ClassVariableDeclaration(KNativePointer context, KNativePointer classInstance) { @@ -481,6 +479,14 @@ KBoolean impl_IsArrayExpression(KNativePointer nodePtr) } KOALA_INTEROP_1(IsArrayExpression, KBoolean, KNativePointer) +KNativePointer impl_ETSParserGetGlobalProgramAbsName(KNativePointer contextPtr) +{ + auto context = reinterpret_cast(contextPtr); + auto result = GetImpl()->ETSParserGetGlobalProgramAbsName(context); + return new std::string(result); +} +KOALA_INTEROP_1(ETSParserGetGlobalProgramAbsName, KNativePointer, KNativePointer) + KNativePointer impl_CreateDiagnosticKind(KNativePointer context, KStringPtr& message, KInt type) { const auto _context = reinterpret_cast(context); @@ -560,6 +566,13 @@ void impl_LogDiagnosticWithSuggestion(KNativePointer context, KNativePointer dia } KOALA_INTEROP_V4(LogDiagnosticWithSuggestion, KNativePointer, KNativePointer, KNativePointer, KNativePointer); +KInt impl_GenerateStaticDeclarationsFromContext(KNativePointer contextPtr, KStringPtr &outputPath) +{ + auto context = reinterpret_cast(contextPtr); + return GetImpl()->GenerateStaticDeclarationsFromContext(context, outputPath.data()); +} +KOALA_INTEROP_2(GenerateStaticDeclarationsFromContext, KInt, KNativePointer, KStringPtr) + KNativePointer impl_AnnotationUsageIrPropertiesPtrConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); diff --git a/koala-wrapper/native/src/common.cc b/koala-wrapper/native/src/common.cc index c6fb3bf22..11d5d6bee 100644 --- a/koala-wrapper/native/src/common.cc +++ b/koala-wrapper/native/src/common.cc @@ -104,7 +104,7 @@ const string ARKUI = "arkui"; #endif const char *LIB_DIR = "lib"; -static std::string ES2PANDA_LIB_PATH; +static std::string ES2PANDA_LIB_PATH = ""; std::string joinPath(vector &paths) { @@ -169,56 +169,6 @@ char* getStringCopy(KStringPtr& ptr) return strdup(ptr.c_str()); } -void impl_MemInitialize() -{ - GetImpl()->MemInitialize(); -} -KOALA_INTEROP_V0(MemInitialize) - -void impl_MemFinalize() -{ - GetImpl()->MemFinalize(); -} -KOALA_INTEROP_V0(MemFinalize) - -KNativePointer impl_CreateGlobalContext(KNativePointer configPtr, KStringArray externalFileListPtr, - KInt fileNum, KBoolean lspUsage) -{ - auto config = reinterpret_cast(configPtr); - - const std::size_t headerLen = 4; - - const char** externalFileList = new const char* [fileNum]; - std::size_t position = headerLen; - std::size_t strLen; - for (std::size_t i = 0; i < static_cast(fileNum); ++i) { - strLen = unpackUInt(externalFileListPtr + position); - position += headerLen; - externalFileList[i] = strdup(std::string( - reinterpret_cast(externalFileListPtr + position), strLen).c_str()); - position += strLen; - } - - return GetImpl()->CreateGlobalContext(config, externalFileList, fileNum, lspUsage); -} -KOALA_INTEROP_4(CreateGlobalContext, KNativePointer, KNativePointer, KStringArray, KInt, KBoolean) - -void impl_DestroyGlobalContext(KNativePointer globalContextPtr) -{ - auto context = reinterpret_cast(globalContextPtr); - GetImpl()->DestroyGlobalContext(context); -} -KOALA_INTEROP_V1(DestroyGlobalContext, KNativePointer) - -KNativePointer impl_CreateCacheContextFromFile(KNativePointer configPtr, KStringPtr& fileName, - KNativePointer globalContext, KBoolean isExternal) -{ - auto config = reinterpret_cast(configPtr); - auto context = reinterpret_cast(globalContext); - return GetImpl()->CreateCacheContextFromFile(config, getStringCopy(fileName), context, isExternal); -} -KOALA_INTEROP_4(CreateCacheContextFromFile, KNativePointer, KNativePointer, KStringPtr, KNativePointer, KBoolean) - KNativePointer impl_CreateConfig(KInt argc, KStringArray argvPtr) { const std::size_t headerLen = 4; @@ -360,6 +310,25 @@ KNativePointer impl_AstNodeChildren( } KOALA_INTEROP_2(AstNodeChildren, KNativePointer, KNativePointer, KNativePointer) +/* +----------------------------------------------------------------------------------------------------------------------------- +*/ + +// From koala-wrapper +// TODO check if some code should be generated + +void impl_MemInitialize() +{ + GetImpl()->MemInitialize(); +} +KOALA_INTEROP_V0(MemInitialize) + +void impl_MemFinalize() +{ + GetImpl()->MemFinalize(); +} +KOALA_INTEROP_V0(MemFinalize) + static bool isUIHeaderFile(es2panda_Context* context, es2panda_Program* program) { auto result = GetImpl()->ProgramFileNameWithExtensionConst(context, program); diff --git a/koala-wrapper/native/src/common.h b/koala-wrapper/native/src/common.h index f92e740d4..a185147db 100644 --- a/koala-wrapper/native/src/common.h +++ b/koala-wrapper/native/src/common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/native/src/generated/bridges.cc b/koala-wrapper/native/src/generated/bridges.cc index 20240f324..2ac585276 100644 --- a/koala-wrapper/native/src/generated/bridges.cc +++ b/koala-wrapper/native/src/generated/bridges.cc @@ -278,6 +278,46 @@ void impl_ClassPropertySetInitInStaticBlock(KNativePointer context, KNativePoint } KOALA_INTEROP_V3(ClassPropertySetInitInStaticBlock, KNativePointer, KNativePointer, KBoolean); +void impl_ClassPropertyEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ClassPropertyEmplaceAnnotations(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ClassPropertyEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassPropertyClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassPropertyClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassPropertyClearAnnotations, KNativePointer, KNativePointer); + +void impl_ClassPropertySetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->ClassPropertySetValueAnnotations(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(ClassPropertySetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ClassPropertyAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassPropertyAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassPropertyAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_ClassPropertyAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -298,17 +338,38 @@ KNativePointer impl_ClassPropertyAnnotationsConst(KNativePointer context, KNativ } KOALA_INTEROP_2(ClassPropertyAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); -void impl_ClassPropertySetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotations, KUInt annotationsSequenceLength) +void impl_ClassPropertySetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _annotations = reinterpret_cast(annotations); - const auto _annotationsSequenceLength = static_cast(annotationsSequenceLength); - GetImpl()->ClassPropertySetAnnotations(_context, _receiver, _annotations, _annotationsSequenceLength); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ClassPropertySetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); return ; } KOALA_INTEROP_V4(ClassPropertySetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +void impl_ClassPropertySetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ClassPropertySetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ClassPropertySetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ClassPropertyAddAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->ClassPropertyAddAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(ClassPropertyAddAnnotations, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateTSVoidKeyword(KNativePointer context) { const auto _context = reinterpret_cast(context); @@ -430,6 +491,15 @@ KInt impl_ETSFunctionTypeFlags(KNativePointer context, KNativePointer receiver) } KOALA_INTEROP_2(ETSFunctionTypeFlags, KInt, KNativePointer, KNativePointer); +KInt impl_ETSFunctionTypeFlagsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSFunctionTypeIrFlagsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSFunctionTypeFlagsConst, KInt, KNativePointer, KNativePointer); + KBoolean impl_ETSFunctionTypeIsThrowingConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -555,6 +625,17 @@ KNativePointer impl_IfStatementTest(KNativePointer context, KNativePointer recei } KOALA_INTEROP_2(IfStatementTest, KNativePointer, KNativePointer, KNativePointer); +// no IfStatementSetTest +// void impl_IfStatementSetTest(KNativePointer context, KNativePointer receiver, KNativePointer test) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// const auto _test = reinterpret_cast(test); +// GetImpl()->IfStatementSetTest(_context, _receiver, _test); +// return ; +// } +// KOALA_INTEROP_V3(IfStatementSetTest, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_IfStatementConsequentConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -790,12 +871,12 @@ KNativePointer impl_TSEnumDeclarationBoxedClassConst(KNativePointer context, KNa } KOALA_INTEROP_2(TSEnumDeclarationBoxedClassConst, KNativePointer, KNativePointer, KNativePointer); -void impl_TSEnumDeclarationSetBoxedClass(KNativePointer context, KNativePointer receiver, KNativePointer wrapperClass) +void impl_TSEnumDeclarationSetBoxedClass(KNativePointer context, KNativePointer receiver, KNativePointer boxedClass) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _wrapperClass = reinterpret_cast(wrapperClass); - GetImpl()->TSEnumDeclarationSetBoxedClass(_context, _receiver, _wrapperClass); + const auto _boxedClass = reinterpret_cast(boxedClass); + GetImpl()->TSEnumDeclarationSetBoxedClass(_context, _receiver, _boxedClass); return ; } KOALA_INTEROP_V3(TSEnumDeclarationSetBoxedClass, KNativePointer, KNativePointer, KNativePointer); @@ -819,6 +900,86 @@ KNativePointer impl_TSEnumDeclarationDecoratorsConst(KNativePointer context, KNa } KOALA_INTEROP_2(TSEnumDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); +void impl_TSEnumDeclarationEmplaceDecorators(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->TSEnumDeclarationEmplaceDecorators(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(TSEnumDeclarationEmplaceDecorators, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSEnumDeclarationClearDecorators(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSEnumDeclarationClearDecorators(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TSEnumDeclarationClearDecorators, KNativePointer, KNativePointer); + +void impl_TSEnumDeclarationSetValueDecorators(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->TSEnumDeclarationSetValueDecorators(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(TSEnumDeclarationSetValueDecorators, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_TSEnumDeclarationDecoratorsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSEnumDeclarationDecoratorsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSEnumDeclarationDecoratorsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSEnumDeclarationEmplaceMembers(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->TSEnumDeclarationEmplaceMembers(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(TSEnumDeclarationEmplaceMembers, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSEnumDeclarationClearMembers(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSEnumDeclarationClearMembers(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TSEnumDeclarationClearMembers, KNativePointer, KNativePointer); + +void impl_TSEnumDeclarationSetValueMembers(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->TSEnumDeclarationSetValueMembers(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(TSEnumDeclarationSetValueMembers, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_TSEnumDeclarationMembersForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSEnumDeclarationMembersForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSEnumDeclarationMembersForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateTSNeverKeyword(KNativePointer context) { const auto _context = reinterpret_cast(context); @@ -1527,6 +1688,56 @@ KInt impl_ClassElementToPrivateFieldKindConst(KNativePointer context, KNativePoi } KOALA_INTEROP_3(ClassElementToPrivateFieldKindConst, KInt, KNativePointer, KNativePointer, KBoolean); +void impl_ClassElementEmplaceDecorators(KNativePointer context, KNativePointer receiver, KNativePointer decorators) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _decorators = reinterpret_cast(decorators); + GetImpl()->ClassElementEmplaceDecorators(_context, _receiver, _decorators); + return ; +} +KOALA_INTEROP_V3(ClassElementEmplaceDecorators, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassElementClearDecorators(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassElementClearDecorators(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassElementClearDecorators, KNativePointer, KNativePointer); + +void impl_ClassElementSetValueDecorators(KNativePointer context, KNativePointer receiver, KNativePointer decorators, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _decorators = reinterpret_cast(decorators); + const auto _index = static_cast(index); + GetImpl()->ClassElementSetValueDecorators(_context, _receiver, _decorators, _index); + return ; +} +KOALA_INTEROP_V4(ClassElementSetValueDecorators, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ClassElementDecorators(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassElementDecorators(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassElementDecorators, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassElementDecoratorsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassElementDecoratorsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassElementDecoratorsForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateTSImportType(KNativePointer context, KNativePointer param, KNativePointer typeParams, KNativePointer qualifier, KBoolean isTypeof) { const auto _context = reinterpret_cast(context); @@ -1711,6 +1922,56 @@ KNativePointer impl_FunctionDeclarationFunctionConst(KNativePointer context, KNa } KOALA_INTEROP_2(FunctionDeclarationFunctionConst, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_FunctionDeclarationDecoratorsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->FunctionDeclarationDecoratorsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(FunctionDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_FunctionDeclarationEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->FunctionDeclarationEmplaceAnnotations(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(FunctionDeclarationEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); + +void impl_FunctionDeclarationClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->FunctionDeclarationClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(FunctionDeclarationClearAnnotations, KNativePointer, KNativePointer); + +void impl_FunctionDeclarationSetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->FunctionDeclarationSetValueAnnotations(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(FunctionDeclarationSetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_FunctionDeclarationAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->FunctionDeclarationAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(FunctionDeclarationAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_FunctionDeclarationAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -1731,17 +1992,38 @@ KNativePointer impl_FunctionDeclarationAnnotationsConst(KNativePointer context, } KOALA_INTEROP_2(FunctionDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); -void impl_FunctionDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotations, KUInt annotationsSequenceLength) +void impl_FunctionDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _annotations = reinterpret_cast(annotations); - const auto _annotationsSequenceLength = static_cast(annotationsSequenceLength); - GetImpl()->FunctionDeclarationSetAnnotations(_context, _receiver, _annotations, _annotationsSequenceLength); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->FunctionDeclarationSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); return ; } KOALA_INTEROP_V4(FunctionDeclarationSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +void impl_FunctionDeclarationSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->FunctionDeclarationSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(FunctionDeclarationSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_FunctionDeclarationAddAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->FunctionDeclarationAddAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(FunctionDeclarationAddAnnotations, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateETSTypeReference(KNativePointer context, KNativePointer part) { const auto _context = reinterpret_cast(context); @@ -2175,6 +2457,16 @@ KNativePointer impl_TSInterfaceDeclarationExtends(KNativePointer context, KNativ } KOALA_INTEROP_2(TSInterfaceDeclarationExtends, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_TSInterfaceDeclarationExtendsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceDeclarationExtendsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSInterfaceDeclarationExtendsForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_TSInterfaceDeclarationExtendsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -2223,130 +2515,372 @@ void impl_TSInterfaceDeclarationSetAnonClass(KNativePointer context, KNativePoin } KOALA_INTEROP_V3(TSInterfaceDeclarationSetAnonClass, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_TSInterfaceDeclarationAnnotations(KNativePointer context, KNativePointer receiver) +void impl_TSInterfaceDeclarationEmplaceExtends(KNativePointer context, KNativePointer receiver, KNativePointer _extends) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - std::size_t length; - auto result = GetImpl()->TSInterfaceDeclarationAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + const auto __extends = reinterpret_cast(_extends); + GetImpl()->TSInterfaceDeclarationEmplaceExtends(_context, _receiver, __extends); + return ; } -KOALA_INTEROP_2(TSInterfaceDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_V3(TSInterfaceDeclarationEmplaceExtends, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_TSInterfaceDeclarationAnnotationsConst(KNativePointer context, KNativePointer receiver) +void impl_TSInterfaceDeclarationClearExtends(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - std::size_t length; - auto result = GetImpl()->TSInterfaceDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + GetImpl()->TSInterfaceDeclarationClearExtends(_context, _receiver); + return ; } -KOALA_INTEROP_2(TSInterfaceDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_V2(TSInterfaceDeclarationClearExtends, KNativePointer, KNativePointer); -void impl_TSInterfaceDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotations, KUInt annotationsSequenceLength) +void impl_TSInterfaceDeclarationSetValueExtends(KNativePointer context, KNativePointer receiver, KNativePointer _extends, KUInt index) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _annotations = reinterpret_cast(annotations); - const auto _annotationsSequenceLength = static_cast(annotationsSequenceLength); - GetImpl()->TSInterfaceDeclarationSetAnnotations(_context, _receiver, _annotations, _annotationsSequenceLength); + const auto __extends = reinterpret_cast(_extends); + const auto _index = static_cast(index); + GetImpl()->TSInterfaceDeclarationSetValueExtends(_context, _receiver, __extends, _index); return ; } -KOALA_INTEROP_V4(TSInterfaceDeclarationSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +KOALA_INTEROP_V4(TSInterfaceDeclarationSetValueExtends, KNativePointer, KNativePointer, KNativePointer, KUInt); -KNativePointer impl_CreateVariableDeclaration(KNativePointer context, KInt kind, KNativePointerArray declarators, KUInt declaratorsSequenceLength) +void impl_TSInterfaceDeclarationEmplaceDecorators(KNativePointer context, KNativePointer receiver, KNativePointer decorators) { const auto _context = reinterpret_cast(context); - const auto _kind = static_cast(kind); - const auto _declarators = reinterpret_cast(declarators); - const auto _declaratorsSequenceLength = static_cast(declaratorsSequenceLength); - auto result = GetImpl()->CreateVariableDeclaration(_context, _kind, _declarators, _declaratorsSequenceLength); - return result; + const auto _receiver = reinterpret_cast(receiver); + const auto _decorators = reinterpret_cast(decorators); + GetImpl()->TSInterfaceDeclarationEmplaceDecorators(_context, _receiver, _decorators); + return ; } -KOALA_INTEROP_4(CreateVariableDeclaration, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt); +KOALA_INTEROP_V3(TSInterfaceDeclarationEmplaceDecorators, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_UpdateVariableDeclaration(KNativePointer context, KNativePointer original, KInt kind, KNativePointerArray declarators, KUInt declaratorsSequenceLength) +void impl_TSInterfaceDeclarationClearDecorators(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); - const auto _original = reinterpret_cast(original); - const auto _kind = static_cast(kind); - const auto _declarators = reinterpret_cast(declarators); - const auto _declaratorsSequenceLength = static_cast(declaratorsSequenceLength); - auto result = GetImpl()->UpdateVariableDeclaration(_context, _original, _kind, _declarators, _declaratorsSequenceLength); - return result; + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSInterfaceDeclarationClearDecorators(_context, _receiver); + return ; } -KOALA_INTEROP_5(UpdateVariableDeclaration, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt); +KOALA_INTEROP_V2(TSInterfaceDeclarationClearDecorators, KNativePointer, KNativePointer); -KNativePointer impl_VariableDeclarationDeclaratorsConst(KNativePointer context, KNativePointer receiver) +void impl_TSInterfaceDeclarationSetValueDecorators(KNativePointer context, KNativePointer receiver, KNativePointer decorators, KUInt index) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - std::size_t length; - auto result = GetImpl()->VariableDeclarationDeclaratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + const auto _decorators = reinterpret_cast(decorators); + const auto _index = static_cast(index); + GetImpl()->TSInterfaceDeclarationSetValueDecorators(_context, _receiver, _decorators, _index); + return ; } -KOALA_INTEROP_2(VariableDeclarationDeclaratorsConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_V4(TSInterfaceDeclarationSetValueDecorators, KNativePointer, KNativePointer, KNativePointer, KUInt); -KInt impl_VariableDeclarationKindConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_TSInterfaceDeclarationDecorators(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - auto result = GetImpl()->VariableDeclarationKindConst(_context, _receiver); - return result; + std::size_t length; + auto result = GetImpl()->TSInterfaceDeclarationDecorators(_context, _receiver, &length); + return StageArena::cloneVector(result, length); } -KOALA_INTEROP_2(VariableDeclarationKindConst, KInt, KNativePointer, KNativePointer); +KOALA_INTEROP_2(TSInterfaceDeclarationDecorators, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_VariableDeclarationDecoratorsConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_TSInterfaceDeclarationDecoratorsForUpdate(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; - auto result = GetImpl()->VariableDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + auto result = GetImpl()->TSInterfaceDeclarationDecoratorsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); } -KOALA_INTEROP_2(VariableDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(TSInterfaceDeclarationDecoratorsForUpdate, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_VariableDeclarationGetDeclaratorByNameConst(KNativePointer context, KNativePointer receiver, KStringPtr& name) +void impl_TSInterfaceDeclarationEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _name = getStringCopy(name); - auto result = GetImpl()->VariableDeclarationGetDeclaratorByNameConst(_context, _receiver, _name); - return (void*)result; + const auto _source = reinterpret_cast(source); + GetImpl()->TSInterfaceDeclarationEmplaceAnnotations(_context, _receiver, _source); + return ; } -KOALA_INTEROP_3(VariableDeclarationGetDeclaratorByNameConst, KNativePointer, KNativePointer, KNativePointer, KStringPtr); +KOALA_INTEROP_V3(TSInterfaceDeclarationEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_VariableDeclarationAnnotations(KNativePointer context, KNativePointer receiver) +void impl_TSInterfaceDeclarationClearAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - std::size_t length; - auto result = GetImpl()->VariableDeclarationAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + GetImpl()->TSInterfaceDeclarationClearAnnotations(_context, _receiver); + return ; } -KOALA_INTEROP_2(VariableDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_V2(TSInterfaceDeclarationClearAnnotations, KNativePointer, KNativePointer); -KNativePointer impl_VariableDeclarationAnnotationsConst(KNativePointer context, KNativePointer receiver) +void impl_TSInterfaceDeclarationSetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - std::size_t length; - auto result = GetImpl()->VariableDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->TSInterfaceDeclarationSetValueAnnotations(_context, _receiver, _source, _index); + return ; } -KOALA_INTEROP_2(VariableDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_V4(TSInterfaceDeclarationSetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); -void impl_VariableDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotations, KUInt annotationsSequenceLength) +KNativePointer impl_TSInterfaceDeclarationAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _annotations = reinterpret_cast(annotations); - const auto _annotationsSequenceLength = static_cast(annotationsSequenceLength); - GetImpl()->VariableDeclarationSetAnnotations(_context, _receiver, _annotations, _annotationsSequenceLength); + std::size_t length; + auto result = GetImpl()->TSInterfaceDeclarationAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSInterfaceDeclarationAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceDeclarationAnnotations(_context, _receiver, &length); + return new std::vector(result, result + length); +} +KOALA_INTEROP_2(TSInterfaceDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceDeclarationAnnotationsConst(_context, _receiver, &length); + return (void*)new std::vector(result, result + length); +} +KOALA_INTEROP_2(TSInterfaceDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSInterfaceDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TSInterfaceDeclarationSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(TSInterfaceDeclarationSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_TSInterfaceDeclarationSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TSInterfaceDeclarationSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(TSInterfaceDeclarationSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_TSInterfaceDeclarationAddAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->TSInterfaceDeclarationAddAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(TSInterfaceDeclarationAddAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateVariableDeclaration(KNativePointer context, KInt kind, KNativePointerArray declarators, KUInt declaratorsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _kind = static_cast(kind); + const auto _declarators = reinterpret_cast(declarators); + const auto _declaratorsSequenceLength = static_cast(declaratorsSequenceLength); + auto result = GetImpl()->CreateVariableDeclaration(_context, _kind, _declarators, _declaratorsSequenceLength); + return result; +} +KOALA_INTEROP_4(CreateVariableDeclaration, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateVariableDeclaration(KNativePointer context, KNativePointer original, KInt kind, KNativePointerArray declarators, KUInt declaratorsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _kind = static_cast(kind); + const auto _declarators = reinterpret_cast(declarators); + const auto _declaratorsSequenceLength = static_cast(declaratorsSequenceLength); + auto result = GetImpl()->UpdateVariableDeclaration(_context, _original, _kind, _declarators, _declaratorsSequenceLength); + return result; +} +KOALA_INTEROP_5(UpdateVariableDeclaration, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt); + +KNativePointer impl_VariableDeclarationDeclaratorsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationDeclaratorsConst(_context, _receiver, &length); + return (void*)new std::vector(result, result + length); +} +KOALA_INTEROP_2(VariableDeclarationDeclaratorsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationDeclarators(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationDeclarators(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(VariableDeclarationDeclarators, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationDeclaratorsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationDeclaratorsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(VariableDeclarationDeclaratorsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_VariableDeclarationKindConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->VariableDeclarationKindConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(VariableDeclarationKindConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationDecoratorsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationDecoratorsConst(_context, _receiver, &length); + return (void*)new std::vector(result, result + length); +} +KOALA_INTEROP_2(VariableDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationDecorators(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationDecorators(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(VariableDeclarationDecorators, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationDecoratorsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationDecoratorsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(VariableDeclarationDecoratorsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationGetDeclaratorByNameConst(KNativePointer context, KNativePointer receiver, KStringPtr& name) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _name = getStringCopy(name); + auto result = GetImpl()->VariableDeclarationGetDeclaratorByNameConst(_context, _receiver, _name); + return (void*)result; +} +KOALA_INTEROP_3(VariableDeclarationGetDeclaratorByNameConst, KNativePointer, KNativePointer, KNativePointer, KStringPtr); + +void impl_VariableDeclarationEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->VariableDeclarationEmplaceAnnotations(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(VariableDeclarationEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); + +void impl_VariableDeclarationClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->VariableDeclarationClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(VariableDeclarationClearAnnotations, KNativePointer, KNativePointer); + +void impl_VariableDeclarationSetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->VariableDeclarationSetValueAnnotations(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(VariableDeclarationSetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_VariableDeclarationAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(VariableDeclarationAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationAnnotations(_context, _receiver, &length); + return new std::vector(result, result + length); +} +KOALA_INTEROP_2(VariableDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationAnnotationsConst(_context, _receiver, &length); + return (void*)new std::vector(result, result + length); +} +KOALA_INTEROP_2(VariableDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_VariableDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->VariableDeclarationSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); return ; } KOALA_INTEROP_V4(VariableDeclarationSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +void impl_VariableDeclarationSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->VariableDeclarationSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(VariableDeclarationSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_VariableDeclarationAddAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->VariableDeclarationAddAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(VariableDeclarationAddAnnotations, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateUndefinedLiteral(KNativePointer context) { const auto _context = reinterpret_cast(context); @@ -2669,6 +3203,17 @@ KNativePointer impl_ETSUnionTypeTypesConst(KNativePointer context, KNativePointe } KOALA_INTEROP_2(ETSUnionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); +void impl_ETSUnionTypeSetValueTypesConst(KNativePointer context, KNativePointer receiver, KNativePointer type, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _type = reinterpret_cast(type); + const auto _index = static_cast(index); + GetImpl()->ETSUnionTypeIrSetValueTypesConst(_context, _receiver, _type, _index); + return ; +} +KOALA_INTEROP_V4(ETSUnionTypeSetValueTypesConst, KNativePointer, KNativePointer, KNativePointer, KUInt); + KNativePointer impl_CreateETSKeyofType(KNativePointer context, KNativePointer type) { const auto _context = reinterpret_cast(context); @@ -2966,17 +3511,6 @@ void impl_TSTypeAliasDeclarationSetTypeParameters(KNativePointer context, KNativ } KOALA_INTEROP_V3(TSTypeAliasDeclarationSetTypeParameters, KNativePointer, KNativePointer, KNativePointer); -// no TSTypeAliasDeclarationAnnotations -//KNativePointer impl_TSTypeAliasDeclarationAnnotations(KNativePointer context, KNativePointer receiver) -//{ -// const auto _context = reinterpret_cast(context); -// const auto _receiver = reinterpret_cast(receiver); -// std::size_t length; -// auto result = GetImpl()->TSTypeAliasDeclarationAnnotations(_context, _receiver, &length); -// return StageArena::cloneVector(result, length); -//} -//KOALA_INTEROP_2(TSTypeAliasDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); - KNativePointer impl_TSTypeAliasDeclarationAnnotationsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -2998,6 +3532,95 @@ void impl_TSTypeAliasDeclarationSetAnnotations(KNativePointer context, KNativePo } KOALA_INTEROP_V4(TSTypeAliasDeclarationSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +void impl_TSTypeAliasDeclarationEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->TSTypeAliasDeclarationEmplaceAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(TSTypeAliasDeclarationEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSTypeAliasDeclarationClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TSTypeAliasDeclarationClearAnnotations, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationSetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + const auto _index = static_cast(index); + GetImpl()->TSTypeAliasDeclarationSetValueAnnotations(_context, _receiver, _annotations, _index); + return ; +} +KOALA_INTEROP_V4(TSTypeAliasDeclarationSetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_TSTypeAliasDeclarationAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTypeAliasDeclarationAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTypeAliasDeclarationAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationClearTypeParamterTypes(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSTypeAliasDeclarationClearTypeParamterTypes(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TSTypeAliasDeclarationClearTypeParamterTypes, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationEmplaceDecorators(KNativePointer context, KNativePointer receiver, KNativePointer decorators) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _decorators = reinterpret_cast(decorators); + GetImpl()->TSTypeAliasDeclarationEmplaceDecorators(_context, _receiver, _decorators); + return ; +} +KOALA_INTEROP_V3(TSTypeAliasDeclarationEmplaceDecorators, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationClearDecorators(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSTypeAliasDeclarationClearDecorators(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TSTypeAliasDeclarationClearDecorators, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationSetValueDecorators(KNativePointer context, KNativePointer receiver, KNativePointer decorators, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _decorators = reinterpret_cast(decorators); + const auto _index = static_cast(index); + GetImpl()->TSTypeAliasDeclarationSetValueDecorators(_context, _receiver, _decorators, _index); + return ; +} +KOALA_INTEROP_V4(TSTypeAliasDeclarationSetValueDecorators, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_TSTypeAliasDeclarationDecoratorsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTypeAliasDeclarationDecoratorsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTypeAliasDeclarationDecoratorsForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_TSTypeAliasDeclarationTypeAnnotationConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -3238,12 +3861,22 @@ KNativePointer impl_ScriptFunctionReturnStatements(KNativePointer context, KNati } KOALA_INTEROP_2(ScriptFunctionReturnStatements, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_ScriptFunctionTypeParamsConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_ScriptFunctionReturnStatementsForUpdate(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - auto result = GetImpl()->ScriptFunctionTypeParamsConst(_context, _receiver); - return (void*)result; + std::size_t length; + auto result = GetImpl()->ScriptFunctionReturnStatementsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ScriptFunctionReturnStatementsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionTypeParamsConst(_context, _receiver); + return (void*)result; } KOALA_INTEROP_2(ScriptFunctionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3538,6 +4171,15 @@ KBoolean impl_ScriptFunctionIsRethrowingConst(KNativePointer context, KNativePoi } KOALA_INTEROP_2(ScriptFunctionIsRethrowingConst, KBoolean, KNativePointer, KNativePointer); +KBoolean impl_ScriptFunctionIsTrailingLambdaConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsTrailingLambdaConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsTrailingLambdaConst, KBoolean, KNativePointer, KNativePointer); + KBoolean impl_ScriptFunctionIsDynamicConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -3604,17 +4246,6 @@ void impl_ScriptFunctionClearFlag(KNativePointer context, KNativePointer receive } KOALA_INTEROP_V3(ScriptFunctionClearFlag, KNativePointer, KNativePointer, KInt); -// no ScriptFunctionAddModifier -// void impl_ScriptFunctionAddModifier(KNativePointer context, KNativePointer receiver, KInt flags) -// { -// const auto _context = reinterpret_cast(context); -// const auto _receiver = reinterpret_cast(receiver); -// const auto _flags = static_cast(flags); -// GetImpl()->ScriptFunctionAddModifier(_context, _receiver, _flags); -// return ; -// } -// KOALA_INTEROP_V3(ScriptFunctionAddModifier, KNativePointer, KNativePointer, KInt); - KUInt impl_ScriptFunctionFormalParamsLengthConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -3643,6 +4274,116 @@ KNativePointer impl_ScriptFunctionGetIsolatedDeclgenReturnTypeConst(KNativePoint } KOALA_INTEROP_2(ScriptFunctionGetIsolatedDeclgenReturnTypeConst, KNativePointer, KNativePointer, KNativePointer); +void impl_ScriptFunctionEmplaceReturnStatements(KNativePointer context, KNativePointer receiver, KNativePointer returnStatements) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _returnStatements = reinterpret_cast(returnStatements); + GetImpl()->ScriptFunctionEmplaceReturnStatements(_context, _receiver, _returnStatements); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionEmplaceReturnStatements, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionClearReturnStatements(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ScriptFunctionClearReturnStatements(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ScriptFunctionClearReturnStatements, KNativePointer, KNativePointer); + +void impl_ScriptFunctionSetValueReturnStatements(KNativePointer context, KNativePointer receiver, KNativePointer returnStatements, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _returnStatements = reinterpret_cast(returnStatements); + const auto _index = static_cast(index); + GetImpl()->ScriptFunctionSetValueReturnStatements(_context, _receiver, _returnStatements, _index); + return ; +} +KOALA_INTEROP_V4(ScriptFunctionSetValueReturnStatements, KNativePointer, KNativePointer, KNativePointer, KUInt); + +void impl_ScriptFunctionEmplaceParams(KNativePointer context, KNativePointer receiver, KNativePointer params) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _params = reinterpret_cast(params); + GetImpl()->ScriptFunctionEmplaceParams(_context, _receiver, _params); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionEmplaceParams, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionClearParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ScriptFunctionClearParams(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ScriptFunctionClearParams, KNativePointer, KNativePointer); + +void impl_ScriptFunctionSetValueParams(KNativePointer context, KNativePointer receiver, KNativePointer params, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _params = reinterpret_cast(params); + const auto _index = static_cast(index); + GetImpl()->ScriptFunctionSetValueParams(_context, _receiver, _params, _index); + return ; +} +KOALA_INTEROP_V4(ScriptFunctionSetValueParams, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ScriptFunctionParamsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ScriptFunctionParamsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ScriptFunctionParamsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ScriptFunctionEmplaceAnnotations(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ScriptFunctionClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ScriptFunctionClearAnnotations, KNativePointer, KNativePointer); + +void impl_ScriptFunctionSetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->ScriptFunctionSetValueAnnotations(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(ScriptFunctionSetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ScriptFunctionAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ScriptFunctionAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ScriptFunctionAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_ScriptFunctionAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -3674,6 +4415,27 @@ void impl_ScriptFunctionSetAnnotations(KNativePointer context, KNativePointer re } KOALA_INTEROP_V4(ScriptFunctionSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +void impl_ScriptFunctionSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ScriptFunctionSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ScriptFunctionSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ScriptFunctionAddAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->ScriptFunctionAddAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionAddAnnotations, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateClassDefinition(KNativePointer context, KNativePointer ident, KNativePointer typeParams, KNativePointer superTypeParams, KNativePointerArray _implements, KUInt _implementsSequenceLength, KNativePointer ctor, KNativePointer superClass, KNativePointerArray body, KUInt bodySequenceLength, KInt modifiers, KInt flags) { const auto _context = reinterpret_cast(context); @@ -3800,16 +4562,6 @@ KNativePointer impl_ClassDefinitionInternalNameConst(KNativePointer context, KNa } KOALA_INTEROP_2(ClassDefinitionInternalNameConst, KNativePointer, KNativePointer, KNativePointer); -void impl_ClassDefinitionSetInternalName(KNativePointer context, KNativePointer receiver, KStringPtr& internalName) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - const auto _internalName = getStringCopy(internalName); - GetImpl()->ClassDefinitionSetInternalName(_context, _receiver, _internalName); - return ; -} -KOALA_INTEROP_V3(ClassDefinitionSetInternalName, KNativePointer, KNativePointer, KStringPtr); - KNativePointer impl_ClassDefinitionSuper(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -4027,16 +4779,6 @@ KInt impl_ClassDefinitionModifiersConst(KNativePointer context, KNativePointer r } KOALA_INTEROP_2(ClassDefinitionModifiersConst, KInt, KNativePointer, KNativePointer); -void impl_ClassDefinitionSetModifiers(KNativePointer context, KNativePointer receiver, KInt modifiers) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - const auto _modifiers = static_cast(modifiers); - GetImpl()->ClassDefinitionSetModifiers(_context, _receiver, _modifiers); - return ; -} -KOALA_INTEROP_V3(ClassDefinitionSetModifiers, KNativePointer, KNativePointer, KInt); - void impl_ClassDefinitionAddProperties(KNativePointer context, KNativePointer receiver, KNativePointerArray body, KUInt bodySequenceLength) { const auto _context = reinterpret_cast(context); @@ -4048,16 +4790,6 @@ void impl_ClassDefinitionAddProperties(KNativePointer context, KNativePointer re } KOALA_INTEROP_V4(ClassDefinitionAddProperties, KNativePointer, KNativePointer, KNativePointerArray, KUInt); -KNativePointer impl_ClassDefinitionBody(KNativePointer context, KNativePointer receiver) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - std::size_t length; - auto result = GetImpl()->ClassDefinitionBody(_context, _receiver, &length); - return new std::vector(result, result + length); -} -KOALA_INTEROP_2(ClassDefinitionBody, KNativePointer, KNativePointer, KNativePointer); - KNativePointer impl_ClassDefinitionBodyConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -4077,26 +4809,6 @@ KNativePointer impl_ClassDefinitionCtor(KNativePointer context, KNativePointer r } KOALA_INTEROP_2(ClassDefinitionCtor, KNativePointer, KNativePointer, KNativePointer); -void impl_ClassDefinitionSetCtor(KNativePointer context, KNativePointer receiver, KNativePointer ctor) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - const auto _ctor = reinterpret_cast(ctor); - GetImpl()->ClassDefinitionSetCtor(_context, _receiver, _ctor); - return ; -} -KOALA_INTEROP_V3(ClassDefinitionSetCtor, KNativePointer, KNativePointer, KNativePointer); - -KNativePointer impl_ClassDefinitionImplements(KNativePointer context, KNativePointer receiver) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - std::size_t length; - auto result = GetImpl()->ClassDefinitionImplements(_context, _receiver, &length); - return new std::vector(result, result + length); -} -KOALA_INTEROP_2(ClassDefinitionImplements, KNativePointer, KNativePointer, KNativePointer); - KNativePointer impl_ClassDefinitionImplementsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -4125,16 +4837,6 @@ KNativePointer impl_ClassDefinitionTypeParams(KNativePointer context, KNativePoi } KOALA_INTEROP_2(ClassDefinitionTypeParams, KNativePointer, KNativePointer, KNativePointer); -void impl_ClassDefinitionSetTypeParams(KNativePointer context, KNativePointer receiver, KNativePointer typeParams) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - const auto _typeParams = reinterpret_cast(typeParams); - GetImpl()->ClassDefinitionSetTypeParams(_context, _receiver, _typeParams); - return ; -} -KOALA_INTEROP_V3(ClassDefinitionSetTypeParams, KNativePointer, KNativePointer, KNativePointer); - KNativePointer impl_ClassDefinitionSuperTypeParamsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -4171,24 +4873,34 @@ KInt impl_ClassDefinitionLocalIndexConst(KNativePointer context, KNativePointer } KOALA_INTEROP_2(ClassDefinitionLocalIndexConst, KInt, KNativePointer, KNativePointer); -KNativePointer impl_ClassDefinitionLocalPrefixConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_ClassDefinitionFunctionalReferenceReferencedMethodConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - auto result = GetImpl()->ClassDefinitionLocalPrefixConst(_context, _receiver); - return new std::string(result); + auto result = GetImpl()->ClassDefinitionFunctionalReferenceReferencedMethodConst(_context, _receiver); + return (void*)result; } -KOALA_INTEROP_2(ClassDefinitionLocalPrefixConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ClassDefinitionFunctionalReferenceReferencedMethodConst, KNativePointer, KNativePointer, KNativePointer); + +// compile failed +// void impl_ClassDefinitionSetFunctionalReferenceReferencedMethod(KNativePointer context, KNativePointer receiver, KNativePointer functionalReferenceReferencedMethod) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// const auto _functionalReferenceReferencedMethod = reinterpret_cast(functionalReferenceReferencedMethod); +// GetImpl()->ClassDefinitionSetFunctionalReferenceReferencedMethod(_context, _receiver, _functionalReferenceReferencedMethod); +// return ; +// } +// KOALA_INTEROP_V3(ClassDefinitionSetFunctionalReferenceReferencedMethod, KNativePointer, KNativePointer, KNativePointer); -void impl_ClassDefinitionSetOrigEnumDecl(KNativePointer context, KNativePointer receiver, KNativePointer enumDecl) +KNativePointer impl_ClassDefinitionLocalPrefixConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _enumDecl = reinterpret_cast(enumDecl); - GetImpl()->ClassDefinitionSetOrigEnumDecl(_context, _receiver, _enumDecl); - return ; + auto result = GetImpl()->ClassDefinitionLocalPrefixConst(_context, _receiver); + return new std::string(result); } -KOALA_INTEROP_V3(ClassDefinitionSetOrigEnumDecl, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(ClassDefinitionLocalPrefixConst, KNativePointer, KNativePointer, KNativePointer); KNativePointer impl_ClassDefinitionOrigEnumDeclConst(KNativePointer context, KNativePointer receiver) { @@ -4208,16 +4920,6 @@ KNativePointer impl_ClassDefinitionGetAnonClass(KNativePointer context, KNativeP } KOALA_INTEROP_2(ClassDefinitionGetAnonClass, KNativePointer, KNativePointer, KNativePointer); -void impl_ClassDefinitionSetAnonClass(KNativePointer context, KNativePointer receiver, KNativePointer anonClass) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - const auto _anonClass = reinterpret_cast(anonClass); - GetImpl()->ClassDefinitionSetAnonClass(_context, _receiver, _anonClass); - return ; -} -KOALA_INTEROP_V3(ClassDefinitionSetAnonClass, KNativePointer, KNativePointer, KNativePointer); - KNativePointer impl_ClassDefinitionCtorConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -4274,92 +4976,313 @@ void impl_ClassDefinitionAddToExportedClasses(KNativePointer context, KNativePoi } KOALA_INTEROP_V3(ClassDefinitionAddToExportedClasses, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_ClassDefinitionAnnotations(KNativePointer context, KNativePointer receiver) +void impl_ClassDefinitionSetModifiers(KNativePointer context, KNativePointer receiver, KInt modifiers) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - std::size_t length; - auto result = GetImpl()->ClassDefinitionAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + const auto _modifiers = static_cast(modifiers); + GetImpl()->ClassDefinitionSetModifiers(_context, _receiver, _modifiers); + return ; } -KOALA_INTEROP_2(ClassDefinitionAnnotations, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_V3(ClassDefinitionSetModifiers, KNativePointer, KNativePointer, KInt); -KNativePointer impl_ClassDefinitionAnnotationsConst(KNativePointer context, KNativePointer receiver) +void impl_ClassDefinitionEmplaceBody(KNativePointer context, KNativePointer receiver, KNativePointer body) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - std::size_t length; - auto result = GetImpl()->ClassDefinitionAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + const auto _body = reinterpret_cast(body); + GetImpl()->ClassDefinitionEmplaceBody(_context, _receiver, _body); + return ; } -KOALA_INTEROP_2(ClassDefinitionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_V3(ClassDefinitionEmplaceBody, KNativePointer, KNativePointer, KNativePointer); -void impl_ClassDefinitionSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotations, KUInt annotationsSequenceLength) +void impl_ClassDefinitionClearBody(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _annotations = reinterpret_cast(annotations); - const auto _annotationsSequenceLength = static_cast(annotationsSequenceLength); - GetImpl()->ClassDefinitionSetAnnotations(_context, _receiver, _annotations, _annotationsSequenceLength); + GetImpl()->ClassDefinitionClearBody(_context, _receiver); return ; } -KOALA_INTEROP_V4(ClassDefinitionSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +KOALA_INTEROP_V2(ClassDefinitionClearBody, KNativePointer, KNativePointer); -KNativePointer impl_CreateArrayExpression(KNativePointer context, KNativePointerArray elements, KUInt elementsSequenceLength) +void impl_ClassDefinitionSetValueBody(KNativePointer context, KNativePointer receiver, KNativePointer body, KUInt index) { const auto _context = reinterpret_cast(context); - const auto _elements = reinterpret_cast(elements); - const auto _elementsSequenceLength = static_cast(elementsSequenceLength); - auto result = GetImpl()->CreateArrayExpression(_context, _elements, _elementsSequenceLength); - return result; + const auto _receiver = reinterpret_cast(receiver); + const auto _body = reinterpret_cast(body); + const auto _index = static_cast(index); + GetImpl()->ClassDefinitionSetValueBody(_context, _receiver, _body, _index); + return ; } -KOALA_INTEROP_3(CreateArrayExpression, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +KOALA_INTEROP_V4(ClassDefinitionSetValueBody, KNativePointer, KNativePointer, KNativePointer, KUInt); -KNativePointer impl_UpdateArrayExpression(KNativePointer context, KNativePointer original, KNativePointerArray elements, KUInt elementsSequenceLength) +KNativePointer impl_ClassDefinitionBody(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); - const auto _original = reinterpret_cast(original); - const auto _elements = reinterpret_cast(elements); - const auto _elementsSequenceLength = static_cast(elementsSequenceLength); - auto result = GetImpl()->UpdateArrayExpression(_context, _original, _elements, _elementsSequenceLength); - return result; + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionBody(_context, _receiver, &length); + return new std::vector(result, result + length); } -KOALA_INTEROP_4(UpdateArrayExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +KOALA_INTEROP_2(ClassDefinitionBody, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_CreateArrayExpression1(KNativePointer context, KInt nodeType, KNativePointerArray elements, KUInt elementsSequenceLength, KBoolean trailingComma) +KNativePointer impl_ClassDefinitionBodyForUpdate(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); - const auto _nodeType = static_cast(nodeType); - const auto _elements = reinterpret_cast(elements); - const auto _elementsSequenceLength = static_cast(elementsSequenceLength); - const auto _trailingComma = static_cast(trailingComma); - auto result = GetImpl()->CreateArrayExpression1(_context, _nodeType, _elements, _elementsSequenceLength, _trailingComma); - return result; + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionBodyForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); } -KOALA_INTEROP_5(CreateArrayExpression1, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KBoolean); +KOALA_INTEROP_2(ClassDefinitionBodyForUpdate, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_UpdateArrayExpression1(KNativePointer context, KNativePointer original, KInt nodeType, KNativePointerArray elements, KUInt elementsSequenceLength, KBoolean trailingComma) +void impl_ClassDefinitionEmplaceImplements(KNativePointer context, KNativePointer receiver, KNativePointer _implements) { const auto _context = reinterpret_cast(context); - const auto _original = reinterpret_cast(original); - const auto _nodeType = static_cast(nodeType); - const auto _elements = reinterpret_cast(elements); - const auto _elementsSequenceLength = static_cast(elementsSequenceLength); - const auto _trailingComma = static_cast(trailingComma); - auto result = GetImpl()->UpdateArrayExpression1(_context, _original, _nodeType, _elements, _elementsSequenceLength, _trailingComma); - return result; + const auto _receiver = reinterpret_cast(receiver); + const auto __implements = reinterpret_cast(_implements); + GetImpl()->ClassDefinitionEmplaceImplements(_context, _receiver, __implements); + return ; } -KOALA_INTEROP_6(UpdateArrayExpression1, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KBoolean); +KOALA_INTEROP_V3(ClassDefinitionEmplaceImplements, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_ArrayExpressionGetElementNodeAtIdxConst(KNativePointer context, KNativePointer receiver, KUInt idx) +void impl_ClassDefinitionClearImplements(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _idx = static_cast(idx); - auto result = GetImpl()->ArrayExpressionGetElementNodeAtIdxConst(_context, _receiver, _idx); - return (void*)result; + GetImpl()->ClassDefinitionClearImplements(_context, _receiver); + return ; } -KOALA_INTEROP_3(ArrayExpressionGetElementNodeAtIdxConst, KNativePointer, KNativePointer, KNativePointer, KUInt); +KOALA_INTEROP_V2(ClassDefinitionClearImplements, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetValueImplements(KNativePointer context, KNativePointer receiver, KNativePointer _implements, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto __implements = reinterpret_cast(_implements); + const auto _index = static_cast(index); + GetImpl()->ClassDefinitionSetValueImplements(_context, _receiver, __implements, _index); + return ; +} +KOALA_INTEROP_V4(ClassDefinitionSetValueImplements, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ClassDefinitionImplements(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionImplements(_context, _receiver, &length); + return new std::vector(result, result + length); +} +KOALA_INTEROP_2(ClassDefinitionImplements, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionImplementsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionImplementsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDefinitionImplementsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetCtor(KNativePointer context, KNativePointer receiver, KNativePointer ctor) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _ctor = reinterpret_cast(ctor); + GetImpl()->ClassDefinitionSetCtor(_context, _receiver, _ctor); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetCtor, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetTypeParams(KNativePointer context, KNativePointer receiver, KNativePointer typeParams) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeParams = reinterpret_cast(typeParams); + GetImpl()->ClassDefinitionSetTypeParams(_context, _receiver, _typeParams); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetTypeParams, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetOrigEnumDecl(KNativePointer context, KNativePointer receiver, KNativePointer origEnumDecl) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _origEnumDecl = reinterpret_cast(origEnumDecl); + GetImpl()->ClassDefinitionSetOrigEnumDecl(_context, _receiver, _origEnumDecl); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetOrigEnumDecl, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetAnonClass(KNativePointer context, KNativePointer receiver, KNativePointer anonClass) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _anonClass = reinterpret_cast(anonClass); + GetImpl()->ClassDefinitionSetAnonClass(_context, _receiver, _anonClass); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetAnonClass, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetInternalName(KNativePointer context, KNativePointer receiver, KStringPtr& internalName) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _internalName = getStringCopy(internalName); + GetImpl()->ClassDefinitionSetInternalName(_context, _receiver, _internalName); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetInternalName, KNativePointer, KNativePointer, KStringPtr); + +void impl_ClassDefinitionEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ClassDefinitionEmplaceAnnotations(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionClearAnnotations, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->ClassDefinitionSetValueAnnotations(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(ClassDefinitionSetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ClassDefinitionAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDefinitionAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionAnnotations(_context, _receiver, &length); + return new std::vector(result, result + length); +} +KOALA_INTEROP_2(ClassDefinitionAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionAnnotationsConst(_context, _receiver, &length); + return (void*)new std::vector(result, result + length); +} +KOALA_INTEROP_2(ClassDefinitionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ClassDefinitionSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ClassDefinitionSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ClassDefinitionSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ClassDefinitionSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ClassDefinitionSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ClassDefinitionAddAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->ClassDefinitionAddAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionAddAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateArrayExpression(KNativePointer context, KNativePointerArray elements, KUInt elementsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _elements = reinterpret_cast(elements); + const auto _elementsSequenceLength = static_cast(elementsSequenceLength); + auto result = GetImpl()->CreateArrayExpression(_context, _elements, _elementsSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateArrayExpression, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateArrayExpression(KNativePointer context, KNativePointer original, KNativePointerArray elements, KUInt elementsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _elements = reinterpret_cast(elements); + const auto _elementsSequenceLength = static_cast(elementsSequenceLength); + auto result = GetImpl()->UpdateArrayExpression(_context, _original, _elements, _elementsSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateArrayExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateArrayExpression1(KNativePointer context, KInt nodeType, KNativePointerArray elements, KUInt elementsSequenceLength, KBoolean trailingComma) +{ + const auto _context = reinterpret_cast(context); + const auto _nodeType = static_cast(nodeType); + const auto _elements = reinterpret_cast(elements); + const auto _elementsSequenceLength = static_cast(elementsSequenceLength); + const auto _trailingComma = static_cast(trailingComma); + auto result = GetImpl()->CreateArrayExpression1(_context, _nodeType, _elements, _elementsSequenceLength, _trailingComma); + return result; +} +KOALA_INTEROP_5(CreateArrayExpression1, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KBoolean); + +KNativePointer impl_UpdateArrayExpression1(KNativePointer context, KNativePointer original, KInt nodeType, KNativePointerArray elements, KUInt elementsSequenceLength, KBoolean trailingComma) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _nodeType = static_cast(nodeType); + const auto _elements = reinterpret_cast(elements); + const auto _elementsSequenceLength = static_cast(elementsSequenceLength); + const auto _trailingComma = static_cast(trailingComma); + auto result = GetImpl()->UpdateArrayExpression1(_context, _original, _nodeType, _elements, _elementsSequenceLength, _trailingComma); + return result; +} +KOALA_INTEROP_6(UpdateArrayExpression1, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KBoolean); + +KNativePointer impl_ArrayExpressionGetElementNodeAtIdxConst(KNativePointer context, KNativePointer receiver, KUInt idx) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _idx = static_cast(idx); + auto result = GetImpl()->ArrayExpressionGetElementNodeAtIdxConst(_context, _receiver, _idx); + return (void*)result; +} +KOALA_INTEROP_3(ArrayExpressionGetElementNodeAtIdxConst, KNativePointer, KNativePointer, KNativePointer, KUInt); KNativePointer impl_ArrayExpressionElementsConst(KNativePointer context, KNativePointer receiver) { @@ -5905,6 +6828,33 @@ KNativePointer impl_AstNodeShallowClone(KNativePointer context, KNativePointer r } KOALA_INTEROP_2(AstNodeShallowClone, KNativePointer, KNativePointer, KNativePointer); +KBoolean impl_AstNodeIsValidInCurrentPhaseConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsValidInCurrentPhaseConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsValidInCurrentPhaseConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeGetHistoryNodeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeGetHistoryNodeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeGetHistoryNodeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeGetOrCreateHistoryNodeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeGetOrCreateHistoryNodeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeGetOrCreateHistoryNodeConst, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateUnaryExpression(KNativePointer context, KNativePointer argument, KInt unaryOperator) { const auto _context = reinterpret_cast(context); @@ -5953,6 +6903,17 @@ KNativePointer impl_UnaryExpressionArgumentConst(KNativePointer context, KNative } KOALA_INTEROP_2(UnaryExpressionArgumentConst, KNativePointer, KNativePointer, KNativePointer); +// no UnaryExpressionSetArgument +// void impl_UnaryExpressionSetArgument(KNativePointer context, KNativePointer receiver, KNativePointer arg) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// const auto _arg = reinterpret_cast(arg); +// GetImpl()->UnaryExpressionSetArgument(_context, _receiver, _arg); +// return ; +// } +// KOALA_INTEROP_V3(UnaryExpressionSetArgument, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateForInStatement(KNativePointer context, KNativePointer left, KNativePointer right, KNativePointer body) { const auto _context = reinterpret_cast(context); @@ -6673,6 +7634,33 @@ void impl_ExpressionStatementSetExpression(KNativePointer context, KNativePointe } KOALA_INTEROP_V3(ExpressionStatementSetExpression, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_CreateETSModule(KNativePointer context, KNativePointerArray statementList, KUInt statementListSequenceLength, KNativePointer ident, KInt flag, KNativePointer program) +{ + const auto _context = reinterpret_cast(context); + const auto _statementList = reinterpret_cast(statementList); + const auto _statementListSequenceLength = static_cast(statementListSequenceLength); + const auto _ident = reinterpret_cast(ident); + const auto _flag = static_cast(flag); + const auto _program = reinterpret_cast(program); + auto result = GetImpl()->CreateETSModule(_context, _statementList, _statementListSequenceLength, _ident, _flag, _program); + return result; +} +KOALA_INTEROP_6(CreateETSModule, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KInt, KNativePointer); + +KNativePointer impl_UpdateETSModule(KNativePointer context, KNativePointer original, KNativePointerArray statementList, KUInt statementListSequenceLength, KNativePointer ident, KInt flag, KNativePointer program) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _statementList = reinterpret_cast(statementList); + const auto _statementListSequenceLength = static_cast(statementListSequenceLength); + const auto _ident = reinterpret_cast(ident); + const auto _flag = static_cast(flag); + const auto _program = reinterpret_cast(program); + auto result = GetImpl()->UpdateETSModule(_context, _original, _statementList, _statementListSequenceLength, _ident, _flag, _program); + return result; +} +KOALA_INTEROP_7(UpdateETSModule, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KInt, KNativePointer); + KNativePointer impl_ETSModuleIdent(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -6691,6 +7679,43 @@ KNativePointer impl_ETSModuleIdentConst(KNativePointer context, KNativePointer r } KOALA_INTEROP_2(ETSModuleIdentConst, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_ETSModuleProgram(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleProgram(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSModuleProgram, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSModuleGlobalClassConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleGlobalClassConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSModuleGlobalClassConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSModuleGlobalClass(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleGlobalClass(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSModuleGlobalClass, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSModuleSetGlobalClass(KNativePointer context, KNativePointer receiver, KNativePointer globalClass) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _globalClass = reinterpret_cast(globalClass); + GetImpl()->ETSModuleSetGlobalClass(_context, _receiver, _globalClass); + return ; +} +KOALA_INTEROP_V3(ETSModuleSetGlobalClass, KNativePointer, KNativePointer, KNativePointer); + KBoolean impl_ETSModuleIsETSScriptConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -6727,7 +7752,56 @@ void impl_ETSModuleSetNamespaceChainLastNode(KNativePointer context, KNativePoin } KOALA_INTEROP_V2(ETSModuleSetNamespaceChainLastNode, KNativePointer, KNativePointer); -KNativePointer impl_ETSModuleAnnotations(KNativePointer context, KNativePointer receiver) +KNativePointer impl_ETSModuleProgramConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleProgramConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSModuleProgramConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSModuleEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ETSModuleEmplaceAnnotations(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ETSModuleEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSModuleClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ETSModuleClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ETSModuleClearAnnotations, KNativePointer, KNativePointer); + +void impl_ETSModuleSetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->ETSModuleSetValueAnnotations(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(ETSModuleSetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ETSModuleAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSModuleAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSModuleAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSModuleAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); @@ -6747,17 +7821,38 @@ KNativePointer impl_ETSModuleAnnotationsConst(KNativePointer context, KNativePoi } KOALA_INTEROP_2(ETSModuleAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); -void impl_ETSModuleSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotations, KUInt annotationsSequenceLength) +void impl_ETSModuleSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _annotations = reinterpret_cast(annotations); - const auto _annotationsSequenceLength = static_cast(annotationsSequenceLength); - GetImpl()->ETSModuleSetAnnotations(_context, _receiver, _annotations, _annotationsSequenceLength); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ETSModuleSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); return ; } KOALA_INTEROP_V4(ETSModuleSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +void impl_ETSModuleSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ETSModuleSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ETSModuleSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ETSModuleAddAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->ETSModuleAddAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(ETSModuleAddAnnotations, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateMetaProperty(KNativePointer context, KInt kind) { const auto _context = reinterpret_cast(context); @@ -7257,6 +8352,46 @@ KNativePointer impl_UpdateImportDeclaration(KNativePointer context, KNativePoint } KOALA_INTEROP_6(UpdateImportDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt); +void impl_ImportDeclarationEmplaceSpecifiers(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ImportDeclarationEmplaceSpecifiers(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ImportDeclarationEmplaceSpecifiers, KNativePointer, KNativePointer, KNativePointer); + +void impl_ImportDeclarationClearSpecifiers(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ImportDeclarationClearSpecifiers(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ImportDeclarationClearSpecifiers, KNativePointer, KNativePointer); + +void impl_ImportDeclarationSetValueSpecifiers(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->ImportDeclarationSetValueSpecifiers(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(ImportDeclarationSetValueSpecifiers, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ImportDeclarationSpecifiersForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ImportDeclarationSpecifiersForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ImportDeclarationSpecifiersForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_ImportDeclarationSourceConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -7285,17 +8420,6 @@ KNativePointer impl_ImportDeclarationSpecifiersConst(KNativePointer context, KNa } KOALA_INTEROP_2(ImportDeclarationSpecifiersConst, KNativePointer, KNativePointer, KNativePointer); -// node ImportDeclarationSpecifiers -//KNativePointer impl_ImportDeclarationSpecifiers(KNativePointer context, KNativePointer receiver) -//{ -// const auto _context = reinterpret_cast(context); -// const auto _receiver = reinterpret_cast(receiver); -// std::size_t length; -// auto result = GetImpl()->ImportDeclarationSpecifiers(_context, _receiver, &length); -// return StageArena::cloneVector(result, length); -//} -//KOALA_INTEROP_2(ImportDeclarationSpecifiers, KNativePointer, KNativePointer, KNativePointer); - KBoolean impl_ImportDeclarationIsTypeKindConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -7333,6 +8457,27 @@ KNativePointer impl_TSParenthesizedTypeTypeConst(KNativePointer context, KNative } KOALA_INTEROP_2(TSParenthesizedTypeTypeConst, KNativePointer, KNativePointer, KNativePointer); +// no LiteralIsFoldedConst +// KBoolean impl_LiteralIsFoldedConst(KNativePointer context, KNativePointer receiver) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// auto result = GetImpl()->LiteralIsFoldedConst(_context, _receiver); +// return result; +// } +// KOALA_INTEROP_2(LiteralIsFoldedConst, KBoolean, KNativePointer, KNativePointer); + +// no LiteralSetFolded +// void impl_LiteralSetFolded(KNativePointer context, KNativePointer receiver, KBoolean folded) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// const auto _folded = static_cast(folded); +// GetImpl()->LiteralSetFolded(_context, _receiver, _folded); +// return ; +// } +// KOALA_INTEROP_V3(LiteralSetFolded, KNativePointer, KNativePointer, KBoolean); + KNativePointer impl_CreateCharLiteral(KNativePointer context) { const auto _context = reinterpret_cast(context); @@ -7444,15 +8589,15 @@ KBoolean impl_ETSImportDeclarationIsPureDynamicConst(KNativePointer context, KNa } KOALA_INTEROP_2(ETSImportDeclarationIsPureDynamicConst, KBoolean, KNativePointer, KNativePointer); -// no ETSImportDeclarationAssemblerName -//KNativePointer impl_ETSImportDeclarationAssemblerName(KNativePointer context, KNativePointer receiver) -//{ -// const auto _context = reinterpret_cast(context); -// const auto _receiver = reinterpret_cast(receiver); -// auto result = GetImpl()->ETSImportDeclarationAssemblerName(_context, _receiver); -// return StageArena::strdup(result); -//} -//KOALA_INTEROP_2(ETSImportDeclarationAssemblerName, KNativePointer, KNativePointer, KNativePointer); +void impl_ETSImportDeclarationSetAssemblerName(KNativePointer context, KNativePointer receiver, KStringPtr& assemblerName) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _assemblerName = getStringCopy(assemblerName); + GetImpl()->ETSImportDeclarationSetAssemblerName(_context, _receiver, _assemblerName); + return ; +} +KOALA_INTEROP_V3(ETSImportDeclarationSetAssemblerName, KNativePointer, KNativePointer, KStringPtr); KNativePointer impl_ETSImportDeclarationAssemblerNameConst(KNativePointer context, KNativePointer receiver) { @@ -7687,6 +8832,16 @@ KNativePointer impl_AnnotationDeclarationProperties(KNativePointer context, KNat } KOALA_INTEROP_2(AnnotationDeclarationProperties, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_AnnotationDeclarationPropertiesForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationDeclarationPropertiesForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AnnotationDeclarationPropertiesForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_AnnotationDeclarationPropertiesConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -7771,6 +8926,76 @@ KNativePointer impl_AnnotationDeclarationGetBaseNameConst(KNativePointer context } KOALA_INTEROP_2(AnnotationDeclarationGetBaseNameConst, KNativePointer, KNativePointer, KNativePointer); +void impl_AnnotationDeclarationEmplaceProperties(KNativePointer context, KNativePointer receiver, KNativePointer properties) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _properties = reinterpret_cast(properties); + GetImpl()->AnnotationDeclarationEmplaceProperties(_context, _receiver, _properties); + return ; +} +KOALA_INTEROP_V3(AnnotationDeclarationEmplaceProperties, KNativePointer, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationClearProperties(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AnnotationDeclarationClearProperties(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AnnotationDeclarationClearProperties, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationSetValueProperties(KNativePointer context, KNativePointer receiver, KNativePointer properties, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _properties = reinterpret_cast(properties); + const auto _index = static_cast(index); + GetImpl()->AnnotationDeclarationSetValueProperties(_context, _receiver, _properties, _index); + return ; +} +KOALA_INTEROP_V4(AnnotationDeclarationSetValueProperties, KNativePointer, KNativePointer, KNativePointer, KUInt); + +void impl_AnnotationDeclarationEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->AnnotationDeclarationEmplaceAnnotations(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(AnnotationDeclarationEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AnnotationDeclarationClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AnnotationDeclarationClearAnnotations, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationSetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->AnnotationDeclarationSetValueAnnotations(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(AnnotationDeclarationSetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_AnnotationDeclarationAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationDeclarationAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AnnotationDeclarationAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_AnnotationDeclarationAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -7791,17 +9016,38 @@ KNativePointer impl_AnnotationDeclarationAnnotationsConst(KNativePointer context } KOALA_INTEROP_2(AnnotationDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); -void impl_AnnotationDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotations, KUInt annotationsSequenceLength) +void impl_AnnotationDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _annotations = reinterpret_cast(annotations); - const auto _annotationsSequenceLength = static_cast(annotationsSequenceLength); - GetImpl()->AnnotationDeclarationSetAnnotations(_context, _receiver, _annotations, _annotationsSequenceLength); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->AnnotationDeclarationSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); return ; } KOALA_INTEROP_V4(AnnotationDeclarationSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +void impl_AnnotationDeclarationSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->AnnotationDeclarationSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(AnnotationDeclarationSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_AnnotationDeclarationAddAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->AnnotationDeclarationAddAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(AnnotationDeclarationAddAnnotations, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateAnnotationUsage(KNativePointer context, KNativePointer expr) { const auto _context = reinterpret_cast(context); @@ -7987,6 +9233,17 @@ KNativePointer impl_WhileStatementTest(KNativePointer context, KNativePointer re } KOALA_INTEROP_2(WhileStatementTest, KNativePointer, KNativePointer, KNativePointer); +// no WhileStatementSetTest +// void impl_WhileStatementSetTest(KNativePointer context, KNativePointer receiver, KNativePointer test) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// const auto _test = reinterpret_cast(test); +// GetImpl()->WhileStatementSetTest(_context, _receiver, _test); +// return ; +// } +// KOALA_INTEROP_V3(WhileStatementSetTest, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_WhileStatementBodyConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -8446,6 +9703,46 @@ void impl_TSTypeParameterSetDefaultType(KNativePointer context, KNativePointer r } KOALA_INTEROP_V3(TSTypeParameterSetDefaultType, KNativePointer, KNativePointer, KNativePointer); +void impl_TSTypeParameterEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->TSTypeParameterEmplaceAnnotations(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(TSTypeParameterEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeParameterClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSTypeParameterClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TSTypeParameterClearAnnotations, KNativePointer, KNativePointer); + +void impl_TSTypeParameterSetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->TSTypeParameterSetValueAnnotations(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(TSTypeParameterSetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_TSTypeParameterAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTypeParameterAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTypeParameterAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_TSTypeParameterAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -8466,17 +9763,38 @@ KNativePointer impl_TSTypeParameterAnnotationsConst(KNativePointer context, KNat } KOALA_INTEROP_2(TSTypeParameterAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); -void impl_TSTypeParameterSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotations, KUInt annotationsSequenceLength) +void impl_TSTypeParameterSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _annotations = reinterpret_cast(annotations); - const auto _annotationsSequenceLength = static_cast(annotationsSequenceLength); - GetImpl()->TSTypeParameterSetAnnotations(_context, _receiver, _annotations, _annotationsSequenceLength); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TSTypeParameterSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); return ; } KOALA_INTEROP_V4(TSTypeParameterSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +void impl_TSTypeParameterSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TSTypeParameterSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(TSTypeParameterSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_TSTypeParameterAddAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->TSTypeParameterAddAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(TSTypeParameterAddAnnotations, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateTSBooleanKeyword(KNativePointer context) { const auto _context = reinterpret_cast(context); @@ -8907,12 +10225,12 @@ KNativePointer impl_ETSParameterExpressionInitializer(KNativePointer context, KN } KOALA_INTEROP_2(ETSParameterExpressionInitializer, KNativePointer, KNativePointer, KNativePointer); -void impl_ETSParameterExpressionSetLexerSaved(KNativePointer context, KNativePointer receiver, KStringPtr& s) +void impl_ETSParameterExpressionSetLexerSaved(KNativePointer context, KNativePointer receiver, KStringPtr& savedLexer) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _s = getStringCopy(s); - GetImpl()->ETSParameterExpressionSetLexerSaved(_context, _receiver, _s); + const auto _savedLexer = getStringCopy(savedLexer); + GetImpl()->ETSParameterExpressionSetLexerSaved(_context, _receiver, _savedLexer); return ; } KOALA_INTEROP_V3(ETSParameterExpressionSetLexerSaved, KNativePointer, KNativePointer, KStringPtr); @@ -9001,16 +10319,56 @@ KUInt impl_ETSParameterExpressionGetRequiredParamsConst(KNativePointer context, } KOALA_INTEROP_2(ETSParameterExpressionGetRequiredParamsConst, KUInt, KNativePointer, KNativePointer); -void impl_ETSParameterExpressionSetRequiredParams(KNativePointer context, KNativePointer receiver, KUInt value) +void impl_ETSParameterExpressionSetRequiredParams(KNativePointer context, KNativePointer receiver, KUInt extraValue) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _value = static_cast(value); - GetImpl()->ETSParameterExpressionSetRequiredParams(_context, _receiver, _value); + const auto _extraValue = static_cast(extraValue); + GetImpl()->ETSParameterExpressionSetRequiredParams(_context, _receiver, _extraValue); return ; } KOALA_INTEROP_V3(ETSParameterExpressionSetRequiredParams, KNativePointer, KNativePointer, KUInt); +void impl_ETSParameterExpressionEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ETSParameterExpressionEmplaceAnnotations(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ETSParameterExpressionEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSParameterExpressionClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ETSParameterExpressionClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ETSParameterExpressionClearAnnotations, KNativePointer, KNativePointer); + +void impl_ETSParameterExpressionSetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->ETSParameterExpressionSetValueAnnotations(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(ETSParameterExpressionSetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ETSParameterExpressionAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSParameterExpressionAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSParameterExpressionAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_ETSParameterExpressionAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -9031,17 +10389,38 @@ KNativePointer impl_ETSParameterExpressionAnnotationsConst(KNativePointer contex } KOALA_INTEROP_2(ETSParameterExpressionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); -void impl_ETSParameterExpressionSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotations, KUInt annotationsSequenceLength) +void impl_ETSParameterExpressionSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _annotations = reinterpret_cast(annotations); - const auto _annotationsSequenceLength = static_cast(annotationsSequenceLength); - GetImpl()->ETSParameterExpressionSetAnnotations(_context, _receiver, _annotations, _annotationsSequenceLength); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ETSParameterExpressionSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); return ; } KOALA_INTEROP_V4(ETSParameterExpressionSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +void impl_ETSParameterExpressionSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ETSParameterExpressionSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ETSParameterExpressionSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ETSParameterExpressionAddAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->ETSParameterExpressionAddAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(ETSParameterExpressionAddAnnotations, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateTSTypeParameterInstantiation(KNativePointer context, KNativePointerArray params, KUInt paramsSequenceLength) { const auto _context = reinterpret_cast(context); @@ -9750,6 +11129,17 @@ void impl_IdentifierSetName(KNativePointer context, KNativePointer receiver, KSt } KOALA_INTEROP_V3(IdentifierSetName, KNativePointer, KNativePointer, KStringPtr); +void impl_IdentifierSetValueDecorators(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->IdentifierSetValueDecorators(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(IdentifierSetValueDecorators, KNativePointer, KNativePointer, KNativePointer, KUInt); + KNativePointer impl_IdentifierDecoratorsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -10009,25 +11399,25 @@ KNativePointer impl_UpdateBlockStatement(KNativePointer context, KNativePointer } KOALA_INTEROP_4(UpdateBlockStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); -KNativePointer impl_BlockStatementStatementsConst(KNativePointer context, KNativePointer receiver) +KNativePointer impl_BlockStatementStatements(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; - auto result = GetImpl()->BlockStatementStatementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + auto result = GetImpl()->BlockStatementStatements(_context, _receiver, &length); + return new std::vector(result, result + length); } -KOALA_INTEROP_2(BlockStatementStatementsConst, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(BlockStatementStatements, KNativePointer, KNativePointer, KNativePointer); -KNativePointer impl_BlockStatementStatements(KNativePointer context, KNativePointer receiver) +KNativePointer impl_BlockStatementStatementsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); std::size_t length; - auto result = GetImpl()->BlockStatementStatements(_context, _receiver, &length); - return new std::vector(result, result + length); + auto result = GetImpl()->BlockStatementStatementsConst(_context, _receiver, &length); + return (void*)new std::vector(result, result + length); } -KOALA_INTEROP_2(BlockStatementStatements, KNativePointer, KNativePointer, KNativePointer); +KOALA_INTEROP_2(BlockStatementStatementsConst, KNativePointer, KNativePointer, KNativePointer); void impl_BlockStatementSetStatements(KNativePointer context, KNativePointer receiver, KNativePointerArray statementList, KUInt statementListSequenceLength) { @@ -10040,26 +11430,46 @@ void impl_BlockStatementSetStatements(KNativePointer context, KNativePointer rec } KOALA_INTEROP_V4(BlockStatementSetStatements, KNativePointer, KNativePointer, KNativePointerArray, KUInt); -void impl_BlockStatementAddStatement(KNativePointer context, KNativePointer receiver, KNativePointer stmt) +void impl_BlockStatementAddStatements(KNativePointer context, KNativePointer receiver, KNativePointerArray statementList, KUInt statementListSequenceLength) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _stmt = reinterpret_cast(stmt); - GetImpl()->BlockStatementAddStatement(_context, _receiver, _stmt); + const auto _statementList = reinterpret_cast(statementList); + const auto _statementListSequenceLength = static_cast(statementListSequenceLength); + GetImpl()->BlockStatementAddStatements(_context, _receiver, _statementList, _statementListSequenceLength); + return ; +} +KOALA_INTEROP_V4(BlockStatementAddStatements, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_BlockStatementClearStatements(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->BlockStatementClearStatements(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(BlockStatementClearStatements, KNativePointer, KNativePointer); + +void impl_BlockStatementAddStatement(KNativePointer context, KNativePointer receiver, KNativePointer statement) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _statement = reinterpret_cast(statement); + GetImpl()->BlockStatementAddStatement(_context, _receiver, _statement); return ; } KOALA_INTEROP_V3(BlockStatementAddStatement, KNativePointer, KNativePointer, KNativePointer); -void impl_BlockStatementAddStatements(KNativePointer context, KNativePointer receiver, KNativePointerArray stmts, KUInt stmtsSequenceLength) +void impl_BlockStatementAddStatement1(KNativePointer context, KNativePointer receiver, KUInt idx, KNativePointer statement) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _stmts = reinterpret_cast(stmts); - const auto _stmtsSequenceLength = static_cast(stmtsSequenceLength); - GetImpl()->BlockStatementAddStatements(_context, _receiver, _stmts, _stmtsSequenceLength); + const auto _idx = static_cast(idx); + const auto _statement = reinterpret_cast(statement); + GetImpl()->BlockStatementAddStatement1(_context, _receiver, _idx, _statement); return ; } -KOALA_INTEROP_V4(BlockStatementAddStatements, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +KOALA_INTEROP_V4(BlockStatementAddStatement1, KNativePointer, KNativePointer, KUInt, KNativePointer); void impl_BlockStatementAddTrailingBlock(KNativePointer context, KNativePointer receiver, KNativePointer stmt, KNativePointer trailingBlock) { @@ -10072,6 +11482,16 @@ void impl_BlockStatementAddTrailingBlock(KNativePointer context, KNativePointer } KOALA_INTEROP_V4(BlockStatementAddTrailingBlock, KNativePointer, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_BlockStatementSearchStatementInTrailingBlock(KNativePointer context, KNativePointer receiver, KNativePointer item) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _item = reinterpret_cast(item); + auto result = GetImpl()->BlockStatementSearchStatementInTrailingBlock(_context, _receiver, _item); + return result; +} +KOALA_INTEROP_3(BlockStatementSearchStatementInTrailingBlock, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateDirectEvalExpression(KNativePointer context, KNativePointer callee, KNativePointerArray _arguments, KUInt _argumentsSequenceLength, KNativePointer typeParams, KBoolean optional_arg, KUInt parserStatus) { const auto _context = reinterpret_cast(context); @@ -10144,6 +11564,17 @@ void impl_TSTypeParameterDeclarationAddParam(KNativePointer context, KNativePoin } KOALA_INTEROP_V3(TSTypeParameterDeclarationAddParam, KNativePointer, KNativePointer, KNativePointer); +void impl_TSTypeParameterDeclarationSetValueParams(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->TSTypeParameterDeclarationSetValueParams(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(TSTypeParameterDeclarationSetValueParams, KNativePointer, KNativePointer, KNativePointer, KUInt); + KUInt impl_TSTypeParameterDeclarationRequiredParamsConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -10310,15 +11741,6 @@ void impl_MethodDefinitionSetOverloads(KNativePointer context, KNativePointer re } KOALA_INTEROP_V4(MethodDefinitionSetOverloads, KNativePointer, KNativePointer, KNativePointerArray, KUInt); -void impl_MethodDefinitionClearOverloads(KNativePointer context, KNativePointer receiver) -{ - const auto _context = reinterpret_cast(context); - const auto _receiver = reinterpret_cast(receiver); - GetImpl()->MethodDefinitionClearOverloads(_context, _receiver); - return ; -} -KOALA_INTEROP_V2(MethodDefinitionClearOverloads, KNativePointer, KNativePointer); - void impl_MethodDefinitionAddOverload(KNativePointer context, KNativePointer receiver, KNativePointer overload) { const auto _context = reinterpret_cast(context); @@ -10339,12 +11761,12 @@ void impl_MethodDefinitionSetBaseOverloadMethod(KNativePointer context, KNativeP } KOALA_INTEROP_V3(MethodDefinitionSetBaseOverloadMethod, KNativePointer, KNativePointer, KNativePointer); -void impl_MethodDefinitionSetAsyncPairMethod(KNativePointer context, KNativePointer receiver, KNativePointer method) +void impl_MethodDefinitionSetAsyncPairMethod(KNativePointer context, KNativePointer receiver, KNativePointer asyncPairMethod) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _method = reinterpret_cast(method); - GetImpl()->MethodDefinitionSetAsyncPairMethod(_context, _receiver, _method); + const auto _asyncPairMethod = reinterpret_cast(asyncPairMethod); + GetImpl()->MethodDefinitionSetAsyncPairMethod(_context, _receiver, _asyncPairMethod); return ; } KOALA_INTEROP_V3(MethodDefinitionSetAsyncPairMethod, KNativePointer, KNativePointer, KNativePointer); @@ -10385,6 +11807,35 @@ void impl_MethodDefinitionInitializeOverloadInfo(KNativePointer context, KNative return ; } KOALA_INTEROP_V2(MethodDefinitionInitializeOverloadInfo, KNativePointer, KNativePointer); +void impl_MethodDefinitionEmplaceOverloads(KNativePointer context, KNativePointer receiver, KNativePointer overloads) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _overloads = reinterpret_cast(overloads); + GetImpl()->MethodDefinitionEmplaceOverloads(_context, _receiver, _overloads); + return ; +} +KOALA_INTEROP_V3(MethodDefinitionEmplaceOverloads, KNativePointer, KNativePointer, KNativePointer); + +void impl_MethodDefinitionClearOverloads(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->MethodDefinitionClearOverloads(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(MethodDefinitionClearOverloads, KNativePointer, KNativePointer); + +void impl_MethodDefinitionSetValueOverloads(KNativePointer context, KNativePointer receiver, KNativePointer overloads, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _overloads = reinterpret_cast(overloads); + const auto _index = static_cast(index); + GetImpl()->MethodDefinitionSetValueOverloads(_context, _receiver, _overloads, _index); + return ; +} +KOALA_INTEROP_V4(MethodDefinitionSetValueOverloads, KNativePointer, KNativePointer, KNativePointer, KUInt); KNativePointer impl_CreateTSNullKeyword(KNativePointer context) { @@ -11033,6 +12484,66 @@ KNativePointer impl_ClassDeclarationDecoratorsConst(KNativePointer context, KNat } KOALA_INTEROP_2(ClassDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); +void impl_ClassDeclarationEmplaceDecorators(KNativePointer context, KNativePointer receiver, KNativePointer decorators) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _decorators = reinterpret_cast(decorators); + GetImpl()->ClassDeclarationEmplaceDecorators(_context, _receiver, _decorators); + return ; +} +KOALA_INTEROP_V3(ClassDeclarationEmplaceDecorators, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDeclarationClearDecorators(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDeclarationClearDecorators(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDeclarationClearDecorators, KNativePointer, KNativePointer); + +void impl_ClassDeclarationSetValueDecorators(KNativePointer context, KNativePointer receiver, KNativePointer decorators, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _decorators = reinterpret_cast(decorators); + const auto _index = static_cast(index); + GetImpl()->ClassDeclarationSetValueDecorators(_context, _receiver, _decorators, _index); + return ; +} +KOALA_INTEROP_V4(ClassDeclarationSetValueDecorators, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ClassDeclarationDecorators(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDeclarationDecorators(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDeclarationDecorators, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDeclarationDecoratorsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDeclarationDecoratorsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDeclarationDecoratorsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDeclarationSetDefinition(KNativePointer context, KNativePointer receiver, KNativePointer def) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _def = reinterpret_cast(def); + GetImpl()->ClassDeclarationSetDefinition(_context, _receiver, _def); + return ; +} +KOALA_INTEROP_V3(ClassDeclarationSetDefinition, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateTSIndexedAccessType(KNativePointer context, KNativePointer objectType, KNativePointer indexType) { const auto _context = reinterpret_cast(context); @@ -11996,6 +13507,46 @@ KNativePointer impl_ArrowFunctionExpressionCreateTypeAnnotation(KNativePointer c } KOALA_INTEROP_2(ArrowFunctionExpressionCreateTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); +void impl_ArrowFunctionExpressionEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ArrowFunctionExpressionEmplaceAnnotations(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ArrowFunctionExpressionEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); + +void impl_ArrowFunctionExpressionClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ArrowFunctionExpressionClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ArrowFunctionExpressionClearAnnotations, KNativePointer, KNativePointer); + +void impl_ArrowFunctionExpressionSetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->ArrowFunctionExpressionSetValueAnnotations(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(ArrowFunctionExpressionSetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ArrowFunctionExpressionAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ArrowFunctionExpressionAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ArrowFunctionExpressionAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_ArrowFunctionExpressionAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -12016,17 +13567,38 @@ KNativePointer impl_ArrowFunctionExpressionAnnotationsConst(KNativePointer conte } KOALA_INTEROP_2(ArrowFunctionExpressionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); -void impl_ArrowFunctionExpressionSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotations, KUInt annotationsSequenceLength) +void impl_ArrowFunctionExpressionSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) { const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); - const auto _annotations = reinterpret_cast(annotations); - const auto _annotationsSequenceLength = static_cast(annotationsSequenceLength); - GetImpl()->ArrowFunctionExpressionSetAnnotations(_context, _receiver, _annotations, _annotationsSequenceLength); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ArrowFunctionExpressionSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); return ; } KOALA_INTEROP_V4(ArrowFunctionExpressionSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +void impl_ArrowFunctionExpressionSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ArrowFunctionExpressionSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ArrowFunctionExpressionSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ArrowFunctionExpressionAddAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->ArrowFunctionExpressionAddAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(ArrowFunctionExpressionAddAnnotations, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateOmittedExpression(KNativePointer context) { const auto _context = reinterpret_cast(context); @@ -12378,6 +13950,15 @@ KNativePointer impl_ETSTypeReferencePartTypeParams(KNativePointer context, KNati } KOALA_INTEROP_2(ETSTypeReferencePartTypeParams, KNativePointer, KNativePointer, KNativePointer); +KNativePointer impl_ETSTypeReferencePartTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTypeReferencePartTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSTypeReferencePartTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_ETSTypeReferencePartNameConst(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -12451,6 +14032,46 @@ KInt impl_ETSPrimitiveTypeGetPrimitiveTypeConst(KNativePointer context, KNativeP } KOALA_INTEROP_2(ETSPrimitiveTypeGetPrimitiveTypeConst, KInt, KNativePointer, KNativePointer); +void impl_TypeNodeEmplaceAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->TypeNodeEmplaceAnnotations(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(TypeNodeEmplaceAnnotations, KNativePointer, KNativePointer, KNativePointer); + +void impl_TypeNodeClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TypeNodeClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TypeNodeClearAnnotations, KNativePointer, KNativePointer); + +void impl_TypeNodeSetValueAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->TypeNodeSetValueAnnotations(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(TypeNodeSetValueAnnotations, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_TypeNodeAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TypeNodeAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TypeNodeAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_TypeNodeAnnotations(KNativePointer context, KNativePointer receiver) { const auto _context = reinterpret_cast(context); @@ -12482,6 +14103,27 @@ void impl_TypeNodeSetAnnotations(KNativePointer context, KNativePointer receiver } KOALA_INTEROP_V4(TypeNodeSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); +void impl_TypeNodeSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TypeNodeSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(TypeNodeSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_TypeNodeAddAnnotations(KNativePointer context, KNativePointer receiver, KNativePointer annotations) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotations = reinterpret_cast(annotations); + GetImpl()->TypeNodeAddAnnotations(_context, _receiver, _annotations); + return ; +} +KOALA_INTEROP_V3(TypeNodeAddAnnotations, KNativePointer, KNativePointer, KNativePointer); + KNativePointer impl_CreateNewExpression(KNativePointer context, KNativePointer callee, KNativePointerArray _arguments, KUInt _argumentsSequenceLength) { const auto _context = reinterpret_cast(context); @@ -12681,3 +14323,473 @@ KNativePointer impl_CreateFunctionDecl(KNativePointer context, KStringPtr& name, } KOALA_INTEROP_3(CreateFunctionDecl, KNativePointer, KNativePointer, KStringPtr, KNativePointer); +void impl_ProgramSetKind(KNativePointer context, KNativePointer receiver, KInt kind) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _kind = static_cast(kind); + GetImpl()->ProgramSetKind(_context, _receiver, _kind); + return ; +} +KOALA_INTEROP_V3(ProgramSetKind, KNativePointer, KNativePointer, KInt); + +void impl_ProgramPushVarBinder(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ProgramPushVarBinder(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ProgramPushVarBinder, KNativePointer, KNativePointer); + +void impl_ProgramPushChecker(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ProgramPushChecker(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ProgramPushChecker, KNativePointer, KNativePointer); + +KInt impl_ProgramKindConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramKindConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramKindConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramSourceCodeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramSourceCodeConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramSourceCodeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramSourceFilePathConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramSourceFilePathConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramSourceFilePathConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramSourceFileFolderConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramSourceFileFolderConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramSourceFileFolderConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramFileNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramFileNameConst(_context, _receiver); + return new std::string(result); +} +KOALA_INTEROP_2(ProgramFileNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramFileNameWithExtensionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramFileNameWithExtensionConst(_context, _receiver); + return new std::string(result); +} +KOALA_INTEROP_2(ProgramFileNameWithExtensionConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramAbsoluteNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramAbsoluteNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramAbsoluteNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramResolvedFilePathConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramResolvedFilePathConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramResolvedFilePathConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramRelativeFilePathConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramRelativeFilePathConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramRelativeFilePathConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramSetRelativeFilePath(KNativePointer context, KNativePointer receiver, KStringPtr& relPath) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _relPath = getStringCopy(relPath); + GetImpl()->ProgramSetRelativeFilePath(_context, _receiver, _relPath); + return ; +} +KOALA_INTEROP_V3(ProgramSetRelativeFilePath, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_ProgramAst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramAst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramAst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramAstConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramAstConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ProgramAstConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramSetAst(KNativePointer context, KNativePointer receiver, KNativePointer ast) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _ast = reinterpret_cast(ast); + GetImpl()->ProgramSetAst(_context, _receiver, _ast); + return ; +} +KOALA_INTEROP_V3(ProgramSetAst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramGlobalClass(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramGlobalClass(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramGlobalClass, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramGlobalClassConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramGlobalClassConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ProgramGlobalClassConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramSetGlobalClass(KNativePointer context, KNativePointer receiver, KNativePointer globalClass) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _globalClass = reinterpret_cast(globalClass); + GetImpl()->ProgramSetGlobalClass(_context, _receiver, _globalClass); + return ; +} +KOALA_INTEROP_V3(ProgramSetGlobalClass, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramPackageStartConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramPackageStartConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ProgramPackageStartConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramSetPackageStart(KNativePointer context, KNativePointer receiver, KNativePointer start) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _start = reinterpret_cast(start); + GetImpl()->ProgramSetPackageStart(_context, _receiver, _start); + return ; +} +KOALA_INTEROP_V3(ProgramSetPackageStart, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramSetSource(KNativePointer context, KNativePointer receiver, KStringPtr& sourceCode, KStringPtr& sourceFilePath, KStringPtr& sourceFileFolder) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _sourceCode = getStringCopy(sourceCode); + const auto _sourceFilePath = getStringCopy(sourceFilePath); + const auto _sourceFileFolder = getStringCopy(sourceFileFolder); + GetImpl()->ProgramSetSource(_context, _receiver, _sourceCode, _sourceFilePath, _sourceFileFolder); + return ; +} +KOALA_INTEROP_V5(ProgramSetSource, KNativePointer, KNativePointer, KStringPtr, KStringPtr, KStringPtr); + +void impl_ProgramSetPackageInfo(KNativePointer context, KNativePointer receiver, KStringPtr& name, KInt kind) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _name = getStringCopy(name); + const auto _kind = static_cast(kind); + GetImpl()->ProgramSetPackageInfo(_context, _receiver, _name, _kind); + return ; +} +KOALA_INTEROP_V4(ProgramSetPackageInfo, KNativePointer, KNativePointer, KStringPtr, KInt); + +KNativePointer impl_ProgramModuleNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramModuleNameConst(_context, _receiver); + return new std::string(result); +} +KOALA_INTEROP_2(ProgramModuleNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramModulePrefixConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramModulePrefixConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramModulePrefixConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsSeparateModuleConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsSeparateModuleConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsSeparateModuleConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsDeclarationModuleConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsDeclarationModuleConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsDeclarationModuleConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsPackageConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsPackageConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsPackageConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ProgramSetFlag(KNativePointer context, KNativePointer receiver, KInt flag) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _flag = static_cast(flag); + GetImpl()->ProgramSetFlag(_context, _receiver, _flag); + return ; +} +KOALA_INTEROP_V3(ProgramSetFlag, KNativePointer, KNativePointer, KInt); + +KBoolean impl_ProgramGetFlagConst(KNativePointer context, KNativePointer receiver, KInt flag) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _flag = static_cast(flag); + auto result = GetImpl()->ProgramGetFlagConst(_context, _receiver, _flag); + return result; +} +KOALA_INTEROP_3(ProgramGetFlagConst, KBoolean, KNativePointer, KNativePointer, KInt); + +void impl_ProgramSetASTChecked(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ProgramSetASTChecked(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ProgramSetASTChecked, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsASTChecked(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsASTChecked(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsASTChecked, KBoolean, KNativePointer, KNativePointer); + +void impl_ProgramMarkASTAsLowered(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ProgramMarkASTAsLowered(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ProgramMarkASTAsLowered, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsASTLoweredConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsASTLoweredConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsASTLoweredConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsStdLibConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsStdLibConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsStdLibConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramDumpConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramDumpConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramDumpConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramDumpSilentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ProgramDumpSilentConst(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ProgramDumpSilentConst, KNativePointer, KNativePointer); + +void impl_ProgramAddDeclGenExportNode(KNativePointer context, KNativePointer receiver, KStringPtr& declGenExportStr, KNativePointer node) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _declGenExportStr = getStringCopy(declGenExportStr); + const auto _node = reinterpret_cast(node); + GetImpl()->ProgramAddDeclGenExportNode(_context, _receiver, _declGenExportStr, _node); + return ; +} +KOALA_INTEROP_V4(ProgramAddDeclGenExportNode, KNativePointer, KNativePointer, KStringPtr, KNativePointer); + +KBoolean impl_ProgramIsDiedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsDiedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsDiedConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ProgramAddFileDependencies(KNativePointer context, KNativePointer receiver, KStringPtr& file, KStringPtr& depFile) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _file = getStringCopy(file); + const auto _depFile = getStringCopy(depFile); + GetImpl()->ProgramAddFileDependencies(_context, _receiver, _file, _depFile); + return ; +} +KOALA_INTEROP_V4(ProgramAddFileDependencies, KNativePointer, KNativePointer, KStringPtr, KStringPtr); + +// no CreateArkTsConfig +// KNativePointer impl_CreateArkTsConfig(KNativePointer context, KStringPtr& configPath, KNativePointer de) +// { +// const auto _context = reinterpret_cast(context); +// const auto _configPath = getStringCopy(configPath); +// const auto _de = reinterpret_cast(de); +// auto result = GetImpl()->CreateArkTsConfig(_context, _configPath, _de); +// return result; +// } +// KOALA_INTEROP_3(CreateArkTsConfig, KNativePointer, KNativePointer, KStringPtr, KNativePointer); + +// no ArkTsConfigResolveAllDependenciesInArkTsConfig +// void impl_ArkTsConfigResolveAllDependenciesInArkTsConfig(KNativePointer context, KNativePointer receiver) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// GetImpl()->ArkTsConfigResolveAllDependenciesInArkTsConfig(_context, _receiver); +// return ; +// } +// KOALA_INTEROP_V2(ArkTsConfigResolveAllDependenciesInArkTsConfig, KNativePointer, KNativePointer); + +// no ArkTsConfigConfigPathConst +// KNativePointer impl_ArkTsConfigConfigPathConst(KNativePointer context, KNativePointer receiver) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// auto result = GetImpl()->ArkTsConfigConfigPathConst(_context, _receiver); +// return StageArena::strdup(result); +// } +// KOALA_INTEROP_2(ArkTsConfigConfigPathConst, KNativePointer, KNativePointer, KNativePointer); + +// KNativePointer impl_ArkTsConfigPackageConst(KNativePointer context, KNativePointer receiver) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// auto result = GetImpl()->ArkTsConfigPackageConst(_context, _receiver); +// return StageArena::strdup(result); +// } +// KOALA_INTEROP_2(ArkTsConfigPackageConst, KNativePointer, KNativePointer, KNativePointer); + +// KNativePointer impl_ArkTsConfigBaseUrlConst(KNativePointer context, KNativePointer receiver) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// auto result = GetImpl()->ArkTsConfigBaseUrlConst(_context, _receiver); +// return StageArena::strdup(result); +// } +// KOALA_INTEROP_2(ArkTsConfigBaseUrlConst, KNativePointer, KNativePointer, KNativePointer); + +// KNativePointer impl_ArkTsConfigRootDirConst(KNativePointer context, KNativePointer receiver) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// auto result = GetImpl()->ArkTsConfigRootDirConst(_context, _receiver); +// return StageArena::strdup(result); +// } +// KOALA_INTEROP_2(ArkTsConfigRootDirConst, KNativePointer, KNativePointer, KNativePointer); + +// KNativePointer impl_ArkTsConfigOutDirConst(KNativePointer context, KNativePointer receiver) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// auto result = GetImpl()->ArkTsConfigOutDirConst(_context, _receiver); +// return StageArena::strdup(result); +// } +// KOALA_INTEROP_2(ArkTsConfigOutDirConst, KNativePointer, KNativePointer, KNativePointer); + +// void impl_ArkTsConfigResetDependencies(KNativePointer context, KNativePointer receiver) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// GetImpl()->ArkTsConfigResetDependencies(_context, _receiver); +// return ; +// } +// KOALA_INTEROP_V2(ArkTsConfigResetDependencies, KNativePointer, KNativePointer); + +// KNativePointer impl_ArkTsConfigEntryConst(KNativePointer context, KNativePointer receiver) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// auto result = GetImpl()->ArkTsConfigEntryConst(_context, _receiver); +// return StageArena::strdup(result); +// } +// KOALA_INTEROP_2(ArkTsConfigEntryConst, KNativePointer, KNativePointer, KNativePointer); + +// KBoolean impl_ArkTsConfigUseUrlConst(KNativePointer context, KNativePointer receiver) +// { +// const auto _context = reinterpret_cast(context); +// const auto _receiver = reinterpret_cast(receiver); +// auto result = GetImpl()->ArkTsConfigUseUrlConst(_context, _receiver); +// return result; +// } +// KOALA_INTEROP_2(ArkTsConfigUseUrlConst, KBoolean, KNativePointer, KNativePointer); + diff --git a/koala-wrapper/src/arkts-api/static/global.ts b/koala-wrapper/src/arkts-api/static/global.ts index 551b6c83f..9d0cee809 100644 --- a/koala-wrapper/src/arkts-api/static/global.ts +++ b/koala-wrapper/src/arkts-api/static/global.ts @@ -14,27 +14,26 @@ */ import { throwError } from "../../utils" -import { KNativePointer } from "@koalaui/interop" +import { KNativePointer, nullptr } from "@koalaui/interop" import { initEs2panda, Es2pandaNativeModule, initGeneratedEs2panda } from "../../Es2pandaNativeModule" import { Es2pandaNativeModule as GeneratedEs2pandaNativeModule } from "../../generated/Es2pandaNativeModule" import { initInterop, InteropNativeModule } from "../../InteropNativeModule" -import type { Context } from "../peers/Context" +import { Context } from "../peers/Context" export class global { - public static filePath: string = "./plugins/input/main.sts" + public static filePath: string = "./plugins/input/main.ets" + public static packageName: string = "" + public static filePathFromPackageRoot: string = global.filePath private static _config?: KNativePointer public static set config(config: KNativePointer) { - if (global._config !== undefined) { - throwError('Global.config already initialized') - } global._config = config } public static get config(): KNativePointer { return global._config ?? throwError('Global.config not initialized') } public static configIsInitialized(): boolean { - return global._config !== undefined + return global._config !== undefined && global._config !== nullptr } // TODO: rename to contextPeer -- Gitee From e7e9e695722b6a2cdb8c13fd60b8bc272e949136 Mon Sep 17 00:00:00 2001 From: Keerecles Date: Thu, 12 Jun 2025 23:23:42 +0800 Subject: [PATCH 08/17] addon Signed-off-by: Keerecles Change-Id: I2d5c44a017156f087ac957a3fe16e422c9dde58f --- koala-wrapper/src/Es2pandaNativeModule.ts | 269 ++++++++++++---------- 1 file changed, 144 insertions(+), 125 deletions(-) diff --git a/koala-wrapper/src/Es2pandaNativeModule.ts b/koala-wrapper/src/Es2pandaNativeModule.ts index 2fb20dcb2..5739a4966 100644 --- a/koala-wrapper/src/Es2pandaNativeModule.ts +++ b/koala-wrapper/src/Es2pandaNativeModule.ts @@ -21,108 +21,153 @@ import { registerNativeModuleLibraryName, loadNativeModuleLibrary, KDouble, + KUInt, KStringArrayPtr, } from '@koalaui/interop'; import { Es2pandaNativeModule as GeneratedEs2pandaNativeModule } from './generated/Es2pandaNativeModule'; -import * as path from 'path'; import { PluginDiagnosticType } from './arkts-api/peers/DiagnosticKind'; +import * as path from 'path'; +import * as fs from "fs" +import { Es2pandaPluginDiagnosticType } from "./generated/Es2pandaEnums" // TODO: this type should be in interop export type KPtrArray = BigUint64Array; export class Es2pandaNativeModule { - _ClassDefinitionSuper(context: KPtr, node: KPtr): KPtr { + _AnnotationAllowedAnnotations(context: KPtr, node: KPtr, returnLen: KPtr): KPtr { throw new Error('Not implemented'); } - _CreateTSInterfaceDeclaration( - _context: KPtr, - _extends: KPtrArray, - _extendsLen: KInt, - _id: KPtr, - _typeParams: KPtr, - _body: KPtr, - _isStatic: KBoolean, - _isExternal: KBoolean - ): KPtr { + _AstNodeRebind(context: KPtr, node: KPtr): void { throw new Error('Not implemented'); } - _CreateTSTypeParameterInstantiation(context: KPtr, params: KPtrArray, paramsLen: KInt): KPtr { + _AstNodeRecheck(context: KPtr, node: KPtr): void { throw new Error('Not implemented'); } - _ClassElementKey(context: KPtr, node: KPtr): KPtr { + _ContextState(context: KPtr): KInt { throw new Error('Not implemented'); } - _ClassElementValue(context: KPtr, node: KPtr): KPtr { + _ContextErrorMessage(context: KPtr): KPtr { throw new Error('Not implemented'); } - _AnnotationUsageExpr(context: KPtr, node: KPtr): KPtr { + _AstNodeChildren(context: KPtr, node: KPtr): KPtr { throw new Error('Not implemented'); } - _AnnotationUsagePropertiesConst(context: KPtr, node: KPtr, returnLen: KPtr): KPtr { + _AstNodeDumpModifiers(context: KPtr, node: KPtr): KPtr { throw new Error('Not implemented'); } - _AnnotationAllowedAnnotations(context: KPtr, node: KPtr, returnLen: KPtr): KPtr { + _CreateConfig(argc: number, argv: string[]): KPtr { throw new Error('Not implemented'); } - _AnnotationAllowedAnnotationsConst(context: KPtr, node: KPtr, returnLen: KPtr): KPtr { + _DestroyConfig(config: KNativePointer): void { throw new Error('Not implemented'); } - _AstNodeRebind(context: KPtr, node: KPtr): void { + _CreateContextFromString(config: KPtr, source: String, filename: String): KPtr { throw new Error('Not implemented'); } - _AstNodeRecheck(context: KPtr, node: KPtr): void { + _CreateContextFromFile(config: KPtr, filename: String): KPtr { throw new Error('Not implemented'); } - - _ContextState(context: KPtr): KInt { + _CreateCacheContextFromFile(config: KNativePointer, sourceFileName: String, globalContext: KNativePointer, isExternal: KBoolean): KNativePointer { + throw new Error("Not implemented"); + } + _InsertGlobalStructInfo(context: KNativePointer, str: String): void { + throw new Error("Not implemented"); + } + _HasGlobalStructInfo(context: KNativePointer, str: String): KBoolean { + throw new Error("Not implemented"); + } + _CreateGlobalContext(config: KNativePointer, externalFileList: KStringArrayPtr, fileNum: KUInt, lspUsage: KBoolean): KNativePointer { + throw new Error("Not implemented"); + } + _DestroyGlobalContext(context: KNativePointer): void { + throw new Error("Not implemented"); + } + _DestroyContext(context: KPtr): void { throw new Error('Not implemented'); } - _ContextErrorMessage(context: KPtr): KPtr { + _ProceedToState(context: KPtr, state: number): void { throw new Error('Not implemented'); } - _AstNodeChildren(context: KPtr, node: KPtr): KPtr { + _ContextProgram(context: KPtr): KPtr { throw new Error('Not implemented'); } - _ETSParserCreateExpression(context: KPtr, sourceCode: String, flags: KInt): KPtr { + _ProgramAst(context: KPtr, program: KPtr): KPtr { throw new Error('Not implemented'); } - _AstNodeDumpModifiers(context: KPtr, node: KPtr): KPtr { + _CheckerStartChecker(context: KPtr): KBoolean { throw new Error('Not implemented'); } - _CreateAstDumper(context: KPtr, node: KPtr, source: String): KPtr { + _AstNodeVariableConst(context: KPtr, ast: KPtr): KPtr { throw new Error('Not implemented'); } - _AstDumperModifierToString(context: KPtr, dumper: KPtr, flags: KInt): KPtr { + _CreateNumberLiteral(context: KPtr, value: KDouble): KPtr { throw new Error('Not implemented'); } - - _CreateConfig(argc: number, argv: string[]): KPtr { + _AstNodeUpdateChildren(context: KPtr, node: KPtr): void { + throw new Error("Not implemented") + } + _AstNodeUpdateAll(context: KPtr, node: KPtr): void { + throw new Error("Not implemented") + } + _VariableDeclaration(context: KPtr, variable: KPtr): KPtr { throw new Error('Not implemented'); } - _DestroyConfig(config: KPtr): void { + _DeclNode(context: KPtr, decl: KPtr): KPtr { throw new Error('Not implemented'); } - _CreateContextFromString(config: KPtr, source: String, filename: String): KPtr { + _DeclarationFromIdentifier(context: KPtr, identifier: KPtr): KPtr { + throw new Error("Not implemented") + } + _ProgramSourceFilePath(context: KNativePointer, instance: KNativePointer): KNativePointer { throw new Error('Not implemented'); } - _CreateContextFromFile(config: KPtr, filename: String): KPtr { + _ProgramExternalSources(context: KNativePointer, instance: KNativePointer): KNativePointer { throw new Error('Not implemented'); } - _DestroyContext(context: KPtr): void { + _ProgramDirectExternalSources(context: KNativePointer, instance: KNativePointer): KNativePointer { throw new Error('Not implemented'); } - _ProceedToState(context: KPtr, state: number): void { + _ExternalSourceName(instance: KNativePointer): KNativePointer { throw new Error('Not implemented'); } - _ContextProgram(context: KPtr): KPtr { + _ExternalSourcePrograms(instance: KNativePointer): KNativePointer { throw new Error('Not implemented'); } - _ProgramAst(context: KPtr, program: KPtr): KPtr { + _ETSParserBuildImportDeclaration( + context: KNativePointer, + importPath: KNativePointer, + specifiers: BigUint64Array, + specifiersSequenceLength: KInt, + importKind: KInt, + programPtr: KNativePointer, + flags: KInt + ): KNativePointer { throw new Error('Not implemented'); } - _CheckerStartChecker(context: KPtr): KBoolean { + _InsertETSImportDeclarationAndParse(context: KNativePointer, program: KNativePointer, importDeclaration: KNativePointer): void { + throw new Error("Not implemented"); + } + _ImportPathManagerResolvePathConst(context: KNativePointer, importPathManager: KNativePointer, currentModulePath: String, importPath: String, sourcePosition: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _ETSParserGetImportPathManager(context: KNativePointer): KPtr { + throw new Error('Not implemented'); + } + + _CreateSourcePosition(context: KNativePointer, index: KInt, line: KInt): KNativePointer { throw new Error('Not implemented'); } + _SourcePositionIndex(context: KNativePointer, instance: KNativePointer): KInt { + throw new Error('Not implemented'); + } + _SourcePositionLine(context: KNativePointer, instance: KNativePointer): KInt { + throw new Error('Not implemented'); + } + _ConfigGetOptions(config: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + + // From koala-wrapper _VarBinderIdentifierAnalysis(context: KPtr): void { throw new Error('Not implemented'); } @@ -289,17 +334,7 @@ export class Es2pandaNativeModule { ): KPtr { throw new Error('Not implemented'); } - _ETSParserBuildImportDeclaration( - context: KNativePointer, - importPath: KNativePointer, - specifiers: BigUint64Array, - specifiersSequenceLength: KInt, - importKind: KInt, - programPtr: KNativePointer, - flags: KInt - ): KNativePointer { - throw new Error('Not implemented'); - } + _ETSImportDeclarationSourceConst(context: KPtr, node: KPtr): KPtr { throw new Error('Not implemented'); } @@ -370,9 +405,6 @@ export class Es2pandaNativeModule { _AstNodeClearModifier(context: KPtr, ast: KPtr, flags: KInt): void { throw new Error('Not implemented'); } - _AstNodeVariableConst(context: KPtr, ast: KPtr): KPtr { - throw new Error('Not implemented'); - } _AstNodeTypeConst(context: KPtr, ast: KPtr): KInt { throw new Error('Not implemented'); } @@ -583,9 +615,6 @@ export class Es2pandaNativeModule { _CreateStringLiteral(context: KPtr, string: string): KPtr { throw new Error('Not implemented'); } - _CreateNumberLiteral(context: KPtr, value: KDouble): KPtr { - throw new Error('Not implemented'); - } _NumberLiteralStrConst(context: KPtr, node: KPtr): KPtr { throw new Error('Not implemented'); } @@ -666,12 +695,6 @@ export class Es2pandaNativeModule { _AstNodeDumpEtsSrcConst(context: KPtr, node: KPtr): KPtr { throw new Error('Not implemented'); } - _AstNodeUpdateChildren(context: KPtr, node: KPtr): void { - throw new Error('Not implemented'); - } - _AstNodeUpdateAll(context: KPtr, node: KPtr): void { - throw new Error('Not implemented'); - } _AstNodeSetOriginalNode(context: KPtr, ast: KPtr, originalNode: KPtr): void { throw new Error('Not implemented'); } @@ -686,12 +709,6 @@ export class Es2pandaNativeModule { throw new Error('Not implemented'); } - _VariableDeclaration(context: KPtr, variable: KPtr): KPtr { - throw new Error('Not implemented'); - } - _DeclNode(context: KPtr, decl: KPtr): KPtr { - throw new Error('Not implemented'); - } _ScopeSetParent(context: KPtr, ast: KPtr, scope: KPtr): void { throw new Error('Not implemented'); @@ -703,9 +720,6 @@ export class Es2pandaNativeModule { _SignatureFunction(context: KPtr, classInstance: KPtr): KPtr { throw new Error('Not implemented'); } - _DeclarationFromIdentifier(context: KPtr, identifier: KPtr): KPtr { - throw new Error('Not implemented'); - } _IsTSInterfaceDeclaration(ast: KNativePointer): KBoolean { throw new Error('Not implemented'); } @@ -733,22 +747,10 @@ export class Es2pandaNativeModule { _IsETSFunctionType(ast: KPtr): KBoolean { throw new Error('Not implemented'); } - _ProgramExternalSources(context: KNativePointer, instance: KNativePointer): KNativePointer { - throw new Error('Not implemented'); - } - _ProgramDirectExternalSources(context: KNativePointer, instance: KNativePointer): KNativePointer { - throw new Error('Not implemented'); - } _AstNodeProgram(context: KNativePointer, instance: KNativePointer): KNativePointer { throw new Error('Not implemented'); } - _ExternalSourceName(instance: KNativePointer): KNativePointer { - throw new Error('Not implemented'); - } - _ExternalSourcePrograms(instance: KNativePointer): KNativePointer { - throw new Error('Not implemented'); - } _ProgramCanSkipPhases(context: KNativePointer, program: KNativePointer): boolean { throw new Error('Not implemented'); @@ -770,27 +772,6 @@ export class Es2pandaNativeModule { throw new Error('Not implemented'); } - _InsertETSImportDeclarationAndParse( - context: KNativePointer, - program: KNativePointer, - importDeclaration: KNativePointer - ): void { - throw new Error('Not implemented'); - } - - _ETSParserGetImportPathManager(context: KNativePointer): KPtr { - throw new Error('Not implemented'); - } - - _CreateSourcePosition(context: KNativePointer, index: KInt, line: KInt): KNativePointer { - throw new Error('Not implemented'); - } - _SourcePositionIndex(context: KNativePointer, instance: KNativePointer): KInt { - throw new Error('Not implemented'); - } - _SourcePositionLine(context: KNativePointer, instance: KNativePointer): KInt { - throw new Error('Not implemented'); - } _CreateETSStringLiteralType(context: KNativePointer, str: String): KNativePointer { throw new Error('Not implemented'); } @@ -887,27 +868,6 @@ export class Es2pandaNativeModule { throw new Error('MemFinalize was not overloaded by native module initialization'); } - _CreateGlobalContext(configPtr: KNativePointer, externalFileList: KStringArrayPtr, fileNum: KInt, - lspUsage: boolean): KNativePointer { - throw new Error('CreateGlobalContext was not overloaded by native module initialization'); - } - - _DestroyGlobalContext(contextPtr: KNativePointer): void { - throw new Error('DestroyGlobalContext was not overloaded by native module initialization'); - } - - _CreateCacheContextFromFile(configPtr: KNativePointer, filename: string, globalContext: KNativePointer, - isExternal: KBoolean): KNativePointer { - throw new Error('CreateCacheContextFromFile was not overloaded by native module initialization'); - } - - _InsertGlobalStructInfo(context: KNativePointer, str: String): void { - throw new Error('InsertGlobalStructInfo was not overloaded by native module initialization'); - } - - _HasGlobalStructInfo(context: KNativePointer, str: String): KBoolean { - throw new Error('HasGlobalStructInfo was not overloaded by native module initialization'); - } _CreateDiagnosticKind(context: KNativePointer, message: string, type: PluginDiagnosticType): KNativePointer { throw new Error('Not implemented'); } @@ -933,6 +893,65 @@ export class Es2pandaNativeModule { _SetUpSoPath(soPath: string): void { throw new Error('Not implemented'); } + _ClassDefinitionSuper(context: KPtr, node: KPtr): KPtr { + throw new Error('Not implemented'); + } + _CreateTSInterfaceDeclaration( + _context: KPtr, + _extends: KPtrArray, + _extendsLen: KInt, + _id: KPtr, + _typeParams: KPtr, + _body: KPtr, + _isStatic: KBoolean, + _isExternal: KBoolean + ): KPtr { + throw new Error('Not implemented'); + } + _CreateTSTypeParameterInstantiation(context: KPtr, params: KPtrArray, paramsLen: KInt): KPtr { + throw new Error('Not implemented'); + } + _ClassElementKey(context: KPtr, node: KPtr): KPtr { + throw new Error('Not implemented'); + } + _ClassElementValue(context: KPtr, node: KPtr): KPtr { + throw new Error('Not implemented'); + } + _AnnotationUsageExpr(context: KPtr, node: KPtr): KPtr { + throw new Error('Not implemented'); + } + _AnnotationUsagePropertiesConst(context: KPtr, node: KPtr, returnLen: KPtr): KPtr { + throw new Error('Not implemented'); + } + _AnnotationAllowedAnnotationsConst(context: KPtr, node: KPtr, returnLen: KPtr): KPtr { + throw new Error('Not implemented'); + } + _ETSParserCreateExpression(context: KPtr, sourceCode: String, flags: KInt): KPtr { + throw new Error('Not implemented'); + } + _CreateAstDumper(context: KPtr, node: KPtr, source: String): KPtr { + throw new Error('Not implemented'); + } + _AstDumperModifierToString(context: KPtr, dumper: KPtr, flags: KInt): KPtr { + throw new Error('Not implemented'); + } +} + +export function findNativeModule(): string { + const candidates = [ + path.resolve(__dirname, "../native/build"), + path.resolve(__dirname, "../build/native/build"), + ] + let result = undefined + candidates.forEach(path => { + if (fs.existsSync(path)) { + result = path + return + } + }) + if (result) + return path.join(result, "es2panda") + throw new Error("Cannot find native module") } export function initEs2panda(): Es2pandaNativeModule { -- Gitee From bf852c6ad4a14781e25557d7af10616692fbdab8 Mon Sep 17 00:00:00 2001 From: Keerecles Date: Thu, 12 Jun 2025 23:32:18 +0800 Subject: [PATCH 09/17] sync ts Signed-off-by: Keerecles Change-Id: I1d5033945ef5ff87e16bb30ee37634b15f2e2f13 --- koala-wrapper/src/InteropNativeModule.ts | 3 + koala-wrapper/src/reexport-for-generated.ts | 3 +- koala-wrapper/src/utils.ts | 299 +++++++++++++++++++- 3 files changed, 297 insertions(+), 8 deletions(-) diff --git a/koala-wrapper/src/InteropNativeModule.ts b/koala-wrapper/src/InteropNativeModule.ts index 2018b318c..ce6747183 100644 --- a/koala-wrapper/src/InteropNativeModule.ts +++ b/koala-wrapper/src/InteropNativeModule.ts @@ -31,6 +31,9 @@ export class InteropNativeModule { _GetStringFinalizer(): KPtr { throw new Error("Not implemented") } + _RawUtf8ToString(ptr: KPtr): string { + throw new Error("Not implemented") + } _InvokeFinalizer(ptr: KPtr, finalizer: KPtr): void { throw new Error("Not implemented") } diff --git a/koala-wrapper/src/reexport-for-generated.ts b/koala-wrapper/src/reexport-for-generated.ts index bed26ef7a..1c49c9e74 100644 --- a/koala-wrapper/src/reexport-for-generated.ts +++ b/koala-wrapper/src/reexport-for-generated.ts @@ -25,7 +25,8 @@ export { unpackNonNullableObject, unpackString, unpackObject, - assertValidPeer + assertValidPeer, + updateNodeByNode } from "./arkts-api/utilities/private" export { nodeByType } from "./arkts-api/class-by-peer" export { global } from "./arkts-api/static/global" diff --git a/koala-wrapper/src/utils.ts b/koala-wrapper/src/utils.ts index 9ef0b4d51..8e3da7411 100644 --- a/koala-wrapper/src/utils.ts +++ b/koala-wrapper/src/utils.ts @@ -18,7 +18,7 @@ export function throwError(error: string): never { } export function withWarning(value: T, message: string): T { - console.warn(message) + // console.warn(message) return value } @@ -44,10 +44,10 @@ function replacePercentOutsideStrings(code: string): string { placeholderMap.forEach((originalString, placeholder) => { code = code.replace(new RegExp(placeholder, 'g'), originalString); }); - + return code; } - + function replaceIllegalHashes(code: string): string { const stringPattern = /("[^"]*"|'[^']*'|`[^`]*`)/g; const strings = code.match(stringPattern) || []; @@ -69,18 +69,303 @@ function replaceIllegalHashes(code: string): string { return code; } +function replaceGensymWrappers(code: string): string { + const indices = [...code.matchAll(/\({let/g)].map(it => it.index) + const replacements: string[][] = [] + for (var i of indices) { + if (!i) { + continue + } + var j = i + 1, depth = 1 + while (j < code.length) { + if (code[j] == '(') { + depth++ + } + if (code[j] == ')') { + depth-- + } + if (depth == 0) { + break + } + j++ + } + + if (j == code.length) { + continue + } + + const base = code.substring(i, j + 1) + if (base.match(/\({let/)?.length! > 1) { // don't touch if contains nested constructions + continue + } + const fixed = base.replaceAll(/^\({let ([_%a-zA-Z0-9]+?) = (?!\({let)([\s\S]*?);\n([\s\S]*?)}\)$/g, + (match, name: string, val: string, expr: string) => { + let rightExpr = expr.slice(expr.lastIndexOf(name) + name.length, -1) + if (rightExpr[0] != '.') { + rightExpr = `.${rightExpr}` + } + return `(${val}?${rightExpr})` + } + ) + replacements.push([base, fixed]) + } + for (var [b, f] of replacements) { + code = code.replace(b, f) + } + return code +} + + +function addExports(code: string): string { + const exportAstNodes = [" enum", "let", "const", "class", "abstract class", "@Entry() @Component() final class", "@Component() final class", "interface", "@interface", "type", "enum", "final class", "function", + "declare interface", "@memo_stable() declare interface", "@memo_stable() interface", + "@Retention({policy:\"SOURCE\"}) @interface", "@memo() function", "@memo_entry() function", "@memo_intrinsic() function", + ] + exportAstNodes.forEach((astNodeText) => { + code = code.replaceAll(`\n${astNodeText}`, `\nexport ${astNodeText}`) + } + ) + // TODO this is a temporary workaround and should be replaced with a proper import/export handling in future + code = code.replaceAll(/\n(@memo\(\) @BuilderLambda\(\{value:"\w+"\}\)) function/g, '\n$1 export function') + const fix = [ + ["export @memo() function", "@memo() export function"], + ["export @memo_entry() function", "@memo_entry() export function"], + ["export @memo_intrinsic() function", "@memo_intrinsic() export function"], + ["export @memo_stable()", "@memo_stable() export"], + ["export class OhosRouter", "export default class OhosRouter"] + ] + for (var [f, t] of fix) { + code = code.replaceAll(f, t) + } + return code.replaceAll("\nexport function main()", "\nfunction main()") +} + +function removeAbstractFromInterfaces(code: string): string { + const interfaces = [...code.matchAll(/interface([\s\S]*?){([\s\S]*?)\n}\n/g)].map(it => it[0]) + interfaces.forEach((content) => { + const newContent = content.replaceAll('abstract ', '') + code = code.replaceAll(content, newContent) + }) + return code +} + +function removeInvalidLambdaTyping(code: string): string { + const knownTypes = ['boolean', 'int64', 'void'] + return code.replaceAll(/\(([^\n\(\)]*?)\): ([\S]*?) => {/g, (match, p1, p2) => { + if (knownTypes.includes(p2)) { + return match + } + return `(${p1}) => {` + }) +} + +function returnOptionalParams(code: string): string { + const reduce = (line: string): string => { + if (line.includes("constructor")) { + return line + } + for (var i = 0; i < line.length; i++) { + if (line[i] == '(') { + let ignore = false + for (var k = i; k >= 0; k--) { + if (line[k].match(/[a-zA-Z<>_0-9]/)) { + break + } + if (line[k] == ':') { + ignore = true + } + } + if (ignore) { + continue + } + const initi = i + let j = i + 1, depth = 1 + let parts: string[] = [] + while (j < line.length) { + if (line[j] == '(') { + depth++ + } + if (line[j] == ')') { + depth-- + if (depth == 0) { + parts.push(line.substring(i + 1, j)) + break + } + } + if (line[j] == ',' && depth == 1) { + parts.push(line.substring(i + 1, j)) + i = j + 1 + } + j++ + } + if (depth == 0 && parts.length && parts.every(it => it.includes(": ") && !it.includes("? "))) { + let k = parts.length - 1 + while (k >= 0) { + if (parts[k].endsWith(" | undefined")) { + let w = parts[k].substring(0, parts[k].length - " | undefined".length) + let i = w.indexOf(':') + if (w[i - 1] != '?') { + parts[k] = w.substring(0, i) + "?" + w.substring(i) + } + } else { + break + } + k-- + } + if (k != parts.length - 1) { + let nline = line.substring(0, initi + 1) + parts.join(', ') + line.substring(j) + return nline + } + } + i = initi + } + } + return line + } + return code.split('\n').map((line) => { + let nline = reduce(line) + while (nline != line) { + line = nline + nline = reduce(line) + } + return line + }).join('\n') +} + +function fixPropertyLines(code: string): string { + /* + + for some properties the following construction is generated: + + private readonly name = false; + + public name(name) { // for readonly properties "setter" is also generated + (this).name = name = false; // sometimes there is a typing here + return; + } + + public name() { + return (this).name; + } + + this function wraps this back to `readonly name = false;` + + */ + return code.replaceAll(/(private|public)(.*)?(.*?)\n((.*?)\n){9}/g, (match, p1, p2, p3) => { + return `public ${p2} ${p3}` + }) +} + +function fixDuplicateSettersInInterfaces(code: string): string { + /* + + sometimes interfaces contains duplicate setters, this functions fixes it + + */ + code = code.replaceAll(/\n[ ]*(.*)interface(.*){\n([\s\S]*?)\n[ ]*}\n/g, (match, modifiers, p1, p2: string) => { + const keep = p2.split('\n').filter((it) => !it.trimStart().startsWith(`set`)) + const setters = [...new Set(p2.split('\n').filter((it) => it.trimStart().startsWith(`set`)))] + return `\n${modifiers}interface${p1}{\n${keep.join('\n')}\n${setters.join('\n')}\n}\n` + }) + return code +} + +function excludePartialInterfaces(code: string): string { + return code + .replaceAll(/export interface (.*)\$partial<>([\s\S]*?)}/g, '') + .replaceAll(/interface (.*)\$partial<>([\s\S]*?)}/g, '') +} + +function fixNamespace(code: string) { + /* + namespaces become abstract classes, and enums become final classes + enum in namespace -> class in class -> not supported + + we have only one such place, so fix manually + */ + code = code.replaceAll(/export (declare )?abstract class (Profiler|GestureControl|text|common2D|common|observer|unifiedDataChannel|uniformTypeDescriptor|drawing|uiEffect|intl|matrix4|image|pointer|promptAction|webview|window) {/g, `export $1 namespace $2 {`) + code = code.replaceAll(`public static _$init$_() {}`, ``) + code = code.replaceAll(`public static _$init$_(): void {}`, ``) + code = code.replaceAll(/.*_\$initializerBlockInit\$_.*/g, ``) + code = code.replaceAll(/public static ((?:un)?registerVsyncCallback)/g, "export function $1") + code = code.replaceAll(/public static (setCursor)/g, "export function $1") + code = code.replaceAll(/public static (restoreDefault)/g, "export function $1") + code = code.replaceAll(/public static (requestFocus\(value)/g, "export function $1") + code = code.replaceAll(/public static (getSystemFontFullNamesByType|getFontDescriptorByFullName|matchFontDescriptors|createEffect|createBrightnessBlender)/g, "export function $1") + code = code.replaceAll('\n type Blender =', '\n export type Blender = ') + return code +} + +function fixEnums(code: string) { + const lines = code.split('\n') + const enums = [] + for (let i = 0; i + 1 < lines.length; i++) { + if (lines[i].trimStart().startsWith(`export final class`) + && lines[i + 1].trimStart().startsWith(`private readonly _ordinal`) + ) { + const name = lines[i].split(' ')[3] + enums.push(name) + } + } + enums.forEach((name) => { + const regexp = new RegExp(`${name}\\.(\\w+)(.)`, `g`) + code = code.replaceAll(regexp, (match, p1, p2) => { + if (!p1.startsWith('_') && p2 == ":") { // this colon is for switch case, not for type + return `${name}.${p1}.valueOf()${p2}` + } + return match + }) + const idents = [...code.matchAll(new RegExp(`(\\w+?)([\\W])(\\w+?): ${name}`, `g`))].filter(it => it[1] != "readonly" && it[1] != "_get").map(it => it[3]) + // work manually with a couple of cases not to write one more bracket parser + if (code.includes(`const eventKind = (deserializer.readInt32() as CallbackEventKind);`)) { + // this is for file arkui/src/generated/peers/CallbacksChecker.ts + idents.push(`eventKind`) + code = code.replace(`const eventKind = (deserializer.readInt32() as CallbackEventKind);`, `const eventKind = CallbackEventKind.fromValue(deserializer.readInt32());`) + } + if (code.includes(`switch ((type as EventType))`)) { + // this is for file arkui/src/Application.ts + code = code.replace(`switch ((type as EventType))`, `switch (type)`) + } + idents.forEach((id) => { + code = code.replaceAll(`${id} as int32`, `${id}.valueOf()`) + code = code.replaceAll(`switch (${id})`, `switch (${id}.valueOf())`) + }) + }) + return code +} + /* TODO: The lowerings insert %% and other special symbols into names of temporary variables. Until we keep feeding ast dumps back to the parser this function is needed. */ export function filterSource(text: string): string { - const filtered = replaceIllegalHashes(replacePercentOutsideStrings(text)) - .replaceAll("", "_cctor_") - - return filtered + //console.error("====") + // console.error(text.split('\n').map((it, index) => `${`${index + 1}`.padStart(4)} |${it}`).join('\n')) + const dumperUnwrappers = [ + addExports, + fixNamespace, + fixEnums, + fixDuplicateSettersInInterfaces, + removeAbstractFromInterfaces, + replaceGensymWrappers, // nested + replaceGensymWrappers, // nested + replaceGensymWrappers, + replaceIllegalHashes, + replacePercentOutsideStrings, + excludePartialInterfaces, + (code: string) => code.replaceAll("", "_cctor_"), + (code: string) => code.replaceAll("public constructor() {}", ""), + (code: string) => code.replaceAll("@Module()", ""), + (code: string) => code.replaceAll("export * as from", "export * from"), + fixPropertyLines + ] + // console.error("====") + // console.error(dumperUnwrappers.reduceRight((code, f) => f(code), text).split('\n').map((it, index) => `${`${index + 1}`.padStart(4)} |${it}`).join('\n')) + return dumperUnwrappers.reduceRight((code, f) => f(code), text) } +// From koala wrapper export function getEnumName(enumType: any, value: number): string | undefined { return enumType[value]; } \ No newline at end of file -- Gitee From f3b68a671b7b8a32de8781f5f872524a90ac3f6e Mon Sep 17 00:00:00 2001 From: Keerecles Date: Thu, 12 Jun 2025 23:52:40 +0800 Subject: [PATCH 10/17] Enums Signed-off-by: Keerecles Change-Id: Ib9a4bb4c8745d9187863049957ac8aaec43e4857 --- koala-wrapper/src/arkts-api/static/global.ts | 15 +- koala-wrapper/src/generated/Es2pandaEnums.ts | 1067 ++++++++++-------- 2 files changed, 635 insertions(+), 447 deletions(-) diff --git a/koala-wrapper/src/arkts-api/static/global.ts b/koala-wrapper/src/arkts-api/static/global.ts index 9d0cee809..ba22249d4 100644 --- a/koala-wrapper/src/arkts-api/static/global.ts +++ b/koala-wrapper/src/arkts-api/static/global.ts @@ -19,11 +19,13 @@ import { initEs2panda, Es2pandaNativeModule, initGeneratedEs2panda } from "../.. import { Es2pandaNativeModule as GeneratedEs2pandaNativeModule } from "../../generated/Es2pandaNativeModule" import { initInterop, InteropNativeModule } from "../../InteropNativeModule" import { Context } from "../peers/Context" +// import { Profiler } from "./profiler" +// import { ArkTsConfig } from "../../generated" export class global { public static filePath: string = "./plugins/input/main.ets" - public static packageName: string = "" - public static filePathFromPackageRoot: string = global.filePath + + // public static arktsconfig?: ArkTsConfig private static _config?: KNativePointer public static set config(config: KNativePointer) { @@ -35,12 +37,16 @@ export class global { public static configIsInitialized(): boolean { return global._config !== undefined && global._config !== nullptr } + public static resetConfig(): void { + global._config = undefined + } // TODO: rename to contextPeer public static get context(): KNativePointer { return global.compilerContext?.peer ?? throwError('Global.context not initialized') } + // TODO: rename to context when the pointer valued one is eliminated // unsafe - could be undefined public static compilerContext: Context | undefined @@ -68,9 +74,8 @@ export class global { public static get interop(): InteropNativeModule { if (this._interop === undefined) this._interop = initInterop() return this._interop - } - public static resetConfig() { - global._config = undefined; } + + // public static profiler = new Profiler() } diff --git a/koala-wrapper/src/generated/Es2pandaEnums.ts b/koala-wrapper/src/generated/Es2pandaEnums.ts index c5a873a54..5d6fcfe9f 100644 --- a/koala-wrapper/src/generated/Es2pandaEnums.ts +++ b/koala-wrapper/src/generated/Es2pandaEnums.ts @@ -280,6 +280,40 @@ export enum Es2pandaScopeFlags { SCOPE_FLAGS_STATIC_FIELD_SCOPE = 320, SCOPE_FLAGS_STATIC_METHOD_SCOPE = 384 } +export enum Es2pandaEnum { + ENUM_NODE_HAS_PARENT = 0, + ENUM_NODE_HAS_SOURCE_RANGE = 1, + ENUM_EVERY_CHILD_HAS_VALID_PARENT = 2, + ENUM_EVERY_CHILD_IN_PARENT_RANGE = 3, + ENUM_CHECK_STRUCT_DECLARATION = 4, + ENUM_VARIABLE_HAS_SCOPE = 5, + ENUM_NODE_HAS_TYPE = 6, + ENUM_NO_PRIMITIVE_TYPES = 7, + ENUM_IDENTIFIER_HAS_VARIABLE = 8, + ENUM_REFERENCE_TYPE_ANNOTATION_IS_NULL = 9, + ENUM_ARITHMETIC_OPERATION_VALID = 10, + ENUM_SEQUENCE_EXPRESSION_HAS_LAST_TYPE = 11, + ENUM_FOR_LOOP_CORRECTLY_INITIALIZED = 12, + ENUM_VARIABLE_HAS_ENCLOSING_SCOPE = 13, + ENUM_MODIFIER_ACCESS_VALID = 14, + ENUM_VARIABLE_NAME_IDENTIFIER_NAME_SAME = 15, + ENUM_CHECK_ABSTRACT_METHOD = 16, + ENUM_GETTER_SETTER_VALIDATION = 17, + ENUM_CHECK_SCOPE_DECLARATION = 18, + ENUM_CHECK_CONST_PROPERTIES = 19, + ENUM_COUNT = 20, + ENUM_BASE_FIRST = 0, + ENUM_BASE_LAST = 3, + ENUM_AFTER_PLUGINS_AFTER_PARSE_FIRST = 4, + ENUM_AFTER_PLUGINS_AFTER_PARSE_LAST = 4, + ENUM_AFTER_SCOPES_INIT_PHASE_FIRST = 5, + ENUM_AFTER_SCOPES_INIT_PHASE_LAST = 5, + ENUM_AFTER_CHECKER_PHASE_FIRST = 6, + ENUM_AFTER_CHECKER_PHASE_LAST = 19, + ENUM_FIRST = 0, + ENUM_LAST = 19, + ENUM_INVALID = 20 +} export enum Es2pandaRegExpFlags { REG_EXP_FLAGS_EMPTY = 0, REG_EXP_FLAGS_GLOBAL = 1, @@ -296,17 +330,214 @@ export enum Es2pandaId { ID_ETS = 3, ID_COUNT = 4 } +export enum Es2pandaTokenType { + TOKEN_TYPE_EOS = 0, + TOKEN_TYPE_LITERAL_IDENT = 1, + TOKEN_TYPE_LITERAL_STRING = 2, + TOKEN_TYPE_LITERAL_CHAR = 3, + TOKEN_TYPE_LITERAL_NUMBER = 4, + TOKEN_TYPE_LITERAL_REGEXP = 5, + TOKEN_TYPE_PUNCTUATOR_BITWISE_AND = 6, + TOKEN_TYPE_PUNCTUATOR_BITWISE_OR = 7, + TOKEN_TYPE_PUNCTUATOR_MULTIPLY = 8, + TOKEN_TYPE_PUNCTUATOR_DIVIDE = 9, + TOKEN_TYPE_PUNCTUATOR_MINUS = 10, + TOKEN_TYPE_PUNCTUATOR_EXCLAMATION_MARK = 11, + TOKEN_TYPE_PUNCTUATOR_TILDE = 12, + TOKEN_TYPE_PUNCTUATOR_MINUS_MINUS = 13, + TOKEN_TYPE_PUNCTUATOR_LEFT_SHIFT = 14, + TOKEN_TYPE_PUNCTUATOR_RIGHT_SHIFT = 15, + TOKEN_TYPE_PUNCTUATOR_LESS_THAN_EQUAL = 16, + TOKEN_TYPE_PUNCTUATOR_GREATER_THAN_EQUAL = 17, + TOKEN_TYPE_PUNCTUATOR_MOD = 18, + TOKEN_TYPE_PUNCTUATOR_BITWISE_XOR = 19, + TOKEN_TYPE_PUNCTUATOR_EXPONENTIATION = 20, + TOKEN_TYPE_PUNCTUATOR_MULTIPLY_EQUAL = 21, + TOKEN_TYPE_PUNCTUATOR_EXPONENTIATION_EQUAL = 22, + TOKEN_TYPE_PUNCTUATOR_ARROW = 23, + TOKEN_TYPE_PUNCTUATOR_BACK_TICK = 24, + TOKEN_TYPE_PUNCTUATOR_HASH_MARK = 25, + TOKEN_TYPE_PUNCTUATOR_DIVIDE_EQUAL = 26, + TOKEN_TYPE_PUNCTUATOR_MOD_EQUAL = 27, + TOKEN_TYPE_PUNCTUATOR_MINUS_EQUAL = 28, + TOKEN_TYPE_PUNCTUATOR_LEFT_SHIFT_EQUAL = 29, + TOKEN_TYPE_PUNCTUATOR_RIGHT_SHIFT_EQUAL = 30, + TOKEN_TYPE_PUNCTUATOR_UNSIGNED_RIGHT_SHIFT = 31, + TOKEN_TYPE_PUNCTUATOR_UNSIGNED_RIGHT_SHIFT_EQUAL = 32, + TOKEN_TYPE_PUNCTUATOR_BITWISE_AND_EQUAL = 33, + TOKEN_TYPE_PUNCTUATOR_BITWISE_OR_EQUAL = 34, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_AND_EQUAL = 35, + TOKEN_TYPE_PUNCTUATOR_NULLISH_COALESCING = 36, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_OR_EQUAL = 37, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_NULLISH_EQUAL = 38, + TOKEN_TYPE_PUNCTUATOR_BITWISE_XOR_EQUAL = 39, + TOKEN_TYPE_PUNCTUATOR_PLUS = 40, + TOKEN_TYPE_PUNCTUATOR_PLUS_PLUS = 41, + TOKEN_TYPE_PUNCTUATOR_PLUS_EQUAL = 42, + TOKEN_TYPE_PUNCTUATOR_LESS_THAN = 43, + TOKEN_TYPE_PUNCTUATOR_GREATER_THAN = 44, + TOKEN_TYPE_PUNCTUATOR_EQUAL = 45, + TOKEN_TYPE_PUNCTUATOR_NOT_EQUAL = 46, + TOKEN_TYPE_PUNCTUATOR_STRICT_EQUAL = 47, + TOKEN_TYPE_PUNCTUATOR_NOT_STRICT_EQUAL = 48, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_AND = 49, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_OR = 50, + TOKEN_TYPE_PUNCTUATOR_SUBSTITUTION = 51, + TOKEN_TYPE_PUNCTUATOR_QUESTION_MARK = 52, + TOKEN_TYPE_PUNCTUATOR_QUESTION_DOT = 53, + TOKEN_TYPE_PUNCTUATOR_AT = 54, + TOKEN_TYPE_PUNCTUATOR_FORMAT = 55, + TOKEN_TYPE_PUNCTUATOR_RIGHT_PARENTHESIS = 56, + TOKEN_TYPE_PUNCTUATOR_LEFT_PARENTHESIS = 57, + TOKEN_TYPE_PUNCTUATOR_RIGHT_SQUARE_BRACKET = 58, + TOKEN_TYPE_PUNCTUATOR_LEFT_SQUARE_BRACKET = 59, + TOKEN_TYPE_PUNCTUATOR_RIGHT_BRACE = 60, + TOKEN_TYPE_PUNCTUATOR_PERIOD = 61, + TOKEN_TYPE_PUNCTUATOR_PERIOD_PERIOD_PERIOD = 62, + TOKEN_TYPE_PUNCTUATOR_PERIOD_QUESTION = 63, + TOKEN_TYPE_PUNCTUATOR_LEFT_BRACE = 64, + TOKEN_TYPE_PUNCTUATOR_SEMI_COLON = 65, + TOKEN_TYPE_PUNCTUATOR_COLON = 66, + TOKEN_TYPE_PUNCTUATOR_COMMA = 67, + TOKEN_TYPE_KEYW_ABSTRACT = 68, + TOKEN_TYPE_KEYW_ANY = 69, + TOKEN_TYPE_KEYW_BUILTIN_ANY = 70, + TOKEN_TYPE_KEYW_ANYREF = 71, + TOKEN_TYPE_KEYW_ARGUMENTS = 72, + TOKEN_TYPE_KEYW_AS = 73, + TOKEN_TYPE_KEYW_ASSERTS = 74, + TOKEN_TYPE_KEYW_ASYNC = 75, + TOKEN_TYPE_KEYW_AWAIT = 76, + TOKEN_TYPE_KEYW_BIGINT = 77, + TOKEN_TYPE_KEYW_BUILTIN_BIGINT = 78, + TOKEN_TYPE_KEYW_BOOLEAN = 79, + TOKEN_TYPE_KEYW_BUILTIN_BOOLEAN = 80, + TOKEN_TYPE_KEYW_BREAK = 81, + TOKEN_TYPE_KEYW_BYTE = 82, + TOKEN_TYPE_KEYW_BUILTIN_BYTE = 83, + TOKEN_TYPE_KEYW_CASE = 84, + TOKEN_TYPE_KEYW_CATCH = 85, + TOKEN_TYPE_KEYW_CHAR = 86, + TOKEN_TYPE_KEYW_BUILTIN_CHAR = 87, + TOKEN_TYPE_KEYW_CLASS = 88, + TOKEN_TYPE_KEYW_CONST = 89, + TOKEN_TYPE_KEYW_CONSTRUCTOR = 90, + TOKEN_TYPE_KEYW_CONTINUE = 91, + TOKEN_TYPE_KEYW_DATAREF = 92, + TOKEN_TYPE_KEYW_DEBUGGER = 93, + TOKEN_TYPE_KEYW_DECLARE = 94, + TOKEN_TYPE_KEYW_DEFAULT = 95, + TOKEN_TYPE_KEYW_DELETE = 96, + TOKEN_TYPE_KEYW_DO = 97, + TOKEN_TYPE_KEYW_DOUBLE = 98, + TOKEN_TYPE_KEYW_BUILTIN_DOUBLE = 99, + TOKEN_TYPE_KEYW_ELSE = 100, + TOKEN_TYPE_KEYW_ENUM = 101, + TOKEN_TYPE_KEYW_EQREF = 102, + TOKEN_TYPE_KEYW_EVAL = 103, + TOKEN_TYPE_KEYW_EXPORT = 104, + TOKEN_TYPE_KEYW_EXTENDS = 105, + TOKEN_TYPE_KEYW_EXTERNREF = 106, + TOKEN_TYPE_KEYW_F32 = 107, + TOKEN_TYPE_KEYW_F64 = 108, + TOKEN_TYPE_LITERAL_FALSE = 109, + TOKEN_TYPE_KEYW_FINALLY = 110, + TOKEN_TYPE_KEYW_FLOAT = 111, + TOKEN_TYPE_KEYW_BUILTIN_FLOAT = 112, + TOKEN_TYPE_KEYW_FOR = 113, + TOKEN_TYPE_KEYW_FROM = 114, + TOKEN_TYPE_KEYW_FUNCREF = 115, + TOKEN_TYPE_KEYW_FUNCTION = 116, + TOKEN_TYPE_KEYW_GET = 117, + TOKEN_TYPE_KEYW_GLOBAL = 118, + TOKEN_TYPE_KEYW_I8 = 119, + TOKEN_TYPE_KEYW_I16 = 120, + TOKEN_TYPE_KEYW_I31REF = 121, + TOKEN_TYPE_KEYW_I32 = 122, + TOKEN_TYPE_KEYW_I64 = 123, + TOKEN_TYPE_KEYW_IF = 124, + TOKEN_TYPE_KEYW_IMPLEMENTS = 125, + TOKEN_TYPE_KEYW_IMPORT = 126, + TOKEN_TYPE_KEYW_IN = 127, + TOKEN_TYPE_KEYW_INFER = 128, + TOKEN_TYPE_KEYW_INSTANCEOF = 129, + TOKEN_TYPE_KEYW_INT = 130, + TOKEN_TYPE_KEYW_BUILTIN_INT = 131, + TOKEN_TYPE_KEYW_INTERFACE = 132, + TOKEN_TYPE_KEYW_IS = 133, + TOKEN_TYPE_KEYW_ISIZE = 134, + TOKEN_TYPE_KEYW_KEYOF = 135, + TOKEN_TYPE_KEYW_LET = 136, + TOKEN_TYPE_KEYW_LONG = 137, + TOKEN_TYPE_KEYW_BUILTIN_LONG = 138, + TOKEN_TYPE_KEYW_META = 139, + TOKEN_TYPE_KEYW_MODULE = 140, + TOKEN_TYPE_KEYW_NAMESPACE = 141, + TOKEN_TYPE_KEYW_NATIVE = 142, + TOKEN_TYPE_KEYW_NEVER = 143, + TOKEN_TYPE_KEYW_NEW = 144, + TOKEN_TYPE_LITERAL_NULL = 145, + TOKEN_TYPE_KEYW_NUMBER = 146, + TOKEN_TYPE_KEYW_OBJECT = 147, + TOKEN_TYPE_KEYW_BUILTIN_OBJECT = 148, + TOKEN_TYPE_KEYW_OF = 149, + TOKEN_TYPE_KEYW_FINAL = 150, + TOKEN_TYPE_KEYW_OUT = 151, + TOKEN_TYPE_KEYW_OVERRIDE = 152, + TOKEN_TYPE_KEYW_PACKAGE = 153, + TOKEN_TYPE_KEYW_INTERNAL = 154, + TOKEN_TYPE_KEYW_PRIVATE = 155, + TOKEN_TYPE_KEYW_PROTECTED = 156, + TOKEN_TYPE_KEYW_PUBLIC = 157, + TOKEN_TYPE_KEYW_READONLY = 158, + TOKEN_TYPE_KEYW_RETHROWS = 159, + TOKEN_TYPE_KEYW_RETURN = 160, + TOKEN_TYPE_KEYW_REQUIRE = 161, + TOKEN_TYPE_KEYW_SET = 162, + TOKEN_TYPE_KEYW_SHORT = 163, + TOKEN_TYPE_KEYW_BUILTIN_SHORT = 164, + TOKEN_TYPE_KEYW_STATIC = 165, + TOKEN_TYPE_KEYW_STRING = 166, + TOKEN_TYPE_KEYW_BUILTIN_STRING = 167, + TOKEN_TYPE_KEYW_STRUCT = 168, + TOKEN_TYPE_KEYW_SUPER = 169, + TOKEN_TYPE_KEYW_SWITCH = 170, + TOKEN_TYPE_KEYW_TARGET = 171, + TOKEN_TYPE_KEYW_THIS = 172, + TOKEN_TYPE_KEYW_THROW = 173, + TOKEN_TYPE_KEYW_THROWS = 174, + TOKEN_TYPE_LITERAL_TRUE = 175, + TOKEN_TYPE_KEYW_TRY = 176, + TOKEN_TYPE_KEYW_TYPE = 177, + TOKEN_TYPE_KEYW_TYPEOF = 178, + TOKEN_TYPE_KEYW_U8 = 179, + TOKEN_TYPE_KEYW_U16 = 180, + TOKEN_TYPE_KEYW_U32 = 181, + TOKEN_TYPE_KEYW_U64 = 182, + TOKEN_TYPE_KEYW_UNDEFINED = 183, + TOKEN_TYPE_KEYW_UNKNOWN = 184, + TOKEN_TYPE_KEYW_USIZE = 185, + TOKEN_TYPE_KEYW_V128 = 186, + TOKEN_TYPE_KEYW_VAR = 187, + TOKEN_TYPE_KEYW_VOID = 188, + TOKEN_TYPE_KEYW_WHILE = 189, + TOKEN_TYPE_KEYW_WITH = 190, + TOKEN_TYPE_KEYW_YIELD = 191, + TOKEN_TYPE_JS_DOC_START = 192, + TOKEN_TYPE_JS_DOC_END = 193, + TOKEN_TYPE_FIRST_PUNCTUATOR = 6, + TOKEN_TYPE_FIRST_KEYW = 68 +} export enum Es2pandaAstNodeFlags { AST_NODE_FLAGS_NO_OPTS = 0, AST_NODE_FLAGS_CHECKCAST = 1, - AST_NODE_FLAGS_CONVERT_TO_STRING = 2, - AST_NODE_FLAGS_ALLOW_REQUIRED_INSTANTIATION = 4, - AST_NODE_FLAGS_HAS_EXPORT_ALIAS = 8, - AST_NODE_FLAGS_GENERATE_VALUE_OF = 16, - AST_NODE_FLAGS_RECHECK = 32, - AST_NODE_FLAGS_NOCLEANUP = 64, - AST_NODE_FLAGS_RESIZABLE_REST = 128, - AST_NODE_FLAGS_TMP_CONVERT_PRIMITIVE_CAST_METHOD_CALL = 256 + AST_NODE_FLAGS_ALLOW_REQUIRED_INSTANTIATION = 2, + AST_NODE_FLAGS_HAS_EXPORT_ALIAS = 4, + AST_NODE_FLAGS_GENERATE_VALUE_OF = 8, + AST_NODE_FLAGS_RECHECK = 16, + AST_NODE_FLAGS_NOCLEANUP = 32, + AST_NODE_FLAGS_RESIZABLE_REST = 64, + AST_NODE_FLAGS_TMP_CONVERT_PRIMITIVE_CAST_METHOD_CALL = 128 } export enum Es2pandaModifierFlags { MODIFIER_FLAGS_NONE = 0, @@ -339,6 +570,7 @@ export enum Es2pandaModifierFlags { MODIFIER_FLAGS_ANNOTATION_DECLARATION = 67108864, MODIFIER_FLAGS_ANNOTATION_USAGE = 134217728, MODIFIER_FLAGS_READONLY_PARAMETER = 268435456, + MODIFIER_FLAGS_ARRAY_SETTER = 536870912, MODIFIER_FLAGS_ACCESS = 524316, MODIFIER_FLAGS_ALL = 524927, MODIFIER_FLAGS_ALLOWED_IN_CTOR_PARAMETER = 524380, @@ -380,7 +612,9 @@ export enum Es2pandaScriptFunctionFlags { SCRIPT_FUNCTION_FLAGS_HAS_RETURN = 262144, SCRIPT_FUNCTION_FLAGS_ASYNC_IMPL = 524288, SCRIPT_FUNCTION_FLAGS_EXTERNAL_OVERLOAD = 1048576, - SCRIPT_FUNCTION_FLAGS_HAS_THROW = 2097152 + SCRIPT_FUNCTION_FLAGS_HAS_THROW = 2097152, + SCRIPT_FUNCTION_FLAGS_IN_RECORD = 4194304, + SCRIPT_FUNCTION_FLAGS_TRAILING_LAMBDA = 8388608 } export enum Es2pandaTSOperatorType { TS_OPERATOR_TYPE_READONLY = 0, @@ -392,28 +626,6 @@ export enum Es2pandaMappedOption { MAPPED_OPTION_PLUS = 1, MAPPED_OPTION_MINUS = 2 } -export enum Es2pandaBoxingUnboxingFlags { - BOXING_UNBOXING_FLAGS_NONE = 0, - BOXING_UNBOXING_FLAGS_BOX_TO_BOOLEAN = 1, - BOXING_UNBOXING_FLAGS_BOX_TO_BYTE = 2, - BOXING_UNBOXING_FLAGS_BOX_TO_SHORT = 4, - BOXING_UNBOXING_FLAGS_BOX_TO_CHAR = 8, - BOXING_UNBOXING_FLAGS_BOX_TO_INT = 16, - BOXING_UNBOXING_FLAGS_BOX_TO_LONG = 32, - BOXING_UNBOXING_FLAGS_BOX_TO_FLOAT = 64, - BOXING_UNBOXING_FLAGS_BOX_TO_DOUBLE = 128, - BOXING_UNBOXING_FLAGS_BOX_TO_ENUM = 256, - BOXING_UNBOXING_FLAGS_UNBOX_TO_BOOLEAN = 512, - BOXING_UNBOXING_FLAGS_UNBOX_TO_BYTE = 1024, - BOXING_UNBOXING_FLAGS_UNBOX_TO_SHORT = 2048, - BOXING_UNBOXING_FLAGS_UNBOX_TO_CHAR = 4096, - BOXING_UNBOXING_FLAGS_UNBOX_TO_INT = 8192, - BOXING_UNBOXING_FLAGS_UNBOX_TO_LONG = 16384, - BOXING_UNBOXING_FLAGS_UNBOX_TO_FLOAT = 32768, - BOXING_UNBOXING_FLAGS_UNBOX_TO_DOUBLE = 65536, - BOXING_UNBOXING_FLAGS_BOXING_FLAG = 511, - BOXING_UNBOXING_FLAGS_UNBOXING_FLAG = 130560 -} export enum Es2pandaClassDefinitionModifiers { CLASS_DEFINITION_MODIFIERS_NONE = 0, CLASS_DEFINITION_MODIFIERS_DECLARATION = 1, @@ -433,6 +645,7 @@ export enum Es2pandaClassDefinitionModifiers { CLASS_DEFINITION_MODIFIERS_STRING_ENUM_TRANSFORMED = 16384, CLASS_DEFINITION_MODIFIERS_INT_ENUM_TRANSFORMED = 32768, CLASS_DEFINITION_MODIFIERS_FROM_STRUCT = 65536, + CLASS_DEFINITION_MODIFIERS_FUNCTIONAL_REFERENCE = 131072, CLASS_DEFINITION_MODIFIERS_DECLARATION_ID_REQUIRED = 3, CLASS_DEFINITION_MODIFIERS_ETS_MODULE = 8196 } @@ -454,36 +667,37 @@ export enum Es2pandaOperandType { } export enum Es2pandaTypeRelationFlag { TYPE_RELATION_FLAG_NONE = 0, - TYPE_RELATION_FLAG_NARROWING = 1, - TYPE_RELATION_FLAG_WIDENING = 2, - TYPE_RELATION_FLAG_BOXING = 4, - TYPE_RELATION_FLAG_UNBOXING = 8, - TYPE_RELATION_FLAG_CAPTURE = 16, - TYPE_RELATION_FLAG_STRING = 32, - TYPE_RELATION_FLAG_VALUE_SET = 64, - TYPE_RELATION_FLAG_UNCHECKED = 128, - TYPE_RELATION_FLAG_NO_THROW = 256, - TYPE_RELATION_FLAG_SELF_REFERENCE = 512, - TYPE_RELATION_FLAG_NO_RETURN_TYPE_CHECK = 1024, - TYPE_RELATION_FLAG_DIRECT_RETURN = 2048, - TYPE_RELATION_FLAG_NO_WIDENING = 4096, - TYPE_RELATION_FLAG_NO_BOXING = 8192, - TYPE_RELATION_FLAG_NO_UNBOXING = 16384, - TYPE_RELATION_FLAG_ONLY_CHECK_WIDENING = 32768, - TYPE_RELATION_FLAG_ONLY_CHECK_BOXING_UNBOXING = 65536, - TYPE_RELATION_FLAG_IN_ASSIGNMENT_CONTEXT = 131072, - TYPE_RELATION_FLAG_IN_CASTING_CONTEXT = 262144, - TYPE_RELATION_FLAG_UNCHECKED_CAST = 524288, - TYPE_RELATION_FLAG_IGNORE_TYPE_PARAMETERS = 1048576, - TYPE_RELATION_FLAG_CHECK_PROXY = 2097152, - TYPE_RELATION_FLAG_NO_CHECK_TRAILING_LAMBDA = 4194304, - TYPE_RELATION_FLAG_NO_THROW_GENERIC_TYPEALIAS = 8388608, - TYPE_RELATION_FLAG_OVERRIDING_CONTEXT = 16777216, - TYPE_RELATION_FLAG_IGNORE_REST_PARAM = 33554432, - TYPE_RELATION_FLAG_STRING_TO_CHAR = 67108864, - TYPE_RELATION_FLAG_ASSIGNMENT_CONTEXT = 14, - TYPE_RELATION_FLAG_BRIDGE_CHECK = 17826816, - TYPE_RELATION_FLAG_CASTING_CONTEXT = 524303 + TYPE_RELATION_FLAG_WIDENING = 1, + TYPE_RELATION_FLAG_BOXING = 2, + TYPE_RELATION_FLAG_UNBOXING = 4, + TYPE_RELATION_FLAG_CAPTURE = 8, + TYPE_RELATION_FLAG_STRING = 16, + TYPE_RELATION_FLAG_VALUE_SET = 32, + TYPE_RELATION_FLAG_UNCHECKED = 64, + TYPE_RELATION_FLAG_NO_THROW = 128, + TYPE_RELATION_FLAG_SELF_REFERENCE = 256, + TYPE_RELATION_FLAG_NO_RETURN_TYPE_CHECK = 512, + TYPE_RELATION_FLAG_DIRECT_RETURN = 1024, + TYPE_RELATION_FLAG_NO_WIDENING = 2048, + TYPE_RELATION_FLAG_NO_BOXING = 4096, + TYPE_RELATION_FLAG_NO_UNBOXING = 8192, + TYPE_RELATION_FLAG_ONLY_CHECK_WIDENING = 16384, + TYPE_RELATION_FLAG_ONLY_CHECK_BOXING_UNBOXING = 32768, + TYPE_RELATION_FLAG_IN_ASSIGNMENT_CONTEXT = 65536, + TYPE_RELATION_FLAG_IN_CASTING_CONTEXT = 131072, + TYPE_RELATION_FLAG_UNCHECKED_CAST = 262144, + TYPE_RELATION_FLAG_IGNORE_TYPE_PARAMETERS = 524288, + TYPE_RELATION_FLAG_CHECK_PROXY = 1048576, + TYPE_RELATION_FLAG_NO_CHECK_TRAILING_LAMBDA = 2097152, + TYPE_RELATION_FLAG_NO_THROW_GENERIC_TYPEALIAS = 4194304, + TYPE_RELATION_FLAG_OVERRIDING_CONTEXT = 8388608, + TYPE_RELATION_FLAG_IGNORE_REST_PARAM = 16777216, + TYPE_RELATION_FLAG_STRING_TO_CHAR = 33554432, + TYPE_RELATION_FLAG_OVERLOADING_CONTEXT = 67108864, + TYPE_RELATION_FLAG_NO_SUBSTITUTION_NEEDED = 134217728, + TYPE_RELATION_FLAG_ASSIGNMENT_CONTEXT = 7, + TYPE_RELATION_FLAG_BRIDGE_CHECK = 8912896, + TYPE_RELATION_FLAG_CASTING_CONTEXT = 262151 } export enum Es2pandaRelationResult { RELATION_RESULT_TRUE = 0, @@ -600,6 +814,7 @@ export enum Es2pandaSignatureFlags { SIGNATURE_FLAGS_RETHROWS = 131072, SIGNATURE_FLAGS_EXTENSION_FUNCTION = 262144, SIGNATURE_FLAGS_DUPLICATE_ASM = 524288, + SIGNATURE_FLAGS_BRIDGE = 1048576, SIGNATURE_FLAGS_INTERNAL_PROTECTED = 1040, SIGNATURE_FLAGS_GETTER_OR_SETTER = 49152, SIGNATURE_FLAGS_THROWING = 196608 @@ -733,150 +948,153 @@ export enum Es2pandaGlobalTypeId { GLOBAL_TYPE_ID_ETS_OBJECT_BUILTIN = 33, GLOBAL_TYPE_ID_ETS_NULL = 34, GLOBAL_TYPE_ID_ETS_UNDEFINED = 35, - GLOBAL_TYPE_ID_ETS_NULLISH_TYPE = 36, - GLOBAL_TYPE_ID_ETS_NEVER = 37, - GLOBAL_TYPE_ID_ETS_NULLISH_OBJECT = 38, - GLOBAL_TYPE_ID_ETS_WILDCARD = 39, - GLOBAL_TYPE_ID_ETS_BOOLEAN_BUILTIN = 40, - GLOBAL_TYPE_ID_ETS_BYTE_BUILTIN = 41, - GLOBAL_TYPE_ID_ETS_CHAR_BUILTIN = 42, - GLOBAL_TYPE_ID_ETS_COMPARABLE_BUILTIN = 43, - GLOBAL_TYPE_ID_ETS_CONSOLE_BUILTIN = 44, - GLOBAL_TYPE_ID_ETS_DATE_BUILTIN = 45, - GLOBAL_TYPE_ID_ETS_DOUBLE_BUILTIN = 46, - GLOBAL_TYPE_ID_ETS_EXCEPTION_BUILTIN = 47, - GLOBAL_TYPE_ID_ETS_FLOAT_BUILTIN = 48, - GLOBAL_TYPE_ID_ETS_FLOATING_BUILTIN = 49, - GLOBAL_TYPE_ID_ETS_INT_BUILTIN = 50, - GLOBAL_TYPE_ID_ETS_INTEGRAL_BUILTIN = 51, - GLOBAL_TYPE_ID_ETS_LONG_BUILTIN = 52, - GLOBAL_TYPE_ID_ETS_MAP_BUILTIN = 53, - GLOBAL_TYPE_ID_ETS_ERROR_BUILTIN = 54, - GLOBAL_TYPE_ID_ETS_RUNTIME_BUILTIN = 55, - GLOBAL_TYPE_ID_ETS_RUNTIME_LINKER_BUILTIN = 56, - GLOBAL_TYPE_ID_ETS_SET_BUILTIN = 57, - GLOBAL_TYPE_ID_ETS_SHORT_BUILTIN = 58, - GLOBAL_TYPE_ID_ETS_STACK_TRACE_ELEMENT_BUILTIN = 59, - GLOBAL_TYPE_ID_ETS_STACK_TRACE_BUILTIN = 60, - GLOBAL_TYPE_ID_ETS_ARRAY_INDEX_OUT_OF_BOUNDS_ERROR_BUILTIN = 61, - GLOBAL_TYPE_ID_ETS_ARITHMETIC_ERROR_BUILTIN = 62, - GLOBAL_TYPE_ID_ETS_CLASS_CAST_ERROR_BUILTIN = 63, - GLOBAL_TYPE_ID_ETS_ASSERTION_ERROR_BUILTIN = 64, - GLOBAL_TYPE_ID_ETS_DIVIDE_BY_ZERO_ERROR_BUILTIN = 65, - GLOBAL_TYPE_ID_ETS_NULL_POINTER_ERROR_BUILTIN = 66, - GLOBAL_TYPE_ID_ETS_UNCAUGHT_EXCEPTION_ERROR_BUILTIN = 67, - GLOBAL_TYPE_ID_ETS_STRING_BUILTIN = 68, - GLOBAL_TYPE_ID_ETS_STRING_BUILDER_BUILTIN = 69, - GLOBAL_TYPE_ID_ETS_TYPE_BUILTIN = 70, - GLOBAL_TYPE_ID_ETS_TYPES_BUILTIN = 71, - GLOBAL_TYPE_ID_ETS_PROMISE_BUILTIN = 72, - GLOBAL_TYPE_ID_ETS_FUNCTION_BUILTIN = 73, - GLOBAL_TYPE_ID_ETS_REGEXP_BUILTIN = 74, - GLOBAL_TYPE_ID_ETS_ARRAY_BUILTIN = 75, - GLOBAL_TYPE_ID_ETS_ARRAY = 76, - GLOBAL_TYPE_ID_ETS_INTEROP_JSRUNTIME_BUILTIN = 77, - GLOBAL_TYPE_ID_ETS_INTEROP_JSVALUE_BUILTIN = 78, - GLOBAL_TYPE_ID_ETS_BOX_BUILTIN = 79, - GLOBAL_TYPE_ID_ETS_BOOLEAN_BOX_BUILTIN = 80, - GLOBAL_TYPE_ID_ETS_BYTE_BOX_BUILTIN = 81, - GLOBAL_TYPE_ID_ETS_CHAR_BOX_BUILTIN = 82, - GLOBAL_TYPE_ID_ETS_SHORT_BOX_BUILTIN = 83, - GLOBAL_TYPE_ID_ETS_INT_BOX_BUILTIN = 84, - GLOBAL_TYPE_ID_ETS_LONG_BOX_BUILTIN = 85, - GLOBAL_TYPE_ID_ETS_FLOAT_BOX_BUILTIN = 86, - GLOBAL_TYPE_ID_ETS_DOUBLE_BOX_BUILTIN = 87, - GLOBAL_TYPE_ID_ETS_BIG_INT_BUILTIN = 88, - GLOBAL_TYPE_ID_ETS_BIG_INT = 89, - GLOBAL_TYPE_ID_ETS_FUNCTION0_CLASS = 90, - GLOBAL_TYPE_ID_ETS_FUNCTION1_CLASS = 91, - GLOBAL_TYPE_ID_ETS_FUNCTION2_CLASS = 92, - GLOBAL_TYPE_ID_ETS_FUNCTION3_CLASS = 93, - GLOBAL_TYPE_ID_ETS_FUNCTION4_CLASS = 94, - GLOBAL_TYPE_ID_ETS_FUNCTION5_CLASS = 95, - GLOBAL_TYPE_ID_ETS_FUNCTION6_CLASS = 96, - GLOBAL_TYPE_ID_ETS_FUNCTION7_CLASS = 97, - GLOBAL_TYPE_ID_ETS_FUNCTION8_CLASS = 98, - GLOBAL_TYPE_ID_ETS_FUNCTION9_CLASS = 99, - GLOBAL_TYPE_ID_ETS_FUNCTION10_CLASS = 100, - GLOBAL_TYPE_ID_ETS_FUNCTION11_CLASS = 101, - GLOBAL_TYPE_ID_ETS_FUNCTION12_CLASS = 102, - GLOBAL_TYPE_ID_ETS_FUNCTION13_CLASS = 103, - GLOBAL_TYPE_ID_ETS_FUNCTION14_CLASS = 104, - GLOBAL_TYPE_ID_ETS_FUNCTION15_CLASS = 105, - GLOBAL_TYPE_ID_ETS_FUNCTION16_CLASS = 106, - GLOBAL_TYPE_ID_ETS_FUNCTIONN_CLASS = 107, - GLOBAL_TYPE_ID_ETS_LAMBDA0_CLASS = 108, - GLOBAL_TYPE_ID_ETS_LAMBDA1_CLASS = 109, - GLOBAL_TYPE_ID_ETS_LAMBDA2_CLASS = 110, - GLOBAL_TYPE_ID_ETS_LAMBDA3_CLASS = 111, - GLOBAL_TYPE_ID_ETS_LAMBDA4_CLASS = 112, - GLOBAL_TYPE_ID_ETS_LAMBDA5_CLASS = 113, - GLOBAL_TYPE_ID_ETS_LAMBDA6_CLASS = 114, - GLOBAL_TYPE_ID_ETS_LAMBDA7_CLASS = 115, - GLOBAL_TYPE_ID_ETS_LAMBDA8_CLASS = 116, - GLOBAL_TYPE_ID_ETS_LAMBDA9_CLASS = 117, - GLOBAL_TYPE_ID_ETS_LAMBDA10_CLASS = 118, - GLOBAL_TYPE_ID_ETS_LAMBDA11_CLASS = 119, - GLOBAL_TYPE_ID_ETS_LAMBDA12_CLASS = 120, - GLOBAL_TYPE_ID_ETS_LAMBDA13_CLASS = 121, - GLOBAL_TYPE_ID_ETS_LAMBDA14_CLASS = 122, - GLOBAL_TYPE_ID_ETS_LAMBDA15_CLASS = 123, - GLOBAL_TYPE_ID_ETS_LAMBDA16_CLASS = 124, - GLOBAL_TYPE_ID_ETS_LAMBDAN_CLASS = 125, - GLOBAL_TYPE_ID_ETS_FUNCTIONR0_CLASS = 126, - GLOBAL_TYPE_ID_ETS_FUNCTIONR1_CLASS = 127, - GLOBAL_TYPE_ID_ETS_FUNCTIONR2_CLASS = 128, - GLOBAL_TYPE_ID_ETS_FUNCTIONR3_CLASS = 129, - GLOBAL_TYPE_ID_ETS_FUNCTIONR4_CLASS = 130, - GLOBAL_TYPE_ID_ETS_FUNCTIONR5_CLASS = 131, - GLOBAL_TYPE_ID_ETS_FUNCTIONR6_CLASS = 132, - GLOBAL_TYPE_ID_ETS_FUNCTIONR7_CLASS = 133, - GLOBAL_TYPE_ID_ETS_FUNCTIONR8_CLASS = 134, - GLOBAL_TYPE_ID_ETS_FUNCTIONR9_CLASS = 135, - GLOBAL_TYPE_ID_ETS_FUNCTIONR10_CLASS = 136, - GLOBAL_TYPE_ID_ETS_FUNCTIONR11_CLASS = 137, - GLOBAL_TYPE_ID_ETS_FUNCTIONR12_CLASS = 138, - GLOBAL_TYPE_ID_ETS_FUNCTIONR13_CLASS = 139, - GLOBAL_TYPE_ID_ETS_FUNCTIONR14_CLASS = 140, - GLOBAL_TYPE_ID_ETS_FUNCTIONR15_CLASS = 141, - GLOBAL_TYPE_ID_ETS_FUNCTIONR16_CLASS = 142, - GLOBAL_TYPE_ID_ETS_LAMBDAR0_CLASS = 143, - GLOBAL_TYPE_ID_ETS_LAMBDAR1_CLASS = 144, - GLOBAL_TYPE_ID_ETS_LAMBDAR2_CLASS = 145, - GLOBAL_TYPE_ID_ETS_LAMBDAR3_CLASS = 146, - GLOBAL_TYPE_ID_ETS_LAMBDAR4_CLASS = 147, - GLOBAL_TYPE_ID_ETS_LAMBDAR5_CLASS = 148, - GLOBAL_TYPE_ID_ETS_LAMBDAR6_CLASS = 149, - GLOBAL_TYPE_ID_ETS_LAMBDAR7_CLASS = 150, - GLOBAL_TYPE_ID_ETS_LAMBDAR8_CLASS = 151, - GLOBAL_TYPE_ID_ETS_LAMBDAR9_CLASS = 152, - GLOBAL_TYPE_ID_ETS_LAMBDAR10_CLASS = 153, - GLOBAL_TYPE_ID_ETS_LAMBDAR11_CLASS = 154, - GLOBAL_TYPE_ID_ETS_LAMBDAR12_CLASS = 155, - GLOBAL_TYPE_ID_ETS_LAMBDAR13_CLASS = 156, - GLOBAL_TYPE_ID_ETS_LAMBDAR14_CLASS = 157, - GLOBAL_TYPE_ID_ETS_LAMBDAR15_CLASS = 158, - GLOBAL_TYPE_ID_ETS_LAMBDAR16_CLASS = 159, - GLOBAL_TYPE_ID_ETS_TUPLE0_CLASS = 160, - GLOBAL_TYPE_ID_ETS_TUPLE1_CLASS = 161, - GLOBAL_TYPE_ID_ETS_TUPLE2_CLASS = 162, - GLOBAL_TYPE_ID_ETS_TUPLE3_CLASS = 163, - GLOBAL_TYPE_ID_ETS_TUPLE4_CLASS = 164, - GLOBAL_TYPE_ID_ETS_TUPLE5_CLASS = 165, - GLOBAL_TYPE_ID_ETS_TUPLE6_CLASS = 166, - GLOBAL_TYPE_ID_ETS_TUPLE7_CLASS = 167, - GLOBAL_TYPE_ID_ETS_TUPLE8_CLASS = 168, - GLOBAL_TYPE_ID_ETS_TUPLE9_CLASS = 169, - GLOBAL_TYPE_ID_ETS_TUPLE10_CLASS = 170, - GLOBAL_TYPE_ID_ETS_TUPLE11_CLASS = 171, - GLOBAL_TYPE_ID_ETS_TUPLE12_CLASS = 172, - GLOBAL_TYPE_ID_ETS_TUPLE13_CLASS = 173, - GLOBAL_TYPE_ID_ETS_TUPLE14_CLASS = 174, - GLOBAL_TYPE_ID_ETS_TUPLE15_CLASS = 175, - GLOBAL_TYPE_ID_ETS_TUPLE16_CLASS = 176, - GLOBAL_TYPE_ID_ETS_TUPLEN_CLASS = 177, - GLOBAL_TYPE_ID_TYPE_ERROR = 178, - GLOBAL_TYPE_ID_COUNT = 179 + GLOBAL_TYPE_ID_ETS_UNION_UNDEFINED_NULL = 36, + GLOBAL_TYPE_ID_ETS_ANY = 37, + GLOBAL_TYPE_ID_ETS_NEVER = 38, + GLOBAL_TYPE_ID_ETS_UNION_UNDEFINED_NULL_OBJECT = 39, + GLOBAL_TYPE_ID_ETS_WILDCARD = 40, + GLOBAL_TYPE_ID_ETS_BOOLEAN_BUILTIN = 41, + GLOBAL_TYPE_ID_ETS_BYTE_BUILTIN = 42, + GLOBAL_TYPE_ID_ETS_CHAR_BUILTIN = 43, + GLOBAL_TYPE_ID_ETS_COMPARABLE_BUILTIN = 44, + GLOBAL_TYPE_ID_ETS_CONSOLE_BUILTIN = 45, + GLOBAL_TYPE_ID_ETS_DATE_BUILTIN = 46, + GLOBAL_TYPE_ID_ETS_DOUBLE_BUILTIN = 47, + GLOBAL_TYPE_ID_ETS_EXCEPTION_BUILTIN = 48, + GLOBAL_TYPE_ID_ETS_FLOAT_BUILTIN = 49, + GLOBAL_TYPE_ID_ETS_FLOATING_BUILTIN = 50, + GLOBAL_TYPE_ID_ETS_INT_BUILTIN = 51, + GLOBAL_TYPE_ID_ETS_INTEGRAL_BUILTIN = 52, + GLOBAL_TYPE_ID_ETS_LONG_BUILTIN = 53, + GLOBAL_TYPE_ID_ETS_NUMERIC_BUILTIN = 54, + GLOBAL_TYPE_ID_ETS_MAP_BUILTIN = 55, + GLOBAL_TYPE_ID_ETS_RECORD_BUILTIN = 56, + GLOBAL_TYPE_ID_ETS_ERROR_BUILTIN = 57, + GLOBAL_TYPE_ID_ETS_RUNTIME_BUILTIN = 58, + GLOBAL_TYPE_ID_ETS_RUNTIME_LINKER_BUILTIN = 59, + GLOBAL_TYPE_ID_ETS_SET_BUILTIN = 60, + GLOBAL_TYPE_ID_ETS_SHORT_BUILTIN = 61, + GLOBAL_TYPE_ID_ETS_STACK_TRACE_ELEMENT_BUILTIN = 62, + GLOBAL_TYPE_ID_ETS_STACK_TRACE_BUILTIN = 63, + GLOBAL_TYPE_ID_ETS_ARRAY_INDEX_OUT_OF_BOUNDS_ERROR_BUILTIN = 64, + GLOBAL_TYPE_ID_ETS_ARITHMETIC_ERROR_BUILTIN = 65, + GLOBAL_TYPE_ID_ETS_CLASS_CAST_ERROR_BUILTIN = 66, + GLOBAL_TYPE_ID_ETS_ASSERTION_ERROR_BUILTIN = 67, + GLOBAL_TYPE_ID_ETS_DIVIDE_BY_ZERO_ERROR_BUILTIN = 68, + GLOBAL_TYPE_ID_ETS_NULL_POINTER_ERROR_BUILTIN = 69, + GLOBAL_TYPE_ID_ETS_UNCAUGHT_EXCEPTION_ERROR_BUILTIN = 70, + GLOBAL_TYPE_ID_ETS_STRING_BUILTIN = 71, + GLOBAL_TYPE_ID_ETS_STRING_BUILDER_BUILTIN = 72, + GLOBAL_TYPE_ID_ETS_TYPE_BUILTIN = 73, + GLOBAL_TYPE_ID_ETS_TYPES_BUILTIN = 74, + GLOBAL_TYPE_ID_ETS_PROMISE_BUILTIN = 75, + GLOBAL_TYPE_ID_ETS_FUNCTION_BUILTIN = 76, + GLOBAL_TYPE_ID_ETS_REGEXP_BUILTIN = 77, + GLOBAL_TYPE_ID_ETS_ARRAY_BUILTIN = 78, + GLOBAL_TYPE_ID_ETS_INTEROP_JSRUNTIME_BUILTIN = 79, + GLOBAL_TYPE_ID_ETS_INTEROP_JSVALUE_BUILTIN = 80, + GLOBAL_TYPE_ID_ETS_BOX_BUILTIN = 81, + GLOBAL_TYPE_ID_ETS_BOOLEAN_BOX_BUILTIN = 82, + GLOBAL_TYPE_ID_ETS_BYTE_BOX_BUILTIN = 83, + GLOBAL_TYPE_ID_ETS_CHAR_BOX_BUILTIN = 84, + GLOBAL_TYPE_ID_ETS_SHORT_BOX_BUILTIN = 85, + GLOBAL_TYPE_ID_ETS_INT_BOX_BUILTIN = 86, + GLOBAL_TYPE_ID_ETS_LONG_BOX_BUILTIN = 87, + GLOBAL_TYPE_ID_ETS_FLOAT_BOX_BUILTIN = 88, + GLOBAL_TYPE_ID_ETS_DOUBLE_BOX_BUILTIN = 89, + GLOBAL_TYPE_ID_ETS_BIG_INT_BUILTIN = 90, + GLOBAL_TYPE_ID_ETS_BIG_INT = 91, + GLOBAL_TYPE_ID_ETS_ARRAY = 92, + GLOBAL_TYPE_ID_ETS_FUNCTION0_CLASS = 93, + GLOBAL_TYPE_ID_ETS_FUNCTION1_CLASS = 94, + GLOBAL_TYPE_ID_ETS_FUNCTION2_CLASS = 95, + GLOBAL_TYPE_ID_ETS_FUNCTION3_CLASS = 96, + GLOBAL_TYPE_ID_ETS_FUNCTION4_CLASS = 97, + GLOBAL_TYPE_ID_ETS_FUNCTION5_CLASS = 98, + GLOBAL_TYPE_ID_ETS_FUNCTION6_CLASS = 99, + GLOBAL_TYPE_ID_ETS_FUNCTION7_CLASS = 100, + GLOBAL_TYPE_ID_ETS_FUNCTION8_CLASS = 101, + GLOBAL_TYPE_ID_ETS_FUNCTION9_CLASS = 102, + GLOBAL_TYPE_ID_ETS_FUNCTION10_CLASS = 103, + GLOBAL_TYPE_ID_ETS_FUNCTION11_CLASS = 104, + GLOBAL_TYPE_ID_ETS_FUNCTION12_CLASS = 105, + GLOBAL_TYPE_ID_ETS_FUNCTION13_CLASS = 106, + GLOBAL_TYPE_ID_ETS_FUNCTION14_CLASS = 107, + GLOBAL_TYPE_ID_ETS_FUNCTION15_CLASS = 108, + GLOBAL_TYPE_ID_ETS_FUNCTION16_CLASS = 109, + GLOBAL_TYPE_ID_ETS_FUNCTIONN_CLASS = 110, + GLOBAL_TYPE_ID_ETS_LAMBDA0_CLASS = 111, + GLOBAL_TYPE_ID_ETS_LAMBDA1_CLASS = 112, + GLOBAL_TYPE_ID_ETS_LAMBDA2_CLASS = 113, + GLOBAL_TYPE_ID_ETS_LAMBDA3_CLASS = 114, + GLOBAL_TYPE_ID_ETS_LAMBDA4_CLASS = 115, + GLOBAL_TYPE_ID_ETS_LAMBDA5_CLASS = 116, + GLOBAL_TYPE_ID_ETS_LAMBDA6_CLASS = 117, + GLOBAL_TYPE_ID_ETS_LAMBDA7_CLASS = 118, + GLOBAL_TYPE_ID_ETS_LAMBDA8_CLASS = 119, + GLOBAL_TYPE_ID_ETS_LAMBDA9_CLASS = 120, + GLOBAL_TYPE_ID_ETS_LAMBDA10_CLASS = 121, + GLOBAL_TYPE_ID_ETS_LAMBDA11_CLASS = 122, + GLOBAL_TYPE_ID_ETS_LAMBDA12_CLASS = 123, + GLOBAL_TYPE_ID_ETS_LAMBDA13_CLASS = 124, + GLOBAL_TYPE_ID_ETS_LAMBDA14_CLASS = 125, + GLOBAL_TYPE_ID_ETS_LAMBDA15_CLASS = 126, + GLOBAL_TYPE_ID_ETS_LAMBDA16_CLASS = 127, + GLOBAL_TYPE_ID_ETS_LAMBDAN_CLASS = 128, + GLOBAL_TYPE_ID_ETS_FUNCTIONR0_CLASS = 129, + GLOBAL_TYPE_ID_ETS_FUNCTIONR1_CLASS = 130, + GLOBAL_TYPE_ID_ETS_FUNCTIONR2_CLASS = 131, + GLOBAL_TYPE_ID_ETS_FUNCTIONR3_CLASS = 132, + GLOBAL_TYPE_ID_ETS_FUNCTIONR4_CLASS = 133, + GLOBAL_TYPE_ID_ETS_FUNCTIONR5_CLASS = 134, + GLOBAL_TYPE_ID_ETS_FUNCTIONR6_CLASS = 135, + GLOBAL_TYPE_ID_ETS_FUNCTIONR7_CLASS = 136, + GLOBAL_TYPE_ID_ETS_FUNCTIONR8_CLASS = 137, + GLOBAL_TYPE_ID_ETS_FUNCTIONR9_CLASS = 138, + GLOBAL_TYPE_ID_ETS_FUNCTIONR10_CLASS = 139, + GLOBAL_TYPE_ID_ETS_FUNCTIONR11_CLASS = 140, + GLOBAL_TYPE_ID_ETS_FUNCTIONR12_CLASS = 141, + GLOBAL_TYPE_ID_ETS_FUNCTIONR13_CLASS = 142, + GLOBAL_TYPE_ID_ETS_FUNCTIONR14_CLASS = 143, + GLOBAL_TYPE_ID_ETS_FUNCTIONR15_CLASS = 144, + GLOBAL_TYPE_ID_ETS_FUNCTIONR16_CLASS = 145, + GLOBAL_TYPE_ID_ETS_LAMBDAR0_CLASS = 146, + GLOBAL_TYPE_ID_ETS_LAMBDAR1_CLASS = 147, + GLOBAL_TYPE_ID_ETS_LAMBDAR2_CLASS = 148, + GLOBAL_TYPE_ID_ETS_LAMBDAR3_CLASS = 149, + GLOBAL_TYPE_ID_ETS_LAMBDAR4_CLASS = 150, + GLOBAL_TYPE_ID_ETS_LAMBDAR5_CLASS = 151, + GLOBAL_TYPE_ID_ETS_LAMBDAR6_CLASS = 152, + GLOBAL_TYPE_ID_ETS_LAMBDAR7_CLASS = 153, + GLOBAL_TYPE_ID_ETS_LAMBDAR8_CLASS = 154, + GLOBAL_TYPE_ID_ETS_LAMBDAR9_CLASS = 155, + GLOBAL_TYPE_ID_ETS_LAMBDAR10_CLASS = 156, + GLOBAL_TYPE_ID_ETS_LAMBDAR11_CLASS = 157, + GLOBAL_TYPE_ID_ETS_LAMBDAR12_CLASS = 158, + GLOBAL_TYPE_ID_ETS_LAMBDAR13_CLASS = 159, + GLOBAL_TYPE_ID_ETS_LAMBDAR14_CLASS = 160, + GLOBAL_TYPE_ID_ETS_LAMBDAR15_CLASS = 161, + GLOBAL_TYPE_ID_ETS_LAMBDAR16_CLASS = 162, + GLOBAL_TYPE_ID_ETS_TUPLE0_CLASS = 163, + GLOBAL_TYPE_ID_ETS_TUPLE1_CLASS = 164, + GLOBAL_TYPE_ID_ETS_TUPLE2_CLASS = 165, + GLOBAL_TYPE_ID_ETS_TUPLE3_CLASS = 166, + GLOBAL_TYPE_ID_ETS_TUPLE4_CLASS = 167, + GLOBAL_TYPE_ID_ETS_TUPLE5_CLASS = 168, + GLOBAL_TYPE_ID_ETS_TUPLE6_CLASS = 169, + GLOBAL_TYPE_ID_ETS_TUPLE7_CLASS = 170, + GLOBAL_TYPE_ID_ETS_TUPLE8_CLASS = 171, + GLOBAL_TYPE_ID_ETS_TUPLE9_CLASS = 172, + GLOBAL_TYPE_ID_ETS_TUPLE10_CLASS = 173, + GLOBAL_TYPE_ID_ETS_TUPLE11_CLASS = 174, + GLOBAL_TYPE_ID_ETS_TUPLE12_CLASS = 175, + GLOBAL_TYPE_ID_ETS_TUPLE13_CLASS = 176, + GLOBAL_TYPE_ID_ETS_TUPLE14_CLASS = 177, + GLOBAL_TYPE_ID_ETS_TUPLE15_CLASS = 178, + GLOBAL_TYPE_ID_ETS_TUPLE16_CLASS = 179, + GLOBAL_TYPE_ID_ETS_TUPLEN_CLASS = 180, + GLOBAL_TYPE_ID_TYPE_ERROR = 181, + GLOBAL_TYPE_ID_COUNT = 182 } export enum Es2pandaMethodDefinitionKind { METHOD_DEFINITION_KIND_NONE = 0, @@ -1075,12 +1293,11 @@ export enum Es2pandaProgramFlags { PROGRAM_FLAGS_AST_CHECK_PROCESSED = 2, PROGRAM_FLAGS_AST_ENUM_LOWERED = 4, PROGRAM_FLAGS_AST_BOXED_TYPE_LOWERED = 8, - PROGRAM_FLAGS_AST_CONST_STRING_TO_CHAR_LOWERED = 16, - PROGRAM_FLAGS_AST_CONSTANT_EXPRESSION_LOWERED = 32, - PROGRAM_FLAGS_AST_STRING_CONSTANT_LOWERED = 64, - PROGRAM_FLAGS_AST_IDENTIFIER_ANALYZED = 128, - PROGRAM_FLAGS_AST_HAS_SCOPES_INITIALIZED = 256, - PROGRAM_FLAGS_AST_HAS_OPTIONAL_PARAMETER_ANNOTATION = 512 + PROGRAM_FLAGS_AST_CONSTANT_EXPRESSION_LOWERED = 16, + PROGRAM_FLAGS_AST_STRING_CONSTANT_LOWERED = 32, + PROGRAM_FLAGS_AST_IDENTIFIER_ANALYZED = 64, + PROGRAM_FLAGS_AST_HAS_SCOPES_INITIALIZED = 128, + PROGRAM_FLAGS_AST_HAS_OPTIONAL_PARAMETER_ANNOTATION = 256 } export enum Es2pandaCompilationMode { COMPILATION_MODE_GEN_STD_LIB = 0, @@ -1097,234 +1314,200 @@ export enum Es2pandaModuleKind { MODULE_KIND_DECLARATION = 1, MODULE_KIND_PACKAGE = 2 } -export enum Es2pandaEnum { - ENUM_NODE_HAS_PARENT = 0, - ENUM_NODE_HAS_SOURCE_RANGE = 1, - ENUM_EVERY_CHILD_HAS_VALID_PARENT = 2, - ENUM_EVERY_CHILD_IN_PARENT_RANGE = 3, - ENUM_CHECK_STRUCT_DECLARATION = 4, - ENUM_VARIABLE_HAS_SCOPE = 5, - ENUM_NODE_HAS_TYPE = 6, - ENUM_NO_PRIMITIVE_TYPES = 7, - ENUM_IDENTIFIER_HAS_VARIABLE = 8, - ENUM_REFERENCE_TYPE_ANNOTATION_IS_NULL = 9, - ENUM_ARITHMETIC_OPERATION_VALID = 10, - ENUM_SEQUENCE_EXPRESSION_HAS_LAST_TYPE = 11, - ENUM_FOR_LOOP_CORRECTLY_INITIALIZED = 12, - ENUM_VARIABLE_HAS_ENCLOSING_SCOPE = 13, - ENUM_MODIFIER_ACCESS_VALID = 14, - ENUM_VARIABLE_NAME_IDENTIFIER_NAME_SAME = 15, - ENUM_CHECK_ABSTRACT_METHOD = 16, - ENUM_GETTER_SETTER_VALIDATION = 17, - ENUM_CHECK_SCOPE_DECLARATION = 18, - ENUM_CHECK_CONST_PROPERTIES = 19, - ENUM_COUNT = 20, - ENUM_BASE_FIRST = 0, - ENUM_BASE_LAST = 3, - ENUM_AFTER_PLUGINS_AFTER_PARSE_FIRST = 4, - ENUM_AFTER_PLUGINS_AFTER_PARSE_LAST = 4, - ENUM_AFTER_SCOPES_INIT_PHASE_FIRST = 5, - ENUM_AFTER_SCOPES_INIT_PHASE_LAST = 5, - ENUM_AFTER_CHECKER_PHASE_FIRST = 6, - ENUM_AFTER_CHECKER_PHASE_LAST = 19, - ENUM_FIRST = 0, - ENUM_LAST = 19, - ENUM_INVALID = 20 -} -export enum Es2pandaTokenType { - TOKEN_TYPE_EOS = 0, - TOKEN_TYPE_LITERAL_IDENT = 1, - TOKEN_TYPE_LITERAL_STRING = 2, - TOKEN_TYPE_LITERAL_CHAR = 3, - TOKEN_TYPE_LITERAL_NUMBER = 4, - TOKEN_TYPE_LITERAL_REGEXP = 5, - TOKEN_TYPE_PUNCTUATOR_BITWISE_AND = 6, - TOKEN_TYPE_PUNCTUATOR_BITWISE_OR = 7, - TOKEN_TYPE_PUNCTUATOR_MULTIPLY = 8, - TOKEN_TYPE_PUNCTUATOR_DIVIDE = 9, - TOKEN_TYPE_PUNCTUATOR_MINUS = 10, - TOKEN_TYPE_PUNCTUATOR_EXCLAMATION_MARK = 11, - TOKEN_TYPE_PUNCTUATOR_TILDE = 12, - TOKEN_TYPE_PUNCTUATOR_MINUS_MINUS = 13, - TOKEN_TYPE_PUNCTUATOR_LEFT_SHIFT = 14, - TOKEN_TYPE_PUNCTUATOR_RIGHT_SHIFT = 15, - TOKEN_TYPE_PUNCTUATOR_LESS_THAN_EQUAL = 16, - TOKEN_TYPE_PUNCTUATOR_GREATER_THAN_EQUAL = 17, - TOKEN_TYPE_PUNCTUATOR_MOD = 18, - TOKEN_TYPE_PUNCTUATOR_BITWISE_XOR = 19, - TOKEN_TYPE_PUNCTUATOR_EXPONENTIATION = 20, - TOKEN_TYPE_PUNCTUATOR_MULTIPLY_EQUAL = 21, - TOKEN_TYPE_PUNCTUATOR_EXPONENTIATION_EQUAL = 22, - TOKEN_TYPE_PUNCTUATOR_ARROW = 23, - TOKEN_TYPE_PUNCTUATOR_BACK_TICK = 24, - TOKEN_TYPE_PUNCTUATOR_HASH_MARK = 25, - TOKEN_TYPE_PUNCTUATOR_DIVIDE_EQUAL = 26, - TOKEN_TYPE_PUNCTUATOR_MOD_EQUAL = 27, - TOKEN_TYPE_PUNCTUATOR_MINUS_EQUAL = 28, - TOKEN_TYPE_PUNCTUATOR_LEFT_SHIFT_EQUAL = 29, - TOKEN_TYPE_PUNCTUATOR_RIGHT_SHIFT_EQUAL = 30, - TOKEN_TYPE_PUNCTUATOR_UNSIGNED_RIGHT_SHIFT = 31, - TOKEN_TYPE_PUNCTUATOR_UNSIGNED_RIGHT_SHIFT_EQUAL = 32, - TOKEN_TYPE_PUNCTUATOR_BITWISE_AND_EQUAL = 33, - TOKEN_TYPE_PUNCTUATOR_BITWISE_OR_EQUAL = 34, - TOKEN_TYPE_PUNCTUATOR_LOGICAL_AND_EQUAL = 35, - TOKEN_TYPE_PUNCTUATOR_NULLISH_COALESCING = 36, - TOKEN_TYPE_PUNCTUATOR_LOGICAL_OR_EQUAL = 37, - TOKEN_TYPE_PUNCTUATOR_LOGICAL_NULLISH_EQUAL = 38, - TOKEN_TYPE_PUNCTUATOR_BITWISE_XOR_EQUAL = 39, - TOKEN_TYPE_PUNCTUATOR_PLUS = 40, - TOKEN_TYPE_PUNCTUATOR_PLUS_PLUS = 41, - TOKEN_TYPE_PUNCTUATOR_PLUS_EQUAL = 42, - TOKEN_TYPE_PUNCTUATOR_LESS_THAN = 43, - TOKEN_TYPE_PUNCTUATOR_GREATER_THAN = 44, - TOKEN_TYPE_PUNCTUATOR_EQUAL = 45, - TOKEN_TYPE_PUNCTUATOR_NOT_EQUAL = 46, - TOKEN_TYPE_PUNCTUATOR_STRICT_EQUAL = 47, - TOKEN_TYPE_PUNCTUATOR_NOT_STRICT_EQUAL = 48, - TOKEN_TYPE_PUNCTUATOR_LOGICAL_AND = 49, - TOKEN_TYPE_PUNCTUATOR_LOGICAL_OR = 50, - TOKEN_TYPE_PUNCTUATOR_SUBSTITUTION = 51, - TOKEN_TYPE_PUNCTUATOR_QUESTION_MARK = 52, - TOKEN_TYPE_PUNCTUATOR_QUESTION_DOT = 53, - TOKEN_TYPE_PUNCTUATOR_AT = 54, - TOKEN_TYPE_PUNCTUATOR_FORMAT = 55, - TOKEN_TYPE_PUNCTUATOR_RIGHT_PARENTHESIS = 56, - TOKEN_TYPE_PUNCTUATOR_LEFT_PARENTHESIS = 57, - TOKEN_TYPE_PUNCTUATOR_RIGHT_SQUARE_BRACKET = 58, - TOKEN_TYPE_PUNCTUATOR_LEFT_SQUARE_BRACKET = 59, - TOKEN_TYPE_PUNCTUATOR_RIGHT_BRACE = 60, - TOKEN_TYPE_PUNCTUATOR_PERIOD = 61, - TOKEN_TYPE_PUNCTUATOR_PERIOD_PERIOD_PERIOD = 62, - TOKEN_TYPE_PUNCTUATOR_PERIOD_QUESTION = 63, - TOKEN_TYPE_PUNCTUATOR_LEFT_BRACE = 64, - TOKEN_TYPE_PUNCTUATOR_SEMI_COLON = 65, - TOKEN_TYPE_PUNCTUATOR_COLON = 66, - TOKEN_TYPE_PUNCTUATOR_COMMA = 67, - TOKEN_TYPE_KEYW_ABSTRACT = 68, - TOKEN_TYPE_KEYW_ANY = 69, - TOKEN_TYPE_KEYW_ANYREF = 70, - TOKEN_TYPE_KEYW_ARGUMENTS = 71, - TOKEN_TYPE_KEYW_AS = 72, - TOKEN_TYPE_KEYW_ASSERTS = 73, - TOKEN_TYPE_KEYW_ASYNC = 74, - TOKEN_TYPE_KEYW_AWAIT = 75, - TOKEN_TYPE_KEYW_BIGINT = 76, - TOKEN_TYPE_KEYW_BUILTIN_BIGINT = 77, - TOKEN_TYPE_KEYW_BOOLEAN = 78, - TOKEN_TYPE_KEYW_BUILTIN_BOOLEAN = 79, - TOKEN_TYPE_KEYW_BREAK = 80, - TOKEN_TYPE_KEYW_BYTE = 81, - TOKEN_TYPE_KEYW_BUILTIN_BYTE = 82, - TOKEN_TYPE_KEYW_CASE = 83, - TOKEN_TYPE_KEYW_CATCH = 84, - TOKEN_TYPE_KEYW_CHAR = 85, - TOKEN_TYPE_KEYW_BUILTIN_CHAR = 86, - TOKEN_TYPE_KEYW_CLASS = 87, - TOKEN_TYPE_KEYW_CONST = 88, - TOKEN_TYPE_KEYW_CONSTRUCTOR = 89, - TOKEN_TYPE_KEYW_CONTINUE = 90, - TOKEN_TYPE_KEYW_DATAREF = 91, - TOKEN_TYPE_KEYW_DEBUGGER = 92, - TOKEN_TYPE_KEYW_DECLARE = 93, - TOKEN_TYPE_KEYW_DEFAULT = 94, - TOKEN_TYPE_KEYW_DELETE = 95, - TOKEN_TYPE_KEYW_DO = 96, - TOKEN_TYPE_KEYW_DOUBLE = 97, - TOKEN_TYPE_KEYW_BUILTIN_DOUBLE = 98, - TOKEN_TYPE_KEYW_ELSE = 99, - TOKEN_TYPE_KEYW_ENUM = 100, - TOKEN_TYPE_KEYW_EQREF = 101, - TOKEN_TYPE_KEYW_EVAL = 102, - TOKEN_TYPE_KEYW_EXPORT = 103, - TOKEN_TYPE_KEYW_EXTENDS = 104, - TOKEN_TYPE_KEYW_EXTERNREF = 105, - TOKEN_TYPE_KEYW_F32 = 106, - TOKEN_TYPE_KEYW_F64 = 107, - TOKEN_TYPE_LITERAL_FALSE = 108, - TOKEN_TYPE_KEYW_FINALLY = 109, - TOKEN_TYPE_KEYW_FLOAT = 110, - TOKEN_TYPE_KEYW_BUILTIN_FLOAT = 111, - TOKEN_TYPE_KEYW_FOR = 112, - TOKEN_TYPE_KEYW_FROM = 113, - TOKEN_TYPE_KEYW_FUNCREF = 114, - TOKEN_TYPE_KEYW_FUNCTION = 115, - TOKEN_TYPE_KEYW_GET = 116, - TOKEN_TYPE_KEYW_GLOBAL = 117, - TOKEN_TYPE_KEYW_I8 = 118, - TOKEN_TYPE_KEYW_I16 = 119, - TOKEN_TYPE_KEYW_I31REF = 120, - TOKEN_TYPE_KEYW_I32 = 121, - TOKEN_TYPE_KEYW_I64 = 122, - TOKEN_TYPE_KEYW_IF = 123, - TOKEN_TYPE_KEYW_IMPLEMENTS = 124, - TOKEN_TYPE_KEYW_IMPORT = 125, - TOKEN_TYPE_KEYW_IN = 126, - TOKEN_TYPE_KEYW_INFER = 127, - TOKEN_TYPE_KEYW_INSTANCEOF = 128, - TOKEN_TYPE_KEYW_INT = 129, - TOKEN_TYPE_KEYW_BUILTIN_INT = 130, - TOKEN_TYPE_KEYW_INTERFACE = 131, - TOKEN_TYPE_KEYW_IS = 132, - TOKEN_TYPE_KEYW_ISIZE = 133, - TOKEN_TYPE_KEYW_KEYOF = 134, - TOKEN_TYPE_KEYW_LET = 135, - TOKEN_TYPE_KEYW_LONG = 136, - TOKEN_TYPE_KEYW_BUILTIN_LONG = 137, - TOKEN_TYPE_KEYW_META = 138, - TOKEN_TYPE_KEYW_MODULE = 139, - TOKEN_TYPE_KEYW_NAMESPACE = 140, - TOKEN_TYPE_KEYW_NATIVE = 141, - TOKEN_TYPE_KEYW_NEVER = 142, - TOKEN_TYPE_KEYW_NEW = 143, - TOKEN_TYPE_LITERAL_NULL = 144, - TOKEN_TYPE_KEYW_NUMBER = 145, - TOKEN_TYPE_KEYW_OBJECT = 146, - TOKEN_TYPE_KEYW_BUILTIN_OBJECT = 147, - TOKEN_TYPE_KEYW_OF = 148, - TOKEN_TYPE_KEYW_FINAL = 149, - TOKEN_TYPE_KEYW_OUT = 150, - TOKEN_TYPE_KEYW_OVERRIDE = 151, - TOKEN_TYPE_KEYW_PACKAGE = 152, - TOKEN_TYPE_KEYW_INTERNAL = 153, - TOKEN_TYPE_KEYW_PRIVATE = 154, - TOKEN_TYPE_KEYW_PROTECTED = 155, - TOKEN_TYPE_KEYW_PUBLIC = 156, - TOKEN_TYPE_KEYW_READONLY = 157, - TOKEN_TYPE_KEYW_RETHROWS = 158, - TOKEN_TYPE_KEYW_RETURN = 159, - TOKEN_TYPE_KEYW_REQUIRE = 160, - TOKEN_TYPE_KEYW_SET = 161, - TOKEN_TYPE_KEYW_SHORT = 162, - TOKEN_TYPE_KEYW_BUILTIN_SHORT = 163, - TOKEN_TYPE_KEYW_STATIC = 164, - TOKEN_TYPE_KEYW_STRING = 165, - TOKEN_TYPE_KEYW_BUILTIN_STRING = 166, - TOKEN_TYPE_KEYW_STRUCT = 167, - TOKEN_TYPE_KEYW_SUPER = 168, - TOKEN_TYPE_KEYW_SWITCH = 169, - TOKEN_TYPE_KEYW_TARGET = 170, - TOKEN_TYPE_KEYW_THIS = 171, - TOKEN_TYPE_KEYW_THROW = 172, - TOKEN_TYPE_KEYW_THROWS = 173, - TOKEN_TYPE_LITERAL_TRUE = 174, - TOKEN_TYPE_KEYW_TRY = 175, - TOKEN_TYPE_KEYW_TYPE = 176, - TOKEN_TYPE_KEYW_TYPEOF = 177, - TOKEN_TYPE_KEYW_U8 = 178, - TOKEN_TYPE_KEYW_U16 = 179, - TOKEN_TYPE_KEYW_U32 = 180, - TOKEN_TYPE_KEYW_U64 = 181, - TOKEN_TYPE_KEYW_UNDEFINED = 182, - TOKEN_TYPE_KEYW_UNKNOWN = 183, - TOKEN_TYPE_KEYW_USIZE = 184, - TOKEN_TYPE_KEYW_V128 = 185, - TOKEN_TYPE_KEYW_VAR = 186, - TOKEN_TYPE_KEYW_VOID = 187, - TOKEN_TYPE_KEYW_WHILE = 188, - TOKEN_TYPE_KEYW_WITH = 189, - TOKEN_TYPE_KEYW_YIELD = 190, - TOKEN_TYPE_JS_DOC_START = 191, - TOKEN_TYPE_JS_DOC_END = 192, - TOKEN_TYPE_FIRST_PUNCTUATOR = 6, - TOKEN_TYPE_FIRST_KEYW = 68 -} \ No newline at end of file +// export enum Es2pandaTokenType { +// TOKEN_TYPE_EOS = 0, +// TOKEN_TYPE_LITERAL_IDENT = 1, +// TOKEN_TYPE_LITERAL_STRING = 2, +// TOKEN_TYPE_LITERAL_CHAR = 3, +// TOKEN_TYPE_LITERAL_NUMBER = 4, +// TOKEN_TYPE_LITERAL_REGEXP = 5, +// TOKEN_TYPE_PUNCTUATOR_BITWISE_AND = 6, +// TOKEN_TYPE_PUNCTUATOR_BITWISE_OR = 7, +// TOKEN_TYPE_PUNCTUATOR_MULTIPLY = 8, +// TOKEN_TYPE_PUNCTUATOR_DIVIDE = 9, +// TOKEN_TYPE_PUNCTUATOR_MINUS = 10, +// TOKEN_TYPE_PUNCTUATOR_EXCLAMATION_MARK = 11, +// TOKEN_TYPE_PUNCTUATOR_TILDE = 12, +// TOKEN_TYPE_PUNCTUATOR_MINUS_MINUS = 13, +// TOKEN_TYPE_PUNCTUATOR_LEFT_SHIFT = 14, +// TOKEN_TYPE_PUNCTUATOR_RIGHT_SHIFT = 15, +// TOKEN_TYPE_PUNCTUATOR_LESS_THAN_EQUAL = 16, +// TOKEN_TYPE_PUNCTUATOR_GREATER_THAN_EQUAL = 17, +// TOKEN_TYPE_PUNCTUATOR_MOD = 18, +// TOKEN_TYPE_PUNCTUATOR_BITWISE_XOR = 19, +// TOKEN_TYPE_PUNCTUATOR_EXPONENTIATION = 20, +// TOKEN_TYPE_PUNCTUATOR_MULTIPLY_EQUAL = 21, +// TOKEN_TYPE_PUNCTUATOR_EXPONENTIATION_EQUAL = 22, +// TOKEN_TYPE_PUNCTUATOR_ARROW = 23, +// TOKEN_TYPE_PUNCTUATOR_BACK_TICK = 24, +// TOKEN_TYPE_PUNCTUATOR_HASH_MARK = 25, +// TOKEN_TYPE_PUNCTUATOR_DIVIDE_EQUAL = 26, +// TOKEN_TYPE_PUNCTUATOR_MOD_EQUAL = 27, +// TOKEN_TYPE_PUNCTUATOR_MINUS_EQUAL = 28, +// TOKEN_TYPE_PUNCTUATOR_LEFT_SHIFT_EQUAL = 29, +// TOKEN_TYPE_PUNCTUATOR_RIGHT_SHIFT_EQUAL = 30, +// TOKEN_TYPE_PUNCTUATOR_UNSIGNED_RIGHT_SHIFT = 31, +// TOKEN_TYPE_PUNCTUATOR_UNSIGNED_RIGHT_SHIFT_EQUAL = 32, +// TOKEN_TYPE_PUNCTUATOR_BITWISE_AND_EQUAL = 33, +// TOKEN_TYPE_PUNCTUATOR_BITWISE_OR_EQUAL = 34, +// TOKEN_TYPE_PUNCTUATOR_LOGICAL_AND_EQUAL = 35, +// TOKEN_TYPE_PUNCTUATOR_NULLISH_COALESCING = 36, +// TOKEN_TYPE_PUNCTUATOR_LOGICAL_OR_EQUAL = 37, +// TOKEN_TYPE_PUNCTUATOR_LOGICAL_NULLISH_EQUAL = 38, +// TOKEN_TYPE_PUNCTUATOR_BITWISE_XOR_EQUAL = 39, +// TOKEN_TYPE_PUNCTUATOR_PLUS = 40, +// TOKEN_TYPE_PUNCTUATOR_PLUS_PLUS = 41, +// TOKEN_TYPE_PUNCTUATOR_PLUS_EQUAL = 42, +// TOKEN_TYPE_PUNCTUATOR_LESS_THAN = 43, +// TOKEN_TYPE_PUNCTUATOR_GREATER_THAN = 44, +// TOKEN_TYPE_PUNCTUATOR_EQUAL = 45, +// TOKEN_TYPE_PUNCTUATOR_NOT_EQUAL = 46, +// TOKEN_TYPE_PUNCTUATOR_STRICT_EQUAL = 47, +// TOKEN_TYPE_PUNCTUATOR_NOT_STRICT_EQUAL = 48, +// TOKEN_TYPE_PUNCTUATOR_LOGICAL_AND = 49, +// TOKEN_TYPE_PUNCTUATOR_LOGICAL_OR = 50, +// TOKEN_TYPE_PUNCTUATOR_SUBSTITUTION = 51, +// TOKEN_TYPE_PUNCTUATOR_QUESTION_MARK = 52, +// TOKEN_TYPE_PUNCTUATOR_QUESTION_DOT = 53, +// TOKEN_TYPE_PUNCTUATOR_AT = 54, +// TOKEN_TYPE_PUNCTUATOR_FORMAT = 55, +// TOKEN_TYPE_PUNCTUATOR_RIGHT_PARENTHESIS = 56, +// TOKEN_TYPE_PUNCTUATOR_LEFT_PARENTHESIS = 57, +// TOKEN_TYPE_PUNCTUATOR_RIGHT_SQUARE_BRACKET = 58, +// TOKEN_TYPE_PUNCTUATOR_LEFT_SQUARE_BRACKET = 59, +// TOKEN_TYPE_PUNCTUATOR_RIGHT_BRACE = 60, +// TOKEN_TYPE_PUNCTUATOR_PERIOD = 61, +// TOKEN_TYPE_PUNCTUATOR_PERIOD_PERIOD_PERIOD = 62, +// TOKEN_TYPE_PUNCTUATOR_PERIOD_QUESTION = 63, +// TOKEN_TYPE_PUNCTUATOR_LEFT_BRACE = 64, +// TOKEN_TYPE_PUNCTUATOR_SEMI_COLON = 65, +// TOKEN_TYPE_PUNCTUATOR_COLON = 66, +// TOKEN_TYPE_PUNCTUATOR_COMMA = 67, +// TOKEN_TYPE_KEYW_ABSTRACT = 68, +// TOKEN_TYPE_KEYW_ANY = 69, +// TOKEN_TYPE_KEYW_ANYREF = 70, +// TOKEN_TYPE_KEYW_ARGUMENTS = 71, +// TOKEN_TYPE_KEYW_AS = 72, +// TOKEN_TYPE_KEYW_ASSERTS = 73, +// TOKEN_TYPE_KEYW_ASYNC = 74, +// TOKEN_TYPE_KEYW_AWAIT = 75, +// TOKEN_TYPE_KEYW_BIGINT = 76, +// TOKEN_TYPE_KEYW_BUILTIN_BIGINT = 77, +// TOKEN_TYPE_KEYW_BOOLEAN = 78, +// TOKEN_TYPE_KEYW_BUILTIN_BOOLEAN = 79, +// TOKEN_TYPE_KEYW_BREAK = 80, +// TOKEN_TYPE_KEYW_BYTE = 81, +// TOKEN_TYPE_KEYW_BUILTIN_BYTE = 82, +// TOKEN_TYPE_KEYW_CASE = 83, +// TOKEN_TYPE_KEYW_CATCH = 84, +// TOKEN_TYPE_KEYW_CHAR = 85, +// TOKEN_TYPE_KEYW_BUILTIN_CHAR = 86, +// TOKEN_TYPE_KEYW_CLASS = 87, +// TOKEN_TYPE_KEYW_CONST = 88, +// TOKEN_TYPE_KEYW_CONSTRUCTOR = 89, +// TOKEN_TYPE_KEYW_CONTINUE = 90, +// TOKEN_TYPE_KEYW_DATAREF = 91, +// TOKEN_TYPE_KEYW_DEBUGGER = 92, +// TOKEN_TYPE_KEYW_DECLARE = 93, +// TOKEN_TYPE_KEYW_DEFAULT = 94, +// TOKEN_TYPE_KEYW_DELETE = 95, +// TOKEN_TYPE_KEYW_DO = 96, +// TOKEN_TYPE_KEYW_DOUBLE = 97, +// TOKEN_TYPE_KEYW_BUILTIN_DOUBLE = 98, +// TOKEN_TYPE_KEYW_ELSE = 99, +// TOKEN_TYPE_KEYW_ENUM = 100, +// TOKEN_TYPE_KEYW_EQREF = 101, +// TOKEN_TYPE_KEYW_EVAL = 102, +// TOKEN_TYPE_KEYW_EXPORT = 103, +// TOKEN_TYPE_KEYW_EXTENDS = 104, +// TOKEN_TYPE_KEYW_EXTERNREF = 105, +// TOKEN_TYPE_KEYW_F32 = 106, +// TOKEN_TYPE_KEYW_F64 = 107, +// TOKEN_TYPE_LITERAL_FALSE = 108, +// TOKEN_TYPE_KEYW_FINALLY = 109, +// TOKEN_TYPE_KEYW_FLOAT = 110, +// TOKEN_TYPE_KEYW_BUILTIN_FLOAT = 111, +// TOKEN_TYPE_KEYW_FOR = 112, +// TOKEN_TYPE_KEYW_FROM = 113, +// TOKEN_TYPE_KEYW_FUNCREF = 114, +// TOKEN_TYPE_KEYW_FUNCTION = 115, +// TOKEN_TYPE_KEYW_GET = 116, +// TOKEN_TYPE_KEYW_GLOBAL = 117, +// TOKEN_TYPE_KEYW_I8 = 118, +// TOKEN_TYPE_KEYW_I16 = 119, +// TOKEN_TYPE_KEYW_I31REF = 120, +// TOKEN_TYPE_KEYW_I32 = 121, +// TOKEN_TYPE_KEYW_I64 = 122, +// TOKEN_TYPE_KEYW_IF = 123, +// TOKEN_TYPE_KEYW_IMPLEMENTS = 124, +// TOKEN_TYPE_KEYW_IMPORT = 125, +// TOKEN_TYPE_KEYW_IN = 126, +// TOKEN_TYPE_KEYW_INFER = 127, +// TOKEN_TYPE_KEYW_INSTANCEOF = 128, +// TOKEN_TYPE_KEYW_INT = 129, +// TOKEN_TYPE_KEYW_BUILTIN_INT = 130, +// TOKEN_TYPE_KEYW_INTERFACE = 131, +// TOKEN_TYPE_KEYW_IS = 132, +// TOKEN_TYPE_KEYW_ISIZE = 133, +// TOKEN_TYPE_KEYW_KEYOF = 134, +// TOKEN_TYPE_KEYW_LET = 135, +// TOKEN_TYPE_KEYW_LONG = 136, +// TOKEN_TYPE_KEYW_BUILTIN_LONG = 137, +// TOKEN_TYPE_KEYW_META = 138, +// TOKEN_TYPE_KEYW_MODULE = 139, +// TOKEN_TYPE_KEYW_NAMESPACE = 140, +// TOKEN_TYPE_KEYW_NATIVE = 141, +// TOKEN_TYPE_KEYW_NEVER = 142, +// TOKEN_TYPE_KEYW_NEW = 143, +// TOKEN_TYPE_LITERAL_NULL = 144, +// TOKEN_TYPE_KEYW_NUMBER = 145, +// TOKEN_TYPE_KEYW_OBJECT = 146, +// TOKEN_TYPE_KEYW_BUILTIN_OBJECT = 147, +// TOKEN_TYPE_KEYW_OF = 148, +// TOKEN_TYPE_KEYW_FINAL = 149, +// TOKEN_TYPE_KEYW_OUT = 150, +// TOKEN_TYPE_KEYW_OVERRIDE = 151, +// TOKEN_TYPE_KEYW_PACKAGE = 152, +// TOKEN_TYPE_KEYW_INTERNAL = 153, +// TOKEN_TYPE_KEYW_PRIVATE = 154, +// TOKEN_TYPE_KEYW_PROTECTED = 155, +// TOKEN_TYPE_KEYW_PUBLIC = 156, +// TOKEN_TYPE_KEYW_READONLY = 157, +// TOKEN_TYPE_KEYW_RETHROWS = 158, +// TOKEN_TYPE_KEYW_RETURN = 159, +// TOKEN_TYPE_KEYW_REQUIRE = 160, +// TOKEN_TYPE_KEYW_SET = 161, +// TOKEN_TYPE_KEYW_SHORT = 162, +// TOKEN_TYPE_KEYW_BUILTIN_SHORT = 163, +// TOKEN_TYPE_KEYW_STATIC = 164, +// TOKEN_TYPE_KEYW_STRING = 165, +// TOKEN_TYPE_KEYW_BUILTIN_STRING = 166, +// TOKEN_TYPE_KEYW_STRUCT = 167, +// TOKEN_TYPE_KEYW_SUPER = 168, +// TOKEN_TYPE_KEYW_SWITCH = 169, +// TOKEN_TYPE_KEYW_TARGET = 170, +// TOKEN_TYPE_KEYW_THIS = 171, +// TOKEN_TYPE_KEYW_THROW = 172, +// TOKEN_TYPE_KEYW_THROWS = 173, +// TOKEN_TYPE_LITERAL_TRUE = 174, +// TOKEN_TYPE_KEYW_TRY = 175, +// TOKEN_TYPE_KEYW_TYPE = 176, +// TOKEN_TYPE_KEYW_TYPEOF = 177, +// TOKEN_TYPE_KEYW_U8 = 178, +// TOKEN_TYPE_KEYW_U16 = 179, +// TOKEN_TYPE_KEYW_U32 = 180, +// TOKEN_TYPE_KEYW_U64 = 181, +// TOKEN_TYPE_KEYW_UNDEFINED = 182, +// TOKEN_TYPE_KEYW_UNKNOWN = 183, +// TOKEN_TYPE_KEYW_USIZE = 184, +// TOKEN_TYPE_KEYW_V128 = 185, +// TOKEN_TYPE_KEYW_VAR = 186, +// TOKEN_TYPE_KEYW_VOID = 187, +// TOKEN_TYPE_KEYW_WHILE = 188, +// TOKEN_TYPE_KEYW_WITH = 189, +// TOKEN_TYPE_KEYW_YIELD = 190, +// TOKEN_TYPE_JS_DOC_START = 191, +// TOKEN_TYPE_JS_DOC_END = 192, +// TOKEN_TYPE_FIRST_PUNCTUATOR = 6, +// TOKEN_TYPE_FIRST_KEYW = 68 +// } \ No newline at end of file -- Gitee From 1a4dfef4ad97484c624c8d4f98c01ca9ac061aea Mon Sep 17 00:00:00 2001 From: xieziang Date: Wed, 11 Jun 2025 14:18:16 +0800 Subject: [PATCH 11/17] Revert "revert StageArena" This reverts commit 010c03151a07e66e78a6a920482f3f37436dad4f. Change-Id: I67a20b13a4dbbe529080831702e1847b5de9c691 Signed-off-by: xieziang --- koala-wrapper/native/src/bridges.cc | 22 +- koala-wrapper/native/src/common.cc | 9 +- koala-wrapper/native/src/generated/bridges.cc | 249 +++++++++--------- 3 files changed, 140 insertions(+), 140 deletions(-) diff --git a/koala-wrapper/native/src/bridges.cc b/koala-wrapper/native/src/bridges.cc index 05297cd1b..fde296ecc 100644 --- a/koala-wrapper/native/src/bridges.cc +++ b/koala-wrapper/native/src/bridges.cc @@ -43,7 +43,7 @@ KNativePointer impl_AnnotationAllowedAnnotations(KNativePointer contextPtr, KNat auto node = reinterpret_cast(nodePtr); std::size_t params_len = 0; auto annotations = GetImpl()->AnnotationAllowedAnnotations(context, node, ¶ms_len); - return new std::vector(annotations, annotations + params_len); + return StageArena::cloneVector(annotations, params_len); } KOALA_INTEROP_3(AnnotationAllowedAnnotations, KNativePointer, KNativePointer, KNativePointer, KNativePointer) @@ -53,7 +53,7 @@ KNativePointer impl_AnnotationAllowedAnnotationsConst(KNativePointer contextPtr, auto node = reinterpret_cast(nodePtr); std::size_t params_len = 0; auto annotations = GetImpl()->AnnotationAllowedAnnotationsConst(context, node, ¶ms_len); - return new std::vector(annotations, annotations + params_len); + return StageArena::cloneVector(annotations, params_len); } KOALA_INTEROP_3(AnnotationAllowedAnnotationsConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer) @@ -173,7 +173,7 @@ KNativePointer impl_ContextErrorMessage(KNativePointer contextPtr) { auto context = reinterpret_cast(contextPtr); - return new string(GetImpl()->ContextErrorMessage(context)); + return StageArena::strdup(GetImpl()->ContextErrorMessage(context)); } KOALA_INTEROP_1(ContextErrorMessage, KNativePointer, KNativePointer) @@ -208,9 +208,9 @@ static KNativePointer impl_ProgramExternalSources(KNativePointer contextPtr, KNa { auto context = reinterpret_cast(contextPtr); auto&& instance = reinterpret_cast(instancePtr); - std::size_t sourceLen = 0; - auto externalSources = GetImpl()->ProgramExternalSources(context, instance, &sourceLen); - return new std::vector(externalSources, externalSources + sourceLen); + std::size_t source_len = 0; + auto external_sources = GetImpl()->ProgramExternalSources(context, instance, &source_len); + return StageArena::cloneVector(external_sources, source_len); } KOALA_INTEROP_2(ProgramExternalSources, KNativePointer, KNativePointer, KNativePointer); @@ -236,17 +236,17 @@ KOALA_INTEROP_2(ProgramSourceFilePath, KNativePointer, KNativePointer, KNativePo static KNativePointer impl_ExternalSourceName(KNativePointer instance) { auto&& _instance_ = reinterpret_cast(instance); - auto&& _result_ = GetImpl()->ExternalSourceName(_instance_); - return new std::string(_result_); + auto&& result = GetImpl()->ExternalSourceName(_instance_); + return StageArena::strdup(result); } KOALA_INTEROP_1(ExternalSourceName, KNativePointer, KNativePointer); static KNativePointer impl_ExternalSourcePrograms(KNativePointer instance) { auto&& _instance_ = reinterpret_cast(instance); - std::size_t programLen = 0; - auto programs = GetImpl()->ExternalSourcePrograms(_instance_, &programLen); - return new std::vector(programs, programs + programLen); + std::size_t program_len = 0; + auto programs = GetImpl()->ExternalSourcePrograms(_instance_, &program_len); + return StageArena::cloneVector(programs, program_len); } KOALA_INTEROP_1(ExternalSourcePrograms, KNativePointer, KNativePointer); diff --git a/koala-wrapper/native/src/common.cc b/koala-wrapper/native/src/common.cc index 11d5d6bee..47457ce10 100644 --- a/koala-wrapper/native/src/common.cc +++ b/koala-wrapper/native/src/common.cc @@ -166,19 +166,19 @@ string getString(KStringPtr ptr) char* getStringCopy(KStringPtr& ptr) { - return strdup(ptr.c_str()); + return StageArena::strdup(ptr.c_str() ? ptr.c_str() : ""); } KNativePointer impl_CreateConfig(KInt argc, KStringArray argvPtr) { const std::size_t headerLen = 4; - const char** argv = new const char*[argc]; + const char** argv = StageArena::allocArray(argc); std::size_t position = headerLen; std::size_t strLen; for (std::size_t i = 0; i < static_cast(argc); ++i) { strLen = unpackUInt(argvPtr + position); position += headerLen; - argv[i] = strdup(std::string(reinterpret_cast(argvPtr + position), strLen).c_str()); + argv[i] = StageArena::strdup(std::string(reinterpret_cast(argvPtr + position), strLen).c_str()); position += strLen; } return GetImpl()->CreateConfig(argc, argv); @@ -195,6 +195,7 @@ KOALA_INTEROP_1(DestroyConfig, KNativePointer, KNativePointer) KNativePointer impl_DestroyContext(KNativePointer contextPtr) { auto context = reinterpret_cast(contextPtr); GetImpl()->DestroyContext(context); + StageArena::instance()->cleanup(); return nullptr; } KOALA_INTEROP_1(DestroyContext, KNativePointer, KNativePointer) @@ -306,7 +307,7 @@ KNativePointer impl_AstNodeChildren( cachedChildren.clear(); GetImpl()->AstNodeIterateConst(context, node, visitChild); - return new std::vector(cachedChildren); + return StageArena::clone(cachedChildren); } KOALA_INTEROP_2(AstNodeChildren, KNativePointer, KNativePointer, KNativePointer) diff --git a/koala-wrapper/native/src/generated/bridges.cc b/koala-wrapper/native/src/generated/bridges.cc index 2ac585276..ef039ca21 100644 --- a/koala-wrapper/native/src/generated/bridges.cc +++ b/koala-wrapper/native/src/generated/bridges.cc @@ -324,7 +324,7 @@ KNativePointer impl_ClassPropertyAnnotations(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassPropertyAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassPropertyAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -334,7 +334,7 @@ KNativePointer impl_ClassPropertyAnnotationsConst(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassPropertyAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassPropertyAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -432,7 +432,7 @@ KNativePointer impl_ETSFunctionTypeParamsConst(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSFunctionTypeIrParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSFunctionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -727,7 +727,7 @@ KNativePointer impl_TSConstructorTypeParamsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSConstructorTypeParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSConstructorTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -839,7 +839,7 @@ KNativePointer impl_TSEnumDeclarationMembersConst(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSEnumDeclarationMembersConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSEnumDeclarationMembersConst, KNativePointer, KNativePointer, KNativePointer); @@ -848,7 +848,7 @@ KNativePointer impl_TSEnumDeclarationInternalNameConst(KNativePointer context, K const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TSEnumDeclarationInternalNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TSEnumDeclarationInternalNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -896,7 +896,7 @@ KNativePointer impl_TSEnumDeclarationDecoratorsConst(KNativePointer context, KNa const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSEnumDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSEnumDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1065,7 +1065,7 @@ KNativePointer impl_ObjectExpressionPropertiesConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ObjectExpressionPropertiesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ObjectExpressionPropertiesConst, KNativePointer, KNativePointer, KNativePointer); @@ -1093,7 +1093,7 @@ KNativePointer impl_ObjectExpressionDecoratorsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ObjectExpressionDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ObjectExpressionDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1421,7 +1421,7 @@ KNativePointer impl_CallExpressionArgumentsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->CallExpressionArgumentsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(CallExpressionArgumentsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1431,7 +1431,7 @@ KNativePointer impl_CallExpressionArguments(KNativePointer context, KNativePoint const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->CallExpressionArguments(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(CallExpressionArguments, KNativePointer, KNativePointer, KNativePointer); @@ -1553,7 +1553,7 @@ KNativePointer impl_BigIntLiteralStrConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->BigIntLiteralStrConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(BigIntLiteralStrConst, KNativePointer, KNativePointer, KNativePointer); @@ -1655,7 +1655,7 @@ KNativePointer impl_ClassElementDecoratorsConst(KNativePointer context, KNativeP const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassElementDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassElementDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -1978,7 +1978,7 @@ KNativePointer impl_FunctionDeclarationAnnotations(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->FunctionDeclarationAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(FunctionDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -1988,7 +1988,7 @@ KNativePointer impl_FunctionDeclarationAnnotationsConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->FunctionDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(FunctionDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2237,7 +2237,7 @@ KNativePointer impl_TSFunctionTypeParamsConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSFunctionTypeParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSFunctionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2312,7 +2312,7 @@ KNativePointer impl_TemplateElementRawConst(KNativePointer context, KNativePoint const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TemplateElementRawConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TemplateElementRawConst, KNativePointer, KNativePointer, KNativePointer); @@ -2321,7 +2321,7 @@ KNativePointer impl_TemplateElementCookedConst(KNativePointer context, KNativePo const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TemplateElementCookedConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TemplateElementCookedConst, KNativePointer, KNativePointer, KNativePointer); @@ -2397,7 +2397,7 @@ KNativePointer impl_TSInterfaceDeclarationInternalNameConst(KNativePointer conte const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TSInterfaceDeclarationInternalNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TSInterfaceDeclarationInternalNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -2453,7 +2453,7 @@ KNativePointer impl_TSInterfaceDeclarationExtends(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationExtends(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceDeclarationExtends, KNativePointer, KNativePointer, KNativePointer); @@ -2473,7 +2473,7 @@ KNativePointer impl_TSInterfaceDeclarationExtendsConst(KNativePointer context, K const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationExtendsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceDeclarationExtendsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2483,7 +2483,7 @@ KNativePointer impl_TSInterfaceDeclarationDecoratorsConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2641,7 +2641,7 @@ KNativePointer impl_TSInterfaceDeclarationAnnotations(KNativePointer context, KN const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -2651,7 +2651,7 @@ KNativePointer impl_TSInterfaceDeclarationAnnotationsConst(KNativePointer contex const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2716,7 +2716,7 @@ KNativePointer impl_VariableDeclarationDeclaratorsConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->VariableDeclarationDeclaratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(VariableDeclarationDeclaratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2755,7 +2755,7 @@ KNativePointer impl_VariableDeclarationDecoratorsConst(KNativePointer context, K const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->VariableDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(VariableDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -2835,7 +2835,7 @@ KNativePointer impl_VariableDeclarationAnnotations(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->VariableDeclarationAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(VariableDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -2845,7 +2845,7 @@ KNativePointer impl_VariableDeclarationAnnotationsConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->VariableDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(VariableDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3199,7 +3199,7 @@ KNativePointer impl_ETSUnionTypeTypesConst(KNativePointer context, KNativePointe const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSUnionTypeIrTypesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSUnionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); @@ -3497,7 +3497,7 @@ KNativePointer impl_TSTypeAliasDeclarationDecoratorsConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeAliasDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeAliasDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3517,7 +3517,7 @@ KNativePointer impl_TSTypeAliasDeclarationAnnotationsConst(KNativePointer contex const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeAliasDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeAliasDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3827,7 +3827,7 @@ KNativePointer impl_ScriptFunctionParamsConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ScriptFunctionParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3837,7 +3837,7 @@ KNativePointer impl_ScriptFunctionParams(KNativePointer context, KNativePointer const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionParams(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ScriptFunctionParams, KNativePointer, KNativePointer, KNativePointer); @@ -3847,7 +3847,7 @@ KNativePointer impl_ScriptFunctionReturnStatementsConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionReturnStatementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ScriptFunctionReturnStatementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -3857,7 +3857,7 @@ KNativePointer impl_ScriptFunctionReturnStatements(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionReturnStatements(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ScriptFunctionReturnStatements, KNativePointer, KNativePointer, KNativePointer); @@ -4390,7 +4390,7 @@ KNativePointer impl_ScriptFunctionAnnotations(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ScriptFunctionAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -4400,7 +4400,7 @@ KNativePointer impl_ScriptFunctionAnnotationsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ScriptFunctionAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ScriptFunctionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -4558,7 +4558,7 @@ KNativePointer impl_ClassDefinitionInternalNameConst(KNativePointer context, KNa const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ClassDefinitionInternalNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ClassDefinitionInternalNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -4796,7 +4796,7 @@ KNativePointer impl_ClassDefinitionBodyConst(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionBodyConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDefinitionBodyConst, KNativePointer, KNativePointer, KNativePointer); @@ -4815,7 +4815,7 @@ KNativePointer impl_ClassDefinitionImplementsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionImplementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDefinitionImplementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -4898,7 +4898,7 @@ KNativePointer impl_ClassDefinitionLocalPrefixConst(KNativePointer context, KNat const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ClassDefinitionLocalPrefixConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ClassDefinitionLocalPrefixConst, KNativePointer, KNativePointer, KNativePointer); @@ -5022,7 +5022,7 @@ KNativePointer impl_ClassDefinitionBody(KNativePointer context, KNativePointer r const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionBody(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDefinitionBody, KNativePointer, KNativePointer, KNativePointer); @@ -5072,7 +5072,7 @@ KNativePointer impl_ClassDefinitionImplements(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionImplements(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDefinitionImplements, KNativePointer, KNativePointer, KNativePointer); @@ -5182,7 +5182,7 @@ KNativePointer impl_ClassDefinitionAnnotations(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDefinitionAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -5192,7 +5192,7 @@ KNativePointer impl_ClassDefinitionAnnotationsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDefinitionAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDefinitionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -5290,7 +5290,7 @@ KNativePointer impl_ArrayExpressionElementsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrayExpressionElementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ArrayExpressionElementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -5300,7 +5300,7 @@ KNativePointer impl_ArrayExpressionElements(KNativePointer context, KNativePoint const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrayExpressionElements(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ArrayExpressionElements, KNativePointer, KNativePointer, KNativePointer); @@ -5358,7 +5358,7 @@ KNativePointer impl_ArrayExpressionDecoratorsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrayExpressionDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ArrayExpressionDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -5446,7 +5446,7 @@ KNativePointer impl_TSInterfaceBodyBody(KNativePointer context, KNativePointer r const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceBodyBody(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceBodyBody, KNativePointer, KNativePointer, KNativePointer); @@ -5456,7 +5456,7 @@ KNativePointer impl_TSInterfaceBodyBodyConst(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceBodyBodyConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceBodyBodyConst, KNativePointer, KNativePointer, KNativePointer); @@ -5802,7 +5802,7 @@ KNativePointer impl_StringLiteralStrConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->StringLiteralStrConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(StringLiteralStrConst, KNativePointer, KNativePointer, KNativePointer); @@ -5972,8 +5972,7 @@ KNativePointer impl_ETSTupleGetTupleTypeAnnotationsList(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSTupleGetTupleTypeAnnotationsList(_context, _receiver, &length); - // return StageArena::cloneVector(result, length); - return (void*)new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSTupleGetTupleTypeAnnotationsList, KNativePointer, KNativePointer, KNativePointer); @@ -5983,7 +5982,7 @@ KNativePointer impl_ETSTupleGetTupleTypeAnnotationsListConst(KNativePointer cont const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSTupleGetTupleTypeAnnotationsListConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSTupleGetTupleTypeAnnotationsListConst, KNativePointer, KNativePointer, KNativePointer); @@ -6111,7 +6110,7 @@ KNativePointer impl_TryStatementCatchClausesConst(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TryStatementCatchClausesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TryStatementCatchClausesConst, KNativePointer, KNativePointer, KNativePointer); @@ -6333,7 +6332,7 @@ KNativePointer impl_AstNodeDecoratorsPtrConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AstNodeDecoratorsPtrConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AstNodeDecoratorsPtrConst, KNativePointer, KNativePointer, KNativePointer); @@ -6699,7 +6698,7 @@ KNativePointer impl_AstNodeDumpJSONConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AstNodeDumpJSONConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(AstNodeDumpJSONConst, KNativePointer, KNativePointer, KNativePointer); @@ -6708,7 +6707,7 @@ KNativePointer impl_AstNodeDumpEtsSrcConst(KNativePointer context, KNativePointe const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AstNodeDumpEtsSrcConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(AstNodeDumpEtsSrcConst, KNativePointer, KNativePointer, KNativePointer); @@ -7075,7 +7074,7 @@ KNativePointer impl_TSMethodSignatureParamsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSMethodSignatureParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSMethodSignatureParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -7807,7 +7806,7 @@ KNativePointer impl_ETSModuleAnnotations(KNativePointer context, KNativePointer const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSModuleAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSModuleAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -7817,7 +7816,7 @@ KNativePointer impl_ETSModuleAnnotationsConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSModuleAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSModuleAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -7954,7 +7953,7 @@ KNativePointer impl_TSSignatureDeclarationParamsConst(KNativePointer context, KN const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSSignatureDeclarationParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSSignatureDeclarationParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -8127,7 +8126,7 @@ KNativePointer impl_TSTupleTypeElementTypeConst(KNativePointer context, KNativeP const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTupleTypeElementTypeConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTupleTypeElementTypeConst, KNativePointer, KNativePointer, KNativePointer); @@ -8416,7 +8415,7 @@ KNativePointer impl_ImportDeclarationSpecifiersConst(KNativePointer context, KNa const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ImportDeclarationSpecifiersConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ImportDeclarationSpecifiersConst, KNativePointer, KNativePointer, KNativePointer); @@ -8604,7 +8603,7 @@ KNativePointer impl_ETSImportDeclarationAssemblerNameConst(KNativePointer contex const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSImportDeclarationAssemblerNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ETSImportDeclarationAssemblerNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -8613,7 +8612,7 @@ KNativePointer impl_ETSImportDeclarationResolvedSourceConst(KNativePointer conte const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSImportDeclarationResolvedSourceConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ETSImportDeclarationResolvedSourceConst, KNativePointer, KNativePointer, KNativePointer); @@ -8663,7 +8662,7 @@ KNativePointer impl_TSModuleBlockStatementsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSModuleBlockStatementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSModuleBlockStatementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -8790,7 +8789,7 @@ KNativePointer impl_AnnotationDeclarationInternalNameConst(KNativePointer contex const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AnnotationDeclarationInternalNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(AnnotationDeclarationInternalNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -8828,7 +8827,7 @@ KNativePointer impl_AnnotationDeclarationProperties(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationProperties(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AnnotationDeclarationProperties, KNativePointer, KNativePointer, KNativePointer); @@ -8848,7 +8847,7 @@ KNativePointer impl_AnnotationDeclarationPropertiesConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationPropertiesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AnnotationDeclarationPropertiesConst, KNativePointer, KNativePointer, KNativePointer); @@ -9002,7 +9001,7 @@ KNativePointer impl_AnnotationDeclarationAnnotations(KNativePointer context, KNa const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AnnotationDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -9012,7 +9011,7 @@ KNativePointer impl_AnnotationDeclarationAnnotationsConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AnnotationDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -9105,7 +9104,7 @@ KNativePointer impl_AnnotationUsageProperties(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationUsageIrProperties(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AnnotationUsageProperties, KNativePointer, KNativePointer, KNativePointer); @@ -9115,7 +9114,7 @@ KNativePointer impl_AnnotationUsagePropertiesConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationUsageIrPropertiesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AnnotationUsagePropertiesConst, KNativePointer, KNativePointer, KNativePointer); @@ -9281,7 +9280,7 @@ KNativePointer impl_FunctionSignatureParamsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->FunctionSignatureParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(FunctionSignatureParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -9291,7 +9290,7 @@ KNativePointer impl_FunctionSignatureParams(KNativePointer context, KNativePoint const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->FunctionSignatureParams(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(FunctionSignatureParams, KNativePointer, KNativePointer, KNativePointer); @@ -9434,7 +9433,7 @@ KNativePointer impl_TSIntersectionTypeTypesConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSIntersectionTypeTypesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSIntersectionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); @@ -9524,7 +9523,7 @@ KNativePointer impl_BlockExpressionStatementsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->BlockExpressionStatementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(BlockExpressionStatementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -9534,7 +9533,7 @@ KNativePointer impl_BlockExpressionStatements(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->BlockExpressionStatements(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(BlockExpressionStatements, KNativePointer, KNativePointer, KNativePointer); @@ -9586,7 +9585,7 @@ KNativePointer impl_TSTypeLiteralMembersConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeLiteralMembersConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeLiteralMembersConst, KNativePointer, KNativePointer, KNativePointer); @@ -9749,7 +9748,7 @@ KNativePointer impl_TSTypeParameterAnnotations(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeParameterAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeParameterAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -9759,7 +9758,7 @@ KNativePointer impl_TSTypeParameterAnnotationsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeParameterAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeParameterAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -9866,7 +9865,7 @@ KNativePointer impl_SpreadElementDecoratorsConst(KNativePointer context, KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SpreadElementDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(SpreadElementDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -10095,7 +10094,7 @@ KNativePointer impl_ExportNamedDeclarationSpecifiersConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ExportNamedDeclarationSpecifiersConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ExportNamedDeclarationSpecifiersConst, KNativePointer, KNativePointer, KNativePointer); @@ -10157,7 +10156,7 @@ KNativePointer impl_ETSParameterExpressionNameConst(KNativePointer context, KNat const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSParameterExpressionNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ETSParameterExpressionNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -10240,7 +10239,7 @@ KNativePointer impl_ETSParameterExpressionLexerSavedConst(KNativePointer context const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSParameterExpressionLexerSavedConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ETSParameterExpressionLexerSavedConst, KNativePointer, KNativePointer, KNativePointer); @@ -10375,7 +10374,7 @@ KNativePointer impl_ETSParameterExpressionAnnotations(KNativePointer context, KN const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSParameterExpressionAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSParameterExpressionAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -10385,7 +10384,7 @@ KNativePointer impl_ETSParameterExpressionAnnotationsConst(KNativePointer contex const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSParameterExpressionAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSParameterExpressionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -10448,7 +10447,7 @@ KNativePointer impl_TSTypeParameterInstantiationParamsConst(KNativePointer conte const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeParameterInstantiationParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeParameterInstantiationParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -10554,7 +10553,7 @@ KNativePointer impl_SwitchCaseStatementConsequentConst(KNativePointer context, K const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SwitchCaseStatementConsequentConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(SwitchCaseStatementConsequentConst, KNativePointer, KNativePointer, KNativePointer); @@ -10734,7 +10733,7 @@ KNativePointer impl_ClassStaticBlockNameConst(KNativePointer context, KNativePoi const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ClassStaticBlockNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ClassStaticBlockNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -10973,7 +10972,7 @@ KNativePointer impl_TemplateLiteralQuasisConst(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TemplateLiteralQuasisConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TemplateLiteralQuasisConst, KNativePointer, KNativePointer, KNativePointer); @@ -10983,7 +10982,7 @@ KNativePointer impl_TemplateLiteralExpressionsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TemplateLiteralExpressionsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TemplateLiteralExpressionsConst, KNativePointer, KNativePointer, KNativePointer); @@ -10992,7 +10991,7 @@ KNativePointer impl_TemplateLiteralGetMultilineStringConst(KNativePointer contex const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TemplateLiteralGetMultilineStringConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TemplateLiteralGetMultilineStringConst, KNativePointer, KNativePointer, KNativePointer); @@ -11023,7 +11022,7 @@ KNativePointer impl_TSUnionTypeTypesConst(KNativePointer context, KNativePointer const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSUnionTypeTypesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSUnionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); @@ -11106,7 +11105,7 @@ KNativePointer impl_IdentifierNameConst(KNativePointer context, KNativePointer r const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->IdentifierNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(IdentifierNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -11115,7 +11114,7 @@ KNativePointer impl_IdentifierName(KNativePointer context, KNativePointer receiv const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->IdentifierName(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(IdentifierName, KNativePointer, KNativePointer, KNativePointer); @@ -11146,7 +11145,7 @@ KNativePointer impl_IdentifierDecoratorsConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->IdentifierDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(IdentifierDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -11405,7 +11404,7 @@ KNativePointer impl_BlockStatementStatements(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->BlockStatementStatements(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(BlockStatementStatements, KNativePointer, KNativePointer, KNativePointer); @@ -11415,7 +11414,7 @@ KNativePointer impl_BlockStatementStatementsConst(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->BlockStatementStatementsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(BlockStatementStatementsConst, KNativePointer, KNativePointer, KNativePointer); @@ -11550,7 +11549,7 @@ KNativePointer impl_TSTypeParameterDeclarationParamsConst(KNativePointer context const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSTypeParameterDeclarationParamsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSTypeParameterDeclarationParamsConst, KNativePointer, KNativePointer, KNativePointer); @@ -11690,7 +11689,7 @@ KNativePointer impl_MethodDefinitionOverloadsConst(KNativePointer context, KNati const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->MethodDefinitionOverloadsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(MethodDefinitionOverloadsConst, KNativePointer, KNativePointer, KNativePointer); @@ -12004,7 +12003,7 @@ KNativePointer impl_ExpressionToStringConst(KNativePointer context, KNativePoint const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ExpressionToStringConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ExpressionToStringConst, KNativePointer, KNativePointer, KNativePointer); @@ -12120,7 +12119,7 @@ KNativePointer impl_SrcDumperStrConst(KNativePointer context, KNativePointer rec const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->SrcDumperStrConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(SrcDumperStrConst, KNativePointer, KNativePointer, KNativePointer); @@ -12346,7 +12345,7 @@ KNativePointer impl_RegExpLiteralPatternConst(KNativePointer context, KNativePoi const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->RegExpLiteralPatternConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(RegExpLiteralPatternConst, KNativePointer, KNativePointer, KNativePointer); @@ -12480,7 +12479,7 @@ KNativePointer impl_ClassDeclarationDecoratorsConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ClassDeclarationDecoratorsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ClassDeclarationDecoratorsConst, KNativePointer, KNativePointer, KNativePointer); @@ -12645,7 +12644,7 @@ KNativePointer impl_TSQualifiedNameNameConst(KNativePointer context, KNativePoin const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TSQualifiedNameNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TSQualifiedNameNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -12870,7 +12869,7 @@ KNativePointer impl_ETSNewMultiDimArrayInstanceExpressionDimensions(KNativePoint const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSNewMultiDimArrayInstanceExpressionDimensions(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSNewMultiDimArrayInstanceExpressionDimensions, KNativePointer, KNativePointer, KNativePointer); @@ -12880,7 +12879,7 @@ KNativePointer impl_ETSNewMultiDimArrayInstanceExpressionDimensionsConst(KNative const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSNewMultiDimArrayInstanceExpressionDimensionsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSNewMultiDimArrayInstanceExpressionDimensionsConst, KNativePointer, KNativePointer, KNativePointer); @@ -13005,7 +13004,7 @@ KNativePointer impl_AstDumperModifierToString(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); const auto _flags = static_cast(flags); auto result = GetImpl()->AstDumperModifierToString(_context, _receiver, _flags); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_3(AstDumperModifierToString, KNativePointer, KNativePointer, KNativePointer, KInt); @@ -13015,7 +13014,7 @@ KNativePointer impl_AstDumperTypeOperatorToString(KNativePointer context, KNativ const auto _receiver = reinterpret_cast(receiver); const auto _operatorType = static_cast(operatorType); auto result = GetImpl()->AstDumperTypeOperatorToString(_context, _receiver, _operatorType); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_3(AstDumperTypeOperatorToString, KNativePointer, KNativePointer, KNativePointer, KInt); @@ -13024,7 +13023,7 @@ KNativePointer impl_AstDumperStrConst(KNativePointer context, KNativePointer rec const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->AstDumperStrConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(AstDumperStrConst, KNativePointer, KNativePointer, KNativePointer); @@ -13184,7 +13183,7 @@ KNativePointer impl_TSEnumMemberNameConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->TSEnumMemberNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(TSEnumMemberNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -13245,7 +13244,7 @@ KNativePointer impl_SwitchStatementCasesConst(KNativePointer context, KNativePoi const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SwitchStatementCasesConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(SwitchStatementCasesConst, KNativePointer, KNativePointer, KNativePointer); @@ -13255,7 +13254,7 @@ KNativePointer impl_SwitchStatementCases(KNativePointer context, KNativePointer const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SwitchStatementCases(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(SwitchStatementCases, KNativePointer, KNativePointer, KNativePointer); @@ -13428,7 +13427,7 @@ KNativePointer impl_SequenceExpressionSequenceConst(KNativePointer context, KNat const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SequenceExpressionSequenceConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(SequenceExpressionSequenceConst, KNativePointer, KNativePointer, KNativePointer); @@ -13438,7 +13437,7 @@ KNativePointer impl_SequenceExpressionSequence(KNativePointer context, KNativePo const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->SequenceExpressionSequence(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(SequenceExpressionSequence, KNativePointer, KNativePointer, KNativePointer); @@ -13553,7 +13552,7 @@ KNativePointer impl_ArrowFunctionExpressionAnnotations(KNativePointer context, K const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrowFunctionExpressionAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ArrowFunctionExpressionAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -13563,7 +13562,7 @@ KNativePointer impl_ArrowFunctionExpressionAnnotationsConst(KNativePointer conte const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ArrowFunctionExpressionAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ArrowFunctionExpressionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -13673,7 +13672,7 @@ KNativePointer impl_ETSNewClassInstanceExpressionGetArguments(KNativePointer con const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSNewClassInstanceExpressionGetArguments(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSNewClassInstanceExpressionGetArguments, KNativePointer, KNativePointer, KNativePointer); @@ -13683,7 +13682,7 @@ KNativePointer impl_ETSNewClassInstanceExpressionGetArgumentsConst(KNativePointe const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->ETSNewClassInstanceExpressionGetArgumentsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(ETSNewClassInstanceExpressionGetArgumentsConst, KNativePointer, KNativePointer, KNativePointer); @@ -14000,7 +13999,7 @@ KNativePointer impl_ETSReExportDeclarationGetProgramPathConst(KNativePointer con const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ETSReExportDeclarationGetProgramPathConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ETSReExportDeclarationGetProgramPathConst, KNativePointer, KNativePointer, KNativePointer); @@ -14078,7 +14077,7 @@ KNativePointer impl_TypeNodeAnnotations(KNativePointer context, KNativePointer r const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TypeNodeAnnotations(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TypeNodeAnnotations, KNativePointer, KNativePointer, KNativePointer); @@ -14088,7 +14087,7 @@ KNativePointer impl_TypeNodeAnnotationsConst(KNativePointer context, KNativePoin const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TypeNodeAnnotationsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TypeNodeAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); @@ -14162,7 +14161,7 @@ KNativePointer impl_NewExpressionArgumentsConst(KNativePointer context, KNativeP const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->NewExpressionArgumentsConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return (void*)StageArena::cloneVector(result, length); } KOALA_INTEROP_2(NewExpressionArgumentsConst, KNativePointer, KNativePointer, KNativePointer); -- Gitee From dfab7db7a855e4bb0518a0d586123e7143e4c21f Mon Sep 17 00:00:00 2001 From: xieziang Date: Thu, 12 Jun 2025 21:45:22 +0800 Subject: [PATCH 12/17] adapt with StageArena Change-Id: Iacdbf100f04b0fa4fb96969b1ad2af9507f7e1c5 Signed-off-by: xieziang --- arkui-plugins/common/program-visitor.ts | 2 -- .../koalaui/interop/src/cpp/common-interop.cc | 7 +++++++ koala-wrapper/native/src/bridges.cc | 20 +++++++++---------- koala-wrapper/native/src/generated/bridges.cc | 6 +++--- koala-wrapper/src/Es2pandaNativeModule.ts | 8 ++++---- koala-wrapper/src/InteropNativeModule.ts | 4 ++-- .../src/arkts-api/utilities/private.ts | 2 +- .../src/arkts-api/utilities/public.ts | 2 +- 8 files changed, 27 insertions(+), 24 deletions(-) diff --git a/arkui-plugins/common/program-visitor.ts b/arkui-plugins/common/program-visitor.ts index 3196b403b..8c32c943e 100644 --- a/arkui-plugins/common/program-visitor.ts +++ b/arkui-plugins/common/program-visitor.ts @@ -202,12 +202,10 @@ export class ProgramVisitor extends AbstractVisitor { programVisitor(program: arkts.Program): arkts.Program { this.visitExternalSources(program, [program]); - arkts.Performance.getInstance().createEvent(`${this.state}-source`); let programScript = program.astNode; programScript = this.visitor(programScript, program, this.externalSourceName); arkts.Performance.getInstance().stopEvent(`${this.state}-source`, false); - const visitorsToReset = flattenVisitorsInHooks(this.hooks, this.state); visitorsToReset.forEach((visitor) => visitor.reset()); diff --git a/koala-wrapper/koalaui/interop/src/cpp/common-interop.cc b/koala-wrapper/koalaui/interop/src/cpp/common-interop.cc index ec6572c6d..7a2287a27 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/common-interop.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/common-interop.cc @@ -443,6 +443,13 @@ KVMDeferred* CreateDeferred(KVMContext vmContext, KVMObjectHandle* promiseHandle } #if defined(KOALA_ETS_NAPI) || defined(KOALA_NAPI) || defined(KOALA_JNI) || defined(KOALA_CJ) +KStringPtr impl_RawUtf8ToString(KVMContext vmContext, KNativePointer data) { + auto string = (const char*)data; + KStringPtr result(string, strlen(string), false); + return result; +} +KOALA_INTEROP_CTX_1(RawUtf8ToString, KStringPtr, KNativePointer) + // Allocate, so CTX versions. KStringPtr impl_Utf8ToString(KVMContext vmContext, KByte* data, KInt offset, KInt length) { KStringPtr result((const char*)(data + offset), length, false); diff --git a/koala-wrapper/native/src/bridges.cc b/koala-wrapper/native/src/bridges.cc index fde296ecc..38dfaa7bc 100644 --- a/koala-wrapper/native/src/bridges.cc +++ b/koala-wrapper/native/src/bridges.cc @@ -164,7 +164,6 @@ KOALA_INTEROP_2(CreateContextFromFile, KNativePointer, KNativePointer, KStringPt KInt impl_ContextState(KNativePointer contextPtr) { auto context = reinterpret_cast(contextPtr); - return static_cast(GetImpl()->ContextState(context)); } KOALA_INTEROP_1(ContextState, KInt, KNativePointer) @@ -218,18 +217,17 @@ static KNativePointer impl_ProgramDirectExternalSources(KNativePointer contextPt { auto context = reinterpret_cast(contextPtr); auto&& instance = reinterpret_cast(instancePtr); - std::size_t sourceLen = 0; - auto externalSources = GetImpl()->ProgramDirectExternalSources(context, instance, &sourceLen); - return new std::vector(externalSources, externalSources + sourceLen); + std::size_t source_len = 0; + auto external_sources = GetImpl()->ProgramDirectExternalSources(context, instance, &source_len); + return StageArena::cloneVector(external_sources, source_len); } KOALA_INTEROP_2(ProgramDirectExternalSources, KNativePointer, KNativePointer, KNativePointer); static KNativePointer impl_ProgramSourceFilePath(KNativePointer contextPtr, KNativePointer instancePtr) { auto context = reinterpret_cast(contextPtr); - auto&& instance = reinterpret_cast(instancePtr); - auto&& result = GetImpl()->ProgramSourceFilePathConst(context, instance); - return StageArena::strdup(result); + auto program = reinterpret_cast(instancePtr); + return StageArena::strdup(GetImpl()->ProgramModuleNameConst(context, program)); } KOALA_INTEROP_2(ProgramSourceFilePath, KNativePointer, KNativePointer, KNativePointer); @@ -440,7 +438,7 @@ KNativePointer impl_TSInterfaceBodyBodyPtr(KNativePointer context, KNativePointe const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->TSInterfaceBodyBodyPtr(_context, _receiver, &length); - return new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(TSInterfaceBodyBodyPtr, KNativePointer, KNativePointer, KNativePointer); @@ -450,7 +448,7 @@ KNativePointer impl_AnnotationDeclarationPropertiesPtrConst(KNativePointer conte const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationDeclarationPropertiesPtrConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AnnotationDeclarationPropertiesPtrConst, KNativePointer, KNativePointer, KNativePointer); @@ -483,7 +481,7 @@ KNativePointer impl_ETSParserGetGlobalProgramAbsName(KNativePointer contextPtr) { auto context = reinterpret_cast(contextPtr); auto result = GetImpl()->ETSParserGetGlobalProgramAbsName(context); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_1(ETSParserGetGlobalProgramAbsName, KNativePointer, KNativePointer) @@ -579,6 +577,6 @@ KNativePointer impl_AnnotationUsageIrPropertiesPtrConst(KNativePointer context, const auto _receiver = reinterpret_cast(receiver); std::size_t length; auto result = GetImpl()->AnnotationUsageIrPropertiesPtrConst(_context, _receiver, &length); - return (void*)new std::vector(result, result + length); + return StageArena::cloneVector(result, length); } KOALA_INTEROP_2(AnnotationUsageIrPropertiesPtrConst, KNativePointer, KNativePointer, KNativePointer); diff --git a/koala-wrapper/native/src/generated/bridges.cc b/koala-wrapper/native/src/generated/bridges.cc index ef039ca21..681c8aea1 100644 --- a/koala-wrapper/native/src/generated/bridges.cc +++ b/koala-wrapper/native/src/generated/bridges.cc @@ -14391,7 +14391,7 @@ KNativePointer impl_ProgramFileNameConst(KNativePointer context, KNativePointer const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ProgramFileNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ProgramFileNameConst, KNativePointer, KNativePointer, KNativePointer); @@ -14400,7 +14400,7 @@ KNativePointer impl_ProgramFileNameWithExtensionConst(KNativePointer context, KN const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ProgramFileNameWithExtensionConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ProgramFileNameWithExtensionConst, KNativePointer, KNativePointer, KNativePointer); @@ -14544,7 +14544,7 @@ KNativePointer impl_ProgramModuleNameConst(KNativePointer context, KNativePointe const auto _context = reinterpret_cast(context); const auto _receiver = reinterpret_cast(receiver); auto result = GetImpl()->ProgramModuleNameConst(_context, _receiver); - return new std::string(result); + return StageArena::strdup(result); } KOALA_INTEROP_2(ProgramModuleNameConst, KNativePointer, KNativePointer, KNativePointer); diff --git a/koala-wrapper/src/Es2pandaNativeModule.ts b/koala-wrapper/src/Es2pandaNativeModule.ts index 5739a4966..e4e94e8b0 100644 --- a/koala-wrapper/src/Es2pandaNativeModule.ts +++ b/koala-wrapper/src/Es2pandaNativeModule.ts @@ -939,8 +939,9 @@ export class Es2pandaNativeModule { export function findNativeModule(): string { const candidates = [ - path.resolve(__dirname, "../native/build"), - path.resolve(__dirname, "../build/native/build"), + path.resolve(__dirname, "../native/build/es2panda.node"), + path.resolve(__dirname, "../build/native/build/es2panda.node"), + path.resolve(__dirname, "../native/es2panda.node") ] let result = undefined candidates.forEach(path => { @@ -949,8 +950,7 @@ export function findNativeModule(): string { return } }) - if (result) - return path.join(result, "es2panda") + if (result) return result throw new Error("Cannot find native module") } diff --git a/koala-wrapper/src/InteropNativeModule.ts b/koala-wrapper/src/InteropNativeModule.ts index ce6747183..7b4ff8cc9 100644 --- a/koala-wrapper/src/InteropNativeModule.ts +++ b/koala-wrapper/src/InteropNativeModule.ts @@ -19,7 +19,7 @@ import { registerNativeModuleLibraryName, loadNativeModuleLibrary } from "@koalaui/interop" -import * as path from "path" +import { findNativeModule } from "./Es2pandaNativeModule" export class InteropNativeModule { _StringLength(ptr: KPtr): KInt { @@ -46,7 +46,7 @@ export class InteropNativeModule { } export function initInterop(): InteropNativeModule { - registerNativeModuleLibraryName("InteropNativeModule", path.join(__dirname, "../native/es2panda.node")) + registerNativeModuleLibraryName("InteropNativeModule", findNativeModule()) const instance = new InteropNativeModule() loadNativeModuleLibrary("InteropNativeModule", instance) return instance diff --git a/koala-wrapper/src/arkts-api/utilities/private.ts b/koala-wrapper/src/arkts-api/utilities/private.ts index 429ea6ab6..6451883cf 100644 --- a/koala-wrapper/src/arkts-api/utilities/private.ts +++ b/koala-wrapper/src/arkts-api/utilities/private.ts @@ -105,7 +105,7 @@ export function unpackObject( } export function unpackString(peer: KNativePointer): string { - return withStringResult(peer) ?? throwError(`failed to unpack (peer shouldn't be NULLPTR)`); + return global.interop._RawUtf8ToString(peer); } export function passString(str: string | undefined): string { diff --git a/koala-wrapper/src/arkts-api/utilities/public.ts b/koala-wrapper/src/arkts-api/utilities/public.ts index 04ac973fe..650d2c7f5 100644 --- a/koala-wrapper/src/arkts-api/utilities/public.ts +++ b/koala-wrapper/src/arkts-api/utilities/public.ts @@ -61,7 +61,7 @@ export function proceedToState(state: Es2pandaContextState, context: KNativePoin function processErrorState(state: Es2pandaContextState, context: KNativePointer, forceDtsEmit = false): void { try { if (global.es2panda._ContextState(context) === Es2pandaContextState.ES2PANDA_STATE_ERROR && !forceDtsEmit) { - const errorMessage = withStringResult(global.es2panda._ContextErrorMessage(context)); + const errorMessage = global.interop._RawUtf8ToString(global.es2panda._ContextErrorMessage(context)); if (errorMessage === undefined) { throwError(`Could not get ContextErrorMessage`); } -- Gitee From bd8ad1bb34c55c37320c536d6ecfbb3f1d9d92ef Mon Sep 17 00:00:00 2001 From: xieziang Date: Sat, 14 Jun 2025 15:18:46 +0800 Subject: [PATCH 13/17] update interop/ common/ and compat/ Change-Id: I45aa417a64cd4a60a79f1960321822ce009c4bc6 Signed-off-by: xieziang --- koala-wrapper/koalaui/common/.gitlab-ci.yml | 52 + .../common/bridges/ohos/src/chai/index.ts | 213 ++ .../index.d.ts => bridges/ohos/src/index.ts} | 6 +- .../bridges/ohos/src/mocha/index.ts} | 56 +- .../bridges/ohos/src/mocha/types/index.d.ts | 37 + .../common/dist/bridges/ohos/chai/index.d.ts | 56 - .../common/dist/bridges/ohos/chai/index.js | 124 - .../koalaui/common/dist/bridges/ohos/index.js | 36 - .../koalaui/common/dist/lib/src/Errors.d.ts | 15 - .../koalaui/common/dist/lib/src/Errors.js | 2 +- .../common/dist/lib/src/Finalization.d.ts | 15 - .../common/dist/lib/src/Finalization.js | 6 +- .../common/dist/lib/src/KoalaProfiler.d.ts | 15 - .../common/dist/lib/src/KoalaProfiler.js | 2 +- .../common/dist/lib/src/LifecycleEvent.d.ts | 15 - .../common/dist/lib/src/LifecycleEvent.js | 2 +- .../common/dist/lib/src/MarkableQueue.d.ts | 16 +- .../common/dist/lib/src/MarkableQueue.js | 2 +- .../koalaui/common/dist/lib/src/Matrix33.d.ts | 15 - .../koalaui/common/dist/lib/src/Matrix33.js | 4 +- .../koalaui/common/dist/lib/src/Matrix44.d.ts | 15 - .../koalaui/common/dist/lib/src/Matrix44.js | 2 +- .../common/dist/lib/src/PerfProbe.d.ts | 30 +- .../koalaui/common/dist/lib/src/PerfProbe.js | 16 +- .../koalaui/common/dist/lib/src/Point.d.ts | 15 - .../koalaui/common/dist/lib/src/Point.js | 2 +- .../koalaui/common/dist/lib/src/Point3.d.ts | 15 - .../koalaui/common/dist/lib/src/Point3.js | 2 +- .../koalaui/common/dist/lib/src/index.d.ts | 17 +- .../koalaui/common/dist/lib/src/index.js | 15 +- .../koalaui/common/dist/lib/src/koalaKey.d.ts | 16 - .../koalaui/common/dist/lib/src/koalaKey.js | 2 +- .../koalaui/common/dist/lib/src/math.d.ts | 15 - .../koalaui/common/dist/lib/src/math.js | 2 +- .../koalaui/common/dist/lib/src/sha1.d.ts | 15 - .../koalaui/common/dist/lib/src/sha1.js | 5 +- .../common/dist/lib/src/stringUtils.d.ts | 15 - .../common/dist/lib/src/stringUtils.js | 2 +- .../koalaui/common/dist/lib/src/uniqueId.d.ts | 15 - .../koalaui/common/dist/lib/src/uniqueId.js | 2 +- .../common/dist/lib/tsconfig.tsbuildinfo | 1 + .../bridges/ohos/index.d.ts => empty.js} | 6 +- koala-wrapper/koalaui/common/oh-package.json5 | 19 +- .../koalaui/common/src/Finalization.ts | 6 +- .../koalaui/common/src/KoalaProfiler.ts | 2 +- .../koalaui/common/src/MarkableQueue.ts | 4 +- koala-wrapper/koalaui/common/src/Matrix33.ts | 4 +- koala-wrapper/koalaui/common/src/Matrix44.ts | 2 +- koala-wrapper/koalaui/common/src/PerfProbe.ts | 20 +- koala-wrapper/koalaui/common/src/Point.ts | 2 +- koala-wrapper/koalaui/common/src/Point3.ts | 2 +- koala-wrapper/koalaui/common/src/index.ts | 8 +- koala-wrapper/koalaui/common/src/koalaKey.ts | 2 +- koala-wrapper/koalaui/common/src/math.ts | 4 +- koala-wrapper/koalaui/common/src/sha1.ts | 7 +- .../koalaui/common/src/stringUtils.ts | 2 +- koala-wrapper/koalaui/common/src/uniqueId.ts | 2 +- koala-wrapper/koalaui/common/test/golden.js | 41 + koala-wrapper/koalaui/compat/.gitlab-ci.yml | 50 + .../koalaui/compat/dist/src/index.d.ts | 16 +- .../koalaui/compat/dist/src/index.js | 8 +- .../compat/dist/src/typescript/array.d.ts | 15 - .../compat/dist/src/typescript/array.js | 2 +- .../compat/dist/src/typescript/atomic.d.ts | 16 +- .../compat/dist/src/typescript/atomic.js | 2 +- .../compat/dist/src/typescript/double.d.ts | 17 +- .../compat/dist/src/typescript/double.js | 13 +- .../dist/src/typescript/finalization.d.ts | 15 - .../dist/src/typescript/finalization.js | 2 +- .../compat/dist/src/typescript/index.d.ts | 15 - .../compat/dist/src/typescript/index.js | 2 +- .../dist/src/typescript/observable.d.ts | 15 - .../compat/dist/src/typescript/observable.js | 120 +- .../dist/src/typescript/performance.d.ts | 15 - .../compat/dist/src/typescript/performance.js | 2 +- .../dist/src/typescript/prop-deep-copy.d.ts | 15 - .../dist/src/typescript/prop-deep-copy.js | 2 +- .../dist/src/typescript/reflection.d.ts | 15 - .../compat/dist/src/typescript/reflection.js | 7 +- .../compat/dist/src/typescript/strings.d.ts | 15 - .../compat/dist/src/typescript/strings.js | 2 +- .../dist/src/typescript/ts-reflection.d.ts | 15 - .../dist/src/typescript/ts-reflection.js | 2 +- .../compat/dist/src/typescript/types.d.ts | 15 - .../compat/dist/src/typescript/types.js | 2 +- .../compat/dist/src/typescript/utils.d.ts | 19 +- .../compat/dist/src/typescript/utils.js | 22 +- .../koalaui/compat/dist/tsconfig.tsbuildinfo | 1 + .../oh-package.json5} | 52 +- .../koalaui/compat/src/arkts/array.ts | 7 +- .../koalaui/compat/src/arkts/atomic.ts | 2 +- .../koalaui/compat/src/arkts/double.ts | 12 +- .../koalaui/compat/src/arkts/finalization.ts | 2 +- .../koalaui/compat/src/arkts/index.ts | 2 +- .../koalaui/compat/src/arkts/observable.ts | 938 ++++- .../koalaui/compat/src/arkts/performance.ts | 2 +- .../compat/src/arkts/prop-deep-copy.ts | 4 +- .../koalaui/compat/src/arkts/reflection.ts | 2 - .../koalaui/compat/src/arkts/strings.ts | 8 +- .../koalaui/compat/src/arkts/ts-reflection.ts | 2 +- .../koalaui/compat/src/arkts/types.ts | 2 +- .../koalaui/compat/src/arkts/utils.ts | 21 +- koala-wrapper/koalaui/compat/src/index.ts | 6 + .../koalaui/compat/src/ohos/index.ts | 4 + .../koalaui/compat/src/ohos/performance.ts | 2 +- .../koalaui/compat/src/typescript/array.ts | 2 +- .../koalaui/compat/src/typescript/atomic.ts | 2 +- .../koalaui/compat/src/typescript/double.ts | 10 +- .../compat/src/typescript/finalization.ts | 3 +- .../koalaui/compat/src/typescript/index.ts | 2 +- .../compat/src/typescript/observable.ts | 123 +- .../compat/src/typescript/performance.ts | 2 +- .../compat/src/typescript/prop-deep-copy.ts | 2 +- .../compat/src/typescript/ts-reflection.ts | 2 +- .../koalaui/compat/src/typescript/utils.ts | 20 +- koala-wrapper/koalaui/interop/.gitignore | 1 + koala-wrapper/koalaui/interop/.gitlab-ci.yml | 63 + .../dist/lib/src/arkts/ResourceManager.d.ts | 24 +- .../dist/lib/src/arkts/ResourceManager.js | 31 +- .../lib/src/interop/DeserializerBase.d.ts | 28 +- .../dist/lib/src/interop/DeserializerBase.js | 34 +- .../dist/lib/src/interop/Finalizable.d.ts | 15 - .../dist/lib/src/interop/Finalizable.js | 6 +- .../lib/src/interop/InteropNativeModule.d.ts | 37 +- .../lib/src/interop/InteropNativeModule.js | 11 +- .../dist/lib/src/interop/InteropOps.d.ts | 15 - .../dist/lib/src/interop/InteropOps.js | 2 +- .../dist/lib/src/interop/InteropTypes.d.ts | 16 +- .../dist/lib/src/interop/InteropTypes.js | 15 - .../lib/src/interop/MaterializedBase.d.ts | 15 - .../dist/lib/src/interop/MaterializedBase.js | 2 +- .../dist/lib/src/interop/NativeBuffer.d.ts | 19 +- .../dist/lib/src/interop/NativeBuffer.js | 13 +- .../dist/lib/src/interop/NativeString.d.ts | 15 - .../dist/lib/src/interop/NativeString.js | 2 +- .../dist/lib/src/interop/Platform.d.ts | 15 - .../interop/dist/lib/src/interop/Platform.js | 2 +- .../dist/lib/src/interop/SerializerBase.d.ts | 28 +- .../dist/lib/src/interop/SerializerBase.js | 71 +- .../interop/dist/lib/src/interop/Wrapper.d.ts | 15 - .../interop/dist/lib/src/interop/Wrapper.js | 2 +- .../interop/dist/lib/src/interop/arrays.d.ts | 15 - .../interop/dist/lib/src/interop/arrays.js | 2 +- .../interop/dist/lib/src/interop/buffer.d.ts | 24 +- .../interop/dist/lib/src/interop/buffer.js | 5 +- .../interop/dist/lib/src/interop/index.d.ts | 17 +- .../interop/dist/lib/src/interop/index.js | 6 +- .../dist/lib/src/interop/loadLibraries.d.ts | 15 - .../dist/lib/src/interop/loadLibraries.js | 37 +- .../dist/lib/src/interop/nullable.d.ts | 15 - .../interop/dist/lib/src/interop/nullable.js | 2 +- .../dist/lib/src/napi/wrappers/Callback.d.ts | 15 - .../dist/lib/src/napi/wrappers/Callback.js | 2 +- .../dist/lib/src/napi/wrappers/Wrapper.d.ts | 15 - .../dist/lib/src/napi/wrappers/Wrapper.js | 2 +- .../dist/lib/src/napi/wrappers/arrays.d.ts | 15 - .../dist/lib/src/napi/wrappers/arrays.js | 2 +- .../dist/lib/src/wasm/wrappers/Callback.d.ts | 15 - .../dist/lib/src/wasm/wrappers/Callback.js | 2 +- .../dist/lib/src/wasm/wrappers/Wrapper.d.ts | 15 - .../dist/lib/src/wasm/wrappers/Wrapper.js | 2 +- .../dist/lib/src/wasm/wrappers/arrays.d.ts | 15 - .../dist/lib/src/wasm/wrappers/arrays.js | 2 +- .../interop/dist/lib/tsconfig.tsbuildinfo | 1 + koala-wrapper/koalaui/interop/meson.build | 322 ++ .../koalaui/interop/meson_options.txt | 21 + .../koalaui/interop/oh-package.json5 | 23 +- .../koalaui/interop/scripts/configure.mjs | 502 +++ .../koalaui/interop/scripts/get_napi.mjs | 32 + .../scripts/get_prebuilt.mjs} | 73 +- .../koalaui/interop/scripts/utils.mjs | 248 ++ ...serializerBase.sts => DeserializerBase.ts} | 254 +- .../arkts/{Finalizable.sts => Finalizable.ts} | 15 +- ...ativeModule.sts => InteropNativeModule.ts} | 44 +- .../{InteropTypes.sts => InteropTypes.ts} | 13 +- ...terializedBase.sts => MaterializedBase.ts} | 2 +- .../koalaui/interop/src/arkts/NativeBuffer.ts | 87 + .../interop/src/arkts/ResourceManager.ts | 39 +- .../{SerializerBase.sts => SerializerBase.ts} | 392 ++- .../src/arkts/{callback.sts => callback.ts} | 16 +- .../interop/src/arkts/{index.sts => index.ts} | 3 +- .../{loadLibraries.sts => loadLibraries.ts} | 7 +- .../interop/src/cangjie/DeserializerBase.cj | 86 +- .../src/cangjie/InteropNativeModule.cj | 111 +- .../interop/src/cangjie/InteropTypes.cj | 18 +- .../{Finalizable.cj => MaterializedBase.cj} | 18 +- .../interop/src/cangjie/SerializerBase.cj | 235 +- .../koalaui/interop/src/cangjie/Tag.cj | 2 +- .../koalaui/interop/src/cangjie/cjpm.toml | 13 + .../interop/src/cpp/DeserializerBase.h | 103 +- .../koalaui/interop/src/cpp/SerializerBase.h | 64 +- .../koalaui/interop/src/cpp/ani/ani.h | 3027 +++++------------ .../interop/src/cpp/ani/convertors-ani.cc | 100 +- .../interop/src/cpp/ani/convertors-ani.h | 717 +++- .../interop/src/cpp/callback-resource.cc | 29 +- .../interop/src/cpp/callback-resource.h | 15 +- .../interop/src/cpp/cangjie/convertors-cj.cc | 28 +- .../interop/src/cpp/cangjie/convertors-cj.h | 76 +- .../koalaui/interop/src/cpp/common-interop.cc | 361 +- .../koalaui/interop/src/cpp/common-interop.h | 18 +- .../koalaui/interop/src/cpp/crashdump.h | 2 +- .../koalaui/interop/src/cpp/dynamic-loader.h | 8 +- .../interop/src/cpp/ets/convertors-ets.cc | 20 +- .../interop/src/cpp/ets/convertors-ets.h | 530 ++- .../koalaui/interop/src/cpp/ets/etsapi.h | 2 +- .../interop/src/cpp/interop-logging.cc | 29 +- .../koalaui/interop/src/cpp/interop-logging.h | 19 +- .../koalaui/interop/src/cpp/interop-types.h | 36 +- .../interop/src/cpp/jni/convertors-jni.cc | 2 +- .../interop/src/cpp/jni/convertors-jni.h | 107 +- .../interop/src/cpp/jsc/convertors-jsc.cc | 29 +- .../interop/src/cpp/jsc/convertors-jsc.h | 93 +- .../interop/src/cpp/napi/convertors-napi.cc | 45 +- .../interop/src/cpp/napi/convertors-napi.h | 159 +- .../interop/src/cpp/napi/win-dynamic-node.cc | 2 +- .../koalaui/interop/src/cpp/ohos/oh_sk_log.cc | 17 +- .../koalaui/interop/src/cpp/ohos/oh_sk_log.h | 5 +- .../koalaui/interop/src/cpp/profiler.h | 6 +- .../koalaui/interop/src/cpp/tracer.h | 4 +- .../interop/src/cpp/types/koala-types.h | 142 +- .../interop/src/cpp/types/signatures.cc | 38 +- .../interop/src/cpp/types/signatures.h | 2 +- .../koalaui/interop/src/cpp/vmloader.cc | 650 +++- .../interop/src/cpp/wasm/convertors-wasm.h | 61 +- .../interop/src/interop/DeserializerBase.ts | 34 +- .../interop/src/interop/Finalizable.ts | 8 +- .../src/interop/InteropNativeModule.ts | 28 +- .../koalaui/interop/src/interop/InteropOps.ts | 4 +- .../interop/src/interop/InteropTypes.ts | 7 +- .../interop/src/interop/MaterializedBase.ts | 2 +- .../interop/src/interop/NativeBuffer.ts | 28 +- .../koalaui/interop/src/interop/Platform.ts | 2 +- .../interop/src/interop/SerializerBase.ts | 60 +- .../koalaui/interop/src/interop/Wrapper.ts | 2 +- .../koalaui/interop/src/interop/arrays.ts | 4 +- .../koalaui/interop/src/interop/buffer.ts | 15 +- .../koalaui/interop/src/interop/index.ts | 2 +- .../src/interop/java/CallbackRecord.java | 2 +- .../src/interop/java/CallbackRegistry.java | 14 +- .../src/interop/java/CallbackTests.java | 2 +- .../src/interop/java/CallbackType.java | 2 +- .../interop/src/interop/loadLibraries.ts | 29 +- .../interop/src/napi/wrappers/Wrapper.ts | 2 +- .../interop/src/napi/wrappers/arrays.ts | 2 +- .../interop/src/wasm/wrappers/Wrapper.ts | 2 +- .../interop/src/wasm/wrappers/arrays.ts | 2 +- koala-wrapper/src/Es2pandaEnums.ts | 2 +- koala-wrapper/src/arkts-api/types.ts | 3 +- 248 files changed, 8136 insertions(+), 4716 deletions(-) create mode 100644 koala-wrapper/koalaui/common/.gitlab-ci.yml create mode 100644 koala-wrapper/koalaui/common/bridges/ohos/src/chai/index.ts rename koala-wrapper/koalaui/common/{dist/bridges/ohos/mocha/index.d.ts => bridges/ohos/src/index.ts} (85%) rename koala-wrapper/koalaui/{interop/src/arkts/buffer.sts => common/bridges/ohos/src/mocha/index.ts} (40%) create mode 100644 koala-wrapper/koalaui/common/bridges/ohos/src/mocha/types/index.d.ts delete mode 100644 koala-wrapper/koalaui/common/dist/bridges/ohos/chai/index.d.ts delete mode 100644 koala-wrapper/koalaui/common/dist/bridges/ohos/chai/index.js delete mode 100644 koala-wrapper/koalaui/common/dist/bridges/ohos/index.js create mode 100644 koala-wrapper/koalaui/common/dist/lib/tsconfig.tsbuildinfo rename koala-wrapper/koalaui/common/{dist/bridges/ohos/index.d.ts => empty.js} (77%) create mode 100644 koala-wrapper/koalaui/common/test/golden.js create mode 100644 koala-wrapper/koalaui/compat/.gitlab-ci.yml create mode 100644 koala-wrapper/koalaui/compat/dist/tsconfig.tsbuildinfo rename koala-wrapper/koalaui/{interop/src/arkts/NativeBuffer.sts => compat/oh-package.json5} (44%) create mode 100644 koala-wrapper/koalaui/interop/.gitignore create mode 100644 koala-wrapper/koalaui/interop/.gitlab-ci.yml create mode 100644 koala-wrapper/koalaui/interop/dist/lib/tsconfig.tsbuildinfo create mode 100644 koala-wrapper/koalaui/interop/meson.build create mode 100644 koala-wrapper/koalaui/interop/meson_options.txt create mode 100644 koala-wrapper/koalaui/interop/scripts/configure.mjs create mode 100644 koala-wrapper/koalaui/interop/scripts/get_napi.mjs rename koala-wrapper/koalaui/{common/dist/bridges/ohos/mocha/index.js => interop/scripts/get_prebuilt.mjs} (36%) create mode 100644 koala-wrapper/koalaui/interop/scripts/utils.mjs rename koala-wrapper/koalaui/interop/src/arkts/{DeserializerBase.sts => DeserializerBase.ts} (39%) rename koala-wrapper/koalaui/interop/src/arkts/{Finalizable.sts => Finalizable.ts} (90%) rename koala-wrapper/koalaui/interop/src/arkts/{InteropNativeModule.sts => InteropNativeModule.ts} (60%) rename koala-wrapper/koalaui/interop/src/arkts/{InteropTypes.sts => InteropTypes.ts} (73%) rename koala-wrapper/koalaui/interop/src/arkts/{MaterializedBase.sts => MaterializedBase.ts} (93%) create mode 100644 koala-wrapper/koalaui/interop/src/arkts/NativeBuffer.ts rename koala-wrapper/koalaui/interop/src/arkts/{SerializerBase.sts => SerializerBase.ts} (36%) rename koala-wrapper/koalaui/interop/src/arkts/{callback.sts => callback.ts} (84%) rename koala-wrapper/koalaui/interop/src/arkts/{index.sts => index.ts} (92%) rename koala-wrapper/koalaui/interop/src/arkts/{loadLibraries.sts => loadLibraries.ts} (76%) rename koala-wrapper/koalaui/interop/src/cangjie/{Finalizable.cj => MaterializedBase.cj} (61%) diff --git a/koala-wrapper/koalaui/common/.gitlab-ci.yml b/koala-wrapper/koalaui/common/.gitlab-ci.yml new file mode 100644 index 000000000..70255c1dd --- /dev/null +++ b/koala-wrapper/koalaui/common/.gitlab-ci.yml @@ -0,0 +1,52 @@ +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +build common: + stage: build + interruptible: true + extends: .linux-vm-shell-task + needs: + - install node modules (ui2abc) + - install node modules (arkoala) + - install node modules (arkoala-arkts) + - install node modules (incremental) + - install node modules (interop) + - build compat + before_script: + - !reference [.setup, script] + - cd incremental/common + script: + - npm run compile + artifacts: + expire_in: 2 days + paths: + - incremental/common/build/lib + - incremental/common/build/bridges + +pack common: + extends: + - .npm-pack + - .linux-vm-shell-task + variables: + PACKAGE_DIR: incremental/common + needs: + - build common + +publish common: + extends: + - .npm-publish + - .linux-vm-shell-task + variables: + PACKAGE_DIR: incremental/common + dependencies: + - build common diff --git a/koala-wrapper/koalaui/common/bridges/ohos/src/chai/index.ts b/koala-wrapper/koalaui/common/bridges/ohos/src/chai/index.ts new file mode 100644 index 000000000..b1df54150 --- /dev/null +++ b/koala-wrapper/koalaui/common/bridges/ohos/src/chai/index.ts @@ -0,0 +1,213 @@ +/* + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { expect } from "@ohos/hypium" + +export interface Assert { + (expression: any, message?: string): asserts expression + + /** + * Asserts non-strict equality (==) of actual and expected. + */ + equal(actual: T, expected: T, message?: string): void + + /** + * Asserts non-strict inequality (!=) of actual and expected. + */ + notEqual(actual: T, expected: T, message?: string): void + + /** + * Asserts strict equality (===) of actual and expected. + */ + strictEqual(actual: T, expected: T, message?: string): void + + /** + * Asserts strict inequality (!==) of actual and expected. + */ + notStrictEqual(actual: T, expected: T, message?: string): void + + deepEqual(actual: any, expected: any, message?: string): void + + notDeepEqual(actual: any, expected: any, message?: string): void + + isTrue(value: any, message?: string): void + + isFalse(value: any, message?: string): void + + closeTo(actual: number, expected: number, delta: number, message?: string): void + + fail(message?: string): void + + isNull(value: any, message?: string): void + + isNotNull(value: any, message?: string): void + + instanceOf(value: any, constructor: Function, message?: string): void + + isAtLeast(valueToCheck: number, valueToBeAtLeast: number, message?: string): void + + exists(value: any, message?: string): void + + throw(fn: () => void, message?: string): void + + throws(fn: () => void, message?: string): void + + isAbove(valueToCheck: number, valueToBeAbove: number, message?: string): void + + isBelow(valueToCheck: number, valueToBeBelow: number, message?: string): void + + match(value: string, regexp: RegExp, message?: string): void + + isDefined(value: any, message?: string): void + + isUndefined(value: any, message?: string): void + + isEmpty(object: any, message?: string): void + + isNotEmpty(object: any, message?: string): void +} + +// todo: the 'message' arg is ignored + +export var assert: Assert = ((expression: any, message?: string): void => { + expect(Boolean(expression)).assertTrue() +}) as Assert + +assert.equal = (actual: T, expected: T, message?: string): void => { + expect(actual).assertEqual(expected) +} + +assert.notEqual = (actual: T, expected: T, message?: string): void => { + // todo: not accurate impl, because compared values are not printed + expect(actual != expected).assertTrue() +} + +assert.strictEqual = (actual: T, expected: T, message?: string): void => { + // todo: not accurate impl, because compared values are not printed + expect(actual === expected).assertTrue() +} + +assert.notStrictEqual = (actual: T, expected: T, message?: string): void => { + // todo: not accurate impl, because compared values are not printed + expect(actual !== expected).assertTrue() +} + +assert.deepEqual = (actual: any, expected: any, message?: string): void => { + // todo: implement + expect(actual).assertEqual(actual/*expected*/) +} + +assert.notDeepEqual = (actual: any, expected: any, message?: string): void => { + // todo: implement + expect(actual).assertEqual(actual/*expected*/) +} + +assert.isTrue = (value: any, message?: string): void => { + expect(value).assertTrue() +} + +assert.isFalse = (value: any, message?: string): void => { + expect(value).assertFalse() +} + +assert.closeTo = (actual: number, expected: number, delta: number, message?: string): void => { + // implementation of 'assertClose' does not fit: + // expect(actual).assertClose(expected, delta) + + const diff = Math.abs(actual - expected) + if (diff == delta) + expect(diff).assertEqual(delta) + else + expect(diff).assertLess(delta) +} + +assert.fail = (message?: string): void => { + expect().assertFail() +} + +assert.isNull = (value: any, message?: string): void => { + expect(value).assertNull() +} + +assert.isNotNull = (value: any, message?: string): void => { + expect(value ? null : value).assertNull() +} + +assert.instanceOf = (value: any, constructor: Function, message?: string): void => { + // todo: not accurate impl + // expect(value).assertInstanceOf(constructor.name) + expect(value instanceof constructor).assertTrue() +} + +assert.isAtLeast = (valueToCheck: number, valueToBeAtLeast: number, message?: string): void => { + if (valueToCheck == valueToBeAtLeast) + expect(valueToCheck).assertEqual(valueToBeAtLeast) + else + expect(valueToCheck).assertLarger(valueToBeAtLeast) +} + +assert.exists = (value: any, message?: string): void => { + // todo: not accurate impl + expect(value == null).assertFalse() +} + +assert.throw = (fn: () => void, message?: string): void => { + let fnWrapper = () => { + try { + fn() + } catch (e) { + throw new Error("fn thrown exception") + } + } + expect(fnWrapper).assertThrowError("fn thrown exception") +} + +assert.throws = (fn: () => void, message?: string): void => { + assert.throw(fn, message) +} + +assert.isAbove = (valueToCheck: number, valueToBeAbove: number, message?: string): void => { + expect(valueToCheck).assertLarger(valueToBeAbove) +} + +assert.isBelow = (valueToCheck: number, valueToBeBelow: number, message?: string): void => { + expect(valueToCheck).assertLess(valueToBeBelow) +} + +assert.match = (value: string, regexp: RegExp, message?: string): void => { + // todo: not accurate impl + expect(regexp.test(value)).assertTrue() +} + +assert.isDefined = (value: any, message?: string): void => { + // todo: not accurate impl + expect(value === undefined).assertFalse() +} + +assert.isUndefined = (value: any, message?: string): void => { + expect(value).assertUndefined() +} + +assert.isEmpty = (object: any, message?: string): void => { + // todo: implement + expect(object !== undefined).assertTrue() +} + +assert.isNotEmpty = (object: any, message?: string): void => { + // todo: implement + expect(object !== undefined).assertTrue() +} + + diff --git a/koala-wrapper/koalaui/common/dist/bridges/ohos/mocha/index.d.ts b/koala-wrapper/koalaui/common/bridges/ohos/src/index.ts similarity index 85% rename from koala-wrapper/koalaui/common/dist/bridges/ohos/mocha/index.d.ts rename to koala-wrapper/koalaui/common/bridges/ohos/src/index.ts index 99c5ebee5..1e307cda5 100644 --- a/koala-wrapper/koalaui/common/dist/bridges/ohos/mocha/index.d.ts +++ b/koala-wrapper/koalaui/common/bridges/ohos/src/index.ts @@ -13,5 +13,7 @@ * limitations under the License. */ -export declare function startTests(generateGolden?: boolean): void; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file +export {startTests} from "./mocha" +export * from "./chai" + +import "./mocha" // globals diff --git a/koala-wrapper/koalaui/interop/src/arkts/buffer.sts b/koala-wrapper/koalaui/common/bridges/ohos/src/mocha/index.ts similarity index 40% rename from koala-wrapper/koalaui/interop/src/arkts/buffer.sts rename to koala-wrapper/koalaui/common/bridges/ohos/src/mocha/index.ts index d808bdc82..3df11b871 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/buffer.sts +++ b/koala-wrapper/koalaui/common/bridges/ohos/src/mocha/index.ts @@ -13,30 +13,44 @@ * limitations under the License. */ -import { int8 } from "@koalaui/common" +import {describe, beforeEach, it, Size} from "@ohos/hypium" -export class KBuffer { - private readonly _buffer: byte[] - public get buffer(): byte[] { - return this._buffer - } - public get length(): int { - return this._buffer.length - } +declare namespace globalThis { + let __OpenHarmony: boolean + let __generateGolden: boolean +} - constructor(length: int) { - this._buffer = new byte[length] - } +globalThis.__OpenHarmony = true - constructor(buffer: byte[]) { - this._buffer = buffer - } +const suiteMap = new Map() - set(index: int, value: int8): void { - this._buffer[index] = value as byte - } +suite = (title: string, fn: Fn): void => { + suiteMap.set(title, fn) +} - get(index: int): byte { - return this._buffer[index] +suiteSetup = (title: string, fn: Fn): void => { + beforeEach(fn) +} + +test = ((title: string, fn?: Fn): void => { + it(fn ? title : `[SKIP] ${title}`, Size.MEDIUMTEST, fn ? fn : () => {}) +}) as TestFn + +test.skip = (title: string, fn?: Fn): void => { + it(`[SKIP] ${title}`, Size.MEDIUMTEST, () => {}) +} + +(performance as TimeFn) = { + now: (): number => { + return Date.now() } -} \ No newline at end of file +} + +export function startTests(generateGolden: boolean = false) { + globalThis.__generateGolden = generateGolden + suiteMap.forEach((fn: Fn, title: string) => { + describe(title, function () { + fn() + }) + }) +} diff --git a/koala-wrapper/koalaui/common/bridges/ohos/src/mocha/types/index.d.ts b/koala-wrapper/koalaui/common/bridges/ohos/src/mocha/types/index.d.ts new file mode 100644 index 000000000..c9ef95231 --- /dev/null +++ b/koala-wrapper/koalaui/common/bridges/ohos/src/mocha/types/index.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +declare global { + type Fn = () => void + + type SuiteFn = (title: string, fn: Fn) => void + + interface TestFn { + (title: string, fn?: Fn): void + skip(title: string, fn?: Fn): void + } + + let suite: SuiteFn + let suiteSetup: SuiteFn + let test: TestFn + + interface TimeFn { + now: () => number + } + + let performance: TimeFn +} + +export {} diff --git a/koala-wrapper/koalaui/common/dist/bridges/ohos/chai/index.d.ts b/koala-wrapper/koalaui/common/dist/bridges/ohos/chai/index.d.ts deleted file mode 100644 index 05dac46d7..000000000 --- a/koala-wrapper/koalaui/common/dist/bridges/ohos/chai/index.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export interface Assert { - (expression: any, message?: string): asserts expression; - /** - * Asserts non-strict equality (==) of actual and expected. - */ - equal(actual: T, expected: T, message?: string): void; - /** - * Asserts non-strict inequality (!=) of actual and expected. - */ - notEqual(actual: T, expected: T, message?: string): void; - /** - * Asserts strict equality (===) of actual and expected. - */ - strictEqual(actual: T, expected: T, message?: string): void; - /** - * Asserts strict inequality (!==) of actual and expected. - */ - notStrictEqual(actual: T, expected: T, message?: string): void; - deepEqual(actual: any, expected: any, message?: string): void; - notDeepEqual(actual: any, expected: any, message?: string): void; - isTrue(value: any, message?: string): void; - isFalse(value: any, message?: string): void; - closeTo(actual: number, expected: number, delta: number, message?: string): void; - fail(message?: string): void; - isNull(value: any, message?: string): void; - isNotNull(value: any, message?: string): void; - instanceOf(value: any, constructor: Function, message?: string): void; - isAtLeast(valueToCheck: number, valueToBeAtLeast: number, message?: string): void; - exists(value: any, message?: string): void; - throw(fn: () => void, message?: string): void; - throws(fn: () => void, message?: string): void; - isAbove(valueToCheck: number, valueToBeAbove: number, message?: string): void; - isBelow(valueToCheck: number, valueToBeBelow: number, message?: string): void; - match(value: string, regexp: RegExp, message?: string): void; - isDefined(value: any, message?: string): void; - isUndefined(value: any, message?: string): void; - isEmpty(object: any, message?: string): void; - isNotEmpty(object: any, message?: string): void; -} -export declare var assert: Assert; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/common/dist/bridges/ohos/chai/index.js b/koala-wrapper/koalaui/common/dist/bridges/ohos/chai/index.js deleted file mode 100644 index d1716b7f8..000000000 --- a/koala-wrapper/koalaui/common/dist/bridges/ohos/chai/index.js +++ /dev/null @@ -1,124 +0,0 @@ -"use strict"; -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.assert = void 0; -const hypium_1 = require("@ohos/hypium"); -// todo: the 'message' arg is ignored -exports.assert = ((expression, message) => { - (0, hypium_1.expect)(Boolean(expression)).assertTrue(); -}); -exports.assert.equal = (actual, expected, message) => { - (0, hypium_1.expect)(actual).assertEqual(expected); -}; -exports.assert.notEqual = (actual, expected, message) => { - // todo: not accurate impl, because compared values are not printed - (0, hypium_1.expect)(actual != expected).assertTrue(); -}; -exports.assert.strictEqual = (actual, expected, message) => { - // todo: not accurate impl, because compared values are not printed - (0, hypium_1.expect)(actual === expected).assertTrue(); -}; -exports.assert.notStrictEqual = (actual, expected, message) => { - // todo: not accurate impl, because compared values are not printed - (0, hypium_1.expect)(actual !== expected).assertTrue(); -}; -exports.assert.deepEqual = (actual, expected, message) => { - // todo: implement - (0, hypium_1.expect)(actual).assertEqual(actual /*expected*/); -}; -exports.assert.notDeepEqual = (actual, expected, message) => { - // todo: implement - (0, hypium_1.expect)(actual).assertEqual(actual /*expected*/); -}; -exports.assert.isTrue = (value, message) => { - (0, hypium_1.expect)(value).assertTrue(); -}; -exports.assert.isFalse = (value, message) => { - (0, hypium_1.expect)(value).assertFalse(); -}; -exports.assert.closeTo = (actual, expected, delta, message) => { - // implementation of 'assertClose' does not fit: - // expect(actual).assertClose(expected, delta) - const diff = Math.abs(actual - expected); - if (diff == delta) - (0, hypium_1.expect)(diff).assertEqual(delta); - else - (0, hypium_1.expect)(diff).assertLess(delta); -}; -exports.assert.fail = (message) => { - (0, hypium_1.expect)().assertFail(); -}; -exports.assert.isNull = (value, message) => { - (0, hypium_1.expect)(value).assertNull(); -}; -exports.assert.isNotNull = (value, message) => { - (0, hypium_1.expect)(value ? null : value).assertNull(); -}; -exports.assert.instanceOf = (value, constructor, message) => { - // todo: not accurate impl - // expect(value).assertInstanceOf(constructor.name) - (0, hypium_1.expect)(value instanceof constructor).assertTrue(); -}; -exports.assert.isAtLeast = (valueToCheck, valueToBeAtLeast, message) => { - if (valueToCheck == valueToBeAtLeast) - (0, hypium_1.expect)(valueToCheck).assertEqual(valueToBeAtLeast); - else - (0, hypium_1.expect)(valueToCheck).assertLarger(valueToBeAtLeast); -}; -exports.assert.exists = (value, message) => { - // todo: not accurate impl - (0, hypium_1.expect)(value == null).assertFalse(); -}; -exports.assert.throw = (fn, message) => { - let fnWrapper = () => { - try { - fn(); - } - catch (e) { - throw new Error("fn thrown exception"); - } - }; - (0, hypium_1.expect)(fnWrapper).assertThrowError("fn thrown exception"); -}; -exports.assert.throws = (fn, message) => { - exports.assert.throw(fn, message); -}; -exports.assert.isAbove = (valueToCheck, valueToBeAbove, message) => { - (0, hypium_1.expect)(valueToCheck).assertLarger(valueToBeAbove); -}; -exports.assert.isBelow = (valueToCheck, valueToBeBelow, message) => { - (0, hypium_1.expect)(valueToCheck).assertLess(valueToBeBelow); -}; -exports.assert.match = (value, regexp, message) => { - // todo: not accurate impl - (0, hypium_1.expect)(regexp.test(value)).assertTrue(); -}; -exports.assert.isDefined = (value, message) => { - // todo: not accurate impl - (0, hypium_1.expect)(value === undefined).assertFalse(); -}; -exports.assert.isUndefined = (value, message) => { - (0, hypium_1.expect)(value).assertUndefined(); -}; -exports.assert.isEmpty = (object, message) => { - // todo: implement - (0, hypium_1.expect)(object !== undefined).assertTrue(); -}; -exports.assert.isNotEmpty = (object, message) => { - // todo: implement - (0, hypium_1.expect)(object !== undefined).assertTrue(); -}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/common/dist/bridges/ohos/index.js b/koala-wrapper/koalaui/common/dist/bridges/ohos/index.js deleted file mode 100644 index 2fcb7de3e..000000000 --- a/koala-wrapper/koalaui/common/dist/bridges/ohos/index.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.startTests = void 0; -var mocha_1 = require("./mocha"); -Object.defineProperty(exports, "startTests", { enumerable: true, get: function () { return mocha_1.startTests; } }); -__exportStar(require("./chai"), exports); -require("./mocha"); // globals -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Errors.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/Errors.d.ts index e367bc336..803b07a2e 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Errors.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/Errors.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - export declare function assertion(condition: boolean, message: string): void; export declare function ensure(value: T | undefined, message: string): T; //# sourceMappingURL=Errors.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Errors.js b/koala-wrapper/koalaui/common/dist/lib/src/Errors.js index 4f05c8cef..ef78008d2 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Errors.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/Errors.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Finalization.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/Finalization.d.ts index 5fc9fef68..dc4ab4a5f 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Finalization.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/Finalization.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { Thunk } from "#koalaui/compat"; export { Thunk } from "#koalaui/compat"; export declare function finalizerRegister(target: object, thunk: Thunk): void; diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Finalization.js b/koala-wrapper/koalaui/common/dist/lib/src/Finalization.js index 8b8f9e9b1..54930b97b 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Finalization.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/Finalization.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,8 +14,10 @@ * limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.finalizerUnregister = exports.finalizerRegisterWithCleaner = exports.finalizerRegister = void 0; +exports.finalizerUnregister = exports.finalizerRegisterWithCleaner = exports.finalizerRegister = exports.Thunk = void 0; const compat_1 = require("#koalaui/compat"); +var compat_2 = require("#koalaui/compat"); +Object.defineProperty(exports, "Thunk", { enumerable: true, get: function () { return compat_2.Thunk; } }); function finalizerRegister(target, thunk) { (0, compat_1.finalizerRegister)(target, thunk); } diff --git a/koala-wrapper/koalaui/common/dist/lib/src/KoalaProfiler.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/KoalaProfiler.d.ts index a78eaad53..022089618 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/KoalaProfiler.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/KoalaProfiler.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32 } from "#koalaui/compat"; export declare class KoalaProfiler { private static readonly map; diff --git a/koala-wrapper/koalaui/common/dist/lib/src/KoalaProfiler.js b/koala-wrapper/koalaui/common/dist/lib/src/KoalaProfiler.js index 664840fdd..bf2512c23 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/KoalaProfiler.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/KoalaProfiler.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/LifecycleEvent.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/LifecycleEvent.d.ts index e72ef9fae..be276917f 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/LifecycleEvent.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/LifecycleEvent.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - export declare enum LifecycleEventKind { SHOW_FRAME = 0, HIDE_FRAME = 1, diff --git a/koala-wrapper/koalaui/common/dist/lib/src/LifecycleEvent.js b/koala-wrapper/koalaui/common/dist/lib/src/LifecycleEvent.js index 2b1f275d8..c3b848452 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/LifecycleEvent.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/LifecycleEvent.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/MarkableQueue.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/MarkableQueue.d.ts index 075ed627f..729309cc9 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/MarkableQueue.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/MarkableQueue.d.ts @@ -1,18 +1,6 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. +/** + * A markable queue that allows to accumulate callbacks and to call them to the latest set marker. */ - export interface MarkableQueue { /** Sets the new marker to the queue. */ setMarker(): void; diff --git a/koala-wrapper/koalaui/common/dist/lib/src/MarkableQueue.js b/koala-wrapper/koalaui/common/dist/lib/src/MarkableQueue.js index a956f4620..a1d88d833 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/MarkableQueue.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/MarkableQueue.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Matrix33.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/Matrix33.d.ts index 8fff5dd79..8ece5f11b 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Matrix33.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/Matrix33.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { float32 } from "#koalaui/compat"; export declare function mat33(array?: Float32Array): Matrix33; export declare class Matrix33 { diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Matrix33.js b/koala-wrapper/koalaui/common/dist/lib/src/Matrix33.js index 0c68024b3..5e7a0452a 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Matrix33.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/Matrix33.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,7 +20,7 @@ function mat33(array) { return (array == undefined) ? new Matrix33() : new Matrix33(array); } exports.mat33 = mat33; -const tolerance = (1.0 / (1 << 12)); +const tolerance = (0, compat_1.float64To32)(1.0 / (1 << 12)); class Matrix33 { constructor(array = new Float32Array((0, compat_1.Array_from_number)([ 1.0, 0.0, 0.0, diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Matrix44.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/Matrix44.d.ts index 0524b6b5a..3a7e05f74 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Matrix44.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/Matrix44.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { float32 } from "#koalaui/compat"; import { Matrix33 } from "./Matrix33"; import { Point3 } from "./Point3"; diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Matrix44.js b/koala-wrapper/koalaui/common/dist/lib/src/Matrix44.js index 4f727e450..0a8a046d7 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Matrix44.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/Matrix44.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/PerfProbe.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/PerfProbe.d.ts index 7d860cc4c..44cb58ceb 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/PerfProbe.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/PerfProbe.d.ts @@ -1,18 +1,22 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at +/** + * A probe to measure performance. + * + * A probe can measure performance of any activity which has an entry and an exit points. + * Such activity can be a method call, or a sequence of actions, possibly asynchronous. + * + * A probe which has been entered and exited is considered a performed probe (see {@link MainPerfProbe.probePerformed}). + * A probe can be entered recursively. When all the recursive calls exits the probe becomes a performed probe. * - * http://www.apache.org/licenses/LICENSE-2.0 + * All performing probes form a hierarchy which is rooted at the main probe (see {@link enterMainPerfProbe}). + * A last started probe (see {@link MainPerfProbe.enterProbe}) which has not yet performed becomes a parent + * for the next started probe. It's the responsibility of the API caller to keep this parent-child relationship valid, + * that is: a child probe should exit before its parent probe exits. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Statistics gathered by a probe: + * - call count + * - recursive call count + * - total time and percentage relative to the main (root) probe */ - export interface PerfProbe { /** * The name of the probe. @@ -34,7 +38,7 @@ export interface PerfProbe { /** * Cancels measuring the probe and its children probes. */ - cancel(): void; + cancel(b?: Boolean): void; /** * User-defined data associated with the probe. */ diff --git a/koala-wrapper/koalaui/common/dist/lib/src/PerfProbe.js b/koala-wrapper/koalaui/common/dist/lib/src/PerfProbe.js index 06e957f97..54780519b 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/PerfProbe.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/PerfProbe.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -42,7 +42,7 @@ class DummyPerfProbe { get name() { return "dummy"; } get dummy() { return true; } exit(log) { } - cancel() { } + cancel(b) { } get canceled() { return false; } enterProbe(name) { return PerfProbeImpl.DUMMY; } exitProbe(name) { return PerfProbeImpl.DUMMY; } @@ -105,15 +105,17 @@ class PerfProbeImpl { if (log) this.log(); } - cancel(cancelChildren = true) { + cancelWithChildren() { + this.cancel(); + this.maybeCancelChildren(); + } + cancel(b) { this._canceled = true; - if (cancelChildren) - this.maybeCancelChildren(); } maybeCancelChildren() { MainPerfProbeImpl.visit(this, false, (probe, depth) => { if (probe.performing) - probe.cancel(false); + probe.cancel(); }); } get canceled() { @@ -216,7 +218,7 @@ class MainPerfProbeImpl extends PerfProbeImpl { this.log(); this.cancel(); } - cancel() { + cancel(b) { MainPerfProbeImpl.mainProbes.delete(this.name); } static visit(root, logging, apply) { diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Point.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/Point.d.ts index f35d2561b..f0cb976b2 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Point.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/Point.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { float32 } from "#koalaui/compat"; export declare class Point { coordinates: Float32Array; diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Point.js b/koala-wrapper/koalaui/common/dist/lib/src/Point.js index 1b5080bfa..377a89a2a 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Point.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/Point.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Point3.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/Point3.d.ts index d6121d56d..230c4c33a 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Point3.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/Point3.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { float32 } from "#koalaui/compat"; export declare class Point3 { x: float32; diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Point3.js b/koala-wrapper/koalaui/common/dist/lib/src/Point3.js index de748e8e1..8eff88ce6 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Point3.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/Point3.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/index.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/index.d.ts index 8b816b3c4..5e4adcb9e 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/index.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/index.d.ts @@ -1,19 +1,4 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export { int8, uint8, int32, uint32, int64, uint64, float32, float64, asArray, asFloat64, float32FromBits, int32BitsFromFloat, Array_from_set, AtomicRef, CustomTextDecoder, CustomTextEncoder, className, lcClassName, functionOverValue, Observed, Observable, ObservableHandler, observableProxy, observableProxyArray, isFunction, propDeepCopy, refEqual, int8Array, unsafeCast } from "#koalaui/compat"; +export { int8, uint8, int32, uint32, int64, uint64, float32, float64, asArray, asFloat64, float32FromBits, int32BitsFromFloat, Array_from_set, AtomicRef, CustomTextDecoder, CustomTextEncoder, className, lcClassName, functionOverValue, Observed, Observable, ObservableHandler, observableProxy, observableProxyArray, isFunction, propDeepCopy, refEqual, int8Array, errorAsString, unsafeCast, scheduleCoroutine, memoryStats, launchJob } from "#koalaui/compat"; export { clamp, lerp, modulo, parseNumber, isFiniteNumber, getDistancePx } from "./math"; export { hashCodeFromString } from "./stringUtils"; export { KoalaProfiler } from "./KoalaProfiler"; diff --git a/koala-wrapper/koalaui/common/dist/lib/src/index.js b/koala-wrapper/koalaui/common/dist/lib/src/index.js index e50e6f07a..d023fa66f 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/index.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/index.js @@ -28,8 +28,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.UniqueId = exports.createSha1 = exports.SHA1Hash = exports.KoalaProfiler = exports.hashCodeFromString = exports.getDistancePx = exports.isFiniteNumber = exports.parseNumber = exports.modulo = exports.lerp = exports.clamp = exports.unsafeCast = exports.int8Array = exports.refEqual = exports.propDeepCopy = exports.isFunction = exports.observableProxyArray = exports.observableProxy = exports.ObservableHandler = exports.Observed = exports.functionOverValue = exports.lcClassName = exports.className = exports.CustomTextEncoder = exports.CustomTextDecoder = exports.AtomicRef = exports.Array_from_set = exports.int32BitsFromFloat = exports.float32FromBits = exports.asFloat64 = exports.asArray = void 0; +exports.UniqueId = exports.createSha1 = exports.SHA1Hash = exports.KoalaProfiler = exports.hashCodeFromString = exports.getDistancePx = exports.isFiniteNumber = exports.parseNumber = exports.modulo = exports.lerp = exports.clamp = exports.launchJob = exports.memoryStats = exports.scheduleCoroutine = exports.unsafeCast = exports.errorAsString = exports.int8Array = exports.refEqual = exports.propDeepCopy = exports.isFunction = exports.observableProxyArray = exports.observableProxy = exports.ObservableHandler = exports.Observable = exports.Observed = exports.functionOverValue = exports.lcClassName = exports.className = exports.CustomTextEncoder = exports.CustomTextDecoder = exports.AtomicRef = exports.Array_from_set = exports.int32BitsFromFloat = exports.float32FromBits = exports.asFloat64 = exports.asArray = exports.float64 = exports.float32 = exports.uint64 = exports.int64 = exports.uint32 = exports.int32 = exports.uint8 = exports.int8 = void 0; var compat_1 = require("#koalaui/compat"); +Object.defineProperty(exports, "int8", { enumerable: true, get: function () { return compat_1.int8; } }); +Object.defineProperty(exports, "uint8", { enumerable: true, get: function () { return compat_1.uint8; } }); +Object.defineProperty(exports, "int32", { enumerable: true, get: function () { return compat_1.int32; } }); +Object.defineProperty(exports, "uint32", { enumerable: true, get: function () { return compat_1.uint32; } }); +Object.defineProperty(exports, "int64", { enumerable: true, get: function () { return compat_1.int64; } }); +Object.defineProperty(exports, "uint64", { enumerable: true, get: function () { return compat_1.uint64; } }); +Object.defineProperty(exports, "float32", { enumerable: true, get: function () { return compat_1.float32; } }); +Object.defineProperty(exports, "float64", { enumerable: true, get: function () { return compat_1.float64; } }); Object.defineProperty(exports, "asArray", { enumerable: true, get: function () { return compat_1.asArray; } }); Object.defineProperty(exports, "asFloat64", { enumerable: true, get: function () { return compat_1.asFloat64; } }); Object.defineProperty(exports, "float32FromBits", { enumerable: true, get: function () { return compat_1.float32FromBits; } }); @@ -42,6 +50,7 @@ Object.defineProperty(exports, "className", { enumerable: true, get: function () Object.defineProperty(exports, "lcClassName", { enumerable: true, get: function () { return compat_1.lcClassName; } }); Object.defineProperty(exports, "functionOverValue", { enumerable: true, get: function () { return compat_1.functionOverValue; } }); Object.defineProperty(exports, "Observed", { enumerable: true, get: function () { return compat_1.Observed; } }); +Object.defineProperty(exports, "Observable", { enumerable: true, get: function () { return compat_1.Observable; } }); Object.defineProperty(exports, "ObservableHandler", { enumerable: true, get: function () { return compat_1.ObservableHandler; } }); Object.defineProperty(exports, "observableProxy", { enumerable: true, get: function () { return compat_1.observableProxy; } }); Object.defineProperty(exports, "observableProxyArray", { enumerable: true, get: function () { return compat_1.observableProxyArray; } }); @@ -49,7 +58,11 @@ Object.defineProperty(exports, "isFunction", { enumerable: true, get: function ( Object.defineProperty(exports, "propDeepCopy", { enumerable: true, get: function () { return compat_1.propDeepCopy; } }); Object.defineProperty(exports, "refEqual", { enumerable: true, get: function () { return compat_1.refEqual; } }); Object.defineProperty(exports, "int8Array", { enumerable: true, get: function () { return compat_1.int8Array; } }); +Object.defineProperty(exports, "errorAsString", { enumerable: true, get: function () { return compat_1.errorAsString; } }); Object.defineProperty(exports, "unsafeCast", { enumerable: true, get: function () { return compat_1.unsafeCast; } }); +Object.defineProperty(exports, "scheduleCoroutine", { enumerable: true, get: function () { return compat_1.scheduleCoroutine; } }); +Object.defineProperty(exports, "memoryStats", { enumerable: true, get: function () { return compat_1.memoryStats; } }); +Object.defineProperty(exports, "launchJob", { enumerable: true, get: function () { return compat_1.launchJob; } }); var math_1 = require("./math"); Object.defineProperty(exports, "clamp", { enumerable: true, get: function () { return math_1.clamp; } }); Object.defineProperty(exports, "lerp", { enumerable: true, get: function () { return math_1.lerp; } }); diff --git a/koala-wrapper/koalaui/common/dist/lib/src/koalaKey.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/koalaKey.d.ts index 1b2e1e4ed..2c4c0751a 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/koalaKey.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/koalaKey.d.ts @@ -1,19 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - import { int32 } from "#koalaui/compat"; export type KoalaCallsiteKey = int32; export declare class KoalaCallsiteKeys { diff --git a/koala-wrapper/koalaui/common/dist/lib/src/koalaKey.js b/koala-wrapper/koalaui/common/dist/lib/src/koalaKey.js index 458a2c260..e1daaa0c7 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/koalaKey.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/koalaKey.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/math.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/math.d.ts index f114cb459..3ff1abad4 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/math.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/math.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { float64 } from "#koalaui/compat"; /** * Computes the linear interpolation between `source` and `target` based on `weight`. diff --git a/koala-wrapper/koalaui/common/dist/lib/src/math.js b/koala-wrapper/koalaui/common/dist/lib/src/math.js index 474003ae9..fd5d078bc 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/math.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/math.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/sha1.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/sha1.d.ts index 7efad4ed5..dfd3d12c2 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/sha1.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/sha1.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32 } from "#koalaui/compat"; export declare function createSha1(): SHA1Hash; export declare class SHA1Hash { diff --git a/koala-wrapper/koalaui/common/dist/lib/src/sha1.js b/koala-wrapper/koalaui/common/dist/lib/src/sha1.js index 597c33707..f101a735b 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/sha1.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/sha1.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -68,6 +68,7 @@ class SHA1Hash { let buffer = undefined; // TODO: an attempt to wrie this in a generic form causes // es2panda to segfault. + let BYTES_PER_ELEMENT = 4; if (data instanceof Int32Array) { byteOffset = data.byteOffset; length = data.byteLength; @@ -87,6 +88,7 @@ class SHA1Hash { byteOffset = data.byteOffset; length = data.byteLength; buffer = data.buffer; + BYTES_PER_ELEMENT = 1; } let blocks = ((length / inputBytes) | 0); let offset = 0; @@ -100,7 +102,6 @@ class SHA1Hash { this._size += offset; } // data: TypedArray | DataView - const BYTES_PER_ELEMENT = data.BYTES_PER_ELEMENT; if ((BYTES_PER_ELEMENT != 1) && buffer != undefined) { const rest = new Uint8Array(buffer, byteOffset + offset, length - offset); return this._uint8(rest); diff --git a/koala-wrapper/koalaui/common/dist/lib/src/stringUtils.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/stringUtils.d.ts index d8101efbf..c5659a69a 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/stringUtils.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/stringUtils.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32 } from "#koalaui/compat"; /** * Computes a hash code from the string {@link value}. diff --git a/koala-wrapper/koalaui/common/dist/lib/src/stringUtils.js b/koala-wrapper/koalaui/common/dist/lib/src/stringUtils.js index 06850d000..efe590f98 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/stringUtils.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/stringUtils.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/uniqueId.d.ts b/koala-wrapper/koalaui/common/dist/lib/src/uniqueId.d.ts index 0d00f1dd1..ef9ffe83c 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/uniqueId.d.ts +++ b/koala-wrapper/koalaui/common/dist/lib/src/uniqueId.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32 } from "#koalaui/compat"; export declare class UniqueId { private sha; diff --git a/koala-wrapper/koalaui/common/dist/lib/src/uniqueId.js b/koala-wrapper/koalaui/common/dist/lib/src/uniqueId.js index 6269d042c..4a3cd07f3 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/uniqueId.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/uniqueId.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/tsconfig.tsbuildinfo b/koala-wrapper/koalaui/common/dist/lib/tsconfig.tsbuildinfo new file mode 100644 index 000000000..11fd6c46d --- /dev/null +++ b/koala-wrapper/koalaui/common/dist/lib/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es5.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2016.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.esnext.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.core.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.collection.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.generator.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.iterable.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.promise.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.proxy.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.reflect.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.symbol.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.symbol.wellknown.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2016.array.include.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.object.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.sharedmemory.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.string.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.intl.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.typedarrays.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.asyncgenerator.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.asynciterable.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.intl.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.promise.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.regexp.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.array.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.object.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.string.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.symbol.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.intl.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.bigint.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.date.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.promise.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.sharedmemory.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.string.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.symbol.wellknown.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.intl.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.number.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.promise.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.string.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.weakref.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.intl.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.array.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.error.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.intl.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.object.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.sharedmemory.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.string.d.ts","../../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.esnext.intl.d.ts","../../src/Errors.ts","../../../compat/build/src/index.d.ts","../../src/Finalization.ts","../../src/KoalaProfiler.ts","../../src/LifecycleEvent.ts","../../src/MarkableQueue.ts","../../src/Matrix33.ts","../../src/Point3.ts","../../src/Matrix44.ts","../../src/PerfProbe.ts","../../src/Point.ts","../../src/math.ts","../../src/stringUtils.ts","../../src/sha1.ts","../../src/uniqueId.ts","../../src/koalaKey.ts","../../src/index.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/eslint/use-at-your-own-risk.d.ts","../../../node_modules/@types/eslint/index.d.ts","../../../node_modules/@types/eslint-scope/index.d.ts","../../../node_modules/@types/mocha/index.d.ts","../../../node_modules/@types/node/ts5.1/compatibility/disposable.d.ts","../../../node_modules/@types/node/ts5.6/compatibility/float16array.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../../node_modules/undici-types/utility.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/h2c-client.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-call-history.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/cache-interceptor.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/ts5.1/index.d.ts","../../../node_modules/@types/semver/classes/semver.d.ts","../../../node_modules/@types/semver/functions/parse.d.ts","../../../node_modules/@types/semver/functions/valid.d.ts","../../../node_modules/@types/semver/functions/clean.d.ts","../../../node_modules/@types/semver/functions/inc.d.ts","../../../node_modules/@types/semver/functions/diff.d.ts","../../../node_modules/@types/semver/functions/major.d.ts","../../../node_modules/@types/semver/functions/minor.d.ts","../../../node_modules/@types/semver/functions/patch.d.ts","../../../node_modules/@types/semver/functions/prerelease.d.ts","../../../node_modules/@types/semver/functions/compare.d.ts","../../../node_modules/@types/semver/functions/rcompare.d.ts","../../../node_modules/@types/semver/functions/compare-loose.d.ts","../../../node_modules/@types/semver/functions/compare-build.d.ts","../../../node_modules/@types/semver/functions/sort.d.ts","../../../node_modules/@types/semver/functions/rsort.d.ts","../../../node_modules/@types/semver/functions/gt.d.ts","../../../node_modules/@types/semver/functions/lt.d.ts","../../../node_modules/@types/semver/functions/eq.d.ts","../../../node_modules/@types/semver/functions/neq.d.ts","../../../node_modules/@types/semver/functions/gte.d.ts","../../../node_modules/@types/semver/functions/lte.d.ts","../../../node_modules/@types/semver/functions/cmp.d.ts","../../../node_modules/@types/semver/functions/coerce.d.ts","../../../node_modules/@types/semver/classes/comparator.d.ts","../../../node_modules/@types/semver/classes/range.d.ts","../../../node_modules/@types/semver/functions/satisfies.d.ts","../../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../../node_modules/@types/semver/ranges/min-version.d.ts","../../../node_modules/@types/semver/ranges/valid.d.ts","../../../node_modules/@types/semver/ranges/outside.d.ts","../../../node_modules/@types/semver/ranges/gtr.d.ts","../../../node_modules/@types/semver/ranges/ltr.d.ts","../../../node_modules/@types/semver/ranges/intersects.d.ts","../../../node_modules/@types/semver/ranges/simplify.d.ts","../../../node_modules/@types/semver/ranges/subset.d.ts","../../../node_modules/@types/semver/internals/identifiers.d.ts","../../../node_modules/@types/semver/index.d.ts"],"fileInfos":[{"version":"14dd5dc695734e52d7c38a0c3e227e5ea9043b66410bbcacb8772093f6134d92","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"6e60bf279d69528403bd95f5a31b170930a1d779458a18c70ec64954cfb55af0","signature":"6e770adfd4d6b3523c8bdcf023573e1b4ec3191537879cc53c973e6563fbfcc0"},"e235a02c7b22e5b24c8621604c7d99fb4faf94761cb88f12a25ca91fe7f67587",{"version":"3f14adba5b6cad5a8372884c1cefa778725a6ff62da1d54feec3ca980bfc50b2","signature":"e142833f9b3c9d1044307d760b032f191dc0e513ccc74d5562f73e6668f95ce7"},{"version":"d51040da239920a6a1474f4d67d28a8c6927711200322f133f0d5bf868f167c2","signature":"220998029c0afc4e8c0a3698bb7baac664a3767c3b0a8b99d7a0fe4779f23fa0"},{"version":"0932f2fa33e31a413398893ec85c6c63df6de2841cc02651706e57b2022b3ca1","signature":"766a45759e9afb9ff487e4f327b9bba3a92c8db7d1cad09776b464d39d7697b5"},{"version":"b70b8d96dc3a3b5843be08d069be944e0c14b0943a939c704474f1287115c65c","signature":"ddf98e1d50ee1b3d0c8bd495810c4aac728fb4ad90f9840240ddce1156a86b8f"},{"version":"06f0f09bccc256d65efc64c270f52df0b03af3fc4af88a45e98492091a97c5bb","signature":"ac0cccc4d745ce790cb8392d3f01455bd8ef9878322b011532e460ddc5a301ff"},{"version":"fecd4e13869fef2c04562abd097610c15ea0cd53bea1caaffb3bc9f96b90f1bc","signature":"8b4ff0f0f0fcf7646b2007fcb00ceef7835cd324eded8f58a5c45e925e7f60ba"},{"version":"cf108c938b83bb6c2676733e378d188fb04d26a36ee621914296ae4bbbfcfb9c","signature":"098c958a047b9099ad01911d64f6bc71cc253cf6125ead7f542e49bcc17cae18"},{"version":"b2e29d6fcaaf3d4ba44722575454024abab8907220543ad5ce29219e41514c43","signature":"db55d3604ef8d6497a54957989c664f707c9652254d4496c2b3a494919f989ad"},{"version":"48bdae11416e3a1dae9536faa7b97621596600f2c0face75518f750aa4f331a4","signature":"c328775993ac047e6e16cdf667f0063d1bc54017ccc8a9c1ff1105290cbcc3d6"},{"version":"811e394ae2a05f1543db5629da229883af2bfb7d494e727fadac3f6b996a0fd5","signature":"dbef411b39684fecd20717c0781c6a150ec8abd572f4e58e443bff6cda499c66"},{"version":"bca1e57249f215f05164ee6377c8b9603b421ecb366b2a2bba77b8fe6e05d7e5","signature":"ab266ffb980044c3c4cf0f556c24f33fb819fd84bb467bf23a951688ce17b5d3"},{"version":"70be24bed5c350c4024ce335627ef75ff4611d14e66ea82782b9e47df45d71cf","signature":"7ba4ee4882eb1b240b3ba44055b8d7b3146b7ee8aa092aad90adfa35399438d2"},{"version":"192d4cf77f19e6adb46fc1927c9eca0e6d3bc94f094f5f42e46a852cdc42be2d","signature":"084b56c97cd681c0d34a935d4a060483a45ca0b0e503a9c33091482a84147ad6"},{"version":"1e3b01ce626f3d7db9a9e879295ca1cc8faf07f75f1b4af4f4dbf81be6226c2d","signature":"f1bc7b808272fe2f9c1994e632d8332d86a5153b642fef48aaa9df5cc76c38ae"},{"version":"32e6e876f147b0faf2b6e71b6637645260dcd1b6e8d681725c1554e1a57003b4","signature":"13858e0a44cfb03ef3b13d52c232f87de9d28843d955d88e79ede819948ab16a"},{"version":"eef204f061321360559bd19235ea32a9d55b3ec22a362cc78d14ef50d4db4490","affectsGlobalScope":true},"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","a4a39b5714adfcadd3bbea6698ca2e942606d833bde62ad5fb6ec55f5e438ff8","bbc1d029093135d7d9bfa4b38cbf8761db505026cc458b5e9c8b74f4000e5e75","1f68ab0e055994eb337b67aa87d2a15e0200951e9664959b3866ee6f6b11a0fe",{"version":"3f6d6465811321abc30a1e5f667feed63e5b3917b3d6c8d6645daf96c75f97ba","affectsGlobalScope":true},{"version":"6876211ece0832abdfe13c43c65a555549bb4ca8c6bb4078d68cf923aeb6009e","affectsGlobalScope":true},{"version":"394fda71d5d6bd00a372437dff510feab37b92f345861e592f956d6995e9c1ce","affectsGlobalScope":true},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true},{"version":"c564fc7c6f57b43ebe0b69bc6719d38ff753f6afe55dadf2dba36fb3558f39b6","affectsGlobalScope":true},{"version":"109b9c280e8848c08bf4a78fff1fed0750a6ca1735671b5cf08b71bae5448c03","affectsGlobalScope":true},"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","23cd712e2ce083d68afe69224587438e5914b457b8acf87073c22494d706a3d0","487b694c3de27ddf4ad107d4007ad304d29effccf9800c8ae23c2093638d906a","e525f9e67f5ddba7b5548430211cae2479070b70ef1fd93550c96c10529457bd","ccf4552357ce3c159ef75f0f0114e80401702228f1898bdc9402214c9499e8c0","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","17fe9131bec653b07b0a1a8b99a830216e3e43fe0ea2605be318dc31777c8bbf","3c8e93af4d6ce21eb4c8d005ad6dc02e7b5e6781f429d52a35290210f495a674","2c9875466123715464539bfd69bcaccb8ff6f3e217809428e0d7bd6323416d01","ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","2472ef4c28971272a897fdb85d4155df022e1f5d9a474a526b8fc2ef598af94e","6c8e442ba33b07892169a14f7757321e49ab0f1032d676d321a1fdab8a67d40c","b41767d372275c154c7ea6c9d5449d9a741b8ce080f640155cc88ba1763e35b3","1cd673d367293fc5cb31cd7bf03d598eb368e4f31f39cf2b908abbaf120ab85a","19851a6596401ca52d42117108d35e87230fc21593df5c4d3da7108526b6111c","3825bf209f1662dfd039010a27747b73d0ef379f79970b1d05601ec8e8a4249f","0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","40bfc70953be2617dc71979c14e9e99c5e65c940a4f1c9759ddb90b0f8ff6b1a","da52342062e70c77213e45107921100ba9f9b3a30dd019444cf349e5fb3470c4","e9ace91946385d29192766bf783b8460c7dbcbfc63284aa3c9cae6de5155c8bc","40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","561c60d8bfe0fec2c08827d09ff039eca0c1f9b50ef231025e5a549655ed0298","1e30c045732e7db8f7a82cf90b516ebe693d2f499ce2250a977ec0d12e44a529","84b736594d8760f43400202859cda55607663090a43445a078963031d47e25e7","499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","54c3e2371e3d016469ad959697fd257e5621e16296fa67082c2575d0bf8eced0","beb8233b2c220cfa0feea31fbe9218d89fa02faa81ef744be8dce5acb89bb1fd","78b29846349d4dfdd88bd6650cc5d2baaa67f2e89dc8a80c8e26ef7995386583","5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","e38d4fdf79e1eadd92ed7844c331dbaa40f29f21541cfee4e1acff4db09cda33","8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","7c10a32ae6f3962672e6869ee2c794e8055d8225ef35c91c0228e354b4e5d2d3","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","99f569b42ea7e7c5fe404b2848c0893f3e1a56e0547c1cd0f74d5dbb9a9de27e",{"version":"f4b4faedc57701ae727d78ba4a83e466a6e3bdcbe40efbf913b17e860642897c","affectsGlobalScope":true},"2424a70c49eed193731493c5fcaac6f0ddcc5a31326b9a93e5c31b501f42949d","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","72c1f5e0a28e473026074817561d1bc9647909cf253c8d56c41d1df8d95b85f7",{"version":"59c893bb05d8d6da5c6b85b6670f459a66f93215246a92b6345e78796b86a9a7","affectsGlobalScope":true},"938f94db8400d0b479626b9006245a833d50ce8337f391085fad4af540279567","c4e8e8031808b158cfb5ac5c4b38d4a26659aec4b57b6a7e2ba0a141439c208c",{"version":"2c91d8366ff2506296191c26fd97cc1990bab3ee22576275d28b654a21261a44","affectsGlobalScope":true},"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a",{"version":"12fb9c13f24845000d7bd9660d11587e27ef967cbd64bd9df19ae3e6aa9b52d4","affectsGlobalScope":true},"289e9894a4668c61b5ffed09e196c1f0c2f87ca81efcaebdf6357cfb198dac14","25a1105595236f09f5bce42398be9f9ededc8d538c258579ab662d509aa3b98e","9de8df30f620738193bd68ee503dc76e5f47fc426fe971cfbd89c109fd90b32e","e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","ad1cc0ed328f3f708771272021be61ab146b32ecf2b78f3224959ff1e2cd2a5c",{"version":"71450bbc2d82821d24ca05699a533e72758964e9852062c53b30f31c36978ab8","affectsGlobalScope":true},{"version":"62f572306e0b173cc5dfc4c583471151f16ef3779cf27ab96922c92ec82a3bc8","affectsGlobalScope":true},"737c453548d197cd68e723e73d564d39f930c8183db4a9fa8f8f16f9c7ebd2cf","e64c11d651e1cba17954e0a6e1d7a3dcb5b3aa289ec0763177bf2ed05492c439","ecfb45485e692f3eb3d0aef6e460adeabf670cef2d07e361b2be20cecfd0046b","161f09445a8b4ba07f62ae54b27054e4234e7957062e34c6362300726dabd315","77fced47f495f4ff29bb49c52c605c5e73cd9b47d50080133783032769a9d8a6","e6057f9e7b0c64d4527afeeada89f313f96a53291705f069a9193c18880578cb",{"version":"3cdbad1bb6929fd0220715d7da689c0b69df42c8239036ff75afe4f2232222ea","affectsGlobalScope":true},"0f5cda0282e1d18198e2887387eb2f026372ebc4e11c4e4516fef8a19ee4d514","e99b0e71f07128fc32583e88ccd509a1aaa9524c290efb2f48c22f9bf8ba83b1","76957a6d92b94b9e2852cf527fea32ad2dc0ef50f67fe2b14bd027c9ceef2d86",{"version":"237581f5ec4620a17e791d3bb79bad3af01e27a274dbee875ac9b0721a4fe97d","affectsGlobalScope":true},{"version":"a8a99a5e6ed33c4a951b67cc1fd5b64fd6ad719f5747845c165ca12f6c21ba16","affectsGlobalScope":true},"a58a15da4c5ba3df60c910a043281256fa52d36a0fcdef9b9100c646282e88dd","b36beffbf8acdc3ebc58c8bb4b75574b31a2169869c70fc03f82895b93950a12","de263f0089aefbfd73c89562fb7254a7468b1f33b61839aafc3f035d60766cb4","70b57b5529051497e9f6482b76d91c0dcbb103d9ead8a0549f5bab8f65e5d031","e6d81b1f7ab11dc1b1ad7ad29fcfad6904419b36baf55ed5e80df48d56ac3aff","1013eb2e2547ad8c100aca52ef9df8c3f209edee32bb387121bb3227f7c00088","b6b8e3736383a1d27e2592c484a940eeb37ec4808ba9e74dd57679b2453b5865","d6f36b683c59ac0d68a1d5ee906e578e2f5e9a285bca80ff95ce61cdc9ddcdeb","37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093",{"version":"27e4532aaaa1665d0dd19023321e4dc12a35a741d6b8e1ca3517fcc2544e0efe","affectsGlobalScope":true},"ea713aa14a670b1ea0fbaaca4fd204e645f71ca7653a834a8ec07ee889c45de6",{"version":"cd9c0ecbe36a3be0775bfc16ae30b95af2a4a1f10e7949ceab284c98750bcebd","affectsGlobalScope":true},{"version":"2918b7c516051c30186a1055ebcdb3580522be7190f8a2fff4100ea714c7c366","affectsGlobalScope":true},"ae86f30d5d10e4f75ce8dcb6e1bd3a12ecec3d071a21e8f462c5c85c678efb41","982efeb2573605d4e6d5df4dc7e40846bda8b9e678e058fc99522ab6165c479e","e03460fe72b259f6d25ad029f085e4bedc3f90477da4401d8fbc1efa9793230e","4286a3a6619514fca656089aee160bb6f2e77f4dd53dc5a96b26a0b4fc778055",{"version":"d67fc92a91171632fc74f413ce42ff1aa7fbcc5a85b127101f7ec446d2039a1f","affectsGlobalScope":true},{"version":"d40e4631100dbc067268bce96b07d7aff7f28a541b1bfb7ef791c64a696b3d33","affectsGlobalScope":true},"64bc5859f99559a3587c031ec6862c671f6fdd54e61d43d8ffd02a9422092677","42180b657831d1b8fead051698618b31da623fb71ff37f002cb9d932cfa775f1","4f98d6fb4fe7cbeaa04635c6eaa119d966285d4d39f0eb55b2654187b0b27446",{"version":"e4c653466d0497d87fa9ffd00e59a95f33bc1c1722c3f5c84dab2e950c18da70","affectsGlobalScope":true},"e6dcc3b933e864e91d4bea94274ad69854d5d2a1311a4b0e20408a57af19e95d","2119ab23f794e7b563cc1a005b964e2f59b8ebcb3dfe2ce61d0c782bfd5e02a2","cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","844ab83672160ca57a2a2ea46da4c64200d8c18d4ebb2087819649cad099ff0e"],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"module":1,"noEmitOnError":true,"outDir":"./","removeComments":false,"skipLibCheck":true,"sourceMap":true,"strict":true,"target":4},"fileIdsList":[[83,127],[56,83,127],[56,61,62,83,127],[55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,83,127],[56,68,83,127],[73,76,83,127],[73,74,75,83,127],[76,83,127],[83,124,127],[83,126,127],[83,127,132,162],[83,127,128,133,139,140,147,159,170],[83,127,128,129,139,147],[83,127,130,171],[83,127,131,132,140,148],[83,127,132,159,167],[83,127,133,135,139,147],[83,126,127,134],[83,127,135,136],[83,127,137,139],[83,126,127,139],[83,127,139,140,141,159,170],[83,127,139,140,141,154,159,162],[83,122,127],[83,122,127,135,139,142,147,159,170],[83,127,139,140,142,143,147,159,167,170],[83,127,142,144,159,167,170],[83,127,139,145],[83,127,146,170],[83,127,135,139,147,159],[83,127,148],[83,127,149],[83,126,127,150],[83,124,125,126,127,128,129,130,131,132,133,134,135,136,137,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176],[83,127,152],[83,127,153],[83,127,139,154,155],[83,127,154,156,171,173],[83,127,139,159,160,162],[83,127,161,162],[83,127,159,160],[83,127,162],[83,127,163],[83,124,127,159],[83,127,139,165,166],[83,127,165,166],[83,127,132,147,159,167],[83,127,168],[79,80,81,82,83,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176],[127],[83,127,147,169],[83,127,142,153,170],[83,127,132,171],[83,127,159,172],[83,127,146,173],[83,127,174],[83,127,139,141,150,159,162,170,172,173,175],[83,127,159,176],[83,127,178,217],[83,127,178,202,217],[83,127,217],[83,127,178],[83,127,178,203,217],[83,127,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216],[83,127,203,217],[83,92,96,127,170],[83,92,127,159,170],[83,127,159],[83,87,127],[83,89,92,127,170],[83,127,147,167],[83,127,177],[83,87,127,177],[83,89,92,127,147,170],[83,84,85,86,88,91,127,139,159,170],[83,92,100,127],[83,85,90,127],[83,92,116,117,127],[83,85,88,92,127,162,170,177],[83,92,127],[83,84,127],[83,87,88,89,90,91,92,93,94,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,117,118,119,120,121,127],[83,92,109,112,127,135],[83,92,100,101,102,127],[83,90,92,101,103,127],[83,91,127],[83,85,87,92,127],[83,92,96,101,103,127],[83,96,127],[83,90,92,95,127,170],[83,85,89,92,100,127],[83,92,109,127],[83,87,92,116,127,162,175,177],[56],[56,61,62],[55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70]],"referencedMap":[[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[4,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[35,1],[32,1],[33,1],[34,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[8,1],[47,1],[44,1],[45,1],[46,1],[48,1],[9,1],[49,1],[50,1],[51,1],[52,1],[53,1],[1,1],[10,1],[54,1],[55,1],[57,2],[58,2],[59,1],[60,2],[61,2],[63,3],[64,2],[65,2],[62,2],[71,4],[70,2],[66,2],[68,2],[67,2],[69,5],[56,1],[72,1],[77,6],[76,7],[75,8],[73,1],[74,1],[78,1],[124,9],[125,9],[126,10],[127,11],[128,12],[129,13],[81,1],[130,14],[131,15],[132,16],[133,17],[134,18],[135,19],[136,19],[138,1],[137,20],[139,21],[140,22],[141,23],[123,24],[142,25],[143,26],[144,27],[145,28],[146,29],[147,30],[148,31],[149,32],[150,33],[151,34],[152,35],[153,36],[154,37],[155,37],[156,38],[157,1],[158,1],[159,39],[161,40],[160,41],[162,42],[163,43],[164,44],[165,45],[166,46],[167,47],[168,48],[79,1],[177,49],[83,50],[80,1],[82,1],[169,51],[170,52],[171,53],[172,54],[173,55],[174,56],[175,57],[176,58],[202,59],[203,60],[178,61],[181,61],[200,59],[201,59],[191,59],[190,62],[188,59],[183,59],[196,59],[194,59],[198,59],[182,59],[195,59],[199,59],[184,59],[185,59],[197,59],[179,59],[186,59],[187,59],[189,59],[193,59],[204,63],[192,59],[180,59],[217,64],[216,1],[211,63],[213,65],[212,63],[205,63],[206,63],[208,63],[210,63],[214,65],[215,65],[207,65],[209,65],[100,66],[111,67],[98,66],[112,68],[121,69],[90,70],[89,71],[120,72],[115,73],[119,74],[92,75],[108,76],[91,77],[118,78],[87,79],[88,73],[93,80],[94,1],[99,70],[97,80],[85,81],[122,82],[113,83],[103,84],[102,80],[104,85],[106,86],[101,87],[105,88],[116,72],[95,89],[96,90],[107,91],[86,68],[110,92],[109,80],[114,1],[84,1],[117,93]],"exportedModulesMap":[[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[4,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[35,1],[32,1],[33,1],[34,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[8,1],[47,1],[44,1],[45,1],[46,1],[48,1],[9,1],[49,1],[50,1],[51,1],[52,1],[53,1],[1,1],[10,1],[54,1],[57,94],[58,94],[61,94],[63,95],[65,94],[62,94],[71,96],[70,94],[66,94],[68,94],[67,94],[69,94],[56,1],[72,1],[77,6],[76,7],[75,8],[73,1],[74,1],[78,1],[124,9],[125,9],[126,10],[127,11],[128,12],[129,13],[81,1],[130,14],[131,15],[132,16],[133,17],[134,18],[135,19],[136,19],[138,1],[137,20],[139,21],[140,22],[141,23],[123,24],[142,25],[143,26],[144,27],[145,28],[146,29],[147,30],[148,31],[149,32],[150,33],[151,34],[152,35],[153,36],[154,37],[155,37],[156,38],[157,1],[158,1],[159,39],[161,40],[160,41],[162,42],[163,43],[164,44],[165,45],[166,46],[167,47],[168,48],[79,1],[177,49],[83,50],[80,1],[82,1],[169,51],[170,52],[171,53],[172,54],[173,55],[174,56],[175,57],[176,58],[202,59],[203,60],[178,61],[181,61],[200,59],[201,59],[191,59],[190,62],[188,59],[183,59],[196,59],[194,59],[198,59],[182,59],[195,59],[199,59],[184,59],[185,59],[197,59],[179,59],[186,59],[187,59],[189,59],[193,59],[204,63],[192,59],[180,59],[217,64],[216,1],[211,63],[213,65],[212,63],[205,63],[206,63],[208,63],[210,63],[214,65],[215,65],[207,65],[209,65],[100,66],[111,67],[98,66],[112,68],[121,69],[90,70],[89,71],[120,72],[115,73],[119,74],[92,75],[108,76],[91,77],[118,78],[87,79],[88,73],[93,80],[94,1],[99,70],[97,80],[85,81],[122,82],[113,83],[103,84],[102,80],[104,85],[106,86],[101,87],[105,88],[116,72],[95,89],[96,90],[107,91],[86,68],[110,92],[109,80],[114,1],[84,1],[117,93]],"semanticDiagnosticsPerFile":[12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,35,32,33,34,36,7,37,42,43,38,39,40,41,8,47,44,45,46,48,9,49,50,51,52,53,1,10,54,55,57,58,59,60,61,63,64,65,62,71,70,66,68,67,69,56,72,77,76,75,73,74,78,124,125,126,127,128,129,81,130,131,132,133,134,135,136,138,137,139,140,141,123,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,161,160,162,163,164,165,166,167,168,79,177,83,80,82,169,170,171,172,173,174,175,176,202,203,178,181,200,201,191,190,188,183,196,194,198,182,195,199,184,185,197,179,186,187,189,193,204,192,180,217,216,211,213,212,205,206,208,210,214,215,207,209,100,111,98,112,121,90,89,120,115,119,92,108,91,118,87,88,93,94,99,97,85,122,113,103,102,104,106,101,105,116,95,96,107,86,110,109,114,84,117],"latestChangedDtsFile":"./src/index.d.ts"},"version":"4.9.5"} \ No newline at end of file diff --git a/koala-wrapper/koalaui/common/dist/bridges/ohos/index.d.ts b/koala-wrapper/koalaui/common/empty.js similarity index 77% rename from koala-wrapper/koalaui/common/dist/bridges/ohos/index.d.ts rename to koala-wrapper/koalaui/common/empty.js index 46a1ecc14..ac57d1240 100644 --- a/koala-wrapper/koalaui/common/dist/bridges/ohos/index.d.ts +++ b/koala-wrapper/koalaui/common/empty.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,3 @@ * limitations under the License. */ -export { startTests } from "./mocha"; -export * from "./chai"; -import "./mocha"; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/common/oh-package.json5 b/koala-wrapper/koalaui/common/oh-package.json5 index a1d31c737..536bbb9be 100644 --- a/koala-wrapper/koalaui/common/oh-package.json5 +++ b/koala-wrapper/koalaui/common/oh-package.json5 @@ -1,5 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { - "name": "@koalaui/common", + "name": "#koalaui/common", "version": "1.4.1+devel", "description": "", "main": "build/lib/src/index.js", @@ -33,7 +48,7 @@ }, "keywords": [], "dependencies": { - "@koalaui/compat": "../compat" + "#koalaui/compat": "1.4.1+devel" }, "devDependencies": { "@ohos/hypium": "^1.0.5", diff --git a/koala-wrapper/koalaui/common/src/Finalization.ts b/koala-wrapper/koalaui/common/src/Finalization.ts index 30be27994..0f64c9b63 100644 --- a/koala-wrapper/koalaui/common/src/Finalization.ts +++ b/koala-wrapper/koalaui/common/src/Finalization.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,9 +13,9 @@ * limitations under the License. */ -import { finalizerRegister as finalizerRegisterCompat, finalizerUnregister as finalizerUnregisterCompat, Thunk } from "@koalaui/compat" +import { finalizerRegister as finalizerRegisterCompat, finalizerUnregister as finalizerUnregisterCompat, Thunk } from "#koalaui/compat" -export { Thunk } from "@koalaui/compat" +export { Thunk } from "#koalaui/compat" export function finalizerRegister(target: object, thunk: Thunk) { finalizerRegisterCompat(target, thunk) diff --git a/koala-wrapper/koalaui/common/src/KoalaProfiler.ts b/koala-wrapper/koalaui/common/src/KoalaProfiler.ts index 0e8f704f0..3ebbcd6cc 100644 --- a/koala-wrapper/koalaui/common/src/KoalaProfiler.ts +++ b/koala-wrapper/koalaui/common/src/KoalaProfiler.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { int32 } from "@koalaui/compat" +import { int32 } from "#koalaui/compat" /** * Adds statistics for constructing/disposing of the TreeNode instances. diff --git a/koala-wrapper/koalaui/common/src/MarkableQueue.ts b/koala-wrapper/koalaui/common/src/MarkableQueue.ts index 6d6efa518..030a20318 100644 --- a/koala-wrapper/koalaui/common/src/MarkableQueue.ts +++ b/koala-wrapper/koalaui/common/src/MarkableQueue.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { AtomicRef } from "@koalaui/compat" +import { AtomicRef } from "#koalaui/compat" /** * A markable queue that allows to accumulate callbacks and to call them to the latest set marker. diff --git a/koala-wrapper/koalaui/common/src/Matrix33.ts b/koala-wrapper/koalaui/common/src/Matrix33.ts index 978e3a907..a44d805b5 100644 --- a/koala-wrapper/koalaui/common/src/Matrix33.ts +++ b/koala-wrapper/koalaui/common/src/Matrix33.ts @@ -13,13 +13,13 @@ * limitations under the License. */ -import { Array_from_number, float32, float64 } from "@koalaui/compat" +import { Array_from_number, float32, float64, float64To32 } from "#koalaui/compat" export function mat33(array?: Float32Array): Matrix33 { return (array == undefined) ? new Matrix33 () : new Matrix33(array) } -const tolerance: float32 = (1.0 / (1 << 12)) +const tolerance: float32 = float64To32(1.0 / (1 << 12)) export class Matrix33 { public readonly array: Float32Array diff --git a/koala-wrapper/koalaui/common/src/Matrix44.ts b/koala-wrapper/koalaui/common/src/Matrix44.ts index 163b53949..c421f1d20 100644 --- a/koala-wrapper/koalaui/common/src/Matrix44.ts +++ b/koala-wrapper/koalaui/common/src/Matrix44.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { Array_from_number, float32 } from "@koalaui/compat" +import { Array_from_number, float32 } from "#koalaui/compat" import { Matrix33 } from "./Matrix33" import { Point3 } from "./Point3" diff --git a/koala-wrapper/koalaui/common/src/PerfProbe.ts b/koala-wrapper/koalaui/common/src/PerfProbe.ts index 063d4d590..5ab885396 100644 --- a/koala-wrapper/koalaui/common/src/PerfProbe.ts +++ b/koala-wrapper/koalaui/common/src/PerfProbe.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { float64, int32, timeNow, numberToFixed } from "@koalaui/compat" +import { float64, int32, timeNow, numberToFixed } from "#koalaui/compat" /** * A probe to measure performance. @@ -58,7 +58,7 @@ export interface PerfProbe { /** * Cancels measuring the probe and its children probes. */ - cancel(): void + cancel(b?: Boolean): void /** * User-defined data associated with the probe. @@ -154,7 +154,7 @@ class DummyPerfProbe implements MainPerfProbe { get name(): string { return "dummy" } get dummy(): boolean { return true } exit(log: boolean|undefined): void {} - cancel () {} + cancel(b?: Boolean) {} get canceled(): boolean { return false } enterProbe(name: string): PerfProbe { return PerfProbeImpl.DUMMY } exitProbe (name: string): PerfProbe { return PerfProbeImpl.DUMMY } @@ -237,14 +237,18 @@ class PerfProbeImpl implements PerfProbe { if (log) this.log() } - cancel(cancelChildren: boolean = true) { + cancelWithChildren() { + this.cancel() + this.maybeCancelChildren() + } + + cancel(b?: Boolean) { this._canceled = true - if (cancelChildren) this.maybeCancelChildren() } private maybeCancelChildren() { MainPerfProbeImpl.visit(this, false, (probe: PerfProbeImpl, depth: int32) => { - if (probe.performing) probe.cancel(false) + if (probe.performing) probe.cancel() }) } @@ -262,7 +266,7 @@ class PerfProbeImpl implements PerfProbe { const mainProbe = this.main.probes.get(this.main.name)! const percentage = mainProbe.totalTime > 0 ? Math.round((100 / mainProbe.totalTime) * this.totalTime) : 0 - let result = `[${this.name}] call count: ${this.callCount}` + let result = `[${this.name}] call count: ${this.callCount}` + ` | recursive call count: ${this.recursiveCallCount}` + ` | time: ${this.totalTime}ms ${percentage}%` @@ -368,7 +372,7 @@ class MainPerfProbeImpl extends PerfProbeImpl implements MainPerfProbe { this.cancel() } - cancel() { + cancel(b?: Boolean) { MainPerfProbeImpl.mainProbes.delete(this.name) } diff --git a/koala-wrapper/koalaui/common/src/Point.ts b/koala-wrapper/koalaui/common/src/Point.ts index 1a89eadcd..d7f50f634 100644 --- a/koala-wrapper/koalaui/common/src/Point.ts +++ b/koala-wrapper/koalaui/common/src/Point.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { float32 } from "@koalaui/compat" +import { float32 } from "#koalaui/compat" export class Point { coordinates: Float32Array diff --git a/koala-wrapper/koalaui/common/src/Point3.ts b/koala-wrapper/koalaui/common/src/Point3.ts index 04e86ee2a..3f447a5e3 100644 --- a/koala-wrapper/koalaui/common/src/Point3.ts +++ b/koala-wrapper/koalaui/common/src/Point3.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { float32 } from "@koalaui/compat" +import { float32 } from "#koalaui/compat" export class Point3 { x: float32 diff --git a/koala-wrapper/koalaui/common/src/index.ts b/koala-wrapper/koalaui/common/src/index.ts index 471b714b3..b6fab1e83 100644 --- a/koala-wrapper/koalaui/common/src/index.ts +++ b/koala-wrapper/koalaui/common/src/index.ts @@ -37,8 +37,12 @@ export { propDeepCopy, refEqual, int8Array, - unsafeCast -} from "@koalaui/compat" + errorAsString, + unsafeCast, + scheduleCoroutine, + memoryStats, + launchJob +} from "#koalaui/compat" export { clamp, lerp, modulo, parseNumber, isFiniteNumber, getDistancePx } from "./math" export { hashCodeFromString } from "./stringUtils" export { KoalaProfiler } from "./KoalaProfiler" diff --git a/koala-wrapper/koalaui/common/src/koalaKey.ts b/koala-wrapper/koalaui/common/src/koalaKey.ts index 94c00f336..ef812d5a7 100644 --- a/koala-wrapper/koalaui/common/src/koalaKey.ts +++ b/koala-wrapper/koalaui/common/src/koalaKey.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { int32 } from "@koalaui/compat" +import { int32 } from "#koalaui/compat" export type KoalaCallsiteKey = int32 diff --git a/koala-wrapper/koalaui/common/src/math.ts b/koala-wrapper/koalaui/common/src/math.ts index 9b8b15d87..35f8879cb 100644 --- a/koala-wrapper/koalaui/common/src/math.ts +++ b/koala-wrapper/koalaui/common/src/math.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { asFloat64, asString, float64 } from "@koalaui/compat" +import { asFloat64, asString, float64 } from "#koalaui/compat" /** * Computes the linear interpolation between `source` and `target` based on `weight`. diff --git a/koala-wrapper/koalaui/common/src/sha1.ts b/koala-wrapper/koalaui/common/src/sha1.ts index 11af4b187..b6f752bfa 100644 --- a/koala-wrapper/koalaui/common/src/sha1.ts +++ b/koala-wrapper/koalaui/common/src/sha1.ts @@ -13,8 +13,8 @@ * limitations under the License. */ -import { CustomTextDecoder } from "@koalaui/compat" -import { int32 } from "@koalaui/compat" +import { CustomTextDecoder } from "#koalaui/compat" +import { int32 } from "#koalaui/compat" const K = [ (0x5a827999 | 0) as int32, @@ -78,6 +78,7 @@ export class SHA1Hash { // TODO: an attempt to wrie this in a generic form causes // es2panda to segfault. + let BYTES_PER_ELEMENT = 4 if (data instanceof Int32Array) { byteOffset = data.byteOffset as int32 length = data.byteLength as int32 @@ -94,6 +95,7 @@ export class SHA1Hash { byteOffset = data.byteOffset as int32 length = data.byteLength as int32 buffer = data.buffer + BYTES_PER_ELEMENT = 1 } let blocks: int32 = ((length / inputBytes) | 0) as int32 @@ -110,7 +112,6 @@ export class SHA1Hash { } // data: TypedArray | DataView - const BYTES_PER_ELEMENT = (data as Uint8Array).BYTES_PER_ELEMENT as int32 if ((BYTES_PER_ELEMENT != 1) && buffer != undefined) { const rest = new Uint8Array(buffer, byteOffset + offset, length - offset) return this._uint8(rest) diff --git a/koala-wrapper/koalaui/common/src/stringUtils.ts b/koala-wrapper/koalaui/common/src/stringUtils.ts index e9ec1a790..ca97a5bbc 100644 --- a/koala-wrapper/koalaui/common/src/stringUtils.ts +++ b/koala-wrapper/koalaui/common/src/stringUtils.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { int32 } from "@koalaui/compat" +import { int32 } from "#koalaui/compat" /** diff --git a/koala-wrapper/koalaui/common/src/uniqueId.ts b/koala-wrapper/koalaui/common/src/uniqueId.ts index b32441905..0619b0cb4 100644 --- a/koala-wrapper/koalaui/common/src/uniqueId.ts +++ b/koala-wrapper/koalaui/common/src/uniqueId.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { int32 } from "@koalaui/compat" +import { int32 } from "#koalaui/compat" import { createSha1 } from "./sha1"; export class UniqueId { diff --git a/koala-wrapper/koalaui/common/test/golden.js b/koala-wrapper/koalaui/common/test/golden.js new file mode 100644 index 000000000..42298bd34 --- /dev/null +++ b/koala-wrapper/koalaui/common/test/golden.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const path = require("path") +const process = require("process") + +function goldenSetup(resDir, testDir) { + const root = path.resolve(".", resDir) + const testRoot = path.resolve(testDir) + if (root != testRoot) { + process.env.KOALAUI_RESOURCE_ROOT = root + } + process.env.KOALAUI_TEST_ROOT = path.relative(root, testRoot) + const argGenGolden = "--gen-golden" + for (let str of process.argv) { + if (str.startsWith(argGenGolden)) { + process.env.KOALAUI_TEST_GOLDEN_GEN_DIR = path.relative(root, path.resolve(testRoot, "test", "resources", "golden")) + if (str.length > argGenGolden.length + 1) { + const gdir = str.substring(argGenGolden.length + 1); + if (gdir.length > 0 && gdir != "true") { + process.env.KOALAUI_TEST_GOLDEN_GEN_DIR = path.relative(root, path.resolve(gdir)) + } + } + break + } + } +} + +exports.goldenSetup = goldenSetup diff --git a/koala-wrapper/koalaui/compat/.gitlab-ci.yml b/koala-wrapper/koalaui/compat/.gitlab-ci.yml new file mode 100644 index 000000000..2e6f34b5f --- /dev/null +++ b/koala-wrapper/koalaui/compat/.gitlab-ci.yml @@ -0,0 +1,50 @@ +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +build compat: + stage: build + interruptible: true + extends: .linux-vm-shell-task + needs: + - install node modules (ui2abc) + - install node modules (arkoala) + - install node modules (arkoala-arkts) + - install node modules (incremental) + - install node modules (interop) + before_script: + - !reference [.setup, script] + - cd incremental/compat + script: + - npm run compile:all + artifacts: + expire_in: 2 days + paths: + - incremental/compat/build + +pack compat: + extends: + - .npm-pack + - .linux-vm-shell-task + variables: + PACKAGE_DIR: incremental/compat + needs: + - build compat + +publish compat: + extends: + - .npm-publish + - .linux-vm-shell-task + variables: + PACKAGE_DIR: incremental/compat + dependencies: + - build compat diff --git a/koala-wrapper/koalaui/compat/dist/src/index.d.ts b/koala-wrapper/koalaui/compat/dist/src/index.d.ts index 6a50786d6..e6a008909 100644 --- a/koala-wrapper/koalaui/compat/dist/src/index.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/index.d.ts @@ -1,16 +1,2 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export { asArray, Array_from_set, Array_from_int32, Array_from_number, AtomicRef, asFloat64, asString, float32FromBits, int32BitsFromFloat, Thunk, finalizerRegister, finalizerUnregister, timeNow, numberToFixed, Observed, Observable, ObservableHandler, observableProxy, observableProxyArray, propDeepCopy, lcClassName, CustomTextEncoder, CustomTextDecoder, className, isFunction, functionOverValue, refEqual, isNotPrimitive, uint8, int8, int16, int32, uint32, int64, uint64, float32, float64, int8Array, unsafeCast, } from "#platform"; +export { asArray, Array_from_set, Array_from_int32, Array_from_number, AtomicRef, asFloat64, asString, float64To32, float32To64, float32FromBits, int32BitsFromFloat, Thunk, finalizerRegister, finalizerUnregister, timeNow, numberToFixed, Observed, Observable, ObservableHandler, observableProxy, observableProxyArray, propDeepCopy, lcClassName, CustomTextEncoder, CustomTextDecoder, className, isFunction, functionOverValue, refEqual, isNotPrimitive, uint8, int8, int16, int32, uint32, int64, uint64, float32, float64, int8Array, errorAsString, unsafeCast, scheduleCoroutine, memoryStats, launchJob } from "#platform"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/compat/dist/src/index.js b/koala-wrapper/koalaui/compat/dist/src/index.js index cfaa72b41..48b33398a 100644 --- a/koala-wrapper/koalaui/compat/dist/src/index.js +++ b/koala-wrapper/koalaui/compat/dist/src/index.js @@ -14,7 +14,7 @@ * limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.unsafeCast = exports.int8Array = exports.isNotPrimitive = exports.refEqual = exports.functionOverValue = exports.isFunction = exports.className = exports.CustomTextDecoder = exports.CustomTextEncoder = exports.lcClassName = exports.propDeepCopy = exports.observableProxyArray = exports.observableProxy = exports.ObservableHandler = exports.Observed = exports.numberToFixed = exports.timeNow = exports.finalizerUnregister = exports.finalizerRegister = exports.int32BitsFromFloat = exports.float32FromBits = exports.asString = exports.asFloat64 = exports.AtomicRef = exports.Array_from_number = exports.Array_from_int32 = exports.Array_from_set = exports.asArray = void 0; +exports.launchJob = exports.memoryStats = exports.scheduleCoroutine = exports.unsafeCast = exports.errorAsString = exports.int8Array = exports.isNotPrimitive = exports.refEqual = exports.functionOverValue = exports.isFunction = exports.className = exports.CustomTextDecoder = exports.CustomTextEncoder = exports.lcClassName = exports.propDeepCopy = exports.observableProxyArray = exports.observableProxy = exports.ObservableHandler = exports.Observed = exports.numberToFixed = exports.timeNow = exports.finalizerUnregister = exports.finalizerRegister = exports.int32BitsFromFloat = exports.float32FromBits = exports.float32To64 = exports.float64To32 = exports.asString = exports.asFloat64 = exports.AtomicRef = exports.Array_from_number = exports.Array_from_int32 = exports.Array_from_set = exports.asArray = void 0; var _platform_1 = require("#platform"); Object.defineProperty(exports, "asArray", { enumerable: true, get: function () { return _platform_1.asArray; } }); Object.defineProperty(exports, "Array_from_set", { enumerable: true, get: function () { return _platform_1.Array_from_set; } }); @@ -23,6 +23,8 @@ Object.defineProperty(exports, "Array_from_number", { enumerable: true, get: fun Object.defineProperty(exports, "AtomicRef", { enumerable: true, get: function () { return _platform_1.AtomicRef; } }); Object.defineProperty(exports, "asFloat64", { enumerable: true, get: function () { return _platform_1.asFloat64; } }); Object.defineProperty(exports, "asString", { enumerable: true, get: function () { return _platform_1.asString; } }); +Object.defineProperty(exports, "float64To32", { enumerable: true, get: function () { return _platform_1.float64To32; } }); +Object.defineProperty(exports, "float32To64", { enumerable: true, get: function () { return _platform_1.float32To64; } }); Object.defineProperty(exports, "float32FromBits", { enumerable: true, get: function () { return _platform_1.float32FromBits; } }); Object.defineProperty(exports, "int32BitsFromFloat", { enumerable: true, get: function () { return _platform_1.int32BitsFromFloat; } }); Object.defineProperty(exports, "finalizerRegister", { enumerable: true, get: function () { return _platform_1.finalizerRegister; } }); @@ -43,5 +45,9 @@ Object.defineProperty(exports, "functionOverValue", { enumerable: true, get: fun Object.defineProperty(exports, "refEqual", { enumerable: true, get: function () { return _platform_1.refEqual; } }); Object.defineProperty(exports, "isNotPrimitive", { enumerable: true, get: function () { return _platform_1.isNotPrimitive; } }); Object.defineProperty(exports, "int8Array", { enumerable: true, get: function () { return _platform_1.int8Array; } }); +Object.defineProperty(exports, "errorAsString", { enumerable: true, get: function () { return _platform_1.errorAsString; } }); Object.defineProperty(exports, "unsafeCast", { enumerable: true, get: function () { return _platform_1.unsafeCast; } }); +Object.defineProperty(exports, "scheduleCoroutine", { enumerable: true, get: function () { return _platform_1.scheduleCoroutine; } }); +Object.defineProperty(exports, "memoryStats", { enumerable: true, get: function () { return _platform_1.memoryStats; } }); +Object.defineProperty(exports, "launchJob", { enumerable: true, get: function () { return _platform_1.launchJob; } }); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/array.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/array.d.ts index df8d52c6b..cedc1f4c1 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/array.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/array.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { float64, int32, int8 } from "./types"; export declare function asArray(value: T[]): Array; export declare function Array_from_set(set: Set): Array; diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/array.js b/koala-wrapper/koalaui/compat/dist/src/typescript/array.js index c391e6c4f..675515db0 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/array.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/array.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/atomic.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/atomic.d.ts index d799b95b0..2ed0dd872 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/atomic.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/atomic.d.ts @@ -1,18 +1,6 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. +/** + * A reference that may be updated atomically. */ - export declare class AtomicRef { value: Value; /** diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/atomic.js b/koala-wrapper/koalaui/compat/dist/src/typescript/atomic.js index 2aa1b1ad4..ec29e5211 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/atomic.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/atomic.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/double.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/double.d.ts index 71c40c89b..d482d2805 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/double.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/double.d.ts @@ -1,19 +1,6 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { float64, int32, float32 } from "./types"; +export declare function float32To64(value: float32): float64; +export declare function float64To32(value: float64): float32; export declare function asFloat64(value: string): float64; export declare function asString(value: float64 | undefined): string | undefined; export declare function float32FromBits(value: int32): float32; diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/double.js b/koala-wrapper/koalaui/compat/dist/src/typescript/double.js index ea84b6e5d..39a711254 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/double.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/double.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,9 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - Object.defineProperty(exports, "__esModule", { value: true }); -exports.int32BitsFromFloat = exports.float32FromBits = exports.asString = exports.asFloat64 = void 0; +exports.int32BitsFromFloat = exports.float32FromBits = exports.asString = exports.asFloat64 = exports.float64To32 = exports.float32To64 = void 0; +function float32To64(value) { + return value; +} +exports.float32To64 = float32To64; +function float64To32(value) { + return value; +} +exports.float64To32 = float64To32; function asFloat64(value) { return Number(value); } diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/finalization.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/finalization.d.ts index 8047a3aec..f9d40b708 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/finalization.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/finalization.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - export interface Thunk { clean(): void; } diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/finalization.js b/koala-wrapper/koalaui/compat/dist/src/typescript/finalization.js index 4d605cb72..3d7ef6679 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/finalization.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/finalization.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/index.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/index.d.ts index 11311543c..c3fc5644a 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/index.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/index.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - export * from "./array"; export * from "./atomic"; export * from "./double"; diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/index.js b/koala-wrapper/koalaui/compat/dist/src/typescript/index.js index 17c1bf11d..f52c01f7d 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/index.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/index.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/observable.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/observable.d.ts index 28df03087..98a3fd1de 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/observable.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/observable.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - export declare function getObservableTarget(proxy: Object): Object; /** * Data class decorator that makes all child fields trackable. diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/observable.js b/koala-wrapper/koalaui/compat/dist/src/typescript/observable.js index 5de62790f..972012d2a 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/observable.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/observable.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -238,7 +238,22 @@ function observableProxy(value, parent, observed, strict = true) { }); return proxyObject(value, handler); } - // TODO: support set/map + if (value instanceof Map) { + const handler = new ObservableHandler(parent); + const data = proxyMapValues(value, handler, observed); + setObservable(data); + deleteObservable(data); + clearObservable(data); + return proxyMapOrSet(data, handler); + } + if (value instanceof Set) { + const handler = new ObservableHandler(parent); + const data = proxySetValues(value, handler, observed); + addObservable(data); + deleteObservable(data); + clearObservable(data); + return proxyMapOrSet(data, handler); + } const handler = new ObservableHandler(parent, isObserved(value)); if (handler.observed || observed) proxyFields(value, true, handler); @@ -403,4 +418,105 @@ function unshiftObservable(array) { }; } } +function proxyMapValues(data, parent, observed) { + if (observed === undefined) + observed = ObservableHandler.contains(parent); + const result = new Map(); + for (const [key, value] of data.entries()) { + result.set(key, observableProxy(value, parent, observed)); + } + return result; +} +function proxySetValues(data, parent, observed) { + // TODO: check if necessary to replace items of the set with observed objects as + // for complex objects add() function won't find original object inside the set of proxies + /* + if (observed === undefined) observed = ObservableHandler.contains(parent) + const result = new Set() + for (const value of data.values()) { + result.add(observableProxy(value, parent, observed)) + } + return result + */ + return data; +} +function proxyMapOrSet(value, observable) { + ObservableHandler.installOn(value, observable); + return new Proxy(value, { + get(target, property, receiver) { + var _a, _b; + if (property == OBSERVABLE_TARGET) + return target; + if (property == 'size') { + (_a = ObservableHandler.find(target)) === null || _a === void 0 ? void 0 : _a.onAccess(); + return target.size; + } + const value = Reflect.get(target, property, receiver); + (_b = ObservableHandler.find(target)) === null || _b === void 0 ? void 0 : _b.onAccess(); + return typeof value == "function" + ? value.bind(target) + : value; + }, + }); +} +function addObservable(data) { + if (data.addOriginal === undefined) { + data.addOriginal = data.add; + data.add = function (value) { + const observable = ObservableHandler.find(this); + if (observable && !this.has(value)) { + observable.onModify(); + // TODO: check if necessary to replace items of the set with observed objects as + // for complex objects add() function won't find original object inside the set of proxies + // value = observableProxy(value, observable) + } + return this.addOriginal(value); + }; + } +} +function setObservable(data) { + if (data.setOriginal === undefined) { + data.setOriginal = data.set; + data.set = function (key, value) { + const observable = ObservableHandler.find(this); + if (observable) { + observable.onModify(); + observable.removeChild(this.get(key)); + value = observableProxy(value, observable); + } + return this.setOriginal(key, value); + }; + } +} +function deleteObservable(data) { + if (data.deleteOriginal === undefined) { + data.deleteOriginal = data.delete; + data.delete = function (key) { + const observable = ObservableHandler.find(this); + if (observable) { + observable.onModify(); + if (this instanceof Map) { + observable.removeChild(this.get(key)); + } + else if (this instanceof Set) { + observable.removeChild(key); + } + } + return this.deleteOriginal(key); + }; + } +} +function clearObservable(data) { + if (data.clearOriginal === undefined) { + data.clearOriginal = data.clear; + data.clear = function () { + const observable = ObservableHandler.find(this); + if (observable) { + observable.onModify(); + Array.from(this.values()).forEach(it => observable.removeChild(it)); + } + return this.clearOriginal(); + }; + } +} //# sourceMappingURL=observable.js.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/performance.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/performance.d.ts index ffff2ebb8..8b94eeca4 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/performance.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/performance.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * @returns the number of milliseconds elapsed since midnight, * January 1, 1970 Universal Coordinated Time (UTC). diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/performance.js b/koala-wrapper/koalaui/compat/dist/src/typescript/performance.js index faf020971..437694449 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/performance.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/performance.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/prop-deep-copy.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/prop-deep-copy.d.ts index 5248eba2d..d8c3461cd 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/prop-deep-copy.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/prop-deep-copy.d.ts @@ -1,17 +1,2 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - export declare function propDeepCopy(sourceObject: T): T; //# sourceMappingURL=prop-deep-copy.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/prop-deep-copy.js b/koala-wrapper/koalaui/compat/dist/src/typescript/prop-deep-copy.js index 157cb42df..c6dfc1df1 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/prop-deep-copy.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/prop-deep-copy.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/reflection.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/reflection.d.ts index 231d7b525..2408a17a4 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/reflection.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/reflection.d.ts @@ -1,17 +1,2 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - export declare function lcClassName(object: Object): string; //# sourceMappingURL=reflection.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/reflection.js b/koala-wrapper/koalaui/compat/dist/src/typescript/reflection.js index 73b3ff9e7..2c3f43c3b 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/reflection.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/reflection.js @@ -1,6 +1,8 @@ "use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lcClassName = void 0; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,9 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.lcClassName = void 0; const ts_reflection_1 = require("./ts-reflection"); function lcClassName(object) { return (0, ts_reflection_1.className)(object).toLowerCase(); diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/strings.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/strings.d.ts index 3af44f725..d3a2a3a9f 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/strings.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/strings.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32 } from "./types"; interface SystemTextEncoder { encode(input?: string): Uint8Array; diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/strings.js b/koala-wrapper/koalaui/compat/dist/src/typescript/strings.js index a2419d0a2..782bf7d18 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/strings.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/strings.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/ts-reflection.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/ts-reflection.d.ts index 3d013c4d5..c25995bc5 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/ts-reflection.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/ts-reflection.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - export declare function className(object?: Object): string; export declare function isFunction(object?: Object): boolean; export declare function functionOverValue(value: Value | (() => Value)): boolean; diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/ts-reflection.js b/koala-wrapper/koalaui/compat/dist/src/typescript/ts-reflection.js index c2ba31757..41f489fa9 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/ts-reflection.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/ts-reflection.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/types.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/types.d.ts index 3a8beb40c..ff3c49fa7 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/types.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/types.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /// export type uint8 = int; export type int8 = int; diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/types.js b/koala-wrapper/koalaui/compat/dist/src/typescript/types.js index af49665f4..7239fddb8 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/types.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/types.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/utils.d.ts b/koala-wrapper/koalaui/compat/dist/src/typescript/utils.d.ts index f359d5f17..7c61ae75c 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/utils.d.ts +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/utils.d.ts @@ -1,17 +1,6 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +export declare function errorAsString(error: Error): string; export declare function unsafeCast(value: unknown): T; +export declare function scheduleCoroutine(): void; +export declare function memoryStats(): string; +export declare function launchJob(job: () => void): Promise; //# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/utils.js b/koala-wrapper/koalaui/compat/dist/src/typescript/utils.js index ec1727664..52c9e3824 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/utils.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/utils.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,9 +14,27 @@ * limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.unsafeCast = void 0; +exports.launchJob = exports.memoryStats = exports.scheduleCoroutine = exports.unsafeCast = exports.errorAsString = void 0; +function errorAsString(error) { + var _a; + return (_a = error.stack) !== null && _a !== void 0 ? _a : error.toString(); +} +exports.errorAsString = errorAsString; function unsafeCast(value) { return value; } exports.unsafeCast = unsafeCast; +function scheduleCoroutine() { } +exports.scheduleCoroutine = scheduleCoroutine; +function memoryStats() { + return `none`; +} +exports.memoryStats = memoryStats; +function launchJob(job) { + return new Promise(resolve => setTimeout(() => { + resolve(); + job(); + }, 0)); +} +exports.launchJob = launchJob; //# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/compat/dist/tsconfig.tsbuildinfo b/koala-wrapper/koalaui/compat/dist/tsconfig.tsbuildinfo new file mode 100644 index 000000000..7f2497f28 --- /dev/null +++ b/koala-wrapper/koalaui/compat/dist/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es5.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2016.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.esnext.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.core.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.collection.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.generator.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.iterable.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.promise.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.proxy.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.reflect.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.symbol.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.symbol.wellknown.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2016.array.include.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.object.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.sharedmemory.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.string.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.intl.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.typedarrays.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.asyncgenerator.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.asynciterable.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.intl.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.promise.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.regexp.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.array.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.object.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.string.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.symbol.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.intl.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.bigint.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.date.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.promise.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.sharedmemory.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.string.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.symbol.wellknown.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.intl.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.number.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.promise.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.string.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.weakref.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.intl.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.array.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.error.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.intl.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.object.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.sharedmemory.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.string.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.esnext.intl.d.ts","../src/typescript/Types.d.ts","../src/typescript/types.ts","../src/typescript/array.ts","../src/typescript/atomic.ts","../src/typescript/double.ts","../src/typescript/finalization.ts","../src/typescript/observable.ts","../src/typescript/performance.ts","../src/typescript/prop-deep-copy.ts","../src/typescript/ts-reflection.ts","../src/typescript/reflection.ts","../src/typescript/strings.ts","../src/typescript/utils.ts","../src/typescript/index.ts","../src/index.ts","../../node_modules/@types/chai/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/eslint/use-at-your-own-risk.d.ts","../../node_modules/@types/eslint/index.d.ts","../../node_modules/@types/eslint-scope/index.d.ts","../../node_modules/@types/mocha/index.d.ts","../../node_modules/@types/node/ts5.1/compatibility/disposable.d.ts","../../node_modules/@types/node/ts5.6/compatibility/float16array.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../node_modules/undici-types/utility.d.ts","../../node_modules/undici-types/header.d.ts","../../node_modules/undici-types/readable.d.ts","../../node_modules/undici-types/fetch.d.ts","../../node_modules/undici-types/formdata.d.ts","../../node_modules/undici-types/connector.d.ts","../../node_modules/undici-types/client.d.ts","../../node_modules/undici-types/errors.d.ts","../../node_modules/undici-types/dispatcher.d.ts","../../node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/undici-types/global-origin.d.ts","../../node_modules/undici-types/pool-stats.d.ts","../../node_modules/undici-types/pool.d.ts","../../node_modules/undici-types/handlers.d.ts","../../node_modules/undici-types/balanced-pool.d.ts","../../node_modules/undici-types/h2c-client.d.ts","../../node_modules/undici-types/agent.d.ts","../../node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/undici-types/mock-call-history.d.ts","../../node_modules/undici-types/mock-agent.d.ts","../../node_modules/undici-types/mock-client.d.ts","../../node_modules/undici-types/mock-pool.d.ts","../../node_modules/undici-types/mock-errors.d.ts","../../node_modules/undici-types/proxy-agent.d.ts","../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../node_modules/undici-types/retry-handler.d.ts","../../node_modules/undici-types/retry-agent.d.ts","../../node_modules/undici-types/api.d.ts","../../node_modules/undici-types/cache-interceptor.d.ts","../../node_modules/undici-types/interceptors.d.ts","../../node_modules/undici-types/util.d.ts","../../node_modules/undici-types/cookies.d.ts","../../node_modules/undici-types/patch.d.ts","../../node_modules/undici-types/websocket.d.ts","../../node_modules/undici-types/eventsource.d.ts","../../node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/undici-types/content-type.d.ts","../../node_modules/undici-types/cache.d.ts","../../node_modules/undici-types/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/sea.d.ts","../../node_modules/@types/node/sqlite.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/ts5.1/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts"],"fileInfos":[{"version":"14dd5dc695734e52d7c38a0c3e227e5ea9043b66410bbcacb8772093f6134d92","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"1a7d654570d0e43166552e28934513a11206570a7c70518d4caa4b3a6e915b3c","affectsGlobalScope":true},{"version":"62fec4999528e05b1e085263c1839c81842a69f9e68e3a0a16e05e2ca6c08b87","signature":"03b138b1f07a5dfce89c86906e5676fc45fcb1ddc4acbf56298fa2c7d744d7e8"},{"version":"487af9aaeda18707b561b6434efdc304ef3a641b1a04a63c2dad9737f7023858","signature":"b1af586f98adc6db859cb4a74c6762777715a67b16e441a6539da7b6836669bf"},{"version":"a561f38e7b060f0742135b432b6dffd99bf0edd7171290d81f2288204c15d587","signature":"0a4e82fb375a7160b9978b7544d62784be3358c9d4bcc3eb81469fab31c71591"},{"version":"790e7c94e87c436fda5b12296b5eef4a080ad1ef309428e0b29c59657c895242","signature":"451a92d51e546211379d29ef83130d4341cce6c16e4e7850e247ef015a63ff49"},{"version":"428976cb9d5ed52d4ac2e568fc6a5436b3a83ff14c51f06ef85b8c204794bf0c","signature":"190fe6a6ef1b107333d70345cbc9958ddeb728c0f4f7fa858dde6976c511095c"},{"version":"9fec33499aaff50f1fab67a2ef544b21ab5b00bffd81817c135ba9d8a0389d54","signature":"ada48ba840d828777ac546e0ea680664135c78b83ecf3703bad8840475fbc75b"},{"version":"fa94f32828f49107a603e5af412739f85a53d2c5e6fbfae053d3f97341a650d0","signature":"f9c3c4dc6c203147eee0f7194ea479276ab49f8693a5a4a2efd6a54981892980"},{"version":"56c5f476705d0970043f86650a40d9f009d116f90bfe2bc646c578d2966bec1c","signature":"5ed2092565a1bbf97dba65fc72bda80fda2a5c1e7f98f477e0178378a5453b96"},{"version":"f8ced6ecca8fd8155c0b5a9fffcec8ba2cb0687fe7842df326ebdf64d88a9354","signature":"55e5f3a99bc75244c0a269218df7853a049e7b56dcff8cce1af64480a4a4a794"},{"version":"b29f7a7578b80b1362996607833095f26c973836d073fb8cdf654239e4c291f0","signature":"5742eafd5741c22f12dd713d3775a35d07e8996b6c34d22b9daf45cbe4746d6b"},{"version":"2f96f1573e80ddb8e1c431e9e1445d1b7fcbcb263d27b6c1d0bb70573d7a5238","signature":"e0d7f9064a00918efd44e5e3b874df1586edc1c8b53e7d068fb78d9f2df394c7"},{"version":"0916edf7e6e7fb6054eb4f74fcce31823ffe67c7e7cd457c6db312d081de7139","signature":"8f44e2463c5b78616b64308af4d86dd393f07d7a9d640bc63a0a7888e8e62593"},{"version":"2a7cd5e932f28a1bcb1ad7249e577efe78550dedb45ec05d005e760c8de87e4e","signature":"a11da3ba280279b82c2ee53a252b5b41189c5837d028d416ba50734ef5bf4684"},{"version":"1b9d0c4b8da427b6a52124bfbaae378a20ff546b7f48f07bb32213af9cee2fc0","signature":"150131ba7634d436bd592367077cdba7d7739cc99313c0d0c04059996fec62f0"},{"version":"eef204f061321360559bd19235ea32a9d55b3ec22a362cc78d14ef50d4db4490","affectsGlobalScope":true},"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","a4a39b5714adfcadd3bbea6698ca2e942606d833bde62ad5fb6ec55f5e438ff8","bbc1d029093135d7d9bfa4b38cbf8761db505026cc458b5e9c8b74f4000e5e75","1f68ab0e055994eb337b67aa87d2a15e0200951e9664959b3866ee6f6b11a0fe",{"version":"3f6d6465811321abc30a1e5f667feed63e5b3917b3d6c8d6645daf96c75f97ba","affectsGlobalScope":true},{"version":"6876211ece0832abdfe13c43c65a555549bb4ca8c6bb4078d68cf923aeb6009e","affectsGlobalScope":true},{"version":"394fda71d5d6bd00a372437dff510feab37b92f345861e592f956d6995e9c1ce","affectsGlobalScope":true},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true},{"version":"c564fc7c6f57b43ebe0b69bc6719d38ff753f6afe55dadf2dba36fb3558f39b6","affectsGlobalScope":true},{"version":"109b9c280e8848c08bf4a78fff1fed0750a6ca1735671b5cf08b71bae5448c03","affectsGlobalScope":true},"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","23cd712e2ce083d68afe69224587438e5914b457b8acf87073c22494d706a3d0","487b694c3de27ddf4ad107d4007ad304d29effccf9800c8ae23c2093638d906a","e525f9e67f5ddba7b5548430211cae2479070b70ef1fd93550c96c10529457bd","ccf4552357ce3c159ef75f0f0114e80401702228f1898bdc9402214c9499e8c0","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","17fe9131bec653b07b0a1a8b99a830216e3e43fe0ea2605be318dc31777c8bbf","3c8e93af4d6ce21eb4c8d005ad6dc02e7b5e6781f429d52a35290210f495a674","2c9875466123715464539bfd69bcaccb8ff6f3e217809428e0d7bd6323416d01","ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","2472ef4c28971272a897fdb85d4155df022e1f5d9a474a526b8fc2ef598af94e","6c8e442ba33b07892169a14f7757321e49ab0f1032d676d321a1fdab8a67d40c","b41767d372275c154c7ea6c9d5449d9a741b8ce080f640155cc88ba1763e35b3","1cd673d367293fc5cb31cd7bf03d598eb368e4f31f39cf2b908abbaf120ab85a","19851a6596401ca52d42117108d35e87230fc21593df5c4d3da7108526b6111c","3825bf209f1662dfd039010a27747b73d0ef379f79970b1d05601ec8e8a4249f","0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","40bfc70953be2617dc71979c14e9e99c5e65c940a4f1c9759ddb90b0f8ff6b1a","da52342062e70c77213e45107921100ba9f9b3a30dd019444cf349e5fb3470c4","e9ace91946385d29192766bf783b8460c7dbcbfc63284aa3c9cae6de5155c8bc","40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","561c60d8bfe0fec2c08827d09ff039eca0c1f9b50ef231025e5a549655ed0298","1e30c045732e7db8f7a82cf90b516ebe693d2f499ce2250a977ec0d12e44a529","84b736594d8760f43400202859cda55607663090a43445a078963031d47e25e7","499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","54c3e2371e3d016469ad959697fd257e5621e16296fa67082c2575d0bf8eced0","beb8233b2c220cfa0feea31fbe9218d89fa02faa81ef744be8dce5acb89bb1fd","78b29846349d4dfdd88bd6650cc5d2baaa67f2e89dc8a80c8e26ef7995386583","5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","e38d4fdf79e1eadd92ed7844c331dbaa40f29f21541cfee4e1acff4db09cda33","8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","7c10a32ae6f3962672e6869ee2c794e8055d8225ef35c91c0228e354b4e5d2d3","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","99f569b42ea7e7c5fe404b2848c0893f3e1a56e0547c1cd0f74d5dbb9a9de27e",{"version":"f4b4faedc57701ae727d78ba4a83e466a6e3bdcbe40efbf913b17e860642897c","affectsGlobalScope":true},"2424a70c49eed193731493c5fcaac6f0ddcc5a31326b9a93e5c31b501f42949d","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","72c1f5e0a28e473026074817561d1bc9647909cf253c8d56c41d1df8d95b85f7",{"version":"59c893bb05d8d6da5c6b85b6670f459a66f93215246a92b6345e78796b86a9a7","affectsGlobalScope":true},"938f94db8400d0b479626b9006245a833d50ce8337f391085fad4af540279567","c4e8e8031808b158cfb5ac5c4b38d4a26659aec4b57b6a7e2ba0a141439c208c",{"version":"2c91d8366ff2506296191c26fd97cc1990bab3ee22576275d28b654a21261a44","affectsGlobalScope":true},"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a",{"version":"12fb9c13f24845000d7bd9660d11587e27ef967cbd64bd9df19ae3e6aa9b52d4","affectsGlobalScope":true},"289e9894a4668c61b5ffed09e196c1f0c2f87ca81efcaebdf6357cfb198dac14","25a1105595236f09f5bce42398be9f9ededc8d538c258579ab662d509aa3b98e","9de8df30f620738193bd68ee503dc76e5f47fc426fe971cfbd89c109fd90b32e","e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","ad1cc0ed328f3f708771272021be61ab146b32ecf2b78f3224959ff1e2cd2a5c",{"version":"71450bbc2d82821d24ca05699a533e72758964e9852062c53b30f31c36978ab8","affectsGlobalScope":true},{"version":"62f572306e0b173cc5dfc4c583471151f16ef3779cf27ab96922c92ec82a3bc8","affectsGlobalScope":true},"737c453548d197cd68e723e73d564d39f930c8183db4a9fa8f8f16f9c7ebd2cf","e64c11d651e1cba17954e0a6e1d7a3dcb5b3aa289ec0763177bf2ed05492c439","ecfb45485e692f3eb3d0aef6e460adeabf670cef2d07e361b2be20cecfd0046b","161f09445a8b4ba07f62ae54b27054e4234e7957062e34c6362300726dabd315","77fced47f495f4ff29bb49c52c605c5e73cd9b47d50080133783032769a9d8a6","e6057f9e7b0c64d4527afeeada89f313f96a53291705f069a9193c18880578cb",{"version":"3cdbad1bb6929fd0220715d7da689c0b69df42c8239036ff75afe4f2232222ea","affectsGlobalScope":true},"0f5cda0282e1d18198e2887387eb2f026372ebc4e11c4e4516fef8a19ee4d514","e99b0e71f07128fc32583e88ccd509a1aaa9524c290efb2f48c22f9bf8ba83b1","76957a6d92b94b9e2852cf527fea32ad2dc0ef50f67fe2b14bd027c9ceef2d86",{"version":"237581f5ec4620a17e791d3bb79bad3af01e27a274dbee875ac9b0721a4fe97d","affectsGlobalScope":true},{"version":"a8a99a5e6ed33c4a951b67cc1fd5b64fd6ad719f5747845c165ca12f6c21ba16","affectsGlobalScope":true},"a58a15da4c5ba3df60c910a043281256fa52d36a0fcdef9b9100c646282e88dd","b36beffbf8acdc3ebc58c8bb4b75574b31a2169869c70fc03f82895b93950a12","de263f0089aefbfd73c89562fb7254a7468b1f33b61839aafc3f035d60766cb4","70b57b5529051497e9f6482b76d91c0dcbb103d9ead8a0549f5bab8f65e5d031","e6d81b1f7ab11dc1b1ad7ad29fcfad6904419b36baf55ed5e80df48d56ac3aff","1013eb2e2547ad8c100aca52ef9df8c3f209edee32bb387121bb3227f7c00088","b6b8e3736383a1d27e2592c484a940eeb37ec4808ba9e74dd57679b2453b5865","d6f36b683c59ac0d68a1d5ee906e578e2f5e9a285bca80ff95ce61cdc9ddcdeb","37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093",{"version":"27e4532aaaa1665d0dd19023321e4dc12a35a741d6b8e1ca3517fcc2544e0efe","affectsGlobalScope":true},"ea713aa14a670b1ea0fbaaca4fd204e645f71ca7653a834a8ec07ee889c45de6",{"version":"cd9c0ecbe36a3be0775bfc16ae30b95af2a4a1f10e7949ceab284c98750bcebd","affectsGlobalScope":true},{"version":"2918b7c516051c30186a1055ebcdb3580522be7190f8a2fff4100ea714c7c366","affectsGlobalScope":true},"ae86f30d5d10e4f75ce8dcb6e1bd3a12ecec3d071a21e8f462c5c85c678efb41","982efeb2573605d4e6d5df4dc7e40846bda8b9e678e058fc99522ab6165c479e","e03460fe72b259f6d25ad029f085e4bedc3f90477da4401d8fbc1efa9793230e","4286a3a6619514fca656089aee160bb6f2e77f4dd53dc5a96b26a0b4fc778055",{"version":"d67fc92a91171632fc74f413ce42ff1aa7fbcc5a85b127101f7ec446d2039a1f","affectsGlobalScope":true},{"version":"d40e4631100dbc067268bce96b07d7aff7f28a541b1bfb7ef791c64a696b3d33","affectsGlobalScope":true},"64bc5859f99559a3587c031ec6862c671f6fdd54e61d43d8ffd02a9422092677","42180b657831d1b8fead051698618b31da623fb71ff37f002cb9d932cfa775f1","4f98d6fb4fe7cbeaa04635c6eaa119d966285d4d39f0eb55b2654187b0b27446",{"version":"e4c653466d0497d87fa9ffd00e59a95f33bc1c1722c3f5c84dab2e950c18da70","affectsGlobalScope":true},"e6dcc3b933e864e91d4bea94274ad69854d5d2a1311a4b0e20408a57af19e95d","2119ab23f794e7b563cc1a005b964e2f59b8ebcb3dfe2ce61d0c782bfd5e02a2","cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","844ab83672160ca57a2a2ea46da4c64200d8c18d4ebb2087819649cad099ff0e"],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"module":1,"noEmitOnError":true,"outDir":"./","removeComments":false,"rootDir":"..","skipLibCheck":true,"sourceMap":true,"strict":true,"target":4},"fileIdsList":[[81,125],[68,81,125],[56,81,125],[56,57,58,59,60,61,62,63,64,65,66,67,81,125],[61,81,125],[64,81,125],[55,81,125],[71,74,81,125],[71,72,73,81,125],[74,81,125],[81,122,125],[81,124,125],[81,125,130,160],[81,125,126,131,137,138,145,157,168],[81,125,126,127,137,145],[81,125,128,169],[81,125,129,130,138,146],[81,125,130,157,165],[81,125,131,133,137,145],[81,124,125,132],[81,125,133,134],[81,125,135,137],[81,124,125,137],[81,125,137,138,139,157,168],[81,125,137,138,139,152,157,160],[81,120,125],[81,120,125,133,137,140,145,157,168],[81,125,137,138,140,141,145,157,165,168],[81,125,140,142,157,165,168],[81,125,137,143],[81,125,144,168],[81,125,133,137,145,157],[81,125,146],[81,125,147],[81,124,125,148],[81,122,123,124,125,126,127,128,129,130,131,132,133,134,135,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174],[81,125,150],[81,125,151],[81,125,137,152,153],[81,125,152,154,169,171],[81,125,137,157,158,160],[81,125,159,160],[81,125,157,158],[81,125,160],[81,125,161],[81,122,125,157],[81,125,137,163,164],[81,125,163,164],[81,125,130,145,157,165],[81,125,166],[77,78,79,80,81,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174],[125],[81,125,145,167],[81,125,140,151,168],[81,125,130,169],[81,125,157,170],[81,125,144,171],[81,125,172],[81,125,137,139,148,157,160,168,170,171,173],[81,125,157,174],[81,125,176,215],[81,125,176,200,215],[81,125,215],[81,125,176],[81,125,176,201,215],[81,125,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214],[81,125,201,215],[81,90,94,125,168],[81,90,125,157,168],[81,125,157],[81,85,125],[81,87,90,125,168],[81,125,145,165],[81,125,175],[81,85,125,175],[81,87,90,125,145,168],[81,82,83,84,86,89,125,137,157,168],[81,90,98,125],[81,83,88,125],[81,90,114,115,125],[81,83,86,90,125,160,168,175],[81,90,125],[81,82,125],[81,85,86,87,88,89,90,91,92,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,115,116,117,118,119,125],[81,90,107,110,125,133],[81,90,98,99,100,125],[81,88,90,99,101,125],[81,89,125],[81,83,85,90,125],[81,90,94,99,101,125],[81,94,125],[81,88,90,93,125,168],[81,83,87,90,98,125],[81,90,107,125],[81,85,90,114,125,160,173,175],[68],[56],[56,57,58,59,60,61,62,63,64,65,66,67]],"referencedMap":[[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[4,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[35,1],[32,1],[33,1],[34,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[8,1],[47,1],[44,1],[45,1],[46,1],[48,1],[9,1],[49,1],[50,1],[51,1],[52,1],[53,1],[1,1],[10,1],[54,1],[69,2],[55,1],[57,3],[58,1],[59,3],[60,1],[68,4],[61,1],[62,1],[63,5],[65,6],[66,3],[64,1],[56,7],[67,1],[70,1],[75,8],[74,9],[73,10],[71,1],[72,1],[76,1],[122,11],[123,11],[124,12],[125,13],[126,14],[127,15],[79,1],[128,16],[129,17],[130,18],[131,19],[132,20],[133,21],[134,21],[136,1],[135,22],[137,23],[138,24],[139,25],[121,26],[140,27],[141,28],[142,29],[143,30],[144,31],[145,32],[146,33],[147,34],[148,35],[149,36],[150,37],[151,38],[152,39],[153,39],[154,40],[155,1],[156,1],[157,41],[159,42],[158,43],[160,44],[161,45],[162,46],[163,47],[164,48],[165,49],[166,50],[77,1],[175,51],[81,52],[78,1],[80,1],[167,53],[168,54],[169,55],[170,56],[171,57],[172,58],[173,59],[174,60],[200,61],[201,62],[176,63],[179,63],[198,61],[199,61],[189,61],[188,64],[186,61],[181,61],[194,61],[192,61],[196,61],[180,61],[193,61],[197,61],[182,61],[183,61],[195,61],[177,61],[184,61],[185,61],[187,61],[191,61],[202,65],[190,61],[178,61],[215,66],[214,1],[209,65],[211,67],[210,65],[203,65],[204,65],[206,65],[208,65],[212,67],[213,67],[205,67],[207,67],[98,68],[109,69],[96,68],[110,70],[119,71],[88,72],[87,73],[118,74],[113,75],[117,76],[90,77],[106,78],[89,79],[116,80],[85,81],[86,75],[91,82],[92,1],[97,72],[95,82],[83,83],[120,84],[111,85],[101,86],[100,82],[102,87],[104,88],[99,89],[103,90],[114,74],[93,91],[94,92],[105,93],[84,70],[108,94],[107,82],[112,1],[82,1],[115,95]],"exportedModulesMap":[[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[4,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[35,1],[32,1],[33,1],[34,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[8,1],[47,1],[44,1],[45,1],[46,1],[48,1],[9,1],[49,1],[50,1],[51,1],[52,1],[53,1],[1,1],[10,1],[54,1],[69,96],[55,1],[57,97],[59,97],[68,98],[66,97],[70,1],[75,8],[74,9],[73,10],[71,1],[72,1],[76,1],[122,11],[123,11],[124,12],[125,13],[126,14],[127,15],[79,1],[128,16],[129,17],[130,18],[131,19],[132,20],[133,21],[134,21],[136,1],[135,22],[137,23],[138,24],[139,25],[121,26],[140,27],[141,28],[142,29],[143,30],[144,31],[145,32],[146,33],[147,34],[148,35],[149,36],[150,37],[151,38],[152,39],[153,39],[154,40],[155,1],[156,1],[157,41],[159,42],[158,43],[160,44],[161,45],[162,46],[163,47],[164,48],[165,49],[166,50],[77,1],[175,51],[81,52],[78,1],[80,1],[167,53],[168,54],[169,55],[170,56],[171,57],[172,58],[173,59],[174,60],[200,61],[201,62],[176,63],[179,63],[198,61],[199,61],[189,61],[188,64],[186,61],[181,61],[194,61],[192,61],[196,61],[180,61],[193,61],[197,61],[182,61],[183,61],[195,61],[177,61],[184,61],[185,61],[187,61],[191,61],[202,65],[190,61],[178,61],[215,66],[214,1],[209,65],[211,67],[210,65],[203,65],[204,65],[206,65],[208,65],[212,67],[213,67],[205,67],[207,67],[98,68],[109,69],[96,68],[110,70],[119,71],[88,72],[87,73],[118,74],[113,75],[117,76],[90,77],[106,78],[89,79],[116,80],[85,81],[86,75],[91,82],[92,1],[97,72],[95,82],[83,83],[120,84],[111,85],[101,86],[100,82],[102,87],[104,88],[99,89],[103,90],[114,74],[93,91],[94,92],[105,93],[84,70],[108,94],[107,82],[112,1],[82,1],[115,95]],"semanticDiagnosticsPerFile":[12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,35,32,33,34,36,7,37,42,43,38,39,40,41,8,47,44,45,46,48,9,49,50,51,52,53,1,10,54,69,55,57,58,59,60,68,61,62,63,65,66,64,56,67,70,75,74,73,71,72,76,122,123,124,125,126,127,79,128,129,130,131,132,133,134,136,135,137,138,139,121,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,158,160,161,162,163,164,165,166,77,175,81,78,80,167,168,169,170,171,172,173,174,200,201,176,179,198,199,189,188,186,181,194,192,196,180,193,197,182,183,195,177,184,185,187,191,202,190,178,215,214,209,211,210,203,204,206,208,212,213,205,207,98,109,96,110,119,88,87,118,113,117,90,106,89,116,85,86,91,92,97,95,83,120,111,101,100,102,104,99,103,114,93,94,105,84,108,107,112,82,115],"latestChangedDtsFile":"./src/index.d.ts"},"version":"4.9.5"} \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/arkts/NativeBuffer.sts b/koala-wrapper/koalaui/compat/oh-package.json5 similarity index 44% rename from koala-wrapper/koalaui/interop/src/arkts/NativeBuffer.sts rename to koala-wrapper/koalaui/compat/oh-package.json5 index 3c7eb7afe..2c90fec28 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/NativeBuffer.sts +++ b/koala-wrapper/koalaui/compat/oh-package.json5 @@ -12,27 +12,33 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -import { pointer } from './InteropTypes' -import { int32, int64 } from '@koalaui/common' - -// stub wrapper for KInteropBuffer -export class NativeBuffer { - public data:pointer = 0 - public length: int64 = 0 - public resourceId: int32 = 0 - public hold:pointer = 0 - public release: pointer = 0 - - constructor(data:pointer, length: int64, resourceId: int32, hold:pointer, release: pointer) { - this.data = data - this.length = length - this.resourceId = resourceId - this.hold = hold - this.release = release - } - - static wrap(data:pointer, length: int64, resourceId: int32, hold:pointer, release: pointer): NativeBuffer { - return new NativeBuffer(data, length, resourceId, hold, release) - } + +{ + "name": "#koalaui/compat", + "version": "1.4.0+devel", + "description": "", + "main": "build/typescript/index.js", + "types": "build/typescript/index.d.ts", + "files": [ + "build/typescript/**/*.js", + "build/typescript/**/*.d.ts" + ], + "exports": { + ".": "./build/typescript/index.js" + }, + "scripts": { + "compile": "tsc -b .", + "clean": "rimraf build dist", + "compile:arkts": "bash ../tools/panda/arkts/arktsc --arktsconfig arktsconfig.json --ets-module" + }, + "keywords": [], + "dependencies": { + }, + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "eslint": "^8.13.0", + "eslint-plugin-unused-imports": "^2.0.0", + "source-map-support": "^0.5.21" + } } diff --git a/koala-wrapper/koalaui/compat/src/arkts/array.ts b/koala-wrapper/koalaui/compat/src/arkts/array.ts index 123dd33d7..83e3b1dce 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/array.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/array.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -52,7 +52,8 @@ export function Array_from_number(data: float64[]): Array { return result } -export function int8Array(size: int32): int8[] { - return new int8[size] +export function int8Array(size: int32): FixedArray { + const array: FixedArray = new int8[size] + return array } diff --git a/koala-wrapper/koalaui/compat/src/arkts/atomic.ts b/koala-wrapper/koalaui/compat/src/arkts/atomic.ts index 241b0944c..d8efb0840 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/atomic.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/atomic.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/double.ts b/koala-wrapper/koalaui/compat/src/arkts/double.ts index 0dfb7fea3..fc8219517 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/double.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/double.ts @@ -1,5 +1,6 @@ + /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,9 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - import { float64, int32, float32 } from "./types" +export function float32To64(value: float32): float64 { + return Float.toDouble(value) +} + +export function float64To32(value: float64): float32 { + return Double.toFloat(value) +} + export function asFloat64(value: string): float64 { return (new Number(value)).valueOf() } diff --git a/koala-wrapper/koalaui/compat/src/arkts/finalization.ts b/koala-wrapper/koalaui/compat/src/arkts/finalization.ts index 92ba81b14..021bc1d43 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/finalization.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/finalization.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/index.ts b/koala-wrapper/koalaui/compat/src/arkts/index.ts index c6077254c..95ec1799f 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/index.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/observable.ts b/koala-wrapper/koalaui/compat/src/arkts/observable.ts index 4326f0122..24466cbff 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/observable.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/observable.ts @@ -13,13 +13,9 @@ * limitations under the License. */ -import { int32 } from "./types" - -const OBSERVABLE_TARGET = "target" - export function getObservableTarget(proxy: Object): Object { try { - return Reflect.get(proxy, OBSERVABLE_TARGET) ?? proxy + return (Proxy.tryGetTarget(proxy) as Object|undefined|null) ?? proxy } catch (error) { return proxy } @@ -181,11 +177,8 @@ export function observableProxyArray(...value: Value[]): Array { return observableProxy(Array.of(...value)) } -const PROXY_DISABLED = true // because of ArkTS Reflection performance - /** @internal */ export function observableProxy(value: Value, parent?: ObservableHandler, observed?: boolean, strict: boolean = true): Value { - if (PROXY_DISABLED) return value if (value instanceof ObservableHandler) return value as Value // do not proxy a marker itself if (value == null || !(value instanceof Object)) return value as Value // only non-null object can be observable const observable = ObservableHandler.find(value as Object) @@ -206,106 +199,881 @@ export function observableProxy(value: Value, parent?: ObservableHandler, return value as Value } if (value instanceof Array) { - const handler = new ObservableHandler(parent) - const array = proxyChildrenOnly(value, handler, observed) - ObservableHandler.installOn(array, handler) - return createProxyArray(array) as Value + return ObservableArray(value, parent, observed) as Value + } else if (value instanceof Map) { + return ObservableMap(value, parent, observed) as Value + } else if (value instanceof Set) { + return ObservableSet(value, parent, observed) as Value + } else if (value instanceof Date) { + return ObservableDate(value, parent, observed) as Value } - // TODO: proxy the given object - return value as Value -} -function createProxyArray(array: Array): Array { - return Proxy.create(array, new CustomArrayProxyHandler()) -} - -function proxyChildrenOnly(array: Array, parent: ObservableHandler, observed?: boolean): Array { - if (observed === undefined) observed = ObservableHandler.contains(parent) - return array.map((it: T) => observableProxy(it, parent, observed)) + try { + const result = Proxy.create(value as Object, new CustomProxyHandler()) as Value + ObservableHandler.installOn(result as Object, new ObservableHandler(parent)) + return result + } catch (error) { + return value as Value + } } -class CustomArrayProxyHandler extends DefaultArrayProxyHandler { - override get(target: Array, index: int32): T { +class CustomProxyHandler extends DefaultProxyHandler { + override get(target: T, name: string): NullishType { const observable = ObservableHandler.find(target) if (observable) observable.onAccess() - return super.get(target, index) + return super.get(target, name) } - override set(target: Array, index: int32, value: T): boolean { + override set(target: T, name: string, value: NullishType): boolean { const observable = ObservableHandler.find(target) if (observable) { observable.onModify() - observable.removeChild(super.get(target, index)) + observable.removeChild(super.get(target, name)) value = observableProxy(value, observable, ObservableHandler.contains(observable)) } - return super.set(target, index, value) + return super.set(target, name, value) } +} - override get(target: Array, name: string): NullishType { - const observable = ObservableHandler.find(target) - if (observable) observable.onAccess() - return super.get(target, name) +function proxyChildrenOnly(array: T[], parent: ObservableHandler, observed?: boolean) { + for (let i = 0; i < array.length; i++) { + if (observed === undefined) observed = ObservableHandler.contains(parent) + array[i] = observableProxy(array[i], parent, observed) } +} - override set(target: Array, name: string, value: NullishType): boolean { - const observable = ObservableHandler.find(target) - if (observable) { - observable.onModify() - observable.removeChild(super.get(target, name)) - value = observableProxy(value, observable, ObservableHandler.contains(observable)) +class ObservableArray extends Array { + static $_invoke(array: Array, parent?: ObservableHandler, observed?: boolean): Array { + return new ObservableArray(array, parent, observed); + } + + constructor(array: Array, parent?: ObservableHandler, observed?: boolean) { + super(array.length) + const handler = new ObservableHandler(parent) + for (let i = 0; i < array.length; i++) { + if (observed === undefined) observed = ObservableHandler.contains(handler) + super.$_set(i, observableProxy(array[i], handler, observed)) } - return super.set(target, name, value) + ObservableHandler.installOn(this, handler) } - override invoke(target: Array, method: Method, args: NullishType[]): NullishType { - const observable = ObservableHandler.find(target) - if (observable) { - const name = method.getName() - if (name == "copyWithin" || name == "reverse" || name == "sort") { - observable.onModify() - return super.invoke(target, method, args) - } - if (name == "fill") { - observable.onModify() - if (args.length > 0) { - args[0] = observableProxy(args[0], observable) - } - return super.invoke(target, method, args) - } - if (name == "pop" || name == "shift") { - observable.onModify() - const result = super.invoke(target, method, args) - observable.removeChild(result) - return result + private get handler(): ObservableHandler | undefined { + return ObservableHandler.find(this) + } + + override get length(): number { + this.handler?.onAccess() + return super.length + } + + override set length(length: number) { + this.handler?.onModify() + super.length = length + } + + override at(index: int): T | undefined { + this.handler?.onAccess() + return super.at(index) + } + + override $_get(index: int): T { + this.handler?.onAccess() + return super.$_get(index) + } + + override $_set(index: int, value: T): void { + const handler = this.handler + if (handler) { + handler.onModify() + handler.removeChild(super.$_get(index)) + value = observableProxy(value, handler) + } + super.$_set(index, value) + } + + override copyWithin(target: int, start: int, end: int): this { + this.handler?.onModify() + super.copyWithin(target, start, end) + return this + } + + override fill(value: T, start: int, end: int): this { + const handler = this.handler + if (handler) { + handler.onModify() + value = observableProxy(value, handler) + } + super.fill(value, start, end) + return this + } + + override pop(): T | undefined { + const handler = this.handler + handler?.onModify() + const result = super.pop() + if (result) handler?.removeChild(result) + return result + } + + override push(...items: T[]): number { + const handler = this.handler + if (handler) { + handler.onModify() + proxyChildrenOnly(items, handler) + } + return super.push(...items) + } + + override pushECMA(...items: T[]): number { + const handler = this.handler + if (handler) { + handler.onModify() + proxyChildrenOnly(items, handler) + } + return super.pushECMA(...items) + } + + override reverse(): this { + this.handler?.onModify() + super.reverse() + return this + } + + override shift(): T | undefined { + const handler = this.handler + handler?.onModify() + const result = super.shift() + if (result) handler?.removeChild(result) + return result + } + + override sort(comparator?: (a: T, b: T) => number): this { + this.handler?.onModify() + super.sort(comparator) + return this + } + + override splice(index: int, count: int, ...items: T[]): Array { + const handler = this.handler + if (handler) { + handler.onModify() + proxyChildrenOnly(items, handler) + const result = super.splice(index, count, ...items) + for (let i = 0; i < result.length; i++) { + handler.removeChild(result[i]) } - if (name == "push" || name == "unshift") { - observable.onModify() - if (args.length > 0) { - const items = args[0] - if (items instanceof Array) { - args[0] = proxyChildrenOnly(items, observable) - } - } - return super.invoke(target, method, args) + return result + } + return super.splice(index, count, ...items) + } + + override unshift(...items: T[]): number { + const handler = this.handler + if (handler) { + handler.onModify() + proxyChildrenOnly(items, handler) + } + return super.unshift(...items) + } + + override keys(): IterableIterator { + this.handler?.onAccess() + return super.keys() + } + + // === methods with uncompatible implementation === + + override filter(predicate: (value: T, index: number, array: Array) => boolean): Array { + this.handler?.onAccess() + return super.filter(predicate) + } + + override flat(depth: int): Array { + this.handler?.onAccess() + return super.flat(depth) + } + + override flatMap(fn: (v: T, k: number, arr: Array) => U): Array { + this.handler?.onAccess() + return super.flatMap(fn) + } + + // === methods common among all arrays === + + override concat(...items: FixedArray>): Array { + this.handler?.onAccess() + return super.concat(...items) + } + + override find(predicate: (value: T, index: number, array: Array) => boolean): T | undefined { + this.handler?.onAccess() + return super.find(predicate) + } + + override findIndex(predicate: (value: T, index: number, array: Array) => boolean): number { + this.handler?.onAccess() + return super.findIndex(predicate) + } + + override findLast(predicate: (elem: T, index: number, array: Array) => boolean): T | undefined { + this.handler?.onAccess() + return super.findLast(predicate) + } + + override every(predicate: (value: T, index: number, array: Array) => boolean): boolean { + this.handler?.onAccess() + return super.every(predicate) + } + + override some(predicate: (value: T, index: number, array: Array) => boolean): boolean { + this.handler?.onAccess() + return super.some(predicate) + } + + override findLastIndex(predicate: (element: T, index: number, array: Array) => boolean): number { + this.handler?.onAccess() + return super.findLastIndex(predicate) + } + + override reduce(callbackfn: (previousValue: T, currentValue: T, index: number, array: Array) => T): T { + this.handler?.onAccess() + return super.reduce(callbackfn) + } + + override reduce(callbackfn: (previousValue: U, currentValue: T, index: number, array: Array) => U, initialValue: U): U { + this.handler?.onAccess() + return super.reduce(callbackfn, initialValue) + } + + override reduceRight(callbackfn: (previousValue: T, currentValue: T, index: number, array: Array) => T): T { + this.handler?.onAccess() + return super.reduceRight(callbackfn) + } + + override reduceRight(callbackfn: (previousValue: U, currentValue: T, index: number, array: Array) => U, initialValue: U): U { + this.handler?.onAccess() + return super.reduceRight(callbackfn, initialValue) + } + + override forEach(callbackfn: (value: T, index: number, array: Array) => void): void { + this.handler?.onAccess() + super.forEach(callbackfn) + } + + override slice(start: int, end: int): Array { + this.handler?.onAccess() + return super.slice(start, end) + } + + override lastIndexOf(searchElement: T, fromIndex: int): int { + this.handler?.onAccess() + return super.lastIndexOf(searchElement, fromIndex) + } + + override join(sep?: String): string { + this.handler?.onAccess() + return super.join(sep) + } + + override toLocaleString(): string { + this.handler?.onAccess() + return super.toLocaleString() + } + + override toSpliced(start: int, delete: int, ...items: FixedArray): Array { + this.handler?.onAccess() + return super.toSpliced(start, delete, ...items) + } + + override includes(val: T, fromIndex?: Number): boolean { + this.handler?.onAccess() + return super.includes(val, fromIndex) + } + + override indexOf(val: T, fromIndex: int): int { + this.handler?.onAccess() + return super.indexOf(val, fromIndex) + } + + override toSorted(): Array { + this.handler?.onAccess() + return super.toSorted() + } + + override toSorted(comparator: (a: T, b: T) => number): Array { + this.handler?.onAccess() + return super.toSorted(comparator) + } + + override toReversed(): Array { + this.handler?.onAccess() + return super.toReversed() + } + + override with(index: int, value: T): Array { + this.handler?.onAccess() + return super.with(index, value) + } + + override values(): IterableIterator { + this.handler?.onAccess() + return super.values() + } + + override entries(): IterableIterator<[number, T]> { + this.handler?.onAccess() + return super.entries() + } + + override map(callbackfn: (value: T, index: number, array: Array) => U): Array { + this.handler?.onAccess() + return super.map(callbackfn) + } +} + +class ObservableMap extends Map { + static $_invoke(data: Map, parent?: ObservableHandler, observed?: boolean): Map { + return new ObservableMap(data, parent, observed); + } + + constructor(data: Map, parent?: ObservableHandler, observed?: boolean) { + super() + const handler = new ObservableHandler(parent) + for (let item: [T, V] of data.entries()) { + if (observed === undefined) observed = ObservableHandler.contains(handler) + super.set(item[0], observableProxy(item[1], handler, observed)) + } + ObservableHandler.installOn(this, handler) + } + + private get handler(): ObservableHandler | undefined { + return ObservableHandler.find(this) + } + + override get size(): number { + this.handler?.onAccess() + return super.size + } + + override has(key: T): boolean { + this.handler?.onAccess() + return super.has(key) + } + + override get(key: T): V | undefined { + this.handler?.onAccess() + return super.get(key) + } + + override set(key: T, value: V): this { + const handler = this.handler + if (handler) { + handler.onModify() + const prev = super.get(key) + if (prev) handler.removeChild(prev) + value = observableProxy(value, handler) + } + super.set(key, value) + return this + } + + override delete(key: T): boolean { + const handler = this.handler + if (handler) { + handler.onModify() + const value = super.get(key) + if (value) handler.removeChild(value) + } + return super.delete(key) + } + + override clear() { + const handler = this.handler + if (handler) { + handler.onModify() + for (let value of super.values()) { + handler!.removeChild(value) } - if (name == "splice") { - observable.onModify() - if (args.length > 2) { - const items = args[2] - if (items instanceof Array) { - args[2] = proxyChildrenOnly(items, observable) - } - } - const result = super.invoke(target, method, args) - if (result instanceof Array) { - for (let i = 0; i < result.length; i++) { - observable.removeChild(result[i]) - } - } - return result + } + super.clear() + } + + override keys(): IterableIterator { + this.handler?.onAccess() + return super.keys() + } + + override values(): IterableIterator { + this.handler?.onAccess() + return super.values() + } + + override $_iterator(): IterableIterator<[T, V]> { + this.handler?.onAccess() + return super.$_iterator() + } + + override entries(): IterableIterator<[T, V]> { + this.handler?.onAccess() + return super.entries() + } + + override forEach(callbackfn: (value: V, key: T, map: Map) => void) { + this.handler?.onAccess() + super.forEach(callbackfn) + } + + override toString(): string { + this.handler?.onAccess() + return super.toString() + } +} + +class ObservableSet extends Set { + private readonly elements: Map + + static $_invoke(data: Set, parent?: ObservableHandler, observed?: boolean): Set { + return new ObservableSet(data, parent, observed); + } + + constructor(data: Set, parent?: ObservableHandler, observed?: boolean) { + this.elements = new Map() + const handler = new ObservableHandler(parent) + for (let item of data.values()) { + if (observed === undefined) observed = ObservableHandler.contains(handler) + this.elements.set(item, observableProxy(item, handler, observed)) + } + ObservableHandler.installOn(this, handler) + } + + private get handler(): ObservableHandler | undefined { + return ObservableHandler.find(this) + } + + override toString(): string { + return new Set(this.elements.keys()).toString() + } + + override get size(): number { + this.handler?.onAccess() + return this.elements.size + } + + override has(value: T): boolean { + this.handler?.onAccess() + return this.elements.has(value) + } + + override add(value: T): this { + const handler = this.handler + let observable = value + if (handler) { + if (!this.elements.has(value)) handler.onModify() + const prev = this.elements.get(value) + if (prev) handler.removeChild(prev) + observable = observableProxy(value) + } + this.elements.set(value, observable) + return this + } + + override delete(value: T): boolean { + const handler = this.handler + if (handler) { + handler.onModify() + const prev = this.elements.get(value) + if (prev) handler.removeChild(prev) + } + return this.elements.delete(value) + } + + override clear() { + const handler = this.handler + if (handler) { + handler.onModify() + for (let value of this.elements.values()) { + handler!.removeChild(value) } - observable.onAccess() } - return super.invoke(target, method, args) + this.elements.clear() + } + + override keys(): IterableIterator { + return this.values() + } + + override values(): IterableIterator { + this.handler?.onAccess() + return this.elements.values() + } + + override $_iterator(): IterableIterator { + return this.values() + } + + override entries(): IterableIterator<[T, T]> { + this.handler?.onAccess() + return new MappingIterator(this.elements.values(), (item) => [item, item]) + } + + override forEach(callbackfn: (value: T, key: T, set: Set) => void) { + this.handler?.onAccess() + const it = this.elements.values() + while (true) { + const item = it.next() + if (item.done) return + callbackfn(item.value as T, item.value as T, this) + } + } +} + +class MappingIterator implements IterableIterator { + private it: IterableIterator + private mapper: (value: T) => V + + constructor(it: IterableIterator, fn: (value: T) => V) { + this.it = it + this.mapper = fn + } + + override next(): IteratorResult { + const item = this.it.next() + if (item.done) return new IteratorResult() + return new IteratorResult(this.mapper(item.value as T)) + } + + override $_iterator(): IterableIterator { + return this + } +} + +class ObservableDate extends Date { + static $_invoke(value: Date, parent?: ObservableHandler, observed?: boolean): Date { + return new ObservableDate(value, parent, observed); + } + + constructor(value: Date, parent?: ObservableHandler, observed?: boolean) { + super(value) + const handler = new ObservableHandler(parent) + ObservableHandler.installOn(this, handler) + } + + private get handler(): ObservableHandler | undefined { + return ObservableHandler.find(this) + } + + override isDateValid(): boolean { + this.handler?.onAccess() + return super.isDateValid() + } + + override valueOf(): number { + this.handler?.onAccess() + return super.valueOf() + } + + override toLocaleTimeString(): string { + this.handler?.onAccess() + return super.toLocaleTimeString() + } + + override toLocaleString(): string { + this.handler?.onAccess() + return super.toLocaleString() + } + + override toLocaleDateString(): string { + this.handler?.onAccess() + return super.toLocaleDateString() + } + + override toISOString(): string { + this.handler?.onAccess() + return super.toISOString() + } + + override toTimeString(): string { + this.handler?.onAccess() + return super.toTimeString() + } + + override toDateString(): string { + this.handler?.onAccess() + return super.toDateString() + } + + override toString(): string { + this.handler?.onAccess() + return super.toString() + } + + override toUTCString(): string { + this.handler?.onAccess() + return super.toUTCString() + } + + override getDate(): number { + this.handler?.onAccess() + return super.getDate() + } + + override setDate(value: byte) { + this.handler?.onModify() + super.setDate(value) + } + + override setDate(value: number): number { + this.handler?.onModify() + return super.setDate(value) + } + + override getUTCDate(): number { + this.handler?.onAccess() + return super.getUTCDate() + } + + override setUTCDate(value: byte) { + this.handler?.onModify() + super.setUTCDate(value) + } + + override setUTCDate(value: number): number { + this.handler?.onModify() + return super.setUTCDate(value) + } + + override getDay(): number { + this.handler?.onAccess() + return super.getDay() + } + + override setDay(value: byte) { + this.handler?.onModify() + super.setDay(value) + } + + override getUTCDay(): number { + this.handler?.onAccess() + return super.getUTCDay() + } + + override setUTCDay(value: byte) { + this.handler?.onModify() + super.setUTCDay(value) + } + + override setUTCDay(value: number): number { + this.handler?.onModify() + return super.setUTCDay(value) + } + + override getMonth(): number { + this.handler?.onAccess() + return super.getMonth() + } + + override setMonth(value: int) { + this.handler?.onModify() + super.setMonth(value) + } + + override setMonth(value: number, date?: number): number { + this.handler?.onModify() + return super.setMonth(value, date) + } + + override getUTCMonth(): number { + this.handler?.onAccess() + return super.getUTCMonth() + } + + override setUTCMonth(value: int) { + this.handler?.onModify() + super.setUTCMonth(value) + } + + override setUTCMonth(value: number, date?: number): number { + this.handler?.onModify() + return super.setUTCMonth(value, date) + } + + override getYear(): int { + this.handler?.onAccess() + return super.getYear() + } + + override setYear(value: int) { + this.handler?.onModify() + super.setYear(value) + } + + override setYear(value: number) { + this.handler?.onModify() + super.setYear(value) + } + + override getFullYear(): number { + this.handler?.onAccess() + return super.getFullYear() + } + + override setFullYear(value: number, month?: number, date?: number): number { + this.handler?.onModify() + return super.setFullYear(value, month, date) + } + + override setFullYear(value: int) { + this.handler?.onModify() + super.setFullYear(value) + } + + override getUTCFullYear(): number { + this.handler?.onAccess() + return super.getUTCFullYear() + } + + override setUTCFullYear(value: number, month?: number, date?: number): number { + this.handler?.onModify() + return super.setUTCFullYear(value, month, date) + } + + override setUTCFullYear(value: int) { + this.handler?.onModify() + super.setUTCFullYear(value) + } + + override getTime(): number { + this.handler?.onAccess() + return super.getTime() + } + + override setTime(value: long) { + this.handler?.onModify() + super.setTime(value) + } + + override setTime(value: number): number { + this.handler?.onModify() + return super.setTime(value) + } + + override getHours(): number { + this.handler?.onAccess() + return super.getHours() + } + + override setHours(value: number, min?: number, sec?: number, ms?: number): number { + this.handler?.onModify() + return super.setHours(value, min, sec, ms) + } + + override setHours(value: byte) { + this.handler?.onModify() + super.setHours(value) + } + + override getUTCHours(): number { + this.handler?.onAccess() + return super.getUTCHours() + } + + override setUTCHours(value: number, min?: number, sec?: number, ms?: number): number { + this.handler?.onModify() + return super.setUTCHours(value, min, sec, ms) + } + + override setUTCHours(value: byte) { + this.handler?.onModify() + super.setUTCHours(value) + } + + override getMilliseconds(): number { + this.handler?.onAccess() + return super.getMilliseconds() + } + + override setMilliseconds(value: short) { + this.handler?.onModify() + super.setMilliseconds(value) + } + + override setMilliseconds(value: number): number { + this.handler?.onModify() + return super.setMilliseconds(value) + } + + override getUTCMilliseconds(): number { + this.handler?.onAccess() + return super.getUTCMilliseconds() + } + + override setUTCMilliseconds(value: short) { + this.handler?.onModify() + super.setUTCMilliseconds(value) + } + + override setUTCMilliseconds(value: number): number { + this.handler?.onModify() + return super.setUTCMilliseconds(value) + } + + override getSeconds(): number { + this.handler?.onAccess() + return super.getSeconds() + } + + override setSeconds(value: byte) { + this.handler?.onModify() + super.setSeconds(value) + } + + override setSeconds(value: number, ms?: number): number { + this.handler?.onModify() + return super.setSeconds(value, ms) + } + + override getUTCSeconds(): number { + this.handler?.onAccess() + return super.getUTCSeconds() + } + + override setUTCSeconds(value: byte) { + this.handler?.onModify() + super.setUTCSeconds(value) + } + + override setUTCSeconds(value: number, ms?: number): number { + this.handler?.onModify() + return super.setUTCSeconds(value, ms) + } + + override getMinutes(): number { + this.handler?.onAccess() + return super.getMinutes() + } + + override setMinutes(value: byte) { + this.handler?.onModify() + super.setMinutes(value) + } + + override setMinutes(value: number, sec?: Number, ms?: number): number { + this.handler?.onModify() + return super.setMinutes(value, sec, ms) + } + + override getUTCMinutes(): number { + this.handler?.onAccess() + return super.getUTCMinutes() + } + + override setUTCMinutes(value: byte) { + this.handler?.onModify() + super.setUTCMinutes(value) + } + + override setUTCMinutes(value: number, sec?: Number, ms?: number): number { + this.handler?.onModify() + return super.setUTCMinutes(value, sec, ms) } } diff --git a/koala-wrapper/koalaui/compat/src/arkts/performance.ts b/koala-wrapper/koalaui/compat/src/arkts/performance.ts index 2755960e8..8926ff851 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/performance.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/performance.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/prop-deep-copy.ts b/koala-wrapper/koalaui/compat/src/arkts/prop-deep-copy.ts index 25ec18c81..1e13dfc12 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/prop-deep-copy.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/prop-deep-copy.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,5 +20,5 @@ */ export function propDeepCopy(sourceObject: T): T { - return sourceObject + return deepcopy(sourceObject) as T } diff --git a/koala-wrapper/koalaui/compat/src/arkts/reflection.ts b/koala-wrapper/koalaui/compat/src/arkts/reflection.ts index 75bdadc33..50e1863f0 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/reflection.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/reflection.ts @@ -18,5 +18,3 @@ import { className } from "./ts-reflection" export function lcClassName(object: Object) { return className(object).toLowerCase() } - -export @interface Entry {} diff --git a/koala-wrapper/koalaui/compat/src/arkts/strings.ts b/koala-wrapper/koalaui/compat/src/arkts/strings.ts index b0129c085..6efcada3f 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/strings.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/strings.ts @@ -82,10 +82,10 @@ export class CustomTextEncoder { static getHeaderLength(array: Uint8Array, offset: int32 = 0): int32 { return ( - (array.at(offset) as int32) | - (array.at(((offset + 1) << 8)) as int32) | - (array.at((offset + 2) << 16) as int32) | - (array.at((offset + 3) << 24)) as int32) + (array.at(offset)!.toInt()) | + (array.at(((offset + 1) << 8))!.toInt()) | + (array.at((offset + 2) << 16)!.toInt()) | + (array.at((offset + 3) << 24))!.toInt()) } // Produces array of bytes with encoded string headed by 4 bytes (little endian) size information: diff --git a/koala-wrapper/koalaui/compat/src/arkts/ts-reflection.ts b/koala-wrapper/koalaui/compat/src/arkts/ts-reflection.ts index 0214ccf02..65325206e 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/ts-reflection.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/ts-reflection.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/types.ts b/koala-wrapper/koalaui/compat/src/arkts/types.ts index 3f4d932f4..912b74bda 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/types.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/types.ts @@ -22,4 +22,4 @@ export type uint32 = int export type int64 = long export type uint64 = long export type float32 = float -export type float64 = double +export type float64 = double \ No newline at end of file diff --git a/koala-wrapper/koalaui/compat/src/arkts/utils.ts b/koala-wrapper/koalaui/compat/src/arkts/utils.ts index 45c74d2e4..0523e835a 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/utils.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,6 +13,25 @@ * limitations under the License. */ +export function errorAsString(error: Error): string { + const stack = error.stack + return stack + ? error.toString() + '\n' + stack + : error.toString() +} + export function unsafeCast(value: Object): T { return value as T } + +export function scheduleCoroutine(): void { + Coroutine.Schedule() +} + +export function memoryStats(): string { + return `used ${GC.getUsedHeapSize()} free ${GC.getFreeHeapSize()}` +} + +export function launchJob(job: () => void): Promise { + throw new Error("unsupported yet: return launch job()") +} \ No newline at end of file diff --git a/koala-wrapper/koalaui/compat/src/index.ts b/koala-wrapper/koalaui/compat/src/index.ts index e2760b0c7..301d81338 100644 --- a/koala-wrapper/koalaui/compat/src/index.ts +++ b/koala-wrapper/koalaui/compat/src/index.ts @@ -21,6 +21,8 @@ export { AtomicRef, asFloat64, asString, + float64To32, + float32To64, float32FromBits, int32BitsFromFloat, Thunk, @@ -52,5 +54,9 @@ export { float32, float64, int8Array, + errorAsString, unsafeCast, + scheduleCoroutine, + memoryStats, + launchJob } from "#platform" diff --git a/koala-wrapper/koalaui/compat/src/ohos/index.ts b/koala-wrapper/koalaui/compat/src/ohos/index.ts index b5bd901b4..5d2e84d03 100644 --- a/koala-wrapper/koalaui/compat/src/ohos/index.ts +++ b/koala-wrapper/koalaui/compat/src/ohos/index.ts @@ -50,7 +50,11 @@ export { float32, float64, int8Array, + errorAsString, unsafeCast, + scheduleCoroutine, + memoryStats, + launchJob } from "../typescript" export { diff --git a/koala-wrapper/koalaui/compat/src/ohos/performance.ts b/koala-wrapper/koalaui/compat/src/ohos/performance.ts index 2755960e8..8926ff851 100644 --- a/koala-wrapper/koalaui/compat/src/ohos/performance.ts +++ b/koala-wrapper/koalaui/compat/src/ohos/performance.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/array.ts b/koala-wrapper/koalaui/compat/src/typescript/array.ts index 9392bb412..156ea36f2 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/array.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/array.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/atomic.ts b/koala-wrapper/koalaui/compat/src/typescript/atomic.ts index e6312b700..b3b12b85f 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/atomic.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/atomic.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/double.ts b/koala-wrapper/koalaui/compat/src/typescript/double.ts index ee4ad821e..5325e47fd 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/double.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/double.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,6 +15,14 @@ import { float64, int32, float32 } from "./types" +export function float32To64(value: float32): float64 { + return value +} + +export function float64To32(value: float64): float32 { + return value +} + export function asFloat64(value: string): float64 { return Number(value) } diff --git a/koala-wrapper/koalaui/compat/src/typescript/finalization.ts b/koala-wrapper/koalaui/compat/src/typescript/finalization.ts index 4aa68d116..c7d5e05e8 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/finalization.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/finalization.ts @@ -1,6 +1,5 @@ - /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/index.ts b/koala-wrapper/koalaui/compat/src/typescript/index.ts index 84eed3cf9..03bb4fbdd 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/index.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/observable.ts b/koala-wrapper/koalaui/compat/src/typescript/observable.ts index fd40fcdcf..44066c809 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/observable.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/observable.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -240,7 +240,22 @@ export function observableProxy(value: Value, parent?: ObservableHandler, }) return proxyObject(value, handler) } - // TODO: support set/map + if (value instanceof Map) { + const handler = new ObservableHandler(parent) + const data = proxyMapValues(value, handler, observed) + setObservable(data) + deleteObservable(data) + clearObservable(data) + return proxyMapOrSet(data, handler) + } + if (value instanceof Set) { + const handler = new ObservableHandler(parent) + const data = proxySetValues(value, handler, observed) + addObservable(data) + deleteObservable(data) + clearObservable(data) + return proxyMapOrSet(data, handler) + } const handler = new ObservableHandler(parent, isObserved(value)) if (handler.observed || observed) proxyFields(value, true, handler) return proxyObject(value, handler) @@ -402,3 +417,107 @@ function unshiftObservable(array: any) { } } } + +function proxyMapValues(data: Map, parent: ObservableHandler, observed?: boolean): Map { + if (observed === undefined) observed = ObservableHandler.contains(parent) + const result = new Map() + for (const [key, value] of data.entries()) { + result.set(key, observableProxy(value, parent, observed)) + } + return result +} + +function proxySetValues(data: Set, parent: ObservableHandler, observed?: boolean): Set { + // TODO: check if necessary to replace items of the set with observed objects as + // for complex objects add() function won't find original object inside the set of proxies + /* + if (observed === undefined) observed = ObservableHandler.contains(parent) + const result = new Set() + for (const value of data.values()) { + result.add(observableProxy(value, parent, observed)) + } + return result + */ + return data +} + +function proxyMapOrSet(value: any, observable: ObservableHandler) { + ObservableHandler.installOn(value, observable) + return new Proxy(value, { + get(target, property, receiver) { + if (property == OBSERVABLE_TARGET) return target + if (property == 'size') { + ObservableHandler.find(target)?.onAccess() + return target.size + } + const value: any = Reflect.get(target, property, receiver) + ObservableHandler.find(target)?.onAccess() + return typeof value == "function" + ? value.bind(target) + : value + }, + }) +} + +function addObservable(data: any) { + if (data.addOriginal === undefined) { + data.addOriginal = data.add + data.add = function (this, value: any) { + const observable = ObservableHandler.find(this) + if (observable && !this.has(value)) { + observable.onModify() + // TODO: check if necessary to replace items of the set with observed objects as + // for complex objects add() function won't find original object inside the set of proxies + // value = observableProxy(value, observable) + } + return this.addOriginal(value) + } + } +} + +function setObservable(data: any) { + if (data.setOriginal === undefined) { + data.setOriginal = data.set + data.set = function (this, key: any, value: any) { + const observable = ObservableHandler.find(this) + if (observable) { + observable.onModify() + observable.removeChild(this.get(key)) + value = observableProxy(value, observable) + } + return this.setOriginal(key, value) + } + } +} + +function deleteObservable(data: any) { + if (data.deleteOriginal === undefined) { + data.deleteOriginal = data.delete + data.delete = function (this, key: any) { + const observable = ObservableHandler.find(this) + if (observable) { + observable.onModify() + if (this instanceof Map) { + observable.removeChild(this.get(key)) + } else if (this instanceof Set) { + observable.removeChild(key) + } + } + return this.deleteOriginal(key) + } + } +} + +function clearObservable(data: any) { + if (data.clearOriginal === undefined) { + data.clearOriginal = data.clear + data.clear = function (this) { + const observable = ObservableHandler.find(this) + if (observable) { + observable.onModify() + Array.from(this.values()).forEach(it => observable.removeChild(it)) + } + return this.clearOriginal() + } + } +} diff --git a/koala-wrapper/koalaui/compat/src/typescript/performance.ts b/koala-wrapper/koalaui/compat/src/typescript/performance.ts index 80ea8a14e..9451185bc 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/performance.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/performance.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/prop-deep-copy.ts b/koala-wrapper/koalaui/compat/src/typescript/prop-deep-copy.ts index 8da5c4f71..3dd13819d 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/prop-deep-copy.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/prop-deep-copy.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/ts-reflection.ts b/koala-wrapper/koalaui/compat/src/typescript/ts-reflection.ts index f820e0045..f99c90278 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/ts-reflection.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/ts-reflection.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/utils.ts b/koala-wrapper/koalaui/compat/src/typescript/utils.ts index a689f8905..1d72692be 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/utils.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/utils.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,6 +13,24 @@ * limitations under the License. */ +export function errorAsString(error: Error): string { + return error.stack ?? error.toString() +} + export function unsafeCast(value: unknown): T { return value as unknown as T } + +export function scheduleCoroutine(): void {} + +export function memoryStats(): string { + return `none` +} + +export function launchJob(job: () => void): Promise { + return new Promise(resolve => setTimeout(() => { + resolve() + job() + }, 0) + ) +} \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/.gitignore b/koala-wrapper/koalaui/interop/.gitignore new file mode 100644 index 000000000..44a096458 --- /dev/null +++ b/koala-wrapper/koalaui/interop/.gitignore @@ -0,0 +1 @@ +*.ini \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/.gitlab-ci.yml b/koala-wrapper/koalaui/interop/.gitlab-ci.yml new file mode 100644 index 000000000..7d05adbaa --- /dev/null +++ b/koala-wrapper/koalaui/interop/.gitlab-ci.yml @@ -0,0 +1,63 @@ +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +install node modules (interop): + stage: install-deps + extends: + - .linux-vm-shell-task + needs: + - install node modules (incremental) + before_script: + - !reference [.setup, script] + script: + - npm i --no-audit --no-fund --prefix interop + artifacts: + paths: + - interop/node_modules + expire_in: 1 day + +build interop: + stage: build + interruptible: true + extends: .linux-vm-shell-task + before_script: + - !reference [.setup, script] + - cd interop + script: + - npm run compile + needs: + - install node modules (interop) + - install node modules (incremental) + artifacts: + expire_in: 2 days + paths: + - interop/build/lib + +pack interop: + extends: + - .npm-pack + - .linux-vm-shell-task + variables: + PACKAGE_DIR: interop + needs: + - build interop + +publish interop: + extends: + - .npm-publish + - .linux-vm-shell-task + variables: + PACKAGE_DIR: interop + dependencies: + - build interop diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/arkts/ResourceManager.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/arkts/ResourceManager.d.ts index 87813a2b6..86b4ff153 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/arkts/ResourceManager.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/arkts/ResourceManager.d.ts @@ -1,29 +1,23 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32 } from "#koalaui/common"; export type ResourceId = int32; +export interface Disposable { + dispose(): void; +} export declare class ResourceHolder { private static nextResourceId; private resources; private static _instance; + private static disposables; + private static disposablesSize; static instance(): ResourceHolder; hold(resourceId: ResourceId): void; release(resourceId: ResourceId): void; registerAndHold(resource: object): ResourceId; get(resourceId: ResourceId): object; has(resourceId: ResourceId): boolean; + static register(resource: Disposable): void; + static unregister(resource: Disposable): void; + static disposeAll(): void; + static compactDisposables(): void; } //# sourceMappingURL=ResourceManager.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/arkts/ResourceManager.js b/koala-wrapper/koalaui/interop/dist/lib/src/arkts/ResourceManager.js index 3671e17e8..bcdf8d29b 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/arkts/ResourceManager.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/arkts/ResourceManager.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -54,8 +54,37 @@ class ResourceHolder { has(resourceId) { return this.resources.has(resourceId); } + static register(resource) { + if (ResourceHolder.disposablesSize < ResourceHolder.disposables.length) { + ResourceHolder.disposables[ResourceHolder.disposablesSize] = resource; + } + else { + ResourceHolder.disposables.push(resource); + } + ResourceHolder.disposablesSize++; + } + static unregister(resource) { + const index = ResourceHolder.disposables.indexOf(resource); + if (index !== -1 && index < ResourceHolder.disposablesSize) { + if (index !== ResourceHolder.disposablesSize - 1) { + ResourceHolder.disposables[index] = ResourceHolder.disposables[ResourceHolder.disposablesSize - 1]; + } + ResourceHolder.disposablesSize--; + } + } + static disposeAll() { + for (let i = 0; i < ResourceHolder.disposablesSize; ++i) { + ResourceHolder.disposables[i].dispose(); + } + ResourceHolder.disposablesSize = 0; + } + static compactDisposables() { + ResourceHolder.disposables = ResourceHolder.disposables.slice(0, ResourceHolder.disposablesSize); + } } exports.ResourceHolder = ResourceHolder; ResourceHolder.nextResourceId = 100; ResourceHolder._instance = undefined; +ResourceHolder.disposables = new Array(); +ResourceHolder.disposablesSize = 0; //# sourceMappingURL=ResourceManager.js.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/DeserializerBase.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/DeserializerBase.d.ts index 5edd7608a..87655a5f0 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/DeserializerBase.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/DeserializerBase.d.ts @@ -1,21 +1,7 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { float32, int32, int64 } from "#koalaui/common"; import { CallbackResource } from "./SerializerBase"; -import { pointer } from "./InteropTypes"; +import { pointer, KUint8ArrayPtr, KSerializerBuffer } from "./InteropTypes"; +import { NativeBuffer } from "./NativeBuffer"; export declare class DeserializerBase { private position; private readonly buffer; @@ -24,9 +10,10 @@ export declare class DeserializerBase { private static textDecoder; private static customDeserializers; static registerCustomDeserializer(deserializer: CustomDeserializer): void; - constructor(buffer: ArrayBuffer, length: int32); + constructor(buffer: ArrayBuffer | KSerializerBuffer | KUint8ArrayPtr, length: int32); static get(factory: (args: Uint8Array, length: int32) => T, args: Uint8Array, length: int32): T; - asArray(position?: number, length?: number): Uint8Array; + asBuffer(position?: int32, length?: int32): KSerializerBuffer; + asArray(position?: int32, length?: int32): Uint8Array; currentPosition(): int32; resetCurrentPosition(): void; private checkCapacity; @@ -40,10 +27,11 @@ export declare class DeserializerBase { readMaterialized(): object; readString(): string; readCustomObject(kind: string): any; - readNumber(): number | undefined; + readNumber(): int32 | undefined; readCallbackResource(): CallbackResource; + readObject(): any; static lengthUnitFromInt(unit: int32): string; - readBuffer(): ArrayBuffer; + readBuffer(): NativeBuffer; } export declare abstract class CustomDeserializer { protected supported: Array; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/DeserializerBase.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/DeserializerBase.js index 4e72e82db..1652b62aa 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/DeserializerBase.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/DeserializerBase.js @@ -1,23 +1,8 @@ "use strict"; -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - Object.defineProperty(exports, "__esModule", { value: true }); exports.CustomDeserializer = exports.DeserializerBase = void 0; /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -32,7 +17,8 @@ exports.CustomDeserializer = exports.DeserializerBase = void 0; */ const common_1 = require("#koalaui/common"); const SerializerBase_1 = require("./SerializerBase"); -const InteropNativeModule_1 = require("./InteropNativeModule"); +const NativeBuffer_1 = require("./NativeBuffer"); +const ResourceManager_1 = require("../arkts/ResourceManager"); class DeserializerBase { static registerCustomDeserializer(deserializer) { let current = DeserializerBase.customDeserializers; @@ -48,6 +34,11 @@ class DeserializerBase { } constructor(buffer, length) { this.position = 0; + if (typeof buffer != 'object') + throw new Error('Must be used only with ArrayBuffer'); + if (buffer && ("buffer" in buffer)) { + buffer = buffer.buffer; + } this.buffer = buffer; this.length = length; this.view = new DataView(this.buffer); @@ -56,6 +47,9 @@ class DeserializerBase { // TBD: Use cache return factory(args, length); } + asBuffer(position, length) { + return new Uint8Array(this.buffer, position, length); + } asArray(position, length) { return new Uint8Array(this.buffer, position, length); } @@ -156,6 +150,10 @@ class DeserializerBase { release: this.readPointer(), }; } + readObject() { + const resource = this.readCallbackResource(); + return ResourceManager_1.ResourceHolder.instance().get(resource.resourceId); + } static lengthUnitFromInt(unit) { let suffix; switch (unit) { @@ -180,7 +178,7 @@ class DeserializerBase { const resource = this.readCallbackResource(); const data = this.readPointer(); const length = this.readInt64(); - return InteropNativeModule_1.InteropNativeModule._MaterializeBuffer(data, length, resource.resourceId, resource.hold, resource.release); + return NativeBuffer_1.NativeBuffer.wrap(data, length, resource.resourceId, resource.hold, resource.release); } } exports.DeserializerBase = DeserializerBase; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Finalizable.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Finalizable.d.ts index 2df1edf89..8e8d2615a 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Finalizable.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Finalizable.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { Wrapper } from "./Wrapper"; import { Thunk } from "#koalaui/common"; import { pointer } from "./InteropTypes"; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Finalizable.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Finalizable.js index 21c45b5b0..7acbc0b49 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Finalizable.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Finalizable.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -25,7 +25,7 @@ class NativeThunk { this.name = name; } clean() { - if (!(0, Wrapper_1.isNullPtr)(this.obj)) { + if (this.obj != Wrapper_1.nullptr) { this.destroyNative(this.obj, this.finalizer); } this.obj = Wrapper_1.nullptr; @@ -64,7 +64,7 @@ class Finalizable extends Wrapper_1.Wrapper { return new NativeThunk(ptr, finalizer, handle); } close() { - if ((0, Wrapper_1.isNullPtr)(this.ptr)) { + if (this.ptr == Wrapper_1.nullptr) { throw new Error(`Closing a closed object: ` + this.toString()); } else if (this.cleaner == null) { diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropNativeModule.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropNativeModule.d.ts index 75ea2a718..19e3e1e65 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropNativeModule.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropNativeModule.d.ts @@ -1,20 +1,5 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32 } from "#koalaui/common"; -import { KPointer, KStringPtr, KUint8ArrayPtr } from "./InteropTypes"; +import { KPointer, KSerializerBuffer, KStringPtr, KUint8ArrayPtr } from "./InteropTypes"; export declare class InteropNativeModule { static _SetCallbackDispatcher(dispatcher: (id: int32, args: Uint8Array, length: int32) => int32): void; static _CleanCallbackDispatcher(): void; @@ -24,6 +9,7 @@ export declare class InteropNativeModule { static _AppendGroupedLog(index: int32, message: string): void; static _PrintGroupedLog(index: int32): void; static _GetStringFinalizer(): KPointer; + static _IncrementNumber(value: number): number; static _InvokeFinalizer(ptr1: KPointer, ptr2: KPointer): void; static _GetPtrVectorElement(ptr1: KPointer, arg: int32): KPointer; static _StringLength(ptr1: KPointer): int32; @@ -32,22 +18,25 @@ export declare class InteropNativeModule { static _GetPtrVectorSize(ptr1: KPointer): int32; static _ManagedStringWrite(str1: string, arr: Uint8Array, arg: int32): int32; static _NativeLog(str1: string): void; - static _Utf8ToString(data: KUint8ArrayPtr, offset: int32, length: int32): string; + static _Utf8ToString(data: KSerializerBuffer, offset: int32, length: int32): string; static _StdStringToString(cstring: KPointer): string; - static _CheckCallbackEvent(buffer: KUint8ArrayPtr, bufferLength: int32): int32; + static _CheckCallbackEvent(buffer: KSerializerBuffer, bufferLength: int32): int32; static _HoldCallbackResource(resourceId: int32): void; static _ReleaseCallbackResource(resourceId: int32): void; - static _CallCallback(callbackKind: int32, args: Uint8Array, argsSize: int32): void; - static _CallCallbackSync(callbackKind: int32, args: Uint8Array, argsSize: int32): void; + static _CallCallback(callbackKind: int32, args: KSerializerBuffer, argsSize: int32): void; + static _CallCallbackSync(callbackKind: int32, args: KSerializerBuffer, argsSize: int32): void; static _CallCallbackResourceHolder(holder: KPointer, resourceId: int32): void; static _CallCallbackResourceReleaser(releaser: KPointer, resourceId: int32): void; - static _MaterializeBuffer(data: KPointer, length: int32, resourceId: int32, hold: KPointer, release: KPointer): ArrayBuffer; + static _MaterializeBuffer(data: KPointer, length: bigint, resourceId: int32, hold: KPointer, release: KPointer): ArrayBuffer; static _GetNativeBufferPointer(data: ArrayBuffer): KPointer; - static _LoadVirtualMachine(arg0: int32, arg1: string, arg2: string): int32; + static _LoadVirtualMachine(arg0: int32, arg1: string, arg2: string, arg3: string): int32; static _RunApplication(arg0: int32, arg1: int32): number; static _StartApplication(appUrl: string, appParams: string): KPointer; - static _EmitEvent(eventType: int32, target: int32, arg0: int32, arg1: int32): void; - static _CallForeignVM(foreignContext: KPointer, kind: int32, args: Uint8Array, argsSize: int32): int32; + static _EmitEvent(eventType: int32, target: int32, arg0: int32, arg1: int32): string; + static _CallForeignVM(foreignContext: KPointer, kind: int32, args: KSerializerBuffer, argsSize: int32): int32; + static _SetForeignVMContext(context: KPointer): void; + static _ReadByte(data: KPointer, index: int32, length: bigint): int32; + static _WriteByte(data: KPointer, index: int32, length: bigint, value: int32): void; } export declare function loadInteropNativeModule(): void; //# sourceMappingURL=InteropNativeModule.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropNativeModule.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropNativeModule.js index 404c7f6c0..15f2a270f 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropNativeModule.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropNativeModule.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,8 +12,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ - +*/ Object.defineProperty(exports, "__esModule", { value: true }); exports.loadInteropNativeModule = exports.InteropNativeModule = void 0; const loadLibraries_1 = require("./loadLibraries"); @@ -26,6 +25,7 @@ class InteropNativeModule { static _AppendGroupedLog(index, message) { throw "method not loaded"; } static _PrintGroupedLog(index) { throw "method not loaded"; } static _GetStringFinalizer() { throw "method not loaded"; } + static _IncrementNumber(value) { throw "method not loaded"; } static _InvokeFinalizer(ptr1, ptr2) { throw "method not loaded"; } static _GetPtrVectorElement(ptr1, arg) { throw "method not loaded"; } static _StringLength(ptr1) { throw "method not loaded"; } @@ -45,11 +45,14 @@ class InteropNativeModule { static _CallCallbackResourceReleaser(releaser, resourceId) { throw "method not loaded"; } static _MaterializeBuffer(data, length, resourceId, hold, release) { throw "method not loaded"; } static _GetNativeBufferPointer(data) { throw "method not loaded"; } - static _LoadVirtualMachine(arg0, arg1, arg2) { throw "method not loaded"; } + static _LoadVirtualMachine(arg0, arg1, arg2, arg3) { throw "method not loaded"; } static _RunApplication(arg0, arg1) { throw "method not loaded"; } static _StartApplication(appUrl, appParams) { throw "method not loaded"; } static _EmitEvent(eventType, target, arg0, arg1) { throw "method not loaded"; } static _CallForeignVM(foreignContext, kind, args, argsSize) { throw "method not loaded"; } + static _SetForeignVMContext(context) { throw "method not loaded"; } + static _ReadByte(data, index, length) { throw "method not loaded"; } + static _WriteByte(data, index, length, value) { throw "method not loaded"; } } exports.InteropNativeModule = InteropNativeModule; function loadInteropNativeModule() { diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropOps.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropOps.d.ts index 2b1206036..59c7e540e 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropOps.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropOps.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32 } from "#koalaui/common"; export type CallbackType = (args: Uint8Array, length: int32) => int32; export declare function wrapCallback(callback: CallbackType, autoDisposable?: boolean): int32; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropOps.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropOps.js index 150decb9c..9bb6a450a 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropOps.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropOps.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropTypes.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropTypes.d.ts index 2b012790e..db150c61b 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropTypes.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropTypes.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32, int64, float32, float64 } from "#koalaui/common"; export type KStringPtr = int32 | string | null; export type KStringArrayPtr = int32 | Uint8Array | null; @@ -29,4 +14,5 @@ export type KPointer = number | bigint; export type pointer = KPointer; export type KNativePointer = KPointer; export type KInteropReturnBuffer = Uint8Array; +export type KSerializerBuffer = KUint8ArrayPtr; //# sourceMappingURL=InteropTypes.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropTypes.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropTypes.js index 41af5b8e8..4576ba9b1 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropTypes.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropTypes.js @@ -1,18 +1,3 @@ "use strict"; -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=InteropTypes.js.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/MaterializedBase.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/MaterializedBase.d.ts index beaa7d02c..e115f6ce1 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/MaterializedBase.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/MaterializedBase.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { Finalizable } from "./Finalizable"; export interface MaterializedBase { getPeer(): Finalizable | undefined; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/MaterializedBase.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/MaterializedBase.js index 629c7d70e..28162e00a 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/MaterializedBase.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/MaterializedBase.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeBuffer.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeBuffer.d.ts index 8c309b51f..057a8b323 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeBuffer.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeBuffer.d.ts @@ -1,27 +1,14 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { pointer } from './InteropTypes'; import { int32, int64 } from '#koalaui/common'; -export declare class NativeBuffer extends ArrayBuffer { +export declare class NativeBuffer { data: pointer; length: int64; resourceId: int32; hold: pointer; release: pointer; constructor(data: pointer, length: int64, resourceId: int32, hold: pointer, release: pointer); + readByte(index: int64): int32; + writeByte(index: int64, value: int32): void; static wrap(data: pointer, length: int64, resourceId: int32, hold: pointer, release: pointer): NativeBuffer; } //# sourceMappingURL=NativeBuffer.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeBuffer.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeBuffer.js index 96755df13..3b6702728 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeBuffer.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeBuffer.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,10 +15,11 @@ */ Object.defineProperty(exports, "__esModule", { value: true }); exports.NativeBuffer = void 0; +const InteropNativeModule_1 = require("./InteropNativeModule"); // stub wrapper for KInteropBuffer -class NativeBuffer extends ArrayBuffer { +// export type NativeBuffer = ArrayBuffer +class NativeBuffer { constructor(data, length, resourceId, hold, release) { - super(length); this.data = 0; this.length = 0; this.resourceId = 0; @@ -30,6 +31,12 @@ class NativeBuffer extends ArrayBuffer { this.hold = hold; this.release = release; } + readByte(index) { + return InteropNativeModule_1.InteropNativeModule._ReadByte(this.data, index, BigInt(this.length)); + } + writeByte(index, value) { + InteropNativeModule_1.InteropNativeModule._WriteByte(this.data, index, BigInt(this.length), value); + } static wrap(data, length, resourceId, hold, release) { return new NativeBuffer(data, length, resourceId, hold, release); } diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeString.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeString.d.ts index e59b72f42..f81c04747 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeString.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeString.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { Finalizable } from "./Finalizable"; import { pointer } from "./InteropTypes"; export declare class NativeString extends Finalizable { diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeString.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeString.js index 0bd0d1586..5ba7f061b 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeString.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeString.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Platform.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Platform.d.ts index 078095680..3ebb79728 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Platform.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Platform.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32 } from "#koalaui/common"; import { Wrapper } from "./Wrapper"; import { KPointer } from "./InteropTypes"; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Platform.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Platform.js index adf11745b..b6fcb315f 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Platform.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Platform.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/SerializerBase.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/SerializerBase.d.ts index 6dbd43280..63a6c6ff5 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/SerializerBase.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/SerializerBase.d.ts @@ -1,21 +1,7 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { float32, int32, int64 } from "#koalaui/common"; -import { pointer, KPointer } from "./InteropTypes"; +import { pointer, KPointer, KSerializerBuffer } from "./InteropTypes"; import { ResourceId } from "../arkts/ResourceManager"; +import { NativeBuffer } from "./NativeBuffer"; /** * Value representing possible JS runtime object type. * Must be synced with "enum RuntimeType" in C++. @@ -46,10 +32,9 @@ export declare enum Tags { OBJECT = 107 } export declare function runtimeType(value: any): int32; -export declare function isResource(value: unknown): boolean; export declare function isInstanceOf(className: string, value: object | undefined): boolean; export declare function registerCallback(value: object | undefined): int32; -export declare function registerMaterialized(value: object | undefined): number; +export declare function toPeerPtr(value: object): KPointer; export interface CallbackResource { resourceId: int32; hold: pointer; @@ -70,8 +55,10 @@ export declare class SerializerBase { static registerCustomSerializer(serializer: CustomSerializer): void; constructor(); release(): void; - asArray(): Uint8Array; + asBuffer(): KSerializerBuffer; length(): int32; + getByte(offset: int32): int32; + toArray(): Uint8Array; currentPosition(): int32; private checkCapacity; private heldResources; @@ -79,6 +66,7 @@ export declare class SerializerBase { holdAndWriteCallbackForPromiseVoid(hold?: KPointer, release?: KPointer, call?: KPointer, callSync?: number): [Promise, ResourceId]; holdAndWriteCallbackForPromise(hold?: KPointer, release?: KPointer, call?: KPointer): [Promise, ResourceId]; writeCallbackResource(resource: CallbackResource): void; + holdAndWriteObject(obj: any, hold?: KPointer, release?: KPointer): ResourceId; private releaseResources; writeCustomObject(kind: string, value: any): void; writeNumber(value: number | undefined): void; @@ -90,7 +78,7 @@ export declare class SerializerBase { writeBoolean(value: boolean | undefined): void; writeFunction(value: object | undefined): void; writeString(value: string): void; - writeBuffer(buffer: ArrayBuffer): void; + writeBuffer(buffer: NativeBuffer): void; } export declare function unsafeCast(value: unknown): T; //# sourceMappingURL=SerializerBase.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/SerializerBase.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/SerializerBase.js index 5af311bb5..dd82986a2 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/SerializerBase.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/SerializerBase.js @@ -1,25 +1,10 @@ "use strict"; -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - Object.defineProperty(exports, "__esModule", { value: true }); -exports.unsafeCast = exports.SerializerBase = exports.CustomSerializer = exports.registerMaterialized = exports.registerCallback = exports.isInstanceOf = exports.isResource = exports.runtimeType = exports.Tags = exports.RuntimeType = void 0; +exports.unsafeCast = exports.SerializerBase = exports.CustomSerializer = exports.toPeerPtr = exports.registerCallback = exports.isInstanceOf = exports.runtimeType = exports.Tags = exports.RuntimeType = void 0; const InteropOps_1 = require("./InteropOps"); const InteropNativeModule_1 = require("./InteropNativeModule"); const ResourceManager_1 = require("../arkts/ResourceManager"); +const Wrapper_1 = require("./Wrapper"); // imports required interfaces (now generation is disabled) // import { Resource } from "@arkoala/arkui" /** @@ -74,14 +59,6 @@ function runtimeType(value) { throw new Error(`bug: ${value} is ${type}`); } exports.runtimeType = runtimeType; -function isResource(value) { - return value !== undefined - && typeof value === 'object' - && value !== null - && value.hasOwnProperty("bundleName") - && value.hasOwnProperty("moduleName"); -} -exports.isResource = isResource; // Poor man's instanceof, fails on subclasses function isInstanceOf(className, value) { return (value === null || value === void 0 ? void 0 : value.constructor.name) === className; @@ -94,11 +71,14 @@ function registerCallback(value) { }); } exports.registerCallback = registerCallback; -function registerMaterialized(value) { - // TODO: fix me! - return 42; +function toPeerPtr(value) { + var _a, _b; + if (value.hasOwnProperty("peer")) + return (_b = (_a = unsafeCast(value).getPeer()) === null || _a === void 0 ? void 0 : _a.ptr) !== null && _b !== void 0 ? _b : Wrapper_1.nullptr; + else + throw new Error("Value is not a MaterializedBase instance"); } -exports.registerMaterialized = registerMaterialized; +exports.toPeerPtr = toPeerPtr; /* Serialization extension point */ class CustomSerializer { constructor(supported) { @@ -131,12 +111,18 @@ class SerializerBase { this.releaseResources(); this.position = 0; } - asArray() { + asBuffer() { return new Uint8Array(this.buffer); } length() { return this.position; } + getByte(offset) { + return this.view.getUint8(offset); + } + toArray() { + return new Uint8Array(this.buffer.slice(0, this.currentPosition())); + } currentPosition() { return this.position; } checkCapacity(value) { if (value < 1) { @@ -148,6 +134,7 @@ class SerializerBase { const resizedSize = Math.max(minSize, Math.round(3 * buffSize / 2)); let resizedBuffer = new ArrayBuffer(resizedSize); // TODO: can we grow without new? + // TODO: check the status of ArrayBuffer.transfer function implementation in STS new Uint8Array(resizedBuffer).set(new Uint8Array(this.buffer)); this.buffer = resizedBuffer; this.view = new DataView(resizedBuffer); @@ -164,7 +151,7 @@ class SerializerBase { return resourceId; } holdAndWriteCallbackForPromiseVoid(hold = 0, release = 0, call = 0, callSync = 0) { - let resourceId; + let resourceId = 0; const promise = new Promise((resolve, reject) => { const callback = (err) => { if (err !== undefined) @@ -177,7 +164,7 @@ class SerializerBase { return [promise, resourceId]; } holdAndWriteCallbackForPromise(hold = 0, release = 0, call = 0) { - let resourceId; + let resourceId = 0; const promise = new Promise((resolve, reject) => { const callback = (value, err) => { if (err !== undefined) @@ -194,6 +181,14 @@ class SerializerBase { this.writePointer(resource.hold); this.writePointer(resource.release); } + holdAndWriteObject(obj, hold = 0, release = 0) { + const resourceId = ResourceManager_1.ResourceHolder.instance().registerAndHold(obj); + this.heldResources.push(resourceId); + this.writeInt32(resourceId); + this.writePointer(hold); + this.writePointer(release); + return resourceId; + } releaseResources() { for (const resourceId of this.heldResources) InteropNativeModule_1.InteropNativeModule._ReleaseCallbackResource(resourceId); @@ -269,15 +264,13 @@ class SerializerBase { this.position += encodedLength + 4; } writeBuffer(buffer) { - const resourceId = ResourceManager_1.ResourceHolder.instance().registerAndHold(buffer); this.writeCallbackResource({ - resourceId, - hold: 0, - release: 0 + resourceId: buffer.resourceId, + hold: buffer.hold, + release: buffer.release, }); - const ptr = InteropNativeModule_1.InteropNativeModule._GetNativeBufferPointer(buffer); - this.writePointer(ptr); - this.writeInt64(buffer.byteLength); + this.writePointer(buffer.data); + this.writeInt64(buffer.length); } } exports.SerializerBase = SerializerBase; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Wrapper.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Wrapper.d.ts index 44c84a9f8..4deed8a11 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Wrapper.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Wrapper.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { KPointer } from "./InteropTypes"; export { isNullPtr, nullptr, ptrToBits, bitsToPtr, isSamePtr, ptrToString } from "#common/wrappers/Wrapper"; /** diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Wrapper.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Wrapper.js index dfbdcd17e..ad9cd17b2 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Wrapper.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Wrapper.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/arrays.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/arrays.d.ts index e610b47da..0973caafc 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/arrays.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/arrays.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32 } from "#koalaui/common"; export declare enum Access { READ = 1, diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/arrays.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/arrays.js index 783d697f1..d3a8966bb 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/arrays.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/arrays.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/buffer.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/buffer.d.ts index 09fa8065b..2af546a0b 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/buffer.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/buffer.d.ts @@ -1,24 +1,10 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +import { int32 } from "#koalaui/common"; export declare class KBuffer { private readonly _buffer; get buffer(): ArrayBuffer; - get length(): number; - constructor(length: number); - set(index: number, value: number): void; - get(index: number): number; + get length(): int32; + constructor(length: int32); + set(index: int32, value: int32): void; + get(index: int32): int32; } //# sourceMappingURL=buffer.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/buffer.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/buffer.js index 9a8111a81..73bfc32fb 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/buffer.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/buffer.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,8 +12,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ - +*/ Object.defineProperty(exports, "__esModule", { value: true }); exports.KBuffer = void 0; // todo can be removed if passing ArrayBuffer type through interop is possible diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/index.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/index.d.ts index b06ae1e32..2602f36ea 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/index.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/index.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { withFloat32Array, withFloat64Array, withInt16Array, withInt32Array, withInt8Array, withUint16Array, withUint32Array, withUint8Array, wasmHeap as wasmHeapArrayBuffer } from "#common/wrappers/arrays"; export { registerCallback, setCallbackRegistry } from "#common/wrappers/Callback"; export { Access, Exec } from "./arrays"; @@ -33,7 +18,7 @@ export * from "./buffer"; export * from "../arkts/ResourceManager"; export * from "./NativeBuffer"; export { InteropNativeModule, loadInteropNativeModule } from "./InteropNativeModule"; -export { SerializerBase, RuntimeType, Tags, runtimeType, CallbackResource, unsafeCast, isResource, isInstanceOf } from "./SerializerBase"; +export { SerializerBase, RuntimeType, Tags, runtimeType, CallbackResource, unsafeCast, isInstanceOf, toPeerPtr } from "./SerializerBase"; export { DeserializerBase } from "./DeserializerBase"; export { loadNativeModuleLibrary, loadNativeLibrary, registerNativeModuleLibraryName } from "./loadLibraries"; export * from "./MaterializedBase"; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/index.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/index.js index 8067bd807..b46532c92 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/index.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/index.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -28,7 +28,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.registerNativeModuleLibraryName = exports.loadNativeLibrary = exports.loadNativeModuleLibrary = exports.DeserializerBase = exports.isInstanceOf = exports.isResource = exports.unsafeCast = exports.runtimeType = exports.Tags = exports.RuntimeType = exports.SerializerBase = exports.loadInteropNativeModule = exports.InteropNativeModule = exports.withUint32Array = exports.withUint16Array = exports.withUint8Array = exports.withInt32Array = exports.withInt16Array = exports.withInt8Array = exports.withFloat64Array = exports.withFloat32Array = exports.wasmHeap = exports.withIntArray = exports.withByteArray = exports.withFloatArray = exports.toPtrArray = exports.fromPtrArray = exports.withPtrArray = exports.withStringArray = exports.withString = exports.encodeToData = exports.decodeToString = exports.bitsToPtr = exports.ptrToBits = exports.Wrapper = exports.ptrEqual = exports.nullptr = exports.isNullPtr = exports.getPtr = exports.nullable = exports.NativeThunk = exports.Finalizable = exports.Access = exports.setCallbackRegistry = exports.registerCallback = void 0; +exports.registerNativeModuleLibraryName = exports.loadNativeLibrary = exports.loadNativeModuleLibrary = exports.DeserializerBase = exports.toPeerPtr = exports.isInstanceOf = exports.unsafeCast = exports.runtimeType = exports.Tags = exports.RuntimeType = exports.SerializerBase = exports.loadInteropNativeModule = exports.InteropNativeModule = exports.withUint32Array = exports.withUint16Array = exports.withUint8Array = exports.withInt32Array = exports.withInt16Array = exports.withInt8Array = exports.withFloat64Array = exports.withFloat32Array = exports.wasmHeap = exports.withIntArray = exports.withByteArray = exports.withFloatArray = exports.toPtrArray = exports.fromPtrArray = exports.withPtrArray = exports.withStringArray = exports.withString = exports.encodeToData = exports.decodeToString = exports.bitsToPtr = exports.ptrToBits = exports.Wrapper = exports.ptrEqual = exports.nullptr = exports.isNullPtr = exports.getPtr = exports.nullable = exports.NativeThunk = exports.Finalizable = exports.Access = exports.setCallbackRegistry = exports.registerCallback = void 0; const arrays_1 = require("#common/wrappers/arrays"); Object.defineProperty(exports, "withFloat32Array", { enumerable: true, get: function () { return arrays_1.withFloat32Array; } }); Object.defineProperty(exports, "withFloat64Array", { enumerable: true, get: function () { return arrays_1.withFloat64Array; } }); @@ -84,8 +84,8 @@ Object.defineProperty(exports, "RuntimeType", { enumerable: true, get: function Object.defineProperty(exports, "Tags", { enumerable: true, get: function () { return SerializerBase_1.Tags; } }); Object.defineProperty(exports, "runtimeType", { enumerable: true, get: function () { return SerializerBase_1.runtimeType; } }); Object.defineProperty(exports, "unsafeCast", { enumerable: true, get: function () { return SerializerBase_1.unsafeCast; } }); -Object.defineProperty(exports, "isResource", { enumerable: true, get: function () { return SerializerBase_1.isResource; } }); Object.defineProperty(exports, "isInstanceOf", { enumerable: true, get: function () { return SerializerBase_1.isInstanceOf; } }); +Object.defineProperty(exports, "toPeerPtr", { enumerable: true, get: function () { return SerializerBase_1.toPeerPtr; } }); var DeserializerBase_1 = require("./DeserializerBase"); Object.defineProperty(exports, "DeserializerBase", { enumerable: true, get: function () { return DeserializerBase_1.DeserializerBase; } }); var loadLibraries_1 = require("./loadLibraries"); diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/loadLibraries.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/loadLibraries.d.ts index 1089c8bd4..ddb460079 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/loadLibraries.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/loadLibraries.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - export declare function loadNativeLibrary(name: string): Record; export declare function registerNativeModuleLibraryName(nativeModule: string, libraryName: string): void; export declare function loadNativeModuleLibrary(moduleName: string, module?: object): void; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/loadLibraries.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/loadLibraries.js index 5446b33c3..02c2f1bc4 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/loadLibraries.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/loadLibraries.js @@ -1,6 +1,8 @@ "use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.loadNativeModuleLibrary = exports.registerNativeModuleLibraryName = exports.loadNativeLibrary = void 0; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,18 +14,33 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.loadNativeModuleLibrary = exports.registerNativeModuleLibraryName = exports.loadNativeLibrary = void 0; +*/ +const os = require("os"); const nativeModuleLibraries = new Map(); function loadNativeLibrary(name) { - if (globalThis.requireNapi) - return globalThis.requireNapi(name, true); - else { - const suffixedName = name.endsWith(".node") ? name : `${name}.node`; - return require(suffixedName) + const isHZVM = !!globalThis.requireNapi; + let nameWithoutSuffix = name.endsWith(".node") ? name.slice(0, name.length - 5) : name; + let candidates = [ + name, + `${nameWithoutSuffix}.node`, + `${nameWithoutSuffix}_${os.arch()}.node`, + `${nameWithoutSuffix}_${os.platform()}_${os.arch()}.node`, + ]; + if (!isHZVM) + try { + candidates.push(eval(`require.resolve("${nameWithoutSuffix}.node")`)); + } + catch (_) { } + for (const candidate of candidates) { + try { + if (isHZVM) + return globalThis.requireNapi(candidate, true); + else + return eval(`let exports = {}; process.dlopen({ exports }, "${candidate}", 2); exports`); + } + catch (_) { } } + throw new Error(`Failed to load native library ${name}. dlopen candidates: ${candidates.join(":")}`); } exports.loadNativeLibrary = loadNativeLibrary; function registerNativeModuleLibraryName(nativeModule, libraryName) { diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/nullable.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/interop/nullable.d.ts index bf90c00ac..4f968f2cc 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/nullable.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/nullable.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { KPointer } from "./InteropTypes"; export declare function nullable(value: KPointer, body: (arg: KPointer) => T | undefined): T | undefined; //# sourceMappingURL=nullable.d.ts.map \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/nullable.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/nullable.js index 13b7d505e..8ec1719e3 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/nullable.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/nullable.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Callback.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Callback.d.ts index bef3cebce..3e5c3d46c 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Callback.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Callback.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { KPointer } from "../../interop/InteropTypes"; import { CallbackRegistry } from "../../interop/Platform"; export declare function registerCallback(callback: any, obj?: any): KPointer; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Callback.js b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Callback.js index c30af143e..8eb19c53e 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Callback.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Callback.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Wrapper.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Wrapper.d.ts index 6a35ba0bd..c35209197 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Wrapper.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Wrapper.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32 } from "#koalaui/common"; import { KPointer } from "../../interop/InteropTypes"; export declare const nullptr: bigint; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Wrapper.js b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Wrapper.js index dd3dd6116..f6e92823d 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Wrapper.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Wrapper.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/arrays.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/arrays.d.ts index c6a9d1171..7bd234c91 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/arrays.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/arrays.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { Access, Exec, ExecWithLength, PtrArray } from "../../interop/arrays"; import { Wrapper } from "../../interop/Wrapper"; import { KPointer, KStringArrayPtr } from "../../interop"; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/arrays.js b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/arrays.js index bf8bea46d..e60730679 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/arrays.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/arrays.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Callback.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Callback.d.ts index 558d0b4fd..abd030bad 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Callback.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Callback.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { KPointer } from "../../interop/InteropTypes"; import { CallbackRegistry } from "../../interop/Platform"; export declare function registerCallback(callback: any, obj?: any): KPointer; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Callback.js b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Callback.js index 42d551ac4..23703f628 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Callback.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Callback.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Wrapper.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Wrapper.d.ts index dc132570a..cc82867df 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Wrapper.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Wrapper.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { int32 } from "#koalaui/common"; import { KPointer } from "../../interop/InteropTypes"; export declare const nullptr: number; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Wrapper.js b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Wrapper.js index b849ad662..7c2c005d0 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Wrapper.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Wrapper.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/arrays.d.ts b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/arrays.d.ts index e539c7462..03a99f5ff 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/arrays.d.ts +++ b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/arrays.d.ts @@ -1,18 +1,3 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { KPointer } from "../../interop/InteropTypes"; import { Wrapper } from "../../interop/Wrapper"; import { Access, Exec, ExecWithLength } from "../../interop/arrays"; diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/arrays.js b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/arrays.js index 9ee0f6369..a38870940 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/arrays.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/arrays.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/tsconfig.tsbuildinfo b/koala-wrapper/koalaui/interop/dist/lib/tsconfig.tsbuildinfo new file mode 100644 index 000000000..03aa3afb7 --- /dev/null +++ b/koala-wrapper/koalaui/interop/dist/lib/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es5.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2016.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.esnext.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.core.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.collection.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.generator.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.iterable.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.promise.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.proxy.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.reflect.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.symbol.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2015.symbol.wellknown.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2016.array.include.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.object.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.sharedmemory.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.string.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.intl.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2017.typedarrays.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.asyncgenerator.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.asynciterable.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.intl.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.promise.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2018.regexp.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.array.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.object.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.string.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.symbol.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2019.intl.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.bigint.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.date.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.promise.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.sharedmemory.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.string.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.symbol.wellknown.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.intl.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2020.number.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.promise.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.string.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.weakref.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2021.intl.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.array.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.error.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.intl.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.object.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.sharedmemory.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.es2022.string.d.ts","../../../arkoala/node_modules/@koalaui/ets-tsc/lib/lib.esnext.intl.d.ts","../../../incremental/compat/build/src/index.d.ts","../../../incremental/common/dist/lib/src/math.d.ts","../../../incremental/common/dist/lib/src/stringUtils.d.ts","../../../incremental/common/dist/lib/src/KoalaProfiler.d.ts","../../../incremental/common/dist/lib/src/PerfProbe.d.ts","../../../incremental/common/dist/lib/src/Errors.d.ts","../../../incremental/common/dist/lib/src/LifecycleEvent.d.ts","../../../incremental/common/dist/lib/src/Finalization.d.ts","../../../incremental/common/dist/lib/src/MarkableQueue.d.ts","../../../incremental/common/dist/lib/src/Matrix33.d.ts","../../../incremental/common/dist/lib/src/Point3.d.ts","../../../incremental/common/dist/lib/src/Matrix44.d.ts","../../../incremental/common/dist/lib/src/Point.d.ts","../../../incremental/common/dist/lib/src/sha1.d.ts","../../../incremental/common/dist/lib/src/uniqueId.d.ts","../../../incremental/common/dist/lib/src/koalaKey.d.ts","../../../incremental/common/dist/lib/src/index.d.ts","../../src/interop/InteropTypes.ts","../../src/napi/wrappers/Wrapper.ts","../../src/interop/Wrapper.ts","../../src/interop/arrays.ts","../../src/napi/wrappers/Callback.ts","../../src/interop/loadLibraries.ts","../../src/interop/InteropNativeModule.ts","../../src/interop/Finalizable.ts","../../src/interop/nullable.ts","../../src/interop/NativeString.ts","../../src/interop/buffer.ts","../../src/arkts/ResourceManager.ts","../../src/interop/NativeBuffer.ts","../../src/interop/MaterializedBase.ts","../../src/interop/index.ts","../../src/napi/wrappers/arrays.ts","../../src/interop/Platform.ts","../../src/interop/InteropOps.ts","../../src/interop/SerializerBase.ts","../../src/interop/DeserializerBase.ts","../../src/wasm/wrappers/Callback.ts","../../src/wasm/wrappers/Wrapper.ts","../../src/wasm/wrappers/arrays.ts","../../node_modules/@types/node/compatibility/disposable.d.ts","../../node_modules/@types/node/compatibility/indexable.d.ts","../../node_modules/@types/node/compatibility/iterators.d.ts","../../node_modules/@types/node/compatibility/index.d.ts","../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../node_modules/undici-types/header.d.ts","../../node_modules/undici-types/readable.d.ts","../../node_modules/undici-types/file.d.ts","../../node_modules/undici-types/fetch.d.ts","../../node_modules/undici-types/formdata.d.ts","../../node_modules/undici-types/connector.d.ts","../../node_modules/undici-types/client.d.ts","../../node_modules/undici-types/errors.d.ts","../../node_modules/undici-types/dispatcher.d.ts","../../node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/undici-types/global-origin.d.ts","../../node_modules/undici-types/pool-stats.d.ts","../../node_modules/undici-types/pool.d.ts","../../node_modules/undici-types/handlers.d.ts","../../node_modules/undici-types/balanced-pool.d.ts","../../node_modules/undici-types/agent.d.ts","../../node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/undici-types/mock-agent.d.ts","../../node_modules/undici-types/mock-client.d.ts","../../node_modules/undici-types/mock-pool.d.ts","../../node_modules/undici-types/mock-errors.d.ts","../../node_modules/undici-types/proxy-agent.d.ts","../../node_modules/undici-types/api.d.ts","../../node_modules/undici-types/cookies.d.ts","../../node_modules/undici-types/patch.d.ts","../../node_modules/undici-types/filereader.d.ts","../../node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/undici-types/websocket.d.ts","../../node_modules/undici-types/content-type.d.ts","../../node_modules/undici-types/cache.d.ts","../../node_modules/undici-types/interceptors.d.ts","../../node_modules/undici-types/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/ts5.6/index.d.ts"],"fileInfos":[{"version":"14dd5dc695734e52d7c38a0c3e227e5ea9043b66410bbcacb8772093f6134d92","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"e235a02c7b22e5b24c8621604c7d99fb4faf94761cb88f12a25ca91fe7f67587","7403e3ab869841ec197b1dc145b92932122487ad8f0828824d45c531df63f09b","194e619f79b9692a4cd83225102e99e452bc0e211b261f1c8f889921ec1c74de","c2c371ae2525729b152dca2c7e9681b399b60fb92d2beb844c8d32060a7c3506","53a3c0a6663bf5099151fadb67c1b50967673417661b8e0e70aec10f0728d28b","adedb27ba4a300f7e084b6efed59279ed01f62f0886f5bff54b78634bfafae67","a3368e6d3278633d3820f39424a724294a157e7dfb26a865faf9c26d22083263","3741dbcaf9c2a7a9c63099409cc659d3076a8ccf91e2e1bc8d6f21e6207f13b7","b1cd4a3de15ba6e8ebba34dea1675e5e7a09961388a9062d30882c4bab5575ab","487a699ea2ae4c0adffac1bc8087abde361c83567e814effc7335fd31bff08fd","f7da887d89e2bc8d33e4fb30ac776143fa29fec06d511c624f670517891d6bdb","4093c398b4303bb410e4ab9634f0449b31bf217ac021717588be70835b1ee539","418261c1fb0ba5f9acf49ed2a955603370afac56b573da4515fc8ce5f0b4d28d","2acbdcc162ea232a57601eba11f74a5b79ab492d8fdf4f2e32789fd040a52374","f89301e77fc32c66344345e25f7c65c01b6b0e7b6b219eefe168a9c20bbc5735","6fd1aa9d9d45fd4aa998ea846a49a35a3aff6b3284690ceea6511cd36e0959ef","153b0a8b5e284fb1d72716a644b6d5953461352a516084346485b16138ca240c",{"version":"9cf134c040d3dd4e947e00ad92444ff58d12689a429d41596f0b792ea486b3fb","signature":"32d240c11eaf0a0b53c0c5e309904cdcb3d5474d03d9c3f1003366dd3924eda4"},{"version":"856b67ed112d47e6332522e7b52070a449976cfb1664a3428a0f7df0fd6bf9be","signature":"94df6b2186c9ebc69eca2e513cde7fcd56aab44bb4ead2f44602d1c38a555ef1"},{"version":"39c6d4642b1aa1057bc49c0c6645eff282791cdaeece5bbbca64d91d57dc8061","signature":"34256b35b51b48906827a4a4cb7465a40700bef5e92d014f810246f9072e215d"},{"version":"3b24073ec1d9b9f1517545da9c63e9e97180a778eed76b9883a8b41f55d95d55","signature":"bf108da4f9318d39d205eb9af2d2bcba2e6f12fbced96898939e279e98655e7f"},{"version":"82faae268aa53856effeb25a75963a9d29fd872a08af3b7cdc900168ab739f72","signature":"a5ea9ba551b2d6808c95f5950c561cae89be631799676f8def128c731d76ae27"},{"version":"e34900f79c450de389970ce961fc08d4f74bd2d6288180c270b69aec3d2d44a1","signature":"800a9b20359a4a86dfa47a4547ed2fb2ce0add9a450949477616f4e55fc0b6be"},{"version":"28918c60a81b85a2c0da23178b5583b4ce727b3404351d9e243cbb284114d1cd","signature":"6ab682392e2f3fa2d92a35ce572668fbd1e327c7103ace897de8086ab92101f4"},{"version":"723b5140c32f500a0b8799dba91c97c97d4c8df31d954a9d94e954b6e911d593","signature":"4a8b95fe80b258dfee09077a99c65227e77838fcd86ee1ae0e0117a16bb82efc"},{"version":"c0ff9d6c67b88c9ea6e1d2f38ba5a000015e11e0fa2f4a90e9e1c4ae8229e3ed","signature":"7524209de6ecbac32f7683b40cd32b99ff5a369ae1500feae3e3d0fad6970f73"},{"version":"8b39737a2b20b0d1ebbb98d094e9381e8160764a103fb75585a0d362dc44971b","signature":"1fdc4eb4dad4fe6eacaed0877248c6ad1506a50a2b758e7b2759859c56cf5dd4"},{"version":"52b8cb0e3758178d186a42663846e715857256adf5e0e7c79650321e222bcde2","signature":"adb1fc0508127e8e5964392a949040a610cc8e2f37852c2c384698c98c35e240"},{"version":"bee20d3892f641f8a2ca06c45108ba502473cf088c6ef29f20a7b8c74377cce5","signature":"42bae2dd0bb4fd45d154dc63bde78a91305eb82591b97f9904708080671ac740"},{"version":"f187a81d01d8494a26afb7654427176ee862813ff641f0a048300ba4c6a24c17","signature":"98ffcb9b4ef5b768fef10e21bff02b6d48804921721db9342869f4d58422b1d5"},{"version":"d01285bf9c528287a46fe5d54c2377bf13832fd32d64f8530a43b3d7e17cce73","signature":"30878fcc77eb3c96e65479f87fe1fcbed6b0bc4eebbc8dfb2bc0f0b49ea6dffb"},{"version":"01c9a2010298597c659e142e84113434bf32a3ce0de062319426c6c626ed2ec0","signature":"981ff469567fd7917d188940e3fc00b528aa0af2d468830ecb332bb6a624fe74"},{"version":"43f9b2bbb02bbb27013239773cafcf2ea410fa0e03f93c7d5d08d050c748268c","signature":"8a7840818a6c3281df82530110f297502e1309d9bd18d3fa619149ef5ac6764a"},{"version":"d002db1accbaf34e64af067d73a63911dedfc49fc1363debf472566d3adfe25b","signature":"571ca883dfd7c892d148b02c5f3c690858a0beb7e2e66188f1f87e048e860c3f"},{"version":"e41c950a37a091a8ac925c4c52c4caa34be3ca420731be80c6ab2ff05525bcb9","signature":"5ef4f09647579feab129707df76e5e43a5e1df96d3feea0fa9349d3f3b651c98"},{"version":"80e40b7108aa2b717b823d4484d6deeac7fd3ab6f5db1b95987034d30a80f0cd","signature":"a4baf42eb70324a8cb29044e0d57fe5ad6a361150ef76ead44664eb0956b277f"},{"version":"06b6ef7b3c6b847cd2f4563c912743d32ea3d2084173ca21199f1b46866b0e48","signature":"e09772cb0061080ec9b70e96c77e37bf416d193107cf19b449b573dc209307ae"},{"version":"ecee95d6f621696aaa9ea9ee4ab1b5140251bbdf30f6a4bd7c2dcc7b58171136","signature":"75c99a32aac3e3095f2f87fdfdfa72d33af175b1c8c378840c0cf2f6e63f2ccd"},{"version":"6fc9500af87860124bd7186e8e8e35c71537440864a90a61002e4bb15d15affc","signature":"9805cf76a492c8fab3b05ce111524f6616c2f3d9b44fb98f2e4e2e4a105da8fb"},{"version":"ad6a5f82bd59eecb0e17800f234e78ff8e9c7c8ab08411d33a2c757aa416925c","signature":"bb29a603df290158b1a921ddf1ed42543cdc8f3f7548894df184dc05d6a18cc6"},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true},"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a",{"version":"613b21ccdf3be6329d56e6caa13b258c842edf8377be7bc9f014ed14cdcfc308","affectsGlobalScope":true},{"version":"d2662405c15ec112ebc0c3ec787edb82d58d6acb1a9d109317d7bf9cff9d09a7","affectsGlobalScope":true},"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"1a2e588ce04b57f262959afb54933563431bf75304cfda6165703fe08f4018c5","affectsGlobalScope":true},"2aadab4729954c700a3ae50977f5611a8487dc3e3dc0e7f8fcd57f40475260a8","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","75eb536b960b85f75e21490beeab53ea616646a995ad203e1af532d67a774fb6",{"version":"befbf9d2259d0266234e6a021267b15a430efd1e1fdb8ed5c662d19e7be53763","affectsGlobalScope":true},"51bb58ef3a22fdc49a2d338a852050855d1507f918d4d7fa77a68d72fee9f780","7646ad748a9ca15bf43d4c88f83cc851c67f8ec9c1186295605b59ba6bb36dcb",{"version":"cef8931bc129687165253f0642427c2a72705a4613b3ac461b9fa78c7cdaef32","affectsGlobalScope":true},"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","47b62c294beb69daa5879f052e416b02e6518f3e4541ae98adbfb27805dd6711","f8375506002c556ec412c7e2a5a9ece401079ee5d9eb2c1372e9f5377fac56c7","8edd6482bd72eca772f9df15d05c838dd688cdbd4d62690891fca6578cfda6fe","548d9051fd6a3544216aec47d3520ce922566c2508df667a1b351658b2e46b8d","c175f4dd3b15b38833abfe19acb8ee38c6be2f80f5964b01a4354cafb676a428","b9a4824bb83f25d6d227394db2ed99985308cf2a3a35f0d6d39aa72b15473982",{"version":"6e57c0b7b3d2716fbc0ca28aa23f62bc997ad534d1369f3853dcb9d453d1fb91","affectsGlobalScope":true},{"version":"b84f34005e497dbc0c1948833818cdb38e8c01ff4f88d810b4d70aa2e6c52916","affectsGlobalScope":true},"8e8e284b3832911aeede987e4d74cf0a00f2b03896b2fd3bf924344cc0f96b3c","37d37474a969ab1b91fc332eb6a375885dfd25279624dfa84dea48c9aedf4472","577f17531e78a13319c714bde24bf961dd58823f255fa8cabaca9181bd154f2a","f1a79b6047d006548185e55478837dfbcdd234d6fe51532783f5dffd401cfb2b","565fda33feca88f4b5db23ba8e605da1fd28b6d63292d276bdbd2afe6cd4c490","e822320b448edce0c7ede9cbeada034c72e1f1c8c8281974817030564c63dcb1",{"version":"c5ea83ef86cc930db2ed42cafeef63013c59720cdc127b23feeb77df412950b9","affectsGlobalScope":true},"f23e3d484de54d235bf702072100b541553a1df2550bad691fe84995e15cf7be","821c79b046e40d54a447bebd9307e70b86399a89980a87bbc98114411169e274","17bc38afc78d40b2f54af216c0cc31a4bd0c6897a5945fa39945dfc43260be2c",{"version":"d201b44ff390c220a94fb0ff6a534fe9fa15b44f8a86d0470009cdde3a3e62ab","affectsGlobalScope":true},{"version":"d44445141f204d5672c502a39c1124bcf1df225eba05df0d2957f79122be87b5","affectsGlobalScope":true},"de905bc5f7e7a81cb420e212b95ab5e3ab840f93e0cfa8ce879f6e7fa465d4a2","bc2ff43214898bc6d53cab92fb41b5309efec9cbb59a0650525980aee994de2b","bede3143eeddca3b8ec3592b09d7eb02042f9e195251040c5146eac09b173236","64a40cf4ec8a7a29db2b4bc35f042e5be8537c4be316e5221f40f30ca8ed7051","294c082d609e6523520290db4f1d54114ebc83643fb42abd965be5bcc5d9416b","cf7d740e39bd8adbdc7840ee91bef0af489052f6467edfcefb7197921757ec3b","37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093",{"version":"63c3208a57f10a4f89944c80a6cdb31faff343e41a2d3e06831c621788969fa7","affectsGlobalScope":true},"b85151402164ab7cb665e58df5c1a29aa25ea4ed3a367f84a15589e7d7a9c8ca",{"version":"5d8cd11d44a41a6966a04e627d38efce8d214edb36daf494153ec15b2b95eee2","affectsGlobalScope":true},{"version":"bc6cb10764a82f3025c0f4822b8ad711c16d1a5c75789be2d188d553b69b2d48","affectsGlobalScope":true},"41d510caf7ed692923cb6ef5932dc9cf1ed0f57de8eb518c5bab8358a21af674","2751c5a6b9054b61c9b03b3770b2d39b1327564672b63e3485ac03ffeb28b4f6","dc058956a93388aab38307b7b3b9b6379e1021e73a244aab6ac9427dc3a252a7","f33302cf240672359992c356f2005d395b559e176196d03f31a28cc7b01e69bc",{"version":"3ce25041ff6ae06c08fcaccd5fcd9baf4ca6e80e6cb5a922773a1985672e74c2","affectsGlobalScope":true},{"version":"652c0de14329a834ff06af6ad44670fac35849654a464fd9ae36edb92a362c12","affectsGlobalScope":true},"3b1e178016d3fc554505ae087c249b205b1c50624d482c542be9d4682bab81fc","5db7c5bb02ef47aaaec6d262d50c4e9355c80937d649365c343fa5e84569621d","cf45d0510b661f1da461479851ff902f188edb111777c37055eff12fa986a23a",{"version":"ec9a5f06328f61e09f44d6781d1bd862475f9900c16cef82621a46305def3c4d","affectsGlobalScope":true},"37bef1064b7d015aeaa7c0716fe23a0b3844abe2c0a3df7144153ca8445fe0da","75bd411256302c183207051fd198b4e0dbab45d28a6daf04d3ad61f70a2c8e90"],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"module":1,"noEmitOnError":true,"outDir":"./","removeComments":false,"skipLibCheck":true,"sourceMap":true,"strict":true,"target":4},"fileIdsList":[[100,137],[55,100,137],[55,64,65,100,137],[55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,100,137],[100,134,137],[100,136,137],[100,137,142,170],[100,137,138,149,150,157,167,178],[100,137,138,139,149,157],[95,96,97,100,137],[100,137,140,179],[100,137,141,142,150,158],[100,137,142,167,175],[100,137,143,145,149,157],[100,136,137,144],[100,137,145,146],[100,137,147,149],[100,136,137,149],[100,137,149,150,151,167,178],[100,137,149,150,151,164,167,170],[100,132,137],[100,137,145,149,152,157,167,178],[100,137,149,150,152,153,157,167,175,178],[100,137,152,154,167,175,178],[100,137,149,155],[100,137,156,178,183],[100,137,145,149,157,167],[100,137,158],[100,137,159],[100,136,137,160],[100,137,161,177,183],[100,137,162],[100,137,163],[100,137,149,164,165],[100,137,164,166,179,181],[100,137,149,167,168,170],[100,137,169,170],[100,137,167,168],[100,137,170],[100,137,171],[100,137,167],[100,137,149,173,174],[100,137,173,174],[100,137,142,157,167,175],[100,137,176],[137],[98,99,100,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184],[100,137,157,177],[100,137,152,163,178],[100,137,142,179],[100,137,167,180],[100,137,156,181],[100,137,182],[100,137,149,151,160,167,170,178,181,183],[100,137,167,184],[100,109,113,137,178],[100,109,137,167,178],[100,104,137],[100,106,109,137,175,178],[100,137,157,175],[100,137,185],[100,104,137,185],[100,106,109,137,157,178],[100,101,102,105,108,137,149,167,178],[100,101,107,137],[100,105,109,137,170,178,185],[100,125,137,185],[100,103,104,137,185],[100,109,137],[100,103,104,105,106,107,108,109,110,111,113,114,115,116,117,118,119,120,121,122,123,124,126,127,128,129,130,131,137],[100,109,116,117,137],[100,107,109,117,118,137],[100,108,137],[100,101,104,109,137],[100,109,113,117,118,137],[100,113,137],[100,107,109,112,137,178],[100,101,106,107,109,113,116,137],[100,104,109,125,137,183,185],[71,100,137],[71,72,83,84,90,100,137],[71,72,74,78,100,137],[71,72,77,100,137],[71,72,88,100,137],[79,100,137],[71,72,78,100,137],[72,78,79,100,137],[71,72,74,76,87,100,137],[71,72,74,78,83,84,85,89,100,137],[71,72,73,100,137],[72,74,75,76,77,78,79,80,81,82,83,84,85,87,88,89,90,91,100,137],[72,74,100,137],[72,88,100,137],[71,72,100,137],[71,73,74,75,86,100,137],[71,72,74,75,100,137],[71],[71,72,84,90],[71,72,74],[71,72],[79],[72,79],[71,72,83,84],[72,73],[72,74,75,76,77,78,79,80,81,82,83,84,85,87,88,89,90,91],[72],[72,88],[74,75,86],[72,74,75]],"referencedMap":[[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[4,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[35,1],[32,1],[33,1],[34,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[8,1],[47,1],[44,1],[45,1],[46,1],[48,1],[9,1],[49,1],[50,1],[51,1],[52,1],[53,1],[1,1],[10,1],[54,1],[60,1],[62,2],[58,2],[61,1],[63,1],[64,2],[66,3],[59,1],[67,2],[65,2],[71,4],[70,2],[56,2],[68,2],[57,2],[69,2],[55,1],[134,5],[135,5],[136,6],[137,7],[138,8],[139,9],[95,1],[98,10],[96,1],[97,1],[140,11],[141,12],[142,13],[143,14],[144,15],[145,16],[146,16],[148,1],[147,17],[149,18],[150,19],[151,20],[133,21],[152,22],[153,23],[154,24],[155,25],[156,26],[157,27],[158,28],[159,29],[160,30],[161,31],[162,32],[163,33],[164,34],[165,34],[166,35],[167,36],[169,37],[168,38],[170,39],[171,40],[172,41],[173,42],[174,43],[175,44],[176,45],[100,46],[99,1],[185,47],[177,48],[178,49],[179,50],[180,51],[181,52],[182,53],[183,54],[184,55],[116,56],[123,57],[115,56],[130,58],[107,59],[106,60],[129,61],[124,62],[127,63],[109,64],[108,65],[104,66],[103,61],[126,67],[105,68],[110,69],[111,1],[114,69],[101,1],[132,70],[131,69],[118,71],[119,72],[121,73],[117,74],[120,75],[125,61],[112,76],[113,77],[122,78],[102,41],[128,79],[83,80],[91,81],[79,82],[78,83],[89,84],[72,80],[85,85],[84,86],[81,87],[88,88],[90,89],[74,90],[75,80],[82,80],[86,91],[77,28],[80,92],[76,93],[73,94],[87,95],[92,93],[93,94],[94,96]],"exportedModulesMap":[[12,1],[11,1],[2,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[3,1],[4,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[35,1],[32,1],[33,1],[34,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[8,1],[47,1],[44,1],[45,1],[46,1],[48,1],[9,1],[49,1],[50,1],[51,1],[52,1],[53,1],[1,1],[10,1],[54,1],[60,1],[62,2],[58,2],[61,1],[63,1],[64,2],[66,3],[59,1],[67,2],[65,2],[71,4],[70,2],[56,2],[68,2],[57,2],[69,2],[55,1],[134,5],[135,5],[136,6],[137,7],[138,8],[139,9],[95,1],[98,10],[96,1],[97,1],[140,11],[141,12],[142,13],[143,14],[144,15],[145,16],[146,16],[148,1],[147,17],[149,18],[150,19],[151,20],[133,21],[152,22],[153,23],[154,24],[155,25],[156,26],[157,27],[158,28],[159,29],[160,30],[161,31],[162,32],[163,33],[164,34],[165,34],[166,35],[167,36],[169,37],[168,38],[170,39],[171,40],[172,41],[173,42],[174,43],[175,44],[176,45],[100,46],[99,1],[185,47],[177,48],[178,49],[179,50],[180,51],[181,52],[182,53],[183,54],[184,55],[116,56],[123,57],[115,56],[130,58],[107,59],[106,60],[129,61],[124,62],[127,63],[109,64],[108,65],[104,66],[103,61],[126,67],[105,68],[110,69],[111,1],[114,69],[101,1],[132,70],[131,69],[118,71],[119,72],[121,73],[117,74],[120,75],[125,61],[112,76],[113,77],[122,78],[102,41],[128,79],[83,97],[91,98],[79,99],[78,100],[89,97],[72,97],[85,101],[84,100],[81,102],[88,99],[90,103],[74,104],[75,97],[82,97],[86,105],[80,106],[76,107],[73,100],[87,108],[92,107],[93,100],[94,109]],"semanticDiagnosticsPerFile":[12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,35,32,33,34,36,7,37,42,43,38,39,40,41,8,47,44,45,46,48,9,49,50,51,52,53,1,10,54,60,62,58,61,63,64,66,59,67,65,71,70,56,68,57,69,55,134,135,136,137,138,139,95,98,96,97,140,141,142,143,144,145,146,148,147,149,150,151,133,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,169,168,170,171,172,173,174,175,176,100,99,185,177,178,179,180,181,182,183,184,116,123,115,130,107,106,129,124,127,109,108,104,103,126,105,110,111,114,101,132,131,118,119,121,117,120,125,112,113,122,102,128,83,91,79,78,89,72,85,84,81,88,90,74,75,82,86,77,80,76,73,87,92,93,94],"latestChangedDtsFile":"./src/wasm/wrappers/arrays.d.ts"},"version":"4.9.5"} \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/meson.build b/koala-wrapper/koalaui/interop/meson.build new file mode 100644 index 000000000..b76f7344f --- /dev/null +++ b/koala-wrapper/koalaui/interop/meson.build @@ -0,0 +1,322 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +project('InteropNativeModule', 'c', 'cpp', + version: '0.1', + default_options: ['cpp_std=c++17', 'buildtype=release'] +) + +source_dir = meson.current_source_dir() +interop_src = './src/cpp' + +oses = { 'darwin': 'macos' } # rename meson default names to convenient ones +archs = { 'x86_64': 'x64', 'aarch64': 'arm64', 'armv7-a': 'arm32', 'wasm32': 'wasm' } + +fs = import('fs') + +os = target_machine.system() +os = oses.get(os, os) +arch = target_machine.cpu() +arch = archs.get(arch, arch) + +interop_src = './src/cpp' + +sources = [ + interop_src / 'common-interop.cc', + interop_src / 'callback-resource.cc', + interop_src / 'interop-logging.cc' +] + +include_dirs = [ + interop_src, + interop_src / 'types', +] + +node_api_headers = run_command('node', '-p', 'require.resolve("node-api-headers/package.json").slice(0, -12)', check: true).stdout().strip() + +is_node = get_option('vm_kind') == 'node' +is_hzvm = get_option('vm_kind') == 'hzvm' +is_panda = get_option('vm_kind') == 'panda' +is_ani = is_panda +is_etsapi = is_panda +is_jvm = get_option('vm_kind') == 'jvm' +is_msvc = meson.get_compiler('cpp').get_id() == 'msvc' +is_napi = is_node or is_hzvm +is_jni = is_jvm +is_ohos = os == 'ohos' + +library_use_name = 'InteropNativeModule' + +if is_jni + library_use_name += '_jni' +endif + +cflags = [] +ldflags = [] +deps = [] + +if os == 'windows' + cflags += ['-DKOALA_WINDOWS'] + ldflags += [] + if is_napi + # apply node.exe symbol loading hook + sources += [ + interop_src / 'napi/win-dynamic-node.cc' + ] + cflags += ['/Gy-'] + # Strange, but true + platform_prefix = 'lib' + else + platform_prefix = '' + endif + platform_suffix = 'dll' +endif +if os == 'linux' + cflags += ['-DKOALA_LINUX', '-Wno-unused'] + platform_prefix = 'lib' + platform_suffix = 'so' +endif +if os == 'macos' + cflags += ['-DKOALA_MACOS', '-mmacosx-version-min=13.3'] + platform_prefix = 'lib' + platform_suffix = 'dylib' +endif +if is_ohos + clang_flags = [ + '-Wno-non-virtual-dtor', + '-fno-rtti', + '-Wall', + # '-Werror', TODO: turn back on once generated part compiles without warnings + '-Wno-error=attributes', + '-Wno-unused' + ] + include_dirs += [ + interop_src / 'ohos', + ] + cflags += [ + '-DKOALA_OHOS', + '-D__MUSL__', + ] + clang_flags + ldflags += [ + '-lEGL', + '-lGLESv3', + '-lhilog_ndk.z', + '-lace_ndk.z', + '-lace_napi.z', + '-luv', + '-static-libstdc++' + ] + platform_prefix = 'lib' + platform_suffix = 'so' +endif + +if is_napi + sources += [ + interop_src / 'napi/convertors-napi.cc', + ] + include_dirs += [ + interop_src / 'napi', + node_api_headers / 'include' + ] + cflags += [ + '-DKOALA_NAPI', + ] +endif +if is_etsapi + sources_ets = [ + interop_src / 'ets/convertors-ets.cc', + interop_src / 'types/signatures.cc', + ] + include_dirs_ets = [ + interop_src / 'ets', + interop_src / 'types', + ] + cflags_ets = [ + '-DKOALA_ETS_NAPI', + ] +endif +if is_ani + sources_ani = [ + interop_src / 'ani/convertors-ani.cc', + interop_src / 'types/signatures.cc', + ] + include_dirs_ani = [ + interop_src / 'ani', + interop_src / 'types', + ] + cflags_ani = [ + '-DKOALA_ANI', + ] +endif +if is_jni + sources += [ + interop_src / 'jni/convertors-jni.cc', + interop_src / 'types/signatures.cc', + ] + jni_os_dir = os + if jni_os_dir == 'windows' + jni_os_dir = 'win32' + endif + if jni_os_dir == 'macos' + jni_os_dir = 'darwin' + endif + include_dirs += [ + interop_src / 'jni', + interop_src / 'types', + get_option('jdk_dir') / 'include', + get_option('jdk_dir') / 'include' / jni_os_dir, + ] + cflags += [ + '-DKOALA_JNI', + ] +endif + +if is_node + cflags += [ + '-DKOALA_USE_NODE_VM', + ] + module_prefix = '' + module_suffix = 'node' +endif +if is_hzvm + cflags += [ + '-DKOALA_USE_HZ_VM', + ] + module_prefix = platform_prefix + module_suffix = platform_suffix +endif +if is_panda + cflags += [ + '-DKOALA_USE_PANDA_VM', + ] + if get_option('vmloader') == true + cflags += [ + '-DKOALA_FOREIGN_NAPI' + ] + endif + include_dirs += [ + interop_src / 'napi', + node_api_headers / 'include' + ] + module_prefix = platform_prefix + module_suffix = platform_suffix +endif +if is_jni + cflags += [ + '-DKOALA_USE_JAVA_VM', + ] + module_prefix = platform_prefix + module_suffix = platform_suffix +endif + +if is_msvc + cflags += [] +else + cflags += ['-Wno-parentheses-equality', '-Wno-extern-c-compat'] +endif + +if is_panda +library_use_name_ani = library_use_name +library_use_name_ets = library_use_name + '_ets' +shared_library(library_use_name_ani, + sources + sources_ani, + override_options: [ + # So that ArkJS build can refer NAPI symbols. + 'b_lundef=false', + ], + install: true, + name_prefix: module_prefix, + name_suffix: module_suffix, + include_directories: include_dirs + include_dirs_ani, + install_dir: source_dir / 'build', + cpp_args: cflags + cflags_ani, + link_args: ldflags, + dependencies: deps +) +shared_library(library_use_name_ets, + sources + sources_ets, + override_options: [ + # So that ArkJS build can refer NAPI symbols. + 'b_lundef=false', + ], + install: true, + name_prefix: module_prefix, + name_suffix: module_suffix, + include_directories: include_dirs + include_dirs_ets, + install_dir: source_dir / 'build', + cpp_args: cflags + cflags_ets, + link_args: ldflags, + dependencies: deps +) +else +shared_library(library_use_name, + sources, + override_options: [ + # So that ArkJS build can refer NAPI symbols. + 'b_lundef=false', + ], + install: true, + name_prefix: module_prefix, + name_suffix: module_suffix, + include_directories: include_dirs, + install_dir: source_dir / 'build', + cpp_args: cflags, + link_args: ldflags, + dependencies: deps +) +endif + +if get_option('vmloader') == true + + vmloader_cflags = ['-DKOALA_' + os.to_upper(), '-DKOALA_' + os.to_upper() + '_' + arch.to_upper()] + vmloader_ldflags = [] + + if is_ohos + vmloader_ldflags += ['-lhilog_ndk.z'] + endif + + if get_option('vmloader_apis').contains('jni') + jni_os_dir = os + if jni_os_dir == 'windows' + jni_os_dir = 'win32' + endif + include_dirs += [ + get_option('jdk_dir') / 'include', + get_option('jdk_dir') / 'include' / jni_os_dir, + ] + vmloader_cflags += [ + '-DKOALA_JNI', + ] + endif + + if get_option('vmloader_apis').contains('ets') + include_dirs += [ + interop_src / 'ets', + ] + vmloader_cflags += [ + '-DKOALA_ETS_NAPI', + ] + endif + + shared_library('vmloader', + interop_src / 'vmloader.cc', + override_options: [ + 'b_lundef=false', + ], + include_directories: include_dirs, + install: true, + install_dir: source_dir / 'build', + cpp_args: vmloader_cflags, + link_args: vmloader_ldflags, + ) +endif \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/meson_options.txt b/koala-wrapper/koalaui/interop/meson_options.txt new file mode 100644 index 000000000..0496ac5b5 --- /dev/null +++ b/koala-wrapper/koalaui/interop/meson_options.txt @@ -0,0 +1,21 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +option('vm_kind', type : 'string', value : '', + description : 'VM type') +option('jdk_dir', type : 'string', value : '', + description : 'A path to JDK root') +option('vmloader', type : 'boolean', value : false, + description : 'Whether to build libvmloader.so') +option('vmloader_apis', type : 'string', value : 'ets', + description : 'APIs to use in libvmloader.so') diff --git a/koala-wrapper/koalaui/interop/oh-package.json5 b/koala-wrapper/koalaui/interop/oh-package.json5 index 49ca1a9b2..7d2225c34 100644 --- a/koala-wrapper/koalaui/interop/oh-package.json5 +++ b/koala-wrapper/koalaui/interop/oh-package.json5 @@ -1,5 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { - "name": "@koalaui/interop", + "name": "#koalaui/interop", "version": "1.4.1+devel", "description": "", "files": [ @@ -46,17 +61,13 @@ }, "keywords": [], "dependencies": { - "@koalaui/common": "../common" + "#koalaui/common": "1.4.1+devel" }, "devDependencies": { - "@types/chai": "^4.3.1", - "@types/mocha": "^9.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", - "chai": "^4.3.6", "eslint": "^8.13.0", "eslint-plugin-unused-imports": "^2.0.0", - "mocha": "^9.2.2", "source-map-support": "^0.5.21" } } diff --git a/koala-wrapper/koalaui/interop/scripts/configure.mjs b/koala-wrapper/koalaui/interop/scripts/configure.mjs new file mode 100644 index 000000000..5af980d50 --- /dev/null +++ b/koala-wrapper/koalaui/interop/scripts/configure.mjs @@ -0,0 +1,502 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This is a simplified version of the original configure.mjs script, with only targers +// "hzvm-ohos-arm32" and "hzvm-ohos-arm64" +// "panda-ohos-arm32" and "panda-ohos-arm64" + +import fs from "fs"; +import { exit, platform } from "process"; +import chalk from "chalk"; +import path from "path"; +import minimist from "minimist" + +import { findMeson, CrossFile, requireEnv, relativeToSourceRoot } from "./utils.mjs" + +import { createRequire } from 'node:module'; +import { ohConf } from "../../tools/ohos-tools/ohconf.mjs" +import { OH_SDK_COMPONENT, ohSdkInfo } from "../../tools/ohos-tools/ohos-sdk/download-ohos-sdk.mjs" +import url from "url" +const require = createRequire(import.meta.url); + +const __dirname = path.dirname(url.fileURLToPath(import.meta.url)) + +const OHCONF = ohConf(path.join(__dirname, "../../tools/ohos-tools/ohos-sdk/.ohconf.json")) + +let cliOptions = minimist(process.argv.slice(2)) + +let targets = cliOptions._; +let help = cliOptions.h || cliOptions.help; +let verbose = cliOptions.v || cliOptions.verbose; +let reconfigure = cliOptions.reconfigure; +let wipe = cliOptions.wipe; +let clean = cliOptions.clean; +let dryRun = cliOptions.n || cliOptions["dry-run"]; +let root = cliOptions.root || path.join(__dirname, "..") + +let nodeDir = cliOptions["node-dir"] || process.env.NODE_DIR || ''; +let nodeBuildType = cliOptions["node-buildtype"] || process.env.NODE_BUILDTYPE || "release"; + +let pandaBuildType = process.env.PANDA_BUILDTYPE || "Release"; +let pandaRuntimeOptions = process.env.PANDA_RUNTIME_OPTIONS || "jit:aot"; + +if (targets.length === 0 || help) { + usage(); + exit(1); +} + +const meson = findMeson(); + +if (nodeDir && !path.isAbsolute(nodeDir)) { + console.log("NODE_DIR must be an absolute path") + exit(1); +} + +nodeDir && console.log(`NODE_DIR: ${chalk.green(nodeDir)}`); +console.log(`NODE_BUILDTYPE: ${chalk.green(nodeBuildType)}`); + +targets.forEach(target => configure(target)); + +function getNdkRoot() { + if (process.env["ANDROID_NDK_ROOT"]) return process.env["ANDROID_NDK_ROOT"] + let dir = path.join(requireEnv("ANDROID_SDK_ROOT"), 'ndk') + let ndks = fs.readdirSync(dir).sort() + if (ndks.length < 1) throw new Error("Unexpected NDK dir layout") + return path.join(dir, ndks[ndks.length - 1]) +} + +function getJdkRoot() { + if (process.env["JAVA_HOME"]) return process.env["JAVA_HOME"] + throw new Error("Cannot find JAVA_HOME") +} + +export function configure(target) { + let buildDirName = `build-${target}`; + + if (fs.existsSync(buildDirName)) { + if (clean) { + !dryRun && fs.rmSync(buildDirName, { recursive: true, force: true }); + reconfigure = wipe = false; + } else if (!reconfigure && !wipe) { + console.log(chalk.yellow(`target ${target} already configured`) + + "\n restart with --clean, --wipe or --reconfigure to configure again"); + return; + } + } else { + reconfigure = false; + wipe = false; + } + + // TODO add architecture + let destDir = target; + let binDir = target == "wasm" ? destDir : void 0; // Wasm output can be an executable only + let libDir = target == "wasm" ? void 0 : destDir; + let vmKind = target.split('-')[0] + + const vsenv = process.platform === "win32" && target === "node-host" + + const doConfigure = (isJvm, ...crossFiles) => { + verbose && console.log(`Configuring target ${chalk.bold(target)}\n`); + try { + meson.configure({ + builddir: "build-" + target, + prefix: path.resolve(".runtime-prebuilt"), + wipe, + reconfigure, + verbose, + binDir, + libDir, + crossFiles, + dryRun, + vsenv, + options: { + "vm_kind": vmKind || undefined, + "jdk_dir": isJvm ? getJdkRoot() : null, + "vmloader": target.includes('vmloader'), + } + }); + verbose && console.log(); + console.log(`Target ${chalk.bold(target)}: ${chalk.green("SUCCESS")}`); + } catch (err) { + console.log(err); + console.log(`Target ${chalk.bold(target)}: ${chalk.red("FAIL")}`); + } + } + + switch (target) { + case "hzvm-ohos-arm32": + case "hzvm-ohos-arm64": + case "hzvm-ohos-arm32-vmloader": + case "hzvm-ohos-arm64-vmloader": + case "panda-ohos-arm32": + case "panda-ohos-arm64": + doConfigure(false, createOhosCrossFile(target)); + break; + case "panda-linux-x64": + case "panda-linux-arm64": + doConfigure(false, createLinuxCrossFile(target)); + break; + case "panda-windows-x64": + doConfigure(false, createWindowsClangCrossFile("x64")) + break; + case "node-macos-x64": + case "node-macos-arm64": + case "panda-macos-x64": + case "panda-macos-arm64": + doConfigure(false, createMacosCrossFile(target)); + break; + default: + console.log(chalk.yellow("unsupported target '" + target + "'")); + } +} + +function createWasmCrossFile() { + let cf = CrossFile("wasm"); + let emcc = "emcc", empp = "em++", emar = "emar"; + if (platform == "win32") { + if (process.env.EMSDK) { + let emsdk = process.env.EMSDK; + console.log("EMSDK: " + chalk.green(emsdk)); + let prefix = path.join(emsdk, "upstream", "emscripten"); + emcc = path.join(prefix, emcc + ".bat"); + empp = path.join(prefix, empp + ".bat"); + emar = path.join(prefix, emar + ".bat"); + } else { + console.log("EMSDK: " + chalk.red("not found") + "\r\n" + + chalk.gray(" set environment variable EMSDK=")); + exit(1); + } + } + cf.section("binaries", { + c: emcc, + cpp: empp, + ar: emar, + }) + .section("host_machine", { + system: 'emscripten', + cpu_family: 'wasm32', + cpu: 'wasm32', + endian: 'little', + }) + .close(); + + return cf.path; +} + +function createWindowsClangCrossFile(arch) { + let cf = CrossFile("windows-clang-" + arch); + let cpu = arch === "x64" ? "x86_64" : "x86"; // TODO check + let xwinHome = path.join(__dirname, "../prebuilt/wincrt") + if (!fs.existsSync(xwinHome)) xwinHome = requireEnv("WINCRT_HOME") + console.log(`Using CRT from ${chalk.bold(xwinHome)}`) + + let link_args = [ + `-L${xwinHome}/crt/lib/${cpu}`, + `-L${xwinHome}/sdk/lib/um/${cpu}`, + `-L${xwinHome}/sdk/lib/ucrt/${cpu}`, + ] + + let include_dirs = [ + `/I${xwinHome}/crt/include`, + `/I${xwinHome}/sdk/include/ucrt`, + `/I${xwinHome}/sdk/include/um`, + `/I${xwinHome}/sdk/include/shared`, + ] + + let llvmBin = (() => { + let llvmHome = process.env.LLVM_HOME; + if (!llvmHome) { + if (process.platform === "win32") { + llvmHome = path.join(process.env.ProgramFiles, "LLVM") + } else { + llvmHome = "/usr/lib/llvm-14" // Ubuntu + } + if (fs.existsSync(llvmHome)) { + console.log(`Using LLVM from ${chalk.bold(llvmHome)}`) + } else { + console.log(`Using LLVM from ${chalk.bold("PATH")}`) + llvmHome = null + } + } + if (llvmHome) { + return bin => path.join(llvmHome, 'bin', bin) + } else { + return bin => bin // search in PATH + } + })() + + cf.section("binaries", { + // Ninja must have /I flags for feature detection, so adding them here + c: [llvmBin("clang-cl"), ...include_dirs], + cpp: [llvmBin("clang-cl"), ...include_dirs], + ar: llvmBin("llvm-lib"), + }) + .section("built-in options", { + c_args: ['-Wno-unused-local-typedef'], + cpp_args: ['-Wno-unused-local-typedef'], + + c_link_args: [...link_args], + cpp_link_args: [...link_args], + }) + .section("host_machine", { + system: "windows", + cpu_family: cpu, + cpu: cpu, + endian: "little", + }) + .close(); + + return cf.path; +} + +function createLinuxCrossFile(target) { + let cf = CrossFile(target, root); + + let suffix = "" + if (platform == 'win32') { + suffix = ".exe"; + } + + let cpu = 'unknown' + if (target == 'panda-linux-arm64' || target == 'panda-linux-arm64-vmloader') { + cpu = 'aarch64' + } else if (target == 'panda-linux-x64' || target == 'panda-linux-x64-vmloader') { + cpu = 'x64' + } else { + throw "Unknown target " + target; + } + + cf.section("binaries", { + c: 'clang' + suffix, + cpp: 'clang++' + suffix, + }) + .section("host_machine", { + system: 'linux', + cpu_family: cpu, + cpu: cpu, + endian: 'little', + }) + .close(); + + return cf.path; +} + +function createAndroidCrossFile(target) { + let cf = CrossFile(target); + let ndkRoot = getNdkRoot() + let compilersPath = "" + let suffix = "" + if (platform == 'win32') { + compilersPath = path.join(ndkRoot, "toolchains", "llvm", "prebuilt", "windows-x86_64", "bin"); + suffix = ".cmd"; + } else + compilersPath = path.join(ndkRoot, "toolchains", "llvm", "prebuilt", platform + "-x86_64", "bin"); + compilersPath = path.resolve(compilersPath); + + let cpu = 'unknown' + if (target == 'android-arm64') + cpu = 'aarch64' + else if (target == 'android-x64') + cpu = 'x86_64' + else + throw "Unknown target " + target; + + cf.section("binaries", { + c: path.join(compilersPath, cpu + "-linux-android28-clang" + suffix), + cpp: path.join(compilersPath, cpu + "-linux-android28-clang++" + suffix), + ar: path.join(compilersPath, "llvm-ar"), + }) + .section("host_machine", { + system: 'android', + cpu_family: cpu, + cpu: cpu, + endian: 'little', + }) + .close(); + + return cf.path; +} + +function createOhosCrossFile(target) { + let cf = CrossFile(target, root); + let sdkNativePath = "" + let compilersPath = "" + let suffix = "" + if (platform == 'win32') { + suffix = ".exe"; + } + if (platform == 'linux') { + compilersPath = path.resolve('../arkoala-arkts/tools/compiler/llvm-toolchain/bin') + } else { + sdkNativePath = ohSdkInfo(OHCONF.sdkPath(), OH_SDK_COMPONENT.native).path + compilersPath = path.join(sdkNativePath, "llvm", "bin") + } + + let cflags = [ + '--sysroot=' + path.resolve(`../arkoala-arkts/tools/compiler/sysroot-${ target.includes('arm64') ? 'arm64' : 'arm' }`) + ] + let cpu = 'unknown' + if (target == 'hzvm-ohos-arm64' || target == 'hzvm-ohos-arm64-vmloader' || target == 'panda-ohos-arm64') { + cpu = 'aarch64' + cflags = [ + ...cflags, + '--target=aarch64-linux-ohos' + ] + } else if (target == 'hzvm-ohos-arm32' || target == 'hzvm-ohos-arm32-vmloader' || target == 'panda-ohos-arm32') { + cpu = 'armv7-a' + cflags = [ + ...cflags, + '--target=armv7-a-linux-ohos' + ] + } else { + throw "Unknown target " + target; + } + + cf.section("binaries", { + c: path.join(compilersPath, "clang" + suffix), + c_ld: path.join(compilersPath, "ld.lld" + suffix), + cpp: path.join(compilersPath, "clang++" + suffix), + cpp_ld: path.join(compilersPath, "ld.lld" + suffix), + ar: path.join(compilersPath, "llvm-ar" + suffix), + }) + .section("built-in options", { + c_args: cflags, + c_link_args: cflags, + cpp_args: cflags, + cpp_link_args: cflags + }) + .section("host_machine", { + system: 'ohos', + cpu_family: cpu, + cpu: cpu, + endian: 'little', + }) + .close(); + + return cf.path; +} + +function createIosCrossFile(target) { + let cf = CrossFile(target); + + let cflags = [ + ] + let cpu = 'unknown' + if (target == 'jsc-ios-arm64') { + cpu = 'aarch64' + cflags = [ + ...cflags, + '-arch', 'arm64', + "-isysroot", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" + ] + } else if (target == 'jsc-ios-x64') { + cpu = 'x86_64' + cflags = [ + ...cflags, + '-arch', 'x86_64', + "-isysroot", '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk' + ] + } else { + throw "Unknown target " + target; + } + + cf.section("binaries", { + c: 'clang', + cpp: 'clang++', + objcpp: 'clang++', + ar: 'ar', + strip: 'strip' + }) + .section("built-in options", { + c_args: cflags, + c_link_args: cflags, + cpp_args: cflags, + cpp_link_args: cflags, + objcpp_args: cflags, + objcpp_link_args: cflags, + }) + .section("host_machine", { + system: 'ios', + cpu_family: cpu, + cpu: cpu, + endian: 'little', + }) + .close(); + + return cf.path; +} + +function createMacosCrossFile(target) { + let cf = CrossFile(target); + + let cflags = [ + ] + let cpu = 'unknown' + if (target == 'panda-macos-arm64' || target == 'node-macos-arm64') { + cpu = 'aarch64' + cflags = [ + ...cflags, + '-arch', 'arm64', + ] + } else if (target == 'panda-macos-x64' || target == 'node-macos-x64') { + cpu = 'x86_64' + cflags = [ + ...cflags, + '-arch', 'x86_64', + ] + } else { + throw "Unknown target " + target; + } + + cf.section("binaries", { + c: 'clang', + cpp: 'clang++', + objcpp: 'clang++', + ar: 'ar', + strip: 'strip', + }) + .section("built-in options", { + c_args: cflags, + c_link_args: cflags, + cpp_args: cflags, + cpp_link_args: cflags, + objcpp_args: cflags, + objcpp_link_args: cflags, + }) + .section("host_machine", { + system: 'darwin', + cpu_family: cpu, + cpu: cpu, + endian: 'little', + }) + .close(); + + return cf.path; +} + +function usage() { + console.log(`USAGE: node configure.mjs [OPTION]... TARGET [TARGET]... + +TARGET = wasm | node-android-x64 | node-android-arm64 | jni-host | node-host | hzvm-ohos-arm64 | hzvm-ohos-arm32 | jsc-ios-arm64 | jsc-ios-x64 | node-macos-x64 | node-macos-arm64 compilation target + +OPTIONS: + -h, --help show this help and exit + -v, --verbose show Meson output + -n, --dry-run do not emit files and do not perform meson configuring + --wipe wipe build directory and reconfigure + --reconfigure reconfigure build directory (use if options were changed) + --clean remove build directory before configuring +`) +} diff --git a/koala-wrapper/koalaui/interop/scripts/get_napi.mjs b/koala-wrapper/koalaui/interop/scripts/get_napi.mjs new file mode 100644 index 000000000..2ec1de681 --- /dev/null +++ b/koala-wrapper/koalaui/interop/scripts/get_napi.mjs @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { GitLab } from "../../tools/storage/gitlab/gitlab.mjs"; +import minimist from "minimist"; +import path from "path" + +let args = minimist(process.argv.slice(2)) + +const version = args.version +const apiVersion = version.split('-')[0] +const outDir = path.join('prebuilt', 'node-addon-api-'+ version) + +const gitlab = new GitLab() +gitlab.downloadRawArchive( + 'node-addon-api', + apiVersion, + 'v' + version + '.tar.gz', + outDir +) diff --git a/koala-wrapper/koalaui/common/dist/bridges/ohos/mocha/index.js b/koala-wrapper/koalaui/interop/scripts/get_prebuilt.mjs similarity index 36% rename from koala-wrapper/koalaui/common/dist/bridges/ohos/mocha/index.js rename to koala-wrapper/koalaui/interop/scripts/get_prebuilt.mjs index b95b9f3ee..cb04b5a02 100644 --- a/koala-wrapper/koalaui/common/dist/bridges/ohos/mocha/index.js +++ b/koala-wrapper/koalaui/interop/scripts/get_prebuilt.mjs @@ -1,4 +1,3 @@ -"use strict"; /* * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,35 +12,47 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.startTests = void 0; -const hypium_1 = require("@ohos/hypium"); -globalThis.__OpenHarmony = true; -const suiteMap = new Map(); -suite = (title, fn) => { - suiteMap.set(title, fn); -}; -suiteSetup = (title, fn) => { - (0, hypium_1.beforeEach)(fn); -}; -test = ((title, fn) => { - (0, hypium_1.it)(fn ? title : `[SKIP] ${title}`, hypium_1.Size.MEDIUMTEST, fn ? fn : () => { }); -}); -test.skip = (title, fn) => { - (0, hypium_1.it)(`[SKIP] ${title}`, hypium_1.Size.MEDIUMTEST, () => { }); -}; -performance = { - now: () => { - return Date.now(); + +import { GitLab } from "../../tools/storage/gitlab/gitlab.mjs"; +import minimist from "minimist"; +import path from "path" + +const gitlab = new GitLab() + +let args = minimist(process.argv.slice(2)) + +const version = args.version +const buildType = args['build-type'] +const machine = args.machine +const target = args.target + +const nodeVersion = version.split('-')[0] +const buildName = buildType + '-' + target + '-' + machine +const outDir = path.join('prebuilt', version, buildName) + +if (target === 'android') { + gitlab.downloadRawArchive( + 'node-bin', + nodeVersion, + `node-${target}-${buildType}-${machine}-${version}.zip`, + outDir + ) +} else { + gitlab.downloadRawArchive( + 'node-bin', + nodeVersion, + `node-v${nodeVersion}-headers.tar.gz`, + outDir, + `node-v${nodeVersion}/`, + ) + if (target === 'windows') { + gitlab.downloadRawFile( + 'node-bin', + nodeVersion, + `win-${machine}.node.lib`, + path.join(outDir, 'lib'), + 'node.lib' + ) } -}; -function startTests(generateGolden = false) { - globalThis.__generateGolden = generateGolden; - suiteMap.forEach((fn, title) => { - (0, hypium_1.describe)(title, function () { - fn(); - }); - }); } -exports.startTests = startTests; -//# sourceMappingURL=index.js.map \ No newline at end of file + diff --git a/koala-wrapper/koalaui/interop/scripts/utils.mjs b/koala-wrapper/koalaui/interop/scripts/utils.mjs new file mode 100644 index 000000000..2fc70fd6f --- /dev/null +++ b/koala-wrapper/koalaui/interop/scripts/utils.mjs @@ -0,0 +1,248 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import fs from "fs" +import { exit } from "process" +import { spawnSync } from "child_process" +import chalk from "chalk" +import path from "path" +import url from "url" + +const __dirname = path.dirname(url.fileURLToPath(import.meta.url)); + +class Version { + constructor(version) { + let [major, minor, patch] = version.split(/\./).map(x => +x); + this.major = major; + this.minor = minor; + this.patch = patch; + } + + toString() { + return `${this.major}.${this.minor}.${this.patch}`; + } +} + +export function toIniValue(value) { + if (typeof value == "string") { + value = value.replace("'", "\\'"); + return `'${value}'`; + } else if (Array.isArray(value)) { + let res = '' + for (let i in value) { + res += toIniValue(value[i]) + (i < value.length - 1 ? ', ' : '') + } + return '[' + res + ']'; + } else { + return value.toString(); + } +} + + +export function CrossFile(target, root = path.join(__dirname, '..')) { + let filename = target + '.ini'; + let filepath = path.join(root, filename); + + let lines = [] + return { + section(name, values) { + lines.push(`\n[${name}]\n`); + if (values) { + for (let prop in values) { + if (values.hasOwnProperty(prop)) { + this.property(prop, values[prop]); + } + } + } + return this; + }, + property(name, value) { + value = toIniValue(value); + lines.push(`${name} = ${value}\n`); + return this; + }, + close() { + fs.writeFileSync(filepath, lines.join('')); + }, + get path() { + return filepath; + } + } +} + +class Meson { + #version; + + constructor(version) { + this.#version = new Version(version); + } + + get version() { + return this.#version; + } + + configure(options) { + let builddir = options.builddir; + let crossFiles = options.crossFiles || []; + let defs = options.options || {}; + let dryRun = options.dryRun || false; + + let args = ["setup", builddir]; + if (options.prefix) { + args.push("--prefix", options.prefix); + } + if (options.binDir) { + args.push("--bindir", options.binDir); + } + if (options.libDir) { + args.push("--libdir", options.libDir); + } + for (const file of crossFiles) { + args.push("--cross-file", file); + } + for (const def in defs) { + let value = defs[def]; + if (defs.hasOwnProperty(def) && value != null) { + args.push(`-D${def}=${value}`); + } + } + if (options.wipe) { + args.push("--wipe"); + } + if (options.reconfigure) { + args.push("--reconfigure"); + } + if (options.vsenv) { + // Force MSVC instead of clang + args.push("--vsenv"); + } + if (options.vm_kind) { + args.push(`-Dvm_kind=${options.vm_kind}`); + } + console.log(`> meson ${args.join(' ')}`); + if (!dryRun) { + let stdio = options.verbose ? ['inherit', 'inherit', 'inherit'] : void 0; + let env = process.env + let meson = spawnSync("meson", args, { encoding: "utf8", stdio, env }); + if (meson.status != 0) { + throw new Error("failed to configure"); + } + } + } +} + +export function findMeson() { + try { + let version = spawnSync("meson", ["-v"], { encoding: "utf8" }).output.join('').trim(); + console.log("Meson: " + chalk.green(version)); + return new Meson(version); + } catch (err) { + console.log("Meson: " + chalk.red("NOT FOUND")); + exit(1); + } +} + +export function findNinja() { + try { + let version = spawnSync("ninja", ["--version"], { encoding: "utf8" }).output.join('').trim(); + console.log("Ninja: " + chalk.green(version)); + return { version: new Version(version) }; + } catch (err) { + console.log("Ninja: " + chalk.red("NOT FOUND")); + exit(1); + } +} + +export function findPython() { + try { + let version = spawnSync("python3", ["--version"], { encoding: "utf8" }).output.join('').trim(); + version = version.replace(/^Python\s*/i, ""); + console.log("Python: " + chalk.green(version)); + return { version: new Version(version) }; + } catch (err) { + console.log("Python: " + chalk.red("NOT FOUND")); + exit(1); + } +} + +export function requireEnv(name, description) { + let value = process.env[name]; + if (value) { + console.log(`${name}: ${chalk.green(value)}`); + return value; + } else { + console.log(name + ": " + chalk.red("not found") + "\r\n" + + chalk.gray(` set environment variable ${name}=<${description}>`)); + exit(1); + } +} + +export function relativeToSourceRoot(abspath) { + let sourceRoot = path.resolve(__dirname, ".."); + return path.relative(sourceRoot, abspath); +} + +export function sourceRoot() { + return path.resolve(__dirname, ".."); +} + +class CMake { + #version; + + constructor(version) { + this.#version = new Version(version); + } + + get version() { + return this.#version; + } + + configure(options) { + let builddir = options.builddir; + let srcdir = options.srcdir + let defs = options.defs; + let dryRun = options.dryRun || false; + + let args = ['-GNinja', `-S${srcdir}`, `-B${builddir}`]; + for (const def in defs) { + let value = defs[def]; + if (defs.hasOwnProperty(def) && value != null) { + args.push(`-D${def}=${value}`); + } + } + console.log(`> cmake ${args.join(' ')}`); + if (!dryRun) { + let stdio = options.verbose ? ['inherit', 'inherit', 'inherit'] : void 0; + let cmake = spawnSync("cmake", args, { + encoding: "utf8", + stdio + }); + if (cmake.status != 0) { + throw new Error("failed to configure"); + } + } + } +} + +export function findCmake() { + try { + let version = spawnSync("cmake", ["--version"], { encoding: "utf8" }).output.join('').trim(); + console.log("CMake: " + chalk.green(version)); + return new CMake(version); + } catch (err) { + console.log("CMake: " + chalk.red("NOT FOUND")); + exit(1); + } +} diff --git a/koala-wrapper/koalaui/interop/src/arkts/DeserializerBase.sts b/koala-wrapper/koalaui/interop/src/arkts/DeserializerBase.ts similarity index 39% rename from koala-wrapper/koalaui/interop/src/arkts/DeserializerBase.sts rename to koala-wrapper/koalaui/interop/src/arkts/DeserializerBase.ts index 13b585d03..378cd7f48 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/DeserializerBase.sts +++ b/koala-wrapper/koalaui/interop/src/arkts/DeserializerBase.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,17 +13,20 @@ * limitations under the License. */ -import { float32, int32, int64, float32FromBits } from "@koalaui/common" -import { pointer, KUint8ArrayPtr } from "./InteropTypes" -import { KBuffer } from "./buffer" +import { float32, int32, int64, float32FromBits, uint8 } from "#koalaui/common" +import { pointer, KUint8ArrayPtr, KSerializerBuffer, nullptr } from "./InteropTypes" import { NativeBuffer } from "./NativeBuffer" import { InteropNativeModule } from "./InteropNativeModule" import { Tags, CallbackResource } from "./SerializerBase"; - -export class DeserializerBase { - private position = 0 - private readonly buffer: KBuffer - private readonly length: int32 +import { ResourceHolder, Disposable } from "./ResourceManager" +import {unsafeMemory} from "std/core" + +export class DeserializerBase implements Disposable { + private position : int64 = 0 + private _buffer: KSerializerBuffer + private readonly _isOwnBuffer: boolean; + private readonly _length: int32 + private readonly _end: int64 private static customDeserializers: CustomDeserializer | undefined = new DateDeserializer() static registerCustomDeserializer(deserializer: CustomDeserializer) { @@ -38,111 +41,124 @@ export class DeserializerBase { } } - constructor(buffer: KUint8ArrayPtr, length: int32) { - this.buffer = new KBuffer(buffer) - this.length = length - } - - static get( - factory: (args: Uint8Array, length: int32) => T, - args: Uint8Array, length: int32): T { + constructor(buffer: KUint8ArrayPtr|KSerializerBuffer, length: int32) { + if (buffer instanceof KUint8ArrayPtr) { + const newBuffer = InteropNativeModule._Malloc(length) + this._isOwnBuffer = true + for (let i = 0; i < length; i++) { + unsafeMemory.writeInt8(newBuffer + i, buffer[i] as byte) + } + this._buffer = newBuffer + } else { + this._buffer = buffer + } - // TBD: Use cache - return factory(args, length); + const newBuffer = this._buffer; + this._length = length + this.position = newBuffer + this._end = newBuffer + length; } - asArray(): KUint8ArrayPtr { - return this.buffer.buffer + public final dispose() { + if (this._isOwnBuffer) { + InteropNativeModule._Free(this._buffer) + this._buffer = 0 + this.position = 0 + } } - currentPosition(): int32 { - return this.position + final asBuffer(): KSerializerBuffer { + return this._buffer } - resetCurrentPosition(): void { - this.position = 0 + final resetCurrentPosition(): void { + this.position = this._buffer } - private checkCapacity(value: int32) { - if (value > this.length) { - throw new Error(`${value} is less than remaining buffer length`) + final readInt8(): int32 { + const pos = this.position + const newPos = pos + 1 + + if (newPos > this._end) { + throw new Error(`value size(1) is less than remaining buffer length`) } - } - readInt8(): int32 { - this.checkCapacity(1) - const value = this.buffer.get(this.position) - this.position += 1 - return value + this.position = newPos + return unsafeMemory.readInt8(pos) } - readInt32(): int32 { - this.checkCapacity(4) - let res: int32 = 0; - for (let i = 0; i < 4; i++) { - let byteVal = this.buffer.get(this.position + i) as int32; - byteVal &= 0xff - res = (res | byteVal << (8 * i)) as int32; + final readInt32(): int32 { + const pos = this.position + const newPos = pos + 4 + + if (newPos > this._end) { + throw new Error(`value size(4) is less than remaining buffer length`) } - this.position += 4 - return res + + this.position = newPos + return unsafeMemory.readInt32(pos) } - readPointer(): pointer { - this.checkCapacity(8) - let res: int64 = 0; - for (let i = 0; i < 8; i++) { - let byteVal = this.buffer.get(this.position + i) as int64; - byteVal &= 0xff - res = (res | byteVal << (8 * i)) as int64; + final readPointer(): pointer { + const pos = this.position + const newPos = pos + 8 + + if (newPos > this._end) { + throw new Error(`value size(8) is less than remaining buffer length`) } - this.position += 8 - return res + + this.position = newPos + return unsafeMemory.readInt64(pos) } - readInt64(): int64 { - this.checkCapacity(8) - let res: int64 = 0; - for (let i = 0; i < 8; i++) { - let byteVal = this.buffer.get(this.position + i) as int64; - byteVal &= 0xff - res = (res | byteVal << (8 * i)) as int64; + final readInt64(): int64 { + const pos = this.position + const newPos = pos + 8 + + if (newPos > this._end) { + throw new Error(`value size(8) is less than remaining buffer length`) } - this.position += 8 - return res + + this.position = newPos + return unsafeMemory.readInt64(pos) } - readFloat32(): float32 { - this.checkCapacity(4) - let res: int32 = 0; - for (let i = 0; i < 4; i++) { - let byteVal = this.buffer.get(this.position + i) as int32; - byteVal &= 0xff - res = (res | byteVal << (8 * i)) as int32; + final readFloat32(): float32 { + const pos = this.position + const newPos = pos + 4 + + if (newPos > this._end) { + throw new Error(`value size(4) is less than remaining buffer length`) } - this.position += 4 - return float32FromBits(res) + + + this.position = newPos + return unsafeMemory.readFloat32(pos) } - readBoolean(): boolean { - this.checkCapacity(1) - const value = this.buffer.get(this.position) - this.position += 1 + final readBoolean(): boolean { + const pos = this.position + const newPos = pos + 1 + + if (newPos > this._end) { + throw new Error(`value size(1) is less than remaining buffer length`) + } + + + this.position = newPos + const value = unsafeMemory.readInt8(pos); + if (value == 5) + return false; + return value == 1 } - readFunction(): int32 { + final readFunction(): int32 { // TODO: not exactly correct. - const id = this.readInt32() - return id + return this.readInt32() } - // readMaterialized(): object { - // const ptr = this.readPointer() - // return { ptr: ptr } - // } - - readCallbackResource(): CallbackResource { + final readCallbackResource(): CallbackResource { return ({ resourceId: this.readInt32(), hold: this.readPointer(), @@ -150,16 +166,21 @@ export class DeserializerBase { } as CallbackResource) } - readString(): string { - const length = this.readInt32() - this.checkCapacity(length) - // read without null-terminated byte - const value = InteropNativeModule._Utf8ToString(this.buffer.buffer, this.position, length) - this.position += length - return value + final readString(): string { + const encodedLength = this.readInt32(); + const pos = this.position + const newPos = pos + encodedLength + + if (newPos > this._end) { + throw new Error(`value size(${encodedLength}) is less than remaining buffer length`) + } + + this.position = newPos + // NOTE: skip null-terminated byte + return unsafeMemory.readString(pos, encodedLength - 1) } - readCustomObject(kind: string): object { + final readCustomObject(kind: string): object { let current = DeserializerBase.customDeserializers while (current) { if (current!.supports(kind)) { @@ -172,51 +193,32 @@ export class DeserializerBase { throw Error(`${kind} is not supported`) } - readNumber(): number | undefined { - const tag = this.readInt8() - if (tag == Tags.UNDEFINED) { - return undefined - } else if (tag == Tags.INT32) { - return this.readInt32() - } else if (tag == Tags.FLOAT32) { - return this.readFloat32() - } else { - throw new Error(`Unknown number tag: ${tag}`) + final readNumber(): number | undefined { + const pos = this.position + const tag = this.readInt8() as int + switch (tag) { + case Tags.UNDEFINED as int: + return undefined; + case Tags.INT32 as int: + return this.readInt32() + case Tags.FLOAT32 as int: + return this.readFloat32() + default: + throw new Error(`Unknown number tag: ${tag}`) } } - static lengthUnitFromInt(unit: int32): string { - let suffix: string - switch (unit) { - case 0: - suffix = "px" - break - case 1: - suffix = "vp" - break - case 3: - suffix = "%" - break - case 4: - suffix = "lpx" - break - default: - suffix = "" - } - return suffix + final readObject():object { + const resource = this.readCallbackResource() + return ResourceHolder.instance().get(resource.resourceId) } - readBuffer(): NativeBuffer { - /* not implemented */ + final readBuffer(): NativeBuffer { const resource = this.readCallbackResource() const data = this.readPointer() const length = this.readInt64() return NativeBuffer.wrap(data, length, resource.resourceId, resource.hold, resource.release) } - - readUint8ClampedArray(): Uint8ClampedArray { - throw new Error("Not implemented") - } } export abstract class CustomDeserializer { diff --git a/koala-wrapper/koalaui/interop/src/arkts/Finalizable.sts b/koala-wrapper/koalaui/interop/src/arkts/Finalizable.ts similarity index 90% rename from koala-wrapper/koalaui/interop/src/arkts/Finalizable.sts rename to koala-wrapper/koalaui/interop/src/arkts/Finalizable.ts index 6ae3ac2d8..5f3f69d5d 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/Finalizable.sts +++ b/koala-wrapper/koalaui/interop/src/arkts/Finalizable.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { finalizerRegister, finalizerUnregister, Thunk } from "@koalaui/common" +import { finalizerRegister, finalizerUnregister, Thunk } from "#koalaui/common" import { InteropNativeModule } from "./InteropNativeModule" import { pointer, nullptr } from "./InteropTypes" @@ -49,13 +49,22 @@ export class Finalizable { finalizer: pointer cleaner: NativeThunk|undefined = undefined managed: boolean - constructor(ptr: pointer, finalizer: pointer, managed: boolean = true) { + + constructor(ptr: pointer, finalizer: pointer) { + this.init(ptr, finalizer, true) + } + + constructor(ptr: pointer, finalizer: pointer, managed: boolean) { + this.init(ptr, finalizer, managed) + } + + init(ptr: pointer, finalizer: pointer, managed: boolean) { this.ptr = ptr this.finalizer = finalizer this.managed = managed const handle = undefined - if (this.managed) { + if (managed) { if (this.ptr == nullptr) throw new Error("Can't have nullptr ptr ${}") if (this.finalizer == nullptr) throw new Error("Managed finalizer is 0") diff --git a/koala-wrapper/koalaui/interop/src/arkts/InteropNativeModule.sts b/koala-wrapper/koalaui/interop/src/arkts/InteropNativeModule.ts similarity index 60% rename from koala-wrapper/koalaui/interop/src/arkts/InteropNativeModule.sts rename to koala-wrapper/koalaui/interop/src/arkts/InteropNativeModule.ts index d804174f6..05ef4bbb7 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/InteropNativeModule.sts +++ b/koala-wrapper/koalaui/interop/src/arkts/InteropNativeModule.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,10 +11,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ +*/ -import { int32 } from "@koalaui/common"; -import { KPointer, KUint8ArrayPtr, KInt } from "./InteropTypes"; +import { int32, int64 } from "#koalaui/common"; +import { KPointer, KUint8ArrayPtr, KInt, KSerializerBuffer } from "./InteropTypes"; import { callCallback } from "./callback" import { loadNativeModuleLibrary } from "./loadLibraries" @@ -22,7 +22,7 @@ export class InteropNativeModule { static { loadNativeModuleLibrary("InteropNativeModule") } - static callCallbackFromNative(id: KInt, args: KUint8ArrayPtr, length: KInt): KInt { + static callCallbackFromNative(id: KInt, args: KSerializerBuffer, length: KInt): KInt { return callCallback(id, args, length) } native static _GetGroupedLog(index: int32): KPointer @@ -32,27 +32,43 @@ export class InteropNativeModule { native static _PrintGroupedLog(index: int32): void native static _GetStringFinalizer(): KPointer native static _InvokeFinalizer(ptr1: KPointer, ptr2: KPointer): void + native static _IncrementNumber(value: number): number native static _GetPtrVectorElement(ptr1: KPointer, arg: int32): KPointer native static _StringLength(ptr1: KPointer): int32 native static _StringData(ptr1: KPointer, arr: KUint8ArrayPtr, i: int32): void native static _StringMake(str1: string): KPointer native static _GetPtrVectorSize(ptr1: KPointer): int32 - native static _ManagedStringWrite(str1: string, arr: KUint8ArrayPtr, arg: int32): int32 + @ani.unsafe.Quick + native static _ManagedStringWrite(str1: string, arr: KPointer, arg: int32): int32 native static _NativeLog(str1: string): void - native static _Utf8ToString(data: KUint8ArrayPtr, offset: int32, length: int32): string + @ani.unsafe.Quick + native static _Utf8ToString(data: KPointer, offset: int32, length: int32): string native static _StdStringToString(cstring: KPointer): string - native static _CheckCallbackEvent(buffer: KUint8ArrayPtr, bufferLength: int32): int32 + @ani.unsafe.Direct + native static _CheckCallbackEvent(buffer: KSerializerBuffer, bufferLength: int32): int32 native static _HoldCallbackResource(resourceId: int32): void native static _ReleaseCallbackResource(resourceId: int32): void - native static _CallCallback(callbackKind: int32, args: KUint8ArrayPtr, argsSize: int32): void - native static _CallCallbackSync(callbackKind: int32, args: KUint8ArrayPtr, argsSize: int32): void + native static _CallCallback(callbackKind: int32, args: KSerializerBuffer, argsSize: int32): void + native static _CallCallbackSync(callbackKind: int32, args: KSerializerBuffer, argsSize: int32): void native static _CallCallbackResourceHolder(holder: KPointer, resourceId: int32): void native static _CallCallbackResourceReleaser(releaser: KPointer, resourceId: int32): void - native static _LoadVirtualMachine(arg0: int32, arg1: string, arg2: string): int32 + native static _LoadVirtualMachine(arg0: int32, arg1: string, arg2: string, arg3: string): int32 native static _RunApplication(arg0: int32, arg1: int32): boolean native static _StartApplication(appUrl: string, appParams: string): KPointer - native static _EmitEvent(eventType: int32, target: int32, arg0: int32, arg1: int32): void - native static _CallForeignVM(context:KPointer, callback: int32, data: KUint8ArrayPtr, dataLength: int32): int32 - native static _RestartWith(page: string): void + native static _EmitEvent(eventType: int32, target: int32, arg0: int32, arg1: int32): string + native static _CallForeignVM(context:KPointer, callback: int32, data: KSerializerBuffer, dataLength: int32): int32 + native static _SetForeignVMContext(context: KPointer): void + native static _RestartWith(page: string): void + @ani.unsafe.Direct + native static _ReadByte(data: KPointer, index: int64, length: int64): int32 + @ani.unsafe.Direct + native static _WriteByte(data: KPointer, index: int64, length: int64, value: int32): void + @ani.unsafe.Direct + native static _Malloc(length: int64): KPointer + @ani.unsafe.Direct + native static _Free(data: KPointer): void + @ani.unsafe.Quick + native static _CopyArray(data: KPointer, length: int64, args: KUint8ArrayPtr): void + native static _ReportMemLeaks(): void } diff --git a/koala-wrapper/koalaui/interop/src/arkts/InteropTypes.sts b/koala-wrapper/koalaui/interop/src/arkts/InteropTypes.ts similarity index 73% rename from koala-wrapper/koalaui/interop/src/arkts/InteropTypes.sts rename to koala-wrapper/koalaui/interop/src/arkts/InteropTypes.ts index adbf6e433..656b34f45 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/InteropTypes.sts +++ b/koala-wrapper/koalaui/interop/src/arkts/InteropTypes.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -16,10 +16,10 @@ export type NodePointer = pointer // todo: move to NativeModule export type KStringPtr = string -export type KStringPtrArray = byte[] -export type KUint8ArrayPtr = byte[] -export type KInt32ArrayPtr = int[] -export type KFloat32ArrayPtr = float[] +export type KStringPtrArray = FixedArray +export type KUint8ArrayPtr = FixedArray +export type KInt32ArrayPtr = FixedArray +export type KFloat32ArrayPtr = FixedArray export type KInt = int export type KLong = long export type KUInt = KInt @@ -28,7 +28,8 @@ export type KFloat = float export type KPointer = long // look once again export type pointer = KPointer export type KNativePointer = KPointer -export type KInteropReturnBuffer = byte[] +export type KInteropReturnBuffer = FixedArray +export type KSerializerBuffer = pointer export const nullptr: pointer = 0 diff --git a/koala-wrapper/koalaui/interop/src/arkts/MaterializedBase.sts b/koala-wrapper/koalaui/interop/src/arkts/MaterializedBase.ts similarity index 93% rename from koala-wrapper/koalaui/interop/src/arkts/MaterializedBase.sts rename to koala-wrapper/koalaui/interop/src/arkts/MaterializedBase.ts index f0ea6ee4c..3f26a861e 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/MaterializedBase.sts +++ b/koala-wrapper/koalaui/interop/src/arkts/MaterializedBase.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/arkts/NativeBuffer.ts b/koala-wrapper/koalaui/interop/src/arkts/NativeBuffer.ts new file mode 100644 index 000000000..b6095f0bc --- /dev/null +++ b/koala-wrapper/koalaui/interop/src/arkts/NativeBuffer.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { pointer, KSerializerBuffer, nullptr } from './InteropTypes' +import { int32, int64 } from '#koalaui/common' +import { InteropNativeModule } from "./InteropNativeModule" +import { Disposable } from "./ResourceManager" +import {unsafeMemory} from "std/core" + +// stub wrapper for KInteropBuffer +export final class NativeBuffer { + public data:pointer = 0 + public length: int64 = 0 + public resourceId: int32 = 0 + public hold:pointer = 0 + public release: pointer = 0 + + constructor(data:pointer, length: int64, resourceId: int32, hold:pointer, release: pointer) { + this.data = data + this.length = length + this.resourceId = resourceId + this.hold = hold + this.release = release + } + + public readByte(index:int64): int32 { + return unsafeMemory.readInt8(this.data + index) + } + + public writeByte(index:int64, value: int32): void { + unsafeMemory.writeInt8(this.data + index, value as byte) + } + + static wrap(data:pointer, length: int64, resourceId: int32, hold:pointer, release: pointer): NativeBuffer { + return new NativeBuffer(data, length, resourceId, hold, release) + } +} + +export class KBuffer implements Disposable { + private _buffer: KSerializerBuffer + private readonly _length: int64 + private readonly _owned: boolean + constructor(length: int64) { + this._buffer = InteropNativeModule._Malloc(length) + this._length = length + this._owned = true + } + constructor(buffer: KSerializerBuffer, length: int64) { + this._buffer = buffer + this._length = length + this._owned = false + } + + dispose(): void { + if (this._owned && this._buffer != nullptr) { + InteropNativeModule._Free(this._buffer) + this._buffer = nullptr + } + } + + public get buffer(): KSerializerBuffer { + return this._buffer + } + + public get length(): int64 { + return this._length + } + + public get(index: int64): byte { + return unsafeMemory.readInt8(this._buffer + index) + } + public set(index: int64, value: byte): void { + unsafeMemory.writeInt8(this._buffer + index, value) + } +} \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/arkts/ResourceManager.ts b/koala-wrapper/koalaui/interop/src/arkts/ResourceManager.ts index 985c81298..53a33c110 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/ResourceManager.ts +++ b/koala-wrapper/koalaui/interop/src/arkts/ResourceManager.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { int32 } from "@koalaui/common" +import { int32 } from "#koalaui/common" export type ResourceId = int32 @@ -22,10 +22,17 @@ interface ResourceInfo { holdersCount: int32 } +export interface Disposable { + dispose(): void; +} + export class ResourceHolder { private static nextResourceId: ResourceId = 100 private resources: Map = new Map() private static _instance: ResourceHolder|undefined = undefined + private static disposables = new Array(); + private static disposablesSize = 0 + static instance(): ResourceHolder { if (ResourceHolder._instance == undefined) { ResourceHolder._instance = new ResourceHolder() @@ -66,4 +73,34 @@ export class ResourceHolder { public has(resourceId: ResourceId): boolean { return this.resources.has(resourceId) } + + static register(resource: Disposable) { + if (ResourceHolder.disposablesSize < ResourceHolder.disposables.length) { + ResourceHolder.disposables[ResourceHolder.disposablesSize] = resource + } else { + ResourceHolder.disposables.push(resource) + } + ResourceHolder.disposablesSize++ + } + + static unregister(resource: Disposable) { + const index = ResourceHolder.disposables.indexOf(resource); + if (index !== -1 && index < ResourceHolder.disposablesSize) { + if (index !== ResourceHolder.disposablesSize - 1) { + ResourceHolder.disposables[index] = ResourceHolder.disposables[ResourceHolder.disposablesSize - 1]; + } + ResourceHolder.disposablesSize--; + } + } + + static disposeAll() { + for (let i = 0; i < ResourceHolder.disposablesSize; ++i) { + ResourceHolder.disposables[i].dispose() + } + ResourceHolder.disposablesSize = 0 + } + + static compactDisposables() { + ResourceHolder.disposables = ResourceHolder.disposables.slice(0, ResourceHolder.disposablesSize); + } } diff --git a/koala-wrapper/koalaui/interop/src/arkts/SerializerBase.sts b/koala-wrapper/koalaui/interop/src/arkts/SerializerBase.ts similarity index 36% rename from koala-wrapper/koalaui/interop/src/arkts/SerializerBase.sts rename to koala-wrapper/koalaui/interop/src/arkts/SerializerBase.ts index 764590c8d..5f5fc438c 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/SerializerBase.sts +++ b/koala-wrapper/koalaui/interop/src/arkts/SerializerBase.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,76 +12,85 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { float32, float64, int8, int32, int64, int32BitsFromFloat } from "@koalaui/common" -import { pointer, KUint8ArrayPtr } from "./InteropTypes" -import { ResourceId, ResourceHolder } from "./ResourceManager" -import { KBuffer } from "./buffer" +import { float32, float64, int8, int32, int64, uint8, int32BitsFromFloat } from "#koalaui/common" +import { pointer, nullptr, KSerializerBuffer } from "./InteropTypes" +import { ResourceId, ResourceHolder, Disposable } from "./ResourceManager" import { NativeBuffer } from "./NativeBuffer" import { InteropNativeModule } from "./InteropNativeModule" +import { MaterializedBase } from "./MaterializedBase" +import {unsafeMemory} from "std/core" /** * Value representing possible JS runtime object type. * Must be synced with "enum RuntimeType" in C++. */ -export class RuntimeType { - static UNEXPECTED = -1 - static NUMBER = 1 - static STRING = 2 - static OBJECT = 3 - static BOOLEAN = 4 - static UNDEFINED = 5 - static BIGINT = 6 - static FUNCTION = 7 - static SYMBOL = 8 - static MATERIALIZED = 9 +export final class RuntimeType { + static readonly UNEXPECTED = -1 + static readonly NUMBER = 1 + static readonly STRING = 2 + static readonly OBJECT = 3 + static readonly BOOLEAN = 4 + static readonly UNDEFINED = 5 + static readonly BIGINT = 6 + static readonly FUNCTION = 7 + static readonly SYMBOL = 8 + static readonly MATERIALIZED = 9 } /** * Value representing object type in serialized data. * Must be synced with "enum Tags" in C++. */ -export class Tags { - static UNDEFINED = 101 - static INT32 = 102 - static FLOAT32 = 103 - static STRING = 104 - static LENGTH = 105 - static RESOURCE = 106 - static OBJECT = 107 +export enum Tags { + UNDEFINED = 101, + INT32 = 102, + FLOAT32 = 103, + STRING = 104, + LENGTH = 105, + RESOURCE = 106, + OBJECT = 107, } -export function runtimeType(value: Object|String|number|undefined|null): int32 { - let type = typeof value - if (type == "number") return RuntimeType.NUMBER - if (type == "string") return RuntimeType.STRING - if (type == "undefined") return RuntimeType.UNDEFINED - if (type == "object") return RuntimeType.OBJECT - if (type == "boolean") return RuntimeType.BOOLEAN - if (type == "bigint") return RuntimeType.BIGINT - if (type == "function") return RuntimeType.FUNCTION - if (type == "symbol") return RuntimeType.SYMBOL - - throw new Error(`bug: ${value} is ${type}`) -} +export function runtimeType(value: T): int32 { + if (value === undefined) + return RuntimeType.UNDEFINED; -export function registerCallback(value: object): int32 { - // TODO: fix me! - return 42 -} + if (value === null) + return RuntimeType.OBJECT; -function registerMaterialized(value: Object): int32 { - // TODO: fix me! - return 42 + if (value instanceof String) + return RuntimeType.STRING + + if (value instanceof Numeric) + return RuntimeType.NUMBER + + if (value instanceof Boolean) + return RuntimeType.BOOLEAN + + if (value instanceof BigInt) + return RuntimeType.BIGINT + + if (value instanceof Function) + return RuntimeType.FUNCTION + + if (value instanceof Object) + return RuntimeType.OBJECT + + throw new Error(`bug: ${value} is ${typeof value}`) } -export function isResource(value: Object|undefined): boolean { +export function registerCallback(value: object): int32 { // TODO: fix me! - return false + return 42 } -export function isInstanceOf(className: string, value: Object|undefined): boolean { - // TODO: fix me! - return false +export function toPeerPtr(value: object): pointer { + if (value instanceof MaterializedBase) { + const peer = (value as MaterializedBase).getPeer() + return peer ? peer.ptr : nullptr + } else { + throw new Error("Value is not a MaterializedBase instance") + } } export interface CallbackResource { @@ -103,7 +112,7 @@ export abstract class CustomSerializer { class DateSerializer extends CustomSerializer { constructor() { - super(Array.of("Date" as string)) + super(new Array("Date" as string)) } serialize(serializer: SerializerBase, value: object, kind: string): void { @@ -112,9 +121,11 @@ class DateSerializer extends CustomSerializer { } SerializerBase.registerCustomSerializer(new DateSerializer()) -export class SerializerBase { - private position = 0 - private buffer: KBuffer +export class SerializerBase implements Disposable { + private position: int64 = 0 + private _buffer: KSerializerBuffer + private _length: int32 + private _last: int64 private static customSerializers: CustomSerializer | undefined = new DateSerializer() static registerCustomSerializer(serializer: CustomSerializer) { @@ -129,41 +140,68 @@ export class SerializerBase { } } - resetCurrentPosition(): void { this.position = 0 } - constructor() { - this.buffer = new KBuffer(96) + let length = 96 + this._buffer = InteropNativeModule._Malloc(length as int64) + this._length = length + this.position = this._buffer + this._last = this._buffer + length - 1; } + public release() { this.releaseResources() - this.position = 0 + this.position = this._buffer + } + public final dispose() { + InteropNativeModule._Free(this._buffer) + this._buffer = nullptr } - asArray(): KUint8ArrayPtr { - return this.buffer.buffer + + final asBuffer(): KSerializerBuffer { + return this._buffer } - length(): int32 { - return this.position + final length(): int32 { + return (this.position - this._buffer) as int32 } - currentPosition(): int32 { return this.position } - private checkCapacity(value: int32) { - if (value < 1) { - throw new Error(`${value} is less than 1`) + + final toArray(): byte[] { + const len = this.length() + let result = new byte[len] + for (let i = 0; i < len; i++) { + result[i] = unsafeMemory.readInt8(this._buffer + i) } - let buffSize = this.buffer.length - if (this.position > buffSize - value) { - const minSize = this.position + value - const resizedSize = Math.max(minSize, Math.round(3 * buffSize / 2)) - let resizedBuffer = new KBuffer(resizedSize as int32) - for (let i = 0; i < this.buffer.length; i++) { - resizedBuffer.set(i, this.buffer.get(i)) - } - this.buffer = resizedBuffer + return result + } + + private final updateCapacity(value: int32) { + let buffSize = this._length + const minSize = buffSize + value + const resizedSize = Math.max(minSize, Math.round(3 * buffSize / 2)) as int32 + let resizedBuffer = InteropNativeModule._Malloc(resizedSize) + let oldBuffer = this._buffer + for (let i = 0; i < this.position; i++) { + let val = unsafeMemory.readInt8(oldBuffer + i); + unsafeMemory.writeInt8(resizedBuffer + i, val) } + this._buffer = resizedBuffer + this.position = this.position - oldBuffer + resizedBuffer + this._length = resizedSize + this._last = resizedBuffer + resizedSize - 1; + InteropNativeModule._Free(oldBuffer) } + private heldResources: Array = new Array() - holdAndWriteCallback(callback: object, hold: pointer = 0, release: pointer = 0, call: pointer = 0, callSync: pointer = 0): ResourceId { + private heldResourcesCount: int32 = 0 + private final addHeldResource(resourceId: ResourceId) { + if (this.heldResourcesCount == this.heldResources.length) + this.heldResources.push(resourceId) + else + this.heldResources[this.heldResourcesCount] = resourceId + this.heldResourcesCount++ + } + final holdAndWriteCallback(callback: object, hold: pointer = 0, release: pointer = 0, call: pointer = 0, callSync: pointer = 0): ResourceId { const resourceId = ResourceHolder.instance().registerAndHold(callback) - this.heldResources.push(resourceId) + this.addHeldResource(resourceId) this.writeInt32(resourceId) this.writePointer(hold) this.writePointer(release) @@ -171,10 +209,10 @@ export class SerializerBase { this.writePointer(callSync) return resourceId } - holdAndWriteCallbackForPromiseVoid(hold: pointer = 0, release: pointer = 0, call: pointer = 0): [Promise, ResourceId] { - let resourceId: ResourceId - const promise = new Promise((resolve: (value: PromiseLike) => void, reject: (err: Object|null|undefined) => void) => { - const callback = (err: string[]|undefined) => { + final holdAndWriteCallbackForPromiseVoid(hold: pointer = 0, release: pointer = 0, call: pointer = 0): [Promise, ResourceId] { + let resourceId: ResourceId = 0 + const promise = new Promise((resolve: (value: PromiseLike) => void, reject: (err: Error) => void) => { + const callback = (err: Error|undefined) => { if (err !== undefined) reject(err!) else @@ -184,10 +222,10 @@ export class SerializerBase { }) return [promise, resourceId] } - holdAndWriteCallbackForPromise(hold: pointer = 0, release: pointer = 0, call: pointer = 0): [Promise, ResourceId] { - let resourceId: ResourceId - const promise = new Promise((resolve: (value: T|PromiseLike) => void, reject: (err: Object|null|undefined) => void) => { - const callback = (value: T|undefined, err: string[]|undefined) => { + final holdAndWriteCallbackForPromise(hold: pointer = 0, release: pointer = 0, call: pointer = 0): [Promise, ResourceId] { + let resourceId: ResourceId = 0 + const promise = new Promise((resolve: (value: T|PromiseLike) => void, reject: (err: Error) => void) => { + const callback = (value?: T|undefined, err?: Error|undefined) => { if (err !== undefined) reject(err!) else @@ -197,23 +235,32 @@ export class SerializerBase { }) return [promise, resourceId] } - writeCallbackResource(resource: CallbackResource) { + final holdAndWriteObject(obj:object, hold: pointer = 0, release: pointer = 0): ResourceId { + const resourceId = ResourceHolder.instance().registerAndHold(obj) + this.addHeldResource(resourceId) + this.writeInt32(resourceId) + this.writePointer(hold) + this.writePointer(release) + return resourceId + } + final writeCallbackResource(resource: CallbackResource) { this.writeInt32(resource.resourceId) this.writePointer(resource.hold) this.writePointer(resource.release) } - writeResource(resource: object) { + final writeResource(resource: object) { const resourceId = ResourceHolder.instance().registerAndHold(resource) - this.heldResources.push(resourceId) + this.addHeldResource(resourceId) this.writeInt32(resourceId) } - private releaseResources() { - for (const resourceId of this.heldResources) - InteropNativeModule._ReleaseCallbackResource(resourceId) - // todo think about effective array clearing/pushing - this.heldResources = new Array() + private final releaseResources() { + if (this.heldResourcesCount == 0) return + for (let i = 0; i < this.heldResourcesCount; i++) { + InteropNativeModule._ReleaseCallbackResource(this.heldResources[i]) + } + this.heldResourcesCount = 0 } - writeCustomObject(kind: string, value: object) { + final writeCustomObject(kind: string, value: object) { let current = SerializerBase.customSerializers while (current) { if (current!.supports(kind)) { @@ -222,96 +269,115 @@ export class SerializerBase { } current = current!.next } - // console.log(`Unsupported custom serialization for ${kind}, write undefined`) this.writeInt8(Tags.UNDEFINED as int32) } - writeFunction(value: Object) { + final writeFunction(value: Object) { this.writeInt32(registerCallback(value)) } - writeTag(tag: int32): void { - this.buffer.set(this.position, tag as int8) - this.position++ + final writeTag(tag: int32): void { + this.writeInt8(tag) } - writeNumber(value: number|undefined) { - this.checkCapacity(5) + final writeNumber(value: number|undefined) { if (value == undefined) { this.writeTag(Tags.UNDEFINED) - this.position++ return } - if ((value as float64) == Math.round(value)) { + if (value == Math.round(value)) { this.writeTag(Tags.INT32) this.writeInt32(value as int32) - return } else { - this.writeTag(Tags.FLOAT32) - this.writeFloat32(value as float32) + this.writeInt8(Tags.FLOAT32) + this.writeFloat32(value as float) } } - writeInt8(value: int32) { - this.checkCapacity(1) - this.buffer.set(this.position, value as int8) - this.position += 1 - } - private setInt32(position: int32, value: int32): void { - this.buffer.set(position + 0, ((value ) & 0xff) as int8) - this.buffer.set(position + 1, ((value >> 8) & 0xff) as int8) - this.buffer.set(position + 2, ((value >> 16) & 0xff) as int8) - this.buffer.set(position + 3, ((value >> 24) & 0xff) as int8) - } - writeInt32(value: int32) { - this.checkCapacity(4) - this.setInt32(this.position, value) - this.position += 4 - } - writeInt64(value: int64) { - this.checkCapacity(8) - this.buffer.set(this.position + 0, ((value ) & 0xff) as int8) - this.buffer.set(this.position + 1, ((value >> 8) & 0xff) as int8) - this.buffer.set(this.position + 2, ((value >> 16) & 0xff) as int8) - this.buffer.set(this.position + 3, ((value >> 24) & 0xff) as int8) - this.buffer.set(this.position + 4, ((value >> 32) & 0xff) as int8) - this.buffer.set(this.position + 5, ((value >> 40) & 0xff) as int8) - this.buffer.set(this.position + 6, ((value >> 48) & 0xff) as int8) - this.buffer.set(this.position + 7, ((value >> 56) & 0xff) as int8) - this.position += 8 - } - writeFloat32(value: float32) { - let bits = int32BitsFromFloat(value) - // TODO: this is wrong! - this.checkCapacity(4) - this.buffer.set(this.position + 0, ((bits ) & 0xff) as int8) - this.buffer.set(this.position + 1, ((bits >> 8) & 0xff) as int8) - this.buffer.set(this.position + 2, ((bits >> 16) & 0xff) as int8) - this.buffer.set(this.position + 3, ((bits >> 24) & 0xff) as int8) - this.position += 4 - } - writePointer(value: pointer) { - if (typeof value === "bigint") - // todo where it is possible to be called from? - throw new Error("Not implemented") - this.writeInt64(value) + + final writeInt8(value: int32) { + let pos = this.position + let newPos = pos + 1 + if (newPos > this._last) { + this.updateCapacity(1) + pos = this.position + newPos = pos + 1 + } + + unsafeMemory.writeInt8(pos, value as byte) + this.position = newPos } - writeBoolean(value: boolean|undefined) { - this.checkCapacity(1) - if (value == undefined) { - this.buffer.set(this.position, RuntimeType.UNDEFINED as int32 as int8) - } else { - this.buffer.set(this.position, (value ? 1 : 0) as int8) + + final writeInt32(value: int32) { + let pos = this.position + let newPos = pos + 4 + if (newPos > this._last) { + this.updateCapacity(4) + pos = this.position + newPos = pos + 4 } - this.position++ + + unsafeMemory.writeInt32(pos, value) + this.position = newPos } - writeMaterialized(value: Object) { - this.writePointer(registerMaterialized(value)) + final writeInt64(value: int64) { + let pos = this.position + let newPos = pos + 8 + if (newPos > this._last) { + this.updateCapacity(8) + pos = this.position + newPos = pos + 8 + } + + unsafeMemory.writeInt64(pos, value) + this.position = newPos + } + final writeFloat32(value: float32) { + let pos = this.position + let newPos = pos + 4 + if (newPos > this._last) { + this.updateCapacity(4) + pos = this.position + newPos = pos + 4 + } + + unsafeMemory.writeFloat32(pos, value) + this.position = newPos + } + final writePointer(value: pointer) { + this.writeInt64(value) } - writeString(value: string) { - this.checkCapacity((4 + value.length * 4 + 1) as int32) // length, data - let encodedLength = InteropNativeModule._ManagedStringWrite(value, this.asArray(), this.position + 4) - this.setInt32(this.position, encodedLength) - this.position += encodedLength + 4 + final writeBoolean(value: boolean|undefined) { + let pos = this.position + let newPos = pos + 1 + if (newPos > this._last) { + this.updateCapacity(1) + pos = this.position + newPos = pos + 1 + } + this.position = newPos + + if (value == undefined) + unsafeMemory.writeInt8(pos, 5 as byte); + else if (value == true) + unsafeMemory.writeInt8(pos, 1 as byte); + else if (value == false) + unsafeMemory.writeInt8(pos, 0 as byte); + } + final writeString(value: string) { + const encodedCapacity = unsafeMemory.getStringSizeInBytes(value) + 1 + + let pos = this.position + if (pos + encodedCapacity + 4 > this._last) { + this.updateCapacity(encodedCapacity + 4) + pos = this.position + } + + const encodedLength = unsafeMemory.writeString(pos + 4, value) + // NOTE: add \0 for supporting C char* reading from buffer for utf8-strings, + // need check native part fot utf16 cases and probably change this solution. + unsafeMemory.writeInt8(pos + encodedLength + 4, 0 as byte) + unsafeMemory.writeInt32(pos, encodedLength + 1) + this.position = pos + encodedLength + 4 + 1 } //TODO: Needs to be implemented - writeBuffer(value: NativeBuffer) { + final writeBuffer(value: NativeBuffer) { this.writeCallbackResource({ resourceId: value.resourceId, hold: value.hold, diff --git a/koala-wrapper/koalaui/interop/src/arkts/callback.sts b/koala-wrapper/koalaui/interop/src/arkts/callback.ts similarity index 84% rename from koala-wrapper/koalaui/interop/src/arkts/callback.sts rename to koala-wrapper/koalaui/interop/src/arkts/callback.ts index 06992e1ac..71cd05dd9 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/callback.sts +++ b/koala-wrapper/koalaui/interop/src/arkts/callback.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,10 +13,10 @@ * limitations under the License. */ -import { KUint8ArrayPtr } from "./InteropTypes" -import { int32 } from "@koalaui/common" +import { KUint8ArrayPtr, KSerializerBuffer } from "./InteropTypes" +import { int32 } from "#koalaui/common" -export type CallbackType = (args: KUint8ArrayPtr, length: int32) => int32 +export type CallbackType = (args: KSerializerBuffer, length: int32) => int32 class CallbackRecord { public readonly callback: CallbackType @@ -25,7 +25,7 @@ class CallbackRecord { constructor( callback: CallbackType, autoDisposable: boolean - ) { + ) { this.callback = callback this.autoDisposable = autoDisposable } @@ -40,7 +40,7 @@ class CallbackRegistry { constructor() { this.callbacks.set(0, new CallbackRecord( - (args: KUint8ArrayPtr, length: int32): int32 => { + (args: KSerializerBuffer, length: int32): int32 => { console.log(`Callback 0 called with args = ${args} and length = ${length}`) throw new Error(`Null callback called`) }, false) @@ -58,7 +58,7 @@ class CallbackRegistry { return id } - call(id: int32, args: KUint8ArrayPtr, length: int32): int32 { + call(id: int32, args: KSerializerBuffer, length: int32): int32 { const record = this.callbacks.get(id) if (!record) { console.log(`Callback ${id} is not known`) @@ -87,6 +87,6 @@ export function disposeCallback(id: int32) { CallbackRegistry.INSTANCE.dispose(id) } -export function callCallback(id: int32, args: KUint8ArrayPtr, length: int32): int32 { +export function callCallback(id: int32, args: KSerializerBuffer, length: int32): int32 { return CallbackRegistry.INSTANCE.call(id, args, length) } diff --git a/koala-wrapper/koalaui/interop/src/arkts/index.sts b/koala-wrapper/koalaui/interop/src/arkts/index.ts similarity index 92% rename from koala-wrapper/koalaui/interop/src/arkts/index.sts rename to koala-wrapper/koalaui/interop/src/arkts/index.ts index b57068080..b31a7b7ac 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/index.sts +++ b/koala-wrapper/koalaui/interop/src/arkts/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,7 +15,6 @@ export * from "./InteropTypes" export * from "./callback" -export * from "./buffer" export * from "./ResourceManager" export * from "./NativeBuffer" export * from "./InteropNativeModule" diff --git a/koala-wrapper/koalaui/interop/src/arkts/loadLibraries.sts b/koala-wrapper/koalaui/interop/src/arkts/loadLibraries.ts similarity index 76% rename from koala-wrapper/koalaui/interop/src/arkts/loadLibraries.sts rename to koala-wrapper/koalaui/interop/src/arkts/loadLibraries.ts index 1db028d2e..feda358f4 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/loadLibraries.sts +++ b/koala-wrapper/koalaui/interop/src/arkts/loadLibraries.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,18 +11,21 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ +*/ const nativeModuleLibraries: Map = new Map() export function loadNativeLibrary(library: string) { + console.log(`[loadLibraries] Loading ${library} [${library}]`) loadLibrary(library) } export function registerNativeModuleLibraryName(nativeModule: string, libraryName: string) { + console.log(`[loadLibraries] Registered ${libraryName} as ${nativeModule}`) nativeModuleLibraries.set(nativeModule, libraryName) } export function loadNativeModuleLibrary(nativeModule: string) { + console.log(`[loadLibraries] Loading ${nativeModule} [${nativeModuleLibraries.get(nativeModule) ?? nativeModule}]`) loadLibrary(nativeModuleLibraries.get(nativeModule) ?? nativeModule) } diff --git a/koala-wrapper/koalaui/interop/src/cangjie/DeserializerBase.cj b/koala-wrapper/koalaui/interop/src/cangjie/DeserializerBase.cj index 0e3e2d449..22861ded2 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/DeserializerBase.cj +++ b/koala-wrapper/koalaui/interop/src/cangjie/DeserializerBase.cj @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -29,20 +29,34 @@ public class CallbackResource { } public open class DeserializerBase { - private var position = 0 - private var length = 96 - private var buffer: Array + private var position: Int32 = 0 + public var length: Int32 = 96 // make private + public var buffer: pointer // make private - public init(buffer: Array, length: Int64) { + public init(buffer: UInt64, length: Int32) { this.buffer = buffer this.length = length } + public init(buffer: Array, length: Int32) { + this.buffer = InteropNativeModule._Malloc(length) + for (i in 0..length) { + DeserializerBase.writeu8(this.buffer, i, length, buffer[Int64(i)]) + } + this.length = length + } + + private static func writeu8(buffer: pointer, offset: Int32, length: Int32, value: UInt8): Unit { + InteropNativeModule._WriteByte(buffer, Int64(offset), Int64(length), Int32(value)) + } + private static func readu8(buffer: pointer, offset: Int32, length: Int32): Int32 { + return InteropNativeModule._ReadByte(buffer, Int64(offset), Int64(length)) + } - public func asArray(position: Int64, length: Int64): ArrayList { - return ArrayList() + public func asBuffer(): pointer { + return this.buffer } - public func currentPosition(): Int64 { + public func currentPosition(): Int32 { return this.position } @@ -50,7 +64,7 @@ public open class DeserializerBase { this.position = 0 } - private func checkCapacity(value: Int64) { + private func checkCapacity(value: Int32) { if (value > this.length) { throw Exception("${value} is less than remaining buffer length") } @@ -58,63 +72,77 @@ public open class DeserializerBase { public func readInt8(): Int8 { this.checkCapacity(1) - let res = Int8.readLittleEndian(this.buffer[this.position..this.position+1]) + var res = DeserializerBase.readu8(this.buffer, this.position, this.length) this.position += 1 - return res + return Int8(res) } public func readInt32(): Int32 { this.checkCapacity(4) - let res = Int32.readLittleEndian(this.buffer[this.position..this.position+4]) + let arr = Array(4, {i => UInt8(DeserializerBase.readu8(this.buffer, this.position + Int32(i), this.length))}) this.position += 4 - return res + return Int32.readLittleEndian(arr) } public func readInt64(): Int64 { this.checkCapacity(8) - let res = Int64.readLittleEndian(this.buffer[this.position..this.position+8]) + let arr = Array(8, {i => UInt8(DeserializerBase.readu8(this.buffer, this.position + Int32(i), this.length))}) this.position += 8 - return res + return Int64.readLittleEndian(arr) } public func readPointer(): KPointer { this.checkCapacity(8) - let res = UInt64.readLittleEndian(this.buffer[this.position..this.position+8]) + let arr = Array(8, {i => UInt8(DeserializerBase.readu8(this.buffer, this.position + Int32(i), this.length))}) this.position += 8 - return res + return UInt64.readLittleEndian(arr) } public func readFloat32(): Float32 { this.checkCapacity(4) - let res = Float32.readLittleEndian(this.buffer[this.position..this.position+4]) + let arr = Array(4, {i => UInt8(DeserializerBase.readu8(this.buffer, this.position + Int32(i), this.length))}) this.position += 4 - return res + return Float32.readLittleEndian(arr) + } + public func readFloat64(): Float64 { + this.checkCapacity(8) + let arr = Array(8, {i => UInt8(DeserializerBase.readu8(this.buffer, this.position + Int32(i), this.length))}) + this.position += 8 + return Float64.readLittleEndian(arr) } public func readBoolean(): Bool { - let res = Bool.readLittleEndian(this.buffer[this.position..this.position+1]) + var byteVal = DeserializerBase.readu8(this.buffer, this.position, this.length) this.position += 1 - return res + return byteVal == 1 } - // readMaterialized(): object { - // const ptr = this.readPointer() - // return { ptr: ptr } - // } - public func readString(): String { - let length = Int64(this.readInt32()) + let length = this.readInt32() this.checkCapacity(length) // read without null-terminated byte - let value = InteropNativeModule._Utf8ToString(this.buffer.toArray(), Int32(this.position), Int32(length)) + let value = InteropNativeModule._Utf8ToString(this.buffer, Int32(this.position), Int32(length)) this.position += length return value } - public func readCustomObject(kind: String): Object{ + public func readCustomObject(kind: String): Object { throw Exception("readCustomObject") } + public func readObject(): Any { + let resource = this.readCallbackResource() + return ResourceHolder.instance().get(resource.resourceId) + } + + public func readBuffer(): Array { + return Array() + } + + public func readFunction(): Any { + return { => } + } + public func readNumber(): Float64 { let tag = this.readInt8() if (tag == Tag.UNDEFINED.value) { diff --git a/koala-wrapper/koalaui/interop/src/cangjie/InteropNativeModule.cj b/koala-wrapper/koalaui/interop/src/cangjie/InteropNativeModule.cj index 5d4617498..bc7fce815 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/InteropNativeModule.cj +++ b/koala-wrapper/koalaui/interop/src/cangjie/InteropNativeModule.cj @@ -18,7 +18,11 @@ package Interop import std.collection.* foreign { - func CheckCallbackEvent(buffer: CPointer, bufferLength: Int32): Int32 + func Malloc(length: Int32): UInt64 + func Free(data: KPointer): Unit + func ReadByte(data: KPointer, index: Int64, length: Int64): Int32 + func WriteByte(data: KPointer, index: Int64, length: Int64, value: Int32): Unit + func ReleaseCallbackResource(resourceId: Int32): Unit func GetGroupedLog(index: Int32): UInt64 func StartGroupedLog(index: Int32): Unit @@ -32,27 +36,48 @@ foreign { func StringData(ptr1: UInt64, arr: CPointer, i: Int32): Unit func StringMake(str1: CString): UInt64 func GetPtrVectorSize(ptr1: UInt64): Int32 - func ManagedStringWrite(str1: CString, arr: CPointer, arg: Int32): Int32 + func ManagedStringWrite(str1: CString, arr: pointer, arg: Int32): Int32 func NativeLog(str1: CString): Unit - func Utf8ToString(data: CPointer, offset: Int32, length: Int32): CString + func Utf8ToString(data: pointer, offset: Int32, length: Int32): CString + func CheckCallbackEvent(buffer: KSerializerBuffer, bufferLength: Int32): Int32 func StdStringToString(cstring: UInt64): CString - func CallCallback(callbackKind: Int32, args: CPointer, argsSize: Int32): Unit - func CallCallbackSync(callbackKind: Int32, args: CPointer, argsSize: Int32): Unit + func IncrementNumber(input: Float64): Float64 + func CallCallback(callbackKind: Int32, args: KSerializerBuffer, argsSize: Int32): Unit + func CallCallbackSync(callbackKind: Int32, args: KSerializerBuffer, argsSize: Int32): Unit func CallCallbackResourceHolder(holder: UInt64, resourceId: Int32): Unit func CallCallbackResourceReleaser(releaser: UInt64, resourceId: Int32): Unit + func CallForeignVM(foreignContext: UInt64, kind: Int32, data: CPointer, length: Int32): Int32 func LoadVirtualMachine(arg0: Int32, arg1: CString, arg2: CString): Int32 func RunApplication(arg0: Int32, arg1: Int32): Bool func StartApplication(appUrl: CString, appParams: CString): UInt64 - func EmitEvent(eventType: Int32, target: Int32, arg0: Int32, arg1: Int32): Unit + func EmitEvent(eventType: Int32, target: Int32, arg0: Int32, arg1: Int32): CString + func RestartWith(page: CString): Unit } public open class InteropNativeModule { - public static func _CheckCallbackEvent(buffer: Array, bufferLength: Int32): Int32 { + public static func _Malloc(length: Int32) { unsafe { - let handle_0 = acquireArrayRawData(buffer) - let result = CheckCallbackEvent(handle_0.pointer, bufferLength) - releaseArrayRawData(handle_0); - return result + return Malloc(length) + } + } + public static func _Free(data: KPointer): Unit { + unsafe { + Free(data) + } + } + public static func _ReadByte(data: KPointer, index: Int64, length: Int64): Int32 { + unsafe { + return ReadByte(data, index, length) + } + } + public static func _WriteByte(data: KPointer, index: Int64, length: Int64, value: Int32) { + unsafe { + WriteByte(data, index, length, value) + } + } + public static func _ReleaseCallbackResource(resourceId: Int32): Unit { + unsafe { + ReleaseCallbackResource(resourceId) } } public static func _GetGroupedLog(index: Int32): UInt64 { @@ -106,9 +131,9 @@ public open class InteropNativeModule { return result } } - public static func _StringData(ptr1: UInt64, arr: ArrayList, i: Int32): Unit { + public static func _StringData(ptr1: UInt64, arr: Array, i: Int32): Unit { unsafe { - let handle_1 = acquireArrayRawData(arr.toArray()) + let handle_1 = acquireArrayRawData(arr) StringData(ptr1, handle_1.pointer, i) releaseArrayRawData(handle_1) } @@ -127,13 +152,11 @@ public open class InteropNativeModule { return result } } - public static func _ManagedStringWrite(str1: String, arr: ArrayList, arg: Int32): Int32 { + public static func _ManagedStringWrite(str1: String, arr: pointer, arg: Int32): Int32 { unsafe { let str1 = LibC.mallocCString(str1) - let handle_1 = acquireArrayRawData(arr.toArray()) - let result = ManagedStringWrite(str1, handle_1.pointer, arg) + let result = ManagedStringWrite(str1, arr, arg) LibC.free(str1) - releaseArrayRawData(handle_1) return result } } @@ -144,32 +167,37 @@ public open class InteropNativeModule { LibC.free(str1) } } - public static func _Utf8ToString(data: Array, offset: Int32, length: Int32): String { + public static func _Utf8ToString(data: pointer, offset: Int32, length: Int32): String { unsafe { - let handle_0 = acquireArrayRawData(data) - let result = Utf8ToString(handle_0.pointer, offset, length) - releaseArrayRawData(handle_0) + let result = Utf8ToString(data, offset, length) return result.toString() } } + public static func _CheckCallbackEvent(buffer: KSerializerBuffer, bufferLength: Int32): Int32 { + unsafe { + return CheckCallbackEvent(buffer, bufferLength) + } + } public static func _StdStringToString(cstring: UInt64): String { unsafe { let result = StdStringToString(cstring) return result.toString() } } - public static func _CallCallback(callbackKind: Int32, args: ArrayList, argsSize: Int32): Unit { + public static func _IncrementNumber(input: Float64): Float64 { unsafe { - let handle_1 = acquireArrayRawData(args.toArray()) - CallCallback(callbackKind, handle_1.pointer, argsSize) - releaseArrayRawData(handle_1) + let result = IncrementNumber(input) + return result } } - public static func _CallCallbackSync(callbackKind: Int32, args: ArrayList, argsSize: Int32): Unit { + public static func _CallCallback(callbackKind: Int32, args: KSerializerBuffer, argsSize: Int32): Unit { unsafe { - let handle_1 = acquireArrayRawData(args.toArray()) - CallCallbackSync(callbackKind, handle_1.pointer, argsSize) - releaseArrayRawData(handle_1) + CallCallback(callbackKind, args, argsSize) + } + } + public static func _CallCallbackSync(callbackKind: Int32, args: KSerializerBuffer, argsSize: Int32): Unit { + unsafe { + CallCallbackSync(callbackKind, args, argsSize) } } public static func _CallCallbackResourceHolder(holder: UInt64, resourceId: Int32): Unit { @@ -182,13 +210,21 @@ public open class InteropNativeModule { CallCallbackResourceReleaser(releaser, resourceId) } } + public static func _CallForeignVM(foreignContext: UInt64, kind: Int32, data: ArrayList, length: Int32): Int32 { + unsafe { + let handle_2 = acquireArrayRawData(data.toArray()) + let result = CallForeignVM(foreignContext, kind, handle_2.pointer, length) + releaseArrayRawData(handle_2) + return result + } + } public static func _LoadVirtualMachine(arg0: Int32, arg1: String, arg2: String): Int32 { unsafe { let arg1 = LibC.mallocCString(arg1) let arg2 = LibC.mallocCString(arg2) let result = LoadVirtualMachine(arg0, arg1, arg2) LibC.free(arg1) - LibC.free(arg1) + LibC.free(arg2) return result } } @@ -204,20 +240,21 @@ public open class InteropNativeModule { let appParams = LibC.mallocCString(appParams) let result = StartApplication(appUrl, appParams) LibC.free(appUrl) - LibC.free(appUrl) + LibC.free(appParams) return result } } - public static func _EmitEvent(eventType: Int32, target: Int32, arg0: Int32, arg1: Int32): Unit { + public static func _EmitEvent(eventType: Int32, target: Int32, arg0: Int32, arg1: Int32): String { unsafe { - EmitEvent(eventType, target, arg0, arg1) + let result = EmitEvent(eventType, target, arg0, arg1) + return result.toString() } } - public static func _StringData(ptr: KPointer, data: Array, arg2: Int32): Unit { + public static func _RestartWith(page: String): Unit { unsafe { - let handle_1 = acquireArrayRawData(data) - StringData(ptr, handle_1.pointer, arg2) - releaseArrayRawData(handle_1) + let page = LibC.mallocCString(page) + RestartWith(page) + LibC.free(page) } } } \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/cangjie/InteropTypes.cj b/koala-wrapper/koalaui/interop/src/cangjie/InteropTypes.cj index 2e2895609..ddda5415d 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/InteropTypes.cj +++ b/koala-wrapper/koalaui/interop/src/cangjie/InteropTypes.cj @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,5 +20,19 @@ public type KPointer = UInt64 public type KFloat = Float32 public type pointer = KPointer public type KInt = Int32 +public type KLong = Int64 public type KStringPtr = String -public type ArrayBuffer = ArrayList \ No newline at end of file +public type ArrayBuffer = ArrayList +public type KSerializerBuffer = pointer +public const nullptr: UInt64 = 0 +@C +public struct KInteropReturnBuffer { + public var length: Int32 + public var data: CPointer + public var dispose: CPointer, Int32) -> Unit>> + init (length: Int32, data: CPointer, dispose: CPointer, Int32) -> Unit>>) { + this.length = length + this.data = data + this.dispose = dispose + } +} \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/cangjie/Finalizable.cj b/koala-wrapper/koalaui/interop/src/cangjie/MaterializedBase.cj similarity index 61% rename from koala-wrapper/koalaui/interop/src/cangjie/Finalizable.cj rename to koala-wrapper/koalaui/interop/src/cangjie/MaterializedBase.cj index b5ac709d4..362de947c 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/Finalizable.cj +++ b/koala-wrapper/koalaui/interop/src/cangjie/MaterializedBase.cj @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -24,10 +24,18 @@ public open class Finalizable { } } -public abstract class MaterializedBase { - public var peer: Option = Option.None +public interface MaterializedBase { + public func getPeer(): ?Finalizable - public func getPeer(): ?Finalizable { - return this.peer + public static func toPeerPtr(value: Any): KPointer + { + let base: MaterializedBase = match (value as MaterializedBase) { + case Some(x) => x + case None => throw Exception("Value is not a MaterializedBase instance!") + } + return match (base.getPeer()) { + case Some(peer) => peer.ptr + case None => nullptr + } } } diff --git a/koala-wrapper/koalaui/interop/src/cangjie/SerializerBase.cj b/koala-wrapper/koalaui/interop/src/cangjie/SerializerBase.cj index 526e566d6..0081f7986 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/SerializerBase.cj +++ b/koala-wrapper/koalaui/interop/src/cangjie/SerializerBase.cj @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -16,8 +16,7 @@ package Interop import std.binary.* -import std.math.* -import std.reflect.* +import std.math.* import std.collection.* public enum RuntimeType { @@ -49,6 +48,15 @@ public enum RuntimeType { } } +public class PromiseAndResourceId { + public var promise: Any + public var resourceId: ResourceId + init (promise: Any, resourceId: ResourceId) { + this.promise = promise + this.resourceId = resourceId + } +} + /* Serialization extension point */ public abstract class CustomSerializer { @@ -62,9 +70,9 @@ public abstract class CustomSerializer { } public open class SerializerBase { - protected var isHolding: Bool = false - private var position: Int64 = 0 - private var buffer: ArrayList = ArrayList() + private var position: Int32 = 0 + private var _buffer: pointer + private var _length: Int32 private static var customSerializers: ?CustomSerializer = Option.None static func registerCustomSerializer(serializer: CustomSerializer) { @@ -72,33 +80,54 @@ public open class SerializerBase { } public init() { - this.buffer = ArrayList(Array(96, repeat: UInt8(0))) + let length: Int32 = 96 + this._buffer = InteropNativeModule._Malloc(length) + this._length = length + } + + private static func writeu8(_buffer: pointer, offset: Int32, length: Int32, value: Int32): Unit { + InteropNativeModule._WriteByte(_buffer, Int64(offset), Int64(length), value) } + private static func readu8(_buffer: pointer, offset: Int32, length: Int32): Int32 { + return InteropNativeModule._ReadByte(_buffer, Int64(offset), Int64(length)) + } + public open func release() { - this.isHolding = false - // todo handle release resources + this.releaseResources() this.position = 0 } - public func asArray(): ArrayList { - return this.buffer + private func releaseResources() { + if (this.heldResourcesCount == 0) { + return + } + for (i in 0..this.heldResourcesCount) { + InteropNativeModule._ReleaseCallbackResource(this.heldResources[i]) + } + this.heldResourcesCount = 0 + } + public func asBuffer(): KSerializerBuffer { + this._buffer } public func length(): Int32 { return Int32(this.position) } - public func currentPosition(): Int64 { return this.position } - private func checkCapacity(value: Int64) { + public func currentPosition(): Int32 { return this.position } + private func checkCapacity(value: Int32) { if (value < 1) { throw Exception("${value} is less than 1") } - var buffSize = this.buffer.size + var buffSize = this._length if (this.position > buffSize - value) { - let minSize = this.position + value - let resizedSize = max(minSize, Int64(round(3.0 * Float64(buffSize) / 2.0))) - var resizedBuffer = ArrayList(this.buffer) - while (resizedBuffer.size < resizedSize) { - resizedBuffer.add(0) + let minSize: Int32 = this.position + value + let resizedSize: Int32 = max(minSize, Int32(round(1.5 * Float64(buffSize)))) + let resizedBuffer = InteropNativeModule._Malloc(resizedSize) + let oldBuffer = this._buffer + for (i in 0..this.position) { + SerializerBase.writeu8(resizedBuffer, Int32(i), resizedSize, SerializerBase.readu8(oldBuffer, i, this.position)) } - this.buffer = resizedBuffer + this._buffer = resizedBuffer + this._length = resizedSize + InteropNativeModule._Free(oldBuffer) } } public func writeCustomObject(kind: String, value: Any): Unit { @@ -107,7 +136,19 @@ public open class SerializerBase { println("Unsupported custom serialization for ${kind}, write undefined") this.writeInt8(Tag.UNDEFINED.value) } + private var heldResources: ArrayList = ArrayList() + private var heldResourcesCount: Int64 = 0 + private func addHeldResource(resourceId: ResourceId) { + if (this.heldResourcesCount == this.heldResources.size) { + this.heldResources.add(resourceId) + } + else { + this.heldResources[this.heldResourcesCount] = resourceId + } + this.heldResourcesCount += 1 + } + public func holdAndWriteCallback(callback: Any): ResourceId { let resourceId = ResourceHolder.instance().registerAndHold(callback) this.heldResources.add(resourceId) @@ -128,33 +169,46 @@ public open class SerializerBase { this.writePointer(callSync) return resourceId } + public func holdAndWriteCallbackForPromiseVoid(): PromiseAndResourceId { + return holdAndWriteCallbackForPromiseVoid(0, 0, 0, 0) + } + public func holdAndWriteCallbackForPromiseVoid(hold: KPointer, release: KPointer, call: KPointer, callSync: KPointer): PromiseAndResourceId { + var resourceId: ResourceId = 0 + let promise = { => } + return PromiseAndResourceId(promise, resourceId) + } + public func holdAndWriteCallbackForPromise(): PromiseAndResourceId { + return holdAndWriteCallbackForPromise(0, 0, 0) + } + public func holdAndWriteCallbackForPromise(hold: KPointer, release: KPointer, call: KPointer): PromiseAndResourceId { + var resourceId: ResourceId = 0 + let promise = { => } + return PromiseAndResourceId(promise, resourceId) + } public func writeFunction(value: Any): Unit { // TODO } - private func setBytes(position: Int64, value: T): Unit where T <: LittleEndianOrder{ - var arr = Array(100, repeat: 0) - let n = value.writeLittleEndian(arr) - this.checkCapacity(n) - for (i in 0..n) { - this.buffer[this.position + i] = arr[i] - } - this.position += n - } public func writeTag(tag: Int32): Unit { - this.setBytes(this.position, tag) + this.checkCapacity(1) + SerializerBase.writeu8(this._buffer, this.position, this._length, tag) + this.position++ + } + public func writeTag(tag: Int8): Unit { + this.checkCapacity(1) + SerializerBase.writeu8(this._buffer, this.position, this._length, Int32(tag)) + this.position++ } public func writeNumber(value: ?Float32): Unit { if (let Some(value) <- value) { if(value == Float32(Int32(value))) { this.writeNumber(Int32(value)) } else { - this.setBytes(this.position, Tag.FLOAT32.value) - this.setBytes(this.position, value) + this.writeTag(Tag.FLOAT32.value) + this.writeInt32(Int64(value.toBits())) } } else { - this.buffer[Int64(this.position)] = UInt8(RuntimeType.UNDEFINED.ordinal) - this.position++ + this.writeTag(Tag.UNDEFINED.value) } } public func writeNumber(value: ?Float64): Unit { @@ -162,62 +216,92 @@ public open class SerializerBase { if(value == Float64(Int32(value))) { this.writeNumber(Int32(value)) } else { - this.setBytes(this.position, Tag.FLOAT32.value) - this.setBytes(this.position, Float32(value)) + this.writeTag(Tag.FLOAT32.value) + this.writeInt32(Int64(Float32(value).toBits())) } } else { - this.buffer[Int64(this.position)] = UInt8(RuntimeType.UNDEFINED.ordinal) - this.position++ + this.writeTag(Tag.UNDEFINED.value) } } public func writeNumber(value: ?Int32): Unit { if (let Some(value) <- value) { - this.setBytes(this.position, Tag.INT32.value) - this.setBytes(this.position, value) - } + this.writeTag(Tag.INT32.value) + this.writeInt32(Int32(value)) + } else { - this.buffer[Int64(this.position)] = UInt8(RuntimeType.UNDEFINED.ordinal) - this.position++ + this.writeTag(Tag.UNDEFINED.value) } } public func writeNumber(value: ?Int64): Unit { + this.checkCapacity(5) if (let Some(value) <- value) { - this.setBytes(this.position, Tag.INT32.value) - this.setBytes(this.position, Int32(value)) + this.writeTag(Tag.INT32.value) + this.writeInt32(Int32(value)) } else { - this.buffer[Int64(this.position)] = UInt8(RuntimeType.UNDEFINED.ordinal) - this.position++ + this.writeTag(Tag.UNDEFINED.value) } } public func writeInt8(value: Int8): Unit { - this.setBytes(this.position, value) + this.checkCapacity(1) + SerializerBase.writeu8(this._buffer, this.position, this._length, Int32(value)) + this.position += 1 } public func writeInt8(value: Int32): Unit { - this.setBytes(this.position, Int8(value)) + this.checkCapacity(1) + SerializerBase.writeu8(this._buffer, this.position, this._length, Int32(value)) + this.position += 1 } public func writeInt32(value: Int32): Unit { - this.setBytes(this.position, Int32(value)) + this.checkCapacity(4) + let arr = Array(4, repeat: 0) + value.writeLittleEndian(arr) + for (idx in 0..4) { + SerializerBase.writeu8(this._buffer, this.position + Int32(idx), this._length, Int32(arr[idx])) + } + this.position += 4 + } + public func writeInt32(value: Int64): Unit { + this.checkCapacity(4) + let arr = Array(4, repeat: 0) + Int32(value).writeLittleEndian(arr) + for (idx in 0..4) { + SerializerBase.writeu8(this._buffer, this.position + Int32(idx), this._length, Int32(arr[idx])) + } + this.position += 4 } public func writeInt64(value: Int64): Unit { - this.setBytes(this.position, Int64(value)) + this.checkCapacity(8) + let arr = Array(8, repeat: 0) + value.writeLittleEndian(arr) + for (idx in 0..8) { + SerializerBase.writeu8(this._buffer, this.position + Int32(idx), this._length, Int32(arr[idx])) + } + this.position += 8 } public func writeFloat32(value: Float32): Unit { - this.setBytes(this.position, value) + this.checkCapacity(4) + this.position += 4 } public func writePointer(ptr: UInt64): Unit { - this.setBytes(this.position, ptr) + this.checkCapacity(8) + let arr = Array(8, repeat: 0) + ptr.writeLittleEndian(arr) + for (idx in 0..8) { + SerializerBase.writeu8(this._buffer, this.position + Int32(idx), this._length, Int32(arr[idx])) + } + this.position += 8 } public func writeBoolean(value: ?Bool): Unit { this.checkCapacity(1) if(let Some(value) <- value) { - this.setBytes(this.position, value) + SerializerBase.writeu8(this._buffer, this.position, this._length, if (value) {1} else {0}) } else { - this.buffer[Int64(this.position)] = UInt8(RuntimeType.UNDEFINED.ordinal) - this.position++ + SerializerBase.writeu8(this._buffer, this.position, this._length, RuntimeType.UNDEFINED.ordinal) } + this.position++ } public func writeMaterialized(value: Object): Unit { // TODO @@ -228,21 +312,30 @@ public open class SerializerBase { this.writePointer(resource.release) } public func writeString(value: String): Unit { - this.checkCapacity(4 + value.size * 4 + 1) // length, data - this.writeInt32(Int32(value.size + 1)) - for (i in 0..value.size) { - this.setBytes(this.position, value[i]) - } - this.writeInt8(Int8(0)) - } - public func writeBuffer(buffer: Array) { - let resourceId = ResourceHolder.instance().registerAndHold(buffer) - this.writeCallbackResource(CallbackResource(resourceId, 0, 0)) - unsafe { - let ptr = acquireArrayRawData(buffer).pointer - this.writePointer(UInt64(ptr.toUIntNative())) - this.writeInt64(buffer.size) - } + this.checkCapacity(Int32(4 + value.size * 4 + 1)) // length, data + let encodedLength = InteropNativeModule._ManagedStringWrite(value, this.asBuffer(), this.position + 4) + this.writeInt32(encodedLength) + this.position += encodedLength + } + public func writeBuffer(_buffer: Array) { + // let resourceId = ResourceHolder.instance().registerAndHold(_buffer) + // this.writeCallbackResource(CallbackResource(resourceId, 0, 0)) + // unsafe { + // let ptr = acquireArrayRawData(_buffer).pointer + // this.writePointer(UInt64(ptr.toUIntNative())) + // this.writeInt64(_buffer.size) + // } + } + public func holdAndWriteObject(obj: Any): ResourceId { + return this.holdAndWriteObject(obj, 0, 0) + } + public func holdAndWriteObject(obj: Any, hold: pointer, release: pointer): ResourceId { + let resourceId = ResourceHolder.instance().registerAndHold(obj) + this.addHeldResource(resourceId) + this.writeInt32(resourceId) + this.writePointer(hold) + this.writePointer(release) + return resourceId } } diff --git a/koala-wrapper/koalaui/interop/src/cangjie/Tag.cj b/koala-wrapper/koalaui/interop/src/cangjie/Tag.cj index 621a1fd57..8c5cc317f 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/Tag.cj +++ b/koala-wrapper/koalaui/interop/src/cangjie/Tag.cj @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cangjie/cjpm.toml b/koala-wrapper/koalaui/interop/src/cangjie/cjpm.toml index d29229886..54130b377 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/cjpm.toml +++ b/koala-wrapper/koalaui/interop/src/cangjie/cjpm.toml @@ -1,3 +1,16 @@ +# Copyright (c) 2024 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [dependencies] [package] cjc-version = "0.56.4" diff --git a/koala-wrapper/koalaui/interop/src/cpp/DeserializerBase.h b/koala-wrapper/koalaui/interop/src/cpp/DeserializerBase.h index e09c40524..55e6c54cb 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/DeserializerBase.h +++ b/koala-wrapper/koalaui/interop/src/cpp/DeserializerBase.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -16,7 +16,6 @@ #define _DESERIALIZER_BASE_H_ #include -#include #include #include #include @@ -24,6 +23,7 @@ #include "interop-types.h" #include "interop-logging.h" +#include "koala-types.h" void holdManagedCallbackResource(InteropInt32); void releaseManagedCallbackResource(InteropInt32); @@ -173,6 +173,12 @@ inline void WriteToString(std::string *result, InteropNativePointer value) result->append("0x" + std::to_string((uint64_t)value)); } +template <> +inline void WriteToString(std::string *result, const InteropNativePointer* value) +{ + result->append("0x" + std::to_string((uint64_t)(*value))); +} + template <> inline void WriteToString(std::string *result, InteropNodeHandle value) { @@ -199,7 +205,11 @@ template <> inline void WriteToString(std::string *result, const InteropMaterialized *value) { char hex[20]; - std::snprintf(hex, sizeof(hex), "0x%llx", (long long)value->ptr); + #ifdef __STDC_LIB_EXT1__ + std::snprintf_s(hex, sizeof(hex), "0x%llx", (long long)value->ptr); + #else + std::snprintf(hex, sizeof(hex), "0x%llx", (long long)value->ptr); + #endif result->append("\""); result->append("Materialized "); result->append(hex); @@ -252,6 +262,19 @@ inline void WriteToString(std::string *result, const InteropCustomObject *value) result->append(value->kind); result->append("\"}"); } +template <> +inline void WriteToString(std::string *result, const InteropObject *value) +{ + result->append("{"); + result->append(".resource="); + WriteToString(result, &(value->resource)); + result->append("}"); +} +template <> +inline void WriteToString(std::string *result, const InteropObject value) +{ + WriteToString(result, &value); +} struct CustomDeserializer { @@ -277,7 +300,10 @@ protected: static CustomDeserializer *customDeserializers; public: - DeserializerBase(uint8_t *data, int32_t length) + DeserializerBase(KSerializerBuffer data, int32_t length) + : data(reinterpret_cast(data)), length(length), position(0) {} + + DeserializerBase(uint8_t* data, int32_t length) : data(data), length(length), position(0) {} ~DeserializerBase() @@ -310,7 +336,11 @@ public: if (length > 0) { value = malloc(length * sizeof(E)); - memset(value, 0, length * sizeof(E)); + #ifdef __STDC_LIB_EXT1__ + memset_s(value, length * sizeof(E), 0, length * sizeof(E)); + #else + memset(value, 0, length * sizeof(E)); + #endif toClean.push_back(value); } array->length = length; @@ -325,11 +355,19 @@ public: if (length > 0) { keys = malloc(length * sizeof(K)); - memset(keys, 0, length * sizeof(K)); + #ifdef __STDC_LIB_EXT1__ + memset_s(keys, length * sizeof(K), 0, length * sizeof(K)); + #else + memset(keys, 0, length * sizeof(K)); + #endif toClean.push_back(keys); values = malloc(length * sizeof(V)); - memset(values, 0, length * sizeof(V)); + #ifdef __STDC_LIB_EXT1__ + memset_s(values, length * sizeof(V), 0, length * sizeof(V)); + #else + memset(values, 0, length * sizeof(V)); + #endif toClean.push_back(values); } map->size = length; @@ -343,7 +381,7 @@ public: { if (position + count > length) { fprintf(stderr, "Incorrect serialized data, check for %d, buffer %d position %d\n", count, length, position); - assert(false); + ASSERT(false); abort(); } } @@ -375,6 +413,12 @@ public: return result; } + InteropObject readObject() { + InteropObject obj; + obj.resource = readCallbackResource(); + return obj; + } + int8_t readInt8() { check(1); @@ -398,7 +442,11 @@ public: check(4); #ifdef KOALA_NO_UNALIGNED_ACCESS InteropInt32 value; - memcpy(&value, data + position, 4); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(&value, 4, data + position, 4); + #else + memcpy(&value, data + position, 4); + #endif #else auto value = *(InteropInt32 *)(data + position); #endif @@ -410,7 +458,11 @@ public: check(8); #ifdef KOALA_NO_UNALIGNED_ACCESS InteropInt64 value; - memcpy(&value, data + position, 4); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(&value, 4, data + position, 4); + #else + memcpy(&value, data + position, 4); + #endif #else auto value = *(InteropInt64 *)(data + position); #endif @@ -422,7 +474,11 @@ public: check(8); #ifdef KOALA_NO_UNALIGNED_ACCESS InteropInt64 value; - memcpy(&value, data + position, 4); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(&value, 4, data + position, 4); + #else + memcpy(&value, data + position, 4); + #endif #else auto value = *(InteropUInt64 *)(data + position); #endif @@ -434,7 +490,11 @@ public: check(4); #ifdef KOALA_NO_UNALIGNED_ACCESS InteropFloat32 value; - memcpy(&value, data + position, 4); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(&value, 4, data + position, 4); + #else + memcpy(&value, data + position, 4); + #endif #else auto value = *(InteropFloat32 *)(data + position); #endif @@ -446,12 +506,16 @@ public: check(8); #ifdef KOALA_NO_UNALIGNED_ACCESS int64_t value = 0; - memcpy(&value, data + position, 8); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(&value, 8, data + position, 8); + #else + memcpy(&value, data + position, 8); + #endif #else int64_t value = *(int64_t *)(data + position); #endif position += 8; - return reinterpret_cast(value); + return reinterpret_cast(static_cast(value)); } InteropNativePointer readPointerOrDefault(InteropNativePointer defaultValue) { @@ -564,6 +628,11 @@ inline void WriteToString(std::string *result, const InteropInt32* value) result->append(std::to_string(*value)); } template <> +inline void WriteToString(std::string *result, InteropUInt64 value) +{ + result->append(std::to_string(value)); +} +template <> inline void WriteToString(std::string *result, InteropInt64 value) { result->append(std::to_string(value)); @@ -579,7 +648,11 @@ inline void WriteToString(std::string *result, InteropFloat32 value) #if (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED < 130300L)) // to_chars() is not available on older macOS. char buf[20]; - snprintf(buf, sizeof buf, "%f", value); + #ifdef __STDC_LIB_EXT1__ + snprintf_s(buf, sizeof buf, "%f", value); + #else + snprintf(buf, sizeof buf, "%f", value); + #endif result->append(buf); #else std::string storage; diff --git a/koala-wrapper/koalaui/interop/src/cpp/SerializerBase.h b/koala-wrapper/koalaui/interop/src/cpp/SerializerBase.h index f6cce0fae..019dbd727 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/SerializerBase.h +++ b/koala-wrapper/koalaui/interop/src/cpp/SerializerBase.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,13 +21,13 @@ #include #include #include -#include #include #include #include "callback-resource.h" #include "interop-types.h" #include "koala-types.h" +#include "interop-logging.h" #ifdef __arm__ #define KOALA_NO_UNALIGNED_ACCESS 1 @@ -55,7 +55,7 @@ T* allocArray(const std::array& ref) { std::size_t space = sizeof(buffer) - offset; void* ptr = buffer + offset; void* aligned_ptr = std::align(alignof(T), sizeof(T) * size, ptr, space); - assert(aligned_ptr != nullptr && "Insufficient space or alignment failed!"); + ASSERT(aligned_ptr != nullptr && "Insufficient space or alignment failed!"); offset = (char*)aligned_ptr + sizeof(T) * size - buffer; T* array = reinterpret_cast(aligned_ptr); for (size_t i = 0; i < size; ++i) { @@ -72,8 +72,8 @@ private: bool ownData; CallbackResourceHolder* resourceHolder; void resize(uint32_t newLength) { - assert(ownData); - assert(newLength > dataLength); + ASSERT(ownData); + ASSERT(newLength > dataLength); auto* newData = reinterpret_cast(malloc(newLength)); memcpy(newData, data, position); free(data); @@ -90,6 +90,10 @@ public: data(data), dataLength(dataLength), position(0), ownData(false), resourceHolder(resourceHolder) { } + SerializerBase(KSerializerBuffer data, uint32_t dataLength, CallbackResourceHolder* resourceHolder = nullptr): + data(reinterpret_cast(data)), dataLength(dataLength), position(0), ownData(false), resourceHolder(resourceHolder) { + } + virtual ~SerializerBase() { if (ownData) { free(data); @@ -110,10 +114,9 @@ public: inline void check(int more) { if (position + more > dataLength) { if (ownData) { - resize(dataLength * 3 / 2 + 2); + resize((position + more) * 3 / 2 + 2); } else { - fprintf(stderr, "Buffer overrun: %d > %d\n", position + more, dataLength); - assert(false); + INTEROP_FATAL("Buffer overrun: %d > %d\n", position + more, dataLength); } } } @@ -127,7 +130,11 @@ public: void writeInt32(InteropInt32 value) { check(4); #ifdef KOALA_NO_UNALIGNED_ACCESS - memcpy(data + position, &value, 4); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(data + position, dataLength, &value, 4); + #else + memcpy(data + position, &value, 4); + #endif #else *((InteropInt32*)(data + position)) = value; #endif @@ -137,7 +144,11 @@ public: void writeInt64(InteropInt64 value) { check(8); #ifdef KOALA_NO_UNALIGNED_ACCESS - memcpy(data + position, &value, 8); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(data + position, dataLength, &value, 8); + #else + memcpy(data + position, &value, 8); + #endif #else *((InteropInt64*)(data + position)) = value; #endif @@ -147,7 +158,11 @@ public: void writeUInt64(InteropUInt64 value) { check(8); #ifdef KOALA_NO_UNALIGNED_ACCESS - memcpy(data + position, &value, 8); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(data + position, dataLength, &value, 8); + #else + memcpy(data + position, &value, 8); + #endif #else *((InteropUInt64*)(data + position)) = value; #endif @@ -155,9 +170,13 @@ public: } void writeFloat32(InteropFloat32 value) { - check(8); + check(4); #ifdef KOALA_NO_UNALIGNED_ACCESS - memcpy(data + position, &value, 4); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(data + position, dataLength, &value, 4); + #else + memcpy(data + position, &value, 4); + #endif #else *((InteropFloat32*)(data + position)) = value; #endif @@ -166,10 +185,15 @@ public: void writePointer(InteropNativePointer value) { check(8); + int64_t value64 = static_cast(reinterpret_cast(value)); #ifdef KOALA_NO_UNALIGNED_ACCESS - memcpy(data + position, &value, 8); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(data + position, dataLength, &value64, 8); + #else + memcpy(data + position, &value64, 8); + #endif #else - *((int64_t*)(data + position)) = reinterpret_cast(value); + *((int64_t*)(data + position)) = value64; #endif position += 8; } @@ -221,7 +245,11 @@ public: case 3: suffix = "%"; break; case 4: suffix = "lpx"; break; } - snprintf(buf, 64, "%.8f%s", value.value, suffix.c_str()); + #ifdef __STDC_LIB_EXT1__ + snprintf_s(buf, 64, "%.8f%s", value.value, suffix.c_str()); + #else + snprintf(buf, 64, "%.8f%s", value.value, suffix.c_str()); + #endif InteropString str = { buf, (InteropInt32) strlen(buf) }; writeString(str); break; @@ -240,6 +268,10 @@ public: } } + void writeObject(InteropObject any) { + writeCallbackResource(any.resource); + } + void writeCustomObject(std::string type, InteropCustomObject value) { // TODO implement } diff --git a/koala-wrapper/koalaui/interop/src/cpp/ani/ani.h b/koala-wrapper/koalaui/interop/src/cpp/ani/ani.h index 3adbe2416..d31a8de28 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/ani/ani.h +++ b/koala-wrapper/koalaui/interop/src/cpp/ani/ani.h @@ -32,11 +32,23 @@ #define ANI_FALSE 0 #define ANI_TRUE 1 +// Logger interface: +// typedef void (*ani_logger)(FILE *stream, int log_level, const char *component, const char *message); +// ani_option: +// 'option': "--logger" +// 'extra': ani_logger +// where 'log_level' can have the following values: +#define ANI_LOGLEVEL_FATAL 0 +#define ANI_LOGLEVEL_ERROR 1 +#define ANI_LOGLEVEL_WARNING 2 +#define ANI_LOGLEVEL_INFO 3 +#define ANI_LOGLEVEL_DEBUG 4 + typedef size_t ani_size; // Primitive types: typedef uint8_t ani_boolean; -typedef uint32_t ani_char; +typedef uint16_t ani_char; typedef int8_t ani_byte; typedef int16_t ani_short; typedef int32_t ani_int; @@ -46,90 +58,129 @@ typedef double ani_double; // Reference types: #ifdef __cplusplus -class __ani_ref {}; -class __ani_module : public __ani_ref {}; -class __ani_namespace : public __ani_ref {}; -class __ani_object : public __ani_ref {}; -class __ani_fn_object : public __ani_object {}; -class __ani_enum_value : public __ani_object {}; -class __ani_error : public __ani_object {}; -class __ani_promise : public __ani_object {}; -class __ani_tuple_value : public __ani_object {}; -class __ani_type : public __ani_object {}; -class __ani_arraybuffer : public __ani_object {}; -class __ani_string : public __ani_object {}; -class __ani_stringliteral : public __ani_string {}; -class __ani_class : public __ani_type {}; -class __ani_enum : public __ani_type {}; -class __ani_tuple : public __ani_type {}; -class __ani_fixedarray : public __ani_object {}; -class __ani_fixedarray_boolean : public __ani_fixedarray {}; -class __ani_fixedarray_char : public __ani_fixedarray {}; -class __ani_fixedarray_byte : public __ani_fixedarray {}; -class __ani_fixedarray_short : public __ani_fixedarray {}; -class __ani_fixedarray_int : public __ani_fixedarray {}; -class __ani_fixedarray_long : public __ani_fixedarray {}; -class __ani_fixedarray_float : public __ani_fixedarray {}; -class __ani_fixedarray_double : public __ani_fixedarray {}; -class __ani_fixedarray_ref : public __ani_fixedarray {}; +class __ani_ref +{ +}; +class __ani_module : public __ani_ref +{ +}; +class __ani_namespace : public __ani_ref +{ +}; +class __ani_object : public __ani_ref +{ +}; +class __ani_fn_object : public __ani_object +{ +}; +class __ani_enum_item : public __ani_object +{ +}; +class __ani_error : public __ani_object +{ +}; +class __ani_tuple_value : public __ani_object +{ +}; +class __ani_type : public __ani_object +{ +}; +class __ani_arraybuffer : public __ani_object +{ +}; +class __ani_string : public __ani_object +{ +}; +class __ani_class : public __ani_type +{ +}; +class __ani_enum : public __ani_type +{ +}; +class __ani_union : public __ani_type +{ +}; +class __ani_array : public __ani_object +{ +}; +class __ani_array_boolean : public __ani_array +{ +}; +class __ani_array_char : public __ani_array +{ +}; +class __ani_array_byte : public __ani_array +{ +}; +class __ani_array_short : public __ani_array +{ +}; +class __ani_array_int : public __ani_array +{ +}; +class __ani_array_long : public __ani_array +{ +}; +class __ani_array_float : public __ani_array +{ +}; +class __ani_array_double : public __ani_array +{ +}; +class __ani_array_ref : public __ani_array +{ +}; typedef __ani_ref *ani_ref; typedef __ani_module *ani_module; typedef __ani_namespace *ani_namespace; typedef __ani_object *ani_object; typedef __ani_fn_object *ani_fn_object; -typedef __ani_enum_value *ani_enum_value; +typedef __ani_enum_item *ani_enum_item; typedef __ani_error *ani_error; -typedef __ani_promise *ani_promise; typedef __ani_tuple_value *ani_tuple_value; typedef __ani_type *ani_type; typedef __ani_arraybuffer *ani_arraybuffer; typedef __ani_string *ani_string; -typedef __ani_stringliteral *ani_stringliteral; typedef __ani_class *ani_class; typedef __ani_enum *ani_enum; -typedef __ani_tuple *ani_tuple; -typedef __ani_fixedarray *ani_fixedarray; -typedef __ani_fixedarray_boolean *ani_fixedarray_boolean; -typedef __ani_fixedarray_char *ani_fixedarray_char; -typedef __ani_fixedarray_byte *ani_fixedarray_byte; -typedef __ani_fixedarray_short *ani_fixedarray_short; -typedef __ani_fixedarray_int *ani_fixedarray_int; -typedef __ani_fixedarray_long *ani_fixedarray_long; -typedef __ani_fixedarray_float *ani_fixedarray_float; -typedef __ani_fixedarray_double *ani_fixedarray_double; -typedef __ani_fixedarray_ref *ani_fixedarray_ref; -#else // __cplusplus +typedef __ani_union *ani_union; +typedef __ani_array *ani_array; +typedef __ani_array_boolean *ani_array_boolean; +typedef __ani_array_char *ani_array_char; +typedef __ani_array_byte *ani_array_byte; +typedef __ani_array_short *ani_array_short; +typedef __ani_array_int *ani_array_int; +typedef __ani_array_long *ani_array_long; +typedef __ani_array_float *ani_array_float; +typedef __ani_array_double *ani_array_double; +typedef __ani_array_ref *ani_array_ref; +#else // __cplusplus struct __ani_ref; typedef struct __ani_ref *ani_ref; typedef ani_ref ani_module; typedef ani_ref ani_namespace; typedef ani_ref ani_object; typedef ani_object ani_fn_object; -typedef ani_object ani_enum_value; +typedef ani_object ani_enum_item; typedef ani_object ani_error; -typedef ani_object ani_promise; typedef ani_object ani_tuple_value; typedef ani_object ani_type; typedef ani_object ani_arraybuffer; typedef ani_object ani_string; -typedef ani_string ani_stringliteral; typedef ani_type ani_class; typedef ani_type ani_enum; -typedef ani_type ani_tuple; -typedef ani_object ani_fixedarray; -typedef ani_fixedarray ani_fixedarray_boolean; -typedef ani_fixedarray ani_fixedarray_char; -typedef ani_fixedarray ani_fixedarray_byte; -typedef ani_fixedarray ani_fixedarray_short; -typedef ani_fixedarray ani_fixedarray_int; -typedef ani_fixedarray ani_fixedarray_long; -typedef ani_fixedarray ani_fixedarray_float; -typedef ani_fixedarray ani_fixedarray_double; -typedef ani_fixedarray ani_fixedarray_ref; -#endif // __cplusplus - -struct __ani_gref; -typedef struct __ani_gref *ani_gref; +typedef ani_type ani_union; +typedef ani_object ani_array; +typedef ani_array ani_array_boolean; +typedef ani_array ani_array_char; +typedef ani_array ani_array_byte; +typedef ani_array ani_array_short; +typedef ani_array ani_array_int; +typedef ani_array ani_array_long; +typedef ani_array ani_array_float; +typedef ani_array ani_array_double; +typedef ani_array ani_array_ref; +#endif // __cplusplus struct __ani_wref; typedef struct __ani_wref *ani_wref; @@ -146,32 +197,17 @@ typedef struct __ani_field *ani_field; struct __ani_static_field; typedef struct __ani_satic_field *ani_static_field; -struct __ani_property; -typedef struct __ani_property *ani_property; - struct __ani_method; typedef struct __ani_method *ani_method; struct __ani_static_method; typedef struct __ani_static_method *ani_static_method; -struct __ani_cls_slot; -typedef struct __ani_cls_slot *ani_cls_slot; +struct __ani_resolver; +typedef struct __ani_resolver *ani_resolver; typedef void (*ani_finalizer)(void *data, void *hint); -typedef enum { - ANI_KIND_BOOLEAN, - ANI_KIND_CHAR, - ANI_KIND_BYTE, - ANI_KIND_SHORT, - ANI_KIND_INT, - ANI_KIND_LONG, - ANI_KIND_FLOAT, - ANI_KIND_DOUBLE, - ANI_KIND_REF, -} ani_kind; - typedef union { ani_boolean z; ani_char c; @@ -204,6 +240,7 @@ typedef enum { ANI_INVALID_ARGS, ANI_INVALID_TYPE, ANI_INVALID_DESCRIPTOR, + ANI_INCORRECT_REF, ANI_PENDING_ERROR, ANI_NOT_FOUND, ANI_ALREADY_BINDED, @@ -211,9 +248,21 @@ typedef enum { ANI_OUT_OF_MEMORY, ANI_OUT_OF_RANGE, ANI_BUFFER_TO_SMALL, + ANI_INVALID_VERSION, + ANI_AMBIGUOUS, // NOTE: Add necessary status codes } ani_status; +typedef struct { + const char *option; + void *extra; +} ani_option; + +typedef struct { + size_t nr_options; + const ani_option *options; +} ani_options; + struct __ani_vm_api { void *reserved0; void *reserved1; @@ -222,27 +271,22 @@ struct __ani_vm_api { ani_status (*DestroyVM)(ani_vm *vm); ani_status (*GetEnv)(ani_vm *vm, uint32_t version, ani_env **result); - ani_status (*AttachThread)(ani_vm *vm, void *params, ani_env **result); - ani_status (*DetachThread)(ani_vm *vm); + ani_status (*AttachCurrentThread)(ani_vm *vm, const ani_options *options, uint32_t version, ani_env **result); + ani_status (*DetachCurrentThread)(ani_vm *vm); }; -typedef struct { - const char *option; - void *option_data; -} ani_vm_option; - #define ANI_EXPORT __attribute__((visibility("default"))) #ifdef __cplusplus extern "C" { #endif -ANI_EXPORT ani_status ANI_CreateVM(uint32_t version, size_t nr_options, const ani_vm_option *options, ani_vm **result); -ANI_EXPORT ani_status ANI_GetCreatedVMs(ani_vm **vms_buffer, ani_size vms_buffer_length, ani_size *result); + ANI_EXPORT ani_status ANI_CreateVM(const ani_options *options, uint32_t version, ani_vm **result); + ANI_EXPORT ani_status ANI_GetCreatedVMs(ani_vm **vms_buffer, ani_size vms_buffer_length, ani_size *result); -// Prototypes of exported functions for a shared library. -ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result); -ANI_EXPORT ani_status ANI_Destructor(ani_vm *vm); + // Prototypes of exported functions for a shared library. + ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result); + ANI_EXPORT ani_status ANI_Destructor(ani_vm *vm); #ifdef __cplusplus } @@ -276,210 +320,6 @@ struct __ani_interaction_api { */ ani_status (*GetVM)(ani_env *env, ani_vm **result); - /** - * @brief Checks if a reference is an object. - * - * This function determines whether the specified reference represents an object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the boolean result (true if the reference is an object, false otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsObject)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a functional object. - * - * This function determines whether the specified reference represents a functional object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the boolean result (true if the reference is a functional object, false - * otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsFunctionalObject)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is an enum. - * - * This function determines whether the specified reference represents an enum. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the boolean result (true if the reference is an enum, false otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsEnum)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a tuple. - * - * This function determines whether the specified reference represents a tuple. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the boolean result (true if the reference is a tuple, false otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsTuple)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a string. - * - * This function determines whether the specified reference represents a string. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the boolean result (true if the reference is a string, false otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsString)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a string literal. - * - * This function determines whether the specified reference represents a string literal. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the boolean result (true if the reference is a string literal, false - * otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsStringLiteral)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a fixed array. - * - * This function determines whether the specified reference represents a fixed array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the boolean result (true if the reference is a fixed array, false - * otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsFixedArray)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a fixed array of booleans. - * - * This function determines whether the specified reference represents a fixed array of booleans. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the boolean result (true if the reference is a fixed array of booleans, - * false otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsFixedArray_Boolean)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a fixed array of chars. - * - * This function determines whether the specified reference represents a fixed array of chars. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the char result (true if the reference is a fixed array of chars, false - * otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsFixedArray_Char)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a fixed array of bytes. - * - * This function determines whether the specified reference represents a fixed array of bytes. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the byte result (true if the reference is a fixed array of bytes, false - * otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsFixedArray_Byte)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a fixed array of shorts. - * - * This function determines whether the specified reference represents a fixed array of shorts. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the short result (true if the reference is a fixed array of shorts, false - * otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsFixedArray_Short)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a fixed array of integers. - * - * This function determines whether the specified reference represents a fixed array of integers. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the integer result (true if the reference is a fixed array of integers, - * false otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsFixedArray_Int)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a fixed array of longs. - * - * This function determines whether the specified reference represents a fixed array of longs. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the long result (true if the reference is a fixed array of longs, false - * otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsFixedArray_Long)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a fixed array of floats. - * - * This function determines whether the specified reference represents a fixed array of floats. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the float result (true if the reference is a fixed array of floats, false - * otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsFixedArray_Float)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a fixed array of doubles. - * - * This function determines whether the specified reference represents a fixed array of doubles. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the double result (true if the reference is a fixed array of doubles, false - * otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsFixedArray_Double)(ani_env *env, ani_ref ref, ani_boolean *result); - - /** - * @brief Checks if a reference is a fixed array of references. - * - * This function determines whether the specified reference represents a fixed array of references. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The reference to check. - * @param[out] result A pointer to store the boolean result (true if the reference is a fixed array of references, - * false otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reference_IsFixedArray_Ref)(ani_env *env, ani_ref ref, ani_boolean *result); - /** * @brief Creates a new object of a specified class using a constructor method. * @@ -552,19 +392,6 @@ struct __ani_interaction_api { */ ani_status (*Object_InstanceOf)(ani_env *env, ani_object object, ani_type type, ani_boolean *result); - /** - * @brief Checks if two objects are the same. - * - * This function compares two objects to determine if they refer to the same instance. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object1 The first object to compare. - * @param[in] object2 The second object to compare. - * @param[out] result A pointer to store the boolean result (true if the objects are the same, false otherwise). - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_IsSame)(ani_env *env, ani_object object1, ani_object object2, ani_boolean *result); - /** * @brief Retrieves the superclass of a specified type. * @@ -638,42 +465,6 @@ struct __ani_interaction_api { */ ani_status (*FindEnum)(ani_env *env, const char *enum_descriptor, ani_enum *result); - /** - * @brief Finds a tuple by its descriptor. - * - * This function locates a tuple based on its descriptor and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple_descriptor The descriptor of the tuple to find. - * @param[out] result A pointer to the tuple to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*FindTuple)(ani_env *env, const char *tuple_descriptor, ani_tuple *result); - - /** - * @brief Finds a function by its descriptor. - * - * This function locates a function based on its descriptor and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] function_descriptor The descriptor of the function to find. - * @param[out] result A pointer to the function to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*FindFunction)(ani_env *env, const char *function_descriptor, ani_function *result); - - /** - * @brief Finds a variable by its descriptor. - * - * This function locates a variable based on its descriptor and stores it in the result parameter. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable_descriptor The descriptor of the variable to find. - * @param[out] result A pointer to the variable to be populated. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*FindVariable)(ani_env *env, const char *variable_descriptor, ani_variable *result); - /** * @brief Finds a namespace within a module by its descriptor. * @@ -721,8 +512,8 @@ struct __ani_interaction_api { * * @param[in] env A pointer to the environment structure. * @param[in] module The module to search within. - * @param[in] name The name of the function to retrieve. - * @param[in] signature The signature of the function to retrieve. + * @param[in] name The name of the function to find. + * @param[in] signature The signature of the function to find. * @param[out] result A pointer to the function object. * @return Returns a status code of type `ani_status` indicating success or failure. */ @@ -730,18 +521,17 @@ struct __ani_interaction_api { ani_function *result); /** - * @brief Finds a variable within a module by its descriptor. + * @brief Finds a variable within a module by its name. * - * This function locates a variable within the specified module based on its descriptor. + * This function locates a variable within the specified module based on its name. * * @param[in] env A pointer to the environment structure. * @param[in] module The module to search within. - * @param[in] variable_descriptor The descriptor of the variable to find. + * @param[in] name The name of the variable to find. * @param[out] result A pointer to the variable object. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Module_FindVariable)(ani_env *env, ani_module module, const char *variable_descriptor, - ani_variable *result); + ani_status (*Module_FindVariable)(ani_env *env, ani_module module, const char *name, ani_variable *result); /** * @brief Finds a namespace within another namespace by its descriptor. @@ -790,8 +580,8 @@ struct __ani_interaction_api { * * @param[in] env A pointer to the environment structure. * @param[in] ns The namespace to search within. - * @param[in] name The name of the function to retrieve. - * @param[in] signature The signature of the function to retrieve. + * @param[in] name The name of the function to find. + * @param[in] signature The signature of the function to find. * @param[out] result A pointer to the function object. * @return Returns a status code of type `ani_status` indicating success or failure. */ @@ -799,18 +589,17 @@ struct __ani_interaction_api { ani_function *result); /** - * @brief Finds a variable within a namespace by its descriptor. + * @brief Finds a variable within a namespace by its name. * - * This function locates a variable within the specified namespace based on its descriptor. + * This function locates a variable within the specified namespace based on its name. * * @param[in] env A pointer to the environment structure. * @param[in] ns The namespace to search within. - * @param[in] variable_descriptor The descriptor of the variable to find. + * @param[in] name The name of the variable to find. * @param[out] result A pointer to the variable object. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Namespace_FindVariable)(ani_env *env, ani_namespace ns, const char *variable_descriptor, - ani_variable *result); + ani_status (*Namespace_FindVariable)(ani_env *env, ani_namespace ns, const char *name, ani_variable *result); /** * @brief Binds native functions to a module. @@ -972,7 +761,7 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*DescribeError)(ani_env *env); // NOTE: Print stacktrace for debugging? + ani_status (*DescribeError)(ani_env *env); // NOTE: Print stacktrace for debugging? /** * @brief Aborts execution with a message. @@ -1106,160 +895,16 @@ struct __ani_interaction_api { * @param[out] result A pointer to store the number of code units written. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*String_GetUTF16)(ani_env *env, ani_string string, uint16_t *utf16_buffer, ani_size utf16_buffer_size, - ani_size *result); - - /** - * @brief Retrieves a substring of a UTF-16 string. - * - * This function copies a portion of the UTF-16 string into the provided buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The string to retrieve data from. - * @param[in] substr_offset The starting offset of the substring. - * @param[in] substr_size The size of the substring in code units. - * @param[out] utf16_buffer A buffer to store the substring. - * @param[in] utf16_buffer_size The size of the buffer in code units. - * @param[out] result A pointer to store the number of code units written. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_GetUTF16SubString)(ani_env *env, ani_string string, ani_size substr_offset, - ani_size substr_size, uint16_t *utf16_buffer, ani_size utf16_buffer_size, - ani_size *result); - - /** - * @brief Creates a new UTF-8 string. - * - * This function creates a new string from the provided UTF-8 encoded data. - * - * @param[in] env A pointer to the environment structure. - * @param[in] utf8_string A pointer to the UTF-8 encoded string data. - * @param[in] utf8_size The size of the UTF-8 string in bytes. - * @param[out] result A pointer to store the created string. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_NewUTF8)(ani_env *env, const char *utf8_string, ani_size utf8_size, ani_string *result); - - /** - * @brief Retrieves the size of a UTF-8 string. - * - * This function retrieves the size (in bytes) of the specified UTF-8 string. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The UTF-8 string to measure. - * @param[out] result A pointer to store the size of the string. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_GetUTF8Size)(ani_env *env, ani_string string, ani_size *result); - - /** - * @brief Retrieves the UTF-8 encoded data of a string. - * - * This function copies the UTF-8 encoded data of the string into the provided buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The string to retrieve data from. - * @param[out] utf8_buffer A buffer to store the UTF-8 encoded data. - * @param[in] utf8_buffer_size The size of the buffer in bytes. - * @param[out] result A pointer to store the number of bytes written. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_GetUTF8)(ani_env *env, ani_string string, char *utf8_buffer, ani_size utf8_buffer_size, - ani_size *result); - - /** - * @brief Retrieves a substring of a UTF-8 string. - * - * This function copies a portion of the UTF-8 string into the provided buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The string to retrieve data from. - * @param[in] substr_offset The starting offset of the substring. - * @param[in] substr_size The size of the substring in bytes. - * @param[out] utf8_buffer A buffer to store the substring. - * @param[in] utf8_buffer_size The size of the buffer in bytes. - * @param[out] result A pointer to store the number of bytes written. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_GetUTF8SubString)(ani_env *env, ani_string string, ani_size substr_offset, ani_size substr_size, - char *utf8_buffer, ani_size utf8_buffer_size, ani_size *result); - - /** - * @brief Retrieves critical information about a string. - * - * This function retrieves the type and data of a string for critical operations. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The string to analyze. - * @param[out] result_string_type A pointer to store the type of the string (e.g., UTF-16 or UTF-8). - * @param[out] result_data A pointer to the raw string data. - * @param[out] result_size A pointer to the size of the string data. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_GetCritical)(ani_env *env, ani_string string, uint32_t *result_string_type, - const void **result_data, - ani_size *result_size); // result_string_type - string type utf16/utf8, etc? - - /** - * @brief Releases critical string data. - * - * This function releases the raw string data retrieved using `String_GetCritical`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The string whose data was retrieved. - * @param[in] data A pointer to the raw data to release. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*String_ReleaseCritical)(ani_env *env, ani_string string, const void *data); - - /** - * @brief Creates a new UTF-16 string literal. - * - * This function creates a new string literal from the provided UTF-16 encoded data. - * - * @param[in] env A pointer to the environment structure. - * @param[in] utf16_string A pointer to the UTF-16 encoded string data. - * @param[in] utf16_size The size of the UTF-16 string in code units. - * @param[out] result A pointer to store the created string literal. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*StringLiteral_NewUTF16)(ani_env *env, const uint16_t *utf16_string, ani_size utf16_size, - ani_stringliteral *result); - - /** - * @brief Retrieves the size of a UTF-16 string literal. - * - * This function retrieves the size (in code units) of the specified UTF-16 string literal. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The UTF-16 string literal to measure. - * @param[out] result A pointer to store the size of the string literal. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*StringLiteral_GetUTF16Size)(ani_env *env, ani_stringliteral string, ani_size *result); - - /** - * @brief Retrieves the UTF-16 encoded data of a string literal. - * - * This function copies the UTF-16 encoded data of the string literal into the provided buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The string literal to retrieve data from. - * @param[out] utf16_buffer A buffer to store the UTF-16 encoded data. - * @param[in] utf16_buffer_size The size of the buffer in code units. - * @param[out] result A pointer to store the number of code units written. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*StringLiteral_GetUTF16)(ani_env *env, ani_stringliteral string, uint16_t *utf16_buffer, - ani_size utf16_buffer_size, ani_size *result); + ani_status (*String_GetUTF16)(ani_env *env, ani_string string, uint16_t *utf16_buffer, ani_size utf16_buffer_size, + ani_size *result); /** - * @brief Retrieves a substring of a UTF-16 string literal. + * @brief Retrieves a substring of a UTF-16 string. * - * This function copies a portion of the UTF-16 string literal into the provided buffer. + * This function copies a portion of the UTF-16 string into the provided buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] string The string literal to retrieve data from. + * @param[in] string The string to retrieve data from. * @param[in] substr_offset The starting offset of the substring. * @param[in] substr_size The size of the substring in code units. * @param[out] utf16_buffer A buffer to store the substring. @@ -1267,58 +912,57 @@ struct __ani_interaction_api { * @param[out] result A pointer to store the number of code units written. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*StringLiteral_GetUTF16SubString)(ani_env *env, ani_stringliteral string, ani_size substr_offset, - ani_size substr_size, uint16_t *utf16_buffer, - ani_size utf16_buffer_size, ani_size *result); + ani_status (*String_GetUTF16SubString)(ani_env *env, ani_string string, ani_size substr_offset, + ani_size substr_size, uint16_t *utf16_buffer, ani_size utf16_buffer_size, + ani_size *result); /** - * @brief Creates a new UTF-8 string literal. + * @brief Creates a new UTF-8 string. * - * This function creates a new string literal from the provided UTF-8 encoded data. + * This function creates a new string from the provided UTF-8 encoded data. * * @param[in] env A pointer to the environment structure. * @param[in] utf8_string A pointer to the UTF-8 encoded string data. - * @param[in] size The size of the UTF-8 string in bytes. - * @param[out] result A pointer to store the created string literal. + * @param[in] utf8_size The size of the UTF-8 string in bytes. + * @param[out] result A pointer to store the created string. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*StringLiteral_NewUTF8)(ani_env *env, const char *utf8_string, ani_size size, - ani_stringliteral *result); + ani_status (*String_NewUTF8)(ani_env *env, const char *utf8_string, ani_size utf8_size, ani_string *result); /** - * @brief Retrieves the size of a UTF-8 string literal. + * @brief Retrieves the size of a UTF-8 string. * - * This function retrieves the size (in bytes) of the specified UTF-8 string literal. + * This function retrieves the size (in bytes) of the specified UTF-8 string. * * @param[in] env A pointer to the environment structure. - * @param[in] string The UTF-8 string literal to measure. - * @param[out] result A pointer to store the size of the string literal. + * @param[in] string The UTF-8 string to measure. + * @param[out] result A pointer to store the size of the string. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*StringLiteral_GetUTF8Size)(ani_env *env, ani_stringliteral string, ani_size *result); + ani_status (*String_GetUTF8Size)(ani_env *env, ani_string string, ani_size *result); /** - * @brief Retrieves the UTF-8 encoded data of a string literal. + * @brief Retrieves the UTF-8 encoded data of a string. * - * This function copies the UTF-8 encoded data of the string literal into the provided buffer. + * This function copies the UTF-8 encoded data of the string into the provided buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] string The string literal to retrieve data from. + * @param[in] string The string to retrieve data from. * @param[out] utf8_buffer A buffer to store the UTF-8 encoded data. * @param[in] utf8_buffer_size The size of the buffer in bytes. * @param[out] result A pointer to store the number of bytes written. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*StringLiteral_GetUTF8)(ani_env *env, ani_stringliteral string, char *utf8_buffer, - ani_size utf8_buffer_size, ani_size *result); + ani_status (*String_GetUTF8)(ani_env *env, ani_string string, char *utf8_buffer, ani_size utf8_buffer_size, + ani_size *result); /** - * @brief Retrieves a substring of a UTF-8 string literal. + * @brief Retrieves a substring of a UTF-8 string. * - * This function copies a portion of the UTF-8 string literal into the provided buffer. + * This function copies a portion of the UTF-8 string into the provided buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] string The string literal to retrieve data from. + * @param[in] string The string to retrieve data from. * @param[in] substr_offset The starting offset of the substring. * @param[in] substr_size The size of the substring in bytes. * @param[out] utf8_buffer A buffer to store the substring. @@ -1326,522 +970,483 @@ struct __ani_interaction_api { * @param[out] result A pointer to store the number of bytes written. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*StringLiteral_GetUTF8SubString)(ani_env *env, ani_stringliteral string, ani_size substr_offset, - ani_size substr_size, char *utf8_buffer, ani_size utf8_buffer_size, - ani_size *result); - - /** - * @brief Retrieves critical information about a string literal. - * - * This function retrieves the type and data of a string literal for critical operations. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The string literal to analyze. - * @param[out] result_string_type A pointer to store the type of the string literal (e.g., UTF-16 or UTF-8). - * @param[out] result_data A pointer to the raw string literal data. - * @param[out] result_size A pointer to the size of the string literal data. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*StringLiteral_GetCritical)( - ani_env *env, ani_stringliteral string, uint32_t *result_string_type, const void **result_data, - ani_size *result_size); // result_string_type - string type utf16/utf8, etc? - - /** - * @brief Releases critical string literal data. - * - * This function releases the raw string literal data retrieved using `StringLiteral_GetCritical`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] string The string literal whose data was retrieved. - * @param[in] data A pointer to the raw data to release. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*StringLiteral_ReleaseCritical)(ani_env *env, ani_stringliteral string, const void *data); + ani_status (*String_GetUTF8SubString)(ani_env *env, ani_string string, ani_size substr_offset, ani_size substr_size, + char *utf8_buffer, ani_size utf8_buffer_size, ani_size *result); /** - * @brief Retrieves the length of a fixed array. + * @brief Retrieves the length of an array. * - * This function retrieves the length of the specified fixed array. + * This function retrieves the length of the specified array. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array whose length is to be retrieved. + * @param[in] array The array whose length is to be retrieved. * @param[out] result A pointer to store the length of the array. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_GetLength)(ani_env *env, ani_fixedarray array, ani_size *result); + ani_status (*Array_GetLength)(ani_env *env, ani_array array, ani_size *result); /** - * @brief Creates a new fixed array of booleans. + * @brief Creates a new array of booleans. * - * This function creates a new fixed array of the specified length for boolean values. + * This function creates a new array of the specified length for boolean values. * * @param[in] env A pointer to the environment structure. * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created fixed array. + * @param[out] result A pointer to store the created array. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_New_Boolean)(ani_env *env, ani_size length, ani_fixedarray_boolean *result); + ani_status (*Array_New_Boolean)(ani_env *env, ani_size length, ani_array_boolean *result); /** - * @brief Creates a new fixed array of characters. + * @brief Creates a new array of characters. * - * This function creates a new fixed array of the specified length for character values. + * This function creates a new array of the specified length for character values. * * @param[in] env A pointer to the environment structure. * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created fixed array. + * @param[out] result A pointer to store the created array. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_New_Char)(ani_env *env, ani_size length, ani_fixedarray_char *result); + ani_status (*Array_New_Char)(ani_env *env, ani_size length, ani_array_char *result); /** - * @brief Creates a new fixed array of bytes. + * @brief Creates a new array of bytes. * - * This function creates a new fixed array of the specified length for byte values. + * This function creates a new array of the specified length for byte values. * * @param[in] env A pointer to the environment structure. * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created fixed array. + * @param[out] result A pointer to store the created array. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_New_Byte)(ani_env *env, ani_size length, ani_fixedarray_byte *result); + ani_status (*Array_New_Byte)(ani_env *env, ani_size length, ani_array_byte *result); /** - * @brief Creates a new fixed array of shorts. + * @brief Creates a new array of shorts. * - * This function creates a new fixed array of the specified length for short integer values. + * This function creates a new array of the specified length for short integer values. * * @param[in] env A pointer to the environment structure. * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created fixed array. + * @param[out] result A pointer to store the created array. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_New_Short)(ani_env *env, ani_size length, ani_fixedarray_short *result); + ani_status (*Array_New_Short)(ani_env *env, ani_size length, ani_array_short *result); /** - * @brief Creates a new fixed array of integers. + * @brief Creates a new array of integers. * - * This function creates a new fixed array of the specified length for integer values. + * This function creates a new array of the specified length for integer values. * * @param[in] env A pointer to the environment structure. * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created fixed array. + * @param[out] result A pointer to store the created array. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_New_Int)(ani_env *env, ani_size length, ani_fixedarray_int *result); + ani_status (*Array_New_Int)(ani_env *env, ani_size length, ani_array_int *result); /** - * @brief Creates a new fixed array of long integers. + * @brief Creates a new array of long integers. * - * This function creates a new fixed array of the specified length for long integer values. + * This function creates a new array of the specified length for long integer values. * * @param[in] env A pointer to the environment structure. * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created fixed array. + * @param[out] result A pointer to store the created array. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_New_Long)(ani_env *env, ani_size length, ani_fixedarray_long *result); + ani_status (*Array_New_Long)(ani_env *env, ani_size length, ani_array_long *result); /** - * @brief Creates a new fixed array of floats. + * @brief Creates a new array of floats. * - * This function creates a new fixed array of the specified length for float values. + * This function creates a new array of the specified length for float values. * * @param[in] env A pointer to the environment structure. * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created fixed array. + * @param[out] result A pointer to store the created array. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_New_Float)(ani_env *env, ani_size length, ani_fixedarray_float *result); + ani_status (*Array_New_Float)(ani_env *env, ani_size length, ani_array_float *result); /** - * @brief Creates a new fixed array of doubles. + * @brief Creates a new array of doubles. * - * This function creates a new fixed array of the specified length for double values. + * This function creates a new array of the specified length for double values. * * @param[in] env A pointer to the environment structure. * @param[in] length The length of the array to be created. - * @param[out] result A pointer to store the created fixed array. + * @param[out] result A pointer to store the created array. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_New_Double)(ani_env *env, ani_size length, ani_fixedarray_double *result); + ani_status (*Array_New_Double)(ani_env *env, ani_size length, ani_array_double *result); /** - * @brief Retrieves a region of boolean values from a fixed array. + * @brief Retrieves a region of boolean values from an array. * - * This function retrieves a portion of the specified boolean fixed array into a native buffer. + * This function retrieves a portion of the specified boolean array into a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to retrieve values from. + * @param[in] array The array to retrieve values from. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to retrieve. * @param[out] native_buffer A buffer to store the retrieved boolean values. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_GetRegion_Boolean)(ani_env *env, ani_fixedarray_boolean array, ani_size offset, - ani_size length, ani_boolean *native_buffer); + ani_status (*Array_GetRegion_Boolean)(ani_env *env, ani_array_boolean array, ani_size offset, ani_size length, + ani_boolean *native_buffer); /** - * @brief Retrieves a region of character values from a fixed array. + * @brief Retrieves a region of character values from an array. * - * This function retrieves a portion of the specified character fixed array into a native buffer. + * This function retrieves a portion of the specified character array into a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to retrieve values from. + * @param[in] array The array to retrieve values from. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to retrieve. * @param[out] native_buffer A buffer to store the retrieved character values. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_GetRegion_Char)(ani_env *env, ani_fixedarray_char array, ani_size offset, ani_size length, - ani_char *native_buffer); + ani_status (*Array_GetRegion_Char)(ani_env *env, ani_array_char array, ani_size offset, ani_size length, + ani_char *native_buffer); /** - * @brief Retrieves a region of byte values from a fixed array. + * @brief Retrieves a region of byte values from an array. * - * This function retrieves a portion of the specified byte fixed array into a native buffer. + * This function retrieves a portion of the specified byte array into a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to retrieve values from. + * @param[in] array The array to retrieve values from. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to retrieve. * @param[out] native_buffer A buffer to store the retrieved byte values. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_GetRegion_Byte)(ani_env *env, ani_fixedarray_byte array, ani_size offset, ani_size length, - ani_byte *native_buffer); + ani_status (*Array_GetRegion_Byte)(ani_env *env, ani_array_byte array, ani_size offset, ani_size length, + ani_byte *native_buffer); /** - * @brief Retrieves a region of short values from a fixed array. + * @brief Retrieves a region of short values from an array. * - * This function retrieves a portion of the specified short fixed array into a native buffer. + * This function retrieves a portion of the specified short array into a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to retrieve values from. + * @param[in] array The array to retrieve values from. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to retrieve. * @param[out] native_buffer A buffer to store the retrieved short values. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_GetRegion_Short)(ani_env *env, ani_fixedarray_short array, ani_size offset, ani_size length, - ani_short *native_buffer); + ani_status (*Array_GetRegion_Short)(ani_env *env, ani_array_short array, ani_size offset, ani_size length, + ani_short *native_buffer); /** - * @brief Retrieves a region of integer values from a fixed array. + * @brief Retrieves a region of integer values from an array. * - * This function retrieves a portion of the specified integer fixed array into a native buffer. + * This function retrieves a portion of the specified integer array into a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to retrieve values from. + * @param[in] array The array to retrieve values from. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to retrieve. * @param[out] native_buffer A buffer to store the retrieved integer values. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_GetRegion_Int)(ani_env *env, ani_fixedarray_int array, ani_size offset, ani_size length, - ani_int *native_buffer); + ani_status (*Array_GetRegion_Int)(ani_env *env, ani_array_int array, ani_size offset, ani_size length, + ani_int *native_buffer); /** - * @brief Retrieves a region of long integer values from a fixed array. + * @brief Retrieves a region of long integer values from an array. * - * This function retrieves a portion of the specified long integer fixed array into a native buffer. + * This function retrieves a portion of the specified long integer array into a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to retrieve values from. + * @param[in] array The array to retrieve values from. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to retrieve. * @param[out] native_buffer A buffer to store the retrieved long integer values. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_GetRegion_Long)(ani_env *env, ani_fixedarray_long array, ani_size offset, ani_size length, - ani_long *native_buffer); + ani_status (*Array_GetRegion_Long)(ani_env *env, ani_array_long array, ani_size offset, ani_size length, + ani_long *native_buffer); /** - * @brief Retrieves a region of float values from a fixed array. + * @brief Retrieves a region of float values from an array. * - * This function retrieves a portion of the specified float fixed array into a native buffer. + * This function retrieves a portion of the specified float array into a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to retrieve values from. + * @param[in] array The array to retrieve values from. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to retrieve. * @param[out] native_buffer A buffer to store the retrieved float values. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_GetRegion_Float)(ani_env *env, ani_fixedarray_float array, ani_size offset, ani_size length, - ani_float *native_buffer); + ani_status (*Array_GetRegion_Float)(ani_env *env, ani_array_float array, ani_size offset, ani_size length, + ani_float *native_buffer); /** - * @brief Retrieves a region of double values from a fixed array. + * @brief Retrieves a region of double values from an array. * - * This function retrieves a portion of the specified double fixed array into a native buffer. + * This function retrieves a portion of the specified double array into a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to retrieve values from. + * @param[in] array The array to retrieve values from. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to retrieve. * @param[out] native_buffer A buffer to store the retrieved double values. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_GetRegion_Double)(ani_env *env, ani_fixedarray_double array, ani_size offset, - ani_size length, ani_double *native_buffer); + ani_status (*Array_GetRegion_Double)(ani_env *env, ani_array_double array, ani_size offset, ani_size length, + ani_double *native_buffer); /** - * @brief Sets a region of boolean values in a fixed array. + * @brief Sets a region of boolean values in an array. * - * This function sets a portion of the specified boolean fixed array using a native buffer. + * This function sets a portion of the specified boolean array using a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to set values in. + * @param[in] array The array to set values in. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to set. * @param[in] native_buffer A buffer containing the boolean values to set. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_SetRegion_Boolean)(ani_env *env, ani_fixedarray_boolean array, ani_size offset, - ani_size length, const ani_boolean *native_buffer); + ani_status (*Array_SetRegion_Boolean)(ani_env *env, ani_array_boolean array, ani_size offset, ani_size length, + const ani_boolean *native_buffer); /** - * @brief Sets a region of character values in a fixed array. + * @brief Sets a region of character values in an array. * - * This function sets a portion of the specified character fixed array using a native buffer. + * This function sets a portion of the specified character array using a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to set values in. + * @param[in] array The array to set values in. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to set. * @param[in] native_buffer A buffer containing the character values to set. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_SetRegion_Char)(ani_env *env, ani_fixedarray_char array, ani_size offset, ani_size length, - const ani_char *native_buffer); + ani_status (*Array_SetRegion_Char)(ani_env *env, ani_array_char array, ani_size offset, ani_size length, + const ani_char *native_buffer); /** - * @brief Sets a region of byte values in a fixed array. + * @brief Sets a region of byte values in an array. * - * This function sets a portion of the specified byte fixed array using a native buffer. + * This function sets a portion of the specified byte array using a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to set values in. + * @param[in] array The array to set values in. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to set. * @param[in] native_buffer A buffer containing the byte values to set. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_SetRegion_Byte)(ani_env *env, ani_fixedarray_byte array, ani_size offset, ani_size length, - const ani_byte *native_buffer); + ani_status (*Array_SetRegion_Byte)(ani_env *env, ani_array_byte array, ani_size offset, ani_size length, + const ani_byte *native_buffer); /** - * @brief Sets a region of short values in a fixed array. + * @brief Sets a region of short values in an array. * - * This function sets a portion of the specified short fixed array using a native buffer. + * This function sets a portion of the specified short array using a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to set values in. + * @param[in] array The array to set values in. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to set. * @param[in] native_buffer A buffer containing the short values to set. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_SetRegion_Short)(ani_env *env, ani_fixedarray_short array, ani_size offset, ani_size length, - const ani_short *native_buffer); + ani_status (*Array_SetRegion_Short)(ani_env *env, ani_array_short array, ani_size offset, ani_size length, + const ani_short *native_buffer); /** - * @brief Sets a region of integer values in a fixed array. + * @brief Sets a region of integer values in an array. * - * This function sets a portion of the specified integer fixed array using a native buffer. + * This function sets a portion of the specified integer array using a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to set values in. + * @param[in] array The array to set values in. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to set. * @param[in] native_buffer A buffer containing the integer values to set. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_SetRegion_Int)(ani_env *env, ani_fixedarray_int array, ani_size offset, ani_size length, - const ani_int *native_buffer); + ani_status (*Array_SetRegion_Int)(ani_env *env, ani_array_int array, ani_size offset, ani_size length, + const ani_int *native_buffer); /** - * @brief Sets a region of long integer values in a fixed array. + * @brief Sets a region of long integer values in an array. * - * This function sets a portion of the specified long integer fixed array using a native buffer. + * This function sets a portion of the specified long integer array using a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to set values in. + * @param[in] array The array to set values in. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to set. * @param[in] native_buffer A buffer containing the long integer values to set. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_SetRegion_Long)(ani_env *env, ani_fixedarray_long array, ani_size offset, ani_size length, - const ani_long *native_buffer); + ani_status (*Array_SetRegion_Long)(ani_env *env, ani_array_long array, ani_size offset, ani_size length, + const ani_long *native_buffer); /** - * @brief Sets a region of float values in a fixed array. + * @brief Sets a region of float values in an array. * - * This function sets a portion of the specified float fixed array using a native buffer. + * This function sets a portion of the specified float array using a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to set values in. + * @param[in] array The array to set values in. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to set. * @param[in] native_buffer A buffer containing the float values to set. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_SetRegion_Float)(ani_env *env, ani_fixedarray_float array, ani_size offset, ani_size length, - const ani_float *native_buffer); + ani_status (*Array_SetRegion_Float)(ani_env *env, ani_array_float array, ani_size offset, ani_size length, + const ani_float *native_buffer); /** - * @brief Sets a region of double values in a fixed array. + * @brief Sets a region of double values in an array. * - * This function sets a portion of the specified double fixed array using a native buffer. + * This function sets a portion of the specified double array using a native buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array to set values in. + * @param[in] array The array to set values in. * @param[in] offset The starting offset of the region. * @param[in] length The number of elements to set. * @param[in] native_buffer A buffer containing the double values to set. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_SetRegion_Double)(ani_env *env, ani_fixedarray_double array, ani_size offset, - ani_size length, const ani_double *native_buffer); - - /** - * @brief Pins a fixed array in memory. - * - * This function pins a fixed array of primitive types in memory to ensure it is not moved by the garbage collector. - * - * @param[in] env A pointer to the environment structure. - * @param[in] primitive_array The fixed array to pin. - * @param[out] result A pointer to store the memory address of the pinned array. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*FixedArray_Pin)(ani_env *env, ani_fixedarray primitive_array, void **result); - - /** - * @brief Unpins a fixed array in memory. - * - * This function unpins a previously pinned fixed array, allowing it to be moved by the garbage collector. - * - * @param[in] env A pointer to the environment structure. - * @param[in] primitive_array The fixed array to unpin. - * @param[in] data A pointer to the pinned memory that was previously retrieved. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*FixedArray_Unpin)(ani_env *env, ani_fixedarray primitive_array, void *data); + ani_status (*Array_SetRegion_Double)(ani_env *env, ani_array_double array, ani_size offset, ani_size length, + const ani_double *native_buffer); /** - * @brief Creates a new fixed array of references. + * @brief Creates a new array of references. * - * This function creates a new fixed array of references, optionally initializing it with an array of references. + * This function creates a new array of references, optionally initializing it with an array of references. * * @param[in] env A pointer to the environment structure. + * @param[in] type The type of the elements of the array. * @param[in] length The length of the array to be created. - * @param[in] initial_array An optional array of references to initialize the fixed array. Can be null. - * @param[out] result A pointer to store the created fixed array of references. + * @param[in] initial_element An optional reference to initialize the array. Can be null. + * @param[out] result A pointer to store the created array of references. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_New_Ref)(ani_env *env, ani_size length, ani_ref *initial_array, ani_fixedarray_ref *result); + ani_status (*Array_New_Ref)(ani_env *env, ani_type type, ani_size length, ani_ref initial_element, + ani_array_ref *result); /** - * @brief Sets a reference at a specific index in a fixed array. + * @brief Sets a reference at a specific index in an array. * - * This function sets the value of a reference at the specified index in the fixed array. + * This function sets the value of a reference at the specified index in the array. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array of references to modify. + * @param[in] array The array of references to modify. * @param[in] index The index at which to set the reference. * @param[in] ref The reference to set at the specified index. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_Set_Ref)(ani_env *env, ani_fixedarray_ref array, ani_size index, ani_ref ref); + ani_status (*Array_Set_Ref)(ani_env *env, ani_array_ref array, ani_size index, ani_ref ref); /** - * @brief Retrieves a reference from a specific index in a fixed array. + * @brief Retrieves a reference from a specific index in an array. * - * This function retrieves the value of a reference at the specified index in the fixed array. + * This function retrieves the value of a reference at the specified index in the array. * * @param[in] env A pointer to the environment structure. - * @param[in] array The fixed array of references to query. + * @param[in] array The array of references to query. * @param[in] index The index from which to retrieve the reference. * @param[out] result A pointer to store the retrieved reference. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*FixedArray_Get_Ref)(ani_env *env, ani_fixedarray_ref array, ani_size index, ani_ref *result); + ani_status (*Array_Get_Ref)(ani_env *env, ani_array_ref array, ani_size index, ani_ref *result); /** - * @brief Retrieves an enum value by its name. + * @brief Retrieves an enum item by its name. * - * This function retrieves an enum value associated with the specified name. + * This function retrieves an enum item associated with the specified name. * * @param[in] env A pointer to the environment structure. * @param[in] enm The enum to search within. - * @param[in] name The name of the enum value to retrieve. - * @param[out] result A pointer to store the retrieved enum value. + * @param[in] name The name of the enum item to retrieve. + * @param[out] result A pointer to store the retrieved enum item. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Enum_GetEnumValueByName)(ani_env *env, ani_enum enm, const char *name, ani_enum_value *result); + ani_status (*Enum_GetEnumItemByName)(ani_env *env, ani_enum enm, const char *name, ani_enum_item *result); /** - * @brief Retrieves an enum value by its index. + * @brief Retrieves an enum item by its index. * - * This function retrieves an enum value located at the specified index. + * This function retrieves an enum item located at the specified index. * * @param[in] env A pointer to the environment structure. * @param[in] enm The enum to search within. - * @param[in] index The index of the enum value to retrieve. - * @param[out] result A pointer to store the retrieved enum value. + * @param[in] index The index of the enum item to retrieve. + * @param[out] result A pointer to store the retrieved enum item. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Enum_GetEnumValueByIndex)(ani_env *env, ani_enum enm, ani_size index, ani_enum_value *result); + ani_status (*Enum_GetEnumItemByIndex)(ani_env *env, ani_enum enm, ani_size index, ani_enum_item *result); /** - * @brief Retrieves the enum associated with an enum value. + * @brief Retrieves the enum associated with an enum item. * - * This function retrieves the enum to which the specified enum value belongs. + * This function retrieves the enum to which the specified enum item belongs. * * @param[in] env A pointer to the environment structure. - * @param[in] enum_value The enum value whose associated enum is to be retrieved. + * @param[in] enum_item The enum item whose associated enum is to be retrieved. * @param[out] result A pointer to store the retrieved enum. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*EnumValue_GetEnum)(ani_env *env, ani_enum_value enum_value, ani_enum *result); + ani_status (*EnumItem_GetEnum)(ani_env *env, ani_enum_item enum_item, ani_enum *result); /** - * @brief Retrieves the underlying value of an enum value. + * @brief Retrieves the integer value of an enum item. * - * This function retrieves the object representing the value of the specified enum value. + * This function retrieves the integer representing the value of the specified enum item. * * @param[in] env A pointer to the environment structure. - * @param[in] enum_value The enum value whose underlying value is to be retrieved. - * @param[out] result A pointer to store the retrieved object. + * @param[in] enum_item The enum item whose underlying value is to be retrieved. + * @param[out] result A pointer to store the retrieved integer. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*EnumValue_GetValue)(ani_env *env, ani_enum_value enum_value, ani_object *result); + ani_status (*EnumItem_GetValue_Int)(ani_env *env, ani_enum_item enum_item, ani_int *result); /** - * @brief Retrieves the name of an enum value. + * @brief Retrieves the string value of an enum item. * - * This function retrieves the name associated with the specified enum value. + * This function retrieves the string representing the value of the specified enum item. * * @param[in] env A pointer to the environment structure. - * @param[in] enum_value The enum value whose name is to be retrieved. + * @param[in] enum_item The enum item whose underlying value is to be retrieved. + * @param[out] result A pointer to store the retrieved string. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*EnumItem_GetValue_String)(ani_env *env, ani_enum_item enum_item, ani_string *result); + + /** + * @brief Retrieves the name of an enum item. + * + * This function retrieves the name associated with the specified enum item. + * + * @param[in] env A pointer to the environment structure. + * @param[in] enum_item The enum item whose name is to be retrieved. * @param[out] result A pointer to store the retrieved name. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*EnumValue_GetName)(ani_env *env, ani_enum_value enum_value, ani_string *result); + ani_status (*EnumItem_GetName)(ani_env *env, ani_enum_item enum_item, ani_string *result); /** - * @brief Retrieves the index of an enum value. + * @brief Retrieves the index of an enum item. * - * This function retrieves the index of the specified enum value within its enum. + * This function retrieves the index of the specified enum item within its enum. * * @param[in] env A pointer to the environment structure. - * @param[in] enum_value The enum value whose index is to be retrieved. + * @param[in] enum_item The enum item whose index is to be retrieved. * @param[out] result A pointer to store the retrieved index. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*EnumValue_GetIndex)(ani_env *env, ani_enum_value enum_value, ani_size *result); + ani_status (*EnumItem_GetIndex)(ani_env *env, ani_enum_item enum_item, ani_size *result); /** * @brief Invokes a functional object. @@ -1852,8 +1457,7 @@ struct __ani_interaction_api { * @param[in] fn The functional object to invoke. * @param[in] argc The number of arguments being passed to the functional object. * @param[in] argv A pointer to an array of references representing the arguments. Can be null if `argc` is 0. - * @param[out] result A pointer to store the result of the invocation. Can be null if the functional object does not - * return a value. + * @param[out] result A pointer to store the result of the invocation. Must be non null. * @return Returns a status code of type `ani_status` indicating success or failure. */ ani_status (*FunctionalObject_Call)(ani_env *env, ani_fn_object fn, ani_size argc, ani_ref *argv, ani_ref *result); @@ -2465,161 +2069,124 @@ struct __ani_interaction_api { ani_status (*Function_Call_Void_V)(ani_env *env, ani_function fn, va_list args); /** - * @brief Retrieves the partial class representation. + * @brief Finds a field from by its name. * - * This function retrieves the partial class representation of the specified class. + * This function locates a field based on its name and stores it in the result parameter. * * @param[in] env A pointer to the environment structure. * @param[in] cls The class to query. - * @param[out] result A pointer to store the partial class representation. + * @param[in] name The name of the field to find. + * @param[out] result A pointer to the field to be populated. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_GetPartial)(ani_env *env, ani_class cls, ani_class *result); + ani_status (*Class_FindField)(ani_env *env, ani_class cls, const char *name, ani_field *result); /** - * @brief Retrieves the required class representation. + * @brief Finds a static field by its name. * - * This function retrieves the required class representation of the specified class. + * This function locates a static field based on its name and stores it in the result parameter. * * @param[in] env A pointer to the environment structure. * @param[in] cls The class to query. - * @param[out] result A pointer to store the required class representation. + * @param[in] name The name of the static field to find. + * @param[out] result A pointer to the static field to be populated. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_GetRequired)(ani_env *env, ani_class cls, ani_class *result); + ani_status (*Class_FindStaticField)(ani_env *env, ani_class cls, const char *name, ani_static_field *result); /** - * @brief Retrieves a field from the class. + * @brief Finds a method from by its name and signature. * - * This function retrieves the specified field by name from the given class. + * This function locates a method based on its name and signature and stores it in the result parameter. * * @param[in] env A pointer to the environment structure. * @param[in] cls The class to query. - * @param[in] name The name of the field to retrieve. - * @param[out] result A pointer to store the retrieved field. + * @param[in] name The name of the method to find. + * @param[in] signature The signature of the method to find. + * @param[out] result A pointer to the method to be populated. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_GetField)(ani_env *env, ani_class cls, const char *name, ani_field *result); + ani_status (*Class_FindMethod)(ani_env *env, ani_class cls, const char *name, const char *signature, + ani_method *result); /** - * @brief Retrieves a static field from the class. + * @brief Finds a static method from by its name and signature. * - * This function retrieves the specified static field by name from the given class. + * This function locates a static method based on its name and signature and stores it in the result parameter. * * @param[in] env A pointer to the environment structure. * @param[in] cls The class to query. - * @param[in] name The name of the static field to retrieve. - * @param[out] result A pointer to store the retrieved static field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticField)(ani_env *env, ani_class cls, const char *name, ani_static_field *result); - - /** - * @brief Retrieves a method from the class. - * - * This function retrieves the specified method by name and signature from the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to query. - * @param[in] name The name of the method to retrieve. - * @param[in] signature The signature of the method to retrieve. - * @param[out] result A pointer to store the retrieved method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetMethod)(ani_env *env, ani_class cls, const char *name, const char *signature, - ani_method *result); - - /** - * @brief Retrieves a static method from the class. - * - * This function retrieves the specified static method by name and signature from the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to query. - * @param[in] name The name of the static method to retrieve. - * @param[in] signature The signature of the static method to retrieve. - * @param[out] result A pointer to store the retrieved static method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Class_GetStaticMethod)(ani_env *env, ani_class cls, const char *name, const char *signature, - ani_static_method *result); - - /** - * @brief Retrieves a property from the class. - * - * This function retrieves the specified property by name from the given class. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class to query. - * @param[in] name The name of the property to retrieve. - * @param[out] result A pointer to store the retrieved property. + * @param[in] name The name of the static method to find. + * @param[in] signature The signature of the static method to find. + * @param[out] result A pointer to the static method to be populated. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_GetProperty)(ani_env *env, ani_class cls, const char *name, ani_property *result); + ani_status (*Class_FindStaticMethod)(ani_env *env, ani_class cls, const char *name, const char *signature, + ani_static_method *result); /** - * @brief Retrieves the setter method of a property from the class. + * @brief Finds a setter method from by its name. * - * This function retrieves the setter method for the specified property by name from the given class. + * This function locates a setter method based on its name and stores it in the result parameter. * * @param[in] env A pointer to the environment structure. * @param[in] cls The class to query. - * @param[in] name The name of the property whose setter is to be retrieved. - * @param[out] result A pointer to store the retrieved setter method. + * @param[in] name The name of the property whose setter is to be found. + * @param[out] result A pointer to the method to be populated. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_GetSetter)(ani_env *env, ani_class cls, const char *name, ani_method *result); + ani_status (*Class_FindSetter)(ani_env *env, ani_class cls, const char *name, ani_method *result); /** - * @brief Retrieves the getter method of a property from the class. + * @brief Finds a getter method from by its name. * - * This function retrieves the getter method for the specified property by name from the given class. + * This function locates a getter method based on its name and stores it in the result parameter. * * @param[in] env A pointer to the environment structure. * @param[in] cls The class to query. - * @param[in] name The name of the property whose getter is to be retrieved. - * @param[out] result A pointer to store the retrieved getter method. + * @param[in] name The name of the property whose getter is to be found. + * @param[out] result A pointer to the method to be populated. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_GetGetter)(ani_env *env, ani_class cls, const char *name, ani_method *result); + ani_status (*Class_FindGetter)(ani_env *env, ani_class cls, const char *name, ani_method *result); /** - * @brief Retrieves the indexable getter method from the class. + * @brief Finds an indexable getter method from by its signature. * - * This function retrieves the indexable getter method for the specified signature from the given class. + * This function locates an indexable getter method based on its signature and stores it in the result parameter. * * @param[in] env A pointer to the environment structure. * @param[in] cls The class to query. - * @param[in] signature The signature of the indexable getter to retrieve. - * @param[out] result A pointer to store the retrieved indexable getter method. + * @param[in] signature The signature of the indexable getter to find. + * @param[out] result A pointer to the method to be populated. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_GetIndexableGetter)(ani_env *env, ani_class cls, const char *signature, ani_method *result); + ani_status (*Class_FindIndexableGetter)(ani_env *env, ani_class cls, const char *signature, ani_method *result); /** - * @brief Retrieves the indexable setter method from the class. + * @brief Finds an indexable setter method from by its signature. * - * This function retrieves the indexable setter method for the specified signature from the given class. + * This function locates an indexable setter method based on its signature and stores it in the result parameter. * * @param[in] env A pointer to the environment structure. * @param[in] cls The class to query. - * @param[in] signature The signature of the indexable setter to retrieve. - * @param[out] result A pointer to store the retrieved indexable setter method. + * @param[in] signature The signature of the indexable setter to find. + * @param[out] result A pointer to the method to be populated. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_GetIndexableSetter)(ani_env *env, ani_class cls, const char *signature, ani_method *result); + ani_status (*Class_FindIndexableSetter)(ani_env *env, ani_class cls, const char *signature, ani_method *result); /** - * @brief Retrieves the iterator method from the class. + * @brief Finds an iterator method. * - * This function retrieves the iterator method from the specified class. + * This function locates an iterator method * * @param[in] env A pointer to the environment structure. * @param[in] cls The class to query. - * @param[out] result A pointer to store the retrieved iterator method. + * @param[out] result A pointer to the method to be populated. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_GetIterator)(ani_env *env, ani_class cls, ani_method *result); + ani_status (*Class_FindIterator)(ani_env *env, ani_class cls, ani_method *result); /** * @brief Retrieves a boolean value from a static field of a class. @@ -3561,12 +3128,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the boolean result. * @param[in] ... Variadic arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ ani_status (*Class_CallStaticMethodByName_Boolean)(ani_env *env, ani_class cls, const char *name, - ani_boolean *result, ...); + const char *signature, ani_boolean *result, ...); /** * @brief Calls a static method by name with a boolean return type (array-based). @@ -3577,12 +3145,14 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the boolean result. * @param[in] args An array of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ ani_status (*Class_CallStaticMethodByName_Boolean_A)(ani_env *env, ani_class cls, const char *name, - ani_boolean *result, const ani_value *args); + const char *signature, ani_boolean *result, + const ani_value *args); /** * @brief Calls a static method by name with a boolean return type (variadic arguments). @@ -3593,12 +3163,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the boolean result. * @param[in] args A `va_list` of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ ani_status (*Class_CallStaticMethodByName_Boolean_V)(ani_env *env, ani_class cls, const char *name, - ani_boolean *result, va_list args); + const char *signature, ani_boolean *result, va_list args); /** * @brief Calls a static method by name with a char return type. @@ -3609,12 +3180,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the char result. * @param[in] ... Variadic arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Char)(ani_env *env, ani_class cls, const char *name, ani_char *result, - ...); + ani_status (*Class_CallStaticMethodByName_Char)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_char *result, ...); /** * @brief Calls a static method by name with a char return type (array-based). @@ -3625,12 +3197,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the char result. * @param[in] args An array of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Char_A)(ani_env *env, ani_class cls, const char *name, ani_char *result, - const ani_value *args); + ani_status (*Class_CallStaticMethodByName_Char_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_char *result, const ani_value *args); /** * @brief Calls a static method by name with a char return type (variadic arguments). @@ -3641,12 +3214,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the char result. * @param[in] args A `va_list` of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Char_V)(ani_env *env, ani_class cls, const char *name, ani_char *result, - va_list args); + ani_status (*Class_CallStaticMethodByName_Char_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_char *result, va_list args); /** * @brief Calls a static method by name with a byte return type. @@ -3657,12 +3231,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the byte result. * @param[in] ... Variadic arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Byte)(ani_env *env, ani_class cls, const char *name, ani_byte *result, - ...); + ani_status (*Class_CallStaticMethodByName_Byte)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_byte *result, ...); /** * @brief Calls a static method by name with a byte return type (array-based). @@ -3673,12 +3248,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the byte result. * @param[in] args An array of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Byte_A)(ani_env *env, ani_class cls, const char *name, ani_byte *result, - const ani_value *args); + ani_status (*Class_CallStaticMethodByName_Byte_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_byte *result, const ani_value *args); /** * @brief Calls a static method by name with a byte return type (variadic arguments). @@ -3689,12 +3265,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the byte result. * @param[in] args A `va_list` of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Byte_V)(ani_env *env, ani_class cls, const char *name, ani_byte *result, - va_list args); + ani_status (*Class_CallStaticMethodByName_Byte_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_byte *result, va_list args); /** * @brief Calls a static method by name with a short return type. @@ -3705,12 +3282,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the short result. * @param[in] ... Variadic arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Short)(ani_env *env, ani_class cls, const char *name, ani_short *result, - ...); + ani_status (*Class_CallStaticMethodByName_Short)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_short *result, ...); /** * @brief Calls a static method by name with a short return type (array-based). @@ -3721,12 +3299,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the short result. * @param[in] args An array of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Short_A)(ani_env *env, ani_class cls, const char *name, ani_short *result, - const ani_value *args); + ani_status (*Class_CallStaticMethodByName_Short_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_short *result, const ani_value *args); /** * @brief Calls a static method by name with a short return type (variadic arguments). @@ -3737,12 +3316,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the short result. * @param[in] args A `va_list` of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Short_V)(ani_env *env, ani_class cls, const char *name, ani_short *result, - va_list args); + ani_status (*Class_CallStaticMethodByName_Short_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_short *result, va_list args); /** * @brief Calls a static method by name with a integer return type. @@ -3753,11 +3333,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the integer result. * @param[in] ... Variadic arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Int)(ani_env *env, ani_class cls, const char *name, ani_int *result, ...); + ani_status (*Class_CallStaticMethodByName_Int)(ani_env *env, ani_class cls, const char *name, const char *signature, + ani_int *result, ...); /** * @brief Calls a static method by name with a integer return type (array-based). @@ -3768,12 +3350,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the integer result. * @param[in] args An array of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Int_A)(ani_env *env, ani_class cls, const char *name, ani_int *result, - const ani_value *args); + ani_status (*Class_CallStaticMethodByName_Int_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_int *result, const ani_value *args); /** * @brief Calls a static method by name with a integer return type (variadic arguments). @@ -3784,12 +3367,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the integer result. * @param[in] args A `va_list` of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Int_V)(ani_env *env, ani_class cls, const char *name, ani_int *result, - va_list args); + ani_status (*Class_CallStaticMethodByName_Int_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_int *result, va_list args); /** * @brief Calls a static method by name with a long return type. @@ -3800,12 +3384,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the long result. * @param[in] ... Variadic arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Long)(ani_env *env, ani_class cls, const char *name, ani_long *result, - ...); + ani_status (*Class_CallStaticMethodByName_Long)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_long *result, ...); /** * @brief Calls a static method by name with a long return type (array-based). @@ -3816,12 +3401,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the long result. * @param[in] args An array of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Long_A)(ani_env *env, ani_class cls, const char *name, ani_long *result, - const ani_value *args); + ani_status (*Class_CallStaticMethodByName_Long_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_long *result, const ani_value *args); /** * @brief Calls a static method by name with a long return type (variadic arguments). @@ -3832,12 +3418,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the long result. * @param[in] args A `va_list` of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Long_V)(ani_env *env, ani_class cls, const char *name, ani_long *result, - va_list args); + ani_status (*Class_CallStaticMethodByName_Long_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_long *result, va_list args); /** * @brief Calls a static method by name with a float return type. @@ -3848,12 +3435,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the float result. * @param[in] ... Variadic arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Float)(ani_env *env, ani_class cls, const char *name, ani_float *result, - ...); + ani_status (*Class_CallStaticMethodByName_Float)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_float *result, ...); /** * @brief Calls a static method by name with a float return type (array-based). @@ -3864,12 +3452,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the float result. * @param[in] args An array of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Float_A)(ani_env *env, ani_class cls, const char *name, ani_float *result, - const ani_value *args); + ani_status (*Class_CallStaticMethodByName_Float_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_float *result, const ani_value *args); /** * @brief Calls a static method by name with a float return type (variadic arguments). @@ -3880,12 +3469,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the float result. * @param[in] args A `va_list` of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Float_V)(ani_env *env, ani_class cls, const char *name, ani_float *result, - va_list args); + ani_status (*Class_CallStaticMethodByName_Float_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_float *result, va_list args); /** * @brief Calls a static method by name with a double return type. @@ -3896,12 +3486,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the double result. * @param[in] ... Variadic arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Double)(ani_env *env, ani_class cls, const char *name, ani_double *result, - ...); + ani_status (*Class_CallStaticMethodByName_Double)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_double *result, ...); /** * @brief Calls a static method by name with a double return type (array-based). @@ -3912,12 +3503,14 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the double result. * @param[in] args An array of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ ani_status (*Class_CallStaticMethodByName_Double_A)(ani_env *env, ani_class cls, const char *name, - ani_double *result, const ani_value *args); + const char *signature, ani_double *result, + const ani_value *args); /** * @brief Calls a static method by name with a double return type (variadic arguments). @@ -3928,12 +3521,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the double result. * @param[in] args A `va_list` of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ ani_status (*Class_CallStaticMethodByName_Double_V)(ani_env *env, ani_class cls, const char *name, - ani_double *result, va_list args); + const char *signature, ani_double *result, va_list args); /** * @brief Calls a static method by name with a reference return type. @@ -3944,11 +3538,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the reference result. * @param[in] ... Variadic arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Ref)(ani_env *env, ani_class cls, const char *name, ani_ref *result, ...); + ani_status (*Class_CallStaticMethodByName_Ref)(ani_env *env, ani_class cls, const char *name, const char *signature, + ani_ref *result, ...); /** * @brief Calls a static method by name with a reference return type (array-based). @@ -3959,12 +3555,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the reference result. * @param[in] args An array of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Ref_A)(ani_env *env, ani_class cls, const char *name, ani_ref *result, - const ani_value *args); + ani_status (*Class_CallStaticMethodByName_Ref_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_ref *result, const ani_value *args); /** * @brief Calls a static method by name with a reference return type (variadic arguments). @@ -3975,12 +3572,13 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[out] result A pointer to store the reference result. * @param[in] args A `va_list` of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Ref_V)(ani_env *env, ani_class cls, const char *name, ani_ref *result, - va_list args); + ani_status (*Class_CallStaticMethodByName_Ref_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_ref *result, va_list args); /** * @brief Calls a static method by name with no return value. @@ -3991,10 +3589,12 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[in] ... Variadic arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Void)(ani_env *env, ani_class cls, const char *name, ...); + ani_status (*Class_CallStaticMethodByName_Void)(ani_env *env, ani_class cls, const char *name, + const char *signature, ...); /** * @brief Calls a static method by name with no return value (array-based). @@ -4005,11 +3605,12 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[in] args An array of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ ani_status (*Class_CallStaticMethodByName_Void_A)(ani_env *env, ani_class cls, const char *name, - const ani_value *args); + const char *signature, const ani_value *args); /** * @brief Calls a static method by name with no return value (variadic arguments). @@ -4020,10 +3621,12 @@ struct __ani_interaction_api { * @param[in] env A pointer to the environment structure. * @param[in] cls The class containing the static method. * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. * @param[in] args A `va_list` of arguments to pass to the method. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Class_CallStaticMethodByName_Void_V)(ani_env *env, ani_class cls, const char *name, va_list args); + ani_status (*Class_CallStaticMethodByName_Void_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, va_list args); /** * @brief Retrieves a boolean value from a field of an object. @@ -4481,252 +4084,17 @@ struct __ani_interaction_api { ani_status (*Object_SetFieldByName_Double)(ani_env *env, ani_object object, const char *name, ani_double value); /** - * @brief Sets a reference value to a field of an object by its name. - * - * This function assigns a reference value to the specified field of the given object by its name. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the field. - * @param[in] name The name of the field to set the reference value to. - * @param[in] value The reference value to assign to the field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetFieldByName_Ref)(ani_env *env, ani_object object, const char *name, ani_ref value); - - /** - * @brief Retrieves a boolean value from a property of an object. - * - * This function retrieves the boolean value of the specified property from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to retrieve the boolean value from. - * @param[out] result A pointer to store the retrieved boolean value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetProperty_Boolean)(ani_env *env, ani_object object, ani_property property, - ani_boolean *result); - - /** - * @brief Retrieves a char value from a property of an object. - * - * This function retrieves the char value of the specified property from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to retrieve the char value from. - * @param[out] result A pointer to store the retrieved char value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetProperty_Char)(ani_env *env, ani_object object, ani_property property, ani_char *result); - - /** - * @brief Retrieves a byte value from a property of an object. - * - * This function retrieves the byte value of the specified property from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to retrieve the byte value from. - * @param[out] result A pointer to store the retrieved byte value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetProperty_Byte)(ani_env *env, ani_object object, ani_property property, ani_byte *result); - - /** - * @brief Retrieves a short value from a property of an object. - * - * This function retrieves the short value of the specified property from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to retrieve the short value from. - * @param[out] result A pointer to store the retrieved short value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetProperty_Short)(ani_env *env, ani_object object, ani_property property, ani_short *result); - - /** - * @brief Retrieves a integer value from a property of an object. - * - * This function retrieves the integer value of the specified property from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to retrieve the integer value from. - * @param[out] result A pointer to store the retrieved integer value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetProperty_Int)(ani_env *env, ani_object object, ani_property property, ani_int *result); - - /** - * @brief Retrieves a long value from a property of an object. - * - * This function retrieves the long value of the specified property from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to retrieve the long value from. - * @param[out] result A pointer to store the retrieved long value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetProperty_Long)(ani_env *env, ani_object object, ani_property property, ani_long *result); - - /** - * @brief Retrieves a float value from a property of an object. - * - * This function retrieves the float value of the specified property from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to retrieve the float value from. - * @param[out] result A pointer to store the retrieved float value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetProperty_Float)(ani_env *env, ani_object object, ani_property property, ani_float *result); - - /** - * @brief Retrieves a double value from a property of an object. - * - * This function retrieves the double value of the specified property from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to retrieve the double value from. - * @param[out] result A pointer to store the retrieved double value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetProperty_Double)(ani_env *env, ani_object object, ani_property property, ani_double *result); - - /** - * @brief Retrieves a reference value from a property of an object. - * - * This function retrieves the reference value of the specified property from the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to retrieve the reference value from. - * @param[out] result A pointer to store the retrieved reference value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_GetProperty_Ref)(ani_env *env, ani_object object, ani_property property, ani_ref *result); - - /** - * @brief Sets a boolean value to a property of an object. - * - * This function assigns a boolean value to the specified property of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to set the boolean value to. - * @param[in] value The boolean value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetProperty_Boolean)(ani_env *env, ani_object object, ani_property property, ani_boolean value); - - /** - * @brief Sets a char value to a property of an object. - * - * This function assigns a char value to the specified property of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to set the char value to. - * @param[in] value The char value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetProperty_Char)(ani_env *env, ani_object object, ani_property property, ani_char value); - - /** - * @brief Sets a byte value to a property of an object. - * - * This function assigns a byte value to the specified property of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to set the byte value to. - * @param[in] value The byte value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetProperty_Byte)(ani_env *env, ani_object object, ani_property property, ani_byte value); - - /** - * @brief Sets a short value to a property of an object. - * - * This function assigns a short value to the specified property of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to set the short value to. - * @param[in] value The short value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetProperty_Short)(ani_env *env, ani_object object, ani_property property, ani_short value); - - /** - * @brief Sets a integer value to a property of an object. - * - * This function assigns a integer value to the specified property of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to set the integer value to. - * @param[in] value The integer value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetProperty_Int)(ani_env *env, ani_object object, ani_property property, ani_int value); - - /** - * @brief Sets a long value to a property of an object. - * - * This function assigns a long value to the specified property of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to set the long value to. - * @param[in] value The long value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetProperty_Long)(ani_env *env, ani_object object, ani_property property, ani_long value); - - /** - * @brief Sets a float value to a property of an object. - * - * This function assigns a float value to the specified property of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to set the float value to. - * @param[in] value The float value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetProperty_Float)(ani_env *env, ani_object object, ani_property property, ani_float value); - - /** - * @brief Sets a double value to a property of an object. - * - * This function assigns a double value to the specified property of the given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to set the double value to. - * @param[in] value The double value to assign to the property. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Object_SetProperty_Double)(ani_env *env, ani_object object, ani_property property, ani_double value); - - /** - * @brief Sets a reference value to a property of an object. + * @brief Sets a reference value to a field of an object by its name. * - * This function assigns a reference value to the specified property of the given object. + * This function assigns a reference value to the specified field of the given object by its name. * * @param[in] env A pointer to the environment structure. - * @param[in] object The object containing the property. - * @param[in] property The property to set the reference value to. - * @param[in] value The reference value to assign to the property. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to set the reference value to. + * @param[in] value The reference value to assign to the field. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Object_SetProperty_Ref)(ani_env *env, ani_object object, ani_property property, ani_ref value); + ani_status (*Object_SetFieldByName_Ref)(ani_env *env, ani_object object, const char *name, ani_ref value); /** * @brief Retrieves a boolean value from a property of an object by its name. @@ -5920,93 +5288,16 @@ struct __ani_interaction_api { const char *signature, va_list args); /** - * @brief Creates a new tuple value. - * - * This function creates a new value for the specified tuple using variadic arguments. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple The tuple for which to create a new value. - * @param[out] result A pointer to store the new tuple value. - * @param[in] ... Variadic arguments to initialize the tuple value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Tuple_NewTupleValue)(ani_env *env, ani_tuple tuple, ani_tuple_value *result, ...); - - /** - * @brief Creates a new tuple value (array-based). - * - * This function creates a new value for the specified tuple using arguments provided in an array. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple The tuple for which to create a new value. - * @param[out] result A pointer to store the new tuple value. - * @param[in] args An array of arguments to initialize the tuple value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Tuple_NewTupleValue_A)(ani_env *env, ani_tuple tuple, ani_tuple_value *result, const ani_value *args); - - /** - * @brief Creates a new tuple value (variadic arguments). - * - * This function creates a new value for the specified tuple using a `va_list`. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple The tuple for which to create a new value. - * @param[out] result A pointer to store the new tuple value. - * @param[in] args A `va_list` of arguments to initialize the tuple value. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Tuple_NewTupleValue_V)(ani_env *env, ani_tuple tuple, ani_tuple_value *result, va_list args); - - /** - * @brief Retrieves the number of items in a tuple. + * @brief Retrieves the number of items in a tuple value. * - * This function retrieves the total number of items in the specified tuple. + * This function retrieves the total number of items in the specified tuple value. * * @param[in] env A pointer to the environment structure. - * @param[in] tuple The tuple whose number of items is to be retrieved. + * @param[in] tuple_value The tuple value whose number of items is to be retrieved. * @param[out] result A pointer to store the number of items. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Tuple_GetNumberOfItems)(ani_env *env, ani_tuple tuple, ani_size *result); - - /** - * @brief Retrieves the kind of an item in a tuple. - * - * This function retrieves the kind of the item at the specified index in the tuple. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple The tuple containing the item. - * @param[in] index The index of the item. - * @param[out] result A pointer to store the kind of the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Tuple_GetItemKind)(ani_env *env, ani_tuple tuple, ani_size index, ani_kind *result); - - /** - * @brief Retrieves the type of an item in a tuple. - * - * This function retrieves the type of the item at the specified index in the tuple. - * - * @param[in] env A pointer to the environment structure. - * @param[in] tuple The tuple containing the item. - * @param[in] index The index of the item. - * @param[out] result A pointer to store the type of the item. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Tuple_GetItemType)(ani_env *env, ani_tuple tuple, ani_size index, ani_type *result); - - /** - * @brief Retrieves the tuple associated with a tuple value. - * - * This function retrieves the tuple that corresponds to the specified tuple value. - * - * @param[in] env A pointer to the environment structure. - * @param[in] value The tuple value to query. - * @param[out] result A pointer to store the associated tuple. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*TupleValue_GetTuple)(ani_env *env, ani_tuple_value value, ani_tuple *result); + ani_status (*TupleValue_GetNumberOfItems)(ani_env *env, ani_tuple_value tuple_value, ani_size *result); /** * @brief Retrieves a boolean item from a tuple value. @@ -6249,565 +5540,261 @@ struct __ani_interaction_api { ani_status (*TupleValue_SetItem_Ref)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_ref value); /** - * @brief Creates a global reference. - * - * This function creates a global reference from a local reference. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The local reference to convert to a global reference. - * @param[out] result A pointer to store the created global reference. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*GlobalReference_Create)(ani_env *env, ani_ref ref, ani_gref *result); - - /** - * @brief Deletes a global reference. - * - * This function deletes the specified global reference, releasing all associated resources. - * - * @param[in] env A pointer to the environment structure. - * @param[in] gref The global reference to delete. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*GlobalReference_Delete)(ani_env *env, ani_gref gref); - - /** - * @brief Creates a weak reference. - * - * This function creates a weak reference from a local reference. - * - * @param[in] env A pointer to the environment structure. - * @param[in] ref The local reference to convert to a weak reference. - * @param[out] result A pointer to store the created weak reference. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*WeakReference_Create)(ani_env *env, ani_ref ref, ani_wref *result); - - /** - * @brief Deletes a weak reference. - * - * This function deletes the specified weak reference, releasing all associated resources. - * - * @param[in] env A pointer to the environment structure. - * @param[in] wref The weak reference to delete. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*WeakReference_Delete)(ani_env *env, ani_wref wref); - - /** - * @brief Retrieves the local reference associated with a weak reference. - * - * This function retrieves the local reference that corresponds to the specified weak reference. - * - * @param[in] env A pointer to the environment structure. - * @param[in] wref The weak reference to query. - * @param[out] result A pointer to store the retrieved local reference. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*WeakReference_GetReference)(ani_env *env, ani_wref wref, ani_ref *result); - - /** - * @brief Creates a new array buffer. - * - * This function creates a new array buffer with the specified length and returns a pointer to the allocated data. - * - * @param[in] env A pointer to the environment structure. - * @param[in] length The length of the array buffer in bytes. - * @param[out] data_result A pointer to store the allocated data of the array buffer. - * @param[out] arraybuffer_result A pointer to store the created array buffer object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*CreateArrayBuffer)(ani_env *env, size_t length, void **data_result, - ani_arraybuffer *arraybuffer_result); - - /** - * @brief Creates a new array buffer using external data. - * - * This function creates an array buffer that uses external data. The provided finalizer will be called when the - * array buffer is no longer needed. - * - * @param[in] env A pointer to the environment structure. - * @param[in] external_data A pointer to the external data to be used by the array buffer. - * @param[in] length The length of the external data in bytes. - * @param[in] finalizer A callback function to be called when the array buffer is finalized. - * @param[in] hint A user-defined hint to be passed to the finalizer. - * @param[out] result A pointer to store the created array buffer object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*CreateArrayBufferExternal)(ani_env *env, void *external_data, size_t length, ani_finalizer finalizer, - void *hint, ani_arraybuffer *result); - - /** - * @brief Retrieves information about an array buffer. - * - * This function retrieves the data pointer and length of the specified array buffer. - * - * @param[in] env A pointer to the environment structure. - * @param[in] arraybuffer The array buffer to query. - * @param[out] data_result A pointer to store the data of the array buffer. - * @param[out] length_result A pointer to store the length of the array buffer in bytes. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*ArrayBuffer_GetInfo)(ani_env *env, ani_arraybuffer arraybuffer, void **data_result, - size_t *length_result); - - /** - * @brief Converts an object to a method. - * - * This function extracts the method information from a given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] method The object representing the method. - * @param[out] result A pointer to store the extracted method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reflection_FromMethod)(ani_env *env, ani_object method, ani_method *result); - - /** - * @brief Converts a method to an object. - * - * This function creates an object representing the specified method. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the method. - * @param[in] method The method to convert. - * @param[out] result A pointer to store the created object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reflection_ToMethod)(ani_env *env, ani_class cls, ani_method method, ani_object *result); - - /** - * @brief Converts an object to a field. - * - * This function extracts the field information from a given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] field The object representing the field. - * @param[out] result A pointer to store the extracted field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reflection_FromField)(ani_env *env, ani_object field, ani_field *result); - - /** - * @brief Converts a field to an object. - * - * This function creates an object representing the specified field. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the field. - * @param[in] field The field to convert. - * @param[out] result A pointer to store the created object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reflection_ToField)(ani_env *env, ani_class cls, ani_field field, ani_object *result); - - /** - * @brief Converts an object to a static method. - * - * This function extracts the static method information from a given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] method The object representing the static method. - * @param[out] result A pointer to store the extracted static method. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reflection_FromStaticMethod)(ani_env *env, ani_object method, ani_static_method *result); - - /** - * @brief Converts a static method to an object. - * - * This function creates an object representing the specified static method. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static method. - * @param[in] method The static method to convert. - * @param[out] result A pointer to store the created object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reflection_ToStaticMethod)(ani_env *env, ani_class cls, ani_static_method method, ani_object *result); - - /** - * @brief Converts an object to a static field. - * - * This function extracts the static field information from a given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] field The object representing the static field. - * @param[out] result A pointer to store the extracted static field. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reflection_FromStaticField)(ani_env *env, ani_object field, ani_static_field *result); - - /** - * @brief Converts a static field to an object. - * - * This function creates an object representing the specified static field. - * - * @param[in] env A pointer to the environment structure. - * @param[in] cls The class containing the static field. - * @param[in] field The static field to convert. - * @param[out] result A pointer to store the created object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reflection_ToStaticField)(ani_env *env, ani_class cls, ani_static_field field, ani_object *result); - - /** - * @brief Converts an object to a function. - * - * This function extracts the function information from a given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] function The object representing the function. - * @param[out] result A pointer to store the extracted function. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reflection_FromFunction)(ani_env *env, ani_object function, ani_function *result); - - /** - * @brief Converts a function to an object. - * - * This function creates an object representing the specified function. - * - * @param[in] env A pointer to the environment structure. - * @param[in] function The function to convert. - * @param[out] result A pointer to store the created object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reflection_ToFunction)(ani_env *env, ani_function function, ani_object *result); - - /** - * @brief Converts an object to a variable. - * - * This function extracts the variable information from a given object. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The object representing the variable. - * @param[out] result A pointer to store the extracted variable. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reflection_FromVariable)(ani_env *env, ani_object variable, ani_variable *result); - - /** - * @brief Converts a variable to an object. - * - * This function creates an object representing the specified variable. - * - * @param[in] env A pointer to the environment structure. - * @param[in] variable The variable to convert. - * @param[out] result A pointer to store the created object. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*Reflection_ToVariable)(ani_env *env, ani_variable variable, ani_object *result); - - /** - * @brief Registers a new coroutine-local storage slot. - * - * This function registers a new coroutine-local storage (CLS) slot with an optional initial data, finalizer, and - * hint. - * - * @param[in] env A pointer to the environment structure. - * @param[in] initial_data A pointer to the initial data to associate with the slot. Can be null. - * @param[in] finalizer A callback function to finalize and clean up the data when it is no longer needed. - * @param[in] hint A user-defined pointer that is passed to the finalizer. Can be null. - * @param[out] result A pointer to store the created CLS slot. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*CLS_Register)(ani_env *env, void *initial_data, ani_finalizer finalizer, void *hint, - ani_cls_slot *result); - - /** - * @brief Unregisters a coroutine-local storage slot. - * - * This function unregisters a previously registered CLS slot, releasing its resources. - * - * @param[in] env A pointer to the environment structure. - * @param[in] slot The CLS slot to unregister. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*CLS_Unregister)(ani_env *env, ani_cls_slot slot); - - /** - * @brief Sets data for a CLS slot. - * - * This function associates the specified data with the given CLS slot. - * - * @param[in] env A pointer to the environment structure. - * @param[in] slot The CLS slot to set data for. - * @param[in] data A pointer to the data to associate with the slot. Can be null. - * @return Returns a status code of type `ani_status` indicating success or failure. - */ - ani_status (*CLS_SetData)(ani_env *env, ani_cls_slot slot, void *data); - - /** - * @brief Retrieves data from a CLS slot. + * @brief Creates a global reference. * - * This function retrieves the data associated with the given CLS slot. + * This function creates a global reference from a local reference. * * @param[in] env A pointer to the environment structure. - * @param[in] slot The CLS slot to retrieve data from. - * @param[out] result A pointer to store the retrieved data. Can be null if no data is associated. + * @param[in] ref The local reference to convert to a global reference. + * @param[out] result A pointer to store the created global reference. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*CLS_GetData)(ani_env *env, ani_cls_slot slot, void **result); + ani_status (*GlobalReference_Create)(ani_env *env, ani_ref ref, ani_ref *result); /** - * @brief Launches a coroutine using a functional object. + * @brief Deletes a global reference. * - * This function starts a coroutine that executes the specified functional object with the given arguments. + * This function deletes the specified global reference, releasing all associated resources. * * @param[in] env A pointer to the environment structure. - * @param[in] fn The functional object to execute. - * @param[in] argc The number of arguments to pass to the functional object. - * @param[in] argv An array of arguments to pass to the functional object. - * @param[out] result A pointer to store the promise representing the coroutine's result. + * @param[in] gref The global reference to delete. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_LaunchFunctionalObject)(ani_env *env, ani_fn_object fn, ani_size argc, ani_ref *argv, - ani_promise *result); + ani_status (*GlobalReference_Delete)(ani_env *env, ani_ref gref); /** - * @brief Launches a coroutine using a function with variadic arguments. + * @brief Creates a weak reference. * - * This function starts a coroutine that executes the specified function with the given arguments. + * This function creates a weak reference from a local reference. * * @param[in] env A pointer to the environment structure. - * @param[in] function The function to execute. - * @param[out] result A pointer to store the promise representing the coroutine's result. - * @param[in] ... Variadic arguments to pass to the function. + * @param[in] ref The local reference to convert to a weak reference. + * @param[out] result A pointer to store the created weak reference. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_LaunchFunction)(ani_env *env, ani_function function, ani_promise *result, ...); + ani_status (*WeakReference_Create)(ani_env *env, ani_ref ref, ani_wref *result); /** - * @brief Launches a coroutine using a function with array-based arguments. + * @brief Deletes a weak reference. * - * This function starts a coroutine that executes the specified function using arguments provided in an array. + * This function deletes the specified weak reference, releasing all associated resources. * * @param[in] env A pointer to the environment structure. - * @param[in] function The function to execute. - * @param[out] result A pointer to store the promise representing the coroutine's result. - * @param[in] args An array of arguments to pass to the function. + * @param[in] wref The weak reference to delete. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_LaunchFunction_A)(ani_env *env, ani_function function, ani_promise *result, - const ani_value *args); + ani_status (*WeakReference_Delete)(ani_env *env, ani_wref wref); /** - * @brief Launches a coroutine using a function with variadic arguments in a `va_list`. + * @brief Retrieves the local reference associated with a weak reference. * - * This function starts a coroutine that executes the specified function using arguments provided in a `va_list`. + * This function retrieves the local reference that corresponds to the specified weak reference. * * @param[in] env A pointer to the environment structure. - * @param[in] function The function to execute. - * @param[out] result A pointer to store the promise representing the coroutine's result. - * @param[in] args A `va_list` of arguments to pass to the function. + * @param[in] wref The weak reference to query. + * @param[out] was_released_result A pointer to boolean flag which indicates that wref is GC collected. + * @param[out] ref_result A pointer to store the retrieved local reference. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_LaunchFunction_V)(ani_env *env, ani_function function, ani_promise *result, va_list args); + ani_status (*WeakReference_GetReference)(ani_env *env, ani_wref wref, ani_boolean *was_released_result, + ani_ref *ref_result); /** - * @brief Launches a coroutine using an object method with variadic arguments. + * @brief Creates a new array buffer. * - * This function starts a coroutine that executes the specified method on the given object with the provided - * arguments. + * This function creates a new array buffer with the specified length and returns a pointer to the allocated data. * * @param[in] env A pointer to the environment structure. - * @param[in] self The object on which the method is to be executed. - * @param[in] function The method to execute. - * @param[out] result A pointer to store the promise representing the coroutine's result. - * @param[in] ... Variadic arguments to pass to the method. + * @param[in] length The length of the array buffer in bytes. + * @param[out] data_result A pointer to store the allocated data of the array buffer. + * @param[out] arraybuffer_result A pointer to store the created array buffer object. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_LaunchMethod)(ani_env *env, ani_object self, ani_function function, ani_promise *result, - ...); + ani_status (*CreateArrayBuffer)(ani_env *env, size_t length, void **data_result, + ani_arraybuffer *arraybuffer_result); /** - * @brief Launches a coroutine using an object method with array-based arguments. + * @brief Creates a new array buffer using external data. * - * This function starts a coroutine that executes the specified method on the given object using arguments provided - * in an array. + * This function creates an array buffer that uses external data. The provided finalizer will be called when the + * array buffer is no longer needed. * * @param[in] env A pointer to the environment structure. - * @param[in] self The object on which the method is to be executed. - * @param[in] function The method to execute. - * @param[out] result A pointer to store the promise representing the coroutine's result. - * @param[in] args An array of arguments to pass to the method. + * @param[in] external_data A pointer to the external data to be used by the array buffer. + * @param[in] length The length of the external data in bytes. + * @param[in] finalizer A callback function to be called when the array buffer is finalized. Can be nullptr. + * @param[in] hint A user-defined hint to be passed to the finalizer. Can be nullptr. + * @param[out] result A pointer to store the created array buffer object. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_LaunchMethod_A)(ani_env *env, ani_object self, ani_function function, ani_promise *result, - const ani_value *args); + ani_status (*CreateArrayBufferExternal)(ani_env *env, void *external_data, size_t length, ani_finalizer finalizer, + void *hint, ani_arraybuffer *result); /** - * @brief Launches a coroutine using an object method with variadic arguments in a `va_list`. + * @brief Retrieves information about an array buffer. * - * This function starts a coroutine that executes the specified method on the given object using arguments provided - * in a `va_list`. + * This function retrieves the data pointer and length of the specified array buffer. * * @param[in] env A pointer to the environment structure. - * @param[in] self The object on which the method is to be executed. - * @param[in] function The method to execute. - * @param[out] result A pointer to store the promise representing the coroutine's result. - * @param[in] args A `va_list` of arguments to pass to the method. + * @param[in] arraybuffer The array buffer to query. + * @param[out] data_result A pointer to store the data of the array buffer. + * @param[out] length_result A pointer to store the length of the array buffer in bytes. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_LaunchMethod_V)(ani_env *env, ani_object self, ani_function function, ani_promise *result, - va_list args); + ani_status (*ArrayBuffer_GetInfo)(ani_env *env, ani_arraybuffer arraybuffer, void **data_result, + size_t *length_result); /** - * @brief Launches a coroutine using a static method with variadic arguments. + * @brief Creates a new Promise. * - * This function starts a coroutine that executes the specified static method on the given class with the provided - * arguments. + * This function creates a new promise and a resolver to manage it. * * @param[in] env A pointer to the environment structure. - * @param[in] cls The class on which the static method is to be executed. - * @param[in] function The static method to execute. - * @param[out] result A pointer to store the promise representing the coroutine's result. - * @param[in] ... Variadic arguments to pass to the static method. + * @param[out] result_resolver A pointer to store the created resolver. + * @param[out] result_promise A pointer to store the created promise. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_LaunchStaticMethod)(ani_env *env, ani_class cls, ani_function function, ani_promise *result, - ...); + ani_status (*Promise_New)(ani_env *env, ani_resolver *result_resolver, ani_object *result_promise); /** - * @brief Launches a coroutine using a static method with array-based arguments. + * @brief Resolves a promise. * - * This function starts a coroutine that executes the specified static method on the given class using arguments - * provided in an array. + * This function resolves a promise by way of the resolver with which it is associated + * and queues promise `then` callbacks. * * @param[in] env A pointer to the environment structure. - * @param[in] cls The class on which the static method is to be executed. - * @param[in] function The static method to execute. - * @param[out] result A pointer to store the promise representing the coroutine's result. - * @param[in] args An array of arguments to pass to the static method. + * @param[in] resolver A resolver whose associated promise to resolve. + * @param[in] resolution A reference with which to resolve the promise. * @return Returns a status code of type `ani_status` indicating success or failure. + * The `resolver` is freed upon successful completion. */ - ani_status (*Coroutine_LaunchStaticMethod_A)(ani_env *env, ani_class cls, ani_function function, - ani_promise *result, const ani_value *args); + ani_status (*PromiseResolver_Resolve)(ani_env *env, ani_resolver resolver, ani_ref resolution); /** - * @brief Launches a coroutine using a static method with variadic arguments in a `va_list`. + * @brief Rejects a promise. * - * This function starts a coroutine that executes the specified static method on the given class using arguments - * provided in a `va_list`. + * This function rejects a promise by way of the resolver with which it is associated + * and queues promise `catch` callbacks. * * @param[in] env A pointer to the environment structure. - * @param[in] cls The class on which the static method is to be executed. - * @param[in] function The static method to execute. - * @param[out] result A pointer to store the promise representing the coroutine's result. - * @param[in] args A `va_list` of arguments to pass to the static method. + * @param[in] resolver A resolver whose associated promise to resolve. + * @param[in] rejection An error with which to reject the promise. * @return Returns a status code of type `ani_status` indicating success or failure. + * The `resolver` is freed upon successful completion. */ - ani_status (*Coroutine_LaunchStaticMethod_V)(ani_env *env, ani_class cls, ani_function function, - ani_promise *result, va_list args); + ani_status (*PromiseResolver_Reject)(ani_env *env, ani_resolver resolver, ani_error rejection); /** - * @brief Awaits the completion of a promise and retrieves a boolean result. + * @brief Creates a new fixedarray of booleans. * - * This function waits for the specified promise to complete and retrieves its result as a boolean value. + * This function creates a new array of the specified length for boolean values. * * @param[in] env A pointer to the environment structure. - * @param[in] promise The promise to await. - * @param[out] value A pointer to store the boolean result of the promise. + * @param[in] length The length of the fixedarray to be created. + * @param[out] result A pointer to store the created FixedArray. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_Await_Boolean)(ani_env *env, ani_promise promise, ani_boolean value); + ani_status (*FixedArray_New_Boolean)(ani_env *env, ani_size length, ani_array_boolean *result); /** - * @brief Awaits the completion of a promise and retrieves a char result. + * @brief Creates a new FixedArray of characters. * - * This function waits for the specified promise to complete and retrieves its result as a char value. + * This function creates a new FixedArray of the specified length for character values. * * @param[in] env A pointer to the environment structure. - * @param[in] promise The promise to await. - * @param[out] value A pointer to store the char result of the promise. + * @param[in] length The length of the FixedArray to be created. + * @param[out] result A pointer to store the created FixedArray. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_Await_Char)(ani_env *env, ani_promise promise, ani_char value); + ani_status (*FixedArray_New_Char)(ani_env *env, ani_size length, ani_array_char *result); /** - * @brief Awaits the completion of a promise and retrieves a byte result. + * @brief Creates a new FixedArray of bytes. * - * This function waits for the specified promise to complete and retrieves its result as a byte value. + * This function creates a new FixedArray of the specified length for byte values. * * @param[in] env A pointer to the environment structure. - * @param[in] promise The promise to await. - * @param[out] value A pointer to store the byte result of the promise. + * @param[in] length The length of the FixedArray to be created. + * @param[out] result A pointer to store the created FixedArray. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_Await_Byte)(ani_env *env, ani_promise promise, ani_byte value); + ani_status (*FixedArray_New_Byte)(ani_env *env, ani_size length, ani_array_byte *result); /** - * @brief Awaits the completion of a promise and retrieves a short result. + * @brief Creates a new FixedArray of shorts. * - * This function waits for the specified promise to complete and retrieves its result as a short value. + * This function creates a new FixedArray of the specified length for short integer values. * * @param[in] env A pointer to the environment structure. - * @param[in] promise The promise to await. - * @param[out] value A pointer to store the short result of the promise. + * @param[in] length The length of the FixedArray to be created. + * @param[out] result A pointer to store the created FixedArray. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_Await_Short)(ani_env *env, ani_promise promise, ani_short value); + ani_status (*FixedArray_New_Short)(ani_env *env, ani_size length, ani_array_short *result); /** - * @brief Awaits the completion of a promise and retrieves a integer result. + * @brief Creates a new FixedArray of integers. * - * This function waits for the specified promise to complete and retrieves its result as a integer value. + * This function creates a new FixedArray of the specified length for integer values. * * @param[in] env A pointer to the environment structure. - * @param[in] promise The promise to await. - * @param[out] value A pointer to store the integer result of the promise. + * @param[in] length The length of the FixedArray to be created. + * @param[out] result A pointer to store the created FixedArray. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_Await_Int)(ani_env *env, ani_promise promise, ani_int value); + ani_status (*FixedArray_New_Int)(ani_env *env, ani_size length, ani_array_int *result); /** - * @brief Awaits the completion of a promise and retrieves a long result. + * @brief Creates a new FixedArray of long integers. * - * This function waits for the specified promise to complete and retrieves its result as a long value. + * This function creates a new FixedArray of the specified length for long integer values. * * @param[in] env A pointer to the environment structure. - * @param[in] promise The promise to await. - * @param[out] value A pointer to store the long result of the promise. + * @param[in] length The length of the FixedArray to be created. + * @param[out] result A pointer to store the created FixedArray. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_Await_Long)(ani_env *env, ani_promise promise, ani_long value); + ani_status (*FixedArray_New_Long)(ani_env *env, ani_size length, ani_array_long *result); /** - * @brief Awaits the completion of a promise and retrieves a float result. + * @brief Creates a new FixedArray of floats. * - * This function waits for the specified promise to complete and retrieves its result as a float value. + * This function creates a new FixedArray of the specified length for float values. * * @param[in] env A pointer to the environment structure. - * @param[in] promise The promise to await. - * @param[out] value A pointer to store the float result of the promise. + * @param[in] length The length of the FixedArray to be created. + * @param[out] result A pointer to store the created FixedArray. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_Await_Float)(ani_env *env, ani_promise promise, ani_float value); + ani_status (*FixedArray_New_Float)(ani_env *env, ani_size length, ani_array_float *result); /** - * @brief Awaits the completion of a promise and retrieves a double result. + * @brief Creates a new FixedArray of doubles. * - * This function waits for the specified promise to complete and retrieves its result as a double value. + * This function creates a new FixedArray of the specified length for double values. * * @param[in] env A pointer to the environment structure. - * @param[in] promise The promise to await. - * @param[out] value A pointer to store the double result of the promise. + * @param[in] length The length of the FixedArray to be created. + * @param[out] result A pointer to store the created FixedArray. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_Await_Double)(ani_env *env, ani_promise promise, ani_double value); + ani_status (*FixedArray_New_Double)(ani_env *env, ani_size length, ani_array_double *result); /** - * @brief Awaits the completion of a promise and retrieves a reference result. + * @brief Creates a new FixedArray of references. * - * This function waits for the specified promise to complete and retrieves its result as a reference. + * This function creates a new FixedArray of references, optionally initializing it with an FixedArray of + * references. * * @param[in] env A pointer to the environment structure. - * @param[in] promise The promise to await. - * @param[out] value A pointer to store the reference result of the promise. + * @param[in] type The type of the elements of the FixedArray. + * @param[in] length The length of the FixedArray to be created. + * @param[in] initial_element An optional reference to initialize the FixedArray. Can be null. + * @param[out] result A pointer to store the created FixedArray of references. * @return Returns a status code of type `ani_status` indicating success or failure. */ - ani_status (*Coroutine_Await_Ref)(ani_env *env, ani_promise promise, ani_ref value); + ani_status (*FixedArray_New_Ref)(ani_env *env, ani_type type, ani_size length, ani_ref initial_element, + ani_array_ref *result); }; // C++ API @@ -6823,15 +5810,15 @@ struct __ani_vm { { return c_api->GetEnv(this, version, result); } - ani_status AttachThread(void *params, ani_env **result) + ani_status AttachCurrentThread(const ani_options *options, uint32_t version, ani_env **result) { - return c_api->AttachThread(this, params, result); + return c_api->AttachCurrentThread(this, options, version, result); } - ani_status DetachThread() + ani_status DetachCurrentThread() { - return c_api->DetachThread(this); + return c_api->DetachCurrentThread(this); } -#endif // __cplusplus +#endif // __cplusplus }; struct __ani_env { @@ -6846,70 +5833,6 @@ struct __ani_env { { return c_api->GetVM(this, result); } - ani_status Reference_IsObject(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsObject(this, ref, result); - } - ani_status Reference_IsFunctionalObject(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsFunctionalObject(this, ref, result); - } - ani_status Reference_IsEnum(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsEnum(this, ref, result); - } - ani_status Reference_IsTuple(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsTuple(this, ref, result); - } - ani_status Reference_IsString(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsString(this, ref, result); - } - ani_status Reference_IsStringLiteral(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsStringLiteral(this, ref, result); - } - ani_status Reference_IsFixedArray(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsFixedArray(this, ref, result); - } - ani_status Reference_IsFixedArray_Boolean(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsFixedArray_Boolean(this, ref, result); - } - ani_status Reference_IsFixedArray_Char(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsFixedArray_Char(this, ref, result); - } - ani_status Reference_IsFixedArray_Byte(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsFixedArray_Byte(this, ref, result); - } - ani_status Reference_IsFixedArray_Short(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsFixedArray_Short(this, ref, result); - } - ani_status Reference_IsFixedArray_Int(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsFixedArray_Int(this, ref, result); - } - ani_status Reference_IsFixedArray_Long(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsFixedArray_Long(this, ref, result); - } - ani_status Reference_IsFixedArray_Float(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsFixedArray_Float(this, ref, result); - } - ani_status Reference_IsFixedArray_Double(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsFixedArray_Double(this, ref, result); - } - ani_status Reference_IsFixedArray_Ref(ani_ref ref, ani_boolean *result) - { - return c_api->Reference_IsFixedArray_Ref(this, ref, result); - } ani_status Object_New(ani_class cls, ani_method method, ani_object *result, ...) { va_list args; @@ -6934,10 +5857,6 @@ struct __ani_env { { return c_api->Object_InstanceOf(this, object, type, result); } - ani_status Object_IsSame(ani_object object1, ani_object object2, ani_boolean *result) - { - return c_api->Object_IsSame(this, object1, object2, result); - } ani_status Type_GetSuperClass(ani_type type, ani_class *result) { return c_api->Type_GetSuperClass(this, type, result); @@ -6962,18 +5881,6 @@ struct __ani_env { { return c_api->FindEnum(this, enum_descriptor, result); } - ani_status FindTuple(const char *tuple_descriptor, ani_tuple *result) - { - return c_api->FindTuple(this, tuple_descriptor, result); - } - ani_status FindFunction(const char *function_descriptor, ani_function *result) - { - return c_api->FindFunction(this, function_descriptor, result); - } - ani_status FindVariable(const char *variable_descriptor, ani_variable *result) - { - return c_api->FindVariable(this, variable_descriptor, result); - } ani_status Module_FindNamespace(ani_module module, const char *namespace_descriptor, ani_namespace *result) { return c_api->Module_FindNamespace(this, module, namespace_descriptor, result); @@ -6990,9 +5897,9 @@ struct __ani_env { { return c_api->Module_FindFunction(this, module, name, signature, result); } - ani_status Module_FindVariable(ani_module module, const char *variable_descriptor, ani_variable *result) + ani_status Module_FindVariable(ani_module module, const char *name, ani_variable *result) { - return c_api->Module_FindVariable(this, module, variable_descriptor, result); + return c_api->Module_FindVariable(this, module, name, result); } ani_status Namespace_FindNamespace(ani_namespace ns, const char *namespace_descriptor, ani_namespace *result) { @@ -7010,9 +5917,9 @@ struct __ani_env { { return c_api->Namespace_FindFunction(this, ns, name, signature, result); } - ani_status Namespace_FindVariable(ani_namespace ns, const char *variable_descriptor, ani_variable *result) + ani_status Namespace_FindVariable(ani_namespace ns, const char *name, ani_variable *result) { - return c_api->Namespace_FindVariable(this, ns, variable_descriptor, result); + return c_api->Namespace_FindVariable(this, ns, name, result); } ani_status Module_BindNativeFunctions(ani_module module, const ani_native_function *functions, ani_size nr_functions) @@ -7140,222 +6047,154 @@ struct __ani_env { return c_api->String_GetUTF8SubString(this, string, substr_offset, substr_size, utf8_buffer, utf8_buffer_size, result); } - ani_status String_GetCritical(ani_string string, uint32_t *result_string_type, const void **result_data, - ani_size *result_size) // result_string_type - string type utf16/utf8, etc - { - return c_api->String_GetCritical(this, string, result_string_type, result_data, result_size); - } - ani_status String_ReleaseCritical(ani_string string, const void *data) - { - return c_api->String_ReleaseCritical(this, string, data); - } - ani_status StringLiteral_NewUTF16(const uint16_t *utf16_string, ani_size utf16_size, ani_stringliteral *result) + ani_status Array_GetLength(ani_array array, ani_size *result) { - return c_api->StringLiteral_NewUTF16(this, utf16_string, utf16_size, result); + return c_api->Array_GetLength(this, array, result); } - ani_status StringLiteral_GetUTF16Size(ani_stringliteral string, ani_size *result) + ani_status Array_New_Boolean(ani_size length, ani_array_boolean *result) { - return c_api->StringLiteral_GetUTF16Size(this, string, result); + return c_api->Array_New_Boolean(this, length, result); } - ani_status StringLiteral_GetUTF16(ani_stringliteral string, uint16_t *utf16_buffer, ani_size utf16_buffer_size, - ani_size *result) + ani_status Array_New_Char(ani_size length, ani_array_char *result) { - return c_api->StringLiteral_GetUTF16(this, string, utf16_buffer, utf16_buffer_size, result); + return c_api->Array_New_Char(this, length, result); } - ani_status StringLiteral_GetUTF16SubString(ani_stringliteral string, ani_size substr_offset, ani_size substr_size, - uint16_t *utf16_buffer, ani_size utf16_buffer_size, ani_size *result) + ani_status Array_New_Byte(ani_size length, ani_array_byte *result) { - return c_api->StringLiteral_GetUTF16SubString(this, string, substr_offset, substr_size, utf16_buffer, - utf16_buffer_size, result); + return c_api->Array_New_Byte(this, length, result); } - ani_status StringLiteral_NewUTF8(const char *utf8_string, ani_size utf8_size, ani_stringliteral *result) + ani_status Array_New_Short(ani_size length, ani_array_short *result) { - return c_api->StringLiteral_NewUTF8(this, utf8_string, utf8_size, result); + return c_api->Array_New_Short(this, length, result); } - ani_status StringLiteral_GetUTF8Size(ani_stringliteral string, ani_size *result) + ani_status Array_New_Int(ani_size length, ani_array_int *result) { - return c_api->StringLiteral_GetUTF8Size(this, string, result); + return c_api->Array_New_Int(this, length, result); } - ani_status StringLiteral_GetUTF8(ani_stringliteral string, char *utf8_buffer, ani_size utf8_buffer_size, - ani_size *result) + ani_status Array_New_Long(ani_size length, ani_array_long *result) { - return c_api->StringLiteral_GetUTF8(this, string, utf8_buffer, utf8_buffer_size, result); + return c_api->Array_New_Long(this, length, result); } - ani_status StringLiteral_GetUTF8SubString(ani_stringliteral string, ani_size substr_offset, ani_size substr_size, - char *utf8_buffer, ani_size utf8_buffer_size, ani_size *result) + ani_status Array_New_Float(ani_size length, ani_array_float *result) { - return c_api->StringLiteral_GetUTF8SubString(this, string, substr_offset, substr_size, utf8_buffer, - utf8_buffer_size, result); + return c_api->Array_New_Float(this, length, result); } - ani_status StringLiteral_GetCritical(ani_stringliteral string, uint32_t *result_string_type, - const void **result_data, - ani_size *result_size) // result_string_type - string type utf16/utf8, etc + ani_status Array_New_Double(ani_size length, ani_array_double *result) { - return c_api->StringLiteral_GetCritical(this, string, result_string_type, result_data, result_size); + return c_api->Array_New_Double(this, length, result); } - ani_status StringLiteral_ReleaseCritical(ani_stringliteral string, const void *data) + ani_status Array_GetRegion_Boolean(ani_array_boolean array, ani_size offset, ani_size length, + ani_boolean *native_buffer) { - return c_api->StringLiteral_ReleaseCritical(this, string, data); + return c_api->Array_GetRegion_Boolean(this, array, offset, length, native_buffer); } - ani_status FixedArray_GetLength(ani_fixedarray array, ani_size *result) + ani_status Array_GetRegion_Char(ani_array_char array, ani_size offset, ani_size length, ani_char *native_buffer) { - return c_api->FixedArray_GetLength(this, array, result); + return c_api->Array_GetRegion_Char(this, array, offset, length, native_buffer); } - ani_status FixedArray_New_Boolean(ani_size length, ani_fixedarray_boolean *result) + ani_status Array_GetRegion_Byte(ani_array_byte array, ani_size offset, ani_size length, ani_byte *native_buffer) { - return c_api->FixedArray_New_Boolean(this, length, result); - } - ani_status FixedArray_New_Char(ani_size length, ani_fixedarray_char *result) - { - return c_api->FixedArray_New_Char(this, length, result); - } - ani_status FixedArray_New_Byte(ani_size length, ani_fixedarray_byte *result) - { - return c_api->FixedArray_New_Byte(this, length, result); - } - ani_status FixedArray_New_Short(ani_size length, ani_fixedarray_short *result) - { - return c_api->FixedArray_New_Short(this, length, result); - } - ani_status FixedArray_New_Int(ani_size length, ani_fixedarray_int *result) - { - return c_api->FixedArray_New_Int(this, length, result); - } - ani_status FixedArray_New_Long(ani_size length, ani_fixedarray_long *result) - { - return c_api->FixedArray_New_Long(this, length, result); + return c_api->Array_GetRegion_Byte(this, array, offset, length, native_buffer); } - ani_status FixedArray_New_Float(ani_size length, ani_fixedarray_float *result) + ani_status Array_GetRegion_Short(ani_array_short array, ani_size offset, ani_size length, ani_short *native_buffer) { - return c_api->FixedArray_New_Float(this, length, result); - } - ani_status FixedArray_New_Double(ani_size length, ani_fixedarray_double *result) - { - return c_api->FixedArray_New_Double(this, length, result); - } - ani_status FixedArray_GetRegion_Boolean(ani_fixedarray_boolean array, ani_size offset, ani_size length, - ani_boolean *native_buffer) - { - return c_api->FixedArray_GetRegion_Boolean(this, array, offset, length, native_buffer); - } - ani_status FixedArray_GetRegion_Char(ani_fixedarray_char array, ani_size offset, ani_size length, - ani_char *native_buffer) - { - return c_api->FixedArray_GetRegion_Char(this, array, offset, length, native_buffer); + return c_api->Array_GetRegion_Short(this, array, offset, length, native_buffer); } - ani_status FixedArray_GetRegion_Byte(ani_fixedarray_byte array, ani_size offset, ani_size length, - ani_byte *native_buffer) + ani_status Array_GetRegion_Int(ani_array_int array, ani_size offset, ani_size length, ani_int *native_buffer) { - return c_api->FixedArray_GetRegion_Byte(this, array, offset, length, native_buffer); + return c_api->Array_GetRegion_Int(this, array, offset, length, native_buffer); } - ani_status FixedArray_GetRegion_Short(ani_fixedarray_short array, ani_size offset, ani_size length, - ani_short *native_buffer) + ani_status Array_GetRegion_Long(ani_array_long array, ani_size offset, ani_size length, ani_long *native_buffer) { - return c_api->FixedArray_GetRegion_Short(this, array, offset, length, native_buffer); + return c_api->Array_GetRegion_Long(this, array, offset, length, native_buffer); } - ani_status FixedArray_GetRegion_Int(ani_fixedarray_int array, ani_size offset, ani_size length, - ani_int *native_buffer) + ani_status Array_GetRegion_Float(ani_array_float array, ani_size offset, ani_size length, ani_float *native_buffer) { - return c_api->FixedArray_GetRegion_Int(this, array, offset, length, native_buffer); + return c_api->Array_GetRegion_Float(this, array, offset, length, native_buffer); } - ani_status FixedArray_GetRegion_Long(ani_fixedarray_long array, ani_size offset, ani_size length, - ani_long *native_buffer) + ani_status Array_GetRegion_Double(ani_array_double array, ani_size offset, ani_size length, + ani_double *native_buffer) { - return c_api->FixedArray_GetRegion_Long(this, array, offset, length, native_buffer); + return c_api->Array_GetRegion_Double(this, array, offset, length, native_buffer); } - ani_status FixedArray_GetRegion_Float(ani_fixedarray_float array, ani_size offset, ani_size length, - ani_float *native_buffer) + ani_status Array_SetRegion_Boolean(ani_array_boolean array, ani_size offset, ani_size length, + const ani_boolean *native_buffer) { - return c_api->FixedArray_GetRegion_Float(this, array, offset, length, native_buffer); + return c_api->Array_SetRegion_Boolean(this, array, offset, length, native_buffer); } - ani_status FixedArray_GetRegion_Double(ani_fixedarray_double array, ani_size offset, ani_size length, - ani_double *native_buffer) + ani_status Array_SetRegion_Char(ani_array_char array, ani_size offset, ani_size length, + const ani_char *native_buffer) { - return c_api->FixedArray_GetRegion_Double(this, array, offset, length, native_buffer); + return c_api->Array_SetRegion_Char(this, array, offset, length, native_buffer); } - ani_status FixedArray_SetRegion_Boolean(ani_fixedarray_boolean array, ani_size offset, ani_size length, - const ani_boolean *native_buffer) + ani_status Array_SetRegion_Byte(ani_array_byte array, ani_size offset, ani_size length, + const ani_byte *native_buffer) { - return c_api->FixedArray_SetRegion_Boolean(this, array, offset, length, native_buffer); + return c_api->Array_SetRegion_Byte(this, array, offset, length, native_buffer); } - ani_status FixedArray_SetRegion_Char(ani_fixedarray_char array, ani_size offset, ani_size length, - const ani_char *native_buffer) + ani_status Array_SetRegion_Short(ani_array_short array, ani_size offset, ani_size length, + const ani_short *native_buffer) { - return c_api->FixedArray_SetRegion_Char(this, array, offset, length, native_buffer); + return c_api->Array_SetRegion_Short(this, array, offset, length, native_buffer); } - ani_status FixedArray_SetRegion_Byte(ani_fixedarray_byte array, ani_size offset, ani_size length, - const ani_byte *native_buffer) + ani_status Array_SetRegion_Int(ani_array_int array, ani_size offset, ani_size length, const ani_int *native_buffer) { - return c_api->FixedArray_SetRegion_Byte(this, array, offset, length, native_buffer); + return c_api->Array_SetRegion_Int(this, array, offset, length, native_buffer); } - ani_status FixedArray_SetRegion_Short(ani_fixedarray_short array, ani_size offset, ani_size length, - const ani_short *native_buffer) + ani_status Array_SetRegion_Long(ani_array_long array, ani_size offset, ani_size length, + const ani_long *native_buffer) { - return c_api->FixedArray_SetRegion_Short(this, array, offset, length, native_buffer); + return c_api->Array_SetRegion_Long(this, array, offset, length, native_buffer); } - ani_status FixedArray_SetRegion_Int(ani_fixedarray_int array, ani_size offset, ani_size length, - const ani_int *native_buffer) + ani_status Array_SetRegion_Float(ani_array_float array, ani_size offset, ani_size length, + const ani_float *native_buffer) { - return c_api->FixedArray_SetRegion_Int(this, array, offset, length, native_buffer); + return c_api->Array_SetRegion_Float(this, array, offset, length, native_buffer); } - ani_status FixedArray_SetRegion_Long(ani_fixedarray_long array, ani_size offset, ani_size length, - const ani_long *native_buffer) + ani_status Array_SetRegion_Double(ani_array_double array, ani_size offset, ani_size length, + const ani_double *native_buffer) { - return c_api->FixedArray_SetRegion_Long(this, array, offset, length, native_buffer); + return c_api->Array_SetRegion_Double(this, array, offset, length, native_buffer); } - ani_status FixedArray_SetRegion_Float(ani_fixedarray_float array, ani_size offset, ani_size length, - const ani_float *native_buffer) + ani_status Array_New_Ref(ani_type type, ani_size length, ani_ref initial_element, ani_array_ref *result) { - return c_api->FixedArray_SetRegion_Float(this, array, offset, length, native_buffer); + return c_api->Array_New_Ref(this, type, length, initial_element, result); } - ani_status FixedArray_SetRegion_Double(ani_fixedarray_double array, ani_size offset, ani_size length, - const ani_double *native_buffer) + ani_status Array_Set_Ref(ani_array_ref array, ani_size index, ani_ref ref) { - return c_api->FixedArray_SetRegion_Double(this, array, offset, length, native_buffer); + return c_api->Array_Set_Ref(this, array, index, ref); } - ani_status FixedArray_Pin(ani_fixedarray primitive_array, void **result) + ani_status Array_Get_Ref(ani_array_ref array, ani_size index, ani_ref *result) { - return c_api->FixedArray_Pin(this, primitive_array, result); + return c_api->Array_Get_Ref(this, array, index, result); } - ani_status FixedArray_Unpin(ani_fixedarray primitive_array, void *data) + ani_status Enum_GetEnumItemByName(ani_enum enm, const char *name, ani_enum_item *result) { - return c_api->FixedArray_Unpin(this, primitive_array, data); + return c_api->Enum_GetEnumItemByName(this, enm, name, result); } - ani_status FixedArray_New_Ref(ani_size length, ani_ref *initial_array, ani_fixedarray_ref *result) + ani_status Enum_GetEnumItemByIndex(ani_enum enm, ani_size index, ani_enum_item *result) { - return c_api->FixedArray_New_Ref(this, length, initial_array, result); + return c_api->Enum_GetEnumItemByIndex(this, enm, index, result); } - ani_status FixedArray_Set_Ref(ani_fixedarray_ref array, ani_size index, ani_ref ref) + ani_status EnumItem_GetEnum(ani_enum_item enum_item, ani_enum *result) { - return c_api->FixedArray_Set_Ref(this, array, index, ref); + return c_api->EnumItem_GetEnum(this, enum_item, result); } - ani_status FixedArray_Get_Ref(ani_fixedarray_ref array, ani_size index, ani_ref *result) + ani_status EnumItem_GetValue_Int(ani_enum_item enum_item, ani_int *result) { - return c_api->FixedArray_Get_Ref(this, array, index, result); + return c_api->EnumItem_GetValue_Int(this, enum_item, result); } - ani_status Enum_GetEnumValueByName(ani_enum enm, const char *name, ani_enum_value *result) + ani_status EnumItem_GetValue_String(ani_enum_item enum_item, ani_string *result) { - return c_api->Enum_GetEnumValueByName(this, enm, name, result); + return c_api->EnumItem_GetValue_String(this, enum_item, result); } - ani_status Enum_GetEnumValueByIndex(ani_enum enm, ani_size index, ani_enum_value *result) + ani_status EnumItem_GetName(ani_enum_item enum_item, ani_string *result) { - return c_api->Enum_GetEnumValueByIndex(this, enm, index, result); + return c_api->EnumItem_GetName(this, enum_item, result); } - ani_status EnumValue_GetEnum(ani_enum_value enum_value, ani_enum *result) + ani_status EnumItem_GetIndex(ani_enum_item enum_item, ani_size *result) { - return c_api->EnumValue_GetEnum(this, enum_value, result); - } - ani_status EnumValue_GetValue(ani_enum_value enum_value, ani_object *result) - { - return c_api->EnumValue_GetValue(this, enum_value, result); - } - ani_status EnumValue_GetName(ani_enum_value enum_value, ani_string *result) - { - return c_api->EnumValue_GetName(this, enum_value, result); - } - ani_status EnumValue_GetIndex(ani_enum_value enum_value, ani_size *result) - { - return c_api->EnumValue_GetIndex(this, enum_value, result); + return c_api->EnumItem_GetIndex(this, enum_item, result); } ani_status FunctionalObject_Call(ani_fn_object fn, ani_size argc, ani_ref *argv, ani_ref *result) { @@ -7593,53 +6432,41 @@ struct __ani_env { { return c_api->Function_Call_Void_V(this, fn, args); } - ani_status Class_GetPartial(ani_class cls, ani_class *result) - { - return c_api->Class_GetPartial(this, cls, result); - } - ani_status Class_GetRequired(ani_class cls, ani_class *result) + ani_status Class_FindField(ani_class cls, const char *name, ani_field *result) { - return c_api->Class_GetRequired(this, cls, result); + return c_api->Class_FindField(this, cls, name, result); } - ani_status Class_GetField(ani_class cls, const char *name, ani_field *result) + ani_status Class_FindStaticField(ani_class cls, const char *name, ani_static_field *result) { - return c_api->Class_GetField(this, cls, name, result); + return c_api->Class_FindStaticField(this, cls, name, result); } - ani_status Class_GetStaticField(ani_class cls, const char *name, ani_static_field *result) + ani_status Class_FindMethod(ani_class cls, const char *name, const char *signature, ani_method *result) { - return c_api->Class_GetStaticField(this, cls, name, result); + return c_api->Class_FindMethod(this, cls, name, signature, result); } - ani_status Class_GetMethod(ani_class cls, const char *name, const char *signature, ani_method *result) + ani_status Class_FindStaticMethod(ani_class cls, const char *name, const char *signature, ani_static_method *result) { - return c_api->Class_GetMethod(this, cls, name, signature, result); + return c_api->Class_FindStaticMethod(this, cls, name, signature, result); } - ani_status Class_GetStaticMethod(ani_class cls, const char *name, const char *signature, ani_static_method *result) + ani_status Class_FindSetter(ani_class cls, const char *name, ani_method *result) { - return c_api->Class_GetStaticMethod(this, cls, name, signature, result); + return c_api->Class_FindSetter(this, cls, name, result); } - ani_status Class_GetProperty(ani_class cls, const char *name, ani_property *result) + ani_status Class_FindGetter(ani_class cls, const char *name, ani_method *result) { - return c_api->Class_GetProperty(this, cls, name, result); + return c_api->Class_FindGetter(this, cls, name, result); } - ani_status Class_GetSetter(ani_class cls, const char *name, ani_method *result) + ani_status Class_FindIndexableGetter(ani_class cls, const char *signature, ani_method *result) { - return c_api->Class_GetSetter(this, cls, name, result); + return c_api->Class_FindIndexableGetter(this, cls, signature, result); } - ani_status Class_GetGetter(ani_class cls, const char *name, ani_method *result) + ani_status Class_FindIndexableSetter(ani_class cls, const char *signature, ani_method *result) { - return c_api->Class_GetGetter(this, cls, name, result); + return c_api->Class_FindIndexableSetter(this, cls, signature, result); } - ani_status Class_GetIndexableGetter(ani_class cls, const char *signature, ani_method *result) + ani_status Class_FindIterator(ani_class cls, ani_method *result) { - return c_api->Class_GetIndexableGetter(this, cls, signature, result); - } - ani_status Class_GetIndexableSetter(ani_class cls, const char *signature, ani_method *result) - { - return c_api->Class_GetIndexableSetter(this, cls, signature, result); - } - ani_status Class_GetIterator(ani_class cls, ani_method *result) - { - return c_api->Class_GetIterator(this, cls, result); + return c_api->Class_FindIterator(this, cls, result); } ani_status Class_GetStaticField_Boolean(ani_class cls, ani_static_field field, ani_boolean *result) { @@ -7956,175 +6783,193 @@ struct __ani_env { { return c_api->Class_CallStaticMethod_Void_V(this, cls, method, args); } - ani_status Class_CallStaticMethodByName_Boolean(ani_class cls, const char *name, ani_boolean *result, ...) + ani_status Class_CallStaticMethodByName_Boolean(ani_class cls, const char *name, const char *signature, + ani_boolean *result, ...) { va_list args; va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Boolean_V(this, cls, name, result, args); + ani_status status = c_api->Class_CallStaticMethodByName_Boolean_V(this, cls, name, signature, result, args); va_end(args); return status; } - ani_status Class_CallStaticMethodByName_Boolean_A(ani_class cls, const char *name, ani_boolean *result, - const ani_value *args) + ani_status Class_CallStaticMethodByName_Boolean_A(ani_class cls, const char *name, const char *signature, + ani_boolean *result, const ani_value *args) { - return c_api->Class_CallStaticMethodByName_Boolean_A(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Boolean_A(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Boolean_V(ani_class cls, const char *name, ani_boolean *result, - va_list args) + ani_status Class_CallStaticMethodByName_Boolean_V(ani_class cls, const char *name, const char *signature, + ani_boolean *result, va_list args) { - return c_api->Class_CallStaticMethodByName_Boolean_V(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Boolean_V(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Char(ani_class cls, const char *name, ani_char *result, ...) + ani_status Class_CallStaticMethodByName_Char(ani_class cls, const char *name, const char *signature, + ani_char *result, ...) { va_list args; va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Char_V(this, cls, name, result, args); + ani_status status = c_api->Class_CallStaticMethodByName_Char_V(this, cls, name, signature, result, args); va_end(args); return status; } - ani_status Class_CallStaticMethodByName_Char_A(ani_class cls, const char *name, ani_char *result, - const ani_value *args) + ani_status Class_CallStaticMethodByName_Char_A(ani_class cls, const char *name, const char *signature, + ani_char *result, const ani_value *args) { - return c_api->Class_CallStaticMethodByName_Char_A(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Char_A(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Char_V(ani_class cls, const char *name, ani_char *result, va_list args) + ani_status Class_CallStaticMethodByName_Char_V(ani_class cls, const char *name, const char *signature, + ani_char *result, va_list args) { - return c_api->Class_CallStaticMethodByName_Char_V(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Char_V(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Byte(ani_class cls, const char *name, ani_byte *result, ...) + ani_status Class_CallStaticMethodByName_Byte(ani_class cls, const char *name, const char *signature, + ani_byte *result, ...) { va_list args; va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Byte_V(this, cls, name, result, args); + ani_status status = c_api->Class_CallStaticMethodByName_Byte_V(this, cls, name, signature, result, args); va_end(args); return status; } - ani_status Class_CallStaticMethodByName_Byte_A(ani_class cls, const char *name, ani_byte *result, - const ani_value *args) + ani_status Class_CallStaticMethodByName_Byte_A(ani_class cls, const char *name, const char *signature, + ani_byte *result, const ani_value *args) { - return c_api->Class_CallStaticMethodByName_Byte_A(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Byte_A(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Byte_V(ani_class cls, const char *name, ani_byte *result, va_list args) + ani_status Class_CallStaticMethodByName_Byte_V(ani_class cls, const char *name, const char *signature, + ani_byte *result, va_list args) { - return c_api->Class_CallStaticMethodByName_Byte_V(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Byte_V(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Short(ani_class cls, const char *name, ani_short *result, ...) + ani_status Class_CallStaticMethodByName_Short(ani_class cls, const char *name, const char *signature, + ani_short *result, ...) { va_list args; va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Short_V(this, cls, name, result, args); + ani_status status = c_api->Class_CallStaticMethodByName_Short_V(this, cls, name, signature, result, args); va_end(args); return status; } - ani_status Class_CallStaticMethodByName_Short_A(ani_class cls, const char *name, ani_short *result, - const ani_value *args) + ani_status Class_CallStaticMethodByName_Short_A(ani_class cls, const char *name, const char *signature, + ani_short *result, const ani_value *args) { - return c_api->Class_CallStaticMethodByName_Short_A(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Short_A(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Short_V(ani_class cls, const char *name, ani_short *result, va_list args) + ani_status Class_CallStaticMethodByName_Short_V(ani_class cls, const char *name, const char *signature, + ani_short *result, va_list args) { - return c_api->Class_CallStaticMethodByName_Short_V(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Short_V(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Int(ani_class cls, const char *name, ani_int *result, ...) + ani_status Class_CallStaticMethodByName_Int(ani_class cls, const char *name, const char *signature, ani_int *result, + ...) { va_list args; va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Int_V(this, cls, name, result, args); + ani_status status = c_api->Class_CallStaticMethodByName_Int_V(this, cls, name, signature, result, args); va_end(args); return status; } - ani_status Class_CallStaticMethodByName_Int_A(ani_class cls, const char *name, ani_int *result, - const ani_value *args) + ani_status Class_CallStaticMethodByName_Int_A(ani_class cls, const char *name, const char *signature, + ani_int *result, const ani_value *args) { - return c_api->Class_CallStaticMethodByName_Int_A(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Int_A(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Int_V(ani_class cls, const char *name, ani_int *result, va_list args) + ani_status Class_CallStaticMethodByName_Int_V(ani_class cls, const char *name, const char *signature, + ani_int *result, va_list args) { - return c_api->Class_CallStaticMethodByName_Int_V(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Int_V(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Long(ani_class cls, const char *name, ani_long *result, ...) + ani_status Class_CallStaticMethodByName_Long(ani_class cls, const char *name, const char *signature, + ani_long *result, ...) { va_list args; va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Long_V(this, cls, name, result, args); + ani_status status = c_api->Class_CallStaticMethodByName_Long_V(this, cls, name, signature, result, args); va_end(args); return status; } - ani_status Class_CallStaticMethodByName_Long_A(ani_class cls, const char *name, ani_long *result, - const ani_value *args) + ani_status Class_CallStaticMethodByName_Long_A(ani_class cls, const char *name, const char *signature, + ani_long *result, const ani_value *args) { - return c_api->Class_CallStaticMethodByName_Long_A(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Long_A(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Long_V(ani_class cls, const char *name, ani_long *result, va_list args) + ani_status Class_CallStaticMethodByName_Long_V(ani_class cls, const char *name, const char *signature, + ani_long *result, va_list args) { - return c_api->Class_CallStaticMethodByName_Long_V(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Long_V(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Float(ani_class cls, const char *name, ani_float *result, ...) + ani_status Class_CallStaticMethodByName_Float(ani_class cls, const char *name, const char *signature, + ani_float *result, ...) { va_list args; va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Float_V(this, cls, name, result, args); + ani_status status = c_api->Class_CallStaticMethodByName_Float_V(this, cls, name, signature, result, args); va_end(args); return status; } - ani_status Class_CallStaticMethodByName_Float_A(ani_class cls, const char *name, ani_float *result, - const ani_value *args) + ani_status Class_CallStaticMethodByName_Float_A(ani_class cls, const char *name, const char *signature, + ani_float *result, const ani_value *args) { - return c_api->Class_CallStaticMethodByName_Float_A(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Float_A(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Float_V(ani_class cls, const char *name, ani_float *result, va_list args) + ani_status Class_CallStaticMethodByName_Float_V(ani_class cls, const char *name, const char *signature, + ani_float *result, va_list args) { - return c_api->Class_CallStaticMethodByName_Float_V(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Float_V(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Double(ani_class cls, const char *name, ani_double *result, ...) + ani_status Class_CallStaticMethodByName_Double(ani_class cls, const char *name, const char *signature, + ani_double *result, ...) { va_list args; va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Double_V(this, cls, name, result, args); + ani_status status = c_api->Class_CallStaticMethodByName_Double_V(this, cls, name, signature, result, args); va_end(args); return status; } - ani_status Class_CallStaticMethodByName_Double_A(ani_class cls, const char *name, ani_double *result, - const ani_value *args) + ani_status Class_CallStaticMethodByName_Double_A(ani_class cls, const char *name, const char *signature, + ani_double *result, const ani_value *args) { - return c_api->Class_CallStaticMethodByName_Double_A(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Double_A(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Double_V(ani_class cls, const char *name, ani_double *result, va_list args) + ani_status Class_CallStaticMethodByName_Double_V(ani_class cls, const char *name, const char *signature, + ani_double *result, va_list args) { - return c_api->Class_CallStaticMethodByName_Double_V(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Double_V(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Ref(ani_class cls, const char *name, ani_ref *result, ...) + ani_status Class_CallStaticMethodByName_Ref(ani_class cls, const char *name, const char *signature, ani_ref *result, + ...) { va_list args; va_start(args, result); - ani_status status = c_api->Class_CallStaticMethodByName_Ref_V(this, cls, name, result, args); + ani_status status = c_api->Class_CallStaticMethodByName_Ref_V(this, cls, name, signature, result, args); va_end(args); return status; } - ani_status Class_CallStaticMethodByName_Ref_A(ani_class cls, const char *name, ani_ref *result, - const ani_value *args) + ani_status Class_CallStaticMethodByName_Ref_A(ani_class cls, const char *name, const char *signature, + ani_ref *result, const ani_value *args) { - return c_api->Class_CallStaticMethodByName_Ref_A(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Ref_A(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Ref_V(ani_class cls, const char *name, ani_ref *result, va_list args) + ani_status Class_CallStaticMethodByName_Ref_V(ani_class cls, const char *name, const char *signature, + ani_ref *result, va_list args) { - return c_api->Class_CallStaticMethodByName_Ref_V(this, cls, name, result, args); + return c_api->Class_CallStaticMethodByName_Ref_V(this, cls, name, signature, result, args); } - ani_status Class_CallStaticMethodByName_Void(ani_class cls, const char *name, ...) + ani_status Class_CallStaticMethodByName_Void(ani_class cls, const char *name, const char *signature, ...) { va_list args; - va_start(args, name); - ani_status status = c_api->Class_CallStaticMethodByName_Void_V(this, cls, name, args); + va_start(args, signature); + ani_status status = c_api->Class_CallStaticMethodByName_Void_V(this, cls, name, signature, args); va_end(args); return status; } - ani_status Class_CallStaticMethodByName_Void_A(ani_class cls, const char *name, const ani_value *args) + ani_status Class_CallStaticMethodByName_Void_A(ani_class cls, const char *name, const char *signature, + const ani_value *args) { - return c_api->Class_CallStaticMethodByName_Void_A(this, cls, name, args); + return c_api->Class_CallStaticMethodByName_Void_A(this, cls, name, signature, args); } - ani_status Class_CallStaticMethodByName_Void_V(ani_class cls, const char *name, va_list args) + ani_status Class_CallStaticMethodByName_Void_V(ani_class cls, const char *name, const char *signature, va_list args) { - return c_api->Class_CallStaticMethodByName_Void_V(this, cls, name, args); + return c_api->Class_CallStaticMethodByName_Void_V(this, cls, name, signature, args); } ani_status Object_GetField_Boolean(ani_object object, ani_field field, ani_boolean *result) { @@ -8270,78 +7115,6 @@ struct __ani_env { { return c_api->Object_SetFieldByName_Ref(this, object, name, value); } - ani_status Object_GetProperty_Boolean(ani_object object, ani_property property, ani_boolean *result) - { - return c_api->Object_GetProperty_Boolean(this, object, property, result); - } - ani_status Object_GetProperty_Char(ani_object object, ani_property property, ani_char *result) - { - return c_api->Object_GetProperty_Char(this, object, property, result); - } - ani_status Object_GetProperty_Byte(ani_object object, ani_property property, ani_byte *result) - { - return c_api->Object_GetProperty_Byte(this, object, property, result); - } - ani_status Object_GetProperty_Short(ani_object object, ani_property property, ani_short *result) - { - return c_api->Object_GetProperty_Short(this, object, property, result); - } - ani_status Object_GetProperty_Int(ani_object object, ani_property property, ani_int *result) - { - return c_api->Object_GetProperty_Int(this, object, property, result); - } - ani_status Object_GetProperty_Long(ani_object object, ani_property property, ani_long *result) - { - return c_api->Object_GetProperty_Long(this, object, property, result); - } - ani_status Object_GetProperty_Float(ani_object object, ani_property property, ani_float *result) - { - return c_api->Object_GetProperty_Float(this, object, property, result); - } - ani_status Object_GetProperty_Double(ani_object object, ani_property property, ani_double *result) - { - return c_api->Object_GetProperty_Double(this, object, property, result); - } - ani_status Object_GetProperty_Ref(ani_object object, ani_property property, ani_ref *result) - { - return c_api->Object_GetProperty_Ref(this, object, property, result); - } - ani_status Object_SetProperty_Boolean(ani_object object, ani_property property, ani_boolean value) - { - return c_api->Object_SetProperty_Boolean(this, object, property, value); - } - ani_status Object_SetProperty_Char(ani_object object, ani_property property, ani_char value) - { - return c_api->Object_SetProperty_Char(this, object, property, value); - } - ani_status Object_SetProperty_Byte(ani_object object, ani_property property, ani_byte value) - { - return c_api->Object_SetProperty_Byte(this, object, property, value); - } - ani_status Object_SetProperty_Short(ani_object object, ani_property property, ani_short value) - { - return c_api->Object_SetProperty_Byte(this, object, property, value); - } - ani_status Object_SetProperty_Int(ani_object object, ani_property property, ani_int value) - { - return c_api->Object_SetProperty_Int(this, object, property, value); - } - ani_status Object_SetProperty_Long(ani_object object, ani_property property, ani_long value) - { - return c_api->Object_SetProperty_Long(this, object, property, value); - } - ani_status Object_SetProperty_Float(ani_object object, ani_property property, ani_float value) - { - return c_api->Object_SetProperty_Float(this, object, property, value); - } - ani_status Object_SetProperty_Double(ani_object object, ani_property property, ani_double value) - { - return c_api->Object_SetProperty_Double(this, object, property, value); - } - ani_status Object_SetProperty_Ref(ani_object object, ani_property property, ani_ref value) - { - return c_api->Object_SetProperty_Ref(this, object, property, value); - } ani_status Object_GetPropertyByName_Boolean(ani_object object, const char *name, ani_boolean *result) { return c_api->Object_GetPropertyByName_Boolean(this, object, name, result); @@ -8764,37 +7537,9 @@ struct __ani_env { { return c_api->Object_CallMethodByName_Void_V(this, object, name, signature, args); } - ani_status Tuple_NewTupleValue(ani_tuple tuple, ani_tuple_value *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Tuple_NewTupleValue_V(this, tuple, result, args); - va_end(args); - return status; - } - ani_status Tuple_NewTupleValue_A(ani_tuple tuple, ani_tuple_value *result, const ani_value *args) - { - return c_api->Tuple_NewTupleValue_A(this, tuple, result, args); - } - ani_status Tuple_NewTupleValue_V(ani_tuple tuple, ani_tuple_value *result, va_list args) - { - return c_api->Tuple_NewTupleValue_V(this, tuple, result, args); - } - ani_status Tuple_GetNumberOfItems(ani_tuple tuple, ani_size *result) - { - return c_api->Tuple_GetNumberOfItems(this, tuple, result); - } - ani_status Tuple_GetItemKind(ani_tuple tuple, ani_size index, ani_kind *result) - { - return c_api->Tuple_GetItemKind(this, tuple, index, result); - } - ani_status Tuple_GetItemType(ani_tuple tuple, ani_size index, ani_type *result) - { - return c_api->Tuple_GetItemType(this, tuple, index, result); - } - ani_status TupleValue_GetTuple(ani_tuple_value value, ani_tuple *result) + ani_status TupleValue_GetNumberOfItems(ani_tuple_value tuple_value, ani_size *result) { - return c_api->TupleValue_GetTuple(this, value, result); + return c_api->TupleValue_GetNumberOfItems(this, tuple_value, result); } ani_status TupleValue_GetItem_Boolean(ani_tuple_value tuple_value, ani_size index, ani_boolean *result) { @@ -8868,11 +7613,11 @@ struct __ani_env { { return c_api->TupleValue_SetItem_Ref(this, tuple_value, index, value); } - ani_status GlobalReference_Create(ani_ref ref, ani_gref *result) + ani_status GlobalReference_Create(ani_ref ref, ani_ref *result) { return c_api->GlobalReference_Create(this, ref, result); } - ani_status GlobalReference_Delete(ani_gref ref) + ani_status GlobalReference_Delete(ani_ref ref) { return c_api->GlobalReference_Delete(this, ref); } @@ -8884,9 +7629,9 @@ struct __ani_env { { return c_api->WeakReference_Delete(this, wref); } - ani_status WeakReference_GetReference(ani_wref wref, ani_ref *result) + ani_status WeakReference_GetReference(ani_wref wref, ani_boolean *was_released_result, ani_ref *ref_result) { - return c_api->WeakReference_GetReference(this, wref, result); + return c_api->WeakReference_GetReference(this, wref, was_released_result, ref_result); } ani_status CreateArrayBuffer(size_t length, void **data_result, ani_arraybuffer *arraybuffer_result) { @@ -8901,162 +7646,56 @@ struct __ani_env { { return c_api->ArrayBuffer_GetInfo(this, arraybuffer, data_result, length_result); } - ani_status Reflection_FromMethod(ani_object method, ani_method *result) - { - return c_api->Reflection_FromMethod(this, method, result); - } - ani_status Reflection_ToMethod(ani_class cls, ani_method method, ani_object *result) - { - return c_api->Reflection_ToMethod(this, cls, method, result); - } - ani_status Reflection_FromField(ani_object field, ani_field *result) - { - return c_api->Reflection_FromField(this, field, result); - } - ani_status Reflection_ToField(ani_class cls, ani_field field, ani_object *result) - { - return c_api->Reflection_ToField(this, cls, field, result); - } - ani_status Reflection_FromStaticMethod(ani_object method, ani_static_method *result) - { - return c_api->Reflection_FromStaticMethod(this, method, result); - } - ani_status Reflection_ToStaticMethod(ani_class cls, ani_static_method method, ani_object *result) - { - return c_api->Reflection_ToStaticMethod(this, cls, method, result); - } - ani_status Reflection_FromStaticField(ani_object field, ani_static_field *result) - { - return c_api->Reflection_FromStaticField(this, field, result); - } - ani_status Reflection_ToStaticField(ani_class cls, ani_static_field field, ani_object *result) - { - return c_api->Reflection_ToStaticField(this, cls, field, result); - } - ani_status Reflection_FromFunction(ani_object function, ani_function *result) - { - return c_api->Reflection_FromFunction(this, function, result); - } - ani_status Reflection_ToFunction(ani_function function, ani_object *result) - { - return c_api->Reflection_ToFunction(this, function, result); - } - ani_status Reflection_FromVariable(ani_object variable, ani_variable *result) - { - return c_api->Reflection_FromVariable(this, variable, result); - } - ani_status Reflection_ToVariable(ani_variable variable, ani_object *result) - { - return c_api->Reflection_ToVariable(this, variable, result); - } - ani_status CLS_Register(void *initial_data, ani_finalizer finalizer, void *hint, ani_cls_slot *result) - { - return c_api->CLS_Register(this, initial_data, finalizer, hint, result); - } - ani_status CLS_Unregister(ani_cls_slot slot) - { - return c_api->CLS_Unregister(this, slot); - } - ani_status CLS_SetData(ani_cls_slot slot, void *data) - { - return c_api->CLS_SetData(this, slot, data); - } - ani_status CLS_GetData(ani_cls_slot slot, void **result) - { - return c_api->CLS_GetData(this, slot, result); - } - ani_status Coroutine_LaunchFunctionalObject(ani_fn_object fn, ani_size argc, ani_ref *argv, ani_promise *result) - { - return c_api->Coroutine_LaunchFunctionalObject(this, fn, argc, argv, result); - } - ani_status Coroutine_LaunchFunction(ani_function function, ani_promise *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Coroutine_LaunchFunction_V(this, function, result, args); - va_end(args); - return status; - } - ani_status Coroutine_LaunchFunction_A(ani_function function, ani_promise *result, const ani_value *args) - { - return c_api->Coroutine_LaunchFunction_A(this, function, result, args); - } - ani_status Coroutine_LaunchFunction_V(ani_function function, ani_promise *result, va_list args) - { - return c_api->Coroutine_LaunchFunction_V(this, function, result, args); - } - ani_status Coroutine_LaunchMethod(ani_object self, ani_function function, ani_promise *result, ...) - { - va_list args; - va_start(args, result); - ani_status status = c_api->Coroutine_LaunchMethod_V(this, self, function, result, args); - va_end(args); - return status; - } - ani_status Coroutine_LaunchMethod_A(ani_object self, ani_function function, ani_promise *result, - const ani_value *args) - { - return c_api->Coroutine_LaunchMethod_A(this, self, function, result, args); - } - ani_status Coroutine_LaunchMethod_V(ani_object self, ani_function function, ani_promise *result, va_list args) - { - return c_api->Coroutine_LaunchMethod_V(this, self, function, result, args); - } - ani_status Coroutine_LaunchStaticMethod(ani_class cls, ani_function function, ani_promise *result, ...) + ani_status Promise_New(ani_resolver *result_resolver, ani_object *result_promise) { - va_list args; - va_start(args, result); - ani_status status = c_api->Coroutine_LaunchStaticMethod_V(this, cls, function, result, args); - va_end(args); - return status; + return c_api->Promise_New(this, result_resolver, result_promise); } - ani_status Coroutine_LaunchStaticMethod_A(ani_class cls, ani_function function, ani_promise *result, - const ani_value *args) + ani_status PromiseResolver_Resolve(ani_resolver resolver, ani_ref resolution) { - return c_api->Coroutine_LaunchStaticMethod_A(this, cls, function, result, args); + return c_api->PromiseResolver_Resolve(this, resolver, resolution); } - ani_status Coroutine_LaunchStaticMethod_V(ani_class cls, ani_function function, ani_promise *result, va_list args) + ani_status PromiseResolver_Reject(ani_resolver resolver, ani_error rejection) { - return c_api->Coroutine_LaunchStaticMethod_V(this, cls, function, result, args); + return c_api->PromiseResolver_Reject(this, resolver, rejection); } - ani_status Coroutine_Await_Boolean(ani_promise promise, ani_boolean value) + ani_status FixedArray_New_Boolean(ani_size length, ani_array_boolean *result) { - return c_api->Coroutine_Await_Boolean(this, promise, value); + return c_api->FixedArray_New_Boolean(this, length, result); } - ani_status Coroutine_Await_Char(ani_promise promise, ani_char value) + ani_status FixedArray_New_Char(ani_size length, ani_array_char *result) { - return c_api->Coroutine_Await_Char(this, promise, value); + return c_api->FixedArray_New_Char(this, length, result); } - ani_status Coroutine_Await_Byte(ani_promise promise, ani_byte value) + ani_status FixedArray_New_Byte(ani_size length, ani_array_byte *result) { - return c_api->Coroutine_Await_Byte(this, promise, value); + return c_api->FixedArray_New_Byte(this, length, result); } - ani_status Coroutine_Await_Short(ani_promise promise, ani_short value) + ani_status FixedArray_New_Short(ani_size length, ani_array_short *result) { - return c_api->Coroutine_Await_Short(this, promise, value); + return c_api->FixedArray_New_Short(this, length, result); } - ani_status Coroutine_Await_Int(ani_promise promise, ani_int value) + ani_status FixedArray_New_Int(ani_size length, ani_array_int *result) { - return c_api->Coroutine_Await_Int(this, promise, value); + return c_api->FixedArray_New_Int(this, length, result); } - ani_status Coroutine_Await_Long(ani_promise promise, ani_long value) + ani_status FixedArray_New_Long(ani_size length, ani_array_long *result) { - return c_api->Coroutine_Await_Long(this, promise, value); + return c_api->FixedArray_New_Long(this, length, result); } - ani_status Coroutine_Await_Float(ani_promise promise, ani_float value) + ani_status FixedArray_New_Float(ani_size length, ani_array_float *result) { - return c_api->Coroutine_Await_Float(this, promise, value); + return c_api->FixedArray_New_Float(this, length, result); } - ani_status Coroutine_Await_Double(ani_promise promise, ani_double value) + ani_status FixedArray_New_Double(ani_size length, ani_array_double *result) { - return c_api->Coroutine_Await_Double(this, promise, value); + return c_api->FixedArray_New_Double(this, length, result); } - ani_status Coroutine_Await_Ref(ani_promise promise, ani_ref value) + ani_status FixedArray_New_Ref(ani_type type, ani_size length, ani_ref initial_element, ani_array_ref *result) { - return c_api->Coroutine_Await_Ref(this, promise, value); + return c_api->FixedArray_New_Ref(this, type, length, initial_element, result); } -#endif // __cplusplus +#endif // __cplusplus }; // NOLINTEND -#endif // __ANI_H__ +#endif // __ANI_H__ diff --git a/koala-wrapper/koalaui/interop/src/cpp/ani/convertors-ani.cc b/koala-wrapper/koalaui/interop/src/cpp/ani/convertors-ani.cc index f41a2f5bf..b8b5b1374 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/ani/convertors-ani.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/ani/convertors-ani.cc @@ -12,17 +12,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include #include #include "convertors-ani.h" #include "signatures.h" -#include "interop-logging.h" #include "interop-types.h" static const char* callCallbackFromNative = "callCallbackFromNative"; -static const char* callCallbackFromNativeSig = "I[BI:I"; - -static const char* FAST_NATIVE_PREFIX = "#F$"; +static const char* callCallbackFromNativeSig = "IJI:I"; const bool registerByOne = true; @@ -34,14 +32,14 @@ static bool registerNatives(ani_env *env, const ani_class clazz, const std::vect ani_native_function method; method.name = name.c_str(); method.pointer = func; - method.signature = (flag & ANI_SLOW_NATIVE_FLAG) == 0 ? FAST_NATIVE_PREFIX : nullptr; + method.signature = nullptr; if (registerByOne) { result &= env->Class_BindNativeMethods(clazz, &method, 1) == ANI_OK; ani_boolean isError = false; - env->ExistUnhandledError(&isError); + CHECK_ANI_FATAL(env->ExistUnhandledError(&isError)); if (isError) { - //env->ErrorDescribe(); - env->ResetError(); + CHECK_ANI_FATAL(env->DescribeError()); + CHECK_ANI_FATAL(env->ResetError()); } } else { @@ -54,44 +52,56 @@ static bool registerNatives(ani_env *env, const ani_class clazz, const std::vect return registerByOne ? true : result; } -bool registerAllModules(ani_env *env) { +bool registerAllModules(ani_env *aniEnv) { auto moduleNames = AniExports::getInstance()->getModules(); - for (auto it = moduleNames.begin(); it != moduleNames.end(); ++it) { std::string classpath = AniExports::getInstance()->getClasspath(*it); ani_class nativeModule = nullptr; - env->FindClass(classpath.c_str(), &nativeModule); + CHECK_ANI_FATAL(aniEnv->FindClass(classpath.c_str(), &nativeModule)); if (nativeModule == nullptr) { LOGE("Cannot find managed class %s", classpath.c_str()); continue; } - if (!registerNatives(env, nativeModule, AniExports::getInstance()->getMethods(*it))) { + if (!registerNatives(aniEnv, nativeModule, AniExports::getInstance()->getMethods(*it))) { return false; } } - return true; } -#if 0 -extern "C" ETS_EXPORT ets_int ETS_CALL EtsNapiOnLoad(ets_env *env) { - if (!registerAllModules(env)) { - LOGE("Failed to register ets modules"); - return ETS_ERR; +ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result) { + LOGE("Use ANI") + ani_env* aniEnv = nullptr; + *result = 1; + CHECK_ANI_FATAL(vm->GetEnv(/* version */ 1, (ani_env**)&aniEnv)); + if (!registerAllModules(aniEnv)) { + LOGE("Failed to register ANI modules"); + return ANI_ERROR; + } + ani_boolean hasError = false; + CHECK_ANI_FATAL(aniEnv->ExistUnhandledError(&hasError)); + if (hasError) { + CHECK_ANI_FATAL(aniEnv->DescribeError()); + CHECK_ANI_FATAL(aniEnv->ResetError()); } - auto interopClasspath = AniExports::getInstance()->getClasspath("InteropNativeModule"); - auto interopClass = env->FindClass(interopClasspath.c_str()); + auto interopClassName = AniExports::getInstance()->getClasspath("InteropNativeModule"); + ani_class interopClass = nullptr; + CHECK_ANI_FATAL(aniEnv->FindClass(interopClassName.c_str(), &interopClass)); if (interopClass == nullptr) { - LOGE("Can not find InteropNativeModule classpath to set callback dispatcher"); - return ETS_ERR; + LOGE("Can not find InteropNativeModule class to set callback dispatcher"); + CHECK_ANI_FATAL(aniEnv->ExistUnhandledError(&hasError)); + if (hasError) { + CHECK_ANI_FATAL(aniEnv->DescribeError()); + CHECK_ANI_FATAL(aniEnv->ResetError()); + } + return ANI_OK; } - if (!setKoalaEtsNapiCallbackDispatcher(env, interopClass, callCallbackFromNative, callCallbackFromNativeSig)) { - LOGE("Failed to set koala ets callback dispatcher"); - return ETS_ERR; + if (!setKoalaANICallbackDispatcher(aniEnv, interopClass, callCallbackFromNative, callCallbackFromNativeSig)) { + LOGE("Failed to set ANI callback dispatcher"); + return ANI_ERROR; } - return ETS_NAPI_VERSION_1_0; + return ANI_OK; } -#endif AniExports* AniExports::getInstance() { static AniExports *instance = nullptr; @@ -135,12 +145,13 @@ void AniExports::setClasspath(const char* module, const char *classpath) { } static std::map g_defaultClasspaths = { - {"InteropNativeModule", "@koalaui/interop/InteropNativeModule/InteropNativeModule"}, + {"InteropNativeModule", "L#koalaui/interop/InteropNativeModule/InteropNativeModule;"}, // todo leave just InteropNativeModule, define others via KOALA_ETS_INTEROP_MODULE_CLASSPATH - {"TestNativeModule", "@koalaui/arkts-arkui/generated/arkts/TestNativeModule/TestNativeModule"}, - {"ArkUINativeModule", "@koalaui/arkts-arkui/generated/arkts/ArkUINativeModule/ArkUINativeModule"}, - {"ArkUIGeneratedNativeModule", "@koalaui/arkts-arkui/generated/arkts/ArkUIGeneratedNativeModule/ArkUIGeneratedNativeModule"}, + {"TestNativeModule", "L@ohos/arkui/generated/arkts/TestNativeModule/TestNativeModule;"}, + {"ArkUINativeModule", "L@ohos/arkui/generated/arkts/ArkUINativeModule/ArkUINativeModule;"}, + {"ArkUIGeneratedNativeModule", "L@ohos/arkui/generated/arkts/ArkUIGeneratedNativeModule/ArkUIGeneratedNativeModule;"}, }; + const std::string& AniExports::getClasspath(const std::string& module) { auto it = classpaths.find(module); if (it != classpaths.end()) { @@ -152,3 +163,30 @@ const std::string& AniExports::getClasspath(const std::string& module) { } INTEROP_FATAL("Classpath for module %s was not registered", module.c_str()); } + +static struct { + ani_class clazz = nullptr; + ani_static_method method = nullptr; +} g_koalaANICallbackDispatcher; + +bool setKoalaANICallbackDispatcher( + ani_env* aniEnv, + ani_class clazz, + const char* dispatcherMethodName, + const char* dispatcherMethodSig +) { + g_koalaANICallbackDispatcher.clazz = clazz; + CHECK_ANI_FATAL(aniEnv->Class_FindStaticMethod( + clazz, dispatcherMethodName, dispatcherMethodSig, + &g_koalaANICallbackDispatcher.method + )); + if (g_koalaANICallbackDispatcher.method == nullptr) { + return false; + } + return true; +} + +void getKoalaANICallbackDispatcher(ani_class* clazz, ani_static_method* method) { + *clazz = g_koalaANICallbackDispatcher.clazz; + *method = g_koalaANICallbackDispatcher.method; +} diff --git a/koala-wrapper/koalaui/interop/src/cpp/ani/convertors-ani.h b/koala-wrapper/koalaui/interop/src/cpp/ani/convertors-ani.h index 3be74d311..7114e1814 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/ani/convertors-ani.h +++ b/koala-wrapper/koalaui/interop/src/cpp/ani/convertors-ani.h @@ -13,10 +13,8 @@ * limitations under the License. */ -#ifndef KOALA_ANI -#define KOALA_ANI +#ifdef KOALA_ANI -#include #include #include #include @@ -26,15 +24,161 @@ #include "ani.h" #include "koala-types.h" +#include "interop-logging.h" + +#define CHECK_ANI_FATAL(result) \ +do { \ + ani_status res = (result); \ + if (res != ANI_OK) { \ + INTEROP_FATAL("ANI function failed (status: %d) at " __FILE__ ": %d", res, __LINE__); \ + } \ +} \ +while (0) template struct InteropTypeConverter { using InteropType = T; - static T convertFrom(ani_env* env, InteropType value) { return value; } - static InteropType convertTo(ani_env* env, T value) { return value; } + static T convertFrom(ani_env* env, InteropType value) = delete; + static InteropType convertTo(ani_env* env, T value) = delete; static void release(ani_env* env, InteropType value, T converted) {} }; +template<> +struct InteropTypeConverter { + using InteropType = ani_byte; + static inline KByte convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KByte value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KByte converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_boolean; + static inline KBoolean convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KBoolean value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KBoolean converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_int; + static inline KInt convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KInt value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KInt converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_int; + static inline KUInt convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KUInt value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KUInt converted) {} +}; + + +template<> +struct InteropTypeConverter { + using InteropType = ani_float; + static inline KFloat convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KFloat value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KFloat converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_long; + static inline KLong convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KLong value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KLong converted) {} +}; + + +template<> +struct InteropTypeConverter { + using InteropType = ani_object; + static inline KVMObjectHandle convertFrom(ani_env* env, InteropType value) { + return reinterpret_cast(value); + } + static inline InteropType convertTo(ani_env* env, KVMObjectHandle value) { + return reinterpret_cast(value); + } + static inline void release(ani_env* env, InteropType value, KVMObjectHandle converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_array_byte; + static inline KInteropBuffer convertFrom(ani_env* env, InteropType value) { + if (value == nullptr) return KInteropBuffer(); + ani_size length = 0; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + KByte* data = new KByte[length]; + CHECK_ANI_FATAL(env->Array_GetRegion_Byte(value, 0, length, (ani_byte*)data)); + KInteropBuffer result = { 0 }; + result.data = data; + result.length = length; + return result; + } + static inline InteropType convertTo(ani_env* env, KInteropBuffer value) { + ani_array_byte result; + CHECK_ANI_FATAL(env->FixedArray_New_Byte(value.length, &result)); + CHECK_ANI_FATAL(env->Array_SetRegion_Byte(result, 0, value.length, reinterpret_cast(value.data))); + value.dispose(value.resourceId); + return result; + } + static inline void release(ani_env* env, InteropType value, KInteropBuffer converted) { + delete [] (KByte*)converted.data; + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_long; + static KSerializerBuffer convertFrom(ani_env* env, InteropType value) { + return reinterpret_cast(static_cast(value)); + } + static InteropType convertTo(ani_env* env, KSerializerBuffer value) = delete; + static inline void release(ani_env* env, InteropType value, KSerializerBuffer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_array_byte; + static inline KInteropReturnBuffer convertFrom(ani_env* env, InteropType value) = delete; + static inline InteropType convertTo(ani_env* env, KInteropReturnBuffer value) { + ani_array_byte result; + CHECK_ANI_FATAL(env->FixedArray_New_Byte(value.length, &result)); + CHECK_ANI_FATAL(env->Array_SetRegion_Byte(result, 0, value.length, reinterpret_cast(value.data))); + value.dispose(value.data, value.length); + return result; + }; + static inline void release(ani_env* env, InteropType value, KInteropReturnBuffer converted) {} +}; + template<> struct InteropTypeConverter { using InteropType = ani_string; @@ -43,17 +187,16 @@ struct InteropTypeConverter { KStringPtr result; // Notice that we use UTF length for buffer size, but counter is expressed in number of Unicode chars. ani_size lengthUtf8 = 0; - env->String_GetUTF8Size(value, &lengthUtf8); + CHECK_ANI_FATAL(env->String_GetUTF8Size(value, &lengthUtf8)); result.resize(lengthUtf8); - ani_size lengthUtf16 = 0; - env->String_GetUTF16Size(value, &lengthUtf16); - ani_size count; - env->String_GetUTF8SubString(value, 0, lengthUtf16, result.data(), result.length(), &count); + ani_size count = 0; + CHECK_ANI_FATAL(env->String_GetUTF8SubString(value, 0, lengthUtf8, result.data(), lengthUtf8 + 1, &count)); + result.data()[lengthUtf8] = 0; return result; } static InteropType convertTo(ani_env* env, const KStringPtr& value) { - ani_string result; - env->String_NewUTF8(value.c_str(), value.length(), &result); + ani_string result = nullptr; + CHECK_ANI_FATAL(env->String_NewUTF8(value.c_str(), value.length() - 1 /* drop zero terminator */, &result)); return result; } static void release(ani_env* env, InteropType value, const KStringPtr& converted) {} @@ -73,52 +216,67 @@ struct InteropTypeConverter { template<> struct InteropTypeConverter { - using InteropType = ani_fixedarray_int; + using InteropType = ani_array_int; static KInt* convertFrom(ani_env* env, InteropType value) { if (!value) return nullptr; ani_size length = 0; - env->FixedArray_GetLength(value, &length); - KInt* result = new KInt[length]; - env->FixedArray_GetRegion_Int(value, 0, length, result); - return result; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + KInt* data = new KInt[length]; + CHECK_ANI_FATAL(env->Array_GetRegion_Int(value, 0, length, (ani_int*)data)); + return data; } static InteropType convertTo(ani_env* env, KInt* value) = delete; static void release(ani_env* env, InteropType value, KInt* converted) { - if (converted) delete [] converted; + if (converted) { + ani_size length = 0; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + CHECK_ANI_FATAL(env->Array_SetRegion_Int(value, 0, length, (ani_int*)converted)); + } + delete [] converted; } }; template<> struct InteropTypeConverter { - using InteropType = ani_fixedarray_float; + using InteropType = ani_array_float; static KFloat* convertFrom(ani_env* env, InteropType value) { if (!value) return nullptr; ani_size length = 0; - env->FixedArray_GetLength(value, &length); - KFloat* result = new KFloat[length]; - env->FixedArray_GetRegion_Float(value, 0, length, result); - return result; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + KFloat* data = new KFloat[length]; + CHECK_ANI_FATAL(env->Array_GetRegion_Float(value, 0, length, (ani_float*)data)); + return data; } static InteropType convertTo(ani_env* env, KFloat* value) = delete; static void release(ani_env* env, InteropType value, KFloat* converted) { - if (converted) delete [] converted; + if (converted) { + ani_size length = 0; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + CHECK_ANI_FATAL(env->Array_SetRegion_Float(value, 0, length, (ani_float*)converted)); + } + delete [] converted; } }; template<> struct InteropTypeConverter { - using InteropType = ani_fixedarray_byte; + using InteropType = ani_array_byte; static KByte* convertFrom(ani_env* env, InteropType value) { if (!value) return nullptr; ani_size length = 0; - env->FixedArray_GetLength(value, &length); - KByte* result = new KByte[length]; - env->FixedArray_GetRegion_Byte(value, 0, length, (ani_byte*)result); - return result; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + KByte* data = new KByte[length]; + CHECK_ANI_FATAL(env->Array_GetRegion_Byte(value, 0, length, (ani_byte*)data)); + return data; } static InteropType convertTo(ani_env* env, KByte* value) = delete; static void release(ani_env* env, InteropType value, KByte* converted) { - if (converted) delete [] converted; + if (converted) { + ani_size length = 0; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + CHECK_ANI_FATAL(env->Array_SetRegion_Byte(value, 0, length, (ani_byte*)converted)); + } + delete[] converted; } }; @@ -138,7 +296,63 @@ template<> struct InteropTypeConverter { using InteropType = ani_ref; static KLength convertFrom(ani_env* env, InteropType value) { - // TODO: implement me + static ani_class double_class = nullptr; + static ani_class int_class = nullptr; + static ani_class string_class = nullptr; + static ani_class resource_class = nullptr; + if (!double_class) { + CHECK_ANI_FATAL(env->FindClass("Lstd/core/Double;", &double_class)); + } + if (!int_class) { + CHECK_ANI_FATAL(env->FindClass("Lstd/core/Int;", &int_class)); + } + if (!string_class) { + CHECK_ANI_FATAL(env->FindClass("Lstd/core/String;", &string_class)); + } + if (!resource_class) { + CHECK_ANI_FATAL(env->FindClass("L@ohos/arkui/generated/resource/Resource;", &resource_class)); + } + + const ani_object valueObj = reinterpret_cast(value); + + ani_boolean isInstanceOf; + CHECK_ANI_FATAL(env->Object_InstanceOf(valueObj, double_class, &isInstanceOf)); + if (isInstanceOf) { + static ani_method double_p = nullptr; + if (!double_p) CHECK_ANI_FATAL(env->Class_FindMethod(double_class, "unboxed", ":D", &double_p)); + ani_double result; + CHECK_ANI_FATAL(env->Object_CallMethod_Double(valueObj, double_p, &result)); + return KLength{ 1, (KFloat) result, 1, 0 }; + } + + CHECK_ANI_FATAL(env->Object_InstanceOf(valueObj, int_class, &isInstanceOf)); + if (isInstanceOf) { + static ani_method int_p = nullptr; + if (!int_p) CHECK_ANI_FATAL(env->Class_FindMethod(int_class, "unboxed", ":I", &int_p)); + ani_int result; + CHECK_ANI_FATAL(env->Object_CallMethod_Int(valueObj, int_p, &result)); + return KLength{ 1, (KFloat) result, 1, 0 }; + } + + CHECK_ANI_FATAL(env->Object_InstanceOf(valueObj, string_class, &isInstanceOf)); + if (isInstanceOf) { + KStringPtr ptr = InteropTypeConverter::convertFrom(env, reinterpret_cast(value)); + KLength length { 0 }; + parseKLength(ptr, &length); + length.type = 2; + length.resource = 0; + return length; + } + + CHECK_ANI_FATAL(env->Object_InstanceOf(valueObj, resource_class, &isInstanceOf)); + if (isInstanceOf) { + static ani_method resource_p = nullptr; + if (!resource_p) CHECK_ANI_FATAL(env->Class_FindMethod(resource_class, "id",":D", &resource_p)); + ani_double result; + CHECK_ANI_FATAL(env->Object_CallMethod_Double(valueObj, resource_p, &result)); + return KLength{ 3, 0, 1, (KInt) result }; + } + return KLength( { 0, 0, 0, 0}); } static InteropType convertTo(ani_env* env, KLength value) = delete; @@ -160,6 +374,44 @@ inline void releaseArgument(ani_env* env, typename InteropTypeConverter::I InteropTypeConverter::release(env, arg, data); } +template +struct DirectInteropTypeConverter { + using InteropType = T; + static T convertFrom(InteropType value) { return value; } + static InteropType convertTo(T value) { return value; } +}; + +template<> +struct DirectInteropTypeConverter { + using InteropType = ani_long; + static KNativePointer convertFrom(InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(KNativePointer value) { + return reinterpret_cast(value); + } +}; + +template<> +struct DirectInteropTypeConverter { + using InteropType = ani_long; + static KSerializerBuffer convertFrom(InteropType value) { + return reinterpret_cast(static_cast(value)); + } + static InteropType convertTo(KSerializerBuffer value) = delete; +}; + +template <> +struct DirectInteropTypeConverter { + using InteropType = ani_double; + static KInteropNumber convertFrom(InteropType value) { + return KInteropNumber::fromDouble(value); + } + static InteropType convertTo(KInteropNumber value) { + return value.asDouble(); + } +}; + #define ANI_SLOW_NATIVE_FLAG 1 class AniExports { @@ -193,7 +445,7 @@ public: } #define KOALA_ANI_INTEROP_MODULE_CLASSPATH(module, classpath) \ static void __init_classpath_##module() { \ - AniExports::getInstance()->setClasspath(KOALA_QUOTE(module), classpath); \ + AniExports::getInstance()->setClasspath(KOALA_QUOTE(module), "L" classpath ";"); \ } \ namespace { \ struct __Init_classpath_##module { \ @@ -203,13 +455,13 @@ public: #else #define MAKE_ANI_EXPORT(module, name, type, flag) \ __attribute__((constructor)) \ - static void __init_ets_##name() { \ + static void __init_ani_##name() { \ AniExports::getInstance()->addMethod(KOALA_QUOTE(module), "_"#name, type, reinterpret_cast(Ani_##name), flag); \ } #define KOALA_ANI_INTEROP_MODULE_CLASSPATH(module, classpath) \ __attribute__((constructor)) \ static void __init_ani_classpath_##module() { \ - AniExports::getInstance()->setClasspath(KOALA_QUOTE(module), classpath); \ + AniExports::getInstance()->setClasspath(KOALA_QUOTE(module), "L" classpath ";"); \ } #endif @@ -1199,7 +1451,7 @@ MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 InteropTypeConverter::InteropType _p0, \ InteropTypeConverter::InteropType _p1, \ InteropTypeConverter::InteropType _p2, \ - InteropTypeConverter::InteropType _p3 \ + InteropTypeConverter::InteropType _p3, \ InteropTypeConverter::InteropType _p4) { \ KOALA_MAYBE_LOG(name) \ P0 p0 = getArgument(env, _p0); \ @@ -1311,68 +1563,365 @@ MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3, } \ MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, ANI_SLOW_NATIVE_FLAG) -bool setKoalaEtsNapiCallbackDispatcher( +#define KOALA_INTEROP_DIRECT_0(name, Ret) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name()); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret, 0) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0, 0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1, 0) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2, 0) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9, \ + InteropTypeConverter::InteropType p10 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9), DirectInteropTypeConverter::convertFrom(p10))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) +#define KOALA_INTEROP_DIRECT_V0(name) \ + inline void Ani_##name( \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void", 0) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0, 0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1, 0) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2, 0) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9, \ + InteropTypeConverter::InteropType p10 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9), DirectInteropTypeConverter::convertFrom(p10)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) + +bool setKoalaANICallbackDispatcher( ani_env* ani_env, ani_class clazz, const char* dispatcherMethodName, const char* dispactherMethodSig ); -void getKoalaEtsNapiCallbackDispatcher(ani_class* clazz, ani_method* method); - -#if 0 -#define KOALA_INTEROP_CALL_VOID(venv, id, length, args) \ -{ \ - ani_class clazz = nullptr; \ - ani_method method = nullptr; \ - getKoalaEtsNapiCallbackDispatcher(&clazz, &method); \ - ani_env* ani_env = reinterpret_cast(vmContext); \ - ani_env->PushLocalFrame(1); \ - ani_fixedarray_byte args_ets = ani_env->NewByteArray(length); \ - ani_env->SetByteArrayRegion(args_ets, 0, length, reinterpret_cast(args)); \ - ani_env->CallStaticIntMethod(clazz, method, id, args_ets, length); \ - ani_env->GetByteArrayRegion(args_ets, 0, length, reinterpret_cast(args)); \ - ani_env->PopLocalFrame(nullptr); \ +void getKoalaANICallbackDispatcher(ani_class* clazz, ani_static_method* method); + +// TODO: maybe use CreateArrayBufferExternal here instead, no need for allocations. +#define KOALA_INTEROP_CALL_VOID(venv, id, length, args) \ +{ \ + ani_class clazz = nullptr; \ + ani_static_method method = nullptr; \ + getKoalaANICallbackDispatcher(&clazz, &method); \ + ani_env* env = reinterpret_cast(venv); \ + ani_int result = 0; \ + long long args_casted = reinterpret_cast(args); \ + CHECK_ANI_FATAL(env->Class_CallStaticMethod_Int(clazz, method, &result, id, args_casted, length)); \ } -#define KOALA_INTEROP_CALL_INT(venv, id, length, args) \ -{ \ - ani_class clazz = nullptr; \ - ani_method method = nullptr; \ - getKoalaEtsNapiCallbackDispatcher(&clazz, &method); \ - ani_env* ani_env = reinterpret_cast(venv); \ - ani_env->PushLocalFrame(1); \ - ani_fixedarray_byte args_ets = ani_env->NewByteArray(length); \ - ani_env->SetByteArrayRegion(args_ets, 0, length, reinterpret_cast(args)); \ - int32_t rv = ani_env->CallStaticIntMethod(clazz, method, id, args_ets, length); \ - ani_env->GetByteArrayRegion(args_ets, 0, length, reinterpret_cast(args)); \ - ani_env->PopLocalFrame(nullptr); \ - return rv; \ +#define KOALA_INTEROP_CALL_INT(venv, id, length, args) \ +{ \ + ani_class clazz = nullptr; \ + ani_static_method method = nullptr; \ + getKoalaANICallbackDispatcher(&clazz, &method); \ + ani_env* env = reinterpret_cast(venv); \ + ani_int result = 0; \ + long long args_casted = reinterpret_cast(args); \ + CHECK_ANI_FATAL(env->Class_CallStaticMethod_Int(clazz, method, &result, id, args_casted, length)); \ + return result; \ } #define KOALA_INTEROP_CALL_VOID_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_VOID(venv, id, (argc) * sizeof(int32_t), args) #define KOALA_INTEROP_CALL_INT_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_INT(venv, id, (argc) * sizeof(int32_t), args) -#define KOALA_INTEROP_THROW(vmContext, object, ...) \ - do { \ - ani_env* env = reinterpret_cast(vmContext); \ - env->ThrowError(object); \ - return __VA_ARGS__; \ +#define KOALA_INTEROP_THROW(vmContext, object, ...) \ + do { \ + ani_env* env = reinterpret_cast(vmContext); \ + CHECK_ANI_FATAL(env->ThrowError(object)); \ + return __VA_ARGS__; \ } while (0) -#define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ - do { \ - ani_env* env = reinterpret_cast(vmContext); \ - const static ani_class errorClass = env->FindClass("std/core/Error"); \ - env->ThrowErrorNew(errorClass, message); \ +#define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ + do { \ + ani_env* env = reinterpret_cast(vmContext); \ + ani_class errorClass {}; \ + CHECK_ANI_FATAL(env->FindClass("Lescompat/Error;", &errorClass)); \ + ani_method errorCtor {}; \ + CHECK_ANI_FATAL(env->Class_FindMethod(errorClass, "", \ + "Lstd/core/String;Lescompat/ErrorOptions;:V", &errorCtor)); \ + ani_string messageObject{}; \ + CHECK_ANI_FATAL(env->String_NewUTF8(message, strlen(message), &messageObject)); \ + ani_ref undefined{}; \ + CHECK_ANI_FATAL(env->GetUndefined(&undefined)); \ + ani_object throwObject{}; \ + CHECK_ANI_FATAL(env->Object_New(errorClass, errorCtor, &throwObject, messageObject, undefined)); \ + CHECK_ANI_FATAL(env->ThrowError(static_cast(throwObject))); \ + return __VA_ARGS__; \ } while (0) -#else - -#define KOALA_INTEROP_CALL_VOID(venv, id, length, args) -#define KOALA_INTEROP_CALL_INT(venv, id, length, args) { return 0; } -#define KOALA_INTEROP_CALL_VOID_INTS32(venv, id, argc, args) { return; } -#define KOALA_INTEROP_CALL_INT_INTS32(venv, id, argc, args) { return 0; } -#define KOALA_INTEROP_THROW(vmContext, object, ...) { return __VA_ARGS__; } -#define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) { return __VA_ARGS__; } -#endif -#endif // KOALA_ETS_NAPI +#endif // KOALA_ANI diff --git a/koala-wrapper/koalaui/interop/src/cpp/callback-resource.cc b/koala-wrapper/koalaui/interop/src/cpp/callback-resource.cc index d7851e405..acbe9cd23 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/callback-resource.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/callback-resource.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,8 +11,9 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ +*/ +#undef KOALA_INTEROP_MODULE #define KOALA_INTEROP_MODULE InteropNativeModule #include "common-interop.h" #include "interop-types.h" @@ -41,7 +42,8 @@ void releaseManagedCallbackResource(InteropInt32 resourceId) { callbackResourceSubqueue.push_back(resourceId); } -KInt impl_CheckCallbackEvent(KByte* result, KInt size) { +KInt impl_CheckCallbackEvent(KSerializerBuffer buffer, KInt size) { + KByte* result = (KByte*)buffer; if (needReleaseFront) { switch (callbackEventsQueue.front()) @@ -64,16 +66,29 @@ KInt impl_CheckCallbackEvent(KByte* result, KInt size) { return 0; } const CallbackEventKind frontEventKind = callbackEventsQueue.front(); - memcpy(result, &frontEventKind, 4); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(result, size, &frontEventKind, 4); + #else + memcpy(result, &frontEventKind, 4); + #endif + switch (frontEventKind) { case Event_CallCallback: - memcpy(result + 4, callbackCallSubqueue.front().buffer, sizeof(CallbackBuffer::buffer)); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(result + 4, size, callbackCallSubqueue.front().buffer, sizeof(CallbackBuffer::buffer)); + #else + memcpy(result + 4, callbackCallSubqueue.front().buffer, sizeof(CallbackBuffer::buffer)); + #endif break; case Event_HoldManagedResource: case Event_ReleaseManagedResource: { const InteropInt32 resourceId = callbackResourceSubqueue.front(); - memcpy(result + 4, &resourceId, 4); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(result + 4, size, &frontEventKind, 4); + #else + memcpy(result + 4, &resourceId, 4); + #endif break; } default: @@ -82,7 +97,7 @@ KInt impl_CheckCallbackEvent(KByte* result, KInt size) { needReleaseFront = true; return 1; } -KOALA_INTEROP_2(CheckCallbackEvent, KInt, KByte*, KInt) +KOALA_INTEROP_DIRECT_2(CheckCallbackEvent, KInt, KSerializerBuffer, KInt) void impl_ReleaseCallbackResource(InteropInt32 resourceId) { releaseManagedCallbackResource(resourceId); diff --git a/koala-wrapper/koalaui/interop/src/cpp/callback-resource.h b/koala-wrapper/koalaui/interop/src/cpp/callback-resource.h index 451e4a3db..c7a742a05 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/callback-resource.h +++ b/koala-wrapper/koalaui/interop/src/cpp/callback-resource.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,6 +19,11 @@ #include #include "interop-types.h" +#ifdef KOALA_WINDOWS +#define DLL_EXPORT __declspec(dllexport) +#else +#define DLL_EXPORT __attribute__ ((visibility ("default"))) +#endif class CallbackResourceHolder { private: @@ -38,7 +43,7 @@ public: struct CallbackBuffer { InteropInt32 kind; - uint8_t buffer[60 * 4]; + uint8_t buffer[4096]; CallbackResourceHolder resourceHolder; }; @@ -48,8 +53,8 @@ enum CallbackEventKind { Event_ReleaseManagedResource = 2, }; -void enqueueCallback(const CallbackBuffer* event); -void holdManagedCallbackResource(InteropInt32 resourceId); -void releaseManagedCallbackResource(InteropInt32 resourceId); +extern "C" DLL_EXPORT void enqueueCallback(const CallbackBuffer* event); +extern "C" DLL_EXPORT void holdManagedCallbackResource(InteropInt32 resourceId); +extern "C" DLL_EXPORT void releaseManagedCallbackResource(InteropInt32 resourceId); #endif diff --git a/koala-wrapper/koalaui/interop/src/cpp/cangjie/convertors-cj.cc b/koala-wrapper/koalaui/interop/src/cpp/cangjie/convertors-cj.cc index 0a26aa8d9..ebb0dac2f 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/cangjie/convertors-cj.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/cangjie/convertors-cj.cc @@ -1,14 +1,14 @@ -/* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ \ No newline at end of file +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/cpp/cangjie/convertors-cj.h b/koala-wrapper/koalaui/interop/src/cpp/cangjie/convertors-cj.h index 17949006b..b40fd3254 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/cangjie/convertors-cj.h +++ b/koala-wrapper/koalaui/interop/src/cpp/cangjie/convertors-cj.h @@ -13,15 +13,16 @@ * limitations under the License. */ -#pragma once +#ifndef CONVERTORS_CJ_H +#define CONVERTORS_CJ_H #include -#include #include #include #include #include "koala-types.h" +#include "interop-logging.h" #define KOALA_INTEROP_EXPORT extern "C" @@ -792,6 +793,22 @@ KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ return makeResult(impl_##name(ctx, p0, p1, p2, p3)); \ } +#define KOALA_INTEROP_CTX_5(name, Ret, P0, P1, P2, P3, P4) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + KVMContext ctx = (KVMContext)0; \ + return makeResult(impl_##name(ctx, p0, p1, p2, p3, p4)); \ +} #define KOALA_INTEROP_CALL_INT(venv, id, length, args) \ { \ @@ -862,14 +879,65 @@ KOALA_INTEROP_EXPORT void name(InteropTypeConverter::InteropType _p0, \ impl_##name(nullptr, p0, p1, p2, p3, p4); \ } + #define KOALA_INTEROP_DIRECT_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_DIRECT_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + #define KOALA_INTEROP_THROW(vmContext, object, ...) \ do { \ - /* TODO: implement*/ assert(false); \ + /* TODO: implement*/ ASSERT(false); \ return __VA_ARGS__; \ } while (0) #define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ do { \ - /* TODO: implement*/ assert(false); \ + /* TODO: implement*/ ASSERT(false); \ return __VA_ARGS__; \ } while (0) + +#endif // CONVERTORS_CJ_H \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/cpp/common-interop.cc b/koala-wrapper/koalaui/interop/src/cpp/common-interop.cc index 7a2287a27..3811b927b 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/common-interop.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/common-interop.cc @@ -16,6 +16,10 @@ #include #include +#ifndef KOALA_INTEROP_MEM_ANALYZER +#include +#endif + #ifdef KOALA_INTEROP_MODULE #undef KOALA_INTEROP_MODULE #endif @@ -25,6 +29,14 @@ #include "interop-logging.h" #include "dynamic-loader.h" +#ifdef KOALA_FOREIGN_NAPI +#ifndef KOALA_FOREIGN_NAPI_OHOS +#include +#else +#include +#include +#endif +#endif #if KOALA_INTEROP_PROFILER #include "profiler.h" @@ -35,6 +47,10 @@ InteropProfiler* InteropProfiler::_instance = nullptr; using std::string; +#ifndef KOALA_INTEROP_MEM_ANALYZER +static std::atomic mallocCounter{0}; +#endif + #ifdef KOALA_NAPI // Callback dispatcher MOVED to convertors-napi.cc. // Let's keep platform-specific parts of the code together @@ -88,6 +104,8 @@ void getKoalaEtsNapiCallbackDispatcher(ets_class* clazz, ets_method* method) { } #endif + +// TODO: move callback dispetchers to convertors-.cc. #ifdef KOALA_JNI #include "jni.h" static struct { @@ -127,7 +145,13 @@ KOALA_INTEROP_1(StringLength, KInt, KNativePointer) void impl_StringData(KNativePointer ptr, KByte* bytes, KUInt size) { string* s = reinterpret_cast(ptr); - if (s) memcpy(bytes, s->c_str(), size); + if (s) { + #ifdef __STDC_LIB_EXT1__ + memcpy_s(bytes, size, s->c_str(), size); + #else + memcpy(bytes, s->c_str(), size); + #endif + } } KOALA_INTEROP_V3(StringData, KNativePointer, KByte*, KUInt) @@ -148,11 +172,11 @@ KNativePointer impl_StringMake(const KStringPtr& str) { KOALA_INTEROP_1(StringMake, KNativePointer, KStringPtr) // For slow runtimes w/o fast encoders. -KInt impl_ManagedStringWrite(const KStringPtr& string, KByte* buffer, KInt offset) { - memcpy(buffer + offset, string.c_str(), string.length() + 1); +KInt impl_ManagedStringWrite(const KStringPtr& string, KSerializerBuffer buffer, KInt offset) { + memcpy((uint8_t*)buffer + offset, string.c_str(), string.length() + 1); return string.length() + 1; } -KOALA_INTEROP_3(ManagedStringWrite, KInt, KStringPtr, KByte*, KInt) +KOALA_INTEROP_3(ManagedStringWrite, KInt, KStringPtr, KSerializerBuffer, KInt) void stringFinalizer(string* ptr) { delete ptr; @@ -184,35 +208,6 @@ inline KUInt unpackUInt(const KByte* bytes) { return (bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24)); } -std::vector makeStringVector(KStringArray strArray) { - if (strArray == nullptr) { - return std::vector(0); - } - KUInt arraySize = unpackUInt(strArray); - std::vector res(arraySize); - size_t offset = sizeof(KUInt); - for (KUInt i = 0; i < arraySize; ++i) { - int len = unpackUInt(strArray + offset); - res[i].assign((const char*)(strArray + offset + sizeof(KUInt)), len); - offset += len + sizeof(KUInt); - } - return res; -} - -std::vector makeStringVector(KNativePointerArray arr, KInt length) { - if (arr == nullptr) { - return std::vector(0); - } else { - std::vector res(length); - char** strings = reinterpret_cast(arr); - for (KInt i = 0; i < length; ++i) { - const char* str = reinterpret_cast(strings[i]); - res[i].assign(str); - } - return res; - } -} - KNativePointer impl_GetGroupedLog(KInt index) { return new std::string(GetDefaultLogger()->getGroupedLog(index)); } @@ -247,6 +242,7 @@ KOALA_INTEROP_V1(PrintGroupedLog, KInt) int32_t callCallback(KVMContext context, int32_t methodId, uint8_t* argsData, int32_t argsLength) { #if KOALA_USE_NODE_VM || KOALA_USE_HZ_VM || KOALA_USE_PANDA_VM || KOALA_USE_JAVA_VM || KOALA_CJ KOALA_INTEROP_CALL_INT(context, methodId, argsLength, argsData); + return 0; #else return 0; #endif @@ -256,11 +252,12 @@ struct ForeignVMContext { KVMContext vmContext; int32_t (*callSync)(KVMContext vmContext, int32_t callback, uint8_t* data, int32_t length); }; -typedef KInt (*LoadVirtualMachine_t)(KInt vmKind, const char* classPath, const char* libraryPath, const struct ForeignVMContext* foreignVM); +typedef KInt (*LoadVirtualMachine_t)(KInt vmKind, const char* bootFiles, const char* userFiles, const char* libraryPath, const struct ForeignVMContext* foreignVM); typedef KNativePointer (*StartApplication_t)(const char* appUrl, const char* appParams); typedef KBoolean (*RunApplication_t)(const KInt arg0, const KInt arg1); typedef const char* (*EmitEvent_t)(const KInt type, const KInt target, const KInt arg0, const KInt arg1); typedef void (*RestartWith_t)(const char* page); +typedef const char* (*LoadView_t)(const char* className, const char* params); void* getImpl(const char* path, const char* name) { static void* lib = nullptr; @@ -278,12 +275,12 @@ void* getImpl(const char* path, const char* name) { return findSymbol(lib, name); } -KInt impl_LoadVirtualMachine(KVMContext vmContext, KInt vmKind, const KStringPtr& classPath, const KStringPtr& libraryPath) { +KInt impl_LoadVirtualMachine(KVMContext vmContext, KInt vmKind, const KStringPtr& bootFiles, const KStringPtr& userFiles, const KStringPtr& libraryPath) { const char* envClassPath = std::getenv("PANDA_CLASS_PATH"); if (envClassPath) { LOGI("CLASS PATH updated from env var PANDA_CLASS_PATH, %" LOG_PUBLIC "s", envClassPath); } - const char* appClassPath = envClassPath ? envClassPath : classPath.c_str(); + const char* bootFilesPath = envClassPath ? envClassPath : bootFiles.c_str(); const char* nativeLibPath = envClassPath ? envClassPath : libraryPath.c_str(); static LoadVirtualMachine_t impl = nullptr; @@ -292,9 +289,9 @@ KInt impl_LoadVirtualMachine(KVMContext vmContext, KInt vmKind, const KStringPtr const ForeignVMContext foreignVM = { vmContext, &callCallback }; - return impl(vmKind, appClassPath, nativeLibPath, &foreignVM); + return impl(vmKind, bootFilesPath, userFiles.c_str(), nativeLibPath, &foreignVM); } -KOALA_INTEROP_CTX_3(LoadVirtualMachine, KInt, KInt, KStringPtr, KStringPtr) +KOALA_INTEROP_CTX_4(LoadVirtualMachine, KInt, KInt, KStringPtr, KStringPtr, KStringPtr) KNativePointer impl_StartApplication(const KStringPtr& appUrl, const KStringPtr& appParams) { static StartApplication_t impl = nullptr; @@ -327,29 +324,86 @@ void impl_RestartWith(const KStringPtr& page) { } KOALA_INTEROP_V1(RestartWith, KStringPtr) +#ifdef KOALA_ANI +KStringPtr impl_LoadView(const KStringPtr& className, const KStringPtr& params) { + static LoadView_t impl = nullptr; + if (!impl) impl = reinterpret_cast(getImpl(nullptr, "LoadView")); + const char* result = impl(className.c_str(), params.c_str()); + return KStringPtr(result, strlen(result), true); +} +KOALA_INTEROP_2(LoadView, KStringPtr, KStringPtr, KStringPtr) +#endif // KOALA_ANI + +KNativePointer impl_Malloc(KLong length) { + const auto ptr = static_cast(malloc(length)); + if (ptr == nullptr) { + INTEROP_FATAL("Memory allocation failed!"); + } +#ifndef KOALA_INTEROP_MEM_ANALYZER + mallocCounter.fetch_add(1, std::memory_order_release); +#endif + return ptr; +} +KOALA_INTEROP_DIRECT_1(Malloc, KNativePointer, KLong) + +void impl_Free(KNativePointer data) { + if (data) { + free(data); +#ifndef KOALA_INTEROP_MEM_ANALYZER + if (mallocCounter.fetch_sub(1, std::memory_order_release) == 0) { + INTEROP_FATAL("Double-free detected!"); + } +#endif + } +} +KOALA_INTEROP_DIRECT_V1(Free, KNativePointer) + +KInt impl_ReadByte(KNativePointer data, KLong index, KLong length) { + if (index >= length) INTEROP_FATAL("impl_ReadByte: index %lld is equal or greater than length %lld", (long long)index, (long long) length); + uint8_t* ptr = reinterpret_cast(data); + return ptr[index]; +} +KOALA_INTEROP_DIRECT_3(ReadByte, KInt, KNativePointer, KLong, KLong) + +void impl_WriteByte(KNativePointer data, KInt index, KLong length, KInt value) { + if (index >= length) INTEROP_FATAL("impl_WriteByte: index %lld is equal or greater than length %lld", (long long)index, (long long) length); + uint8_t* ptr = reinterpret_cast(data); + ptr[index] = value; +} +KOALA_INTEROP_DIRECT_V4(WriteByte, KNativePointer, KLong, KLong, KInt) + +void impl_CopyArray(KNativePointer data, KLong length, KByte* array) { + #ifdef __STDC_LIB_EXT1__ + memcpy_s(data, length, array, length); + #else + memcpy(data, array, length); + #endif +} +KOALA_INTEROP_V3(CopyArray, KNativePointer, KLong, KByte*) + static Callback_Caller_t g_callbackCaller = nullptr; void setCallbackCaller(Callback_Caller_t callbackCaller) { g_callbackCaller = callbackCaller; } -void impl_CallCallback(KInt callbackKind, KByte* args, KInt argsSize) { +void impl_CallCallback(KInt callbackKind, KSerializerBuffer args, KInt argsSize) { if (g_callbackCaller) { g_callbackCaller(callbackKind, args, argsSize); } } -KOALA_INTEROP_V3(CallCallback, KInt, KByte*, KInt) +KOALA_INTEROP_V3(CallCallback, KInt, KSerializerBuffer, KInt) static Callback_Caller_Sync_t g_callbackCallerSync = nullptr; void setCallbackCallerSync(Callback_Caller_Sync_t callbackCallerSync) { g_callbackCallerSync = callbackCallerSync; } -void impl_CallCallbackSync(KVMContext vmContext, KInt callbackKind, KByte* args, KInt argsSize) { +void impl_CallCallbackSync(KVMContext vmContext, KInt callbackKind, KSerializerBuffer args, KInt argsSize) { if (g_callbackCallerSync) { g_callbackCallerSync(vmContext, callbackKind, args, argsSize); } } -KOALA_INTEROP_CTX_V3(CallCallbackSync, KInt, KByte*, KInt) +KOALA_INTEROP_CTX_V3(CallCallbackSync, KInt, KSerializerBuffer, KInt) void impl_CallCallbackResourceHolder(KNativePointer holder, KInt resourceId) { reinterpret_cast(holder)(resourceId); @@ -372,8 +426,28 @@ KInt impl_CallForeignVM(KNativePointer foreignContextRaw, KInt function, KByte* } KOALA_INTEROP_4(CallForeignVM, KInt, KNativePointer, KInt, KByte*, KInt) +#ifdef KOALA_FOREIGN_NAPI +KVMContext g_foreignVMContext = nullptr; +#endif +void impl_SetForeignVMContext(KNativePointer foreignVMContextRaw) { +#ifdef KOALA_FOREIGN_NAPI + if (foreignVMContextRaw == nullptr) { + g_foreignVMContext = nullptr; + } else { + auto foreignContext = (const ForeignVMContext*)foreignVMContextRaw; + g_foreignVMContext = foreignContext->vmContext; + } +#endif + + /* supress unused private fields */ + (void)foreignVMContextRaw; +} +KOALA_INTEROP_V1(SetForeignVMContext, KNativePointer) + +#ifndef __QUOTE + #define __QUOTE(x) #x +#endif -#define __QUOTE(x) #x #define QUOTE(x) __QUOTE(x) void impl_NativeLog(const KStringPtr& str) { @@ -386,20 +460,23 @@ void impl_NativeLog(const KStringPtr& str) { } KOALA_INTEROP_V1(NativeLog, KStringPtr) - - void resolveDeferred(KVMDeferred* deferred, uint8_t* argsData, int32_t argsLength) { #ifdef KOALA_NAPI auto status = napi_call_threadsafe_function((napi_threadsafe_function)deferred->handler, deferred, napi_tsfn_nonblocking); if (status != napi_ok) LOGE("cannot call thread-safe function; status=%d", status); - napi_release_threadsafe_function((napi_threadsafe_function)deferred->handler, napi_tsfn_release); + if (deferred->handler) { + napi_release_threadsafe_function((napi_threadsafe_function)deferred->handler, napi_tsfn_release); + deferred->handler = nullptr; + } #endif } void rejectDeferred(KVMDeferred* deferred, const char* message) { #ifdef KOALA_NAPI - napi_release_threadsafe_function((napi_threadsafe_function)deferred->handler, napi_tsfn_release); - delete deferred; + if (deferred->handler) { + napi_release_threadsafe_function((napi_threadsafe_function)deferred->handler, napi_tsfn_release); + deferred->handler = nullptr; + } #endif } @@ -442,35 +519,205 @@ KVMDeferred* CreateDeferred(KVMContext vmContext, KVMObjectHandle* promiseHandle return deferred; } -#if defined(KOALA_ETS_NAPI) || defined(KOALA_NAPI) || defined(KOALA_JNI) || defined(KOALA_CJ) -KStringPtr impl_RawUtf8ToString(KVMContext vmContext, KNativePointer data) { - auto string = (const char*)data; - KStringPtr result(string, strlen(string), false); - return result; +class KoalaWork { +protected: + InteropVMContext vmContext; +#ifdef KOALA_FOREIGN_NAPI + KVMContext foreignVMContext; +#endif + void* vmWork; + void* handle; + void (*execute)(void* handle); + void (*complete)(void* handle); +public: + KoalaWork(InteropVMContext vmContext, + InteropNativePointer handle, + void (*execute)(InteropNativePointer handle), + void (*complete)(InteropNativePointer handle)); + void Queue(); + void Execute(); + void Cancel(); + void Complete(); +}; +static void DoQueue(void* handle) { + ((KoalaWork*)handle)->Queue(); +} +static void DoCancel(void* handle) { + ((KoalaWork*)handle)->Cancel(); +} + +InteropAsyncWork koalaCreateWork( + InteropVMContext vmContext, + InteropNativePointer handle, + void (*execute)(InteropNativePointer handle), + void (*complete)(InteropNativePointer handle) +) { + return { + new KoalaWork(vmContext, handle, execute, complete), + DoQueue, + DoCancel, + }; } -KOALA_INTEROP_CTX_1(RawUtf8ToString, KStringPtr, KNativePointer) +const InteropAsyncWorker* GetAsyncWorker() { + static InteropAsyncWorker worker = { + koalaCreateWork + }; + return &worker; +} + +#if defined(KOALA_NAPI) +static void DoExecute(napi_env env, void* handle) { + ((KoalaWork*)handle)->Execute(); +} +static void DoComplete(napi_env env, napi_status status, void* handle) { + ((KoalaWork*)handle)->Complete(); +} +KoalaWork::KoalaWork(InteropVMContext vmContext, + InteropNativePointer handle, + void (*execute)(InteropNativePointer handle), + void (*complete)(InteropNativePointer handle) +): vmContext(vmContext), handle(handle), execute(execute), complete(complete) { + napi_env env = (napi_env)vmContext; + napi_value resourceName = nullptr; + napi_create_string_utf8(env, "KoalaAsyncOperation", NAPI_AUTO_LENGTH, &resourceName); + napi_create_async_work(env, nullptr, resourceName, DoExecute, DoComplete, this, (napi_async_work*)&vmWork); + /* supress unused private fields */ + (void)vmContext; + (void)vmWork; +} +void KoalaWork::Queue() { + napi_env env = (napi_env)vmContext; + napi_queue_async_work(env, (napi_async_work)vmWork); +} +void KoalaWork::Execute() { + execute(handle); +} +void KoalaWork::Cancel() { + napi_env env = (napi_env)vmContext; + // napi_cancel_async_work(env, (napi_async_work)vmWork); +} +void KoalaWork::Complete() { + complete(handle); + delete this; +} +#else +#ifdef KOALA_FOREIGN_NAPI +static void DoExecute(napi_env env, void* handle) { + ((KoalaWork*)handle)->Execute(); +} +static void DoComplete(napi_env env, napi_status status, void* handle) { + ((KoalaWork*)handle)->Complete(); +} +#endif +KoalaWork::KoalaWork(InteropVMContext vmContext, + InteropNativePointer handle, + void (*execute)(InteropNativePointer handle), + void (*complete)(InteropNativePointer handle) +): vmContext(vmContext), handle(handle), execute(execute), complete(complete) { +#ifdef KOALA_FOREIGN_NAPI + if (g_foreignVMContext == nullptr) + INTEROP_FATAL("Can not launch async work while foreign VM context is not available. Please ensure you have called SetForeignVMContext"); + foreignVMContext = g_foreignVMContext; + napi_env env = (napi_env)foreignVMContext; + napi_value resourceName = nullptr; + napi_create_string_utf8(env, "KoalaAsyncOperation", NAPI_AUTO_LENGTH, &resourceName); + napi_create_async_work(env, nullptr, resourceName, DoExecute, DoComplete, this, (napi_async_work*)&vmWork); +#endif + /* supress unused private fields */ + (void)vmContext; + (void)vmWork; +} +void KoalaWork::Queue() { +#ifdef KOALA_FOREIGN_NAPI + napi_env env = (napi_env)foreignVMContext; + napi_queue_async_work(env, (napi_async_work)vmWork); +#else + Execute(); + Complete(); +#endif +} +void KoalaWork::Execute() { + execute(handle); +} +void KoalaWork::Cancel() { +#ifdef KOALA_FOREIGN_NAPI + napi_env env = (napi_env)foreignVMContext; + // napi_cancel_async_work(env, (napi_async_work)vmWork); +#else + INTEROP_FATAL("Cancelling async work is disabled for any VM except of Node"); +#endif +} +void KoalaWork::Complete() { + complete(handle); + delete this; +} +#endif + + +#if defined(KOALA_ETS_NAPI) || defined(KOALA_ANI) +KStringPtr impl_Utf8ToString(KVMContext vmContext, KNativePointer data, KInt offset, KInt length) { + KStringPtr result((const char*)data + offset, length, false); + return result; +} +KOALA_INTEROP_CTX_3(Utf8ToString, KStringPtr, KNativePointer, KInt, KInt) +#elif defined(KOALA_NAPI) || defined(KOALA_JNI) || defined(KOALA_CJ) // Allocate, so CTX versions. KStringPtr impl_Utf8ToString(KVMContext vmContext, KByte* data, KInt offset, KInt length) { KStringPtr result((const char*)(data + offset), length, false); return result; } KOALA_INTEROP_CTX_3(Utf8ToString, KStringPtr, KByte*, KInt, KInt) +#endif + +#if defined(KOALA_NAPI) || defined(KOALA_ANI) +KStringPtr impl_RawUtf8ToString(KVMContext vmContext, KNativePointer data) { + auto string = (const char*)data; + KStringPtr result(string, strlen(string), false); + return result; +} +KOALA_INTEROP_CTX_1(RawUtf8ToString, KStringPtr, KNativePointer) +#endif +#if defined(KOALA_NAPI) || defined(KOALA_JNI) || defined(KOALA_CJ) || defined(KOALA_ETS_NAPI) || defined(KOALA_ANI) KStringPtr impl_StdStringToString(KVMContext vmContext, KNativePointer stringPtr) { std::string* string = reinterpret_cast(stringPtr); KStringPtr result(string->c_str(), string->size(), false); return result; } KOALA_INTEROP_CTX_1(StdStringToString, KStringPtr, KNativePointer) -#endif -#if defined(KOALA_JNI) || defined(KOALA_NAPI) || defined(KOALA_CJ) KInteropReturnBuffer impl_RawReturnData(KVMContext vmContext, KInt v1, KInt v2) { void* data = new int8_t[v1]; - memset(data, v2, v1); + #ifdef __STDC_LIB_EXT1__ + memset_s(data, v1, v2, v1); + #else + memset(data, v2, v1); + #endif KInteropReturnBuffer buffer = { v1, data, [](KNativePointer ptr, KInt) { delete[] (int8_t*)ptr; }}; return buffer; } KOALA_INTEROP_CTX_2(RawReturnData, KInteropReturnBuffer, KInt, KInt) + +KInteropNumber impl_IncrementNumber(KInteropNumber number) { + if (number.tag == 102) + number.i32++; + else + number.f32 += 1.f; + return number; +} +KOALA_INTEROP_1(IncrementNumber, KInteropNumber, KInteropNumber) + +void impl_ReportMemLeaks() { +#ifndef KOALA_INTEROP_MEM_ANALYZER + const auto count = mallocCounter.load(std::memory_order_acquire); + if (count > 0) { + fprintf(stderr, "Memory leaks detected: %d blocks\n", count); + } else { + fprintf(stderr, "No memory leaks\n"); + } #endif +} +KOALA_INTEROP_V0(ReportMemLeaks) + +#endif \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/cpp/common-interop.h b/koala-wrapper/koalaui/interop/src/cpp/common-interop.h index abc8ebfd0..f1bf17e78 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/common-interop.h +++ b/koala-wrapper/koalaui/interop/src/cpp/common-interop.h @@ -40,15 +40,19 @@ #define KOALA_MAYBE_LOG(name) #endif -typedef void (*Callback_Caller_t)(KInt callbackKind, KByte* argsData, KInt argsLength); -typedef void (*Callback_Caller_Sync_t)(KVMContext vmContext, KInt callbackKind, KByte* argsData, KInt argsLength); -void setCallbackCaller(Callback_Caller_t caller); -void setCallbackCallerSync(Callback_Caller_Sync_t callerSync); +#ifdef KOALA_WINDOWS +#define DLL_EXPORT __declspec(dllexport) +#else +#define DLL_EXPORT __attribute__ ((visibility ("default"))) +#endif -KVMDeferred* CreateDeferred(KVMContext context, KVMObjectHandle* promise); +typedef void (*Callback_Caller_t)(KInt callbackKind, KSerializerBuffer argsData, KInt argsLength); +typedef void (*Callback_Caller_Sync_t)(KVMContext vmContext, KInt callbackKind, KSerializerBuffer argsData, KInt argsLength); +extern "C" DLL_EXPORT void setCallbackCaller(Callback_Caller_t caller); +extern "C" DLL_EXPORT void setCallbackCallerSync(Callback_Caller_Sync_t callerSync); -std::vector makeStringVector(KStringArray strArray); -std::vector makeStringVector(KNativePointerArray arr, KInt size); +extern "C" DLL_EXPORT KVMDeferred* CreateDeferred(KVMContext context, KVMObjectHandle* promise); +extern "C" DLL_EXPORT const InteropAsyncWorker* GetAsyncWorker(); #if KOALA_USE_NODE_VM || KOALA_USE_HZ_VM #include "convertors-napi.h" diff --git a/koala-wrapper/koalaui/interop/src/cpp/crashdump.h b/koala-wrapper/koalaui/interop/src/cpp/crashdump.h index 7d1bac040..128f7ba61 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/crashdump.h +++ b/koala-wrapper/koalaui/interop/src/cpp/crashdump.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/dynamic-loader.h b/koala-wrapper/koalaui/interop/src/cpp/dynamic-loader.h index f354a4f25..cfc912b9c 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/dynamic-loader.h +++ b/koala-wrapper/koalaui/interop/src/cpp/dynamic-loader.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -28,7 +28,11 @@ inline void* loadLibrary(const std::string& libPath) { inline const char* libraryError() { static char error[256]; - snprintf(error, sizeof error, "error %lu", GetLastError()); + #ifdef __STDC_LIB_EXT1__ + snprintf_s(error, sizeof error, "error %lu", GetLastError()); + #else + snprintf(error, sizeof error, "error %lu", GetLastError()); + #endif return error; } diff --git a/koala-wrapper/koalaui/interop/src/cpp/ets/convertors-ets.cc b/koala-wrapper/koalaui/interop/src/cpp/ets/convertors-ets.cc index 450804338..6bb230b8f 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/ets/convertors-ets.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/ets/convertors-ets.cc @@ -20,7 +20,7 @@ #include "interop-types.h" static const char* callCallbackFromNative = "callCallbackFromNative"; -static const char* callCallbackFromNativeSig = "I[BI:I"; +static const char* callCallbackFromNativeSig = "IJI:I"; static const char* FAST_NATIVE_PREFIX = "#F$"; @@ -38,7 +38,6 @@ static bool registerNatives(ets_env *env, const ets_class clazz, const std::vect if (registerByOne) { result &= env->RegisterNatives(clazz, &method, 1) >= 0; if (env->ErrorCheck()) { - //env->ErrorDescribe(); env->ErrorClear(); } } @@ -56,10 +55,10 @@ bool registerAllModules(ets_env *env) { auto moduleNames = EtsExports::getInstance()->getModules(); for (auto it = moduleNames.begin(); it != moduleNames.end(); ++it) { - std::string classpath = EtsExports::getInstance()->getClasspath(*it); - ets_class nativeModule = env->FindClass(classpath.c_str()); + std::string className = EtsExports::getInstance()->getClasspath(*it); + ets_class nativeModule = env->FindClass(className.c_str()); if (nativeModule == nullptr) { - LOGE("Cannot find managed class %s", classpath.c_str()); + LOGE("Cannot find managed class %s", className.c_str()); continue; } if (!registerNatives(env, nativeModule, EtsExports::getInstance()->getMethods(*it))) { @@ -71,6 +70,7 @@ bool registerAllModules(ets_env *env) { } extern "C" ETS_EXPORT ets_int ETS_CALL EtsNapiOnLoad(ets_env *env) { + LOGE("Use ETSNAPI") if (!registerAllModules(env)) { LOGE("Failed to register ets modules"); return ETS_ERR; @@ -129,12 +129,12 @@ void EtsExports::setClasspath(const char* module, const char *classpath) { } } -static std::map g_defaultClasspaths = { - {"InteropNativeModule", "@koalaui/interop/InteropNativeModule/InteropNativeModule"}, +static std::map g_defaultClasspaths = { + {"InteropNativeModule", "#koalaui/interop/InteropNativeModule/InteropNativeModule"}, // todo leave just InteropNativeModule, define others via KOALA_ETS_INTEROP_MODULE_CLASSPATH - {"TestNativeModule", "@koalaui/arkts-arkui/generated/arkts/TestNativeModule/TestNativeModule"}, - {"ArkUINativeModule", "@koalaui/arkts-arkui/generated/arkts/ArkUINativeModule/ArkUINativeModule"}, - {"ArkUIGeneratedNativeModule", "@koalaui/arkts-arkui/generated/arkts/ArkUIGeneratedNativeModule/ArkUIGeneratedNativeModule"}, + {"TestNativeModule", "@ohos/arkui/generated/arkts/TestNativeModule/TestNativeModule"}, + {"ArkUINativeModule", "@ohos/arkui/generated/arkts/ArkUINativeModule/ArkUINativeModule"}, + {"ArkUIGeneratedNativeModule", "@ohos/arkui/generated/arkts/ArkUIGeneratedNativeModule/ArkUIGeneratedNativeModule"}, }; const std::string& EtsExports::getClasspath(const std::string& module) { auto it = classpaths.find(module); diff --git a/koala-wrapper/koalaui/interop/src/cpp/ets/convertors-ets.h b/koala-wrapper/koalaui/interop/src/cpp/ets/convertors-ets.h index c03b5af27..1525d97d6 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/ets/convertors-ets.h +++ b/koala-wrapper/koalaui/interop/src/cpp/ets/convertors-ets.h @@ -13,11 +13,11 @@ * limitations under the License. */ -#pragma once +#ifndef CONVERTORS_ETS_H +#define CONVERTORS_ETS_H #ifdef KOALA_ETS_NAPI -#include #include #include #include @@ -31,11 +31,102 @@ template struct InteropTypeConverter { using InteropType = T; - static T convertFrom(EtsEnv* env, InteropType value) { return value; } - static InteropType convertTo(EtsEnv* env, T value) { return value; } + static T convertFrom(EtsEnv* env, InteropType value) = delete; + static InteropType convertTo(EtsEnv* env, T value) = delete; static void release(EtsEnv* env, InteropType value, T converted) {} }; +template<> +struct InteropTypeConverter { + using InteropType = ets_boolean; + static KBoolean convertFrom(EtsEnv* env, InteropType value) { return value; } + static InteropType convertTo(EtsEnv* env, KBoolean value) { return value; } + static void release(EtsEnv* env, InteropType value, KBoolean converted) {} +}; + + +template<> +struct InteropTypeConverter { + using InteropType = ets_int; + static KInt convertFrom(EtsEnv* env, InteropType value) { return value; } + static InteropType convertTo(EtsEnv* env, KInt value) { return value; } + static void release(EtsEnv* env, InteropType value, KInt converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_int; + static KUInt convertFrom(EtsEnv* env, InteropType value) { return value; } + static InteropType convertTo(EtsEnv* env, KUInt value) { return value; } + static void release(EtsEnv* env, InteropType value, KUInt converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_byte; + static KByte convertFrom(EtsEnv* env, InteropType value) { return value; } + static InteropType convertTo(EtsEnv* env, KByte value) { return value; } + static void release(EtsEnv* env, InteropType value, KByte converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_float; + static KFloat convertFrom(EtsEnv* env, InteropType value) { return value; } + static InteropType convertTo(EtsEnv* env, InteropFloat32 value) { return value; } + static void release(EtsEnv* env, InteropType value, KFloat converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_long; + static KSerializerBuffer convertFrom(EtsEnv* env, InteropType value) { + return reinterpret_cast(static_cast(value)); + } + static InteropType convertTo(EtsEnv* env, KSerializerBuffer value) = delete; + static void release(EtsEnv* env, InteropType value, KSerializerBuffer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_object; + static KVMObjectHandle convertFrom(EtsEnv* env, InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(EtsEnv* env, KVMObjectHandle value) { + return reinterpret_cast(value); + } + static void release(EtsEnv* env, InteropType value, KVMObjectHandle converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_byteArray; + static KInteropBuffer convertFrom(EtsEnv* env, InteropType value) { + if (!value) return KInteropBuffer(); + KInteropBuffer result; + result.data = (KByte*)env->PinByteArray(value); + result.length = env->GetArrayLength(value); + return result; + } + static InteropType convertTo(EtsEnv* env, KInteropBuffer value) { + int bufferLength = value.length; + ets_byteArray array = env->NewByteArray(bufferLength); + KByte* data = (KByte*)env->PinByteArray(array); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(data, bufferLength, (KByte*)value.data, bufferLength); + #else + memcpy(data, (KByte*)value.data, bufferLength); + #endif + env->UnpinByteArray(array); + value.dispose(value.resourceId); + return array; + } + static void release(EtsEnv* env, InteropType value, KInteropBuffer converted) { + env->UnpinByteArray(value); + } +}; + template<> struct InteropTypeConverter { using InteropType = ets_string; @@ -65,11 +156,36 @@ struct InteropTypeConverter { static void release(EtsEnv* env, InteropType value, KNativePointer converted) {} }; +template<> +struct InteropTypeConverter { + using InteropType = ets_long; + static KLong convertFrom(EtsEnv* env, InteropType value) { + return value; + } + static InteropType convertTo(EtsEnv* env, KLong value) { + return value; + } + static void release(EtsEnv* env, InteropType value, KLong converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_long; + static KULong convertFrom(EtsEnv* env, InteropType value) { + return static_cast(value); + } + static InteropType convertTo(EtsEnv* env, KULong value) { + return static_cast(value); + } + static void release(EtsEnv* env, InteropType value, KULong converted) {} +}; + + template<> struct InteropTypeConverter { using InteropType = ets_intArray; static KInt* convertFrom(EtsEnv* env, InteropType value) { - if (!value) return nullptr; + if (!value) return nullptr; return env->PinIntArray(value); } static InteropType convertTo(EtsEnv* env, KInt* value) = delete; @@ -91,6 +207,26 @@ struct InteropTypeConverter { } }; +template<> +struct InteropTypeConverter { + using InteropType = ets_byteArray; + static KInteropReturnBuffer convertFrom(EtsEnv* env, InteropType value) = delete; + static InteropType convertTo(EtsEnv* env, KInteropReturnBuffer value) { + int bufferLength = value.length; + ets_byteArray array = env->NewByteArray(bufferLength); + KByte* data = (KByte*)env->PinByteArray(array); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(data, bufferLength, (KByte*)value.data, bufferLength); + #else + memcpy(data, (KByte*)value.data, bufferLength); + #endif + env->UnpinByteArray(array); + value.dispose(value.data, bufferLength); + return array; + }; + static void release(EtsEnv* env, InteropType value, KInteropReturnBuffer converted) {} +}; + template<> struct InteropTypeConverter { using InteropType = ets_byteArray; @@ -112,8 +248,7 @@ template <> struct InteropTypeConverter { static InteropType convertTo(EtsEnv *env, KInteropNumber value) { return value.asDouble(); } - static void release(EtsEnv *env, InteropType value, - KInteropNumber converted) {} + static void release(EtsEnv *env, InteropType value, KInteropNumber converted) {} }; template<> @@ -124,7 +259,7 @@ struct InteropTypeConverter { const static ets_class int_class = reinterpret_cast(env->NewGlobalRef(env->FindClass("std/core/Int"))); const static ets_class string_class = reinterpret_cast(env->NewGlobalRef(env->FindClass("std/core/String"))); const static ets_class resource_class = reinterpret_cast( - env->NewGlobalRef(env->FindClass("@koalaui/arkts-arkui/generated/ArkResourceInterfaces/Resource"))); + env->NewGlobalRef(env->FindClass("@ohos/arkui/generated/resource/Resource"))); if (env->IsInstanceOf(value, double_class)) { const static ets_method double_p = env->Getp_method(double_class, "unboxed", ":D"); @@ -134,7 +269,7 @@ struct InteropTypeConverter { return KLength{ 1, (KFloat)env->CallIntMethod(value, int_p), 1, 0 }; } else if (env->IsInstanceOf(value, string_class)) { KStringPtr ptr = InteropTypeConverter::convertFrom(env, reinterpret_cast(value)); - KLength length = { 0 }; + KLength length { 0 }; parseKLength(ptr, &length); length.type = 2; length.resource = 0; @@ -165,6 +300,44 @@ inline void releaseArgument(EtsEnv* env, typename InteropTypeConverter::In InteropTypeConverter::release(env, arg, data); } +template +struct DirectInteropTypeConverter { + using InteropType = T; + static T convertFrom(InteropType value) { return value; } + static InteropType convertTo(T value) { return value; } +}; + +template<> +struct DirectInteropTypeConverter { + using InteropType = ets_long; + static KNativePointer convertFrom(InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(KNativePointer value) { + return reinterpret_cast(value); + } +}; + +template<> +struct DirectInteropTypeConverter { + using InteropType = ets_long; + static KSerializerBuffer convertFrom(InteropType value) { + return reinterpret_cast(static_cast(value)); + } + static InteropType convertTo(KSerializerBuffer value) = delete; +}; + +template <> +struct DirectInteropTypeConverter { + using InteropType = ets_double; + static KInteropNumber convertFrom(InteropType value) { + return KInteropNumber::fromDouble(value); + } + static InteropType convertTo(KInteropNumber value) { + return value.asDouble(); + } +}; + #define ETS_SLOW_NATIVE_FLAG 1 class EtsExports { @@ -1199,6 +1372,30 @@ MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2, ETS_SL } \ MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3, ETS_SLOW_NATIVE_FLAG) +#define KOALA_INTEROP_CTX_5(name, Ret, P0, P1, P2, P3, P4) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx, p0, p1, p2, p3, p4)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, ETS_SLOW_NATIVE_FLAG) + #define KOALA_INTEROP_CTX_V0(name) \ void Ark_##name(EtsEnv *env, ets_class clazz) { \ KOALA_MAYBE_LOG(name) \ @@ -1292,6 +1489,307 @@ MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3, } \ MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, ETS_SLOW_NATIVE_FLAG) +#define KOALA_INTEROP_DIRECT_0(name, Ret) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name()); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret, 0) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0, 0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1, 0) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2, 0) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9, \ + InteropTypeConverter::InteropType p10 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9), DirectInteropTypeConverter::convertFrom(p10))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) +#define KOALA_INTEROP_DIRECT_V0(name) \ + inline void Ark_##name( \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void", 0) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0, 0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1, 0) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2, 0) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9, \ + InteropTypeConverter::InteropType p10 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9), DirectInteropTypeConverter::convertFrom(p10)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) + bool setKoalaEtsNapiCallbackDispatcher( EtsEnv* etsEnv, ets_class clazz, @@ -1307,10 +1805,7 @@ void getKoalaEtsNapiCallbackDispatcher(ets_class* clazz, ets_method* method); getKoalaEtsNapiCallbackDispatcher(&clazz, &method); \ EtsEnv* etsEnv = reinterpret_cast(vmContext); \ etsEnv->PushLocalFrame(1); \ - ets_byteArray args_ets = etsEnv->NewByteArray(length); \ - etsEnv->SetByteArrayRegion(args_ets, 0, length, reinterpret_cast(args)); \ - etsEnv->CallStaticIntMethod(clazz, method, id, args_ets, length); \ - etsEnv->GetByteArrayRegion(args_ets, 0, length, reinterpret_cast(args)); \ + etsEnv->CallStaticIntMethod(clazz, method, id, args, length); \ etsEnv->PopLocalFrame(nullptr); \ } @@ -1320,11 +1815,8 @@ void getKoalaEtsNapiCallbackDispatcher(ets_class* clazz, ets_method* method); ets_method method = nullptr; \ getKoalaEtsNapiCallbackDispatcher(&clazz, &method); \ EtsEnv* etsEnv = reinterpret_cast(venv); \ - etsEnv->PushLocalFrame(1); \ - ets_byteArray args_ets = etsEnv->NewByteArray(length); \ - etsEnv->SetByteArrayRegion(args_ets, 0, length, reinterpret_cast(args)); \ - int32_t rv = etsEnv->CallStaticIntMethod(clazz, method, id, args_ets, length); \ - etsEnv->GetByteArrayRegion(args_ets, 0, length, reinterpret_cast(args)); \ + etsEnv->PushLocalFrame(1); \ + int32_t rv = etsEnv->CallStaticIntMethod(clazz, method, id, args, length); \ etsEnv->PopLocalFrame(nullptr); \ return rv; \ } @@ -1347,3 +1839,5 @@ void getKoalaEtsNapiCallbackDispatcher(ets_class* clazz, ets_method* method); } while (0) #endif // KOALA_ETS_NAPI + +#endif // CONVERTORS_ETS_H \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/cpp/ets/etsapi.h b/koala-wrapper/koalaui/interop/src/cpp/ets/etsapi.h index 15868ee90..41641c97e 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/ets/etsapi.h +++ b/koala-wrapper/koalaui/interop/src/cpp/ets/etsapi.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021-2025 Huawei Device Co., Ltd. + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/interop-logging.cc b/koala-wrapper/koalaui/interop/src/cpp/interop-logging.cc index 073878547..2d2b11af7 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/interop-logging.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/interop-logging.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,6 +14,7 @@ */ #include #include +#include #include "interop-logging.h" @@ -27,7 +28,7 @@ struct Log { std::vector groupedLogs; void startGroupedLog(int index) { - if (index >= (int)groupedLogs.size()) { + if (index >= static_cast(groupedLogs.size())) { groupedLogs.resize(index + 1); for (int i = 0; i <= index; i++) { if (!groupedLogs[i]) groupedLogs[i] = new Log(); @@ -38,27 +39,27 @@ void startGroupedLog(int index) { } void stopGroupedLog(int index) { - if (index < (int)groupedLogs.size()) { + if (index < static_cast(groupedLogs.size())) { groupedLogs[index]->isActive = false; } } void appendGroupedLog(int index, const char* str) { - if (index < (int)groupedLogs.size()) { + if (index < static_cast(groupedLogs.size())) { groupedLogs[index]->log.append(str); } } const char* getGroupedLog(int index) { - if (index < (int)groupedLogs.size()) { - auto result = groupedLogs[index]->log.c_str(); + if (index < static_cast(groupedLogs.size())) { + const char* result = groupedLogs[index]->log.c_str(); return result; } return ""; } int needGroupedLog(int index) { - if (index < (int)groupedLogs.size()) { + if (index < static_cast(groupedLogs.size())) { return groupedLogs[index]->isActive; } return 0; @@ -76,4 +77,18 @@ const GroupLogger defaultInstance = { const GroupLogger* GetDefaultLogger() { return &defaultInstance; +} + +extern "C" [[noreturn]] void InteropLogFatal(const char* format, ...) { + va_list args; + va_start(args, format); + char buffer[4096]; + #ifdef __STDC_LIB_EXT1__ + vsnprintf_s(buffer, sizeof(buffer) - 1, format, args); + #else + vsnprintf(buffer, sizeof(buffer) - 1, format, args); + #endif + LOGE("FATAL: %s", buffer); + va_end(args); + abort(); } \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/cpp/interop-logging.h b/koala-wrapper/koalaui/interop/src/cpp/interop-logging.h index 4d1b7bc0f..61b490699 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/interop-logging.h +++ b/koala-wrapper/koalaui/interop/src/cpp/interop-logging.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,8 +15,15 @@ #ifndef _INTEROP_LGGING_H #define _INTEROP_LGGING_H -#include -#include +#ifdef __cplusplus + #include + #include + #include +#else + #include + #include + #include +#endif #if defined(KOALA_OHOS) #include "oh_sk_log.h" @@ -37,6 +44,10 @@ #define INTEROP_API_EXPORT __attribute__((visibility("default"))) #endif +#ifndef ASSERT + #define ASSERT(expression) assert(expression) +#endif + // Grouped logs. Keep consistent with type in ServiceGroupLogger typedef struct GroupLogger { void (*startGroupedLog)(int kind); @@ -46,6 +57,6 @@ typedef struct GroupLogger { int (*needGroupedLog)(int kind); } GroupLogger; -const GroupLogger* GetDefaultLogger(); +extern "C" INTEROP_API_EXPORT const GroupLogger* GetDefaultLogger(); #endif // _INTEROP_LOGGING_H \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/cpp/interop-types.h b/koala-wrapper/koalaui/interop/src/cpp/interop-types.h index 4c5c26187..6f10e60b8 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/interop-types.h +++ b/koala-wrapper/koalaui/interop/src/cpp/interop-types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,14 +11,22 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ +*/ #ifndef _INTEROP_TYPES_H_ #define _INTEROP_TYPES_H_ -#include +#ifdef __cplusplus + #include +#else + #include +#endif -#define INTEROP_FATAL(msg, ...) do { fprintf(stderr, msg "\n", ##__VA_ARGS__); abort(); } while (0) +#ifdef __cplusplus +extern "C" [[noreturn]] +#endif +void InteropLogFatal(const char* format, ...); +#define INTEROP_FATAL(msg, ...) do { InteropLogFatal(msg, ##__VA_ARGS__); } while (0) typedef enum InteropTag { @@ -142,4 +150,24 @@ typedef struct InteropBuffer { InteropInt64 length; } InteropBuffer; +typedef struct InteropAsyncWork { + InteropNativePointer workId; + void (*queue)(InteropNativePointer workId); + void (*cancel)(InteropNativePointer workId); +} InteropAsyncWork; + +typedef struct InteropAsyncWorker { + InteropAsyncWork (*createWork)( + InteropVMContext context, + InteropNativePointer handle, + void (*execute)(InteropNativePointer handle), + void (*complete)(InteropNativePointer handle) + ); +} InteropAsyncWorker; +typedef const InteropAsyncWorker* InteropAsyncWorkerPtr; + +typedef struct InteropObject { + InteropCallbackResource resource; +} InteropObject; + #endif // _INTEROP_TYPES_H_ diff --git a/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.cc b/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.cc index 782f2c2e3..683625b09 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.h b/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.h index 2ebefafe7..bfcacbb55 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.h +++ b/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,12 +13,12 @@ * limitations under the License. */ -#pragma once +#ifndef CONVERTORS_JNI_H +#define CONVERTORS_JNI_H #ifdef KOALA_JNI #include -#include #include #include @@ -99,7 +99,9 @@ struct InteropTypeConverter { env->GetStringUTFRegion(value, 0, env->GetStringLength(value), result.data()); return result; } - static InteropType convertTo(JNIEnv* env, KStringPtr value) = delete; + static InteropType convertTo(JNIEnv* env, KStringPtr value) { + return env->NewStringUTF(value.c_str()); + } static inline void release(JNIEnv* env, InteropType value, const KStringPtr& converted) { } }; @@ -145,9 +147,14 @@ struct SlowInteropTypeConverter { return result; } static InteropType convertTo(JNIEnv* env, KInteropBuffer value) { - jarray result = env->NewByteArray(value.length); + int bufferLength = value.length; + jarray result = env->NewByteArray(bufferLength); void* data = env->GetPrimitiveArrayCritical(result, nullptr); - memcpy(data, value.data, value.length); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(data, bufferLength, value.data, bufferLength); + #else + memcpy(data, value.data, bufferLength); + #endif env->ReleasePrimitiveArrayCritical(result, data, 0); return result; } @@ -161,11 +168,16 @@ struct SlowInteropTypeConverter { using InteropType = jarray; static inline KInteropReturnBuffer convertFrom(JNIEnv* env, InteropType value) = delete; static InteropType convertTo(JNIEnv* env, KInteropReturnBuffer value) { - jarray result = env->NewByteArray(value.length); + int bufferLength = value.length; + jarray result = env->NewByteArray(bufferLength); void* data = env->GetPrimitiveArrayCritical(result, nullptr); - memcpy(data, value.data, value.length); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(data, bufferLength, value.data, bufferLength); + #else + memcpy(data, value.data, bufferLength); + #endif env->ReleasePrimitiveArrayCritical(result, data, 0); - value.dispose(value.data, value.length); + value.dispose(value.data, bufferLength); return result; } static inline void release(JNIEnv* env, InteropType value, const KInteropReturnBuffer& converted) = delete; @@ -295,7 +307,7 @@ template<> struct InteropTypeConverter { using InteropType = jstring; static KLength convertFrom(JNIEnv* env, InteropType value) { - KLength result = { 0 }; + KLength result { 0 }; if (value == nullptr) { result.type = -1; // ARK_RUNTIME_UNEXPECTED @@ -1315,6 +1327,30 @@ MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2) } \ MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3) +#define KOALA_INTEROP_CTX_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_JNI_CALL(SlowInteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + SlowInteropTypeConverter::InteropType _p0, \ + SlowInteropTypeConverter::InteropType _p1, \ + SlowInteropTypeConverter::InteropType _p2, \ + SlowInteropTypeConverter::InteropType _p3, \ + SlowInteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = SlowInteropTypeConverter::convertTo(env, impl_##name(ctx, p0, p1, p2, p3, p4)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4) + #define KOALA_INTEROP_CTX_V0(name) \ KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance) { \ KOALA_MAYBE_LOG(name) \ @@ -1408,6 +1444,55 @@ MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3) } \ MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4) +#define KOALA_INTEROP_DIRECT_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_DIRECT_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + bool setKoalaJniCallbackDispatcher( JNIEnv* env, jclass clazz, @@ -1463,3 +1548,5 @@ void getKoalaJniCallbackDispatcher(jclass* clazz, jmethodID* method); } while (0) #endif // KOALA_JNI_CALL + +#endif // CONVERTORS_JNI_H \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/cpp/jsc/convertors-jsc.cc b/koala-wrapper/koalaui/interop/src/cpp/jsc/convertors-jsc.cc index b1edbde65..246a1fd1c 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/jsc/convertors-jsc.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/jsc/convertors-jsc.cc @@ -16,11 +16,12 @@ #include #include <_types/_uint32_t.h> #include <_types/_uint8_t.h> -#include #include #include "convertors-jsc.h" +#include "interop-logging.h" + // See https://github.com/BabylonJS/BabylonNative/blob/master/Dependencies/napi/napi-direct/source/js_native_api_javascriptcore.cc // for convertors logic. @@ -59,7 +60,7 @@ int32_t getInt32(JSContextRef context, JSValueRef value) { return 0; } if (JSValueIsUndefined(context, value)) { - assert(false); + ASSERT(false); return 0; } double result = JSValueToNumber(context, value, &exception); @@ -72,7 +73,7 @@ uint32_t getUInt32(JSContextRef context, JSValueRef value) { return 0; } if (JSValueIsUndefined(context, value)) { - assert(false); + ASSERT(false); return 0; } double result = JSValueToNumber(context, value, &exception); @@ -85,7 +86,7 @@ uint8_t getUInt8(JSContextRef context, JSValueRef value) { return 0; } if (JSValueIsUndefined(context, value)) { - assert(false); + ASSERT(false); return 0; } double result = JSValueToNumber(context, value, &exception); @@ -145,7 +146,11 @@ static JSValueRef u64ToBigInt(JSContextRef context, uint64_t value) { bigint = JSObjectCallAsFunction(context, bigIntFromParts, nullptr, 2, parts, nullptr); #else char buffer[128] = {0}; - std::snprintf(buffer, sizeof(buffer) - 1, "%zun", (size_t) value); + #ifdef __STDC_LIB_EXT1__ + std::snprintf_s(buffer, sizeof(buffer) - 1, "%zun", static_cast(value)); + #else + std::snprintf(buffer, sizeof(buffer) - 1, "%zun", static_cast(value)); + #endif JSStringRef script = JSStringCreateWithUTF8CString(buffer); bigint = JSEvaluateScript(context, script, nullptr, nullptr, 0, nullptr); JSStringRelease(script); @@ -158,10 +163,10 @@ static uint64_t bigIntToU64(JSContextRef ctx, JSValueRef value) { JSStringRef strRef = JSValueToStringCopy(ctx, value, nullptr); size_t len = JSStringGetUTF8CString(strRef, buf, sizeof(buf)); JSStringRelease(strRef); - assert(len < sizeof(buf)); + ASSERT(len < sizeof(buf)); char* suf; uint64_t numValue = std::strtoull(buf, &suf, 10); - assert(*suf == '\0'); + ASSERT(*suf == '\0'); return numValue; } @@ -175,8 +180,8 @@ KNativePointerArray getPointerElements(JSContextRef context, JSValueRef value) { return nullptr; } - assert(JSValueIsObject(context, value)); - assert(JSValueGetTypedArrayType(context, value, nullptr) == kJSTypedArrayTypeBigUint64Array); + ASSERT(JSValueIsObject(context, value)); + ASSERT(JSValueGetTypedArrayType(context, value, nullptr) == kJSTypedArrayTypeBigUint64Array); JSObjectRef typedArray = JSValueToObject(context, value, nullptr); return reinterpret_cast(JSObjectGetTypedArrayBytesPtr(context, typedArray, nullptr)); @@ -188,7 +193,7 @@ KFloat getFloat(JSContextRef context, JSValueRef value) { return 0; } if (JSValueIsUndefined(context, value)) { - assert(false); + ASSERT(false); return 0; } double result = JSValueToNumber(context, value, &exception); @@ -201,7 +206,7 @@ KShort getShort(JSContextRef context, JSValueRef value) { return 0; } if (JSValueIsUndefined(context, value)) { - assert(false); + ASSERT(false); return 0; } double result = JSValueToNumber(context, value, &exception); @@ -214,7 +219,7 @@ KUShort getUShort(JSContextRef context, JSValueRef value) { return 0; } if (JSValueIsUndefined(context, value)) { - assert(false); + ASSERT(false); return 0; } double result = JSValueToNumber(context, value, &exception); diff --git a/koala-wrapper/koalaui/interop/src/cpp/jsc/convertors-jsc.h b/koala-wrapper/koalaui/interop/src/cpp/jsc/convertors-jsc.h index b100dff7d..a0127d12f 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/jsc/convertors-jsc.h +++ b/koala-wrapper/koalaui/interop/src/cpp/jsc/convertors-jsc.h @@ -13,7 +13,8 @@ * limitations under the License. */ -#pragma once +#ifndef CONVERTORS_JSC_H +#define CONVERTORS_JSC_H #if defined(linux) #include // For IDE completion @@ -25,9 +26,8 @@ #include #include -#include - #include "koala-types.h" +#include "interop-logging.h" template inline ElemType* getTypedElements(JSContextRef context, const JSValueRef arguments) { @@ -35,7 +35,7 @@ inline ElemType* getTypedElements(JSContextRef context, const JSValueRef argumen return nullptr; } if (JSValueIsUndefined(context, arguments)) { - assert(false); + ASSERT(false); return nullptr; } JSValueRef exception {}; @@ -46,7 +46,7 @@ inline ElemType* getTypedElements(JSContextRef context, const JSValueRef argumen template inline ElemType* getTypedElements(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getTypedElements(context, arguments[index]); } @@ -74,85 +74,85 @@ inline Type getArgument(JSContextRef context, size_t argumentCount, const JSValu template <> inline int32_t getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getInt32(context, arguments[index]); } template <> inline uint32_t getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getUInt32(context, arguments[index]); } template <> inline uint8_t getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getUInt8(context, arguments[index]); } template <> inline KNativePointer getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getPointer(context, arguments[index]); } template <> inline KFloat getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getFloat(context, arguments[index]); } template <> inline KStringPtr getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getString(context, arguments[index]); } template <> inline KBoolean getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getBoolean(context, arguments[index]); } template <> inline KInt* getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getInt32Elements(context, arguments[index]); } template <> inline float* getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getFloat32Elements(context, arguments[index]); } template <> inline KByte* getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getByteElements(context, arguments[index]); } template <> inline KStringArray getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getKStringArray(context, arguments[index]); } template <> inline KUShort* getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getUShortElements(context, arguments[index]); } template <> inline KNativePointerArray getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getPointerElements(context, arguments[index]); } template <> inline KShort* getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { - assert(index < argumentCount); + ASSERT(index < argumentCount); return getShortElements(context, arguments[index]); } @@ -709,14 +709,65 @@ void InitExports(JSGlobalContextRef globalContext); } \ MAKE_JSC_EXPORT(name) + #define KOALA_INTEROP_DIRECT_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_DIRECT_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + #define KOALA_INTEROP_THROW(vmContext, object, ...) \ do { \ - /* TODO: implement*/ assert(false); \ + /* TODO: implement*/ ASSERT(false); \ return __VA_ARGS__; \ } while (0) #define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ do { \ - assert(false); /* TODO: implement*/ \ + ASSERT(false); /* TODO: implement*/ \ return __VA_ARGS__; \ } while (0) + +#endif // CONVERTORS_JSC_H \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/cpp/napi/convertors-napi.cc b/koala-wrapper/koalaui/interop/src/cpp/napi/convertors-napi.cc index 1bb1fc9b5..ee54deb01 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/napi/convertors-napi.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/napi/convertors-napi.cc @@ -18,10 +18,7 @@ #include #include "interop-logging.h" - -#ifdef KOALA_INTEROP_MODULE #undef KOALA_INTEROP_MODULE -#endif #define KOALA_INTEROP_MODULE InteropNativeModule #include "convertors-napi.h" @@ -116,7 +113,7 @@ KStringPtr getString(napi_env env, napi_value value) { return result; } -KNativePointer getPointer(napi_env env, napi_value value) { +KNativePointer getPointerSlow(napi_env env, napi_value value) { napi_valuetype valueType = getValueTypeChecked(env, value); if (valueType == napi_valuetype::napi_external) { KNativePointer result = nullptr; @@ -142,19 +139,29 @@ KNativePointer getPointer(napi_env env, napi_value value) { } KLong getInt64(napi_env env, napi_value value) { - if (getValueTypeChecked(env, value) != napi_valuetype::napi_bigint) { - napi_throw_error(env, nullptr, "cannot be coerced to int64"); - return -1; - } - - bool isWithinRange = true; - int64_t ptr64 = 0; - napi_get_value_bigint_int64(env, value, &ptr64, &isWithinRange); - if (!isWithinRange) { - napi_throw_error(env, nullptr, "cannot be coerced to int64, value is too large"); - return -1; - } - return static_cast(ptr64); + // if (getValueTypeChecked(env, value) == napi_valuetype::napi_number) { + // int64_t result = 0; + // if (napi_get_value_int64(env, value, &result) != napi_ok) { + // napi_throw_error(env, nullptr, "cannot be coerced to int64"); + // return -1; + // } + // return static_cast(result); + // } + // if (getValueTypeChecked(env, value) == napi_valuetype::napi_bigint) { + // bool isWithinRange = true; + // int64_t ptr64 = 0; + // if (napi_get_value_bigint_int64(env, value, &ptr64, &isWithinRange) != napi_ok) { + // napi_throw_error(env, nullptr, "cannot be coerced to int64"); + // return -1; + // } + // if (!isWithinRange) { + // napi_throw_error(env, nullptr, "cannot be coerced to int64, value is too large"); + // return -1; + // } + // return static_cast(ptr64); + // } + // napi_throw_error(env, nullptr, "cannot be coerced to int64"); + return -1; } KULong getUInt64(napi_env env, napi_value value) { @@ -170,7 +177,7 @@ KULong getUInt64(napi_env env, napi_value value) { napi_throw_error(env, nullptr, "cannot be coerced to uint64, value is too large"); return -1; } - return static_cast(ptr64); + return static_cast(ptr64); } napi_value makeString(napi_env env, const KStringPtr& value) { @@ -363,7 +370,7 @@ ModuleRegisterCallback ProvideModuleRegisterCallback(ModuleRegisterCallback valu static constexpr bool splitModules = true; static napi_value InitModule(napi_env env, napi_value exports) { - LOG("InitModule: " QUOTE(INTEROP_LIBRARY_NAME) "\n"); + // LOG("InitModule: " QUOTE(INTEROP_LIBRARY_NAME)); Exports* inst = Exports::getInstance(); napi_status status; napi_value target = exports; diff --git a/koala-wrapper/koalaui/interop/src/cpp/napi/convertors-napi.h b/koala-wrapper/koalaui/interop/src/cpp/napi/convertors-napi.h index 720d423f1..58b71234c 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/napi/convertors-napi.h +++ b/koala-wrapper/koalaui/interop/src/cpp/napi/convertors-napi.h @@ -55,20 +55,45 @@ inline void releaseArgument(napi_env env, typename InteropTypeConverter::I InteropTypeConverter::release(env, arg, data); } + +napi_value makeString(napi_env env, KStringPtr value); +napi_value makeString(napi_env env, const std::string& value); +napi_value makeBoolean(napi_env env, KBoolean value); +napi_value makeInt32(napi_env env, int32_t value); +napi_value makeUInt32(napi_env env, uint32_t value); +napi_value makeInt64(napi_env env, int64_t value); +napi_value makeUInt64(napi_env env, uint64_t value); +napi_value makeFloat32(napi_env env, float value); +napi_value makePointer(napi_env env, void* value); +napi_value makeVoid(napi_env env); + +void* getPointerSlow(napi_env env, napi_value value); + +inline void* getPointer(napi_env env, napi_value value) { + bool isWithinRange = true; + uint64_t ptrU64 = 0; + napi_status status = napi_get_value_bigint_uint64(env, value, &ptrU64, &isWithinRange); + if (status != 0 || !isWithinRange) + return getPointerSlow(env, value); + else + return reinterpret_cast(ptrU64); +} +void* getSerializerBufferPointer(napi_env env, napi_value value); + template<> struct InteropTypeConverter { using InteropType = napi_value; static KInteropBuffer convertFrom(napi_env env, InteropType value) { - KInteropBuffer result = { 0 }; + KInteropBuffer result {}; bool isArrayBuffer = false; napi_is_arraybuffer(env, value, &isArrayBuffer); if (isArrayBuffer) { - napi_get_arraybuffer_info(env, value, &result.data, (size_t*)&result.length); + napi_get_arraybuffer_info(env, value, &result.data, reinterpret_cast(&result.length)); } else { bool isDataView = false; napi_is_dataview(env, value, &isDataView); if (isDataView) { - napi_get_dataview_info(env, value, (size_t*)&result.length, &result.data, nullptr, nullptr); + napi_get_dataview_info(env, value, reinterpret_cast(&result.length), &result.data, nullptr, nullptr); } } return result; @@ -133,6 +158,18 @@ struct InteropTypeConverter { static void release(napi_env env, InteropType value, KInteropNumber converted) {} }; +template<> +struct InteropTypeConverter { + using InteropType = napi_value; + static KSerializerBuffer convertFrom(napi_env env, InteropType value) { + return (KSerializerBuffer)getSerializerBufferPointer(env, value); // TODO we are receiving Uint8Array from the native side + } + static InteropType convertTo(napi_env env, KSerializerBuffer value) { + return makePointer(env, value); + } + static void release(napi_env env, InteropType value, KSerializerBuffer converted) {} +}; + template<> struct InteropTypeConverter { using InteropType = napi_value; @@ -168,21 +205,24 @@ struct InteropTypeConverter { }; -#define KOALA_INTEROP_THROW(vmcontext, object, ...) \ +#define KOALA_INTEROP_THROW(vmContext, object, ...) \ do { \ - napi_env env = (napi_env)vmcontext; \ + napi_env env = (napi_env)vmContext; \ napi_handle_scope scope = nullptr; \ napi_open_handle_scope(env, &scope); \ - napi_throw((napi_env)vmcontext, object); \ + napi_throw(env, object); \ napi_close_handle_scope(env, scope); \ return __VA_ARGS__; \ } while (0) #define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ do { \ - napi_value value; \ - napi_create_string_utf8((napi_env)vmContext, message, strlen(message), &value); \ - KOALA_INTEROP_THROW(vmContext, value, __VA_ARGS__); \ + napi_env env = (napi_env)vmContext; \ + napi_handle_scope scope = nullptr; \ + napi_open_handle_scope(env, &scope); \ + napi_throw_error(env, nullptr, message); \ + napi_close_handle_scope(env, scope); \ + return __VA_ARGS__; \ } while (0) #define NAPI_ASSERT_INDEX(info, index, result) \ @@ -364,6 +404,10 @@ inline KNativePointer* getPointerElements(const CallbackInfo& info, int index) { return getTypedElements(info, index); } +inline void* getSerializerBufferPointer(napi_env env, napi_value value) { + return getTypedElements(env, value); +} + KInt getInt32(napi_env env, napi_value value); inline int32_t getInt32(const CallbackInfo& info, int index) { NAPI_ASSERT_INDEX(info, index, 0); @@ -389,7 +433,6 @@ inline KStringPtr getString(const CallbackInfo& info, int index) { NAPI_ASSERT_INDEX(info, index, KStringPtr()); return getString(info.Env(), info[index]); } -void* getPointer(napi_env env, napi_value value); inline void* getPointer(const CallbackInfo& info, int index) { NAPI_ASSERT_INDEX(info, index, nullptr); return getPointer(info.Env(), info[index]); @@ -409,6 +452,12 @@ inline KBoolean getBoolean(const CallbackInfo& info, int index) { NAPI_ASSERT_INDEX(info, index, false); return getBoolean(info.Env(), info[index]); } +// TODO should we keep supporting conversion to and from raw JS object values? +// napi_value getObject(napi_env env, napi_value value); +// inline napi_value getObject(const CallbackInfo& info, int index) { +// NAPI_ASSERT_INDEX(info, index, info.Env().Global()); +// return getObject(info.Env(), info[index]); +// } template inline Type getArgument(const CallbackInfo& info, int index) = delete; @@ -434,9 +483,15 @@ inline KInteropNumber getArgument(const CallbackInfo& info, int return getArgument(info.Env(), info[index]); } +template <> +inline KSerializerBuffer getArgument(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, nullptr); + return getArgument(info.Env(), info[index]); +} + template <> inline KLength getArgument(const CallbackInfo& info, int index) { - KLength result = { 0 }; + KLength result { 0 }; NAPI_ASSERT_INDEX(info, index, result); auto value = info[index]; napi_valuetype type; @@ -479,7 +534,7 @@ inline KLength getArgument(const CallbackInfo& info, int index) { template <> inline KInteropBuffer getArgument(const CallbackInfo& info, int index) { - NAPI_ASSERT_INDEX(info, index, { 0 }); + NAPI_ASSERT_INDEX(info, index, {}); return getArgument((napi_env)info.Env(), (napi_value)info[index]); } @@ -513,11 +568,6 @@ inline KNativePointerArray getArgument(const CallbackInfo& return getPointerElements(info, index); } -// template <> -// inline napi_value getArgument(const CallbackInfo& info, int index) { -// return getObject(info, index); -// } - template <> inline uint8_t* getArgument(const CallbackInfo& info, int index) { return getUInt8Elements(info, index); @@ -563,18 +613,6 @@ inline KStringPtr getArgument(const CallbackInfo& info, int index) { return getString(info, index); } -napi_value makeString(napi_env env, KStringPtr value); -napi_value makeString(napi_env env, const std::string& value); -napi_value makeBoolean(napi_env env, KBoolean value); -napi_value makeInt32(napi_env env, int32_t value); -napi_value makeUInt32(napi_env env, uint32_t value); -napi_value makeInt64(napi_env env, int32_t value); -napi_value makeUInt64(napi_env env, uint32_t value); -napi_value makeFloat32(napi_env env, float value); -napi_value makePointer(napi_env env, void* value); -napi_value makeVoid(napi_env env); -// napi_value makeObject(napi_env env, napi_value object); - inline napi_value makeVoid(const CallbackInfo& info) { return makeVoid(info.Env()); } @@ -1227,6 +1265,20 @@ public: } \ MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) +#define KOALA_INTEROP_CTX_5(name, Ret, P0, P1, P2, P3, P4) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + return makeResult(info, impl_##name(ctx, p0, p1, p2, p3, p4)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + #define KOALA_INTEROP_CTX_V0(name) \ napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ KOALA_MAYBE_LOG(name) \ @@ -1318,6 +1370,55 @@ public: } \ } while (0) + #define KOALA_INTEROP_DIRECT_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_DIRECT_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + napi_value getKoalaNapiCallbackDispatcher(napi_env env); // TODO: can/shall we cache bridge reference? diff --git a/koala-wrapper/koalaui/interop/src/cpp/napi/win-dynamic-node.cc b/koala-wrapper/koalaui/interop/src/cpp/napi/win-dynamic-node.cc index 6ec8fcc34..714d3a967 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/napi/win-dynamic-node.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/napi/win-dynamic-node.cc @@ -669,4 +669,4 @@ napi_set_named_property(napi_env env, napi_value value) { LoadNapiFunctions(); return p_napi_set_named_property(env, object, utf8name, value); -} +} \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/cpp/ohos/oh_sk_log.cc b/koala-wrapper/koalaui/interop/src/cpp/ohos/oh_sk_log.cc index 6aa01fe5e..0d30f1b58 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/ohos/oh_sk_log.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/ohos/oh_sk_log.cc @@ -24,9 +24,13 @@ static const char* KOALAUI_OHOS_LOG_ROOT = "/data/storage/el2/base/files/logs"; -#define APPLY_LOG_FILE_PATTERN(buf, t, ms, pid) \ - sprintf(buf, "%s/%d_%d_%d_%ld.pid%d.log", \ - KOALAUI_OHOS_LOG_ROOT, t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, ms.tv_sec, pid) +#define APPLY_LOG_FILE_PATTERN(buf, bufLen, t, ms, pid) \ + #ifdef __STDC_LIB_EXT1__ \ + sprintf_s(buf, bufLen, "%s/%d_%d_%d_%lld.pid%d.log", \ + #else \ + sprintf(buf, "%s/%d_%d_%d_%lld.pid%d.log", \ + #endif \ + KOALAUI_OHOS_LOG_ROOT, (t).tm_year + 1900, (t).tm_mon + 1, (t).tm_mday, (ms).tv_sec, pid) const char* oh_sk_log_type_str(oh_sk_log_type type) { switch (type) { @@ -46,15 +50,16 @@ void oh_sk_file_log(oh_sk_log_type type, const char* msg, ...) { static char* path = nullptr; if (!path) { - path = new char[strlen(KOALAUI_OHOS_LOG_ROOT) + 100]; - APPLY_LOG_FILE_PATTERN(path, lt, ms, getpid()); + size_t len = strlen(KOALAUI_OHOS_LOG_ROOT) + 100; + path = new char[len]; + APPLY_LOG_FILE_PATTERN(path, len, lt, ms, getpid()); mkdir(KOALAUI_OHOS_LOG_ROOT, 0777); } std::unique_ptr file(fopen(path, "a"), fclose); if (!file) return; - fprintf(file.get(), "%02d-%02d %02d:%02d:%02d.%03ld %s koala: ", + fprintf(file.get(), "%02d-%02d %02d:%02d:%02d.%03lld %s koala: ", lt.tm_mon + 1, lt.tm_mday, lt.tm_hour, lt.tm_min, lt.tm_sec, ms.tv_usec / 1000, oh_sk_log_type_str(type)); diff --git a/koala-wrapper/koalaui/interop/src/cpp/ohos/oh_sk_log.h b/koala-wrapper/koalaui/interop/src/cpp/ohos/oh_sk_log.h index 961e2c0f1..6544a2e2e 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/ohos/oh_sk_log.h +++ b/koala-wrapper/koalaui/interop/src/cpp/ohos/oh_sk_log.h @@ -13,7 +13,8 @@ * limitations under the License. */ -#pragma once +#ifndef OH_SK_LOG_H +#define OH_SK_LOG_H #include @@ -55,3 +56,5 @@ const char* oh_sk_log_type_str(oh_sk_log_type type); #define OH_SK_LOG_FATAL_A(msg, ...) OH_LOG_Print(LOG_APP, LOG_FATAL, 0xFF00, "Koala", msg, ##__VA_ARGS__) #endif + +#endif // OH_SK_LOG_H \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/cpp/profiler.h b/koala-wrapper/koalaui/interop/src/cpp/profiler.h index a3b9da38c..cdfe518d9 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/profiler.h +++ b/koala-wrapper/koalaui/interop/src/cpp/profiler.h @@ -68,7 +68,11 @@ class InteropProfiler { auto ns = a.second.time; auto count = a.second.count; char buffer[1024]; - snprintf(buffer, sizeof buffer, "for %s[%lld]: %.01f%% (%lld)\n", a.first.c_str(), (long long)count, (double)ns / total * 100.0, (long long)ns); + #ifdef __STDC_LIB_EXT1__ + snprintf_s(buffer, sizeof buffer, "for %s[%lld]: %.01f%% (%lld)\n", a.first.c_str(), (long long)count, (double)ns / total * 100.0, (long long)ns); + #else + snprintf(buffer, sizeof buffer, "for %s[%lld]: %.01f%% (%lld)\n", a.first.c_str(), (long long)count, (double)ns / total * 100.0, (long long)ns); + #endif result += buffer; }); return result; diff --git a/koala-wrapper/koalaui/interop/src/cpp/tracer.h b/koala-wrapper/koalaui/interop/src/cpp/tracer.h index f3b7ad20b..e3ac0397f 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/tracer.h +++ b/koala-wrapper/koalaui/interop/src/cpp/tracer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,7 +11,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ +*/ #ifndef _KOALA_TRACER_ #define _KOALA_TRACER_ diff --git a/koala-wrapper/koalaui/interop/src/cpp/types/koala-types.h b/koala-wrapper/koalaui/interop/src/cpp/types/koala-types.h index 2c5e88754..024bfa8af 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/types/koala-types.h +++ b/koala-wrapper/koalaui/interop/src/cpp/types/koala-types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -21,6 +21,26 @@ #include #include +#include "interop-types.h" + +#ifdef _MSC_VER +#define KOALA_EXECUTE(name, code) \ + static void __init_##name() { \ + code; \ + } \ + namespace { \ + struct __Init_##name { \ + __Init_##name() { __init_##name(); } \ + } __Init_##name##_v; \ + } +#else +#define KOALA_EXECUTE(name, code) \ + __attribute__((constructor)) \ + static void __init_jni_##name() { \ + code; \ + } +#endif + struct KStringPtrImpl { KStringPtrImpl(const char* str) : _value(nullptr), _owned(true) { int len = str ? strlen(str) : 0; @@ -34,6 +54,8 @@ struct KStringPtrImpl { KStringPtrImpl(const KStringPtrImpl& other) = delete; KStringPtrImpl& operator=(const KStringPtrImpl& other) = delete; + KStringPtrImpl(InteropString value): KStringPtrImpl(value.chars, value.length, true) {} + KStringPtrImpl(KStringPtrImpl&& other) { this->_value = other.release(); this->_owned = other._owned; @@ -66,7 +88,11 @@ struct KStringPtrImpl { if (data) { if (_owned) { _value = reinterpret_cast(malloc(len + 1)); - memcpy(_value, data, len); + #ifdef __STDC_LIB_EXT1__ + memcpy_s(_value, len, data, len); + #else + memcpy(_value, data, len); + #endif _value[len] = 0; } else { _value = const_cast(data); @@ -95,49 +121,99 @@ struct KInteropNumber { int32_t i32; float f32; }; + KInteropNumber() { + this->tag = 0; + this->i32 = 0; + } + KInteropNumber(int32_t value) { + this->tag = INTEROP_TAG_INT32; + this->i32 = value; + } + KInteropNumber(float value) { + this->tag = INTEROP_TAG_FLOAT32; + this->f32 = value; + } + KInteropNumber(InteropNumber value) { + this->tag = value.tag; + this->i32 = value.i32; + } + InteropNumber toCType() { + InteropNumber result; + result.tag = this->tag; + result.i32 = this->i32; + return result; + } static inline KInteropNumber fromDouble(double value) { - KInteropNumber result = { 0 }; + KInteropNumber result; // TODO: boundary check if (value == std::floor(value)) { - result.tag = 102; // ARK_TAG_INT32 - result.i32 = (int)value; + result.tag = INTEROP_TAG_INT32; + result.i32 = static_cast(value); } else { - result.tag = 103; // ARK_TAG_FLOAT32 + result.tag = INTEROP_TAG_FLOAT32; result.f32 = (float)value; } return result; } inline double asDouble() { - if (tag == 102) // ARK_TAG_INT32 + if (tag == INTEROP_TAG_INT32) return (double)i32; else return (double)f32; } + inline int32_t asInt32() { + if (tag == INTEROP_TAG_INT32) + return i32; + else + return (int32_t)f32; + } }; -typedef int8_t KBoolean; -typedef uint8_t KByte; +typedef InteropBoolean KBoolean; +typedef InteropUInt8 KByte; typedef int16_t KChar; typedef int16_t KShort; typedef uint16_t KUShort; -typedef int32_t KInt; -typedef uint32_t KUInt; -typedef float KFloat; -typedef int64_t KLong; -typedef uint64_t KULong; -typedef double KDouble; -typedef void* KNativePointer; +typedef InteropInt32 KInt; +typedef InteropUInt32 KUInt; +typedef InteropInt64 KLong; +typedef InteropUInt64 KULong; +typedef InteropFloat32 KFloat; +typedef InteropFloat64 KDouble; +typedef InteropNativePointer KNativePointer; typedef KStringPtrImpl KStringPtr; -typedef float* KFloatArray; + +typedef KFloat* KFloatArray; typedef const uint8_t* KStringArray; -typedef void** KNativePointerArray; +typedef KNativePointer* KNativePointerArray; + +struct KSerializerBufferOpaque { + explicit operator KByte* () { + return reinterpret_cast(this); + } +}; +typedef KSerializerBufferOpaque* KSerializerBuffer; struct KInteropBuffer { + + KInteropBuffer(KLong len = 0, KNativePointer ptr = nullptr, KInt resId = 0, void (*dis)(KInt) = nullptr) + : length(len), data(ptr), resourceId(resId), dispose(dis) {} + + /** + * Takes ownership of given InteropBuffer + */ + KInteropBuffer(InteropBuffer value) { + length = value.length; + data = value.data; + resourceId = value.resource.resourceId; + dispose = value.resource.release; + } + KLong length; KNativePointer data; KInt resourceId; - void (*dispose)(KInt /* resourceId for now */); + void (*dispose)( KInt /* resourceId for now */); }; struct KInteropReturnBuffer { @@ -151,6 +227,14 @@ struct KLength { KFloat value; KInt unit; KInt resource; + InteropLength toCType() { + InteropLength result; + result.type = this->type; + result.value = this->value; + result.unit = this->unit; + result.resource = this->resource; + return result; + } }; inline void parseKLength(const KStringPtrImpl &string, KLength *result) @@ -192,18 +276,26 @@ inline void parseKLength(const KStringPtrImpl &string, KLength *result) } } -struct _KVMContext; -typedef _KVMContext *KVMContext; +typedef _InteropVMContext *KVMContext; // BEWARE: this MUST never be used in user code, only in very rare service code. struct _KVMObject; typedef _KVMObject *KVMObjectHandle; typedef struct KVMDeferred { - void* handler; - void* context; - void (*resolve)(KVMDeferred* thiz, uint8_t* data, int32_t length); - void (*reject)(KVMDeferred* thiz, const char* message); + + KVMDeferred() {} + KVMDeferred(InteropDeferred value) { + handler = value.handler; + context = value.context; + resolve = reinterpret_cast(value.resolve); + reject = reinterpret_cast(value.reject); + } + + void* handler; + void* context; + void (*resolve)(KVMDeferred* thiz, uint8_t* data, int32_t length); + void (*reject)(KVMDeferred* thiz, const char* message); } KVMDeferred; template T* ptr(KNativePointer ptr) { diff --git a/koala-wrapper/koalaui/interop/src/cpp/types/signatures.cc b/koala-wrapper/koalaui/interop/src/cpp/types/signatures.cc index 7f556adaf..71e4bab17 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/types/signatures.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/types/signatures.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,8 +13,14 @@ * limitations under the License. */ -#include "stdio.h" -#include +#ifdef __cplusplus + #include + #include +#else + #include + #include +#endif + #include #include "signatures.h" @@ -22,15 +28,15 @@ // For types with the same name on ets and jni #define KOALA_INTEROP_TYPEDEF(func, lang, CPP_TYPE, SIG_TYPE, CODE_TYPE) \ - if (std::strcmp(func, "sigType") == 0) if (type == CPP_TYPE) return SIG_TYPE; \ - if (std::strcmp(func, "codeType") == 0) if (type == CPP_TYPE) return CODE_TYPE; + if (std::strcmp(func, "sigType") == 0) if (type == (CPP_TYPE)) return SIG_TYPE; \ + if (std::strcmp(func, "codeType") == 0) if (type == (CPP_TYPE)) return CODE_TYPE; // For types with distinct names on ets and jni #define KOALA_INTEROP_TYPEDEF_LS(func, lang, CPP_TYPE, ETS_SIG_TYPE, ETS_CODE_TYPE, JNI_SIG_TYPE, JNI_CODE_TYPE) \ - if (std::strcmp(func, "sigType") == 0 && std::strcmp(lang, "ets") == 0) if (type == CPP_TYPE) return ETS_SIG_TYPE; \ - if (std::strcmp(func, "codeType") == 0 && std::strcmp(lang, "ets") == 0) if (type == CPP_TYPE) return ETS_CODE_TYPE; \ - if (std::strcmp(func, "sigType") == 0 && std::strcmp(lang, "jni") == 0) if (type == CPP_TYPE) return JNI_SIG_TYPE; \ - if (std::strcmp(func, "codeType") == 0 && std::strcmp(lang, "jni") == 0) if (type == CPP_TYPE) return JNI_CODE_TYPE; + if (std::strcmp(func, "sigType") == 0 && std::strcmp(lang, "ets") == 0) if (type == (CPP_TYPE)) return ETS_SIG_TYPE; \ + if (std::strcmp(func, "codeType") == 0 && std::strcmp(lang, "ets") == 0) if (type == (CPP_TYPE)) return ETS_CODE_TYPE; \ + if (std::strcmp(func, "sigType") == 0 && std::strcmp(lang, "jni") == 0) if (type == (CPP_TYPE)) return JNI_SIG_TYPE; \ + if (std::strcmp(func, "codeType") == 0 && std::strcmp(lang, "jni") == 0) if (type == (CPP_TYPE)) return JNI_CODE_TYPE; #define KOALA_INTEROP_TYPEDEFS(func, lang) \ KOALA_INTEROP_TYPEDEF(func, lang, "void", "V", "void") \ @@ -42,11 +48,13 @@ KOALA_INTEROP_TYPEDEF(func, lang, "int", "I", "int") \ KOALA_INTEROP_TYPEDEF(func, lang, "KInt", "I", "int") \ KOALA_INTEROP_TYPEDEF(func, lang, "KUInt", "I", "int") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KLong", "J", "long") \ KOALA_INTEROP_TYPEDEF(func, lang, "OH_Int32", "I", "int") \ KOALA_INTEROP_TYPEDEF(func, lang, "OH_Int64", "J", "long") \ KOALA_INTEROP_TYPEDEF(func, lang, "Ark_Int32", "I", "int") \ KOALA_INTEROP_TYPEDEF(func, lang, "Ark_Int64", "J", "long") \ KOALA_INTEROP_TYPEDEF(func, lang, "KNativePointer", "J", "long") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KSerializerBuffer", "J", "long") \ KOALA_INTEROP_TYPEDEF(func, lang, "Ark_NativePointer", "J", "long") \ KOALA_INTEROP_TYPEDEF(func, lang, "OH_NativePointer", "J", "long") \ KOALA_INTEROP_TYPEDEF(func, lang, "float", "F", "float") \ @@ -107,7 +115,7 @@ std::string convertType(const char* name, const char* koalaType) { #if KOALA_USE_PANDA_VM - for (int i = 1; i < (int)tokens.size(); i++) + for (int i = 1; i < static_cast(tokens.size()); i++) { result.append(sigType(tokens[i])); } @@ -117,7 +125,7 @@ std::string convertType(const char* name, const char* koalaType) { #elif KOALA_USE_JAVA_VM result.append("("); - for (int i = 1; i < (int)tokens.size(); i++) + for (int i = 1; i < static_cast(tokens.size()); i++) { result.append(sigType(tokens[i])); } @@ -129,24 +137,24 @@ std::string convertType(const char* name, const char* koalaType) { #ifdef KOALA_BUILD_FOR_SIGNATURES #ifdef KOALA_USE_PANDA_VM std::string params; - for (int i = 1; i < (int)tokens.size(); i++) + for (int i = 1; i < static_cast(tokens.size()); i++) { params.append("arg"); params.append(std::to_string(i)); params.append(": "); params.append(codeType(tokens[i])); - if (i < (int)(tokens.size() - 1)) + if (i < static_cast(tokens.size() - 1)) params.append(", "); } fprintf(stderr, " static native %s(%s): %s;\n", name, params.c_str(), codeType(tokens[0]).c_str()); #elif KOALA_USE_JAVA_VM std::string params; - for (int i = 1; i < (int)tokens.size(); i++) + for (int i = 1; i < static_cast(tokens.size()); i++) { params.append(codeType(tokens[i])); params.append(" arg"); params.append(std::to_string(i)); - if (i < (int)(tokens.size() - 1)) + if (i < static_cast(tokens.size() - 1)) params.append(", "); } fprintf(stderr, " public static native %s %s(%s);\n", codeType(tokens[0]).c_str(), name, params.c_str()); diff --git a/koala-wrapper/koalaui/interop/src/cpp/types/signatures.h b/koala-wrapper/koalaui/interop/src/cpp/types/signatures.h index 48a76f3d8..05ddf1cc8 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/types/signatures.h +++ b/koala-wrapper/koalaui/interop/src/cpp/types/signatures.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/vmloader.cc b/koala-wrapper/koalaui/interop/src/cpp/vmloader.cc index 995d2623c..9efbfeff3 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/vmloader.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/vmloader.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,9 +13,11 @@ * limitations under the License. */ +#include #include +#include #include -#include +#include #include "interop-logging.h" #include "dynamic-loader.h" @@ -31,6 +33,10 @@ #include "etsapi.h" #endif +#ifdef KOALA_ANI +#include "ani.h" +#endif + #if defined(KOALA_LINUX) || defined(KOALA_MACOS) || defined(KOALA_OHOS) #include "sys/stat.h" #include "dirent.h" @@ -49,13 +55,21 @@ #define SYSTEM_ARK_STDLIB_PATH "/system/etc/etsstdlib.abc" #endif -void traverseDir(std::string root, std::vector& paths, int depth = 0); +#ifndef KOALA_USE_PANDA_VM +#ifdef KOALA_ANI +#define KOALA_USE_PANDA_VM 1 +#endif +#ifdef KOALA_ETS_NAPI +#define KOALA_USE_PANDA_VM 1 +#endif +#endif + +void traverseDir(const std::string& root, std::vector& paths, std::string suffix, const std::vector& fallbackPaths = {}); struct VMLibInfo { const char* sdkPath; const char* platform; const char* lib; - const char* createVM; }; #ifdef KOALA_JNI @@ -69,12 +83,11 @@ const VMLibInfo javaVMLib = { #error "Unknown platform" #endif , - "jvm", - "JNI_CreateJavaVM", + "jvm" }; #endif -#ifdef KOALA_ETS_NAPI +#if defined(KOALA_ETS_NAPI) || defined(KOALA_ANI) const VMLibInfo pandaVMLib = { // sdkPath #if defined(KOALA_OHOS) @@ -112,10 +125,6 @@ const VMLibInfo pandaVMLib = { // lib "arkruntime" - , - - // createVM - "ETS_CreateVM" }; #endif @@ -128,6 +137,7 @@ struct VMInitArgs { #define JAVA_VM_KIND 1 #define PANDA_VM_KIND 2 #define ES2PANDA_KIND 3 +#define PANDA_ANI_VM_KIND 4 struct ForeignVMContext { void* currentVMContext; @@ -141,13 +151,14 @@ struct VMEntry { void* enter; void* emitEvent; void* restartWith; + void* loadView; ForeignVMContext foreignVMContext; + std::string userFilesAbcPaths; }; VMEntry g_vmEntry = {}; typedef int (*createVM_t)(void** pVM, void** pEnv, void* vmInitArgs); -typedef int (*getVMs_t)(void** pVM, int32_t bufLen, int32_t* nVMs); #ifdef KOALA_WINDOWS #define DLL_EXPORT __declspec(dllexport) @@ -160,22 +171,139 @@ int loadES2Panda(const char* appClassPath, const char* appLibPath) { return 0; } -static int ArkMobileLog(int id, int level, const char *component, const char *fmt, const char *msg) { - LOGE("ArkMobileLog: %" LOG_PUBLIC "s", msg); +#ifdef KOALA_ETS_NAPI +namespace { + +enum PandaLog2MobileLog : int { + UNKNOWN = 0, + DEFAULT, + VERBOSE, + DEBUG, + INFO, + WARN, + ERROR, + FATAL, + SILENT, +}; + +int ArkMobileLog(int id, int level, const char *component, const char *fmt, const char *msg) +{ + switch (level) { + case PandaLog2MobileLog::DEFAULT: + case PandaLog2MobileLog::VERBOSE: + case PandaLog2MobileLog::DEBUG: + case PandaLog2MobileLog::INFO: + case PandaLog2MobileLog::SILENT: + LOGI("ArkRuntime [%" LOG_PUBLIC "s]: %" LOG_PUBLIC "s", component, msg); + break; + case PandaLog2MobileLog::UNKNOWN: + case PandaLog2MobileLog::WARN: + case PandaLog2MobileLog::ERROR: + case PandaLog2MobileLog::FATAL: + default: + LOGE("ArkRuntime [%" LOG_PUBLIC "s]: %" LOG_PUBLIC "s", component, msg); + break; + } return 0; } -extern "C" DLL_EXPORT KInt LoadVirtualMachine(KInt vmKind, const char* appClassPath, const char* appLibPath, const ForeignVMContext* foreignVMContext) { +} +#endif + +#ifdef KOALA_ANI + +static void AniMobileLog([[maybe_unused]] FILE *stream, int level, + const char *component, const char *msg) +{ + switch (level) { + case ANI_LOGLEVEL_INFO: + case ANI_LOGLEVEL_DEBUG: + LOGI("ArkRuntime [%" LOG_PUBLIC "s]: %" LOG_PUBLIC "s", component, msg); + break; + case ANI_LOGLEVEL_FATAL: + case ANI_LOGLEVEL_ERROR: + case ANI_LOGLEVEL_WARNING: + default: + LOGE("ArkRuntime [%" LOG_PUBLIC "s]: %" LOG_PUBLIC "s", component, msg); + break; + } +} + +static std::string makeClasspath(const std::vector& files) +{ + std::stringstream stream; + for (size_t index = 0, end = files.size(); index < end; ++index) { + if (index > 0) { + stream << ':'; + } + stream << files[index]; + } + return stream.str(); +} + +static std::pair GetBootAndAppPandaFiles(const VMLibInfo* thisVM, const char* bootFilesPath, const char* userFilesPath) +{ + std::vector bootFiles; +#if USE_SYSTEM_ARKVM + bootFiles.push_back(SYSTEM_ARK_STDLIB_PATH); +#elif defined(KOALA_OHOS) + bootFiles.push_back(std::string(OHOS_USER_LIBS) + "/etsstdlib.abc"); +#elif defined(KOALA_LINUX) || defined(KOALA_MACOS) || defined(KOALA_WINDOWS) + bootFiles.push_back(std::string(thisVM->sdkPath) + "/ets/etsstdlib.abc"); +#endif + +#if defined(KOALA_OHOS) + traverseDir("/system/framework", bootFiles, ".abc", { + "etsstdlib_bootabc" + }); +#endif + + std::vector userFiles; + traverseDir(userFilesPath, userFiles, ".abc"); + std::sort(userFiles.begin(), userFiles.end()); + + traverseDir(bootFilesPath, bootFiles, ".abc"); + std::sort(bootFiles.begin(), bootFiles.end()); + + if (bootFiles.empty() || userFiles.empty()) + return {"",""}; + + return { makeClasspath(bootFiles), makeClasspath(userFiles) }; +} + +static std::string GetAOTFiles(const char* appClassPath) +{ + std::vector files; + traverseDir(std::string(appClassPath), files, ".an"); + return makeClasspath(files); +} + +static bool ResetErrorIfExists(ani_env *env) +{ + ani_boolean hasError = ANI_FALSE; + env->ExistUnhandledError(&hasError); + if (hasError == ANI_TRUE) { + env->DescribeError(); + env->ResetError(); + return true; + } + return false; +} + +#endif + +extern "C" DLL_EXPORT KInt LoadVirtualMachine(KInt vmKind, const char* bootFilesDir, const char* userFilesDir, const char* appLibPath, const ForeignVMContext* foreignVMContext) +{ if (vmKind == ES2PANDA_KIND) { - return loadES2Panda(appClassPath, appLibPath); + return loadES2Panda(bootFilesDir, appLibPath); } const VMLibInfo* thisVM = #ifdef KOALA_JNI (vmKind == JAVA_VM_KIND) ? &javaVMLib : #endif - #ifdef KOALA_ETS_NAPI - (vmKind == PANDA_VM_KIND) ? &pandaVMLib : + #if defined(KOALA_ETS_NAPI) || defined(KOALA_ANI) + (vmKind == PANDA_VM_KIND || vmKind == PANDA_ANI_VM_KIND) ? &pandaVMLib : #endif nullptr; @@ -184,7 +312,7 @@ extern "C" DLL_EXPORT KInt LoadVirtualMachine(KInt vmKind, const char* appClassP return -1; } - LOGI("Starting VM %" LOG_PUBLIC "d with classpath=%" LOG_PUBLIC "s native=%" LOG_PUBLIC "s", vmKind, appClassPath, appLibPath); + LOGI("Starting VM %" LOG_PUBLIC "d with bootFilesDir=%" LOG_PUBLIC "s bootFilesDir=%" LOG_PUBLIC "s native=%" LOG_PUBLIC "s", vmKind, bootFilesDir, userFilesDir, appLibPath); std::string libPath = #if USE_SYSTEM_ARKVM @@ -203,27 +331,24 @@ extern "C" DLL_EXPORT KInt LoadVirtualMachine(KInt vmKind, const char* appClassP return -1; } - createVM_t createVM = (createVM_t)findSymbol(handle, thisVM->createVM); - getVMs_t getVMs = (getVMs_t)findSymbol(handle, "ETS_GetCreatedVMs"); - - if (!createVM) { - LOGE("Cannot find %" LOG_PUBLIC "s\n", thisVM->createVM); - return -1; - } - void* vm = nullptr; void* env = nullptr; - int32_t nVMs = 0; int result = 0; #ifdef KOALA_JNI if (vmKind == JAVA_VM_KIND) { + typedef int (*createVM_t)(void** pVM, void** pEnv, void* vmInitArgs); + createVM_t createVM = (createVM_t)findSymbol(handle, "JNI_CreateJavaVM"); + if (!createVM) { + LOGE("Cannot find %" LOG_PUBLIC "s\n", "JNI_CreateJavaVM"); + return -1; + } JavaVMInitArgs javaVMArgs; javaVMArgs.version = JNI_VERSION_10; javaVMArgs.ignoreUnrecognized = false; std::vector javaVMOptions; javaVMOptions = { - {(char*)strdup((std::string("-Djava.class.path=") + appClassPath).c_str())}, + {(char*)strdup((std::string("-Djava.class.path=") + bootFilesDir).c_str())}, {(char*)strdup((std::string("-Djava.library.path=") + appLibPath).c_str())}, }; javaVMArgs.nOptions = javaVMOptions.size(); @@ -233,14 +358,69 @@ extern "C" DLL_EXPORT KInt LoadVirtualMachine(KInt vmKind, const char* appClassP } #endif -#ifdef KOALA_ETS_NAPI +#if defined(KOALA_ANI) + if (vmKind == PANDA_ANI_VM_KIND) { + g_vmEntry.vmKind = vmKind; + + uint32_t version = ANI_VERSION_1; + size_t nVMs = 0; + typedef int (*getVMs_t)(void** pVM, size_t bufLen, size_t* nVMs); + typedef int (*createVM_t)(const void* args, uint32_t version, void** pVM); + createVM_t createVM = (createVM_t)findSymbol(handle, "ANI_CreateVM"); + getVMs_t getVMs = (getVMs_t)findSymbol(handle, "ANI_GetCreatedVMs"); + result = getVMs ? getVMs(&vm, 1, &nVMs) : 0; + if (nVMs == 0 && result == 0) { + std::vector pandaVMOptions; + + auto [bootFiles, userFiles] = GetBootAndAppPandaFiles(thisVM, bootFilesDir, userFilesDir); + LOGI("ANI: user abc-files \"%" LOG_PUBLIC "s\" from %" LOG_PUBLIC "s", userFiles.c_str(), userFilesDir); + g_vmEntry.userFilesAbcPaths = std::move(userFiles); + + bootFiles = "--ext:--boot-panda-files=" + bootFiles; + LOGI("ANI boot-panda-files option: \"%" LOG_PUBLIC "s\"", bootFiles.c_str()); + pandaVMOptions.push_back({bootFiles.c_str(), nullptr}); + + auto aotFiles = GetAOTFiles(bootFilesDir); + if (!aotFiles.empty()) { + LOGI("ANI AOT files: \"%" LOG_PUBLIC "s\"", aotFiles.c_str()); + aotFiles = "--ext:--aot-files=" + aotFiles; + pandaVMOptions.push_back({aotFiles.c_str(), nullptr}); + } + + pandaVMOptions.push_back({"--ext:--gc-trigger-type=heap-trigger", nullptr}); + std::string nativeLibraryPathOption = + std::string("--ext:--native-library-path=") + appLibPath; + pandaVMOptions.push_back({nativeLibraryPathOption.c_str(), nullptr}); + pandaVMOptions.push_back({"--ext:--verification-mode=on-the-fly", nullptr}); + pandaVMOptions.push_back({"--ext:--compiler-enable-jit=true", nullptr}); + pandaVMOptions.push_back({"--logger", reinterpret_cast(AniMobileLog)}); + pandaVMOptions.push_back({"--ext:--enable-an", nullptr}); + ani_options optionsPtr = {pandaVMOptions.size(), pandaVMOptions.data()}; + + result = createVM(&optionsPtr, version, &vm); + } + + if (result == 0) { + ani_vm* vmInstance = (ani_vm*)vm; + ani_env* pEnv = nullptr; + result = vmInstance->GetEnv(version, &pEnv); + env = static_cast(pEnv); + } + } +#endif /* KOALA_ANI */ + +// For now we use ETS API for VM startup and entry. +#if defined(KOALA_ETS_NAPI) if (vmKind == PANDA_VM_KIND) { EtsVMInitArgs pandaVMArgs; pandaVMArgs.version = ETS_NAPI_VERSION_1_0; std::vector etsVMOptions; std::vector files; - traverseDir(std::string(appClassPath), files); + traverseDir(std::string(bootFilesDir), files, ".abc"); std::sort(files.begin(), files.end()); + std::vector files_aot; + traverseDir(std::string(bootFilesDir), files_aot, ".an"); + std::sort(files_aot.begin(), files_aot.end()); etsVMOptions = { #if USE_SYSTEM_ARKVM {EtsOptionType::ETS_BOOT_FILE, SYSTEM_ARK_STDLIB_PATH}, @@ -251,29 +431,45 @@ extern "C" DLL_EXPORT KInt LoadVirtualMachine(KInt vmKind, const char* appClassP {EtsOptionType::ETS_BOOT_FILE, (char*)strdup((std::string(thisVM->sdkPath) + "/ets/etsstdlib.abc").c_str())}, #endif }; + std::string all_files; for (const std::string& path : files) { etsVMOptions.push_back({EtsOptionType::ETS_BOOT_FILE, (char*)strdup(path.c_str())}); + if (all_files.size() > 0) all_files.append(":"); + all_files.append(path); + } + LOGI("Using ETSNAPI: classpath \"%" LOG_PUBLIC "s\" from %" LOG_PUBLIC "s", all_files.c_str(), bootFilesDir); + std::string all_files_aot; + for (const std::string& path : files_aot) { + etsVMOptions.push_back({EtsOptionType::ETS_AOT_FILE, (char*)strdup(path.c_str())}); + if (all_files_aot.size() > 0) all_files_aot.append(":"); + all_files_aot.append(path); } + LOGI("ETSNAPI classpath (aot) \"%" LOG_PUBLIC "s\" from %" LOG_PUBLIC "s", all_files_aot.c_str(), bootFilesDir); + etsVMOptions.push_back({EtsOptionType::ETS_GC_TRIGGER_TYPE, "heap-trigger"}); etsVMOptions.push_back({EtsOptionType::ETS_NATIVE_LIBRARY_PATH, (char*)strdup(std::string(appLibPath).c_str())}); etsVMOptions.push_back({EtsOptionType::ETS_VERIFICATION_MODE, "on-the-fly"}); - etsVMOptions.push_back({EtsOptionType::ETS_NO_JIT, nullptr}); + etsVMOptions.push_back({EtsOptionType::ETS_JIT, nullptr}); etsVMOptions.push_back({EtsOptionType::ETS_MOBILE_LOG, (void*)ArkMobileLog}); etsVMOptions.push_back({EtsOptionType::ETS_AOT, nullptr}); - // etsVMOptions.push_back({EtsOptionType::ETS_LOG_LEVEL, "info"}); pandaVMArgs.nOptions = etsVMOptions.size(); pandaVMArgs.options = etsVMOptions.data(); - g_vmEntry.vmKind = PANDA_VM_KIND; + g_vmEntry.vmKind = vmKind; + int32_t nVMs = 0; + typedef int (*createVM_t)(void** pVM, void** pEnv, void* vmInitArgs); + typedef int (*getVMs_t)(void** pVM, int32_t bufLen, int32_t* nVMs); + createVM_t createVM = (createVM_t)findSymbol(handle, "ETS_CreateVM"); + getVMs_t getVMs = (getVMs_t)findSymbol(handle, "ETS_GetCreatedVMs"); result = getVMs ? getVMs(&vm, 1, &nVMs) : 0; if (nVMs != 0) { __EtsVM* vmInstance = (__EtsVM*)vm; EtsEnv* pEnv = nullptr; vmInstance->GetEnv(&pEnv, ETS_NAPI_VERSION_1_0); env = static_cast(pEnv); + } else { result = createVM(&vm, &env, &pandaVMArgs); } - } #endif @@ -298,6 +494,8 @@ struct AppInfo { const char* emitEventMethodSig; const char* restartWithMethodName; const char* restartWithMethodSig; + const char* loadViewMethodName; + const char* loadViewMethodSig; }; #ifdef KOALA_JNI @@ -311,45 +509,85 @@ const AppInfo javaAppInfo = { "(IIJ)Z", "emitEvent", "(IIII)Ljava/lang/String;", + "UNUSED", + "()V" }; #endif #ifdef KOALA_ETS_NAPI const AppInfo pandaAppInfo = { - "@koalaui/arkts-arkui/Application/Application", + "@ohos/arkui/Application/Application", "createApplication", - "Lstd/core/String;Lstd/core/String;Z:L@koalaui/arkts-arkui/Application/Application;", + "Lstd/core/String;Lstd/core/String;ZI:L@ohos/arkui/Application/Application;", "start", - ":J", + "J:J", "enter", "IIJ:Z", "emitEvent", "IIII:Lstd/core/String;", + "UNUSED", + "I:I" }; const AppInfo harnessAppInfo = { - "@koalaui/ets-harness/src/EtsHarnessApplication/EtsHarnessApplication", + "@koalaui/ets-harness/src/EtsHarnessApplication/EtsHarnessApplication", + "createApplication", + "Lstd/core/String;Lstd/core/String;ZI:L@koalaui/ets-harness/src/EtsHarnessApplication/EtsHarnessApplication;", + "start", + "J:J", + "enter", + "IIJ:Z", + "emitEvent", + "IIII:Lstd/core/String;", + "restartWith", + "Lstd/core/String;:V", + }; +#endif +#ifdef KOALA_ANI +const AppInfo harnessAniAppInfo = { + "L@koalaui/ets-harness/src/EtsHarnessApplication/EtsHarnessApplication;", "createApplication", - "Lstd/core/String;Lstd/core/String;Z:L@koalaui/ets-harness/src/EtsHarnessApplication/EtsHarnessApplication;", + "Lstd/core/String;Lstd/core/String;Lstd/core/String;ZI:L@koalaui/ets-harness/src/EtsHarnessApplication/EtsHarnessApplication;", "start", - ":J", + "J:J", "enter", - "II:Z", + "IIJ:Z", "emitEvent", "IIII:Lstd/core/String;", "restartWith", - "Lstd/core/String;:V" + "Lstd/core/String;:V", + "UNUSED", + "I:I" +}; +const AppInfo aniAppInfo = { + "L@ohos/arkui/Application/Application;", + "createApplication", + "Lstd/core/String;Lstd/core/String;Lstd/core/String;ZI:L@ohos/arkui/Application/Application;", + "start", + "J:J", + "enter", + "IIJ:Z", + "emitEvent", + "IIII:Lstd/core/String;", + "UNUSED", + "I:I", + "loadView", + "Lstd/core/String;Lstd/core/String;:Lstd/core/String;", }; #endif -extern "C" DLL_EXPORT KNativePointer StartApplication(const char* appUrl, const char* appParams) { +extern "C" DLL_EXPORT KNativePointer StartApplication(const char* appUrl, const char* appParams) +{ const auto isTestEnv = std::string(appUrl) == "EtsHarness"; const AppInfo* appInfo = #ifdef KOALA_JNI (g_vmEntry.vmKind == JAVA_VM_KIND) ? &javaAppInfo : #endif - #ifdef KOALA_ETS_NAPI + #if defined(KOALA_ETS_NAPI) (g_vmEntry.vmKind == PANDA_VM_KIND) ? isTestEnv ? &harnessAppInfo : &pandaAppInfo : #endif + #if defined(KOALA_ANI) + (g_vmEntry.vmKind == PANDA_ANI_VM_KIND) ? isTestEnv ? &harnessAniAppInfo : &aniAppInfo : + #endif nullptr; if (!appInfo) { @@ -358,7 +596,6 @@ extern "C" DLL_EXPORT KNativePointer StartApplication(const char* appUrl, const } LOGI("Starting application %" LOG_PUBLIC "s with params %" LOG_PUBLIC "s", appUrl, appParams); - #ifdef KOALA_JNI if (g_vmEntry.vmKind == JAVA_VM_KIND) { JNIEnv* jEnv = (JNIEnv*)(g_vmEntry.env); @@ -393,12 +630,16 @@ extern "C" DLL_EXPORT KNativePointer StartApplication(const char* appUrl, const app, start)); } #endif -#ifdef KOALA_ETS_NAPI +#if defined(KOALA_ETS_NAPI) if (g_vmEntry.vmKind == PANDA_VM_KIND) { EtsEnv* etsEnv = (EtsEnv*)g_vmEntry.env; ets_class appClass = etsEnv->FindClass(appInfo->className); if (!appClass) { LOGE("Cannot load main class %" LOG_PUBLIC "s\n", appInfo->className); + if (etsEnv->ErrorCheck()) { + etsEnv->ErrorDescribe(); + etsEnv->ErrorClear(); + } return nullptr; } ets_method create = etsEnv->GetStaticp_method(appClass, appInfo->createMethodName, appInfo->createMethodSig); @@ -410,21 +651,19 @@ extern "C" DLL_EXPORT KNativePointer StartApplication(const char* appUrl, const } return nullptr; } -#if defined (KOALA_OHOS_ARM64) - auto useNativeLog = true; -#else auto useNativeLog = false; -#endif auto app = etsEnv->NewGlobalRef(etsEnv->CallStaticObjectMethod( appClass, create, etsEnv->NewStringUTF(appUrl), etsEnv->NewStringUTF(appParams), - useNativeLog + useNativeLog, + g_vmEntry.vmKind )); if (!app) { LOGE("createApplication returned null"); if (etsEnv->ErrorCheck()) { etsEnv->ErrorDescribe(); etsEnv->ErrorClear(); + return nullptr; } return nullptr; } @@ -439,6 +678,11 @@ extern "C" DLL_EXPORT KNativePointer StartApplication(const char* appUrl, const } return nullptr; } + if (etsEnv->ErrorCheck()) { + etsEnv->ErrorDescribe(); + etsEnv->ErrorClear(); + return nullptr; + } g_vmEntry.emitEvent = (void*)(etsEnv->Getp_method(appClass, appInfo->emitEventMethodName, appInfo->emitEventMethodSig)); if (!g_vmEntry.emitEvent) { LOGE("Cannot find enter emitEvent %" LOG_PUBLIC "s", appInfo->emitEventMethodSig); @@ -460,7 +704,119 @@ extern "C" DLL_EXPORT KNativePointer StartApplication(const char* appUrl, const } } // TODO: pass app entry point! - return reinterpret_cast(etsEnv->CallLongMethod((ets_object)(app), start)); + return reinterpret_cast(etsEnv->CallLongMethod((ets_object)(app), start, &g_vmEntry.foreignVMContext)); + } +#endif +#if defined(KOALA_ANI) + if (g_vmEntry.vmKind == PANDA_ANI_VM_KIND) { + auto *env = reinterpret_cast(g_vmEntry.env); + + ani_class appClass {}; + auto status = env->FindClass(appInfo->className, &appClass); + if (status != ANI_OK) { + LOGE("Cannot load main class %" LOG_PUBLIC "s\n", appInfo->className); + ResetErrorIfExists(env); + return nullptr; + } + ani_static_method create {}; + status = env->Class_FindStaticMethod(appClass, appInfo->createMethodName, appInfo->createMethodSig, &create); + if (status != ANI_OK) { + LOGE("Cannot find create method %" LOG_PUBLIC "s\n", appInfo->createMethodName); + ResetErrorIfExists(env); + return nullptr; + } + + ani_boolean useNativeLog = ANI_FALSE; + ani_string appUrlString {}; + status = env->String_NewUTF8(appUrl, strlen(appUrl), &appUrlString); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return nullptr; + } + + ani_string userPandaFilesPathString {}; + status = env->String_NewUTF8(g_vmEntry.userFilesAbcPaths.c_str(), g_vmEntry.userFilesAbcPaths.size(), &userPandaFilesPathString); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return nullptr; + } + + ani_string appParamsString {}; + status = env->String_NewUTF8(appParams, strlen(appParams), &appParamsString); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return nullptr; + } + + ani_ref appInstance {}; + status = env->Class_CallStaticMethod_Ref(appClass, create, &appInstance, appUrlString, userPandaFilesPathString, appParamsString, + useNativeLog, static_cast(g_vmEntry.vmKind)); + if (status != ANI_OK) { + LOGE("createApplication returned null"); + ResetErrorIfExists(env); + return nullptr; + } + ani_ref app {}; + status = env->GlobalReference_Create(appInstance, &app); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return nullptr; + } + g_vmEntry.app = (void*)app; + + ani_method start {}; + status = env->Class_FindMethod(appClass, appInfo->startMethodName, appInfo->startMethodSig, &start); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return nullptr; + } + ani_method enter {}; + status = env->Class_FindMethod(appClass, appInfo->enterMethodName, nullptr, &enter); + if (status != ANI_OK) { + LOGE("Cannot find `enter` method %" LOG_PUBLIC "s", appInfo->enterMethodName); + ResetErrorIfExists(env); + return nullptr; + } + g_vmEntry.enter = reinterpret_cast(enter); + ani_method emitEvent {}; + status = env->Class_FindMethod(appClass, appInfo->emitEventMethodName, appInfo->emitEventMethodSig, &emitEvent); + if (status != ANI_OK) { + LOGE("Cannot find `emitEvent` method %" LOG_PUBLIC "s", appInfo->emitEventMethodSig); + ResetErrorIfExists(env); + return nullptr; + } + g_vmEntry.emitEvent = reinterpret_cast(emitEvent); + ani_method loadView {}; + status = env->Class_FindMethod(appClass, appInfo->loadViewMethodName, appInfo->loadViewMethodSig, &loadView); + if (status != ANI_OK) { + LOGE("Cannot find `%" LOG_PUBLIC "s` method %" LOG_PUBLIC "s", + appInfo->loadViewMethodName, appInfo->loadViewMethodSig); + ResetErrorIfExists(env); + return nullptr; + } + g_vmEntry.loadView = reinterpret_cast(loadView); + + if (isTestEnv) { + ani_method restartWith {}; + status = env->Class_FindMethod(appClass, appInfo->restartWithMethodName, appInfo->restartWithMethodSig, &restartWith); + if (status != ANI_OK) { + LOGE("Cannot find `restartWith` method sig=%" LOG_PUBLIC "s", appInfo->restartWithMethodSig); + ResetErrorIfExists(env); + return nullptr; + } + g_vmEntry.restartWith = reinterpret_cast(restartWith); + } + + ani_long ptr = 0; + // TODO: pass app entry point! + status = env->Object_CallMethod_Long(static_cast(appInstance), start, &ptr, + reinterpret_cast(&g_vmEntry.foreignVMContext)); + if (status != ANI_OK) { + LOGE("Cannot start application"); + ResetErrorIfExists(env); + return nullptr; + } + return reinterpret_cast(ptr); } #endif return nullptr; @@ -484,7 +840,7 @@ extern "C" DLL_EXPORT KBoolean RunApplication(const KInt arg0, const KInt arg1) return result; } #endif -#ifdef KOALA_ETS_NAPI +#if defined(KOALA_ETS_NAPI) if (g_vmEntry.vmKind == PANDA_VM_KIND) { EtsEnv* etsEnv = (EtsEnv*)(g_vmEntry.env); if (!g_vmEntry.enter) { @@ -505,11 +861,32 @@ extern "C" DLL_EXPORT KBoolean RunApplication(const KInt arg0, const KInt arg1) } return result; } - #endif +#endif +#if defined(KOALA_ANI) + if (g_vmEntry.vmKind == PANDA_ANI_VM_KIND) { + ani_env* env = reinterpret_cast(g_vmEntry.env); + if (g_vmEntry.enter == nullptr) { + LOGE("Cannot find enter method"); + return -1; + } + ani_boolean result = ANI_FALSE; + auto status = env->Object_CallMethod_Boolean(reinterpret_cast(g_vmEntry.app), + reinterpret_cast(g_vmEntry.enter), &result, + static_cast(arg0), static_cast(arg1), + reinterpret_cast(&g_vmEntry.foreignVMContext)); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return ANI_FALSE; + } + return result; + } +#endif + return 1; } -extern "C" DLL_EXPORT const char* EmitEvent(const KInt type, const KInt target, const KInt arg0, const KInt arg1) { +extern "C" DLL_EXPORT const char* EmitEvent(const KInt type, const KInt target, const KInt arg0, const KInt arg1) +{ #ifdef KOALA_JNI if (g_vmEntry.vmKind == JAVA_VM_KIND) { JNIEnv* jEnv = (JNIEnv*)(g_vmEntry.env); @@ -533,7 +910,8 @@ extern "C" DLL_EXPORT const char* EmitEvent(const KInt type, const KInt target, return result; } #endif -#ifdef KOALA_ETS_NAPI + +#if defined(KOALA_ETS_NAPI) if (g_vmEntry.vmKind == PANDA_VM_KIND) { EtsEnv* etsEnv = (EtsEnv*)(g_vmEntry.env); if (!g_vmEntry.emitEvent) { @@ -556,11 +934,51 @@ extern "C" DLL_EXPORT const char* EmitEvent(const KInt type, const KInt target, const char *result = etsEnv->GetStringUTFChars(rv, 0); return result; } - #endif +#endif +#if defined(KOALA_ANI) + if (g_vmEntry.vmKind == PANDA_ANI_VM_KIND) { + ani_env *env = reinterpret_cast(g_vmEntry.env); + if (g_vmEntry.emitEvent == nullptr) { + LOGE("Cannot find emitEvent method"); + return "-1"; + } + ani_ref result {}; + auto status = env->Object_CallMethod_Ref(reinterpret_cast(g_vmEntry.app), + reinterpret_cast(g_vmEntry.emitEvent), + &result, + static_cast(type), + static_cast(target), + static_cast(arg0), + static_cast(arg1)); + if (status != ANI_OK) { + LOGE("Calling emitEvent() method gave an error"); + ResetErrorIfExists(env); + return "-1"; + } + + auto str = static_cast(result); + ani_size sz = 0; + status = env->String_GetUTF8Size(str, &sz); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return "-1"; + } + auto buffer = new char[sz + 1]; + ani_size writtenChars = 0; + status = env->String_GetUTF8(str, buffer, sz + 1, &writtenChars); + if (status != ANI_OK || writtenChars != sz) { + delete [] buffer; + ResetErrorIfExists(env); + return "-1"; + } + return buffer; + } +#endif return "-1"; } -extern "C" DLL_EXPORT void RestartWith(const char* page) { +extern "C" DLL_EXPORT void RestartWith(const char* page) +{ #ifdef KOALA_JNI if (g_vmEntry.vmKind == JAVA_VM_KIND) { JNIEnv* jEnv = (JNIEnv*)(g_vmEntry.env); @@ -579,7 +997,7 @@ extern "C" DLL_EXPORT void RestartWith(const char* page) { } } #endif -#ifdef KOALA_ETS_NAPI +#if defined(KOALA_ETS_NAPI) if (g_vmEntry.vmKind == PANDA_VM_KIND) { EtsEnv* etsEnv = (EtsEnv*)(g_vmEntry.env); if (!g_vmEntry.restartWith) { @@ -597,42 +1015,100 @@ extern "C" DLL_EXPORT void RestartWith(const char* page) { etsEnv->ErrorClear(); } } - #endif +#endif +#if defined(KOALA_ANI) + if (g_vmEntry.vmKind == PANDA_ANI_VM_KIND) { + ani_env *env = reinterpret_cast(g_vmEntry.env); + if (!g_vmEntry.restartWith) { + LOGE("Cannot find restartWith method"); + return; + } + ani_string pageString {}; + auto status = env->String_NewUTF8(page, strlen(page), &pageString); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return; + } + status = env->Object_CallMethod_Void(reinterpret_cast(g_vmEntry.app), + reinterpret_cast(g_vmEntry.restartWith), pageString); + if (status != ANI_OK) { + LOGE("Calling restartWith() method gave an error"); + ResetErrorIfExists(env); + } + } +#endif +} + +extern "C" DLL_EXPORT const char* LoadView(const char* className, const char* params) +{ +#if defined(KOALA_ANI) + if (g_vmEntry.vmKind == PANDA_ANI_VM_KIND) { + ani_env *env = reinterpret_cast(g_vmEntry.env); + if (!g_vmEntry.loadView) { + return strdup("Cannot find loadView() method"); + } + ani_string classNameString {}; + auto status = env->String_NewUTF8(className, strlen(className), &classNameString); + if (status != ANI_OK) { + return strdup("Cannot make ANI string"); + } + ani_string paramsString {}; + status = env->String_NewUTF8(params, strlen(params), ¶msString); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return strdup("Cannot make ANI string"); + } + ani_string resultString = nullptr; + status = env->Object_CallMethod_Ref(reinterpret_cast(g_vmEntry.app), + reinterpret_cast(g_vmEntry.loadView), + (ani_ref*)&resultString, + classNameString, paramsString); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return strdup("Calling laodView() method gave an error"); + } + ani_size resultStringLength = 0; + status = env->String_GetUTF8Size(resultString, &resultStringLength); + char* resultChars = (char*)malloc(resultStringLength); + status = env->String_GetUTF8(resultString, resultChars, resultStringLength, &resultStringLength); + return resultChars; + } +#endif + return strdup("Unsupported"); +} + +namespace fs = std::filesystem; + +bool ends_with(std::string str, std::string suffix) +{ + return str.size() >= suffix.size() && str.compare(str.size()-suffix.size(), suffix.size(), suffix) == 0; } -void traverseDir(std::string root, std::vector& paths, int depth) { - if (depth >= 50) { +void traverseDir(const std::string& root, std::vector& paths, std::string suffix, const std::vector& fallbackPaths) +{ + #ifdef KOALA_OHOS_ARM32 + // selinux prohibits any access to "/system/framework" + if (root == "/system/framework") { + for (auto path: fallbackPaths) { + paths.push_back(root + "/" + path + suffix); + } return; } -#if defined(KOALA_LINUX) || defined(KOALA_MACOS) || defined(KOALA_OHOS) - std::string suffix = ".abc"; - #if defined(KOALA_OHOS) - suffix += ".so"; #endif - DIR* directory = opendir(root.c_str()); - if (!directory) { + + if (!fs::exists(root)) { LOGE("Cannot open dir %" LOG_PUBLIC "s\n", root.c_str()); return; } - struct dirent* ent = NULL; - struct stat statbuf; - LOGI("Searching for *%" LOG_PUBLIC "s in %" LOG_PUBLIC "s\n", suffix.c_str(), root.c_str()); - while ((ent = readdir(directory)) != nullptr) { - std::string filename = std::string(ent->d_name); - if (filename == "." || filename == "..") { - continue; - } - std::string filepath = root + "/" + filename; - int rv = stat(filepath.c_str(), &statbuf); - if (rv < 0) continue; - if (filepath.size() >= suffix.size() && filepath.substr(filepath.size() - suffix.size()) == suffix && (statbuf.st_mode & S_IFMT) == S_IFREG) { - paths.push_back(filepath); - } - if ((statbuf.st_mode & S_IFMT) == S_IFDIR) { - traverseDir(filepath, paths, depth + 1); + #if defined(KOALA_OHOS) + suffix += ".so"; + #endif + + LOGI("Searching in %" LOG_PUBLIC "s\n", root.c_str()); + for (auto &file : fs::recursive_directory_iterator(root)) { + if (ends_with(file.path().string(), suffix) && fs::is_regular_file(file)) { + paths.push_back(file.path().string()); } } - closedir(directory); -#endif } diff --git a/koala-wrapper/koalaui/interop/src/cpp/wasm/convertors-wasm.h b/koala-wrapper/koalaui/interop/src/cpp/wasm/convertors-wasm.h index eea97a98e..6a8e7b41e 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/wasm/convertors-wasm.h +++ b/koala-wrapper/koalaui/interop/src/cpp/wasm/convertors-wasm.h @@ -13,14 +13,16 @@ * limitations under the License. */ -#pragma once +#ifndef CONVERTORS_WASM_H +#define CONVERTORS_WASM_H #include "koala-types.h" -#include #include #define KOALA_INTEROP_EXPORT EMSCRIPTEN_KEEPALIVE extern "C" +#include "interop-logging.h" + template struct InteropTypeConverter { using InteropType = T; @@ -765,14 +767,65 @@ KOALA_INTEROP_EXPORT void name( \ impl_##name(nullptr, p0, p1, p2, p3); \ } +#define KOALA_INTEROP_DIRECT_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_DIRECT_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + #define KOALA_INTEROP_THROW(vmContext, object, ...) \ do { \ - assert(false); /* TODO: implement*/ \ + ASSERT(false); /* TODO: implement*/ \ return __VA_ARGS__; \ } while (0) #define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ do { \ - assert(false); /* TODO: implement*/ \ + ASSERT(false); /* TODO: implement*/ \ return __VA_ARGS__; \ } while (0) + +#endif // CONVERTORS_WASM_H \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/interop/DeserializerBase.ts b/koala-wrapper/koalaui/interop/src/interop/DeserializerBase.ts index af06948a3..8a8537d68 100644 --- a/koala-wrapper/koalaui/interop/src/interop/DeserializerBase.ts +++ b/koala-wrapper/koalaui/interop/src/interop/DeserializerBase.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,10 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { CustomTextDecoder, float32, int32, int64 } from "@koalaui/common" +import { CustomTextDecoder, float32, int32, int64 } from "#koalaui/common" import { Tags, CallbackResource } from "./SerializerBase"; -import { pointer } from "./InteropTypes" -import { InteropNativeModule } from "./InteropNativeModule" +import { pointer, KUint8ArrayPtr, KSerializerBuffer } from "./InteropTypes" +import { NativeBuffer } from "./NativeBuffer"; +import { ResourceHolder } from "../arkts/ResourceManager"; export class DeserializerBase { private position = 0 @@ -37,8 +38,13 @@ export class DeserializerBase { } } - constructor(buffer: ArrayBuffer, length: int32) { - this.buffer = buffer + constructor(buffer: ArrayBuffer|KSerializerBuffer|KUint8ArrayPtr, length: int32) { + if (typeof buffer != 'object') + throw new Error('Must be used only with ArrayBuffer') + if (buffer && ("buffer" in buffer)) { + buffer = buffer.buffer as ArrayBuffer + } + this.buffer = buffer as ArrayBuffer this.length = length this.view = new DataView(this.buffer) } @@ -51,7 +57,11 @@ export class DeserializerBase { return factory(args, length); } - asArray(position?: number, length?: number): Uint8Array { + asBuffer(position?: int32, length?: int32): KSerializerBuffer { + return new Uint8Array(this.buffer, position, length) + } + + asArray(position?: int32, length?: int32): Uint8Array { return new Uint8Array(this.buffer, position, length) } @@ -144,7 +154,7 @@ export class DeserializerBase { return undefined } - readNumber(): number | undefined { + readNumber(): int32 | undefined { const tag = this.readInt8() switch (tag) { case Tags.UNDEFINED: @@ -166,6 +176,10 @@ export class DeserializerBase { release: this.readPointer(), } } + readObject():any { + const resource = this.readCallbackResource() + return ResourceHolder.instance().get(resource.resourceId) + } static lengthUnitFromInt(unit: int32): string { let suffix: string @@ -187,12 +201,12 @@ export class DeserializerBase { } return suffix } - readBuffer(): ArrayBuffer { + readBuffer(): NativeBuffer { const resource = this.readCallbackResource() const data = this.readPointer() const length = this.readInt64() - return InteropNativeModule._MaterializeBuffer(data, length, resource.resourceId, resource.hold, resource.release) + return NativeBuffer.wrap(data, length, resource.resourceId, resource.hold, resource.release) } } diff --git a/koala-wrapper/koalaui/interop/src/interop/Finalizable.ts b/koala-wrapper/koalaui/interop/src/interop/Finalizable.ts index dc0e8a980..71ffbb1e9 100644 --- a/koala-wrapper/koalaui/interop/src/interop/Finalizable.ts +++ b/koala-wrapper/koalaui/interop/src/interop/Finalizable.ts @@ -13,8 +13,8 @@ * limitations under the License. */ -import { Wrapper, nullptr, isNullPtr } from "./Wrapper" -import { finalizerRegister, finalizerUnregister, Thunk } from "@koalaui/common" +import { Wrapper, nullptr } from "./Wrapper" +import { finalizerRegister, finalizerUnregister, Thunk } from "#koalaui/common" import { InteropNativeModule } from "./InteropNativeModule" import { pointer } from "./InteropTypes" @@ -30,7 +30,7 @@ export class NativeThunk implements Thunk { } clean() { - if (!isNullPtr(this.obj)) { + if (this.obj != nullptr) { this.destroyNative(this.obj, this.finalizer) } this.obj = nullptr @@ -75,7 +75,7 @@ export class Finalizable extends Wrapper { } close() { - if (isNullPtr(this.ptr)) { + if (this.ptr == nullptr) { throw new Error(`Closing a closed object: ` + this.toString()) } else if (this.cleaner == null) { throw new Error(`No thunk assigned to ` + this.toString()) diff --git a/koala-wrapper/koalaui/interop/src/interop/InteropNativeModule.ts b/koala-wrapper/koalaui/interop/src/interop/InteropNativeModule.ts index b3677da97..1545b6526 100644 --- a/koala-wrapper/koalaui/interop/src/interop/InteropNativeModule.ts +++ b/koala-wrapper/koalaui/interop/src/interop/InteropNativeModule.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,10 +11,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ +*/ -import { int32 } from "@koalaui/common"; -import { KPointer, KStringPtr, KUint8ArrayPtr } from "./InteropTypes"; +import { int32, int64 } from "#koalaui/common"; +import { KPointer, KSerializerBuffer, KStringPtr, KUint8ArrayPtr } from "./InteropTypes"; import { loadNativeModuleLibrary } from "./loadLibraries"; export class InteropNativeModule { @@ -27,6 +27,7 @@ export class InteropNativeModule { public static _AppendGroupedLog(index: int32, message: string): void { throw "method not loaded" } public static _PrintGroupedLog(index: int32): void { throw "method not loaded" } public static _GetStringFinalizer(): KPointer { throw "method not loaded" } + public static _IncrementNumber(value: number): number { throw "method not loaded" } public static _InvokeFinalizer(ptr1: KPointer, ptr2: KPointer): void { throw "method not loaded" } public static _GetPtrVectorElement(ptr1: KPointer, arg: int32): KPointer { throw "method not loaded" } public static _StringLength(ptr1: KPointer): int32 { throw "method not loaded" } @@ -35,23 +36,26 @@ export class InteropNativeModule { public static _GetPtrVectorSize(ptr1: KPointer): int32 { throw "method not loaded" } public static _ManagedStringWrite(str1: string, arr: Uint8Array, arg: int32): int32 { throw "method not loaded" } public static _NativeLog(str1: string): void { throw "method not loaded" } - public static _Utf8ToString(data: KUint8ArrayPtr, offset: int32, length: int32): string { throw "method not loaded" } + public static _Utf8ToString(data: KSerializerBuffer, offset: int32, length: int32): string { throw "method not loaded" } public static _StdStringToString(cstring: KPointer): string { throw "method not loaded" } - public static _CheckCallbackEvent(buffer: KUint8ArrayPtr, bufferLength: int32): int32 { throw "method not loaded" } + public static _CheckCallbackEvent(buffer: KSerializerBuffer, bufferLength: int32): int32 { throw "method not loaded" } public static _HoldCallbackResource(resourceId: int32): void { throw "method not loaded" } public static _ReleaseCallbackResource(resourceId: int32): void { throw "method not loaded" } - public static _CallCallback(callbackKind: int32, args: Uint8Array, argsSize: int32): void { throw "method not loaded" } - public static _CallCallbackSync(callbackKind: int32, args: Uint8Array, argsSize: int32): void { throw "method not loaded" } + public static _CallCallback(callbackKind: int32, args: KSerializerBuffer, argsSize: int32): void { throw "method not loaded" } + public static _CallCallbackSync(callbackKind: int32, args: KSerializerBuffer, argsSize: int32): void { throw "method not loaded" } public static _CallCallbackResourceHolder(holder: KPointer, resourceId: int32): void { throw "method not loaded" } public static _CallCallbackResourceReleaser(releaser: KPointer, resourceId: int32): void { throw "method not loaded" } - public static _MaterializeBuffer(data: KPointer, length: int32, resourceId: int32, hold: KPointer, release: KPointer): ArrayBuffer { throw "method not loaded" } + public static _MaterializeBuffer(data: KPointer, length: bigint, resourceId: int32, hold: KPointer, release: KPointer): ArrayBuffer { throw "method not loaded" } public static _GetNativeBufferPointer(data: ArrayBuffer): KPointer { throw "method not loaded" } - public static _LoadVirtualMachine(arg0: int32, arg1: string, arg2: string): int32 { throw "method not loaded" } + public static _LoadVirtualMachine(arg0: int32, arg1: string, arg2: string, arg3: string): int32 { throw "method not loaded" } public static _RunApplication(arg0: int32, arg1: int32): number { throw "method not loaded" } public static _StartApplication(appUrl: string, appParams: string): KPointer { throw "method not loaded" } - public static _EmitEvent(eventType: int32, target: int32, arg0: int32, arg1: int32): void { throw "method not loaded" } - public static _CallForeignVM(foreignContext: KPointer, kind: int32, args: Uint8Array, argsSize: int32): int32 { throw "method not loaded" } + public static _EmitEvent(eventType: int32, target: int32, arg0: int32, arg1: int32): string { throw "method not loaded" } + public static _CallForeignVM(foreignContext: KPointer, kind: int32, args: KSerializerBuffer, argsSize: int32): int32 { throw "method not loaded" } + public static _SetForeignVMContext(context: KPointer): void { throw "method not loaded" } + public static _ReadByte(data: KPointer, index: int32, length: bigint): int32 { throw "method not loaded" } + public static _WriteByte(data: KPointer, index: int32, length: bigint, value: int32): void { throw "method not loaded" } } export function loadInteropNativeModule() { diff --git a/koala-wrapper/koalaui/interop/src/interop/InteropOps.ts b/koala-wrapper/koalaui/interop/src/interop/InteropOps.ts index 71d84f0a4..43ffb4700 100644 --- a/koala-wrapper/koalaui/interop/src/interop/InteropOps.ts +++ b/koala-wrapper/koalaui/interop/src/interop/InteropOps.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { int32 } from "@koalaui/common" +import { int32 } from "#koalaui/common" import { withStringResult } from "./Platform" import { KInt, KStringPtr, KUint8ArrayPtr, pointer } from "./InteropTypes" diff --git a/koala-wrapper/koalaui/interop/src/interop/InteropTypes.ts b/koala-wrapper/koalaui/interop/src/interop/InteropTypes.ts index 7373008e6..26d3e8a13 100644 --- a/koala-wrapper/koalaui/interop/src/interop/InteropTypes.ts +++ b/koala-wrapper/koalaui/interop/src/interop/InteropTypes.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { int32, int64, float32, float64 } from "@koalaui/common" +import { int32, int64, float32, float64 } from "#koalaui/common" export type KStringPtr = int32 | string | null export type KStringArrayPtr = int32 | Uint8Array | null @@ -28,4 +28,5 @@ export type KBoolean = int32 export type KPointer = number | bigint export type pointer = KPointer export type KNativePointer = KPointer -export type KInteropReturnBuffer = Uint8Array \ No newline at end of file +export type KInteropReturnBuffer = Uint8Array +export type KSerializerBuffer = KUint8ArrayPtr \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/interop/MaterializedBase.ts b/koala-wrapper/koalaui/interop/src/interop/MaterializedBase.ts index c1aa09b05..51135fbaa 100644 --- a/koala-wrapper/koalaui/interop/src/interop/MaterializedBase.ts +++ b/koala-wrapper/koalaui/interop/src/interop/MaterializedBase.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/NativeBuffer.ts b/koala-wrapper/koalaui/interop/src/interop/NativeBuffer.ts index d3b23d72e..a623c987d 100644 --- a/koala-wrapper/koalaui/interop/src/interop/NativeBuffer.ts +++ b/koala-wrapper/koalaui/interop/src/interop/NativeBuffer.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,18 +14,20 @@ */ import { pointer } from './InteropTypes' -import { int32, int64 } from '@koalaui/common' +import { int32, int64 } from '#koalaui/common' +import { InteropNativeModule } from "./InteropNativeModule" // stub wrapper for KInteropBuffer -export class NativeBuffer extends ArrayBuffer { - public data:pointer = 0 +// export type NativeBuffer = ArrayBuffer + +export class NativeBuffer { + public data: pointer = 0 public length: int64 = 0 public resourceId: int32 = 0 - public hold:pointer = 0 + public hold: pointer = 0 public release: pointer = 0 - constructor(data:pointer, length: int64, resourceId: int32, hold:pointer, release: pointer) { - super(length) + constructor(data: pointer, length: int64, resourceId: int32, hold: pointer, release: pointer) { this.data = data this.length = length this.resourceId = resourceId @@ -33,7 +35,15 @@ export class NativeBuffer extends ArrayBuffer { this.release = release } - static wrap(data:pointer, length: int64, resourceId: int32, hold:pointer, release: pointer): NativeBuffer { + public readByte(index: int64): int32 { + return InteropNativeModule._ReadByte(this.data, index, BigInt(this.length)) + } + + public writeByte(index: int64, value: int32): void { + InteropNativeModule._WriteByte(this.data, index, BigInt(this.length), value) + } + + static wrap(data: pointer, length: int64, resourceId: int32, hold: pointer, release: pointer): NativeBuffer { return new NativeBuffer(data, length, resourceId, hold, release) } -} +} \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/interop/Platform.ts b/koala-wrapper/koalaui/interop/src/interop/Platform.ts index fb74d312c..e2ea49941 100644 --- a/koala-wrapper/koalaui/interop/src/interop/Platform.ts +++ b/koala-wrapper/koalaui/interop/src/interop/Platform.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { int32 } from "@koalaui/common" +import { int32 } from "#koalaui/common" import { isNullPtr, nullptr, Wrapper } from "./Wrapper" import { decodeToString } from "#common/wrappers/arrays" import { setCallbackRegistry } from "#common/wrappers/Callback" diff --git a/koala-wrapper/koalaui/interop/src/interop/SerializerBase.ts b/koala-wrapper/koalaui/interop/src/interop/SerializerBase.ts index c1df42d43..18af3b1b6 100644 --- a/koala-wrapper/koalaui/interop/src/interop/SerializerBase.ts +++ b/koala-wrapper/koalaui/interop/src/interop/SerializerBase.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,11 +12,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { float32, int32, int64 } from "@koalaui/common" -import { pointer, KPointer } from "./InteropTypes" +import { float32, int32, int64 } from "#koalaui/common" +import { pointer, KPointer, KSerializerBuffer } from "./InteropTypes" import { wrapCallback } from "./InteropOps" import { InteropNativeModule } from "./InteropNativeModule" import { ResourceHolder, ResourceId } from "../arkts/ResourceManager" +import { MaterializedBase } from "./MaterializedBase" +import { nullptr } from "./Wrapper" +import { NativeBuffer } from "./NativeBuffer" // imports required interfaces (now generation is disabled) // import { Resource } from "@arkoala/arkui" @@ -65,14 +68,6 @@ export function runtimeType(value: any): int32 { throw new Error(`bug: ${value} is ${type}`) } -export function isResource(value: unknown): boolean { - return value !== undefined - && typeof value === 'object' - && value !== null - && value.hasOwnProperty("bundleName") - && value.hasOwnProperty("moduleName") -} - // Poor man's instanceof, fails on subclasses export function isInstanceOf(className: string, value: object | undefined): boolean { return value?.constructor.name === className @@ -85,9 +80,11 @@ export function registerCallback(value: object|undefined): int32 { }) } -export function registerMaterialized(value: object|undefined): number { - // TODO: fix me! - return 42 +export function toPeerPtr(value: object): KPointer { + if (value.hasOwnProperty("peer")) + return unsafeCast(value).getPeer()?.ptr ?? nullptr + else + throw new Error("Value is not a MaterializedBase instance") } export interface CallbackResource { @@ -127,12 +124,18 @@ export class SerializerBase { this.releaseResources() this.position = 0 } - asArray(): Uint8Array { + asBuffer(): KSerializerBuffer { return new Uint8Array(this.buffer) } length(): int32 { return this.position } + getByte(offset: int32): int32 { + return this.view.getUint8(offset) as int32 + } + toArray(): Uint8Array { + return new Uint8Array(this.buffer.slice(0, this.currentPosition())) + } currentPosition(): int32 { return this.position } private checkCapacity(value: int32) { @@ -145,6 +148,7 @@ export class SerializerBase { const resizedSize = Math.max(minSize, Math.round(3 * buffSize / 2)) let resizedBuffer = new ArrayBuffer(resizedSize) // TODO: can we grow without new? + // TODO: check the status of ArrayBuffer.transfer function implementation in STS new Uint8Array(resizedBuffer).set(new Uint8Array(this.buffer)) this.buffer = resizedBuffer this.view = new DataView(resizedBuffer) @@ -162,7 +166,7 @@ export class SerializerBase { return resourceId } holdAndWriteCallbackForPromiseVoid(hold: KPointer = 0, release: KPointer = 0, call: KPointer = 0, callSync = 0): [Promise, ResourceId] { - let resourceId: ResourceId + let resourceId: ResourceId = 0 const promise = new Promise((resolve, reject) => { const callback = (err: string[]|undefined) => { if (err !== undefined) @@ -175,7 +179,7 @@ export class SerializerBase { return [promise, resourceId] } holdAndWriteCallbackForPromise(hold: KPointer = 0, release: KPointer = 0, call: KPointer = 0): [Promise, ResourceId] { - let resourceId: ResourceId + let resourceId: ResourceId = 0 const promise = new Promise((resolve, reject) => { const callback = (value: T|undefined, err: string[]|undefined) => { if (err !== undefined) @@ -192,6 +196,14 @@ export class SerializerBase { this.writePointer(resource.hold) this.writePointer(resource.release) } + holdAndWriteObject(obj:any, hold: KPointer = 0, release: KPointer = 0): ResourceId { + const resourceId = ResourceHolder.instance().registerAndHold(obj) + this.heldResources.push(resourceId) + this.writeInt32(resourceId) + this.writePointer(hold) + this.writePointer(release) + return resourceId + } private releaseResources() { for (const resourceId of this.heldResources) InteropNativeModule._ReleaseCallbackResource(resourceId) @@ -267,16 +279,14 @@ export class SerializerBase { this.view.setInt32(this.position, encodedLength, true) this.position += encodedLength + 4 } - writeBuffer(buffer: ArrayBuffer) { - const resourceId = ResourceHolder.instance().registerAndHold(buffer) + writeBuffer(buffer: NativeBuffer) { this.writeCallbackResource({ - resourceId, - hold: 0, - release: 0 + resourceId: buffer.resourceId, + hold: buffer.hold, + release: buffer.release, }) - const ptr = InteropNativeModule._GetNativeBufferPointer(buffer) - this.writePointer(ptr) - this.writeInt64(buffer.byteLength) + this.writePointer(buffer.data) + this.writeInt64(buffer.length) } } diff --git a/koala-wrapper/koalaui/interop/src/interop/Wrapper.ts b/koala-wrapper/koalaui/interop/src/interop/Wrapper.ts index 4b7dbc124..1f2d876bf 100644 --- a/koala-wrapper/koalaui/interop/src/interop/Wrapper.ts +++ b/koala-wrapper/koalaui/interop/src/interop/Wrapper.ts @@ -14,7 +14,7 @@ */ import { ptrToString, nullptr, isSamePtr } from "#common/wrappers/Wrapper" -import { className } from "@koalaui/common" +import { className } from "#koalaui/common" import { KPointer } from "./InteropTypes" export { isNullPtr, nullptr, ptrToBits, bitsToPtr, isSamePtr, ptrToString } from "#common/wrappers/Wrapper" diff --git a/koala-wrapper/koalaui/interop/src/interop/arrays.ts b/koala-wrapper/koalaui/interop/src/interop/arrays.ts index 2699de10b..1336f18e1 100644 --- a/koala-wrapper/koalaui/interop/src/interop/arrays.ts +++ b/koala-wrapper/koalaui/interop/src/interop/arrays.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,7 +13,7 @@ * limitations under the License. */ -import { int32 } from "@koalaui/common" +import { int32 } from "#koalaui/common" export enum Access { READ = 1, // 1 << 0, diff --git a/koala-wrapper/koalaui/interop/src/interop/buffer.ts b/koala-wrapper/koalaui/interop/src/interop/buffer.ts index 5bf60ad3e..0393ff27f 100644 --- a/koala-wrapper/koalaui/interop/src/interop/buffer.ts +++ b/koala-wrapper/koalaui/interop/src/interop/buffer.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,26 +11,29 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ +*/ +import { int32 } from "#koalaui/common" + +// todo can be removed if passing ArrayBuffer type through interop is possible export class KBuffer { private readonly _buffer: Uint8Array public get buffer(): ArrayBuffer { return this._buffer } - public get length(): number { + public get length(): int32 { return this._buffer.length } - constructor(length: number) { + constructor(length: int32) { this._buffer = new Uint8Array(length) } - set(index: number, value: number): void { + set(index: int32, value: int32): void { this._buffer[index] = value } - get(index: number): number { + get(index: int32): int32 { return this._buffer[index] } } \ No newline at end of file diff --git a/koala-wrapper/koalaui/interop/src/interop/index.ts b/koala-wrapper/koalaui/interop/src/interop/index.ts index 5966b160a..d6acf631b 100644 --- a/koala-wrapper/koalaui/interop/src/interop/index.ts +++ b/koala-wrapper/koalaui/interop/src/interop/index.ts @@ -68,7 +68,7 @@ export * from "./buffer" export * from "../arkts/ResourceManager" export * from "./NativeBuffer" export { InteropNativeModule, loadInteropNativeModule } from "./InteropNativeModule" -export { SerializerBase, RuntimeType, Tags, runtimeType, CallbackResource, unsafeCast, isResource, isInstanceOf } from "./SerializerBase" +export { SerializerBase, RuntimeType, Tags, runtimeType, CallbackResource, unsafeCast, isInstanceOf, toPeerPtr } from "./SerializerBase" export { DeserializerBase } from "./DeserializerBase" export { loadNativeModuleLibrary, loadNativeLibrary, registerNativeModuleLibraryName } from "./loadLibraries" export * from "./MaterializedBase" diff --git a/koala-wrapper/koalaui/interop/src/interop/java/CallbackRecord.java b/koala-wrapper/koalaui/interop/src/interop/java/CallbackRecord.java index 4c866822d..2292705a6 100644 --- a/koala-wrapper/koalaui/interop/src/interop/java/CallbackRecord.java +++ b/koala-wrapper/koalaui/interop/src/interop/java/CallbackRecord.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/java/CallbackRegistry.java b/koala-wrapper/koalaui/interop/src/interop/java/CallbackRegistry.java index 59dceae85..2fb731539 100644 --- a/koala-wrapper/koalaui/interop/src/interop/java/CallbackRegistry.java +++ b/koala-wrapper/koalaui/interop/src/interop/java/CallbackRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -40,15 +40,15 @@ class CallbackRegistry { } public static Integer wrap(CallbackType callback) { - Integer id = CallbackRegistry.id++; - CallbackRegistry.callbacks.put(id, new CallbackRecord(callback, true)); - return id; + Integer callbackId = CallbackRegistry.id++; + CallbackRegistry.callbacks.put(callbackId, new CallbackRecord(callback, true)); + return callbackId; } public static Integer wrap(CallbackType callback, boolean autoDisposable) { - Integer id = CallbackRegistry.id++; - CallbackRegistry.callbacks.put(id, new CallbackRecord(callback, autoDisposable)); - return id; + Integer callbackId = CallbackRegistry.id++; + CallbackRegistry.callbacks.put(callbackId, new CallbackRecord(callback, autoDisposable)); + return callbackId; } public static int call(Integer id, byte[] args, int length) { diff --git a/koala-wrapper/koalaui/interop/src/interop/java/CallbackTests.java b/koala-wrapper/koalaui/interop/src/interop/java/CallbackTests.java index 04573b937..a5aa880e4 100644 --- a/koala-wrapper/koalaui/interop/src/interop/java/CallbackTests.java +++ b/koala-wrapper/koalaui/interop/src/interop/java/CallbackTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/java/CallbackType.java b/koala-wrapper/koalaui/interop/src/interop/java/CallbackType.java index 188faacd2..952cd3d39 100644 --- a/koala-wrapper/koalaui/interop/src/interop/java/CallbackType.java +++ b/koala-wrapper/koalaui/interop/src/interop/java/CallbackType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/loadLibraries.ts b/koala-wrapper/koalaui/interop/src/interop/loadLibraries.ts index 79c8bdd9c..4ce7982d3 100644 --- a/koala-wrapper/koalaui/interop/src/interop/loadLibraries.ts +++ b/koala-wrapper/koalaui/interop/src/interop/loadLibraries.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -11,17 +11,32 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ +*/ +import * as os from "os" const nativeModuleLibraries: Map = new Map() export function loadNativeLibrary(name: string): Record { - if ((globalThis as any).requireNapi) - return (globalThis as any).requireNapi(name, true) - else { - const suffixedName = name.endsWith(".node") ? name : `${name}.node` - return require(suffixedName) + const isHZVM = !!(globalThis as any).requireNapi + let nameWithoutSuffix = name.endsWith(".node") ? name.slice(0, name.length - 5) : name + let candidates: string[] = [ + name, + `${nameWithoutSuffix}.node`, + `${nameWithoutSuffix}_${os.arch()}.node`, + `${nameWithoutSuffix}_${os.platform()}_${os.arch()}.node`, + ] + if (!isHZVM) + try { candidates.push(eval(`require.resolve("${nameWithoutSuffix}.node")`)) } catch (_) {} + + for (const candidate of candidates) { + try { + if (isHZVM) + return (globalThis as any).requireNapi(candidate, true) + else + return eval(`let exports = {}; process.dlopen({ exports }, "${candidate}", 2); exports`) + } catch (_) {} } + throw new Error(`Failed to load native library ${name}. dlopen candidates: ${candidates.join(":")}`) } export function registerNativeModuleLibraryName(nativeModule: string, libraryName: string) { diff --git a/koala-wrapper/koalaui/interop/src/napi/wrappers/Wrapper.ts b/koala-wrapper/koalaui/interop/src/napi/wrappers/Wrapper.ts index 0f688601b..08298d5a5 100644 --- a/koala-wrapper/koalaui/interop/src/napi/wrappers/Wrapper.ts +++ b/koala-wrapper/koalaui/interop/src/napi/wrappers/Wrapper.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { int32 } from "@koalaui/common" +import { int32 } from "#koalaui/common" import { KPointer } from "../../interop/InteropTypes" export const nullptr = BigInt(0) diff --git a/koala-wrapper/koalaui/interop/src/napi/wrappers/arrays.ts b/koala-wrapper/koalaui/interop/src/napi/wrappers/arrays.ts index 36cefa696..4df864ef6 100644 --- a/koala-wrapper/koalaui/interop/src/napi/wrappers/arrays.ts +++ b/koala-wrapper/koalaui/interop/src/napi/wrappers/arrays.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { CustomTextDecoder, CustomTextEncoder } from "@koalaui/common" +import { CustomTextDecoder, CustomTextEncoder } from "#koalaui/common" import { Access, Exec, ExecWithLength, PtrArray, TypedArray } from "../../interop/arrays" import { nullptr } from "./Wrapper" import { Wrapper } from "../../interop/Wrapper" diff --git a/koala-wrapper/koalaui/interop/src/wasm/wrappers/Wrapper.ts b/koala-wrapper/koalaui/interop/src/wasm/wrappers/Wrapper.ts index 52c2a1a58..3a1550251 100644 --- a/koala-wrapper/koalaui/interop/src/wasm/wrappers/Wrapper.ts +++ b/koala-wrapper/koalaui/interop/src/wasm/wrappers/Wrapper.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { int32 } from "@koalaui/common" +import { int32 } from "#koalaui/common" import { KPointer } from "../../interop/InteropTypes" export const nullptr: number = 0 diff --git a/koala-wrapper/koalaui/interop/src/wasm/wrappers/arrays.ts b/koala-wrapper/koalaui/interop/src/wasm/wrappers/arrays.ts index 9aa189d07..d70010d1a 100644 --- a/koala-wrapper/koalaui/interop/src/wasm/wrappers/arrays.ts +++ b/koala-wrapper/koalaui/interop/src/wasm/wrappers/arrays.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { CustomTextEncoder, CustomTextDecoder, int32 } from "@koalaui/common" +import { CustomTextEncoder, CustomTextDecoder, int32 } from "#koalaui/common" import { KPointer } from "../../interop/InteropTypes" import { Wrapper } from "../../interop/Wrapper" diff --git a/koala-wrapper/src/Es2pandaEnums.ts b/koala-wrapper/src/Es2pandaEnums.ts index 6a16486a7..c18f0e922 100644 --- a/koala-wrapper/src/Es2pandaEnums.ts +++ b/koala-wrapper/src/Es2pandaEnums.ts @@ -172,7 +172,7 @@ export enum Es2pandaAstNodeType { AST_NODE_TYPE_YIELD_EXPRESSION, AST_NODE_TYPE_OPAQUE_TYPE_NODE, AST_NODE_TYPE_BLOCK_EXPRESSION, - AST_NODE_TYPE_ERROR_TYPE_NODE, + AST_NODE_TYPE_BROKEN_TYPE_NODE, AST_NODE_TYPE_ARRAY_EXPRESSION, AST_NODE_TYPE_ARRAY_PATTERN, AST_NODE_TYPE_ASSIGNMENT_EXPRESSION, diff --git a/koala-wrapper/src/arkts-api/types.ts b/koala-wrapper/src/arkts-api/types.ts index 6947f6186..cd9c66cef 100644 --- a/koala-wrapper/src/arkts-api/types.ts +++ b/koala-wrapper/src/arkts-api/types.ts @@ -74,9 +74,10 @@ export class EtsScript extends AstNode { static fromContext(): EtsScript { console.log('[TS WRAPPER] GET AST FROM CONTEXT'); - return new EtsScript( + let ret = new EtsScript( global.es2panda._ProgramAst(global.context, global.es2panda._ContextProgram(global.context)) ); + return ret; } /** -- Gitee From fadcf1fb87aefcb16b02759525b297ca2ad919f4 Mon Sep 17 00:00:00 2001 From: xieziang Date: Mon, 16 Jun 2025 11:09:34 +0800 Subject: [PATCH 14/17] update generated/ Signed-off-by: xieziang Change-Id: I29cd169af3c124190905d157a3d67f46bbab01fc --- .../common/bridges/ohos/src/chai/index.ts | 2 +- .../koalaui/common/dist/lib/src/Errors.js | 2 +- .../common/dist/lib/src/Finalization.js | 2 +- .../common/dist/lib/src/KoalaProfiler.js | 2 +- .../common/dist/lib/src/LifecycleEvent.js | 2 +- .../koalaui/common/dist/lib/src/Matrix33.js | 2 +- .../koalaui/common/dist/lib/src/Matrix44.js | 2 +- .../koalaui/common/dist/lib/src/PerfProbe.js | 2 +- .../koalaui/common/dist/lib/src/Point.js | 2 +- .../koalaui/common/dist/lib/src/Point3.js | 2 +- .../koalaui/common/dist/lib/src/koalaKey.js | 2 +- .../koalaui/common/dist/lib/src/sha1.js | 2 +- .../common/dist/lib/src/stringUtils.js | 2 +- .../koalaui/common/dist/lib/src/uniqueId.js | 2 +- koala-wrapper/koalaui/common/empty.js | 2 +- .../koalaui/common/src/Finalization.ts | 2 +- .../koalaui/common/src/MarkableQueue.ts | 2 +- koala-wrapper/koalaui/common/src/math.ts | 2 +- koala-wrapper/koalaui/common/test/golden.js | 2 +- .../dist/src/typescript/finalization.js | 2 +- .../compat/dist/src/typescript/reflection.js | 2 +- .../compat/dist/src/typescript/strings.js | 2 +- .../compat/dist/src/typescript/types.js | 2 +- .../koalaui/compat/src/arkts/array.ts | 2 +- .../koalaui/compat/src/arkts/atomic.ts | 2 +- .../koalaui/compat/src/arkts/double.ts | 2 +- .../koalaui/compat/src/arkts/finalization.ts | 2 +- .../koalaui/compat/src/arkts/index.ts | 2 +- .../koalaui/compat/src/arkts/performance.ts | 2 +- .../compat/src/arkts/prop-deep-copy.ts | 2 +- .../koalaui/compat/src/arkts/ts-reflection.ts | 2 +- .../koalaui/compat/src/ohos/performance.ts | 2 +- .../koalaui/compat/src/typescript/array.ts | 2 +- .../koalaui/compat/src/typescript/atomic.ts | 2 +- .../koalaui/compat/src/typescript/double.ts | 2 +- .../compat/src/typescript/finalization.ts | 2 +- .../koalaui/compat/src/typescript/index.ts | 2 +- .../compat/src/typescript/observable.ts | 2 +- .../compat/src/typescript/performance.ts | 2 +- .../compat/src/typescript/prop-deep-copy.ts | 2 +- .../compat/src/typescript/ts-reflection.ts | 2 +- .../dist/lib/src/arkts/ResourceManager.js | 2 +- .../dist/lib/src/interop/DeserializerBase.js | 2 +- .../dist/lib/src/interop/Finalizable.js | 2 +- .../lib/src/interop/InteropNativeModule.js | 2 +- .../dist/lib/src/interop/InteropOps.js | 2 +- .../dist/lib/src/interop/MaterializedBase.js | 2 +- .../dist/lib/src/interop/NativeBuffer.js | 2 +- .../dist/lib/src/interop/NativeString.js | 2 +- .../interop/dist/lib/src/interop/Platform.js | 2 +- .../interop/dist/lib/src/interop/Wrapper.js | 2 +- .../interop/dist/lib/src/interop/buffer.js | 2 +- .../interop/dist/lib/src/interop/index.js | 2 +- .../dist/lib/src/interop/loadLibraries.js | 2 +- .../interop/dist/lib/src/interop/nullable.js | 2 +- .../dist/lib/src/napi/wrappers/Callback.js | 2 +- .../dist/lib/src/napi/wrappers/Wrapper.js | 2 +- .../dist/lib/src/napi/wrappers/arrays.js | 2 +- .../dist/lib/src/wasm/wrappers/Callback.js | 2 +- .../dist/lib/src/wasm/wrappers/Wrapper.js | 2 +- .../dist/lib/src/wasm/wrappers/arrays.js | 2 +- .../interop/src/arkts/DeserializerBase.ts | 2 +- .../interop/src/arkts/InteropNativeModule.ts | 2 +- .../koalaui/interop/src/arkts/InteropTypes.ts | 2 +- .../interop/src/arkts/MaterializedBase.ts | 2 +- .../koalaui/interop/src/arkts/NativeBuffer.ts | 2 +- .../interop/src/arkts/SerializerBase.ts | 2 +- .../koalaui/interop/src/arkts/callback.ts | 2 +- .../koalaui/interop/src/arkts/index.ts | 2 +- .../interop/src/arkts/loadLibraries.ts | 2 +- .../interop/src/cangjie/DeserializerBase.cj | 2 +- .../interop/src/cangjie/InteropTypes.cj | 2 +- .../interop/src/cangjie/MaterializedBase.cj | 2 +- .../interop/src/cangjie/SerializerBase.cj | 2 +- .../koalaui/interop/src/cangjie/Tag.cj | 2 +- .../koalaui/interop/src/cangjie/cjpm.toml | 2 +- .../interop/src/cpp/DeserializerBase.h | 2 +- .../koalaui/interop/src/cpp/SerializerBase.h | 2 +- .../interop/src/cpp/callback-resource.cc | 2 +- .../interop/src/cpp/callback-resource.h | 2 +- .../interop/src/cpp/cangjie/convertors-cj.cc | 2 +- .../koalaui/interop/src/cpp/crashdump.h | 2 +- .../koalaui/interop/src/cpp/dynamic-loader.h | 2 +- .../koalaui/interop/src/cpp/ets/etsapi.h | 2 +- .../interop/src/cpp/interop-logging.cc | 2 +- .../koalaui/interop/src/cpp/interop-logging.h | 2 +- .../koalaui/interop/src/cpp/interop-types.h | 2 +- .../interop/src/cpp/jni/convertors-jni.cc | 2 +- .../interop/src/cpp/jni/convertors-jni.h | 2 +- .../koalaui/interop/src/cpp/tracer.h | 2 +- .../interop/src/cpp/types/koala-types.h | 2 +- .../interop/src/cpp/types/signatures.cc | 2 +- .../interop/src/cpp/types/signatures.h | 2 +- .../koalaui/interop/src/cpp/vmloader.cc | 2 +- .../interop/src/interop/DeserializerBase.ts | 2 +- .../src/interop/InteropNativeModule.ts | 2 +- .../koalaui/interop/src/interop/InteropOps.ts | 2 +- .../interop/src/interop/InteropTypes.ts | 2 +- .../interop/src/interop/MaterializedBase.ts | 2 +- .../interop/src/interop/NativeBuffer.ts | 2 +- .../interop/src/interop/SerializerBase.ts | 2 +- .../koalaui/interop/src/interop/arrays.ts | 2 +- .../koalaui/interop/src/interop/buffer.ts | 2 +- .../src/interop/java/CallbackRecord.java | 2 +- .../src/interop/java/CallbackRegistry.java | 2 +- .../src/interop/java/CallbackTests.java | 2 +- .../src/interop/java/CallbackType.java | 2 +- .../interop/src/interop/loadLibraries.ts | 2 +- koala-wrapper/src/Es2pandaNativeModule.ts | 17 +- .../node-utilities/AnnotationDeclaration.ts | 2 +- .../node-utilities/AnnotationUsage.ts | 2 +- .../node-utilities/ArrayExpression.ts | 2 +- .../node-utilities/ArrowFunctionExpression.ts | 2 +- .../node-utilities/AssignmentExpression.ts | 2 +- .../node-utilities/BinaryExpression.ts | 2 +- .../node-utilities/BlockExpression.ts | 2 +- .../node-utilities/BlockStatement.ts | 2 +- .../node-utilities/CallExpression.ts | 2 +- .../node-utilities/ChainExpression.ts | 4 +- .../node-utilities/ClassDeclaration.ts | 2 +- .../node-utilities/ClassDefinition.ts | 2 +- .../arkts-api/node-utilities/ClassProperty.ts | 2 +- .../node-utilities/ConditionalExpression.ts | 2 +- .../node-utilities/ETSFunctionType.ts | 2 +- .../node-utilities/ETSImportDeclaration.ts | 2 +- .../ETSNewClassInstanceExpression.ts | 2 +- .../node-utilities/ETSParameterExpression.ts | 2 +- .../node-utilities/ETSPrimitiveType.ts | 2 +- .../node-utilities/ETSTypeReference.ts | 2 +- .../node-utilities/ETSTypeReferencePart.ts | 2 +- .../node-utilities/ETSUndefinedType.ts | 2 +- .../arkts-api/node-utilities/ETSUnionType.ts | 2 +- .../node-utilities/ExpressionStatement.ts | 2 +- .../node-utilities/FunctionDeclaration.ts | 2 +- .../node-utilities/FunctionExpression.ts | 2 +- .../arkts-api/node-utilities/Identifier.ts | 2 +- .../arkts-api/node-utilities/IfStatement.ts | 2 +- .../node-utilities/ImportSpecifier.ts | 2 +- .../node-utilities/MemberExpression.ts | 2 +- .../node-utilities/MethodDefinition.ts | 2 +- .../arkts-api/node-utilities/NullLiteral.ts | 2 +- .../arkts-api/node-utilities/NumberLiteral.ts | 2 +- .../node-utilities/ReturnStatement.ts | 2 +- .../node-utilities/ScriptFunction.ts | 2 +- .../arkts-api/node-utilities/StringLiteral.ts | 2 +- .../node-utilities/StructDeclaration.ts | 2 +- .../node-utilities/SuperExpression.ts | 2 +- .../node-utilities/TSAsExpression.ts | 2 +- .../node-utilities/TSInterfaceBody.ts | 2 +- .../node-utilities/TSInterfaceDeclaration.ts | 2 +- .../node-utilities/TSNonNullExpression.ts | 2 +- .../node-utilities/TSTypeAliasDeclaration.ts | 2 +- .../node-utilities/TSTypeParameter.ts | 2 +- .../TSTypeParameterDeclaration.ts | 2 +- .../TSTypeParameterInstantiation.ts | 2 +- .../node-utilities/TemplateLiteral.ts | 2 +- .../node-utilities/ThisExpression.ts | 2 +- .../arkts-api/node-utilities/TryStatement.ts | 2 +- .../node-utilities/UndefinedLiteral.ts | 2 +- .../node-utilities/VariableDeclaration.ts | 2 +- .../node-utilities/VariableDeclarator.ts | 2 +- koala-wrapper/src/checkSdk.ts | 25 + .../src/generated/Es2pandaNativeModule.ts | 3513 +++++++++++------ koala-wrapper/src/generated/factory.ts | 1269 ++++++ koala-wrapper/src/generated/index.ts | 3 +- .../src/generated/peers/AnnotatedAstNode.ts | 4 +- .../generated/peers/AnnotatedExpression.ts | 6 +- .../src/generated/peers/AnnotatedStatement.ts | 4 +- .../generated/peers/AnnotationDeclaration.ts | 82 +- .../src/generated/peers/AnnotationUsage.ts | 27 +- .../src/generated/peers/ArkTsConfig.ts | 70 + .../src/generated/peers/ArrayExpression.ts | 96 +- .../peers/ArrowFunctionExpression.ts | 53 +- .../src/generated/peers/AssertStatement.ts | 13 +- .../generated/peers/AssignmentExpression.ts | 44 +- .../src/generated/peers/AstDumper.ts | 4 +- .../src/generated/peers/AstVerifier.ts | 36 + .../src/generated/peers/AstVisitor.ts | 36 + .../src/generated/peers/AwaitExpression.ts | 9 +- .../src/generated/peers/BigIntLiteral.ts | 9 +- .../src/generated/peers/BinaryExpression.ts | 30 +- .../src/generated/peers/BindingProps.ts | 36 + .../src/generated/peers/BlockExpression.ts | 13 +- .../src/generated/peers/BlockStatement.ts | 36 +- .../src/generated/peers/BooleanLiteral.ts | 9 +- .../src/generated/peers/BreakStatement.ts | 30 +- .../src/generated/peers/CallExpression.ts | 39 +- .../src/generated/peers/CatchClause.ts | 23 +- .../src/generated/peers/ChainExpression.ts | 21 +- .../src/generated/peers/CharLiteral.ts | 9 +- .../src/generated/peers/ClassDeclaration.ts | 38 +- .../src/generated/peers/ClassDefinition.ts | 216 +- koala-wrapper/src/generated/peers/CodeGen.ts | 36 + .../src/generated/peers/Declaration.ts | 36 + .../src/generated/peers/DiagnosticInfo.ts | 36 + .../src/generated/peers/DynamicImportData.ts | 36 + .../src/generated/peers/ETSKeyofType.ts | 54 + .../generated/peers/ETSStringLiteralType.ts | 51 + .../src/generated/peers/ErrorLogger.ts | 36 + koala-wrapper/src/generated/peers/IRNode.ts | 36 + .../src/generated/peers/IndexInfo.ts | 36 + .../src/generated/peers/LabelPair.ts | 2 +- .../src/generated/peers/ObjectDescriptor.ts | 36 + koala-wrapper/src/generated/peers/Program.ts | 186 + .../src/generated/peers/ScopeFindResult.ts | 36 + .../src/generated/peers/ScriptFunctionData.ts | 36 + .../src/generated/peers/SignatureInfo.ts | 36 + .../src/generated/peers/SourcePosition.ts | 36 + .../src/generated/peers/SourceRange.ts | 36 + .../src/generated/peers/SuggestionInfo.ts | 36 + koala-wrapper/src/generated/peers/VReg.ts | 36 + .../generated/peers/VerificationContext.ts | 36 + .../src/generated/peers/VerifierMessage.ts | 36 + koala-wrapper/src/plugin-utils.ts | 118 + koala-wrapper/src/reexport-for-generated.ts | 3 +- 215 files changed, 5444 insertions(+), 1724 deletions(-) create mode 100644 koala-wrapper/src/checkSdk.ts create mode 100644 koala-wrapper/src/generated/factory.ts create mode 100644 koala-wrapper/src/generated/peers/ArkTsConfig.ts create mode 100644 koala-wrapper/src/generated/peers/AstVerifier.ts create mode 100644 koala-wrapper/src/generated/peers/AstVisitor.ts create mode 100644 koala-wrapper/src/generated/peers/BindingProps.ts create mode 100644 koala-wrapper/src/generated/peers/CodeGen.ts create mode 100644 koala-wrapper/src/generated/peers/Declaration.ts create mode 100644 koala-wrapper/src/generated/peers/DiagnosticInfo.ts create mode 100644 koala-wrapper/src/generated/peers/DynamicImportData.ts create mode 100644 koala-wrapper/src/generated/peers/ETSKeyofType.ts create mode 100644 koala-wrapper/src/generated/peers/ETSStringLiteralType.ts create mode 100644 koala-wrapper/src/generated/peers/ErrorLogger.ts create mode 100644 koala-wrapper/src/generated/peers/IRNode.ts create mode 100644 koala-wrapper/src/generated/peers/IndexInfo.ts create mode 100644 koala-wrapper/src/generated/peers/ObjectDescriptor.ts create mode 100644 koala-wrapper/src/generated/peers/Program.ts create mode 100644 koala-wrapper/src/generated/peers/ScopeFindResult.ts create mode 100644 koala-wrapper/src/generated/peers/ScriptFunctionData.ts create mode 100644 koala-wrapper/src/generated/peers/SignatureInfo.ts create mode 100644 koala-wrapper/src/generated/peers/SourcePosition.ts create mode 100644 koala-wrapper/src/generated/peers/SourceRange.ts create mode 100644 koala-wrapper/src/generated/peers/SuggestionInfo.ts create mode 100644 koala-wrapper/src/generated/peers/VReg.ts create mode 100644 koala-wrapper/src/generated/peers/VerificationContext.ts create mode 100644 koala-wrapper/src/generated/peers/VerifierMessage.ts create mode 100644 koala-wrapper/src/plugin-utils.ts diff --git a/koala-wrapper/koalaui/common/bridges/ohos/src/chai/index.ts b/koala-wrapper/koalaui/common/bridges/ohos/src/chai/index.ts index b1df54150..0ea560e44 100644 --- a/koala-wrapper/koalaui/common/bridges/ohos/src/chai/index.ts +++ b/koala-wrapper/koalaui/common/bridges/ohos/src/chai/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Errors.js b/koala-wrapper/koalaui/common/dist/lib/src/Errors.js index ef78008d2..4f05c8cef 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Errors.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/Errors.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Finalization.js b/koala-wrapper/koalaui/common/dist/lib/src/Finalization.js index 54930b97b..a9ef39d45 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Finalization.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/Finalization.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/KoalaProfiler.js b/koala-wrapper/koalaui/common/dist/lib/src/KoalaProfiler.js index bf2512c23..664840fdd 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/KoalaProfiler.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/KoalaProfiler.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/LifecycleEvent.js b/koala-wrapper/koalaui/common/dist/lib/src/LifecycleEvent.js index c3b848452..2b1f275d8 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/LifecycleEvent.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/LifecycleEvent.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Matrix33.js b/koala-wrapper/koalaui/common/dist/lib/src/Matrix33.js index 5e7a0452a..335f573ae 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Matrix33.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/Matrix33.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Matrix44.js b/koala-wrapper/koalaui/common/dist/lib/src/Matrix44.js index 0a8a046d7..4f727e450 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Matrix44.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/Matrix44.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/PerfProbe.js b/koala-wrapper/koalaui/common/dist/lib/src/PerfProbe.js index 54780519b..3d85f2862 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/PerfProbe.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/PerfProbe.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Point.js b/koala-wrapper/koalaui/common/dist/lib/src/Point.js index 377a89a2a..1b5080bfa 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Point.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/Point.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/Point3.js b/koala-wrapper/koalaui/common/dist/lib/src/Point3.js index 8eff88ce6..de748e8e1 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/Point3.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/Point3.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/koalaKey.js b/koala-wrapper/koalaui/common/dist/lib/src/koalaKey.js index e1daaa0c7..458a2c260 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/koalaKey.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/koalaKey.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/sha1.js b/koala-wrapper/koalaui/common/dist/lib/src/sha1.js index f101a735b..51cebb8a2 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/sha1.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/sha1.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/stringUtils.js b/koala-wrapper/koalaui/common/dist/lib/src/stringUtils.js index efe590f98..06850d000 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/stringUtils.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/stringUtils.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/dist/lib/src/uniqueId.js b/koala-wrapper/koalaui/common/dist/lib/src/uniqueId.js index 4a3cd07f3..6269d042c 100644 --- a/koala-wrapper/koalaui/common/dist/lib/src/uniqueId.js +++ b/koala-wrapper/koalaui/common/dist/lib/src/uniqueId.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/empty.js b/koala-wrapper/koalaui/common/empty.js index ac57d1240..ce57330b9 100644 --- a/koala-wrapper/koalaui/common/empty.js +++ b/koala-wrapper/koalaui/common/empty.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/src/Finalization.ts b/koala-wrapper/koalaui/common/src/Finalization.ts index 0f64c9b63..6c06ef311 100644 --- a/koala-wrapper/koalaui/common/src/Finalization.ts +++ b/koala-wrapper/koalaui/common/src/Finalization.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/src/MarkableQueue.ts b/koala-wrapper/koalaui/common/src/MarkableQueue.ts index 030a20318..92467971f 100644 --- a/koala-wrapper/koalaui/common/src/MarkableQueue.ts +++ b/koala-wrapper/koalaui/common/src/MarkableQueue.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/src/math.ts b/koala-wrapper/koalaui/common/src/math.ts index 35f8879cb..38e8955c6 100644 --- a/koala-wrapper/koalaui/common/src/math.ts +++ b/koala-wrapper/koalaui/common/src/math.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/common/test/golden.js b/koala-wrapper/koalaui/common/test/golden.js index 42298bd34..52c48305e 100644 --- a/koala-wrapper/koalaui/common/test/golden.js +++ b/koala-wrapper/koalaui/common/test/golden.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/finalization.js b/koala-wrapper/koalaui/compat/dist/src/typescript/finalization.js index 3d7ef6679..4d605cb72 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/finalization.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/finalization.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/reflection.js b/koala-wrapper/koalaui/compat/dist/src/typescript/reflection.js index 2c3f43c3b..d0758a88a 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/reflection.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/reflection.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.lcClassName = void 0; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/strings.js b/koala-wrapper/koalaui/compat/dist/src/typescript/strings.js index 782bf7d18..a2419d0a2 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/strings.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/strings.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/dist/src/typescript/types.js b/koala-wrapper/koalaui/compat/dist/src/typescript/types.js index 7239fddb8..af49665f4 100644 --- a/koala-wrapper/koalaui/compat/dist/src/typescript/types.js +++ b/koala-wrapper/koalaui/compat/dist/src/typescript/types.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/array.ts b/koala-wrapper/koalaui/compat/src/arkts/array.ts index 83e3b1dce..5fa838e4f 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/array.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/array.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/atomic.ts b/koala-wrapper/koalaui/compat/src/arkts/atomic.ts index d8efb0840..241b0944c 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/atomic.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/atomic.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/double.ts b/koala-wrapper/koalaui/compat/src/arkts/double.ts index fc8219517..6f61c465b 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/double.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/double.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/finalization.ts b/koala-wrapper/koalaui/compat/src/arkts/finalization.ts index 021bc1d43..92ba81b14 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/finalization.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/finalization.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/index.ts b/koala-wrapper/koalaui/compat/src/arkts/index.ts index 95ec1799f..c6077254c 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/index.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/performance.ts b/koala-wrapper/koalaui/compat/src/arkts/performance.ts index 8926ff851..2755960e8 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/performance.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/performance.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/prop-deep-copy.ts b/koala-wrapper/koalaui/compat/src/arkts/prop-deep-copy.ts index 1e13dfc12..9005172c1 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/prop-deep-copy.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/prop-deep-copy.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/arkts/ts-reflection.ts b/koala-wrapper/koalaui/compat/src/arkts/ts-reflection.ts index 65325206e..0214ccf02 100644 --- a/koala-wrapper/koalaui/compat/src/arkts/ts-reflection.ts +++ b/koala-wrapper/koalaui/compat/src/arkts/ts-reflection.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/ohos/performance.ts b/koala-wrapper/koalaui/compat/src/ohos/performance.ts index 8926ff851..2755960e8 100644 --- a/koala-wrapper/koalaui/compat/src/ohos/performance.ts +++ b/koala-wrapper/koalaui/compat/src/ohos/performance.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/array.ts b/koala-wrapper/koalaui/compat/src/typescript/array.ts index 156ea36f2..9392bb412 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/array.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/array.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/atomic.ts b/koala-wrapper/koalaui/compat/src/typescript/atomic.ts index b3b12b85f..e6312b700 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/atomic.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/atomic.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/double.ts b/koala-wrapper/koalaui/compat/src/typescript/double.ts index 5325e47fd..9dcf0e2c5 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/double.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/double.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/finalization.ts b/koala-wrapper/koalaui/compat/src/typescript/finalization.ts index c7d5e05e8..4e2caa703 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/finalization.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/finalization.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/index.ts b/koala-wrapper/koalaui/compat/src/typescript/index.ts index 03bb4fbdd..84eed3cf9 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/index.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/observable.ts b/koala-wrapper/koalaui/compat/src/typescript/observable.ts index 44066c809..5d56c0d2b 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/observable.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/observable.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/performance.ts b/koala-wrapper/koalaui/compat/src/typescript/performance.ts index 9451185bc..80ea8a14e 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/performance.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/performance.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/prop-deep-copy.ts b/koala-wrapper/koalaui/compat/src/typescript/prop-deep-copy.ts index 3dd13819d..8da5c4f71 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/prop-deep-copy.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/prop-deep-copy.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/compat/src/typescript/ts-reflection.ts b/koala-wrapper/koalaui/compat/src/typescript/ts-reflection.ts index f99c90278..f820e0045 100644 --- a/koala-wrapper/koalaui/compat/src/typescript/ts-reflection.ts +++ b/koala-wrapper/koalaui/compat/src/typescript/ts-reflection.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/arkts/ResourceManager.js b/koala-wrapper/koalaui/interop/dist/lib/src/arkts/ResourceManager.js index bcdf8d29b..1805acccd 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/arkts/ResourceManager.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/arkts/ResourceManager.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/DeserializerBase.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/DeserializerBase.js index 1652b62aa..e26ef5f14 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/DeserializerBase.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/DeserializerBase.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.CustomDeserializer = exports.DeserializerBase = void 0; /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Finalizable.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Finalizable.js index 7acbc0b49..8e28660fc 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Finalizable.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Finalizable.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropNativeModule.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropNativeModule.js index 15f2a270f..3d8f30049 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropNativeModule.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropNativeModule.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropOps.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropOps.js index 9bb6a450a..150decb9c 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropOps.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/InteropOps.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/MaterializedBase.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/MaterializedBase.js index 28162e00a..629c7d70e 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/MaterializedBase.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/MaterializedBase.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeBuffer.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeBuffer.js index 3b6702728..234428114 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeBuffer.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeBuffer.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeString.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeString.js index 5ba7f061b..0bd0d1586 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeString.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/NativeString.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Platform.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Platform.js index b6fcb315f..adf11745b 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Platform.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Platform.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Wrapper.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Wrapper.js index ad9cd17b2..dfbdcd17e 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/Wrapper.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/Wrapper.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/buffer.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/buffer.js index 73bfc32fb..d088a3698 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/buffer.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/buffer.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/index.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/index.js index b46532c92..6f3de81da 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/index.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/index.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/loadLibraries.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/loadLibraries.js index 02c2f1bc4..2bdc50a94 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/loadLibraries.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/loadLibraries.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.loadNativeModuleLibrary = exports.registerNativeModuleLibraryName = exports.loadNativeLibrary = void 0; /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/interop/nullable.js b/koala-wrapper/koalaui/interop/dist/lib/src/interop/nullable.js index 8ec1719e3..13b7d505e 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/interop/nullable.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/interop/nullable.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Callback.js b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Callback.js index 8eb19c53e..c30af143e 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Callback.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Callback.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Wrapper.js b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Wrapper.js index f6e92823d..dd3dd6116 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Wrapper.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/Wrapper.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/arrays.js b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/arrays.js index e60730679..bf8bea46d 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/arrays.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/napi/wrappers/arrays.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Callback.js b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Callback.js index 23703f628..42d551ac4 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Callback.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Callback.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Wrapper.js b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Wrapper.js index 7c2c005d0..b849ad662 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Wrapper.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/Wrapper.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/arrays.js b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/arrays.js index a38870940..9ee0f6369 100644 --- a/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/arrays.js +++ b/koala-wrapper/koalaui/interop/dist/lib/src/wasm/wrappers/arrays.js @@ -1,6 +1,6 @@ "use strict"; /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/arkts/DeserializerBase.ts b/koala-wrapper/koalaui/interop/src/arkts/DeserializerBase.ts index 378cd7f48..dc3552181 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/DeserializerBase.ts +++ b/koala-wrapper/koalaui/interop/src/arkts/DeserializerBase.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/arkts/InteropNativeModule.ts b/koala-wrapper/koalaui/interop/src/arkts/InteropNativeModule.ts index 05ef4bbb7..c2625cb26 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/InteropNativeModule.ts +++ b/koala-wrapper/koalaui/interop/src/arkts/InteropNativeModule.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/arkts/InteropTypes.ts b/koala-wrapper/koalaui/interop/src/arkts/InteropTypes.ts index 656b34f45..4e7ed9bec 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/InteropTypes.ts +++ b/koala-wrapper/koalaui/interop/src/arkts/InteropTypes.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/arkts/MaterializedBase.ts b/koala-wrapper/koalaui/interop/src/arkts/MaterializedBase.ts index 3f26a861e..f0ea6ee4c 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/MaterializedBase.ts +++ b/koala-wrapper/koalaui/interop/src/arkts/MaterializedBase.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/arkts/NativeBuffer.ts b/koala-wrapper/koalaui/interop/src/arkts/NativeBuffer.ts index b6095f0bc..b970e7761 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/NativeBuffer.ts +++ b/koala-wrapper/koalaui/interop/src/arkts/NativeBuffer.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/arkts/SerializerBase.ts b/koala-wrapper/koalaui/interop/src/arkts/SerializerBase.ts index 5f5fc438c..2cebc2225 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/SerializerBase.ts +++ b/koala-wrapper/koalaui/interop/src/arkts/SerializerBase.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/arkts/callback.ts b/koala-wrapper/koalaui/interop/src/arkts/callback.ts index 71cd05dd9..f74452b0e 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/callback.ts +++ b/koala-wrapper/koalaui/interop/src/arkts/callback.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/arkts/index.ts b/koala-wrapper/koalaui/interop/src/arkts/index.ts index b31a7b7ac..9dad6bac6 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/index.ts +++ b/koala-wrapper/koalaui/interop/src/arkts/index.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/arkts/loadLibraries.ts b/koala-wrapper/koalaui/interop/src/arkts/loadLibraries.ts index feda358f4..863bcd4a3 100644 --- a/koala-wrapper/koalaui/interop/src/arkts/loadLibraries.ts +++ b/koala-wrapper/koalaui/interop/src/arkts/loadLibraries.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cangjie/DeserializerBase.cj b/koala-wrapper/koalaui/interop/src/cangjie/DeserializerBase.cj index 22861ded2..6648c2beb 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/DeserializerBase.cj +++ b/koala-wrapper/koalaui/interop/src/cangjie/DeserializerBase.cj @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cangjie/InteropTypes.cj b/koala-wrapper/koalaui/interop/src/cangjie/InteropTypes.cj index ddda5415d..b557f7db4 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/InteropTypes.cj +++ b/koala-wrapper/koalaui/interop/src/cangjie/InteropTypes.cj @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cangjie/MaterializedBase.cj b/koala-wrapper/koalaui/interop/src/cangjie/MaterializedBase.cj index 362de947c..bf59ad621 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/MaterializedBase.cj +++ b/koala-wrapper/koalaui/interop/src/cangjie/MaterializedBase.cj @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cangjie/SerializerBase.cj b/koala-wrapper/koalaui/interop/src/cangjie/SerializerBase.cj index 0081f7986..6434eae6e 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/SerializerBase.cj +++ b/koala-wrapper/koalaui/interop/src/cangjie/SerializerBase.cj @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cangjie/Tag.cj b/koala-wrapper/koalaui/interop/src/cangjie/Tag.cj index 8c5cc317f..621a1fd57 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/Tag.cj +++ b/koala-wrapper/koalaui/interop/src/cangjie/Tag.cj @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cangjie/cjpm.toml b/koala-wrapper/koalaui/interop/src/cangjie/cjpm.toml index 54130b377..551e9b0d9 100644 --- a/koala-wrapper/koalaui/interop/src/cangjie/cjpm.toml +++ b/koala-wrapper/koalaui/interop/src/cangjie/cjpm.toml @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Huawei Device Co., Ltd. +# Copyright (c) 2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/DeserializerBase.h b/koala-wrapper/koalaui/interop/src/cpp/DeserializerBase.h index 55e6c54cb..5d5b70099 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/DeserializerBase.h +++ b/koala-wrapper/koalaui/interop/src/cpp/DeserializerBase.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/SerializerBase.h b/koala-wrapper/koalaui/interop/src/cpp/SerializerBase.h index 019dbd727..d8942ee9c 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/SerializerBase.h +++ b/koala-wrapper/koalaui/interop/src/cpp/SerializerBase.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/callback-resource.cc b/koala-wrapper/koalaui/interop/src/cpp/callback-resource.cc index acbe9cd23..bd159ebb4 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/callback-resource.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/callback-resource.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/callback-resource.h b/koala-wrapper/koalaui/interop/src/cpp/callback-resource.h index c7a742a05..793e580b8 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/callback-resource.h +++ b/koala-wrapper/koalaui/interop/src/cpp/callback-resource.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/cangjie/convertors-cj.cc b/koala-wrapper/koalaui/interop/src/cpp/cangjie/convertors-cj.cc index ebb0dac2f..c6b5141d7 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/cangjie/convertors-cj.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/cangjie/convertors-cj.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/crashdump.h b/koala-wrapper/koalaui/interop/src/cpp/crashdump.h index 128f7ba61..7d1bac040 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/crashdump.h +++ b/koala-wrapper/koalaui/interop/src/cpp/crashdump.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/dynamic-loader.h b/koala-wrapper/koalaui/interop/src/cpp/dynamic-loader.h index cfc912b9c..0f535d69e 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/dynamic-loader.h +++ b/koala-wrapper/koalaui/interop/src/cpp/dynamic-loader.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/ets/etsapi.h b/koala-wrapper/koalaui/interop/src/cpp/ets/etsapi.h index 41641c97e..15868ee90 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/ets/etsapi.h +++ b/koala-wrapper/koalaui/interop/src/cpp/ets/etsapi.h @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/interop-logging.cc b/koala-wrapper/koalaui/interop/src/cpp/interop-logging.cc index 2d2b11af7..2ad1c839c 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/interop-logging.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/interop-logging.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/interop-logging.h b/koala-wrapper/koalaui/interop/src/cpp/interop-logging.h index 61b490699..493799010 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/interop-logging.h +++ b/koala-wrapper/koalaui/interop/src/cpp/interop-logging.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/interop-types.h b/koala-wrapper/koalaui/interop/src/cpp/interop-types.h index 6f10e60b8..e11dadd33 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/interop-types.h +++ b/koala-wrapper/koalaui/interop/src/cpp/interop-types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.cc b/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.cc index 683625b09..782f2c2e3 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.h b/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.h index bfcacbb55..35e49b5c8 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.h +++ b/koala-wrapper/koalaui/interop/src/cpp/jni/convertors-jni.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/tracer.h b/koala-wrapper/koalaui/interop/src/cpp/tracer.h index e3ac0397f..fc0e1e37f 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/tracer.h +++ b/koala-wrapper/koalaui/interop/src/cpp/tracer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/types/koala-types.h b/koala-wrapper/koalaui/interop/src/cpp/types/koala-types.h index 024bfa8af..a3d37851f 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/types/koala-types.h +++ b/koala-wrapper/koalaui/interop/src/cpp/types/koala-types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/types/signatures.cc b/koala-wrapper/koalaui/interop/src/cpp/types/signatures.cc index 71e4bab17..5e4d613c3 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/types/signatures.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/types/signatures.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/types/signatures.h b/koala-wrapper/koalaui/interop/src/cpp/types/signatures.h index 05ddf1cc8..48a76f3d8 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/types/signatures.h +++ b/koala-wrapper/koalaui/interop/src/cpp/types/signatures.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/cpp/vmloader.cc b/koala-wrapper/koalaui/interop/src/cpp/vmloader.cc index 9efbfeff3..e8e1c8e6d 100644 --- a/koala-wrapper/koalaui/interop/src/cpp/vmloader.cc +++ b/koala-wrapper/koalaui/interop/src/cpp/vmloader.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/DeserializerBase.ts b/koala-wrapper/koalaui/interop/src/interop/DeserializerBase.ts index 8a8537d68..779b35b05 100644 --- a/koala-wrapper/koalaui/interop/src/interop/DeserializerBase.ts +++ b/koala-wrapper/koalaui/interop/src/interop/DeserializerBase.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/InteropNativeModule.ts b/koala-wrapper/koalaui/interop/src/interop/InteropNativeModule.ts index 1545b6526..ecfa413e0 100644 --- a/koala-wrapper/koalaui/interop/src/interop/InteropNativeModule.ts +++ b/koala-wrapper/koalaui/interop/src/interop/InteropNativeModule.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/InteropOps.ts b/koala-wrapper/koalaui/interop/src/interop/InteropOps.ts index 43ffb4700..15b946a83 100644 --- a/koala-wrapper/koalaui/interop/src/interop/InteropOps.ts +++ b/koala-wrapper/koalaui/interop/src/interop/InteropOps.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/InteropTypes.ts b/koala-wrapper/koalaui/interop/src/interop/InteropTypes.ts index 26d3e8a13..39f1d3039 100644 --- a/koala-wrapper/koalaui/interop/src/interop/InteropTypes.ts +++ b/koala-wrapper/koalaui/interop/src/interop/InteropTypes.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/MaterializedBase.ts b/koala-wrapper/koalaui/interop/src/interop/MaterializedBase.ts index 51135fbaa..c1aa09b05 100644 --- a/koala-wrapper/koalaui/interop/src/interop/MaterializedBase.ts +++ b/koala-wrapper/koalaui/interop/src/interop/MaterializedBase.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/NativeBuffer.ts b/koala-wrapper/koalaui/interop/src/interop/NativeBuffer.ts index a623c987d..df9feba29 100644 --- a/koala-wrapper/koalaui/interop/src/interop/NativeBuffer.ts +++ b/koala-wrapper/koalaui/interop/src/interop/NativeBuffer.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/SerializerBase.ts b/koala-wrapper/koalaui/interop/src/interop/SerializerBase.ts index 18af3b1b6..90b317230 100644 --- a/koala-wrapper/koalaui/interop/src/interop/SerializerBase.ts +++ b/koala-wrapper/koalaui/interop/src/interop/SerializerBase.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/arrays.ts b/koala-wrapper/koalaui/interop/src/interop/arrays.ts index 1336f18e1..162c37521 100644 --- a/koala-wrapper/koalaui/interop/src/interop/arrays.ts +++ b/koala-wrapper/koalaui/interop/src/interop/arrays.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/buffer.ts b/koala-wrapper/koalaui/interop/src/interop/buffer.ts index 0393ff27f..7dd823d5e 100644 --- a/koala-wrapper/koalaui/interop/src/interop/buffer.ts +++ b/koala-wrapper/koalaui/interop/src/interop/buffer.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/java/CallbackRecord.java b/koala-wrapper/koalaui/interop/src/interop/java/CallbackRecord.java index 2292705a6..4c866822d 100644 --- a/koala-wrapper/koalaui/interop/src/interop/java/CallbackRecord.java +++ b/koala-wrapper/koalaui/interop/src/interop/java/CallbackRecord.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/java/CallbackRegistry.java b/koala-wrapper/koalaui/interop/src/interop/java/CallbackRegistry.java index 2fb731539..589e589ee 100644 --- a/koala-wrapper/koalaui/interop/src/interop/java/CallbackRegistry.java +++ b/koala-wrapper/koalaui/interop/src/interop/java/CallbackRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/java/CallbackTests.java b/koala-wrapper/koalaui/interop/src/interop/java/CallbackTests.java index a5aa880e4..04573b937 100644 --- a/koala-wrapper/koalaui/interop/src/interop/java/CallbackTests.java +++ b/koala-wrapper/koalaui/interop/src/interop/java/CallbackTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/java/CallbackType.java b/koala-wrapper/koalaui/interop/src/interop/java/CallbackType.java index 952cd3d39..188faacd2 100644 --- a/koala-wrapper/koalaui/interop/src/interop/java/CallbackType.java +++ b/koala-wrapper/koalaui/interop/src/interop/java/CallbackType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/koalaui/interop/src/interop/loadLibraries.ts b/koala-wrapper/koalaui/interop/src/interop/loadLibraries.ts index 4ce7982d3..b84e9c2f7 100644 --- a/koala-wrapper/koalaui/interop/src/interop/loadLibraries.ts +++ b/koala-wrapper/koalaui/interop/src/interop/loadLibraries.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/Es2pandaNativeModule.ts b/koala-wrapper/src/Es2pandaNativeModule.ts index e4e94e8b0..6f29c31d4 100644 --- a/koala-wrapper/src/Es2pandaNativeModule.ts +++ b/koala-wrapper/src/Es2pandaNativeModule.ts @@ -32,6 +32,7 @@ import { Es2pandaPluginDiagnosticType } from "./generated/Es2pandaEnums" // TODO: this type should be in interop export type KPtrArray = BigUint64Array; +export type KNativePointerArray = BigUint64Array export class Es2pandaNativeModule { _AnnotationAllowedAnnotations(context: KPtr, node: KPtr, returnLen: KPtr): KPtr { @@ -58,8 +59,8 @@ export class Es2pandaNativeModule { _CreateConfig(argc: number, argv: string[]): KPtr { throw new Error('Not implemented'); } - _DestroyConfig(config: KNativePointer): void { - throw new Error('Not implemented'); + _DestroyConfig(peer: KNativePointer): void { + throw new Error("Not implemented") } _CreateContextFromString(config: KPtr, source: String, filename: String): KPtr { throw new Error('Not implemented'); @@ -133,16 +134,8 @@ export class Es2pandaNativeModule { _ExternalSourcePrograms(instance: KNativePointer): KNativePointer { throw new Error('Not implemented'); } - _ETSParserBuildImportDeclaration( - context: KNativePointer, - importPath: KNativePointer, - specifiers: BigUint64Array, - specifiersSequenceLength: KInt, - importKind: KInt, - programPtr: KNativePointer, - flags: KInt - ): KNativePointer { - throw new Error('Not implemented'); + _ETSParserBuildImportDeclaration(context: KNativePointer, importKinds: KInt, specifiers: KNativePointerArray, specifiersSequenceLength: KUInt, source: KNativePointer, program: KNativePointer, flags: KInt): KNativePointer { + throw new Error("Not implemented"); } _InsertETSImportDeclarationAndParse(context: KNativePointer, program: KNativePointer, importDeclaration: KNativePointer): void { throw new Error("Not implemented"); diff --git a/koala-wrapper/src/arkts-api/node-utilities/AnnotationDeclaration.ts b/koala-wrapper/src/arkts-api/node-utilities/AnnotationDeclaration.ts index 345d95f21..8e5c14034 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/AnnotationDeclaration.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/AnnotationDeclaration.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/AnnotationUsage.ts b/koala-wrapper/src/arkts-api/node-utilities/AnnotationUsage.ts index 82b28fec3..d0ae27d7b 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/AnnotationUsage.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/AnnotationUsage.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ArrayExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/ArrayExpression.ts index 320b0d678..277e01d5a 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ArrayExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ArrayExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ArrowFunctionExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/ArrowFunctionExpression.ts index 9ad9e11af..afcc50a2a 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ArrowFunctionExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ArrowFunctionExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/AssignmentExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/AssignmentExpression.ts index de701b0ad..e6bac3a1f 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/AssignmentExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/AssignmentExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/BinaryExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/BinaryExpression.ts index 25a182b16..98867e136 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/BinaryExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/BinaryExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/BlockExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/BlockExpression.ts index e1489fb2e..b1b84f415 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/BlockExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/BlockExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/BlockStatement.ts b/koala-wrapper/src/arkts-api/node-utilities/BlockStatement.ts index d9571384f..36a42a312 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/BlockStatement.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/BlockStatement.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/CallExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/CallExpression.ts index d1489441a..f562fca6e 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/CallExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/CallExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ChainExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/ChainExpression.ts index fdadb8843..fd3a1cf66 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ChainExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ChainExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,7 +18,7 @@ import { isSameNativeObject } from '../peers/ArktsObject'; import { attachModifiers, updateThenAttach } from '../utilities/private'; export function updateChainExpression(original: ChainExpression, expression?: Expression): ChainExpression { - if (isSameNativeObject(expression, original.getExpression)) { + if (isSameNativeObject(expression, original.expression)) { return original; } diff --git a/koala-wrapper/src/arkts-api/node-utilities/ClassDeclaration.ts b/koala-wrapper/src/arkts-api/node-utilities/ClassDeclaration.ts index 1474e8d84..b9f238655 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ClassDeclaration.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ClassDeclaration.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ClassDefinition.ts b/koala-wrapper/src/arkts-api/node-utilities/ClassDefinition.ts index 1e9ae0ffb..6d962430c 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ClassDefinition.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ClassDefinition.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ClassProperty.ts b/koala-wrapper/src/arkts-api/node-utilities/ClassProperty.ts index 06450c0cb..6d7c38c75 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ClassProperty.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ClassProperty.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ConditionalExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/ConditionalExpression.ts index e1d2d5b2f..b26bcfa2e 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ConditionalExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ConditionalExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ETSFunctionType.ts b/koala-wrapper/src/arkts-api/node-utilities/ETSFunctionType.ts index a0e522040..fa309f704 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ETSFunctionType.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ETSFunctionType.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ETSImportDeclaration.ts b/koala-wrapper/src/arkts-api/node-utilities/ETSImportDeclaration.ts index 1186fe3d4..9609918ba 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ETSImportDeclaration.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ETSImportDeclaration.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ETSNewClassInstanceExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/ETSNewClassInstanceExpression.ts index 512085cb0..493ab5b9d 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ETSNewClassInstanceExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ETSNewClassInstanceExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ETSParameterExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/ETSParameterExpression.ts index b9e8f0514..01d87f0ca 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ETSParameterExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ETSParameterExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ETSPrimitiveType.ts b/koala-wrapper/src/arkts-api/node-utilities/ETSPrimitiveType.ts index 0cba48bd8..71f261156 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ETSPrimitiveType.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ETSPrimitiveType.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ETSTypeReference.ts b/koala-wrapper/src/arkts-api/node-utilities/ETSTypeReference.ts index 005d510bf..4038206dd 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ETSTypeReference.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ETSTypeReference.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ETSTypeReferencePart.ts b/koala-wrapper/src/arkts-api/node-utilities/ETSTypeReferencePart.ts index fcc821203..63ff72994 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ETSTypeReferencePart.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ETSTypeReferencePart.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ETSUndefinedType.ts b/koala-wrapper/src/arkts-api/node-utilities/ETSUndefinedType.ts index f88a53794..9eaa49a0d 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ETSUndefinedType.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ETSUndefinedType.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ETSUnionType.ts b/koala-wrapper/src/arkts-api/node-utilities/ETSUnionType.ts index c8dc20720..bb9432ecf 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ETSUnionType.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ETSUnionType.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ExpressionStatement.ts b/koala-wrapper/src/arkts-api/node-utilities/ExpressionStatement.ts index 4950ba1ff..9ce5b854c 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ExpressionStatement.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ExpressionStatement.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/FunctionDeclaration.ts b/koala-wrapper/src/arkts-api/node-utilities/FunctionDeclaration.ts index 7a579c288..bdffd85eb 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/FunctionDeclaration.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/FunctionDeclaration.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/FunctionExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/FunctionExpression.ts index ba2135801..d29afe649 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/FunctionExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/FunctionExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/Identifier.ts b/koala-wrapper/src/arkts-api/node-utilities/Identifier.ts index f31d25fc6..743e780ea 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/Identifier.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/Identifier.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/IfStatement.ts b/koala-wrapper/src/arkts-api/node-utilities/IfStatement.ts index 2e3e9275c..f5803b3d0 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/IfStatement.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/IfStatement.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ImportSpecifier.ts b/koala-wrapper/src/arkts-api/node-utilities/ImportSpecifier.ts index d09684550..3bc36c12a 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ImportSpecifier.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ImportSpecifier.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/MemberExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/MemberExpression.ts index 960dacfaf..8eb05cdd7 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/MemberExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/MemberExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/MethodDefinition.ts b/koala-wrapper/src/arkts-api/node-utilities/MethodDefinition.ts index 42006a300..642d0706c 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/MethodDefinition.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/MethodDefinition.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/NullLiteral.ts b/koala-wrapper/src/arkts-api/node-utilities/NullLiteral.ts index 9ab1bb363..43206a8fa 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/NullLiteral.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/NullLiteral.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/NumberLiteral.ts b/koala-wrapper/src/arkts-api/node-utilities/NumberLiteral.ts index 1dfab1450..333510c10 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/NumberLiteral.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/NumberLiteral.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ReturnStatement.ts b/koala-wrapper/src/arkts-api/node-utilities/ReturnStatement.ts index 9fc05a371..31def91f1 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ReturnStatement.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ReturnStatement.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ScriptFunction.ts b/koala-wrapper/src/arkts-api/node-utilities/ScriptFunction.ts index 745a5398c..39f4ca44d 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ScriptFunction.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ScriptFunction.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/StringLiteral.ts b/koala-wrapper/src/arkts-api/node-utilities/StringLiteral.ts index 53f330d42..0ec09b914 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/StringLiteral.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/StringLiteral.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/StructDeclaration.ts b/koala-wrapper/src/arkts-api/node-utilities/StructDeclaration.ts index ee57547d2..d335cdc2a 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/StructDeclaration.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/StructDeclaration.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/SuperExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/SuperExpression.ts index d1bee071b..16d384164 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/SuperExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/SuperExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/TSAsExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/TSAsExpression.ts index f82b8afc1..691b8eda0 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/TSAsExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/TSAsExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/TSInterfaceBody.ts b/koala-wrapper/src/arkts-api/node-utilities/TSInterfaceBody.ts index a1a6350f7..17fe51560 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/TSInterfaceBody.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/TSInterfaceBody.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts b/koala-wrapper/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts index 1d607b245..519cbcd15 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/TSNonNullExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/TSNonNullExpression.ts index d387e39f9..e400e1dbb 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/TSNonNullExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/TSNonNullExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/TSTypeAliasDeclaration.ts b/koala-wrapper/src/arkts-api/node-utilities/TSTypeAliasDeclaration.ts index 3531ee3a9..992f7a497 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/TSTypeAliasDeclaration.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/TSTypeAliasDeclaration.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/TSTypeParameter.ts b/koala-wrapper/src/arkts-api/node-utilities/TSTypeParameter.ts index 9a5ac75d5..4501dd8c0 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/TSTypeParameter.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/TSTypeParameter.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/TSTypeParameterDeclaration.ts b/koala-wrapper/src/arkts-api/node-utilities/TSTypeParameterDeclaration.ts index 3f1395049..fc4c0d576 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/TSTypeParameterDeclaration.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/TSTypeParameterDeclaration.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/TSTypeParameterInstantiation.ts b/koala-wrapper/src/arkts-api/node-utilities/TSTypeParameterInstantiation.ts index 49d8746e4..7788c3a9b 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/TSTypeParameterInstantiation.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/TSTypeParameterInstantiation.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/TemplateLiteral.ts b/koala-wrapper/src/arkts-api/node-utilities/TemplateLiteral.ts index 840c0d120..abed836a7 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/TemplateLiteral.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/TemplateLiteral.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/ThisExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/ThisExpression.ts index f2f04c716..c30124af0 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ThisExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ThisExpression.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/TryStatement.ts b/koala-wrapper/src/arkts-api/node-utilities/TryStatement.ts index 32512066c..aa8f3b995 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/TryStatement.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/TryStatement.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/UndefinedLiteral.ts b/koala-wrapper/src/arkts-api/node-utilities/UndefinedLiteral.ts index aaedc726c..c6aaba920 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/UndefinedLiteral.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/UndefinedLiteral.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/VariableDeclaration.ts b/koala-wrapper/src/arkts-api/node-utilities/VariableDeclaration.ts index 0bd18e52d..3bec0cecb 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/VariableDeclaration.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/VariableDeclaration.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/arkts-api/node-utilities/VariableDeclarator.ts b/koala-wrapper/src/arkts-api/node-utilities/VariableDeclarator.ts index 52c002fd3..26abf2928 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/VariableDeclarator.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/VariableDeclarator.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/checkSdk.ts b/koala-wrapper/src/checkSdk.ts new file mode 100644 index 000000000..2d6a546a1 --- /dev/null +++ b/koala-wrapper/src/checkSdk.ts @@ -0,0 +1,25 @@ +import * as fs from "fs" +import * as path from "path" + +function reportErrorAndExit(message: string): never { + console.error(message) + process.exit(1) +} + +export function checkSDK() { + const panda = process.env.PANDA_SDK_PATH + if (!panda) + reportErrorAndExit(`Variable PANDA_SDK_PATH is not set, please fix`) + if (!fs.existsSync(path.join(panda, 'package.json'))) + reportErrorAndExit(`Variable PANDA_SDK_PATH not points to SDK`) + const packageJson = JSON.parse(fs.readFileSync(path.join(panda, 'package.json')).toString()) + const version = packageJson.version as string + if (!version) + reportErrorAndExit(`version is unknown`) + const packageJsonOur = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json')).toString()) + const expectedVersion = packageJsonOur.config.panda_sdk_version + if (expectedVersion && expectedVersion != "next" && version != expectedVersion) + console.log(`WARNING: Panda SDK version "${version}" doesn't match expected "${expectedVersion}"`) + else + console.log(`Using Panda ${version}`) +} diff --git a/koala-wrapper/src/generated/Es2pandaNativeModule.ts b/koala-wrapper/src/generated/Es2pandaNativeModule.ts index 9f58edd36..bb1a2b7ca 100644 --- a/koala-wrapper/src/generated/Es2pandaNativeModule.ts +++ b/koala-wrapper/src/generated/Es2pandaNativeModule.ts @@ -28,3673 +28,4624 @@ import { export type KNativePointerArray = BigUint64Array export class Es2pandaNativeModule { + _CreateNumberLiteral(context: KNativePointer, value: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateNumberLiteral1(context: KNativePointer, value: KLong): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateNumberLiteral2(context: KNativePointer, value: KDouble): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateNumberLiteral3(context: KNativePointer, value: KFloat): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateNumberLiteral(context: KNativePointer, original: KNativePointer, value: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateNumberLiteral1(context: KNativePointer, original: KNativePointer, value: KLong): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateNumberLiteral2(context: KNativePointer, original: KNativePointer, value: KDouble): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateNumberLiteral3(context: KNativePointer, original: KNativePointer, value: KFloat): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _NumberLiteralStrConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } _CreateLabelledStatement(context: KNativePointer, ident: KNativePointer, body: KNativePointer): KNativePointer { - throw new Error("'CreateLabelledStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateLabelledStatement(context: KNativePointer, original: KNativePointer, ident: KNativePointer, body: KNativePointer): KNativePointer { - throw new Error("'UpdateLabelledStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _LabelledStatementBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _LabelledStatementBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'LabelledStatementBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _LabelledStatementIdentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'LabelledStatementIdentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _LabelledStatementIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'LabelledStatementIdent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _LabelledStatementGetReferencedStatementConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'LabelledStatementGetReferencedStatementConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateThrowStatement(context: KNativePointer, argument: KNativePointer): KNativePointer { - throw new Error("'CreateThrowStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateThrowStatement(context: KNativePointer, original: KNativePointer, argument: KNativePointer): KNativePointer { - throw new Error("'UpdateThrowStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ThrowStatementArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ThrowStatementArgumentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateClassProperty(context: KNativePointer, key: KNativePointer, value: KNativePointer, typeAnnotation: KNativePointer, modifiers: KInt, isComputed: KBoolean): KNativePointer { - throw new Error("'CreateClassProperty was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateClassProperty(context: KNativePointer, original: KNativePointer, key: KNativePointer, value: KNativePointer, typeAnnotation: KNativePointer, modifiers: KInt, isComputed: KBoolean): KNativePointer { - throw new Error("'UpdateClassProperty was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyIsDefaultAccessModifierConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertySetDefaultAccessModifier(context: KNativePointer, receiver: KNativePointer, isDefault: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") } _ClassPropertyTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassPropertyTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassPropertySetTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { - throw new Error("'ClassPropertySetTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyNeedInitInStaticBlockConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertySetInitInStaticBlock(context: KNativePointer, receiver: KNativePointer, needInitInStaticBlock: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertySetValueAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ClassPropertyAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassPropertyAnnotations was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassPropertyAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassPropertyAnnotationsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertySetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertySetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _ClassPropertySetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'ClassPropertySetAnnotations was not overloaded by native module initialization") + _ClassPropertyAddAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSVoidKeyword(context: KNativePointer): KNativePointer { - throw new Error("'CreateTSVoidKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSVoidKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTSVoidKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSFunctionType(context: KNativePointer, signature: KNativePointer, funcFlags: KInt): KNativePointer { - throw new Error("'CreateETSFunctionTypeIr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSFunctionType(context: KNativePointer, original: KNativePointer, signature: KNativePointer, funcFlags: KInt): KNativePointer { - throw new Error("'UpdateETSFunctionTypeIr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSFunctionTypeTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSFunctionTypeIrTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSFunctionTypeTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSFunctionTypeIrTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSFunctionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSFunctionTypeIrParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSFunctionTypeReturnTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSFunctionTypeIrReturnTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSFunctionTypeReturnType(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSFunctionTypeIrReturnType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeFunctionalInterface(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ETSFunctionTypeFunctionalInterfaceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSFunctionTypeIrFunctionalInterface was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSFunctionTypeSetFunctionalInterface(context: KNativePointer, receiver: KNativePointer, functionalInterface: KNativePointer): void { - throw new Error("'ETSFunctionTypeIrSetFunctionalInterface was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSFunctionTypeFlags(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'ETSFunctionTypeIrFlags was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeFlagsConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") } _ETSFunctionTypeIsThrowingConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ETSFunctionTypeIrIsThrowingConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSFunctionTypeIsRethrowingConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ETSFunctionTypeIrIsRethrowingConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSFunctionTypeIsExtensionFunctionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ETSFunctionTypeIrIsExtensionFunctionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTypeOperator(context: KNativePointer, type: KNativePointer, operatorType: KInt): KNativePointer { - throw new Error("'CreateTSTypeOperator was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTypeOperator(context: KNativePointer, original: KNativePointer, type: KNativePointer, operatorType: KInt): KNativePointer { - throw new Error("'UpdateTSTypeOperator was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeOperatorTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeOperatorTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeOperatorIsReadonlyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSTypeOperatorIsReadonlyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeOperatorIsKeyofConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSTypeOperatorIsKeyofConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeOperatorIsUniqueConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSTypeOperatorIsUniqueConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateIfStatement(context: KNativePointer, test: KNativePointer, consequent: KNativePointer, alternate: KNativePointer): KNativePointer { - throw new Error("'CreateIfStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateIfStatement(context: KNativePointer, original: KNativePointer, test: KNativePointer, consequent: KNativePointer, alternate: KNativePointer): KNativePointer { - throw new Error("'UpdateIfStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IfStatementTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'IfStatementTestConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IfStatementTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'IfStatementTest was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _IfStatementSetTest(context: KNativePointer, receiver: KNativePointer, test: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _IfStatementConsequentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'IfStatementConsequentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IfStatementConsequent(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'IfStatementConsequent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IfStatementAlternate(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'IfStatementAlternate was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IfStatementAlternateConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'IfStatementAlternateConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _IfStatementSetAlternate(context: KNativePointer, receiver: KNativePointer, alternate: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSConstructorType(context: KNativePointer, signature: KNativePointer, abstract: KBoolean): KNativePointer { - throw new Error("'CreateTSConstructorType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSConstructorType(context: KNativePointer, original: KNativePointer, signature: KNativePointer, abstract: KBoolean): KNativePointer { - throw new Error("'UpdateTSConstructorType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSConstructorTypeTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSConstructorTypeTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSConstructorTypeTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSConstructorTypeTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSConstructorTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSConstructorTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSConstructorTypeReturnTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSConstructorTypeReturnTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSConstructorTypeReturnType(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSConstructorTypeReturnType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSConstructorTypeAbstractConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSConstructorTypeAbstractConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateDecorator(context: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'CreateDecorator was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateDecorator(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'UpdateDecorator was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _DecoratorExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'DecoratorExprConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSEnumDeclaration(context: KNativePointer, key: KNativePointer, members: BigUint64Array, membersSequenceLength: KUInt, isConst: KBoolean, isStatic: KBoolean, isDeclare: KBoolean): KNativePointer { - throw new Error("'CreateTSEnumDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSEnumDeclaration(context: KNativePointer, original: KNativePointer, key: KNativePointer, members: BigUint64Array, membersSequenceLength: KUInt, isConst: KBoolean, isStatic: KBoolean, isDeclare: KBoolean): KNativePointer { - throw new Error("'UpdateTSEnumDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumDeclarationKeyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSEnumDeclarationKeyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumDeclarationKey(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSEnumDeclarationKey was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumDeclarationMembersConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSEnumDeclarationMembersConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumDeclarationInternalNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'TSEnumDeclarationInternalNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumDeclarationSetInternalName(context: KNativePointer, receiver: KNativePointer, internalName: KStringPtr): void { - throw new Error("'TSEnumDeclarationSetInternalName was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumDeclarationBoxedClassConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSEnumDeclarationBoxedClassConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } - _TSEnumDeclarationSetBoxedClass(context: KNativePointer, receiver: KNativePointer, wrapperClass: KNativePointer): void { - throw new Error("'TSEnumDeclarationSetBoxedClass was not overloaded by native module initialization") + _TSEnumDeclarationSetBoxedClass(context: KNativePointer, receiver: KNativePointer, boxedClass: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumDeclarationIsConstConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSEnumDeclarationIsConstConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumDeclarationDecoratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSEnumDeclarationDecoratorsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationEmplaceDecorators(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationClearDecorators(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationSetValueDecorators(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationDecoratorsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationEmplaceMembers(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationClearMembers(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationSetValueMembers(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationMembersForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSNeverKeyword(context: KNativePointer): KNativePointer { - throw new Error("'CreateTSNeverKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSNeverKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTSNeverKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateImportDefaultSpecifier(context: KNativePointer, local: KNativePointer): KNativePointer { - throw new Error("'CreateImportDefaultSpecifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateImportDefaultSpecifier(context: KNativePointer, original: KNativePointer, local: KNativePointer): KNativePointer { - throw new Error("'UpdateImportDefaultSpecifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportDefaultSpecifierLocalConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportDefaultSpecifierLocalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportDefaultSpecifierLocal(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportDefaultSpecifierLocal was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateObjectExpression(context: KNativePointer, nodeType: KInt, properties: BigUint64Array, propertiesSequenceLength: KUInt, trailingComma: KBoolean): KNativePointer { - throw new Error("'CreateObjectExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateObjectExpression(context: KNativePointer, original: KNativePointer, nodeType: KInt, properties: BigUint64Array, propertiesSequenceLength: KUInt, trailingComma: KBoolean): KNativePointer { - throw new Error("'UpdateObjectExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ObjectExpressionPropertiesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ObjectExpressionPropertiesConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ObjectExpressionIsDeclarationConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ObjectExpressionIsDeclarationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ObjectExpressionIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ObjectExpressionIsOptionalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ObjectExpressionDecoratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ObjectExpressionDecoratorsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ObjectExpressionValidateExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ObjectExpressionValidateExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ObjectExpressionConvertibleToObjectPattern(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ObjectExpressionConvertibleToObjectPattern was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ObjectExpressionSetDeclaration(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'ObjectExpressionSetDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ObjectExpressionSetOptional(context: KNativePointer, receiver: KNativePointer, optional_arg: KBoolean): void { - throw new Error("'ObjectExpressionSetOptional was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ObjectExpressionTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ObjectExpressionTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ObjectExpressionSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { - throw new Error("'ObjectExpressionSetTsTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateImportSpecifier(context: KNativePointer, imported: KNativePointer, local: KNativePointer): KNativePointer { - throw new Error("'CreateImportSpecifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateImportSpecifier(context: KNativePointer, original: KNativePointer, imported: KNativePointer, local: KNativePointer): KNativePointer { - throw new Error("'UpdateImportSpecifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportSpecifierImported(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportSpecifierImported was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportSpecifierImportedConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportSpecifierImportedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportSpecifierLocal(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportSpecifierLocal was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportSpecifierLocalConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportSpecifierLocalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportSpecifierIsRemovableConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportSpecifierSetRemovable(context: KNativePointer, receiver: KNativePointer, isRemovable: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateConditionalExpression(context: KNativePointer, test: KNativePointer, consequent: KNativePointer, alternate: KNativePointer): KNativePointer { - throw new Error("'CreateConditionalExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateConditionalExpression(context: KNativePointer, original: KNativePointer, test: KNativePointer, consequent: KNativePointer, alternate: KNativePointer): KNativePointer { - throw new Error("'UpdateConditionalExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ConditionalExpressionTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ConditionalExpressionTestConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ConditionalExpressionTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ConditionalExpressionTest was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ConditionalExpressionSetTest(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'ConditionalExpressionSetTest was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ConditionalExpressionConsequentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ConditionalExpressionConsequentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ConditionalExpressionConsequent(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ConditionalExpressionConsequent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ConditionalExpressionSetConsequent(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'ConditionalExpressionSetConsequent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ConditionalExpressionAlternateConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ConditionalExpressionAlternateConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ConditionalExpressionAlternate(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ConditionalExpressionAlternate was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ConditionalExpressionSetAlternate(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'ConditionalExpressionSetAlternate was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateCallExpression(context: KNativePointer, callee: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt, typeParams: KNativePointer, optional_arg: KBoolean, trailingComma: KBoolean): KNativePointer { - throw new Error("'CreateCallExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateCallExpression1(context: KNativePointer, other: KNativePointer): KNativePointer { - throw new Error("'CreateCallExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateCallExpression1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { - throw new Error("'UpdateCallExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionCalleeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'CallExpressionCalleeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionCallee(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'CallExpressionCallee was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionSetCallee(context: KNativePointer, receiver: KNativePointer, callee: KNativePointer): void { - throw new Error("'CallExpressionSetCallee was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'CallExpressionTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'CallExpressionTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionArgumentsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'CallExpressionArgumentsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionArguments(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'CallExpressionArguments was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionHasTrailingCommaConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'CallExpressionHasTrailingCommaConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionSetTypeParams(context: KNativePointer, receiver: KNativePointer, typeParams: KNativePointer): void { - throw new Error("'CallExpressionSetTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionSetTrailingBlock(context: KNativePointer, receiver: KNativePointer, block: KNativePointer): void { - throw new Error("'CallExpressionSetTrailingBlock was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionIsExtensionAccessorCall(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'CallExpressionIsExtensionAccessorCall was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionTrailingBlockConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'CallExpressionTrailingBlockConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionSetIsTrailingBlockInNewLine(context: KNativePointer, receiver: KNativePointer, isNewLine: KBoolean): void { - throw new Error("'CallExpressionSetIsTrailingBlockInNewLine was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionIsTrailingBlockInNewLineConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'CallExpressionIsTrailingBlockInNewLineConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionSetIsTrailingCall(context: KNativePointer, receiver: KNativePointer, isTrailingCall: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionIsTrailingCallConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } _CallExpressionIsETSConstructorCallConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'CallExpressionIsETSConstructorCallConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateBigIntLiteral(context: KNativePointer, src: KStringPtr): KNativePointer { - throw new Error("'CreateBigIntLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateBigIntLiteral(context: KNativePointer, original: KNativePointer, src: KStringPtr): KNativePointer { - throw new Error("'UpdateBigIntLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BigIntLiteralStrConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'BigIntLiteralStrConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassElementId(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassElementId was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassElementIdConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassElementIdConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassElementKey(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassElementKey was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassElementKeyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassElementKeyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassElementValue(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassElementValue was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassElementSetValue(context: KNativePointer, receiver: KNativePointer, value: KNativePointer): void { - throw new Error("'ClassElementSetValue was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassElementValueConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassElementValueConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementOriginEnumMemberConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementSetOrigEnumMember(context: KNativePointer, receiver: KNativePointer, enumMember: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _ClassElementIsPrivateElementConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassElementIsPrivateElementConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassElementDecoratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassElementDecoratorsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassElementIsComputedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassElementIsComputedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassElementAddDecorator(context: KNativePointer, receiver: KNativePointer, decorator: KNativePointer): void { - throw new Error("'ClassElementAddDecorator was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassElementToPrivateFieldKindConst(context: KNativePointer, receiver: KNativePointer, isStatic: KBoolean): KInt { - throw new Error("'ClassElementToPrivateFieldKindConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementEmplaceDecorators(context: KNativePointer, receiver: KNativePointer, decorators: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementClearDecorators(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementSetValueDecorators(context: KNativePointer, receiver: KNativePointer, decorators: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementDecorators(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementDecoratorsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSImportType(context: KNativePointer, param: KNativePointer, typeParams: KNativePointer, qualifier: KNativePointer, isTypeof: KBoolean): KNativePointer { - throw new Error("'CreateTSImportType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSImportType(context: KNativePointer, original: KNativePointer, param: KNativePointer, typeParams: KNativePointer, qualifier: KNativePointer, isTypeof: KBoolean): KNativePointer { - throw new Error("'UpdateTSImportType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSImportTypeParamConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSImportTypeParamConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSImportTypeTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSImportTypeTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSImportTypeQualifierConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSImportTypeQualifierConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSImportTypeIsTypeofConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSImportTypeIsTypeofConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTaggedTemplateExpression(context: KNativePointer, tag: KNativePointer, quasi: KNativePointer, typeParams: KNativePointer): KNativePointer { - throw new Error("'CreateTaggedTemplateExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTaggedTemplateExpression(context: KNativePointer, original: KNativePointer, tag: KNativePointer, quasi: KNativePointer, typeParams: KNativePointer): KNativePointer { - throw new Error("'UpdateTaggedTemplateExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TaggedTemplateExpressionTagConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TaggedTemplateExpressionTagConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TaggedTemplateExpressionQuasiConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TaggedTemplateExpressionQuasiConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TaggedTemplateExpressionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TaggedTemplateExpressionTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateFunctionDeclaration(context: KNativePointer, func: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt, isAnonymous: KBoolean): KNativePointer { - throw new Error("'CreateFunctionDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateFunctionDeclaration(context: KNativePointer, original: KNativePointer, func: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt, isAnonymous: KBoolean): KNativePointer { - throw new Error("'UpdateFunctionDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateFunctionDeclaration1(context: KNativePointer, func: KNativePointer, isAnonymous: KBoolean): KNativePointer { - throw new Error("'CreateFunctionDeclaration1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateFunctionDeclaration1(context: KNativePointer, original: KNativePointer, func: KNativePointer, isAnonymous: KBoolean): KNativePointer { - throw new Error("'UpdateFunctionDeclaration1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionDeclarationFunction(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionDeclarationFunction was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionDeclarationIsAnonymousConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'FunctionDeclarationIsAnonymousConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionDeclarationFunctionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionDeclarationFunctionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } - _FunctionDeclarationAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionDeclarationAnnotations was not overloaded by native module initialization") + _FunctionDeclarationDecoratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } - _FunctionDeclarationAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionDeclarationAnnotationsConst was not overloaded by native module initialization") + _FunctionDeclarationEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } - _FunctionDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'FunctionDeclarationSetAnnotations was not overloaded by native module initialization") + _FunctionDeclarationClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } - _CreateETSTypeReference(context: KNativePointer, part: KNativePointer): KNativePointer { - throw new Error("'CreateETSTypeReference was not overloaded by native module initialization") + _FunctionDeclarationSetValueAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _UpdateETSTypeReference(context: KNativePointer, original: KNativePointer, part: KNativePointer): KNativePointer { - throw new Error("'UpdateETSTypeReference was not overloaded by native module initialization") + _FunctionDeclarationAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } - _ETSTypeReferencePart(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSTypeReferencePart was not overloaded by native module initialization") + _FunctionDeclarationAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } - _ETSTypeReferencePartConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSTypeReferencePartConst was not overloaded by native module initialization") + _FunctionDeclarationAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } - _ETSTypeReferenceBaseNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSTypeReferenceBaseNameConst was not overloaded by native module initialization") + _FunctionDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationAddAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSTypeReference(context: KNativePointer, part: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSTypeReference(context: KNativePointer, original: KNativePointer, part: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePart(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePartConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferenceBaseNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTypeReference(context: KNativePointer, typeName: KNativePointer, typeParams: KNativePointer): KNativePointer { - throw new Error("'CreateTSTypeReference was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTypeReference(context: KNativePointer, original: KNativePointer, typeName: KNativePointer, typeParams: KNativePointer): KNativePointer { - throw new Error("'UpdateTSTypeReference was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeReferenceTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeReferenceTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeReferenceTypeNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeReferenceTypeNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeReferenceBaseNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeReferenceBaseNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateImportSource(context: KNativePointer, source: KNativePointer, resolvedSource: KNativePointer, hasDecl: KBoolean): KNativePointer { - throw new Error("'CreateImportSource was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportSourceSourceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportSourceSourceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportSourceSource(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportSourceSource was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportSourceResolvedSourceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportSourceResolvedSourceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportSourceResolvedSource(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportSourceResolvedSource was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportSourceHasDeclConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ImportSourceHasDeclConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateNamedType(context: KNativePointer, name: KNativePointer): KNativePointer { - throw new Error("'CreateNamedType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateNamedType(context: KNativePointer, original: KNativePointer, name: KNativePointer): KNativePointer { - throw new Error("'UpdateNamedType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _NamedTypeNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'NamedTypeNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _NamedTypeTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'NamedTypeTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _NamedTypeIsNullableConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'NamedTypeIsNullableConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _NamedTypeSetNullable(context: KNativePointer, receiver: KNativePointer, nullable: KBoolean): void { - throw new Error("'NamedTypeSetNullable was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _NamedTypeSetNext(context: KNativePointer, receiver: KNativePointer, next: KNativePointer): void { - throw new Error("'NamedTypeSetNext was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _NamedTypeSetTypeParams(context: KNativePointer, receiver: KNativePointer, typeParams: KNativePointer): void { - throw new Error("'NamedTypeSetTypeParams was not overloaded by native module initialization") - } - _NumberLiteralStrConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'NumberLiteralStrConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSFunctionType(context: KNativePointer, signature: KNativePointer): KNativePointer { - throw new Error("'CreateTSFunctionType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSFunctionType(context: KNativePointer, original: KNativePointer, signature: KNativePointer): KNativePointer { - throw new Error("'UpdateTSFunctionType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSFunctionTypeTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSFunctionTypeTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSFunctionTypeTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSFunctionTypeTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSFunctionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSFunctionTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSFunctionTypeReturnTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSFunctionTypeReturnTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSFunctionTypeReturnType(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSFunctionTypeReturnType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSFunctionTypeSetNullable(context: KNativePointer, receiver: KNativePointer, nullable: KBoolean): void { - throw new Error("'TSFunctionTypeSetNullable was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTemplateElement(context: KNativePointer): KNativePointer { - throw new Error("'CreateTemplateElement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTemplateElement(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTemplateElement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTemplateElement1(context: KNativePointer, raw: KStringPtr, cooked: KStringPtr): KNativePointer { - throw new Error("'CreateTemplateElement1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTemplateElement1(context: KNativePointer, original: KNativePointer, raw: KStringPtr, cooked: KStringPtr): KNativePointer { - throw new Error("'UpdateTemplateElement1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TemplateElementRawConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'TemplateElementRawConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TemplateElementCookedConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'TemplateElementCookedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSInterfaceDeclaration(context: KNativePointer, _extends: BigUint64Array, _extendsSequenceLength: KUInt, id: KNativePointer, typeParams: KNativePointer, body: KNativePointer, isStatic: KBoolean, isExternal: KBoolean): KNativePointer { - throw new Error("'CreateTSInterfaceDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSInterfaceDeclaration(context: KNativePointer, original: KNativePointer, _extends: BigUint64Array, _extendsSequenceLength: KUInt, id: KNativePointer, typeParams: KNativePointer, body: KNativePointer, isStatic: KBoolean, isExternal: KBoolean): KNativePointer { - throw new Error("'UpdateTSInterfaceDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationId(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationId was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationIdConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationIdConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationInternalNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'TSInterfaceDeclarationInternalNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationSetInternalName(context: KNativePointer, receiver: KNativePointer, internalName: KStringPtr): void { - throw new Error("'TSInterfaceDeclarationSetInternalName was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationIsStaticConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSInterfaceDeclarationIsStaticConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationIsFromExternalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSInterfaceDeclarationIsFromExternalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationExtends(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationExtends was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationExtendsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationExtendsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationExtendsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationDecoratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationDecoratorsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationGetAnonClass(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationGetAnonClass was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationGetAnonClassConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationGetAnonClassConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationSetAnonClass(context: KNativePointer, receiver: KNativePointer, anonClass: KNativePointer): void { - throw new Error("'TSInterfaceDeclarationSetAnonClass was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationEmplaceExtends(context: KNativePointer, receiver: KNativePointer, _extends: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationClearExtends(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationSetValueExtends(context: KNativePointer, receiver: KNativePointer, _extends: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationEmplaceDecorators(context: KNativePointer, receiver: KNativePointer, decorators: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationClearDecorators(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationSetValueDecorators(context: KNativePointer, receiver: KNativePointer, decorators: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationDecorators(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationDecoratorsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationSetValueAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationAnnotations was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceDeclarationAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceDeclarationAnnotationsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _TSInterfaceDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'TSInterfaceDeclarationSetAnnotations was not overloaded by native module initialization") + _TSInterfaceDeclarationAddAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateVariableDeclaration(context: KNativePointer, kind: KInt, declarators: BigUint64Array, declaratorsSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateVariableDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateVariableDeclaration(context: KNativePointer, original: KNativePointer, kind: KInt, declarators: BigUint64Array, declaratorsSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateVariableDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _VariableDeclarationDeclaratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'VariableDeclarationDeclaratorsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationDeclarators(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationDeclaratorsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _VariableDeclarationKindConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'VariableDeclarationKindConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _VariableDeclarationDecoratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'VariableDeclarationDecoratorsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationDecorators(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationDecoratorsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _VariableDeclarationGetDeclaratorByNameConst(context: KNativePointer, receiver: KNativePointer, name: KStringPtr): KNativePointer { - throw new Error("'VariableDeclarationGetDeclaratorByNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationSetValueAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _VariableDeclarationAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'VariableDeclarationAnnotations was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _VariableDeclarationAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'VariableDeclarationAnnotationsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _VariableDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'VariableDeclarationSetAnnotations was not overloaded by native module initialization") + _VariableDeclarationSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationAddAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateUndefinedLiteral(context: KNativePointer): KNativePointer { - throw new Error("'CreateUndefinedLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateUndefinedLiteral(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateUndefinedLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateMemberExpression(context: KNativePointer, object_arg: KNativePointer, property: KNativePointer, kind: KInt, computed: KBoolean, optional_arg: KBoolean): KNativePointer { - throw new Error("'CreateMemberExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateMemberExpression(context: KNativePointer, original: KNativePointer, object_arg: KNativePointer, property: KNativePointer, kind: KInt, computed: KBoolean, optional_arg: KBoolean): KNativePointer { - throw new Error("'UpdateMemberExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionObject(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'MemberExpressionObject was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionObjectConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'MemberExpressionObjectConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionSetObject(context: KNativePointer, receiver: KNativePointer, object_arg: KNativePointer): void { - throw new Error("'MemberExpressionSetObject was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionSetProperty(context: KNativePointer, receiver: KNativePointer, prop: KNativePointer): void { - throw new Error("'MemberExpressionSetProperty was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionProperty(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'MemberExpressionProperty was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionPropertyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'MemberExpressionPropertyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionIsComputedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'MemberExpressionIsComputedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionKindConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'MemberExpressionKindConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionAddMemberKind(context: KNativePointer, receiver: KNativePointer, kind: KInt): void { - throw new Error("'MemberExpressionAddMemberKind was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionHasMemberKindConst(context: KNativePointer, receiver: KNativePointer, kind: KInt): KBoolean { - throw new Error("'MemberExpressionHasMemberKindConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionRemoveMemberKind(context: KNativePointer, receiver: KNativePointer, kind: KInt): void { - throw new Error("'MemberExpressionRemoveMemberKind was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionExtensionAccessorTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionIsIgnoreBoxConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'MemberExpressionIsIgnoreBoxConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionSetIgnoreBox(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'MemberExpressionSetIgnoreBox was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MemberExpressionIsPrivateReferenceConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'MemberExpressionIsPrivateReferenceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionCompileToRegConst(context: KNativePointer, receiver: KNativePointer, pg: KNativePointer, objReg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionCompileToRegsConst(context: KNativePointer, receiver: KNativePointer, pg: KNativePointer, object_arg: KNativePointer, property: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSClassImplements(context: KNativePointer, expression: KNativePointer, typeParameters: KNativePointer): KNativePointer { - throw new Error("'CreateTSClassImplements was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSClassImplements(context: KNativePointer, original: KNativePointer, expression: KNativePointer, typeParameters: KNativePointer): KNativePointer { - throw new Error("'UpdateTSClassImplements was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSClassImplements1(context: KNativePointer, expression: KNativePointer): KNativePointer { - throw new Error("'CreateTSClassImplements1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSClassImplements1(context: KNativePointer, original: KNativePointer, expression: KNativePointer): KNativePointer { - throw new Error("'UpdateTSClassImplements1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSClassImplementsExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSClassImplementsExpr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSClassImplementsExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSClassImplementsExprConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSClassImplementsTypeParametersConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSClassImplementsTypeParametersConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSObjectKeyword(context: KNativePointer): KNativePointer { - throw new Error("'CreateTSObjectKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSObjectKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTSObjectKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSUnionType(context: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateETSUnionTypeIr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSUnionType(context: KNativePointer, original: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateETSUnionTypeIr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSUnionTypeTypesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSUnionTypeIrTypesConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSUnionTypeSetValueTypesConst(context: KNativePointer, receiver: KNativePointer, type: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSKeyofType(context: KNativePointer, type: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSKeyofType(context: KNativePointer, original: KNativePointer, type: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSKeyofTypeGetTypeRefConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSPropertySignature(context: KNativePointer, key: KNativePointer, typeAnnotation: KNativePointer, computed: KBoolean, optional_arg: KBoolean, readonly_arg: KBoolean): KNativePointer { - throw new Error("'CreateTSPropertySignature was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSPropertySignature(context: KNativePointer, original: KNativePointer, key: KNativePointer, typeAnnotation: KNativePointer, computed: KBoolean, optional_arg: KBoolean, readonly_arg: KBoolean): KNativePointer { - throw new Error("'UpdateTSPropertySignature was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSPropertySignatureKeyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSPropertySignatureKeyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSPropertySignatureKey(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSPropertySignatureKey was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSPropertySignatureComputedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSPropertySignatureComputedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSPropertySignatureOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSPropertySignatureOptionalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSPropertySignatureReadonlyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSPropertySignatureReadonlyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSPropertySignatureTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSPropertySignatureTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSPropertySignatureSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { - throw new Error("'TSPropertySignatureSetTsTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSConditionalType(context: KNativePointer, checkType: KNativePointer, extendsType: KNativePointer, trueType: KNativePointer, falseType: KNativePointer): KNativePointer { - throw new Error("'CreateTSConditionalType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSConditionalType(context: KNativePointer, original: KNativePointer, checkType: KNativePointer, extendsType: KNativePointer, trueType: KNativePointer, falseType: KNativePointer): KNativePointer { - throw new Error("'UpdateTSConditionalType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSConditionalTypeCheckTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSConditionalTypeCheckTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSConditionalTypeExtendsTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSConditionalTypeExtendsTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSConditionalTypeTrueTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSConditionalTypeTrueTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSConditionalTypeFalseTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSConditionalTypeFalseTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSLiteralType(context: KNativePointer, literal: KNativePointer): KNativePointer { - throw new Error("'CreateTSLiteralType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSLiteralType(context: KNativePointer, original: KNativePointer, literal: KNativePointer): KNativePointer { - throw new Error("'UpdateTSLiteralType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSLiteralTypeLiteralConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSLiteralTypeLiteralConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTypeAliasDeclaration(context: KNativePointer, id: KNativePointer, typeParams: KNativePointer, typeAnnotation: KNativePointer): KNativePointer { - throw new Error("'CreateTSTypeAliasDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTypeAliasDeclaration(context: KNativePointer, original: KNativePointer, id: KNativePointer, typeParams: KNativePointer, typeAnnotation: KNativePointer): KNativePointer { - throw new Error("'UpdateTSTypeAliasDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTypeAliasDeclaration1(context: KNativePointer, id: KNativePointer): KNativePointer { - throw new Error("'CreateTSTypeAliasDeclaration1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTypeAliasDeclaration1(context: KNativePointer, original: KNativePointer, id: KNativePointer): KNativePointer { - throw new Error("'UpdateTSTypeAliasDeclaration1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeAliasDeclarationId(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeAliasDeclarationId was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeAliasDeclarationIdConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeAliasDeclarationIdConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeAliasDeclarationTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeAliasDeclarationTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeAliasDeclarationDecoratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeAliasDeclarationDecoratorsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeAliasDeclarationSetTypeParameters(context: KNativePointer, receiver: KNativePointer, typeParams: KNativePointer): void { - throw new Error("'TSTypeAliasDeclarationSetTypeParameters was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeAliasDeclarationAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeAliasDeclarationAnnotationsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeAliasDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'TSTypeAliasDeclarationSetAnnotations was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationSetValueAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationClearTypeParamterTypes(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationEmplaceDecorators(context: KNativePointer, receiver: KNativePointer, decorators: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationClearDecorators(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationSetValueDecorators(context: KNativePointer, receiver: KNativePointer, decorators: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationDecoratorsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeAliasDeclarationTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeAliasDeclarationTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeAliasDeclarationSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { - throw new Error("'TSTypeAliasDeclarationSetTsTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateDebuggerStatement(context: KNativePointer): KNativePointer { - throw new Error("'CreateDebuggerStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateDebuggerStatement(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateDebuggerStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateReturnStatement(context: KNativePointer): KNativePointer { - throw new Error("'CreateReturnStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateReturnStatement(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateReturnStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateReturnStatement1(context: KNativePointer, argument: KNativePointer): KNativePointer { - throw new Error("'CreateReturnStatement1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateReturnStatement1(context: KNativePointer, original: KNativePointer, argument: KNativePointer): KNativePointer { - throw new Error("'UpdateReturnStatement1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ReturnStatementArgument(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ReturnStatementArgument was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ReturnStatementArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ReturnStatementArgumentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ReturnStatementSetArgument(context: KNativePointer, receiver: KNativePointer, arg: KNativePointer): void { - throw new Error("'ReturnStatementSetArgument was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ReturnStatementIsAsyncImplReturnConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } _CreateExportDefaultDeclaration(context: KNativePointer, decl: KNativePointer, exportEquals: KBoolean): KNativePointer { - throw new Error("'CreateExportDefaultDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateExportDefaultDeclaration(context: KNativePointer, original: KNativePointer, decl: KNativePointer, exportEquals: KBoolean): KNativePointer { - throw new Error("'UpdateExportDefaultDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExportDefaultDeclarationDecl(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExportDefaultDeclarationDecl was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExportDefaultDeclarationDeclConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExportDefaultDeclarationDeclConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExportDefaultDeclarationIsExportEqualsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ExportDefaultDeclarationIsExportEqualsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateScriptFunction(context: KNativePointer, databody: KNativePointer, datasignature: KNativePointer, datafuncFlags: KInt, dataflags: KInt): KNativePointer { - throw new Error("'CreateScriptFunction was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateScriptFunction(context: KNativePointer, original: KNativePointer, databody: KNativePointer, datasignature: KNativePointer, datafuncFlags: KInt, dataflags: KInt): KNativePointer { - throw new Error("'UpdateScriptFunction was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIdConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionIdConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionId(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionId was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionReturnStatementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionReturnStatementsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionReturnStatements(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionReturnStatements was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionReturnStatementsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionAddReturnStatement(context: KNativePointer, receiver: KNativePointer, returnStatement: KNativePointer): void { - throw new Error("'ScriptFunctionAddReturnStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionSetBody(context: KNativePointer, receiver: KNativePointer, body: KNativePointer): void { - throw new Error("'ScriptFunctionSetBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionReturnTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionReturnTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionReturnTypeAnnotation(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionReturnTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionSetReturnTypeAnnotation(context: KNativePointer, receiver: KNativePointer, node: KNativePointer): void { - throw new Error("'ScriptFunctionSetReturnTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsEntryPointConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsEntryPointConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsGeneratorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsGeneratorConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsAsyncFuncConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsAsyncFuncConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsAsyncImplFuncConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsAsyncImplFuncConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsArrowConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsArrowConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsOverloadConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsOverloadConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsExternalOverloadConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsExternalOverloadConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsConstructorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsConstructorConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsGetterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsGetterConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsSetterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsSetterConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsExtensionAccessorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsExtensionAccessorConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsMethodConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsProxyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsProxyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsStaticBlockConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsStaticBlockConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsEnumConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsEnumConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsHiddenConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsHiddenConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsExternalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsExternalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsImplicitSuperCallNeededConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsImplicitSuperCallNeededConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionHasBodyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionHasBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionHasRestParameterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionHasRestParameterConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionHasReturnStatementConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionHasReturnStatementConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionHasThrowStatementConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionHasThrowStatementConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsThrowingConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsThrowingConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsRethrowingConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsRethrowingConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsTrailingLambdaConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsDynamicConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsDynamicConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionIsExtensionMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionIsExtensionMethodConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionFlagsConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'ScriptFunctionFlagsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionHasReceiverConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ScriptFunctionHasReceiverConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionSetIdent(context: KNativePointer, receiver: KNativePointer, id: KNativePointer): void { - throw new Error("'ScriptFunctionSetIdent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionAddFlag(context: KNativePointer, receiver: KNativePointer, flags: KInt): void { - throw new Error("'ScriptFunctionAddFlag was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionClearFlag(context: KNativePointer, receiver: KNativePointer, flags: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionFormalParamsLengthConst(context: KNativePointer, receiver: KNativePointer): KUInt { - throw new Error("'ScriptFunctionFormalParamsLengthConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetIsolatedDeclgenReturnType(context: KNativePointer, receiver: KNativePointer, type: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionGetIsolatedDeclgenReturnTypeConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionEmplaceReturnStatements(context: KNativePointer, receiver: KNativePointer, returnStatements: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionClearReturnStatements(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetValueReturnStatements(context: KNativePointer, receiver: KNativePointer, returnStatements: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionEmplaceParams(context: KNativePointer, receiver: KNativePointer, params: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionClearParams(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetValueParams(context: KNativePointer, receiver: KNativePointer, params: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionParamsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetValueAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionAnnotations was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ScriptFunctionAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ScriptFunctionAnnotationsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _ScriptFunctionSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'ScriptFunctionSetAnnotations was not overloaded by native module initialization") + _ScriptFunctionSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionAddAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateClassDefinition(context: KNativePointer, ident: KNativePointer, typeParams: KNativePointer, superTypeParams: KNativePointer, _implements: BigUint64Array, _implementsSequenceLength: KUInt, ctor: KNativePointer, superClass: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt, modifiers: KInt, flags: KInt): KNativePointer { - throw new Error("'CreateClassDefinition was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateClassDefinition(context: KNativePointer, original: KNativePointer, ident: KNativePointer, typeParams: KNativePointer, superTypeParams: KNativePointer, _implements: BigUint64Array, _implementsSequenceLength: KUInt, ctor: KNativePointer, superClass: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt, modifiers: KInt, flags: KInt): KNativePointer { - throw new Error("'UpdateClassDefinition was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateClassDefinition1(context: KNativePointer, ident: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt, modifiers: KInt, flags: KInt): KNativePointer { - throw new Error("'CreateClassDefinition1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateClassDefinition1(context: KNativePointer, original: KNativePointer, ident: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt, modifiers: KInt, flags: KInt): KNativePointer { - throw new Error("'UpdateClassDefinition1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateClassDefinition2(context: KNativePointer, ident: KNativePointer, modifiers: KInt, flags: KInt): KNativePointer { - throw new Error("'CreateClassDefinition2 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateClassDefinition2(context: KNativePointer, original: KNativePointer, ident: KNativePointer, modifiers: KInt, flags: KInt): KNativePointer { - throw new Error("'UpdateClassDefinition2 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionIdentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionIdentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionIdent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionSetIdent(context: KNativePointer, receiver: KNativePointer, ident: KNativePointer): void { - throw new Error("'ClassDefinitionSetIdent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionInternalNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'ClassDefinitionInternalNameConst was not overloaded by native module initialization") - } - _ClassDefinitionSetInternalName(context: KNativePointer, receiver: KNativePointer, internalName: KStringPtr): void { - throw new Error("'ClassDefinitionSetInternalName was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionSuper(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionSuper was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionSuperConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionSuperConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionSetSuper(context: KNativePointer, receiver: KNativePointer, superClass: KNativePointer): void { - throw new Error("'ClassDefinitionSetSuper was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionIsGlobalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassDefinitionIsGlobalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionIsLocalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassDefinitionIsLocalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionIsExternConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassDefinitionIsExternConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionIsFromExternalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassDefinitionIsFromExternalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionIsInnerConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassDefinitionIsInnerConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionIsGlobalInitializedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassDefinitionIsGlobalInitializedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionIsClassDefinitionCheckedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassDefinitionIsClassDefinitionCheckedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionIsAnonymousConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassDefinitionIsAnonymousConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsIntEnumTransformedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsStringEnumTransformedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsEnumTransformedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionIsNamespaceTransformedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassDefinitionIsNamespaceTransformedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsFromStructConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionIsModuleConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassDefinitionIsModuleConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionSetGlobalInitialized(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'ClassDefinitionSetGlobalInitialized was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionSetInnerModifier(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'ClassDefinitionSetInnerModifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionSetClassDefinitionChecked(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'ClassDefinitionSetClassDefinitionChecked was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionSetAnonymousModifier(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'ClassDefinitionSetAnonymousModifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionSetNamespaceTransformed(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'ClassDefinitionSetNamespaceTransformed was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetFromStructModifier(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionModifiersConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'ClassDefinitionModifiersConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionSetModifiers(context: KNativePointer, receiver: KNativePointer, modifiers: KInt): void { - throw new Error("'ClassDefinitionSetModifiers was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionAddProperties(context: KNativePointer, receiver: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt): void { - throw new Error("'ClassDefinitionAddProperties was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionCtor(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionCtor was not overloaded by native module initialization") - } - _ClassDefinitionSetCtor(context: KNativePointer, receiver: KNativePointer, ctor: KNativePointer): void { - throw new Error("'ClassDefinitionSetCtor was not overloaded by native module initialization") - } - _ClassDefinitionImplements(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionImplements was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionImplementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionImplementsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionTypeParams was not overloaded by native module initialization") - } - _ClassDefinitionSetTypeParams(context: KNativePointer, receiver: KNativePointer, typeParams: KNativePointer): void { - throw new Error("'ClassDefinitionSetTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionSuperTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionSuperTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionSuperTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionSuperTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionLocalTypeCounter(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'ClassDefinitionLocalTypeCounter was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionLocalIndexConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'ClassDefinitionLocalIndexConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } - _ClassDefinitionLocalPrefixConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'ClassDefinitionLocalPrefixConst was not overloaded by native module initialization") + _ClassDefinitionFunctionalReferenceReferencedMethodConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } - _ClassDefinitionSetOrigEnumDecl(context: KNativePointer, receiver: KNativePointer, enumDecl: KNativePointer): void { - throw new Error("'ClassDefinitionSetOrigEnumDecl was not overloaded by native module initialization") + _ClassDefinitionSetFunctionalReferenceReferencedMethod(context: KNativePointer, receiver: KNativePointer, functionalReferenceReferencedMethod: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionLocalPrefixConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionOrigEnumDeclConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionOrigEnumDeclConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionGetAnonClass(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionGetAnonClass was not overloaded by native module initialization") - } - _ClassDefinitionSetAnonClass(context: KNativePointer, receiver: KNativePointer, anonClass: KNativePointer): void { - throw new Error("'ClassDefinitionSetAnonClass was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionCtorConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionCtorConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionHasPrivateMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassDefinitionHasPrivateMethodConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionHasNativeMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionHasComputedInstanceFieldConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ClassDefinitionHasComputedInstanceFieldConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionHasMatchingPrivateKeyConst(context: KNativePointer, receiver: KNativePointer, name: KStringPtr): KBoolean { - throw new Error("'ClassDefinitionHasMatchingPrivateKeyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionAddToExportedClasses(context: KNativePointer, receiver: KNativePointer, cls: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionEmplaceBody(context: KNativePointer, receiver: KNativePointer, body: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionClearBody(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetValueBody(context: KNativePointer, receiver: KNativePointer, body: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionBodyForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionEmplaceImplements(context: KNativePointer, receiver: KNativePointer, _implements: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionClearImplements(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetValueImplements(context: KNativePointer, receiver: KNativePointer, _implements: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionImplements(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionImplementsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetCtor(context: KNativePointer, receiver: KNativePointer, ctor: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetTypeParams(context: KNativePointer, receiver: KNativePointer, typeParams: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetOrigEnumDecl(context: KNativePointer, receiver: KNativePointer, origEnumDecl: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetAnonClass(context: KNativePointer, receiver: KNativePointer, anonClass: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetInternalName(context: KNativePointer, receiver: KNativePointer, internalName: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetValueAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionAnnotations was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDefinitionAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDefinitionAnnotationsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _ClassDefinitionSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'ClassDefinitionSetAnnotations was not overloaded by native module initialization") + _ClassDefinitionAddAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateArrayExpression(context: KNativePointer, elements: BigUint64Array, elementsSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateArrayExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateArrayExpression(context: KNativePointer, original: KNativePointer, elements: BigUint64Array, elementsSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateArrayExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateArrayExpression1(context: KNativePointer, nodeType: KInt, elements: BigUint64Array, elementsSequenceLength: KUInt, trailingComma: KBoolean): KNativePointer { - throw new Error("'CreateArrayExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateArrayExpression1(context: KNativePointer, original: KNativePointer, nodeType: KInt, elements: BigUint64Array, elementsSequenceLength: KUInt, trailingComma: KBoolean): KNativePointer { - throw new Error("'UpdateArrayExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionGetElementNodeAtIdxConst(context: KNativePointer, receiver: KNativePointer, idx: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionElementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ArrayExpressionElementsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionElements(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ArrayExpressionElements was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionSetElements(context: KNativePointer, receiver: KNativePointer, elements: BigUint64Array, elementsSequenceLength: KUInt): void { - throw new Error("'ArrayExpressionSetElements was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionIsDeclarationConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ArrayExpressionIsDeclarationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ArrayExpressionIsOptionalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionSetDeclaration(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'ArrayExpressionSetDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionSetOptional(context: KNativePointer, receiver: KNativePointer, optional_arg: KBoolean): void { - throw new Error("'ArrayExpressionSetOptional was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionDecoratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ArrayExpressionDecoratorsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionClearPreferredType(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionConvertibleToArrayPattern(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ArrayExpressionConvertibleToArrayPattern was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionValidateExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ArrayExpressionValidateExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionTrySetPreferredTypeForNestedArrayExprConst(context: KNativePointer, receiver: KNativePointer, nestedArrayExpr: KNativePointer, idx: KUInt): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionHandleNestedArrayExpression(context: KNativePointer, receiver: KNativePointer, currentElement: KNativePointer, isPreferredTuple: KBoolean, idx: KUInt): KBoolean { - throw new Error("'ArrayExpressionHandleNestedArrayExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ArrayExpressionTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrayExpressionSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { - throw new Error("'ArrayExpressionSetTsTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSInterfaceBody(context: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt): KNativePointer { - throw new Error("'CreateTSInterfaceBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSInterfaceBody(context: KNativePointer, original: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateTSInterfaceBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceBodyBodyPtr(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceBodyBodyPtr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceBodyBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceBodyBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceBodyBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceBodyBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTypeQuery(context: KNativePointer, exprName: KNativePointer): KNativePointer { - throw new Error("'CreateTSTypeQuery was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTypeQuery(context: KNativePointer, original: KNativePointer, exprName: KNativePointer): KNativePointer { - throw new Error("'UpdateTSTypeQuery was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeQueryExprNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeQueryExprNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSBigintKeyword(context: KNativePointer): KNativePointer { - throw new Error("'CreateTSBigintKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSBigintKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTSBigintKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateProperty(context: KNativePointer, key: KNativePointer, value: KNativePointer): KNativePointer { - throw new Error("'CreateProperty was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateProperty(context: KNativePointer, original: KNativePointer, key: KNativePointer, value: KNativePointer): KNativePointer { - throw new Error("'UpdateProperty was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateProperty1(context: KNativePointer, kind: KInt, key: KNativePointer, value: KNativePointer, isMethod: KBoolean, isComputed: KBoolean): KNativePointer { - throw new Error("'CreateProperty1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateProperty1(context: KNativePointer, original: KNativePointer, kind: KInt, key: KNativePointer, value: KNativePointer, isMethod: KBoolean, isComputed: KBoolean): KNativePointer { - throw new Error("'UpdateProperty1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PropertyKey(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'PropertyKey was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PropertyKeyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'PropertyKeyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PropertyValueConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'PropertyValueConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PropertyValue(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'PropertyValue was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PropertyKindConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'PropertyKindConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PropertyIsMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'PropertyIsMethodConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PropertyIsShorthandConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'PropertyIsShorthandConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PropertyIsComputedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'PropertyIsComputedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PropertyIsAccessorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'PropertyIsAccessorConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PropertyIsAccessorKind(context: KNativePointer, receiver: KNativePointer, kind: KInt): KBoolean { - throw new Error("'PropertyIsAccessorKind was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PropertyConvertibleToPatternProperty(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'PropertyConvertibleToPatternProperty was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PropertyValidateExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'PropertyValidateExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateVariableDeclarator(context: KNativePointer, flag: KInt, ident: KNativePointer): KNativePointer { - throw new Error("'CreateVariableDeclarator was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateVariableDeclarator(context: KNativePointer, original: KNativePointer, flag: KInt, ident: KNativePointer): KNativePointer { - throw new Error("'UpdateVariableDeclarator was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateVariableDeclarator1(context: KNativePointer, flag: KInt, ident: KNativePointer, init: KNativePointer): KNativePointer { - throw new Error("'CreateVariableDeclarator1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateVariableDeclarator1(context: KNativePointer, original: KNativePointer, flag: KInt, ident: KNativePointer, init: KNativePointer): KNativePointer { - throw new Error("'UpdateVariableDeclarator1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _VariableDeclaratorInit(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'VariableDeclaratorInit was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _VariableDeclaratorInitConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'VariableDeclaratorInitConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _VariableDeclaratorSetInit(context: KNativePointer, receiver: KNativePointer, init: KNativePointer): void { - throw new Error("'VariableDeclaratorSetInit was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _VariableDeclaratorId(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'VariableDeclaratorId was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _VariableDeclaratorIdConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'VariableDeclaratorIdConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _VariableDeclaratorFlag(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'VariableDeclaratorFlag was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateStringLiteral(context: KNativePointer): KNativePointer { - throw new Error("'CreateStringLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateStringLiteral(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateStringLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateStringLiteral1(context: KNativePointer, str: KStringPtr): KNativePointer { - throw new Error("'CreateStringLiteral1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateStringLiteral1(context: KNativePointer, original: KNativePointer, str: KStringPtr): KNativePointer { - throw new Error("'UpdateStringLiteral1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _StringLiteralStrConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'StringLiteralStrConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTypeAssertion(context: KNativePointer, typeAnnotation: KNativePointer, expression: KNativePointer): KNativePointer { - throw new Error("'CreateTSTypeAssertion was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTypeAssertion(context: KNativePointer, original: KNativePointer, typeAnnotation: KNativePointer, expression: KNativePointer): KNativePointer { - throw new Error("'UpdateTSTypeAssertion was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeAssertionGetExpressionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeAssertionGetExpressionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeAssertionTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeAssertionTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeAssertionSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { - throw new Error("'TSTypeAssertionSetTsTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSExternalModuleReference(context: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'CreateTSExternalModuleReference was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSExternalModuleReference(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'UpdateTSExternalModuleReference was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSExternalModuleReferenceExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSExternalModuleReferenceExprConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSUndefinedKeyword(context: KNativePointer): KNativePointer { - throw new Error("'CreateTSUndefinedKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSUndefinedKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTSUndefinedKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSTuple(context: KNativePointer): KNativePointer { - throw new Error("'CreateETSTuple was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSTuple(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateETSTuple was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSTuple1(context: KNativePointer, size: KUInt): KNativePointer { - throw new Error("'CreateETSTuple1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSTuple1(context: KNativePointer, original: KNativePointer, size: KUInt): KNativePointer { - throw new Error("'UpdateETSTuple1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSTuple2(context: KNativePointer, typeList: BigUint64Array, typeListSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateETSTuple2 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSTuple2(context: KNativePointer, original: KNativePointer, typeList: BigUint64Array, typeListSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateETSTuple2 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSTupleGetTupleSizeConst(context: KNativePointer, receiver: KNativePointer): KUInt { - throw new Error("'ETSTupleGetTupleSizeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTupleGetTupleTypeAnnotationsList(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ETSTupleGetTupleTypeAnnotationsListConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSTupleGetTupleTypeAnnotationsListConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTupleSetTypeAnnotationsList(context: KNativePointer, receiver: KNativePointer, typeNodeList: BigUint64Array, typeNodeListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSStringLiteralType(context: KNativePointer, value: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSStringLiteralType(context: KNativePointer, original: KNativePointer, value: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ETSTupleHasSpreadTypeConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ETSTupleHasSpreadTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSTupleSetSpreadType(context: KNativePointer, receiver: KNativePointer, newSpreadType: KNativePointer): void { - throw new Error("'ETSTupleSetSpreadType was not overloaded by native module initialization") - } - _ETSTupleSetTypeAnnotationsList(context: KNativePointer, receiver: KNativePointer, typeNodeList: BigUint64Array, typeNodeListSequenceLength: KUInt): void { - throw new Error("'ETSTupleSetTypeAnnotationsList was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTryStatement(context: KNativePointer, block: KNativePointer, catchClauses: BigUint64Array, catchClausesSequenceLength: KUInt, finalizer: KNativePointer, finalizerInsertionsLabelPair: BigUint64Array, finalizerInsertionsLabelPairSequenceLength: KUInt, finalizerInsertionsStatement: BigUint64Array, finalizerInsertionsStatementSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateTryStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTryStatement(context: KNativePointer, original: KNativePointer, block: KNativePointer, catchClauses: BigUint64Array, catchClausesSequenceLength: KUInt, finalizer: KNativePointer, finalizerInsertionsLabelPair: BigUint64Array, finalizerInsertionsLabelPairSequenceLength: KUInt, finalizerInsertionsStatement: BigUint64Array, finalizerInsertionsStatementSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateTryStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTryStatement1(context: KNativePointer, other: KNativePointer): KNativePointer { - throw new Error("'CreateTryStatement1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTryStatement1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { - throw new Error("'UpdateTryStatement1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TryStatementFinallyBlockConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TryStatementFinallyBlockConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TryStatementBlockConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TryStatementBlockConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TryStatementHasFinalizerConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TryStatementHasFinalizerConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TryStatementHasDefaultCatchClauseConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TryStatementHasDefaultCatchClauseConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TryStatementCatchClausesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TryStatementCatchClausesConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TryStatementFinallyCanCompleteNormallyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TryStatementFinallyCanCompleteNormallyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TryStatementSetFinallyCanCompleteNormally(context: KNativePointer, receiver: KNativePointer, finallyCanCompleteNormally: KBoolean): void { - throw new Error("'TryStatementSetFinallyCanCompleteNormally was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsProgramConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsProgramConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsStatementConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsStatementConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsExpressionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsExpressionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsTypedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsTypedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeAsTyped(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeAsTyped was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeAsTypedConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeAsTypedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsBrokenStatementConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsBrokenStatementConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeAsExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeAsExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeAsExpressionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeAsExpressionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeAsStatement(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeAsStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeAsStatementConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeAsStatementConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeSetRange(context: KNativePointer, receiver: KNativePointer, loc: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeSetStart(context: KNativePointer, receiver: KNativePointer, start: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeSetEnd(context: KNativePointer, receiver: KNativePointer, end: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeStartConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeEndConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeRangeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'AstNodeTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeParent(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeParent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeParentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeParentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeSetParent(context: KNativePointer, receiver: KNativePointer, parent: KNativePointer): void { - throw new Error("'AstNodeSetParent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeDecoratorsPtrConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeDecoratorsPtrConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeAddDecorators(context: KNativePointer, receiver: KNativePointer, decorators: BigUint64Array, decoratorsSequenceLength: KUInt): void { - throw new Error("'AstNodeAddDecorators was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeCanHaveDecoratorConst(context: KNativePointer, receiver: KNativePointer, inTs: KBoolean): KBoolean { - throw new Error("'AstNodeCanHaveDecoratorConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsReadonlyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsReadonlyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsReadonlyTypeConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsReadonlyTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsOptionalDeclarationConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsOptionalDeclarationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsDefiniteConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsDefiniteConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsConstructorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsConstructorConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsOverrideConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsOverrideConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeSetOverride(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'AstNodeSetOverride was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsAsyncConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsAsyncConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsSynchronizedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsSynchronizedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsNativeConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsNativeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsConstConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsConstConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsStaticConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsStaticConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsFinalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsFinalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsAbstractConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsAbstractConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsPublicConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsPublicConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsProtectedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsProtectedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsPrivateConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsPrivateConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsInternalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsInternalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsExportedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsExportedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsDefaultExportedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsDefaultExportedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsExportedTypeConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsExportedTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsDeclareConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsDeclareConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsInConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsInConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsOutConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsOutConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsSetterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsSetterConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeAddModifier(context: KNativePointer, receiver: KNativePointer, flags: KInt): void { - throw new Error("'AstNodeAddModifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeClearModifier(context: KNativePointer, receiver: KNativePointer, flags: KInt): void { - throw new Error("'AstNodeClearModifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeModifiers(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'AstNodeModifiers was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeModifiersConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'AstNodeModifiersConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeHasExportAliasConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeHasExportAliasConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeAsClassElement(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeAsClassElement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeAsClassElementConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeAsClassElementConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeIsScopeBearerConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AstNodeIsScopeBearerConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeClearScope(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'AstNodeClearScope was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeGetTopStatement(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeGetTopStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeGetTopStatementConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeGetTopStatementConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeClone(context: KNativePointer, receiver: KNativePointer, parent: KNativePointer): KNativePointer { - throw new Error("'AstNodeClone was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeDumpJSONConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'AstNodeDumpJSONConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeDumpEtsSrcConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'AstNodeDumpEtsSrcConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeDumpDeclConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsolatedDumpDeclConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeDumpConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { - throw new Error("'AstNodeDumpConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeDumpConst1(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { - throw new Error("'AstNodeDumpConst1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeCompileConst(context: KNativePointer, receiver: KNativePointer, pg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeCompileConst1(context: KNativePointer, receiver: KNativePointer, etsg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeSetTransformedNode(context: KNativePointer, receiver: KNativePointer, transformationName: KStringPtr, transformedNode: KNativePointer): void { - throw new Error("'AstNodeSetTransformedNode was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeAccept(context: KNativePointer, receiver: KNativePointer, v: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeSetOriginalNode(context: KNativePointer, receiver: KNativePointer, originalNode: KNativePointer): void { - throw new Error("'AstNodeSetOriginalNode was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstNodeOriginalNodeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AstNodeOriginalNodeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeCleanUp(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeShallowClone(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsValidInCurrentPhaseConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeGetHistoryNodeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeGetOrCreateHistoryNodeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _CreateUnaryExpression(context: KNativePointer, argument: KNativePointer, unaryOperator: KInt): KNativePointer { - throw new Error("'CreateUnaryExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateUnaryExpression(context: KNativePointer, original: KNativePointer, argument: KNativePointer, unaryOperator: KInt): KNativePointer { - throw new Error("'UpdateUnaryExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UnaryExpressionOperatorTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'UnaryExpressionOperatorTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UnaryExpressionArgument(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'UnaryExpressionArgument was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UnaryExpressionArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'UnaryExpressionArgumentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _UnaryExpressionSetArgument(context: KNativePointer, receiver: KNativePointer, arg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateForInStatement(context: KNativePointer, left: KNativePointer, right: KNativePointer, body: KNativePointer): KNativePointer { - throw new Error("'CreateForInStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateForInStatement(context: KNativePointer, original: KNativePointer, left: KNativePointer, right: KNativePointer, body: KNativePointer): KNativePointer { - throw new Error("'UpdateForInStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForInStatementLeft(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForInStatementLeft was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForInStatementLeftConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForInStatementLeftConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForInStatementRight(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForInStatementRight was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForInStatementRightConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForInStatementRightConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForInStatementBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForInStatementBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForInStatementBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForInStatementBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateThisExpression(context: KNativePointer): KNativePointer { - throw new Error("'CreateThisExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateThisExpression(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateThisExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSMethodSignature(context: KNativePointer, key: KNativePointer, signature: KNativePointer, computed: KBoolean, optional_arg: KBoolean): KNativePointer { - throw new Error("'CreateTSMethodSignature was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSMethodSignature(context: KNativePointer, original: KNativePointer, key: KNativePointer, signature: KNativePointer, computed: KBoolean, optional_arg: KBoolean): KNativePointer { - throw new Error("'UpdateTSMethodSignature was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMethodSignatureKeyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSMethodSignatureKeyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMethodSignatureKey(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSMethodSignatureKey was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMethodSignatureTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSMethodSignatureTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMethodSignatureTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSMethodSignatureTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMethodSignatureParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSMethodSignatureParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMethodSignatureReturnTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSMethodSignatureReturnTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMethodSignatureReturnTypeAnnotation(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSMethodSignatureReturnTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMethodSignatureComputedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSMethodSignatureComputedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMethodSignatureOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSMethodSignatureOptionalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateBinaryExpression(context: KNativePointer, left: KNativePointer, right: KNativePointer, operatorType: KInt): KNativePointer { - throw new Error("'CreateBinaryExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateBinaryExpression(context: KNativePointer, original: KNativePointer, left: KNativePointer, right: KNativePointer, operatorType: KInt): KNativePointer { - throw new Error("'UpdateBinaryExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionLeftConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BinaryExpressionLeftConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionLeft(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BinaryExpressionLeft was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionRightConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BinaryExpressionRightConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionRight(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BinaryExpressionRight was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionResultConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BinaryExpressionResultConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionResult(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BinaryExpressionResult was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionOperatorTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'BinaryExpressionOperatorTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionIsLogicalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'BinaryExpressionIsLogicalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionIsLogicalExtendedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'BinaryExpressionIsLogicalExtendedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionIsBitwiseConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'BinaryExpressionIsBitwiseConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionIsArithmeticConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'BinaryExpressionIsArithmeticConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionSetLeft(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'BinaryExpressionSetLeft was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionSetRight(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'BinaryExpressionSetRight was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionSetResult(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'BinaryExpressionSetResult was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BinaryExpressionSetOperator(context: KNativePointer, receiver: KNativePointer, operatorType: KInt): void { - throw new Error("'BinaryExpressionSetOperator was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionCompileOperandsConst(context: KNativePointer, receiver: KNativePointer, etsg: KNativePointer, lhs: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateSuperExpression(context: KNativePointer): KNativePointer { - throw new Error("'CreateSuperExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateSuperExpression(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateSuperExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateAssertStatement(context: KNativePointer, test: KNativePointer, second: KNativePointer): KNativePointer { - throw new Error("'CreateAssertStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateAssertStatement(context: KNativePointer, original: KNativePointer, test: KNativePointer, second: KNativePointer): KNativePointer { - throw new Error("'UpdateAssertStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssertStatementTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AssertStatementTestConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssertStatementTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AssertStatementTest was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssertStatementSecondConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AssertStatementSecondConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSStringKeyword(context: KNativePointer): KNativePointer { - throw new Error("'CreateTSStringKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSStringKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTSStringKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateAssignmentExpression(context: KNativePointer, left: KNativePointer, right: KNativePointer, assignmentOperator: KInt): KNativePointer { - throw new Error("'CreateAssignmentExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateAssignmentExpression(context: KNativePointer, original: KNativePointer, left: KNativePointer, right: KNativePointer, assignmentOperator: KInt): KNativePointer { - throw new Error("'UpdateAssignmentExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateAssignmentExpression1(context: KNativePointer, type: KInt, left: KNativePointer, right: KNativePointer, assignmentOperator: KInt): KNativePointer { - throw new Error("'CreateAssignmentExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateAssignmentExpression1(context: KNativePointer, original: KNativePointer, type: KInt, left: KNativePointer, right: KNativePointer, assignmentOperator: KInt): KNativePointer { - throw new Error("'UpdateAssignmentExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionLeftConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AssignmentExpressionLeftConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionLeft(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AssignmentExpressionLeft was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionRight(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AssignmentExpressionRight was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionRightConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AssignmentExpressionRightConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionSetRight(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'AssignmentExpressionSetRight was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionSetLeft(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'AssignmentExpressionSetLeft was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionResultConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AssignmentExpressionResultConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionResult(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AssignmentExpressionResult was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionOperatorTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'AssignmentExpressionOperatorTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionSetOperatorType(context: KNativePointer, receiver: KNativePointer, tokenType: KInt): KInt { - throw new Error("'AssignmentExpressionSetOperatorType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionSetResult(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'AssignmentExpressionSetResult was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionIsLogicalExtendedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AssignmentExpressionIsLogicalExtendedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionSetIgnoreConstAssign(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'AssignmentExpressionSetIgnoreConstAssign was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionIsIgnoreConstAssignConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AssignmentExpressionIsIgnoreConstAssignConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionConvertibleToAssignmentPatternLeft(context: KNativePointer, receiver: KNativePointer, mustBePattern: KBoolean): KBoolean { - throw new Error("'AssignmentExpressionConvertibleToAssignmentPatternLeft was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionConvertibleToAssignmentPatternRight(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AssignmentExpressionConvertibleToAssignmentPatternRight was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AssignmentExpressionConvertibleToAssignmentPattern(context: KNativePointer, receiver: KNativePointer, mustBePattern: KBoolean): KBoolean { - throw new Error("'AssignmentExpressionConvertibleToAssignmentPattern was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionCompilePatternConst(context: KNativePointer, receiver: KNativePointer, pg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateExpressionStatement(context: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'CreateExpressionStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateExpressionStatement(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'UpdateExpressionStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionStatementGetExpressionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExpressionStatementGetExpressionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionStatementGetExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExpressionStatementGetExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionStatementSetExpression(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'ExpressionStatementSetExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSModule(context: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt, ident: KNativePointer, flag: KInt, program: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSModule(context: KNativePointer, original: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt, ident: KNativePointer, flag: KInt, program: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ETSModuleIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSModuleIdent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSModuleIdentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSModuleIdentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleProgram(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleGlobalClassConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleGlobalClass(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleSetGlobalClass(context: KNativePointer, receiver: KNativePointer, globalClass: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _ETSModuleIsETSScriptConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ETSModuleIsETSScriptConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSModuleIsNamespaceConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ETSModuleIsNamespaceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSModuleIsNamespaceChainLastNodeConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ETSModuleIsNamespaceChainLastNodeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSModuleSetNamespaceChainLastNode(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'ETSModuleSetNamespaceChainLastNode was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } - _ETSModuleAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSModuleAnnotations was not overloaded by native module initialization") + _ETSModuleProgramConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } - _ETSModuleAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSModuleAnnotationsConst was not overloaded by native module initialization") + _ETSModuleEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } - _ETSModuleSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'ETSModuleSetAnnotations was not overloaded by native module initialization") + _ETSModuleClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } - _CreateMetaProperty(context: KNativePointer, kind: KInt): KNativePointer { - throw new Error("'CreateMetaProperty was not overloaded by native module initialization") + _ETSModuleSetValueAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _UpdateMetaProperty(context: KNativePointer, original: KNativePointer, kind: KInt): KNativePointer { - throw new Error("'UpdateMetaProperty was not overloaded by native module initialization") + _ETSModuleAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } - _MetaPropertyKindConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'MetaPropertyKindConst was not overloaded by native module initialization") + _ETSModuleAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleAddAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateMetaProperty(context: KNativePointer, kind: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateMetaProperty(context: KNativePointer, original: KNativePointer, kind: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MetaPropertyKindConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSArrayType(context: KNativePointer, elementType: KNativePointer): KNativePointer { - throw new Error("'CreateTSArrayType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSArrayType(context: KNativePointer, original: KNativePointer, elementType: KNativePointer): KNativePointer { - throw new Error("'UpdateTSArrayType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSArrayTypeElementTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSArrayTypeElementTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSSignatureDeclaration(context: KNativePointer, kind: KInt, signature: KNativePointer): KNativePointer { - throw new Error("'CreateTSSignatureDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSSignatureDeclaration(context: KNativePointer, original: KNativePointer, kind: KInt, signature: KNativePointer): KNativePointer { - throw new Error("'UpdateTSSignatureDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSSignatureDeclarationTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSSignatureDeclarationTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSSignatureDeclarationTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSSignatureDeclarationTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSSignatureDeclarationParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSSignatureDeclarationParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSSignatureDeclarationReturnTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSSignatureDeclarationReturnTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSSignatureDeclarationReturnTypeAnnotation(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSSignatureDeclarationReturnTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSSignatureDeclarationKindConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'TSSignatureDeclarationKindConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateExportAllDeclaration(context: KNativePointer, source: KNativePointer, exported: KNativePointer): KNativePointer { - throw new Error("'CreateExportAllDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateExportAllDeclaration(context: KNativePointer, original: KNativePointer, source: KNativePointer, exported: KNativePointer): KNativePointer { - throw new Error("'UpdateExportAllDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExportAllDeclarationSourceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExportAllDeclarationSourceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExportAllDeclarationExportedConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExportAllDeclarationExportedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateExportSpecifier(context: KNativePointer, local: KNativePointer, exported: KNativePointer): KNativePointer { - throw new Error("'CreateExportSpecifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateExportSpecifier(context: KNativePointer, original: KNativePointer, local: KNativePointer, exported: KNativePointer): KNativePointer { - throw new Error("'UpdateExportSpecifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExportSpecifierLocalConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExportSpecifierLocalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExportSpecifierExportedConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExportSpecifierExportedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportSpecifierSetDefault(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportSpecifierIsDefaultConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportSpecifierSetConstantExpression(context: KNativePointer, receiver: KNativePointer, constantExpression: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportSpecifierGetConstantExpressionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTupleType(context: KNativePointer, elementTypes: BigUint64Array, elementTypesSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateTSTupleType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTupleType(context: KNativePointer, original: KNativePointer, elementTypes: BigUint64Array, elementTypesSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateTSTupleType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTupleTypeElementTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTupleTypeElementTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateFunctionExpression(context: KNativePointer, func: KNativePointer): KNativePointer { - throw new Error("'CreateFunctionExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateFunctionExpression(context: KNativePointer, original: KNativePointer, func: KNativePointer): KNativePointer { - throw new Error("'UpdateFunctionExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateFunctionExpression1(context: KNativePointer, namedExpr: KNativePointer, func: KNativePointer): KNativePointer { - throw new Error("'CreateFunctionExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateFunctionExpression1(context: KNativePointer, original: KNativePointer, namedExpr: KNativePointer, func: KNativePointer): KNativePointer { - throw new Error("'UpdateFunctionExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionExpressionFunctionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionExpressionFunctionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionExpressionFunction(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionExpressionFunction was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionExpressionIsAnonymousConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'FunctionExpressionIsAnonymousConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionExpressionId(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionExpressionId was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSIndexSignature(context: KNativePointer, param: KNativePointer, typeAnnotation: KNativePointer, readonly_arg: KBoolean): KNativePointer { - throw new Error("'CreateTSIndexSignature was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSIndexSignature(context: KNativePointer, original: KNativePointer, param: KNativePointer, typeAnnotation: KNativePointer, readonly_arg: KBoolean): KNativePointer { - throw new Error("'UpdateTSIndexSignature was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSIndexSignatureParamConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSIndexSignatureParamConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSIndexSignatureTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSIndexSignatureTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSIndexSignatureReadonlyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSIndexSignatureReadonlyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSIndexSignatureKindConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'TSIndexSignatureKindConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSModuleDeclaration(context: KNativePointer, name: KNativePointer, body: KNativePointer, declare: KBoolean, _global: KBoolean): KNativePointer { - throw new Error("'CreateTSModuleDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSModuleDeclaration(context: KNativePointer, original: KNativePointer, name: KNativePointer, body: KNativePointer, declare: KBoolean, _global: KBoolean): KNativePointer { - throw new Error("'UpdateTSModuleDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSModuleDeclarationNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSModuleDeclarationNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSModuleDeclarationBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSModuleDeclarationBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSModuleDeclarationGlobalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSModuleDeclarationGlobalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSModuleDeclarationIsExternalOrAmbientConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSModuleDeclarationIsExternalOrAmbientConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateImportDeclaration(context: KNativePointer, source: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKinds: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } - _CreateImportDeclaration(context: KNativePointer, source: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKind: KInt): KNativePointer { - throw new Error("'CreateImportDeclaration was not overloaded by native module initialization") + _UpdateImportDeclaration(context: KNativePointer, original: KNativePointer, source: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKinds: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDeclarationEmplaceSpecifiers(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDeclarationClearSpecifiers(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDeclarationSetValueSpecifiers(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _UpdateImportDeclaration(context: KNativePointer, original: KNativePointer, source: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKind: KInt): KNativePointer { - throw new Error("'UpdateImportDeclaration was not overloaded by native module initialization") + _ImportDeclarationSpecifiersForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ImportDeclarationSourceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportDeclarationSourceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportDeclarationSource(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportDeclarationSource was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportDeclarationSpecifiersConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportDeclarationSpecifiersConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportDeclarationIsTypeKindConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ImportDeclarationIsTypeKindConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSParenthesizedType(context: KNativePointer, type: KNativePointer): KNativePointer { - throw new Error("'CreateTSParenthesizedType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSParenthesizedType(context: KNativePointer, original: KNativePointer, type: KNativePointer): KNativePointer { - throw new Error("'UpdateTSParenthesizedType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSParenthesizedTypeTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSParenthesizedTypeTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _LiteralIsFoldedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _LiteralSetFolded(context: KNativePointer, receiver: KNativePointer, folded: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateCharLiteral(context: KNativePointer): KNativePointer { - throw new Error("'CreateCharLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateCharLiteral(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateCharLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSPackageDeclaration(context: KNativePointer, name: KNativePointer): KNativePointer { - throw new Error("'CreateETSPackageDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSPackageDeclaration(context: KNativePointer, original: KNativePointer, name: KNativePointer): KNativePointer { - throw new Error("'UpdateETSPackageDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSImportDeclaration(context: KNativePointer, importPath: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKinds: KInt): KNativePointer { throw new Error("This methods was not overloaded by native module initialization") } - _UpdateETSImportDeclaration(context: KNativePointer, original: KNativePointer, source: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKind: KInt): KNativePointer { - throw new Error("'UpdateETSImportDeclaration was not overloaded by native module initialization") + _UpdateETSImportDeclaration(context: KNativePointer, original: KNativePointer, importPath: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKinds: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ETSImportDeclarationHasDeclConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ETSImportDeclarationHasDeclConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationSetImportMetadata(context: KNativePointer, receiver: KNativePointer, importFlags: KInt, lang: KInt, resolvedSource: KStringPtr, declPath: KStringPtr, ohmUrl: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationDeclPathConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationOhmUrlConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationIsValidConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } _ETSImportDeclarationIsPureDynamicConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ETSImportDeclarationIsPureDynamicConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationSetAssemblerName(context: KNativePointer, receiver: KNativePointer, assemblerName: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") } _ETSImportDeclarationAssemblerNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'ETSImportDeclarationAssemblerNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSImportDeclarationSourceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSImportDeclarationSourceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSImportDeclarationResolvedSource(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSImportDeclarationResolvedSource was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSImportDeclarationResolvedSourceConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'ETSImportDeclarationResolvedSourceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSStructDeclaration(context: KNativePointer, def: KNativePointer): KNativePointer { - throw new Error("'CreateETSStructDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSStructDeclaration(context: KNativePointer, original: KNativePointer, def: KNativePointer): KNativePointer { - throw new Error("'UpdateETSStructDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSModuleBlock(context: KNativePointer, statements: BigUint64Array, statementsSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateTSModuleBlock was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSModuleBlock(context: KNativePointer, original: KNativePointer, statements: BigUint64Array, statementsSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateTSModuleBlock was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSModuleBlockStatementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSModuleBlockStatementsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSNewArrayInstanceExpression(context: KNativePointer, typeReference: KNativePointer, dimension: KNativePointer): KNativePointer { - throw new Error("'CreateETSNewArrayInstanceExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSNewArrayInstanceExpression(context: KNativePointer, original: KNativePointer, typeReference: KNativePointer, dimension: KNativePointer): KNativePointer { - throw new Error("'UpdateETSNewArrayInstanceExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewArrayInstanceExpressionTypeReference(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSNewArrayInstanceExpressionTypeReference was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewArrayInstanceExpressionTypeReferenceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSNewArrayInstanceExpressionTypeReferenceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewArrayInstanceExpressionDimension(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSNewArrayInstanceExpressionDimension was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewArrayInstanceExpressionDimensionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSNewArrayInstanceExpressionDimensionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewArrayInstanceExpressionSetDimension(context: KNativePointer, receiver: KNativePointer, dimension: KNativePointer): void { - throw new Error("'ETSNewArrayInstanceExpressionSetDimension was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewArrayInstanceExpressionClearPreferredType(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateAnnotationDeclaration(context: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'CreateAnnotationDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateAnnotationDeclaration(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'UpdateAnnotationDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateAnnotationDeclaration1(context: KNativePointer, expr: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateAnnotationDeclaration1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateAnnotationDeclaration1(context: KNativePointer, original: KNativePointer, expr: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateAnnotationDeclaration1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationInternalNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'AnnotationDeclarationInternalNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationSetInternalName(context: KNativePointer, receiver: KNativePointer, internalName: KStringPtr): void { - throw new Error("'AnnotationDeclarationSetInternalName was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationDeclarationExprConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationDeclarationExpr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationProperties(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationDeclarationProperties was not overloaded by native module initialization") - } - _AnnotationDeclarationPropertiesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationDeclarationPropertiesConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationPropertiesPtrConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationDeclarationPropertiesPtrConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationPropertiesForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationPropertiesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationAddProperties(context: KNativePointer, receiver: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): void { - throw new Error("'AnnotationDeclarationAddProperties was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationIsSourceRetentionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AnnotationDeclarationIsSourceRetentionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationIsBytecodeRetentionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AnnotationDeclarationIsBytecodeRetentionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationIsRuntimeRetentionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'AnnotationDeclarationIsRuntimeRetentionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationSetSourceRetention(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'AnnotationDeclarationSetSourceRetention was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationSetBytecodeRetention(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'AnnotationDeclarationSetBytecodeRetention was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationSetRuntimeRetention(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'AnnotationDeclarationSetRuntimeRetention was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationGetBaseNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationDeclarationGetBaseNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationEmplaceProperties(context: KNativePointer, receiver: KNativePointer, properties: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationClearProperties(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationSetValueProperties(context: KNativePointer, receiver: KNativePointer, properties: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationSetValueAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationDeclarationAnnotations was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationDeclarationAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationDeclarationAnnotationsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _AnnotationDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'AnnotationDeclarationSetAnnotations was not overloaded by native module initialization") + _AnnotationDeclarationSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationAddAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateAnnotationUsage(context: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'CreateAnnotationUsageIr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateAnnotationUsage(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'UpdateAnnotationUsageIr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateAnnotationUsage1(context: KNativePointer, expr: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateAnnotationUsageIr1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateAnnotationUsage1(context: KNativePointer, original: KNativePointer, expr: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateAnnotationUsageIr1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationUsageExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationUsageIrExpr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationUsageProperties(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationUsageIrProperties was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationUsagePropertiesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationUsageIrPropertiesConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationUsageIrPropertiesPtrConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationUsageIrPropertiesPtrConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationUsageAddProperty(context: KNativePointer, receiver: KNativePointer, property: KNativePointer): void { - throw new Error("'AnnotationUsageIrAddProperty was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationUsageSetProperties(context: KNativePointer, receiver: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): void { - throw new Error("'AnnotationUsageIrSetProperties was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotationUsageGetBaseNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotationUsageIrGetBaseNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateEmptyStatement(context: KNativePointer): KNativePointer { - throw new Error("'CreateEmptyStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateEmptyStatement(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateEmptyStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateEmptyStatement1(context: KNativePointer, isBrokenStatement: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateEmptyStatement1(context: KNativePointer, original: KNativePointer, isBrokenStatement: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _EmptyStatementIsBrokenStatement(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } _CreateWhileStatement(context: KNativePointer, test: KNativePointer, body: KNativePointer): KNativePointer { - throw new Error("'CreateWhileStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateWhileStatement(context: KNativePointer, original: KNativePointer, test: KNativePointer, body: KNativePointer): KNativePointer { - throw new Error("'UpdateWhileStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _WhileStatementTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'WhileStatementTestConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _WhileStatementTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'WhileStatementTest was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _WhileStatementSetTest(context: KNativePointer, receiver: KNativePointer, test: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _WhileStatementBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'WhileStatementBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _WhileStatementBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'WhileStatementBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateFunctionSignature(context: KNativePointer, typeParams: KNativePointer, params: BigUint64Array, paramsSequenceLength: KUInt, returnTypeAnnotation: KNativePointer, hasReceiver: KBoolean): KNativePointer { - throw new Error("'CreateFunctionSignature was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionSignatureParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionSignatureParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionSignatureParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionSignatureParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionSignatureTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionSignatureTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionSignatureTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionSignatureTypeParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionSignatureReturnType(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionSignatureReturnType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionSignatureSetReturnType(context: KNativePointer, receiver: KNativePointer, type: KNativePointer): void { - throw new Error("'FunctionSignatureSetReturnType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionSignatureReturnTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionSignatureReturnTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionSignatureClone(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'FunctionSignatureClone was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _FunctionSignatureHasReceiverConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'FunctionSignatureHasReceiverConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateChainExpression(context: KNativePointer, expression: KNativePointer): KNativePointer { - throw new Error("'CreateChainExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateChainExpression(context: KNativePointer, original: KNativePointer, expression: KNativePointer): KNativePointer { - throw new Error("'UpdateChainExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ChainExpressionGetExpressionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ChainExpressionGetExpressionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ChainExpressionGetExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ChainExpressionGetExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ChainExpressionCompileToRegConst(context: KNativePointer, receiver: KNativePointer, pg: KNativePointer, objReg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSIntersectionType(context: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateTSIntersectionType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSIntersectionType(context: KNativePointer, original: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateTSIntersectionType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSIntersectionTypeTypesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSIntersectionTypeTypesConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateUpdateExpression(context: KNativePointer, argument: KNativePointer, updateOperator: KInt, isPrefix: KBoolean): KNativePointer { - throw new Error("'CreateUpdateExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateUpdateExpression(context: KNativePointer, original: KNativePointer, argument: KNativePointer, updateOperator: KInt, isPrefix: KBoolean): KNativePointer { - throw new Error("'UpdateUpdateExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateExpressionOperatorTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'UpdateExpressionOperatorTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateExpressionArgument(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'UpdateExpressionArgument was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateExpressionArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'UpdateExpressionArgumentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateExpressionIsPrefixConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'UpdateExpressionIsPrefixConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateBlockExpression(context: KNativePointer, statements: BigUint64Array, statementsSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateBlockExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateBlockExpression(context: KNativePointer, original: KNativePointer, statements: BigUint64Array, statementsSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateBlockExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BlockExpressionStatementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BlockExpressionStatementsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BlockExpressionStatements(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BlockExpressionStatements was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BlockExpressionAddStatements(context: KNativePointer, receiver: KNativePointer, statements: BigUint64Array, statementsSequenceLength: KUInt): void { - throw new Error("'BlockExpressionAddStatements was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BlockExpressionAddStatement(context: KNativePointer, receiver: KNativePointer, statement: KNativePointer): void { - throw new Error("'BlockExpressionAddStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTypeLiteral(context: KNativePointer, members: BigUint64Array, membersSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateTSTypeLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTypeLiteral(context: KNativePointer, original: KNativePointer, members: BigUint64Array, membersSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateTSTypeLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeLiteralMembersConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeLiteralMembersConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTypeParameter(context: KNativePointer, name: KNativePointer, constraint: KNativePointer, defaultType: KNativePointer): KNativePointer { - throw new Error("'CreateTSTypeParameter was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTypeParameter(context: KNativePointer, original: KNativePointer, name: KNativePointer, constraint: KNativePointer, defaultType: KNativePointer): KNativePointer { - throw new Error("'UpdateTSTypeParameter was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTypeParameter1(context: KNativePointer, name: KNativePointer, constraint: KNativePointer, defaultType: KNativePointer, flags: KInt): KNativePointer { - throw new Error("'CreateTSTypeParameter1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTypeParameter1(context: KNativePointer, original: KNativePointer, name: KNativePointer, constraint: KNativePointer, defaultType: KNativePointer, flags: KInt): KNativePointer { - throw new Error("'UpdateTSTypeParameter1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeParameterNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeParameterNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeParameterName(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeParameterName was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeParameterConstraint(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeParameterConstraint was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeParameterConstraintConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeParameterConstraintConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeParameterSetConstraint(context: KNativePointer, receiver: KNativePointer, constraint: KNativePointer): void { - throw new Error("'TSTypeParameterSetConstraint was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeParameterDefaultTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeParameterDefaultTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeParameterSetDefaultType(context: KNativePointer, receiver: KNativePointer, defaultType: KNativePointer): void { - throw new Error("'TSTypeParameterSetDefaultType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } - _TSTypeParameterAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeParameterAnnotations was not overloaded by native module initialization") + _TSTypeParameterEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } - _TSTypeParameterAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeParameterAnnotationsConst was not overloaded by native module initialization") + _TSTypeParameterClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } - _TSTypeParameterSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'TSTypeParameterSetAnnotations was not overloaded by native module initialization") + _TSTypeParameterSetValueAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _CreateTSBooleanKeyword(context: KNativePointer): KNativePointer { - throw new Error("'CreateTSBooleanKeyword was not overloaded by native module initialization") + _TSTypeParameterAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } - _UpdateTSBooleanKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTSBooleanKeyword was not overloaded by native module initialization") + _TSTypeParameterAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } - _CreateSpreadElement(context: KNativePointer, nodeType: KInt, argument: KNativePointer): KNativePointer { - throw new Error("'CreateSpreadElement was not overloaded by native module initialization") + _TSTypeParameterAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterAddAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSBooleanKeyword(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSBooleanKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateSpreadElement(context: KNativePointer, nodeType: KInt, argument: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _UpdateSpreadElement(context: KNativePointer, original: KNativePointer, nodeType: KInt, argument: KNativePointer): KNativePointer { - throw new Error("'UpdateSpreadElement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SpreadElementArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SpreadElementArgumentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SpreadElementArgument(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SpreadElementArgument was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SpreadElementIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'SpreadElementIsOptionalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SpreadElementDecoratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SpreadElementDecoratorsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SpreadElementSetOptional(context: KNativePointer, receiver: KNativePointer, optional_arg: KBoolean): void { - throw new Error("'SpreadElementSetOptional was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SpreadElementValidateExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SpreadElementValidateExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SpreadElementConvertibleToRest(context: KNativePointer, receiver: KNativePointer, isDeclaration: KBoolean, allowPattern: KBoolean): KBoolean { - throw new Error("'SpreadElementConvertibleToRest was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SpreadElementTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SpreadElementTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SpreadElementSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { - throw new Error("'SpreadElementSetTsTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTypePredicate(context: KNativePointer, parameterName: KNativePointer, typeAnnotation: KNativePointer, asserts: KBoolean): KNativePointer { - throw new Error("'CreateTSTypePredicate was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTypePredicate(context: KNativePointer, original: KNativePointer, parameterName: KNativePointer, typeAnnotation: KNativePointer, asserts: KBoolean): KNativePointer { - throw new Error("'UpdateTSTypePredicate was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypePredicateParameterNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypePredicateParameterNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypePredicateTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypePredicateTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypePredicateAssertsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSTypePredicateAssertsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateImportNamespaceSpecifier(context: KNativePointer, local: KNativePointer): KNativePointer { - throw new Error("'CreateImportNamespaceSpecifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateImportNamespaceSpecifier(context: KNativePointer, original: KNativePointer, local: KNativePointer): KNativePointer { - throw new Error("'UpdateImportNamespaceSpecifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportNamespaceSpecifierLocal(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportNamespaceSpecifierLocal was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportNamespaceSpecifierLocalConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportNamespaceSpecifierLocalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateExportNamedDeclaration(context: KNativePointer, source: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateExportNamedDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateExportNamedDeclaration(context: KNativePointer, original: KNativePointer, source: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateExportNamedDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateExportNamedDeclaration1(context: KNativePointer, decl: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateExportNamedDeclaration1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateExportNamedDeclaration1(context: KNativePointer, original: KNativePointer, decl: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateExportNamedDeclaration1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateExportNamedDeclaration2(context: KNativePointer, decl: KNativePointer): KNativePointer { - throw new Error("'CreateExportNamedDeclaration2 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateExportNamedDeclaration2(context: KNativePointer, original: KNativePointer, decl: KNativePointer): KNativePointer { - throw new Error("'UpdateExportNamedDeclaration2 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExportNamedDeclarationDeclConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExportNamedDeclarationDeclConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExportNamedDeclarationSourceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExportNamedDeclarationSourceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExportNamedDeclarationSpecifiersConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExportNamedDeclarationSpecifiersConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportNamedDeclarationReplaceSpecifiers(context: KNativePointer, receiver: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSParameterExpression(context: KNativePointer, identOrSpread: KNativePointer, isOptional: KBoolean): KNativePointer { - throw new Error("'CreateETSParameterExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSParameterExpression(context: KNativePointer, original: KNativePointer, identOrSpread: KNativePointer, isOptional: KBoolean): KNativePointer { - throw new Error("'UpdateETSParameterExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSParameterExpression1(context: KNativePointer, identOrSpread: KNativePointer, initializer: KNativePointer): KNativePointer { - throw new Error("'CreateETSParameterExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSParameterExpression1(context: KNativePointer, original: KNativePointer, identOrSpread: KNativePointer, initializer: KNativePointer): KNativePointer { - throw new Error("'UpdateETSParameterExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'ETSParameterExpressionNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionIdentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSParameterExpressionIdentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSParameterExpressionIdent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionSetIdent(context: KNativePointer, receiver: KNativePointer, ident: KNativePointer): void { - throw new Error("'ETSParameterExpressionSetIdent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionRestParameterConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSParameterExpressionRestParameterConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionRestParameter(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSParameterExpressionRestParameter was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionInitializerConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSParameterExpressionInitializerConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionInitializer(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSParameterExpressionInitializer was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionSetLexerSaved(context: KNativePointer, receiver: KNativePointer, s: KStringPtr): void { - throw new Error("'ETSParameterExpressionSetLexerSaved was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionLexerSavedConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'ETSParameterExpressionLexerSavedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSParameterExpressionTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionTypeAnnotation(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSParameterExpressionTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionSetTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeNode: KNativePointer): void { - throw new Error("'ETSParameterExpressionSetTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ETSParameterExpressionIsOptionalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionSetOptional(context: KNativePointer, receiver: KNativePointer, value: KBoolean): void { - throw new Error("'ETSParameterExpressionSetOptional was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionSetInitializer(context: KNativePointer, receiver: KNativePointer, initExpr: KNativePointer): void { - throw new Error("'ETSParameterExpressionSetInitializer was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionIsRestParameterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ETSParameterExpressionIsRestParameterConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionGetRequiredParamsConst(context: KNativePointer, receiver: KNativePointer): KUInt { - throw new Error("'ETSParameterExpressionGetRequiredParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSetRequiredParams(context: KNativePointer, receiver: KNativePointer, extraValue: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSetValueAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _ETSParameterExpressionSetRequiredParams(context: KNativePointer, receiver: KNativePointer, value: KUInt): void { - throw new Error("'ETSParameterExpressionSetRequiredParams was not overloaded by native module initialization") + _ETSParameterExpressionAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSParameterExpressionAnnotations was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSParameterExpressionAnnotationsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _ETSParameterExpressionSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'ETSParameterExpressionSetAnnotations was not overloaded by native module initialization") + _ETSParameterExpressionSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionAddAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTypeParameterInstantiation(context: KNativePointer, params: BigUint64Array, paramsSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateTSTypeParameterInstantiation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTypeParameterInstantiation(context: KNativePointer, original: KNativePointer, params: BigUint64Array, paramsSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateTSTypeParameterInstantiation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeParameterInstantiationParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeParameterInstantiationParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateNullLiteral(context: KNativePointer): KNativePointer { - throw new Error("'CreateNullLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateNullLiteral(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateNullLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSInferType(context: KNativePointer, typeParam: KNativePointer): KNativePointer { - throw new Error("'CreateTSInferType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSInferType(context: KNativePointer, original: KNativePointer, typeParam: KNativePointer): KNativePointer { - throw new Error("'UpdateTSInferType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInferTypeTypeParamConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInferTypeTypeParamConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateSwitchCaseStatement(context: KNativePointer, test: KNativePointer, consequent: BigUint64Array, consequentSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateSwitchCaseStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateSwitchCaseStatement(context: KNativePointer, original: KNativePointer, test: KNativePointer, consequent: BigUint64Array, consequentSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateSwitchCaseStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SwitchCaseStatementTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SwitchCaseStatementTest was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SwitchCaseStatementTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SwitchCaseStatementTestConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _SwitchCaseStatementSetTest(context: KNativePointer, receiver: KNativePointer, test: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _SwitchCaseStatementConsequentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SwitchCaseStatementConsequentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateYieldExpression(context: KNativePointer, argument: KNativePointer, isDelegate: KBoolean): KNativePointer { - throw new Error("'CreateYieldExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateYieldExpression(context: KNativePointer, original: KNativePointer, argument: KNativePointer, isDelegate: KBoolean): KNativePointer { - throw new Error("'UpdateYieldExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _YieldExpressionHasDelegateConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'YieldExpressionHasDelegateConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _YieldExpressionArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'YieldExpressionArgumentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSImportEqualsDeclaration(context: KNativePointer, id: KNativePointer, moduleReference: KNativePointer, isExport: KBoolean): KNativePointer { - throw new Error("'CreateTSImportEqualsDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSImportEqualsDeclaration(context: KNativePointer, original: KNativePointer, id: KNativePointer, moduleReference: KNativePointer, isExport: KBoolean): KNativePointer { - throw new Error("'UpdateTSImportEqualsDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSImportEqualsDeclarationIdConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSImportEqualsDeclarationIdConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSImportEqualsDeclarationModuleReferenceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSImportEqualsDeclarationModuleReferenceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSImportEqualsDeclarationIsExportConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSImportEqualsDeclarationIsExportConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateBooleanLiteral(context: KNativePointer, value: KBoolean): KNativePointer { - throw new Error("'CreateBooleanLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateBooleanLiteral(context: KNativePointer, original: KNativePointer, value: KBoolean): KNativePointer { - throw new Error("'UpdateBooleanLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BooleanLiteralValueConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'BooleanLiteralValueConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSNumberKeyword(context: KNativePointer): KNativePointer { - throw new Error("'CreateTSNumberKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSNumberKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTSNumberKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateClassStaticBlock(context: KNativePointer, value: KNativePointer): KNativePointer { - throw new Error("'CreateClassStaticBlock was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateClassStaticBlock(context: KNativePointer, original: KNativePointer, value: KNativePointer): KNativePointer { - throw new Error("'UpdateClassStaticBlock was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassStaticBlockFunction(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassStaticBlockFunction was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassStaticBlockFunctionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassStaticBlockFunctionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassStaticBlockNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'ClassStaticBlockNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSNonNullExpression(context: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'CreateTSNonNullExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSNonNullExpression(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'UpdateTSNonNullExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSNonNullExpressionExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSNonNullExpressionExprConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSNonNullExpressionExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSNonNullExpressionExpr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSNonNullExpressionSetExpr(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'TSNonNullExpressionSetExpr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreatePrefixAssertionExpression(context: KNativePointer, expr: KNativePointer, type: KNativePointer): KNativePointer { - throw new Error("'CreatePrefixAssertionExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdatePrefixAssertionExpression(context: KNativePointer, original: KNativePointer, expr: KNativePointer, type: KNativePointer): KNativePointer { - throw new Error("'UpdatePrefixAssertionExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PrefixAssertionExpressionExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'PrefixAssertionExpressionExprConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _PrefixAssertionExpressionTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'PrefixAssertionExpressionTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateClassExpression(context: KNativePointer, def: KNativePointer): KNativePointer { - throw new Error("'CreateClassExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateClassExpression(context: KNativePointer, original: KNativePointer, def: KNativePointer): KNativePointer { - throw new Error("'UpdateClassExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassExpressionDefinitionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassExpressionDefinitionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateForOfStatement(context: KNativePointer, left: KNativePointer, right: KNativePointer, body: KNativePointer, isAwait: KBoolean): KNativePointer { - throw new Error("'CreateForOfStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateForOfStatement(context: KNativePointer, original: KNativePointer, left: KNativePointer, right: KNativePointer, body: KNativePointer, isAwait: KBoolean): KNativePointer { - throw new Error("'UpdateForOfStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForOfStatementLeft(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForOfStatementLeft was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForOfStatementLeftConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForOfStatementLeftConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForOfStatementRight(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForOfStatementRight was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForOfStatementRightConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForOfStatementRightConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForOfStatementBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForOfStatementBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForOfStatementBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForOfStatementBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForOfStatementIsAwaitConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ForOfStatementIsAwaitConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTemplateLiteral(context: KNativePointer, quasis: BigUint64Array, quasisSequenceLength: KUInt, expressions: BigUint64Array, expressionsSequenceLength: KUInt, multilineString: KStringPtr): KNativePointer { - throw new Error("'CreateTemplateLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTemplateLiteral(context: KNativePointer, original: KNativePointer, quasis: BigUint64Array, quasisSequenceLength: KUInt, expressions: BigUint64Array, expressionsSequenceLength: KUInt, multilineString: KStringPtr): KNativePointer { - throw new Error("'UpdateTemplateLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TemplateLiteralQuasisConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TemplateLiteralQuasisConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TemplateLiteralExpressionsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TemplateLiteralExpressionsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TemplateLiteralGetMultilineStringConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'TemplateLiteralGetMultilineStringConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSUnionType(context: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateTSUnionType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSUnionType(context: KNativePointer, original: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateTSUnionType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSUnionTypeTypesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSUnionTypeTypesConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSUnknownKeyword(context: KNativePointer): KNativePointer { - throw new Error("'CreateTSUnknownKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSUnknownKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTSUnknownKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateIdentifier(context: KNativePointer): KNativePointer { - throw new Error("'CreateIdentifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateIdentifier(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateIdentifier was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateIdentifier1(context: KNativePointer, name: KStringPtr): KNativePointer { - throw new Error("'CreateIdentifier1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateIdentifier1(context: KNativePointer, original: KNativePointer, name: KStringPtr): KNativePointer { - throw new Error("'UpdateIdentifier1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateIdentifier2(context: KNativePointer, name: KStringPtr, typeAnnotation: KNativePointer): KNativePointer { - throw new Error("'CreateIdentifier2 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateIdentifier2(context: KNativePointer, original: KNativePointer, name: KStringPtr, typeAnnotation: KNativePointer): KNativePointer { - throw new Error("'UpdateIdentifier2 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'IdentifierNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierName(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'IdentifierName was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierSetName(context: KNativePointer, receiver: KNativePointer, newName: KStringPtr): void { - throw new Error("'IdentifierSetName was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierSetValueDecorators(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierDecoratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'IdentifierDecoratorsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierIsErrorPlaceHolderConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'IdentifierIsErrorPlaceHolderConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'IdentifierIsOptionalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierSetOptional(context: KNativePointer, receiver: KNativePointer, optional_arg: KBoolean): void { - throw new Error("'IdentifierSetOptional was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierIsReferenceConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'IdentifierIsReferenceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierIsTdzConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'IdentifierIsTdzConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierSetTdz(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'IdentifierSetTdz was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierSetAccessor(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'IdentifierSetAccessor was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierIsAccessorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'IdentifierIsAccessorConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierSetMutator(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'IdentifierSetMutator was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierIsMutatorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'IdentifierIsMutatorConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierIsReceiverConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'IdentifierIsReceiverConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierIsPrivateIdentConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'IdentifierIsPrivateIdentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierSetPrivate(context: KNativePointer, receiver: KNativePointer, isPrivate: KBoolean): void { - throw new Error("'IdentifierSetPrivate was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierIsIgnoreBoxConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'IdentifierIsIgnoreBoxConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierSetIgnoreBox(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'IdentifierSetIgnoreBox was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierIsAnnotationDeclConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'IdentifierIsAnnotationDeclConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierSetAnnotationDecl(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'IdentifierSetAnnotationDecl was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierIsAnnotationUsageConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'IdentifierIsAnnotationUsageConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierSetAnnotationUsage(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'IdentifierSetAnnotationUsage was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierCloneReference(context: KNativePointer, receiver: KNativePointer, parent: KNativePointer): KNativePointer { - throw new Error("'IdentifierCloneReference was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierValidateExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'IdentifierValidateExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'IdentifierTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _IdentifierSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { - throw new Error("'IdentifierSetTsTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateOpaqueTypeNode1(context: KNativePointer): KNativePointer { - throw new Error("'CreateOpaqueTypeNode1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateOpaqueTypeNode1(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateOpaqueTypeNode1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateBlockStatement(context: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateBlockStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateBlockStatement(context: KNativePointer, original: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateBlockStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BlockStatementStatementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BlockStatementStatementsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementStatementsForUpdates(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _BlockStatementStatements(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BlockStatementStatements was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BlockStatementSetStatements(context: KNativePointer, receiver: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt): void { - throw new Error("'BlockStatementSetStatements was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementAddStatements(context: KNativePointer, receiver: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementClearStatements(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementAddStatement(context: KNativePointer, receiver: KNativePointer, statement: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementAddStatement1(context: KNativePointer, receiver: KNativePointer, idx: KUInt, statement: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _BlockStatementAddTrailingBlock(context: KNativePointer, receiver: KNativePointer, stmt: KNativePointer, trailingBlock: KNativePointer): void { - throw new Error("'BlockStatementAddTrailingBlock was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementSearchStatementInTrailingBlock(context: KNativePointer, receiver: KNativePointer, item: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _CreateDirectEvalExpression(context: KNativePointer, callee: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt, typeParams: KNativePointer, optional_arg: KBoolean, parserStatus: KUInt): KNativePointer { - throw new Error("'CreateDirectEvalExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateDirectEvalExpression(context: KNativePointer, original: KNativePointer, callee: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt, typeParams: KNativePointer, optional_arg: KBoolean, parserStatus: KUInt): KNativePointer { - throw new Error("'UpdateDirectEvalExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSTypeParameterDeclaration(context: KNativePointer, params: BigUint64Array, paramsSequenceLength: KUInt, requiredParams: KUInt): KNativePointer { - throw new Error("'CreateTSTypeParameterDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSTypeParameterDeclaration(context: KNativePointer, original: KNativePointer, params: BigUint64Array, paramsSequenceLength: KUInt, requiredParams: KUInt): KNativePointer { - throw new Error("'UpdateTSTypeParameterDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeParameterDeclarationParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSTypeParameterDeclarationParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeParameterDeclarationAddParam(context: KNativePointer, receiver: KNativePointer, param: KNativePointer): void { - throw new Error("'TSTypeParameterDeclarationAddParam was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterDeclarationSetValueParams(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } _TSTypeParameterDeclarationRequiredParamsConst(context: KNativePointer, receiver: KNativePointer): KUInt { - throw new Error("'TSTypeParameterDeclarationRequiredParamsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateMethodDefinition(context: KNativePointer, kind: KInt, key: KNativePointer, value: KNativePointer, modifiers: KInt, isComputed: KBoolean): KNativePointer { - throw new Error("'CreateMethodDefinition was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateMethodDefinition(context: KNativePointer, original: KNativePointer, kind: KInt, key: KNativePointer, value: KNativePointer, modifiers: KInt, isComputed: KBoolean): KNativePointer { - throw new Error("'UpdateMethodDefinition was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionKindConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'MethodDefinitionKindConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionIsConstructorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'MethodDefinitionIsConstructorConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionIsMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionIsExtensionMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'MethodDefinitionIsExtensionMethodConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionIsGetterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionIsSetterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionIsDefaultAccessModifierConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionSetDefaultAccessModifier(context: KNativePointer, receiver: KNativePointer, isDefault: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionOverloadsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'MethodDefinitionOverloadsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionBaseOverloadMethodConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'MethodDefinitionBaseOverloadMethodConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionBaseOverloadMethod(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'MethodDefinitionBaseOverloadMethod was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionAsyncPairMethodConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'MethodDefinitionAsyncPairMethodConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionAsyncPairMethod(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'MethodDefinitionAsyncPairMethod was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionSetOverloads(context: KNativePointer, receiver: KNativePointer, overloads: BigUint64Array, overloadsSequenceLength: KUInt): void { - throw new Error("'MethodDefinitionSetOverloads was not overloaded by native module initialization") - } - _MethodDefinitionClearOverloads(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'MethodDefinitionClearOverloads was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionAddOverload(context: KNativePointer, receiver: KNativePointer, overload: KNativePointer): void { - throw new Error("'MethodDefinitionAddOverload was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionSetBaseOverloadMethod(context: KNativePointer, receiver: KNativePointer, baseOverloadMethod: KNativePointer): void { - throw new Error("'MethodDefinitionSetBaseOverloadMethod was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } - _MethodDefinitionSetAsyncPairMethod(context: KNativePointer, receiver: KNativePointer, method: KNativePointer): void { - throw new Error("'MethodDefinitionSetAsyncPairMethod was not overloaded by native module initialization") + _MethodDefinitionSetAsyncPairMethod(context: KNativePointer, receiver: KNativePointer, asyncPairMethod: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionHasOverload(context: KNativePointer, receiver: KNativePointer, overload: KNativePointer): KBoolean { - throw new Error("'MethodDefinitionHasOverload was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionFunction(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'MethodDefinitionFunction was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MethodDefinitionFunctionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'MethodDefinitionFunctionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionInitializeOverloadInfo(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionEmplaceOverloads(context: KNativePointer, receiver: KNativePointer, overloads: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionClearOverloads(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionSetValueOverloads(context: KNativePointer, receiver: KNativePointer, overloads: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSNullKeyword(context: KNativePointer): KNativePointer { - throw new Error("'CreateTSNullKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSNullKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTSNullKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSInterfaceHeritage(context: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'CreateTSInterfaceHeritage was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSInterfaceHeritage(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'UpdateTSInterfaceHeritage was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceHeritageExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceHeritageExpr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSInterfaceHeritageExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSInterfaceHeritageExprConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionIsGroupedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ExpressionIsGroupedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionSetGrouped(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'ExpressionSetGrouped was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionAsLiteralConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExpressionAsLiteralConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionAsLiteral(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExpressionAsLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionIsLiteralConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ExpressionIsLiteralConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionIsTypeNodeConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ExpressionIsTypeNodeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionIsAnnotatedExpressionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ExpressionIsAnnotatedExpressionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionAsTypeNode(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExpressionAsTypeNode was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionAsTypeNodeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExpressionAsTypeNodeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionAsAnnotatedExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExpressionAsAnnotatedExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionAsAnnotatedExpressionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ExpressionAsAnnotatedExpressionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionIsBrokenExpressionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ExpressionIsBrokenExpressionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ExpressionToStringConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'ExpressionToStringConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotatedExpressionTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AnnotatedExpressionTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AnnotatedExpressionSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { - throw new Error("'AnnotatedExpressionSetTsTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MaybeOptionalExpressionIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'MaybeOptionalExpressionIsOptionalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _MaybeOptionalExpressionClearOptional(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'MaybeOptionalExpressionClearOptional was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateSrcDumper(context: KNativePointer, node: KNativePointer): KNativePointer { - throw new Error("'CreateSrcDumper was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateSrcDumper1(context: KNativePointer, node: KNativePointer, isDeclgen: KBoolean, isIsolatedDeclgen: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _SrcDumperAdd(context: KNativePointer, receiver: KNativePointer, str: KStringPtr): void { - throw new Error("'SrcDumperAdd was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } - _SrcDumperAdd1(context: KNativePointer, receiver: KNativePointer, i: KInt): void { - throw new Error("'SrcDumperAdd1 was not overloaded by native module initialization") + _SrcDumperAdd1(context: KNativePointer, receiver: KNativePointer, i: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") } - _SrcDumperAdd2(context: KNativePointer, receiver: KNativePointer, l: KLong): void { - throw new Error("'SrcDumperAdd2 was not overloaded by native module initialization") + _SrcDumperAdd2(context: KNativePointer, receiver: KNativePointer, i: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _SrcDumperAdd3(context: KNativePointer, receiver: KNativePointer, f: KFloat): void { - throw new Error("'SrcDumperAdd3 was not overloaded by native module initialization") + _SrcDumperAdd3(context: KNativePointer, receiver: KNativePointer, i: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _SrcDumperAdd4(context: KNativePointer, receiver: KNativePointer, d: KDouble): void { - throw new Error("'SrcDumperAdd4 was not overloaded by native module initialization") + _SrcDumperAdd4(context: KNativePointer, receiver: KNativePointer, l: KLong): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperAdd5(context: KNativePointer, receiver: KNativePointer, f: KFloat): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperAdd6(context: KNativePointer, receiver: KNativePointer, d: KDouble): void { + throw new Error("This methods was not overloaded by native module initialization") } _SrcDumperStrConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'SrcDumperStrConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SrcDumperIncrIndent(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'SrcDumperIncrIndent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SrcDumperDecrIndent(context: KNativePointer, receiver: KNativePointer): void { - throw new Error("'SrcDumperDecrIndent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SrcDumperEndl(context: KNativePointer, receiver: KNativePointer, num: KUInt): void { - throw new Error("'SrcDumperEndl was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperIsDeclgenConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperIsIsolatedDeclgenConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperDumpNode(context: KNativePointer, receiver: KNativePointer, key: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperRemoveNode(context: KNativePointer, receiver: KNativePointer, key: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperIsIndirectDepPhaseConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperRun(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSClassLiteral(context: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'CreateETSClassLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSClassLiteral(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { - throw new Error("'UpdateETSClassLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSClassLiteralExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSClassLiteralExprConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateBreakStatement(context: KNativePointer): KNativePointer { - throw new Error("'CreateBreakStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateBreakStatement(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateBreakStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateBreakStatement1(context: KNativePointer, ident: KNativePointer): KNativePointer { - throw new Error("'CreateBreakStatement1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateBreakStatement1(context: KNativePointer, original: KNativePointer, ident: KNativePointer): KNativePointer { - throw new Error("'UpdateBreakStatement1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BreakStatementIdentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BreakStatementIdentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BreakStatementIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BreakStatementIdent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _BreakStatementTargetConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'BreakStatementTargetConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _BreakStatementHasTargetConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } _BreakStatementSetTarget(context: KNativePointer, receiver: KNativePointer, target: KNativePointer): void { - throw new Error("'BreakStatementSetTarget was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateRegExpLiteral(context: KNativePointer, pattern: KStringPtr, flags: KInt, flagsStr: KStringPtr): KNativePointer { - throw new Error("'CreateRegExpLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateRegExpLiteral(context: KNativePointer, original: KNativePointer, pattern: KStringPtr, flags: KInt, flagsStr: KStringPtr): KNativePointer { - throw new Error("'UpdateRegExpLiteral was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _RegExpLiteralPatternConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'RegExpLiteralPatternConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _RegExpLiteralFlagsConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'RegExpLiteralFlagsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSMappedType(context: KNativePointer, typeParameter: KNativePointer, typeAnnotation: KNativePointer, readonly_arg: KInt, optional_arg: KInt): KNativePointer { - throw new Error("'CreateTSMappedType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSMappedType(context: KNativePointer, original: KNativePointer, typeParameter: KNativePointer, typeAnnotation: KNativePointer, readonly_arg: KInt, optional_arg: KInt): KNativePointer { - throw new Error("'UpdateTSMappedType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMappedTypeTypeParameter(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSMappedTypeTypeParameter was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMappedTypeTypeAnnotation(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSMappedTypeTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMappedTypeReadonly(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'TSMappedTypeReadonly was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSMappedTypeOptional(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'TSMappedTypeOptional was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSAnyKeyword(context: KNativePointer): KNativePointer { - throw new Error("'CreateTSAnyKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSAnyKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTSAnyKeyword was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateClassDeclaration(context: KNativePointer, def: KNativePointer): KNativePointer { - throw new Error("'CreateClassDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateClassDeclaration(context: KNativePointer, original: KNativePointer, def: KNativePointer): KNativePointer { - throw new Error("'UpdateClassDeclaration was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDeclarationDefinition(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDeclarationDefinition was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDeclarationDefinitionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDeclarationDefinitionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ClassDeclarationDecoratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ClassDeclarationDecoratorsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDeclarationEmplaceDecorators(context: KNativePointer, receiver: KNativePointer, decorators: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDeclarationClearDecorators(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDeclarationSetValueDecorators(context: KNativePointer, receiver: KNativePointer, decorators: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDeclarationDecorators(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDeclarationDecoratorsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDeclarationSetDefinition(context: KNativePointer, receiver: KNativePointer, def: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSIndexedAccessType(context: KNativePointer, objectType: KNativePointer, indexType: KNativePointer): KNativePointer { - throw new Error("'CreateTSIndexedAccessType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSIndexedAccessType(context: KNativePointer, original: KNativePointer, objectType: KNativePointer, indexType: KNativePointer): KNativePointer { - throw new Error("'UpdateTSIndexedAccessType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSIndexedAccessTypeObjectTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSIndexedAccessTypeObjectTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSIndexedAccessTypeIndexTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSIndexedAccessTypeIndexTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSQualifiedName(context: KNativePointer, left: KNativePointer, right: KNativePointer): KNativePointer { - throw new Error("'CreateTSQualifiedName was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSQualifiedName(context: KNativePointer, original: KNativePointer, left: KNativePointer, right: KNativePointer): KNativePointer { - throw new Error("'UpdateTSQualifiedName was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSQualifiedNameLeftConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSQualifiedNameLeftConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSQualifiedNameLeft(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSQualifiedNameLeft was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSQualifiedNameRightConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSQualifiedNameRightConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSQualifiedNameRight(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSQualifiedNameRight was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSQualifiedNameNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'TSQualifiedNameNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSQualifiedNameResolveLeftMostQualifiedName(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSQualifiedNameResolveLeftMostQualifiedName was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSQualifiedNameResolveLeftMostQualifiedNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSQualifiedNameResolveLeftMostQualifiedNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateAwaitExpression(context: KNativePointer, argument: KNativePointer): KNativePointer { - throw new Error("'CreateAwaitExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateAwaitExpression(context: KNativePointer, original: KNativePointer, argument: KNativePointer): KNativePointer { - throw new Error("'UpdateAwaitExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AwaitExpressionArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'AwaitExpressionArgumentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateValidationInfo(context: KNativePointer): KNativePointer { - throw new Error("'CreateValidationInfo was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateValidationInfo1(context: KNativePointer, m: KStringPtr, p: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ValidationInfoFailConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'ValidationInfoFailConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateContinueStatement(context: KNativePointer): KNativePointer { - throw new Error("'CreateContinueStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateContinueStatement(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateContinueStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateContinueStatement1(context: KNativePointer, ident: KNativePointer): KNativePointer { - throw new Error("'CreateContinueStatement1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateContinueStatement1(context: KNativePointer, original: KNativePointer, ident: KNativePointer): KNativePointer { - throw new Error("'UpdateContinueStatement1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ContinueStatementIdentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ContinueStatementIdentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ContinueStatementIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ContinueStatementIdent was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ContinueStatementTargetConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ContinueStatementTargetConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ContinueStatementHasTargetConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } _ContinueStatementSetTarget(context: KNativePointer, receiver: KNativePointer, target: KNativePointer): void { - throw new Error("'ContinueStatementSetTarget was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSNewMultiDimArrayInstanceExpression(context: KNativePointer, typeReference: KNativePointer, dimensions: BigUint64Array, dimensionsSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateETSNewMultiDimArrayInstanceExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSNewMultiDimArrayInstanceExpression(context: KNativePointer, original: KNativePointer, typeReference: KNativePointer, dimensions: BigUint64Array, dimensionsSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateETSNewMultiDimArrayInstanceExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSNewMultiDimArrayInstanceExpression1(context: KNativePointer, other: KNativePointer): KNativePointer { - throw new Error("'CreateETSNewMultiDimArrayInstanceExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSNewMultiDimArrayInstanceExpression1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { - throw new Error("'UpdateETSNewMultiDimArrayInstanceExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewMultiDimArrayInstanceExpressionTypeReference(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSNewMultiDimArrayInstanceExpressionTypeReference was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewMultiDimArrayInstanceExpressionTypeReferenceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSNewMultiDimArrayInstanceExpressionTypeReferenceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewMultiDimArrayInstanceExpressionDimensions(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSNewMultiDimArrayInstanceExpressionDimensions was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewMultiDimArrayInstanceExpressionDimensionsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSNewMultiDimArrayInstanceExpressionDimensionsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewMultiDimArrayInstanceExpressionClearPreferredType(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSNamedTupleMember(context: KNativePointer, label: KNativePointer, elementType: KNativePointer, optional_arg: KBoolean): KNativePointer { - throw new Error("'CreateTSNamedTupleMember was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSNamedTupleMember(context: KNativePointer, original: KNativePointer, label: KNativePointer, elementType: KNativePointer, optional_arg: KBoolean): KNativePointer { - throw new Error("'UpdateTSNamedTupleMember was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSNamedTupleMemberLabelConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSNamedTupleMemberLabelConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSNamedTupleMemberElementType(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSNamedTupleMemberElementType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSNamedTupleMemberElementTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSNamedTupleMemberElementTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSNamedTupleMemberIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSNamedTupleMemberIsOptionalConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateImportExpression(context: KNativePointer, source: KNativePointer): KNativePointer { - throw new Error("'CreateImportExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateImportExpression(context: KNativePointer, original: KNativePointer, source: KNativePointer): KNativePointer { - throw new Error("'UpdateImportExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportExpressionSource(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportExpressionSource was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ImportExpressionSourceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ImportExpressionSourceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateAstDumper(context: KNativePointer, node: KNativePointer, sourceCode: KStringPtr): KNativePointer { - throw new Error("'CreateAstDumper was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstDumperModifierToString(context: KNativePointer, receiver: KNativePointer, flags: KInt): KStringPtr { - throw new Error("'AstDumperModifierToString was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstDumperTypeOperatorToString(context: KNativePointer, receiver: KNativePointer, operatorType: KInt): KStringPtr { - throw new Error("'AstDumperTypeOperatorToString was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _AstDumperStrConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'AstDumperStrConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSNullType(context: KNativePointer): KNativePointer { - throw new Error("'CreateETSNullTypeIr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSNullType(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateETSNullTypeIr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSUndefinedType(context: KNativePointer): KNativePointer { - throw new Error("'CreateETSUndefinedTypeIr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSUndefinedType(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateETSUndefinedTypeIr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTypeofExpression(context: KNativePointer, argument: KNativePointer): KNativePointer { - throw new Error("'CreateTypeofExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTypeofExpression(context: KNativePointer, original: KNativePointer, argument: KNativePointer): KNativePointer { - throw new Error("'UpdateTypeofExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TypeofExpressionArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TypeofExpressionArgumentConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSEnumMember(context: KNativePointer, key: KNativePointer, init: KNativePointer): KNativePointer { - throw new Error("'CreateTSEnumMember was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSEnumMember(context: KNativePointer, original: KNativePointer, key: KNativePointer, init: KNativePointer): KNativePointer { - throw new Error("'UpdateTSEnumMember was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSEnumMember1(context: KNativePointer, key: KNativePointer, init: KNativePointer, isGenerated: KBoolean): KNativePointer { - throw new Error("'CreateTSEnumMember1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSEnumMember1(context: KNativePointer, original: KNativePointer, key: KNativePointer, init: KNativePointer, isGenerated: KBoolean): KNativePointer { - throw new Error("'UpdateTSEnumMember1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumMemberKeyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSEnumMemberKeyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumMemberKey(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSEnumMemberKey was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumMemberInitConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSEnumMemberInitConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumMemberInit(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSEnumMemberInit was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumMemberIsGeneratedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSEnumMemberIsGeneratedConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSEnumMemberNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'TSEnumMemberNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateSwitchStatement(context: KNativePointer, discriminant: KNativePointer, cases: BigUint64Array, casesSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateSwitchStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateSwitchStatement(context: KNativePointer, original: KNativePointer, discriminant: KNativePointer, cases: BigUint64Array, casesSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateSwitchStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SwitchStatementDiscriminantConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SwitchStatementDiscriminantConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SwitchStatementDiscriminant(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SwitchStatementDiscriminant was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _SwitchStatementSetDiscriminant(context: KNativePointer, receiver: KNativePointer, discriminant: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _SwitchStatementCasesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SwitchStatementCasesConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SwitchStatementCases(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SwitchStatementCases was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateDoWhileStatement(context: KNativePointer, body: KNativePointer, test: KNativePointer): KNativePointer { - throw new Error("'CreateDoWhileStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateDoWhileStatement(context: KNativePointer, original: KNativePointer, body: KNativePointer, test: KNativePointer): KNativePointer { - throw new Error("'UpdateDoWhileStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _DoWhileStatementBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'DoWhileStatementBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _DoWhileStatementBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'DoWhileStatementBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _DoWhileStatementTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'DoWhileStatementTestConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _DoWhileStatementTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'DoWhileStatementTest was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateCatchClause(context: KNativePointer, param: KNativePointer, body: KNativePointer): KNativePointer { - throw new Error("'CreateCatchClause was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateCatchClause(context: KNativePointer, original: KNativePointer, param: KNativePointer, body: KNativePointer): KNativePointer { - throw new Error("'UpdateCatchClause was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateCatchClause1(context: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateCatchClause1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _CatchClauseParam(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'CatchClauseParam was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CatchClauseParamConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'CatchClauseParamConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CatchClauseBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'CatchClauseBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CatchClauseBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'CatchClauseBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CatchClauseIsDefaultCatchClauseConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'CatchClauseIsDefaultCatchClauseConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateSequenceExpression(context: KNativePointer, sequence_arg: BigUint64Array, sequence_argSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateSequenceExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateSequenceExpression(context: KNativePointer, original: KNativePointer, sequence_arg: BigUint64Array, sequence_argSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateSequenceExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SequenceExpressionSequenceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SequenceExpressionSequenceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _SequenceExpressionSequence(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'SequenceExpressionSequence was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateArrowFunctionExpression(context: KNativePointer, func: KNativePointer): KNativePointer { - throw new Error("'CreateArrowFunctionExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateArrowFunctionExpression(context: KNativePointer, original: KNativePointer, func: KNativePointer): KNativePointer { - throw new Error("'UpdateArrowFunctionExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateArrowFunctionExpression1(context: KNativePointer, other: KNativePointer): KNativePointer { - throw new Error("'CreateArrowFunctionExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateArrowFunctionExpression1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { - throw new Error("'UpdateArrowFunctionExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrowFunctionExpressionFunctionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ArrowFunctionExpressionFunctionConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrowFunctionExpressionFunction(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ArrowFunctionExpressionFunction was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrowFunctionExpressionCreateTypeAnnotation(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ArrowFunctionExpressionCreateTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionSetValueAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ArrowFunctionExpressionAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ArrowFunctionExpressionAnnotations was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ArrowFunctionExpressionAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ArrowFunctionExpressionAnnotationsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _ArrowFunctionExpressionSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'ArrowFunctionExpressionSetAnnotations was not overloaded by native module initialization") + _ArrowFunctionExpressionSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionAddAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateOmittedExpression(context: KNativePointer): KNativePointer { - throw new Error("'CreateOmittedExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateOmittedExpression(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateOmittedExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSNewClassInstanceExpression(context: KNativePointer, typeReference: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateETSNewClassInstanceExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSNewClassInstanceExpression(context: KNativePointer, original: KNativePointer, typeReference: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateETSNewClassInstanceExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSNewClassInstanceExpression1(context: KNativePointer, other: KNativePointer): KNativePointer { - throw new Error("'CreateETSNewClassInstanceExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSNewClassInstanceExpression1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { - throw new Error("'UpdateETSNewClassInstanceExpression1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewClassInstanceExpressionGetTypeRefConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSNewClassInstanceExpressionGetTypeRefConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewClassInstanceExpressionGetArguments(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSNewClassInstanceExpressionGetArguments was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewClassInstanceExpressionGetArgumentsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSNewClassInstanceExpressionGetArgumentsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewClassInstanceExpressionSetArguments(context: KNativePointer, receiver: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt): void { - throw new Error("'ETSNewClassInstanceExpressionSetArguments was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSNewClassInstanceExpressionAddToArgumentsFront(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'ETSNewClassInstanceExpressionAddToArgumentsFront was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSAsExpression(context: KNativePointer, expression: KNativePointer, typeAnnotation: KNativePointer, isConst: KBoolean): KNativePointer { - throw new Error("'CreateTSAsExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSAsExpression(context: KNativePointer, original: KNativePointer, expression: KNativePointer, typeAnnotation: KNativePointer, isConst: KBoolean): KNativePointer { - throw new Error("'UpdateTSAsExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSAsExpressionExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSAsExpressionExprConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSAsExpressionExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSAsExpressionExpr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSAsExpressionSetExpr(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { - throw new Error("'TSAsExpressionSetExpr was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSAsExpressionIsConstConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSAsExpressionIsConstConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSAsExpressionSetUncheckedCast(context: KNativePointer, receiver: KNativePointer, isUncheckedCast: KBoolean): void { - throw new Error("'TSAsExpressionSetUncheckedCast was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSAsExpressionTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSAsExpressionTypeAnnotationConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSAsExpressionSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { - throw new Error("'TSAsExpressionSetTsTypeAnnotation was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateForUpdateStatement(context: KNativePointer, init: KNativePointer, test: KNativePointer, update: KNativePointer, body: KNativePointer): KNativePointer { - throw new Error("'CreateForUpdateStatement was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForUpdateStatementInit(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForUpdateStatementInit was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForUpdateStatementInitConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForUpdateStatementInitConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForUpdateStatementTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForUpdateStatementTest was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForUpdateStatementTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForUpdateStatementTestConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForUpdateStatementUpdateConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForUpdateStatementUpdateConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForUpdateStatementBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForUpdateStatementBody was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ForUpdateStatementBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ForUpdateStatementBodyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSTypeReferencePart(context: KNativePointer, name: KNativePointer, typeParams: KNativePointer, prev: KNativePointer): KNativePointer { - throw new Error("'CreateETSTypeReferencePart was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSTypeReferencePart(context: KNativePointer, original: KNativePointer, name: KNativePointer, typeParams: KNativePointer, prev: KNativePointer): KNativePointer { - throw new Error("'UpdateETSTypeReferencePart was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSTypeReferencePart1(context: KNativePointer, name: KNativePointer): KNativePointer { - throw new Error("'CreateETSTypeReferencePart1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSTypeReferencePart1(context: KNativePointer, original: KNativePointer, name: KNativePointer): KNativePointer { - throw new Error("'UpdateETSTypeReferencePart1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSTypeReferencePartPrevious(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSTypeReferencePartPrevious was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSTypeReferencePartPreviousConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSTypeReferencePartPreviousConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSTypeReferencePartName(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSTypeReferencePartName was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSTypeReferencePartTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSTypeReferencePartTypeParams was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePartTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ETSTypeReferencePartNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSTypeReferencePartNameConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePartGetIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _ETSReExportDeclarationGetETSImportDeclarationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSReExportDeclarationGetETSImportDeclarationsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSReExportDeclarationGetETSImportDeclarations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSReExportDeclarationGetETSImportDeclarations was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSReExportDeclarationGetProgramPathConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { - throw new Error("'ETSReExportDeclarationGetProgramPathConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSPrimitiveType(context: KNativePointer, type: KInt): KNativePointer { - throw new Error("'CreateETSPrimitiveType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSPrimitiveType(context: KNativePointer, original: KNativePointer, type: KInt): KNativePointer { - throw new Error("'UpdateETSPrimitiveType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSPrimitiveTypeGetPrimitiveTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'ETSPrimitiveTypeGetPrimitiveTypeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeEmplaceAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeSetValueAnnotations(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") } _TypeNodeAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TypeNodeAnnotations was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TypeNodeAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TypeNodeAnnotationsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") } - _TypeNodeSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt): void { - throw new Error("'TypeNodeSetAnnotations was not overloaded by native module initialization") + _TypeNodeSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeAddAnnotations(context: KNativePointer, receiver: KNativePointer, annotations: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") } _CreateNewExpression(context: KNativePointer, callee: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt): KNativePointer { - throw new Error("'CreateNewExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateNewExpression(context: KNativePointer, original: KNativePointer, callee: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt): KNativePointer { - throw new Error("'UpdateNewExpression was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _NewExpressionCalleeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'NewExpressionCalleeConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _NewExpressionArgumentsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'NewExpressionArgumentsConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSParameterProperty(context: KNativePointer, accessibility: KInt, parameter: KNativePointer, readonly_arg: KBoolean, isStatic: KBoolean, isExport: KBoolean): KNativePointer { - throw new Error("'CreateTSParameterProperty was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSParameterProperty(context: KNativePointer, original: KNativePointer, accessibility: KInt, parameter: KNativePointer, readonly_arg: KBoolean, isStatic: KBoolean, isExport: KBoolean): KNativePointer { - throw new Error("'UpdateTSParameterProperty was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSParameterPropertyAccessibilityConst(context: KNativePointer, receiver: KNativePointer): KInt { - throw new Error("'TSParameterPropertyAccessibilityConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSParameterPropertyReadonlyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSParameterPropertyReadonlyConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSParameterPropertyIsStaticConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSParameterPropertyIsStaticConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSParameterPropertyIsExportConst(context: KNativePointer, receiver: KNativePointer): KBoolean { - throw new Error("'TSParameterPropertyIsExportConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _TSParameterPropertyParameterConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'TSParameterPropertyParameterConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateETSWildcardType(context: KNativePointer, typeReference: KNativePointer, flags: KInt): KNativePointer { - throw new Error("'CreateETSWildcardType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateETSWildcardType(context: KNativePointer, original: KNativePointer, typeReference: KNativePointer, flags: KInt): KNativePointer { - throw new Error("'UpdateETSWildcardType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSWildcardTypeTypeReference(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSWildcardTypeTypeReference was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _ETSWildcardTypeTypeReferenceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("'ETSWildcardTypeTypeReferenceConst was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateTSThisType(context: KNativePointer): KNativePointer { - throw new Error("'CreateTSThisType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _UpdateTSThisType(context: KNativePointer, original: KNativePointer): KNativePointer { - throw new Error("'UpdateTSThisType was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateInterfaceDecl(context: KNativePointer, name: KStringPtr): KNativePointer { - throw new Error("'CreateInterfaceDecl was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateInterfaceDecl1(context: KNativePointer, name: KStringPtr, declNode: KNativePointer): KNativePointer { - throw new Error("'CreateInterfaceDecl1 was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") } _CreateFunctionDecl(context: KNativePointer, name: KStringPtr, node: KNativePointer): KNativePointer { - throw new Error("'CreateFunctionDecl was not overloaded by native module initialization") + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetKind(context: KNativePointer, receiver: KNativePointer, kind: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramPushVarBinder(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramPushChecker(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramKindConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSourceCodeConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSourceFilePathConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSourceFileFolderConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramFileNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramFileNameWithExtensionConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramAbsoluteNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramResolvedFilePathConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramRelativeFilePathConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetRelativeFilePath(context: KNativePointer, receiver: KNativePointer, relPath: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramAst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramAstConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetAst(context: KNativePointer, receiver: KNativePointer, ast: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramGlobalClass(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramGlobalClassConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetGlobalClass(context: KNativePointer, receiver: KNativePointer, globalClass: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramPackageStartConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetPackageStart(context: KNativePointer, receiver: KNativePointer, start: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetSource(context: KNativePointer, receiver: KNativePointer, sourceCode: KStringPtr, sourceFilePath: KStringPtr, sourceFileFolder: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetPackageInfo(context: KNativePointer, receiver: KNativePointer, name: KStringPtr, kind: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramModuleNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramModulePrefixConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsSeparateModuleConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsDeclarationModuleConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsPackageConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetFlag(context: KNativePointer, receiver: KNativePointer, flag: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramGetFlagConst(context: KNativePointer, receiver: KNativePointer, flag: KInt): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetASTChecked(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsASTChecked(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramMarkASTAsLowered(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsASTLoweredConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsStdLibConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramDumpConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramDumpSilentConst(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramAddDeclGenExportNode(context: KNativePointer, receiver: KNativePointer, declGenExportStr: KStringPtr, node: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsDiedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramAddFileDependencies(context: KNativePointer, receiver: KNativePointer, file: KStringPtr, depFile: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateArkTsConfig(context: KNativePointer, configPath: KStringPtr, de: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigResolveAllDependenciesInArkTsConfig(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigConfigPathConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigPackageConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigBaseUrlConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigRootDirConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigOutDirConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigResetDependencies(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigEntryConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigUseUrlConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") } } diff --git a/koala-wrapper/src/generated/factory.ts b/koala-wrapper/src/generated/factory.ts new file mode 100644 index 000000000..d455e9165 --- /dev/null +++ b/koala-wrapper/src/generated/factory.ts @@ -0,0 +1,1269 @@ +// /* +// * Copyright (c) 2025 Huawei Device Co., Ltd. +// * Licensed under the Apache License, Version 2.0 (the "License"); +// * you may not use this file except in compliance with the License. +// * You may obtain a copy of the License at +// * +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// */ + +// import { +// global, +// passNode, +// passNodeArray, +// unpackNonNullableNode, +// unpackNode, +// unpackNodeArray, +// assertValidPeer, +// AstNode, +// KNativePointer, +// nodeByType, +// ArktsObject, +// isSameNativeObject, +// unpackString, +// updateNodeByNode +// } from "../reexport-for-generated" + +// import { AnnotationDeclaration } from "./peers/AnnotationDeclaration" +// import { AnnotationUsage } from "./peers/AnnotationUsage" +// import { ArrowFunctionExpression } from "./peers/ArrowFunctionExpression" +// import { AssertStatement } from "./peers/AssertStatement" +// import { AwaitExpression } from "./peers/AwaitExpression" +// import { BigIntLiteral } from "./peers/BigIntLiteral" +// import { BinaryExpression } from "./peers/BinaryExpression" +// import { BlockExpression } from "./peers/BlockExpression" +// import { BlockStatement } from "./peers/BlockStatement" +// import { BooleanLiteral } from "./peers/BooleanLiteral" +// import { BreakStatement } from "./peers/BreakStatement" +// import { CatchClause } from "./peers/CatchClause" +// import { ChainExpression } from "./peers/ChainExpression" +// import { CharLiteral } from "./peers/CharLiteral" +// import { ClassDeclaration } from "./peers/ClassDeclaration" +// import { ClassDefinition } from "./peers/ClassDefinition" +// import { ClassExpression } from "./peers/ClassExpression" +// import { ConditionalExpression } from "./peers/ConditionalExpression" +// import { ContinueStatement } from "./peers/ContinueStatement" +// import { DebuggerStatement } from "./peers/DebuggerStatement" +// import { Decorator } from "./peers/Decorator" +// import { DoWhileStatement } from "./peers/DoWhileStatement" +// import { ETSClassLiteral } from "./peers/ETSClassLiteral" +// import { ETSKeyofType } from "./peers/ETSKeyofType" +// import { ETSNewArrayInstanceExpression } from "./peers/ETSNewArrayInstanceExpression" +// import { ETSNewClassInstanceExpression } from "./peers/ETSNewClassInstanceExpression" +// import { ETSNewMultiDimArrayInstanceExpression } from "./peers/ETSNewMultiDimArrayInstanceExpression" +// import { ETSNullType } from "./peers/ETSNullType" +// import { ETSPrimitiveType } from "./peers/ETSPrimitiveType" +// import { ETSTypeReference } from "./peers/ETSTypeReference" +// import { ETSTypeReferencePart } from "./peers/ETSTypeReferencePart" +// import { ETSUndefinedType } from "./peers/ETSUndefinedType" +// import { ETSUnionType } from "./peers/ETSUnionType" +// import { EmptyStatement } from "./peers/EmptyStatement" +// import { Es2pandaMetaPropertyKind } from "./Es2pandaEnums" +// import { Es2pandaPrimitiveType } from "./Es2pandaEnums" +// import { Es2pandaPropertyKind } from "./Es2pandaEnums" +// import { Es2pandaTokenType } from "./Es2pandaEnums" +// import { Es2pandaVariableDeclarationKind } from "./Es2pandaEnums" +// import { ExportAllDeclaration } from "./peers/ExportAllDeclaration" +// import { ExportDefaultDeclaration } from "./peers/ExportDefaultDeclaration" +// import { ExportSpecifier } from "./peers/ExportSpecifier" +// import { Expression } from "./peers/Expression" +// import { ExpressionStatement } from "./peers/ExpressionStatement" +// import { ForInStatement } from "./peers/ForInStatement" +// import { ForOfStatement } from "./peers/ForOfStatement" +// import { ForUpdateStatement } from "./peers/ForUpdateStatement" +// import { FunctionDeclaration } from "./peers/FunctionDeclaration" +// import { FunctionExpression } from "./peers/FunctionExpression" +// import { FunctionSignature } from "./peers/FunctionSignature" +// import { Identifier } from "./peers/Identifier" +// import { IfStatement } from "./peers/IfStatement" +// import { ImportDefaultSpecifier } from "./peers/ImportDefaultSpecifier" +// import { ImportExpression } from "./peers/ImportExpression" +// import { ImportNamespaceSpecifier } from "./peers/ImportNamespaceSpecifier" +// import { ImportSpecifier } from "./peers/ImportSpecifier" +// import { LabelledStatement } from "./peers/LabelledStatement" +// import { MetaProperty } from "./peers/MetaProperty" +// import { NamedType } from "./peers/NamedType" +// import { NewExpression } from "./peers/NewExpression" +// import { NullLiteral } from "./peers/NullLiteral" +// import { OmittedExpression } from "./peers/OmittedExpression" +// import { OpaqueTypeNode } from "./peers/OpaqueTypeNode" +// import { PrefixAssertionExpression } from "./peers/PrefixAssertionExpression" +// import { Property } from "./peers/Property" +// import { ReturnStatement } from "./peers/ReturnStatement" +// import { ScriptFunction } from "./peers/ScriptFunction" +// import { SequenceExpression } from "./peers/SequenceExpression" +// import { Statement } from "./peers/Statement" +// import { StringLiteral } from "./peers/StringLiteral" +// import { SuperExpression } from "./peers/SuperExpression" +// import { SwitchCaseStatement } from "./peers/SwitchCaseStatement" +// import { SwitchStatement } from "./peers/SwitchStatement" +// import { TSAnyKeyword } from "./peers/TSAnyKeyword" +// import { TSArrayType } from "./peers/TSArrayType" +// import { TSAsExpression } from "./peers/TSAsExpression" +// import { TSBigintKeyword } from "./peers/TSBigintKeyword" +// import { TSBooleanKeyword } from "./peers/TSBooleanKeyword" +// import { TSClassImplements } from "./peers/TSClassImplements" +// import { TSConditionalType } from "./peers/TSConditionalType" +// import { TSEnumMember } from "./peers/TSEnumMember" +// import { TSExternalModuleReference } from "./peers/TSExternalModuleReference" +// import { TSImportEqualsDeclaration } from "./peers/TSImportEqualsDeclaration" +// import { TSImportType } from "./peers/TSImportType" +// import { TSIndexSignature } from "./peers/TSIndexSignature" +// import { TSIndexedAccessType } from "./peers/TSIndexedAccessType" +// import { TSInferType } from "./peers/TSInferType" +// import { TSInterfaceBody } from "./peers/TSInterfaceBody" +// import { TSInterfaceHeritage } from "./peers/TSInterfaceHeritage" +// import { TSIntersectionType } from "./peers/TSIntersectionType" +// import { TSLiteralType } from "./peers/TSLiteralType" +// import { TSModuleBlock } from "./peers/TSModuleBlock" +// import { TSNamedTupleMember } from "./peers/TSNamedTupleMember" +// import { TSNeverKeyword } from "./peers/TSNeverKeyword" +// import { TSNonNullExpression } from "./peers/TSNonNullExpression" +// import { TSNullKeyword } from "./peers/TSNullKeyword" +// import { TSNumberKeyword } from "./peers/TSNumberKeyword" +// import { TSObjectKeyword } from "./peers/TSObjectKeyword" +// import { TSQualifiedName } from "./peers/TSQualifiedName" +// import { TSStringKeyword } from "./peers/TSStringKeyword" +// import { TSThisType } from "./peers/TSThisType" +// import { TSTupleType } from "./peers/TSTupleType" +// import { TSTypeAliasDeclaration } from "./peers/TSTypeAliasDeclaration" +// import { TSTypeAssertion } from "./peers/TSTypeAssertion" +// import { TSTypeLiteral } from "./peers/TSTypeLiteral" +// import { TSTypeParameter } from "./peers/TSTypeParameter" +// import { TSTypeParameterDeclaration } from "./peers/TSTypeParameterDeclaration" +// import { TSTypeParameterInstantiation } from "./peers/TSTypeParameterInstantiation" +// import { TSTypePredicate } from "./peers/TSTypePredicate" +// import { TSTypeQuery } from "./peers/TSTypeQuery" +// import { TSTypeReference } from "./peers/TSTypeReference" +// import { TSUndefinedKeyword } from "./peers/TSUndefinedKeyword" +// import { TSUnionType } from "./peers/TSUnionType" +// import { TSUnknownKeyword } from "./peers/TSUnknownKeyword" +// import { TSVoidKeyword } from "./peers/TSVoidKeyword" +// import { TaggedTemplateExpression } from "./peers/TaggedTemplateExpression" +// import { TemplateElement } from "./peers/TemplateElement" +// import { TemplateLiteral } from "./peers/TemplateLiteral" +// import { ThisExpression } from "./peers/ThisExpression" +// import { ThrowStatement } from "./peers/ThrowStatement" +// import { TypeNode } from "./peers/TypeNode" +// import { TypeofExpression } from "./peers/TypeofExpression" +// import { UnaryExpression } from "./peers/UnaryExpression" +// import { UndefinedLiteral } from "./peers/UndefinedLiteral" +// import { UpdateExpression } from "./peers/UpdateExpression" +// import { VariableDeclaration } from "./peers/VariableDeclaration" +// import { VariableDeclarator } from "./peers/VariableDeclarator" +// import { WhileStatement } from "./peers/WhileStatement" +// import { YieldExpression } from "./peers/YieldExpression" +// export const factory = { +// createLabelledStatement(ident?: Identifier, body?: Statement): LabelledStatement { +// return LabelledStatement.createLabelledStatement(ident, body) +// } +// , +// updateLabelledStatement(original: LabelledStatement, ident?: Identifier, body?: Statement): LabelledStatement { +// if (isSameNativeObject(ident, original.ident) && isSameNativeObject(body, original.body)) +// return original +// return updateNodeByNode(LabelledStatement.createLabelledStatement(ident, body), original) +// } +// , +// createThrowStatement(argument?: Expression): ThrowStatement { +// return ThrowStatement.createThrowStatement(argument) +// } +// , +// updateThrowStatement(original: ThrowStatement, argument?: Expression): ThrowStatement { +// if (isSameNativeObject(argument, original.argument)) +// return original +// return updateNodeByNode(ThrowStatement.createThrowStatement(argument), original) +// } +// , +// createTSVoidKeyword(): TSVoidKeyword { +// return TSVoidKeyword.createTSVoidKeyword() +// } +// , +// updateTSVoidKeyword(original: TSVoidKeyword): TSVoidKeyword { +// return updateNodeByNode(TSVoidKeyword.createTSVoidKeyword(), original) +// } +// , +// createIfStatement(test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement { +// return IfStatement.createIfStatement(test, consequent, alternate) +// } +// , +// updateIfStatement(original: IfStatement, test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement { +// if (isSameNativeObject(test, original.test) && isSameNativeObject(consequent, original.consequent) && isSameNativeObject(alternate, original.alternate)) +// return original +// return updateNodeByNode(IfStatement.createIfStatement(test, consequent, alternate), original) +// } +// , +// createDecorator(expr?: Expression): Decorator { +// return Decorator.createDecorator(expr) +// } +// , +// updateDecorator(original: Decorator, expr?: Expression): Decorator { +// if (isSameNativeObject(expr, original.expr)) +// return original +// return updateNodeByNode(Decorator.createDecorator(expr), original) +// } +// , +// createTSNeverKeyword(): TSNeverKeyword { +// return TSNeverKeyword.createTSNeverKeyword() +// } +// , +// updateTSNeverKeyword(original: TSNeverKeyword): TSNeverKeyword { +// return updateNodeByNode(TSNeverKeyword.createTSNeverKeyword(), original) +// } +// , +// createImportDefaultSpecifier(local?: Identifier): ImportDefaultSpecifier { +// return ImportDefaultSpecifier.createImportDefaultSpecifier(local) +// } +// , +// updateImportDefaultSpecifier(original: ImportDefaultSpecifier, local?: Identifier): ImportDefaultSpecifier { +// if (isSameNativeObject(local, original.local)) +// return original +// return updateNodeByNode(ImportDefaultSpecifier.createImportDefaultSpecifier(local), original) +// } +// , +// createImportSpecifier(imported?: Identifier, local?: Identifier): ImportSpecifier { +// return ImportSpecifier.createImportSpecifier(imported, local) +// } +// , +// updateImportSpecifier(original: ImportSpecifier, imported?: Identifier, local?: Identifier): ImportSpecifier { +// if (isSameNativeObject(imported, original.imported) && isSameNativeObject(local, original.local)) +// return original +// return updateNodeByNode(ImportSpecifier.createImportSpecifier(imported, local), original) +// } +// , +// createConditionalExpression(test?: Expression, consequent?: Expression, alternate?: Expression): ConditionalExpression { +// return ConditionalExpression.createConditionalExpression(test, consequent, alternate) +// } +// , +// updateConditionalExpression(original: ConditionalExpression, test?: Expression, consequent?: Expression, alternate?: Expression): ConditionalExpression { +// if (isSameNativeObject(test, original.test) && isSameNativeObject(consequent, original.consequent) && isSameNativeObject(alternate, original.alternate)) +// return original +// return updateNodeByNode(ConditionalExpression.createConditionalExpression(test, consequent, alternate), original) +// } +// , +// createBigIntLiteral(str: string): BigIntLiteral { +// return BigIntLiteral.createBigIntLiteral(str) +// } +// , +// updateBigIntLiteral(original: BigIntLiteral, str: string): BigIntLiteral { +// if (isSameNativeObject(str, original.str)) +// return original +// return updateNodeByNode(BigIntLiteral.createBigIntLiteral(str), original) +// } +// , +// createTSImportType(param: Expression | undefined, typeParams: TSTypeParameterInstantiation | undefined, qualifier: Expression | undefined, isTypeof: boolean): TSImportType { +// return TSImportType.createTSImportType(param, typeParams, qualifier, isTypeof) +// } +// , +// updateTSImportType(original: TSImportType, param: Expression | undefined, typeParams: TSTypeParameterInstantiation | undefined, qualifier: Expression | undefined, isTypeof: boolean): TSImportType { +// if (isSameNativeObject(param, original.param) && isSameNativeObject(typeParams, original.typeParams) && isSameNativeObject(qualifier, original.qualifier) && isSameNativeObject(isTypeof, original.isTypeof)) +// return original +// return updateNodeByNode(TSImportType.createTSImportType(param, typeParams, qualifier, isTypeof), original) +// } +// , +// createTaggedTemplateExpression(tag?: Expression, quasi?: TemplateLiteral, typeParams?: TSTypeParameterInstantiation): TaggedTemplateExpression { +// return TaggedTemplateExpression.createTaggedTemplateExpression(tag, quasi, typeParams) +// } +// , +// updateTaggedTemplateExpression(original: TaggedTemplateExpression, tag?: Expression, quasi?: TemplateLiteral, typeParams?: TSTypeParameterInstantiation): TaggedTemplateExpression { +// if (isSameNativeObject(tag, original.tag) && isSameNativeObject(quasi, original.quasi) && isSameNativeObject(typeParams, original.typeParams)) +// return original +// return updateNodeByNode(TaggedTemplateExpression.createTaggedTemplateExpression(tag, quasi, typeParams), original) +// } +// , +// createFunctionDeclaration(_function: ScriptFunction | undefined, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration { +// return FunctionDeclaration.createFunctionDeclaration(_function, annotations, isAnonymous) +// } +// , +// updateFunctionDeclaration(original: FunctionDeclaration, _function: ScriptFunction | undefined, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration { +// if (isSameNativeObject(_function, original.function) && isSameNativeObject(annotations, original.annotations) && isSameNativeObject(isAnonymous, original.isAnonymous)) +// return original +// return updateNodeByNode(FunctionDeclaration.createFunctionDeclaration(_function, annotations, isAnonymous), original) +// } +// , +// createETSTypeReference(part?: ETSTypeReferencePart): ETSTypeReference { +// return ETSTypeReference.createETSTypeReference(part) +// } +// , +// updateETSTypeReference(original: ETSTypeReference, part?: ETSTypeReferencePart): ETSTypeReference { +// if (isSameNativeObject(part, original.part)) +// return original +// return updateNodeByNode(ETSTypeReference.createETSTypeReference(part), original) +// } +// , +// createTSTypeReference(typeName?: Expression, typeParams?: TSTypeParameterInstantiation): TSTypeReference { +// return TSTypeReference.createTSTypeReference(typeName, typeParams) +// } +// , +// updateTSTypeReference(original: TSTypeReference, typeName?: Expression, typeParams?: TSTypeParameterInstantiation): TSTypeReference { +// if (isSameNativeObject(typeName, original.typeName) && isSameNativeObject(typeParams, original.typeParams)) +// return original +// return updateNodeByNode(TSTypeReference.createTSTypeReference(typeName, typeParams), original) +// } +// , +// createNamedType(name?: Identifier): NamedType { +// return NamedType.createNamedType(name) +// } +// , +// updateNamedType(original: NamedType, name?: Identifier): NamedType { +// if (isSameNativeObject(name, original.name)) +// return original +// return updateNodeByNode(NamedType.createNamedType(name), original) +// } +// , +// createTemplateElement(raw: string, cooked: string): TemplateElement { +// return TemplateElement.create1TemplateElement(raw, cooked) +// } +// , +// updateTemplateElement(original: TemplateElement, raw: string, cooked: string): TemplateElement { +// if (isSameNativeObject(raw, original.raw) && isSameNativeObject(cooked, original.cooked)) +// return original +// return updateNodeByNode(TemplateElement.create1TemplateElement(raw, cooked), original) +// } +// , +// createVariableDeclaration(kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[]): VariableDeclaration { +// return VariableDeclaration.createVariableDeclaration(kind, declarators) +// } +// , +// updateVariableDeclaration(original: VariableDeclaration, kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[]): VariableDeclaration { +// if (isSameNativeObject(kind, original.kind) && isSameNativeObject(declarators, original.declarators)) +// return original +// return updateNodeByNode(VariableDeclaration.createVariableDeclaration(kind, declarators), original) +// } +// , +// createUndefinedLiteral(): UndefinedLiteral { +// return UndefinedLiteral.createUndefinedLiteral() +// } +// , +// updateUndefinedLiteral(original: UndefinedLiteral): UndefinedLiteral { +// return updateNodeByNode(UndefinedLiteral.createUndefinedLiteral(), original) +// } +// , +// createTSClassImplements(expr?: Expression, typeParameters?: TSTypeParameterInstantiation): TSClassImplements { +// return TSClassImplements.createTSClassImplements(expr, typeParameters) +// } +// , +// updateTSClassImplements(original: TSClassImplements, expr?: Expression, typeParameters?: TSTypeParameterInstantiation): TSClassImplements { +// if (isSameNativeObject(expr, original.expr) && isSameNativeObject(typeParameters, original.typeParameters)) +// return original +// return updateNodeByNode(TSClassImplements.createTSClassImplements(expr, typeParameters), original) +// } +// , +// createTSObjectKeyword(): TSObjectKeyword { +// return TSObjectKeyword.createTSObjectKeyword() +// } +// , +// updateTSObjectKeyword(original: TSObjectKeyword): TSObjectKeyword { +// return updateNodeByNode(TSObjectKeyword.createTSObjectKeyword(), original) +// } +// , +// createETSUnionType(types: readonly TypeNode[]): ETSUnionType { +// return ETSUnionType.createETSUnionType(types) +// } +// , +// updateETSUnionType(original: ETSUnionType, types: readonly TypeNode[]): ETSUnionType { +// if (isSameNativeObject(types, original.types)) +// return original +// return updateNodeByNode(ETSUnionType.createETSUnionType(types), original) +// } +// , +// createETSKeyofType(typeRef?: TypeNode): ETSKeyofType { +// return ETSKeyofType.createETSKeyofType(typeRef) +// } +// , +// updateETSKeyofType(original: ETSKeyofType, typeRef?: TypeNode): ETSKeyofType { +// if (isSameNativeObject(typeRef, original.typeRef)) +// return original +// return updateNodeByNode(ETSKeyofType.createETSKeyofType(typeRef), original) +// } +// , +// createTSConditionalType(checkType?: Expression, extendsType?: Expression, trueType?: Expression, falseType?: Expression): TSConditionalType { +// return TSConditionalType.createTSConditionalType(checkType, extendsType, trueType, falseType) +// } +// , +// updateTSConditionalType(original: TSConditionalType, checkType?: Expression, extendsType?: Expression, trueType?: Expression, falseType?: Expression): TSConditionalType { +// if (isSameNativeObject(checkType, original.checkType) && isSameNativeObject(extendsType, original.extendsType) && isSameNativeObject(trueType, original.trueType) && isSameNativeObject(falseType, original.falseType)) +// return original +// return updateNodeByNode(TSConditionalType.createTSConditionalType(checkType, extendsType, trueType, falseType), original) +// } +// , +// createTSLiteralType(literal?: Expression): TSLiteralType { +// return TSLiteralType.createTSLiteralType(literal) +// } +// , +// updateTSLiteralType(original: TSLiteralType, literal?: Expression): TSLiteralType { +// if (isSameNativeObject(literal, original.literal)) +// return original +// return updateNodeByNode(TSLiteralType.createTSLiteralType(literal), original) +// } +// , +// createTSTypeAliasDeclaration(id: Identifier | undefined, typeParams: TSTypeParameterDeclaration | undefined, typeAnnotation: TypeNode): TSTypeAliasDeclaration { +// return TSTypeAliasDeclaration.createTSTypeAliasDeclaration(id, typeParams, typeAnnotation) +// } +// , +// updateTSTypeAliasDeclaration(original: TSTypeAliasDeclaration, id: Identifier | undefined, typeParams: TSTypeParameterDeclaration | undefined, typeAnnotation: TypeNode): TSTypeAliasDeclaration { +// if (isSameNativeObject(id, original.id) && isSameNativeObject(typeParams, original.typeParams) && isSameNativeObject(typeAnnotation, original.typeAnnotation)) +// return original +// return updateNodeByNode(TSTypeAliasDeclaration.createTSTypeAliasDeclaration(id, typeParams, typeAnnotation), original) +// } +// , +// createDebuggerStatement(): DebuggerStatement { +// return DebuggerStatement.createDebuggerStatement() +// } +// , +// updateDebuggerStatement(original: DebuggerStatement): DebuggerStatement { +// return updateNodeByNode(DebuggerStatement.createDebuggerStatement(), original) +// } +// , +// createReturnStatement(argument?: Expression): ReturnStatement { +// return ReturnStatement.create1ReturnStatement(argument) +// } +// , +// updateReturnStatement(original: ReturnStatement, argument?: Expression): ReturnStatement { +// if (isSameNativeObject(argument, original.argument)) +// return original +// return updateNodeByNode(ReturnStatement.create1ReturnStatement(argument), original) +// } +// , +// createExportDefaultDeclaration(decl: AstNode | undefined, isExportEquals: boolean): ExportDefaultDeclaration { +// return ExportDefaultDeclaration.createExportDefaultDeclaration(decl, isExportEquals) +// } +// , +// updateExportDefaultDeclaration(original: ExportDefaultDeclaration, decl: AstNode | undefined, isExportEquals: boolean): ExportDefaultDeclaration { +// if (isSameNativeObject(decl, original.decl) && isSameNativeObject(isExportEquals, original.isExportEquals)) +// return original +// return updateNodeByNode(ExportDefaultDeclaration.createExportDefaultDeclaration(decl, isExportEquals), original) +// } +// , +// createTSInterfaceBody(body: readonly AstNode[]): TSInterfaceBody { +// return TSInterfaceBody.createTSInterfaceBody(body) +// } +// , +// updateTSInterfaceBody(original: TSInterfaceBody, body: readonly AstNode[]): TSInterfaceBody { +// if (isSameNativeObject(body, original.body)) +// return original +// return updateNodeByNode(TSInterfaceBody.createTSInterfaceBody(body), original) +// } +// , +// createTSTypeQuery(exprName?: Expression): TSTypeQuery { +// return TSTypeQuery.createTSTypeQuery(exprName) +// } +// , +// updateTSTypeQuery(original: TSTypeQuery, exprName?: Expression): TSTypeQuery { +// if (isSameNativeObject(exprName, original.exprName)) +// return original +// return updateNodeByNode(TSTypeQuery.createTSTypeQuery(exprName), original) +// } +// , +// createTSBigintKeyword(): TSBigintKeyword { +// return TSBigintKeyword.createTSBigintKeyword() +// } +// , +// updateTSBigintKeyword(original: TSBigintKeyword): TSBigintKeyword { +// return updateNodeByNode(TSBigintKeyword.createTSBigintKeyword(), original) +// } +// , +// createProperty(kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property { +// return Property.create1Property(kind, key, value, isMethod, isComputed) +// } +// , +// updateProperty(original: Property, kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property { +// if (isSameNativeObject(kind, original.kind) && isSameNativeObject(key, original.key) && isSameNativeObject(value, original.value) && isSameNativeObject(isMethod, original.isMethod) && isSameNativeObject(isComputed, original.isComputed)) +// return original +// return updateNodeByNode(Property.create1Property(kind, key, value, isMethod, isComputed), original) +// } +// , +// createStringLiteral(str: string): StringLiteral { +// return StringLiteral.create1StringLiteral(str) +// } +// , +// updateStringLiteral(original: StringLiteral, str: string): StringLiteral { +// if (isSameNativeObject(str, original.str)) +// return original +// return updateNodeByNode(StringLiteral.create1StringLiteral(str), original) +// } +// , +// createTSTypeAssertion(typeAnnotation?: TypeNode, expression?: Expression): TSTypeAssertion { +// return TSTypeAssertion.createTSTypeAssertion(typeAnnotation, expression) +// } +// , +// updateTSTypeAssertion(original: TSTypeAssertion, typeAnnotation?: TypeNode, expression?: Expression): TSTypeAssertion { +// if (isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(expression, original.expression)) +// return original +// return updateNodeByNode(TSTypeAssertion.createTSTypeAssertion(typeAnnotation, expression), original) +// } +// , +// createTSExternalModuleReference(expr?: Expression): TSExternalModuleReference { +// return TSExternalModuleReference.createTSExternalModuleReference(expr) +// } +// , +// updateTSExternalModuleReference(original: TSExternalModuleReference, expr?: Expression): TSExternalModuleReference { +// if (isSameNativeObject(expr, original.expr)) +// return original +// return updateNodeByNode(TSExternalModuleReference.createTSExternalModuleReference(expr), original) +// } +// , +// createTSUndefinedKeyword(): TSUndefinedKeyword { +// return TSUndefinedKeyword.createTSUndefinedKeyword() +// } +// , +// updateTSUndefinedKeyword(original: TSUndefinedKeyword): TSUndefinedKeyword { +// return updateNodeByNode(TSUndefinedKeyword.createTSUndefinedKeyword(), original) +// } +// , +// createUnaryExpression(argument: Expression | undefined, operatorType: Es2pandaTokenType): UnaryExpression { +// return UnaryExpression.createUnaryExpression(argument, operatorType) +// } +// , +// updateUnaryExpression(original: UnaryExpression, argument: Expression | undefined, operatorType: Es2pandaTokenType): UnaryExpression { +// if (isSameNativeObject(argument, original.argument) && isSameNativeObject(operatorType, original.operatorType)) +// return original +// return updateNodeByNode(UnaryExpression.createUnaryExpression(argument, operatorType), original) +// } +// , +// createForInStatement(left?: AstNode, right?: Expression, body?: Statement): ForInStatement { +// return ForInStatement.createForInStatement(left, right, body) +// } +// , +// updateForInStatement(original: ForInStatement, left?: AstNode, right?: Expression, body?: Statement): ForInStatement { +// if (isSameNativeObject(left, original.left) && isSameNativeObject(right, original.right) && isSameNativeObject(body, original.body)) +// return original +// return updateNodeByNode(ForInStatement.createForInStatement(left, right, body), original) +// } +// , +// createThisExpression(): ThisExpression { +// return ThisExpression.createThisExpression() +// } +// , +// updateThisExpression(original: ThisExpression): ThisExpression { +// return updateNodeByNode(ThisExpression.createThisExpression(), original) +// } +// , +// createBinaryExpression(left: Expression | undefined, right: Expression | undefined, operatorType: Es2pandaTokenType): BinaryExpression { +// return BinaryExpression.createBinaryExpression(left, right, operatorType) +// } +// , +// updateBinaryExpression(original: BinaryExpression, left: Expression | undefined, right: Expression | undefined, operatorType: Es2pandaTokenType): BinaryExpression { +// if (isSameNativeObject(left, original.left) && isSameNativeObject(right, original.right) && isSameNativeObject(operatorType, original.operatorType)) +// return original +// return updateNodeByNode(BinaryExpression.createBinaryExpression(left, right, operatorType), original) +// } +// , +// createSuperExpression(): SuperExpression { +// return SuperExpression.createSuperExpression() +// } +// , +// updateSuperExpression(original: SuperExpression): SuperExpression { +// return updateNodeByNode(SuperExpression.createSuperExpression(), original) +// } +// , +// createAssertStatement(test?: Expression, second?: Expression): AssertStatement { +// return AssertStatement.createAssertStatement(test, second) +// } +// , +// updateAssertStatement(original: AssertStatement, test?: Expression, second?: Expression): AssertStatement { +// if (isSameNativeObject(test, original.test) && isSameNativeObject(second, original.second)) +// return original +// return updateNodeByNode(AssertStatement.createAssertStatement(test, second), original) +// } +// , +// createTSStringKeyword(): TSStringKeyword { +// return TSStringKeyword.createTSStringKeyword() +// } +// , +// updateTSStringKeyword(original: TSStringKeyword): TSStringKeyword { +// return updateNodeByNode(TSStringKeyword.createTSStringKeyword(), original) +// } +// , +// createExpressionStatement(expression?: Expression): ExpressionStatement { +// return ExpressionStatement.createExpressionStatement(expression) +// } +// , +// updateExpressionStatement(original: ExpressionStatement, expression?: Expression): ExpressionStatement { +// if (isSameNativeObject(expression, original.expression)) +// return original +// return updateNodeByNode(ExpressionStatement.createExpressionStatement(expression), original) +// } +// , +// createMetaProperty(kind: Es2pandaMetaPropertyKind): MetaProperty { +// return MetaProperty.createMetaProperty(kind) +// } +// , +// updateMetaProperty(original: MetaProperty, kind: Es2pandaMetaPropertyKind): MetaProperty { +// if (isSameNativeObject(kind, original.kind)) +// return original +// return updateNodeByNode(MetaProperty.createMetaProperty(kind), original) +// } +// , +// createTSArrayType(elementType?: TypeNode): TSArrayType { +// return TSArrayType.createTSArrayType(elementType) +// } +// , +// updateTSArrayType(original: TSArrayType, elementType?: TypeNode): TSArrayType { +// if (isSameNativeObject(elementType, original.elementType)) +// return original +// return updateNodeByNode(TSArrayType.createTSArrayType(elementType), original) +// } +// , +// createExportAllDeclaration(source?: StringLiteral, exported?: Identifier): ExportAllDeclaration { +// return ExportAllDeclaration.createExportAllDeclaration(source, exported) +// } +// , +// updateExportAllDeclaration(original: ExportAllDeclaration, source?: StringLiteral, exported?: Identifier): ExportAllDeclaration { +// if (isSameNativeObject(source, original.source) && isSameNativeObject(exported, original.exported)) +// return original +// return updateNodeByNode(ExportAllDeclaration.createExportAllDeclaration(source, exported), original) +// } +// , +// createExportSpecifier(local?: Identifier, exported?: Identifier): ExportSpecifier { +// return ExportSpecifier.createExportSpecifier(local, exported) +// } +// , +// updateExportSpecifier(original: ExportSpecifier, local?: Identifier, exported?: Identifier): ExportSpecifier { +// if (isSameNativeObject(local, original.local) && isSameNativeObject(exported, original.exported)) +// return original +// return updateNodeByNode(ExportSpecifier.createExportSpecifier(local, exported), original) +// } +// , +// createTSTupleType(elementType: readonly TypeNode[]): TSTupleType { +// return TSTupleType.createTSTupleType(elementType) +// } +// , +// updateTSTupleType(original: TSTupleType, elementType: readonly TypeNode[]): TSTupleType { +// if (isSameNativeObject(elementType, original.elementType)) +// return original +// return updateNodeByNode(TSTupleType.createTSTupleType(elementType), original) +// } +// , +// createFunctionExpression(id?: Identifier, _function?: ScriptFunction): FunctionExpression { +// return FunctionExpression.create1FunctionExpression(id, _function) +// } +// , +// updateFunctionExpression(original: FunctionExpression, id?: Identifier, _function?: ScriptFunction): FunctionExpression { +// if (isSameNativeObject(id, original.id) && isSameNativeObject(_function, original.function)) +// return original +// return updateNodeByNode(FunctionExpression.create1FunctionExpression(id, _function), original) +// } +// , +// createTSIndexSignature(param: Expression | undefined, typeAnnotation: TypeNode | undefined, readonly: boolean): TSIndexSignature { +// return TSIndexSignature.createTSIndexSignature(param, typeAnnotation, readonly) +// } +// , +// updateTSIndexSignature(original: TSIndexSignature, param: Expression | undefined, typeAnnotation: TypeNode | undefined, readonly: boolean): TSIndexSignature { +// if (isSameNativeObject(param, original.param) && isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(readonly, original.readonly)) +// return original +// return updateNodeByNode(TSIndexSignature.createTSIndexSignature(param, typeAnnotation, readonly), original) +// } +// , +// createCharLiteral(): CharLiteral { +// return CharLiteral.createCharLiteral() +// } +// , +// updateCharLiteral(original: CharLiteral): CharLiteral { +// return updateNodeByNode(CharLiteral.createCharLiteral(), original) +// } +// , +// createTSModuleBlock(statements: readonly Statement[]): TSModuleBlock { +// return TSModuleBlock.createTSModuleBlock(statements) +// } +// , +// updateTSModuleBlock(original: TSModuleBlock, statements: readonly Statement[]): TSModuleBlock { +// if (isSameNativeObject(statements, original.statements)) +// return original +// return updateNodeByNode(TSModuleBlock.createTSModuleBlock(statements), original) +// } +// , +// createETSNewArrayInstanceExpression(typeReference?: TypeNode, dimension?: Expression): ETSNewArrayInstanceExpression { +// return ETSNewArrayInstanceExpression.createETSNewArrayInstanceExpression(typeReference, dimension) +// } +// , +// updateETSNewArrayInstanceExpression(original: ETSNewArrayInstanceExpression, typeReference?: TypeNode, dimension?: Expression): ETSNewArrayInstanceExpression { +// if (isSameNativeObject(typeReference, original.typeReference) && isSameNativeObject(dimension, original.dimension)) +// return original +// return updateNodeByNode(ETSNewArrayInstanceExpression.createETSNewArrayInstanceExpression(typeReference, dimension), original) +// } +// , +// createAnnotationDeclaration(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationDeclaration { +// return AnnotationDeclaration.create1AnnotationDeclaration(expr, properties) +// } +// , +// updateAnnotationDeclaration(original: AnnotationDeclaration, expr: Expression | undefined, properties: readonly AstNode[]): AnnotationDeclaration { +// if (isSameNativeObject(expr, original.expr) && isSameNativeObject(properties, original.properties)) +// return original +// return updateNodeByNode(AnnotationDeclaration.create1AnnotationDeclaration(expr, properties), original) +// } +// , +// createAnnotationUsage(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage { +// return AnnotationUsage.create1AnnotationUsage(expr, properties) +// } +// , +// updateAnnotationUsage(original: AnnotationUsage, expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage { +// if (isSameNativeObject(expr, original.expr) && isSameNativeObject(properties, original.properties)) +// return original +// return updateNodeByNode(AnnotationUsage.create1AnnotationUsage(expr, properties), original) +// } +// , +// createEmptyStatement(isBrokenStatement: boolean): EmptyStatement { +// return EmptyStatement.create1EmptyStatement(isBrokenStatement) +// } +// , +// updateEmptyStatement(original: EmptyStatement, isBrokenStatement: boolean): EmptyStatement { +// if (isSameNativeObject(isBrokenStatement, original.isBrokenStatement)) +// return original +// return updateNodeByNode(EmptyStatement.create1EmptyStatement(isBrokenStatement), original) +// } +// , +// createWhileStatement(test?: Expression, body?: Statement): WhileStatement { +// return WhileStatement.createWhileStatement(test, body) +// } +// , +// updateWhileStatement(original: WhileStatement, test?: Expression, body?: Statement): WhileStatement { +// if (isSameNativeObject(test, original.test) && isSameNativeObject(body, original.body)) +// return original +// return updateNodeByNode(WhileStatement.createWhileStatement(test, body), original) +// } +// , +// createFunctionSignature(typeParams: TSTypeParameterDeclaration | undefined, params: readonly Expression[], returnType: TypeNode | undefined, hasReceiver: boolean): FunctionSignature { +// return FunctionSignature.createFunctionSignature(typeParams, params, returnType, hasReceiver) +// } +// , +// updateFunctionSignature(original: FunctionSignature, typeParams: TSTypeParameterDeclaration | undefined, params: readonly Expression[], returnType: TypeNode | undefined, hasReceiver: boolean): FunctionSignature { +// if (isSameNativeObject(typeParams, original.typeParams) && isSameNativeObject(params, original.params) && isSameNativeObject(returnType, original.returnType) && isSameNativeObject(hasReceiver, original.hasReceiver)) +// return original +// return updateNodeByNode(FunctionSignature.createFunctionSignature(typeParams, params, returnType, hasReceiver), original) +// } +// , +// createChainExpression(expression?: Expression): ChainExpression { +// return ChainExpression.createChainExpression(expression) +// } +// , +// updateChainExpression(original: ChainExpression, expression?: Expression): ChainExpression { +// if (isSameNativeObject(expression, original.expression)) +// return original +// return updateNodeByNode(ChainExpression.createChainExpression(expression), original) +// } +// , +// createTSIntersectionType(types: readonly Expression[]): TSIntersectionType { +// return TSIntersectionType.createTSIntersectionType(types) +// } +// , +// updateTSIntersectionType(original: TSIntersectionType, types: readonly Expression[]): TSIntersectionType { +// if (isSameNativeObject(types, original.types)) +// return original +// return updateNodeByNode(TSIntersectionType.createTSIntersectionType(types), original) +// } +// , +// createUpdateExpression(argument: Expression | undefined, operatorType: Es2pandaTokenType, isPrefix: boolean): UpdateExpression { +// return UpdateExpression.createUpdateExpression(argument, operatorType, isPrefix) +// } +// , +// updateUpdateExpression(original: UpdateExpression, argument: Expression | undefined, operatorType: Es2pandaTokenType, isPrefix: boolean): UpdateExpression { +// if (isSameNativeObject(argument, original.argument) && isSameNativeObject(operatorType, original.operatorType) && isSameNativeObject(isPrefix, original.isPrefix)) +// return original +// return updateNodeByNode(UpdateExpression.createUpdateExpression(argument, operatorType, isPrefix), original) +// } +// , +// createBlockExpression(statements: readonly Statement[]): BlockExpression { +// return BlockExpression.createBlockExpression(statements) +// } +// , +// updateBlockExpression(original: BlockExpression, statements: readonly Statement[]): BlockExpression { +// if (isSameNativeObject(statements, original.statements)) +// return original +// return updateNodeByNode(BlockExpression.createBlockExpression(statements), original) +// } +// , +// createTSTypeLiteral(members: readonly AstNode[]): TSTypeLiteral { +// return TSTypeLiteral.createTSTypeLiteral(members) +// } +// , +// updateTSTypeLiteral(original: TSTypeLiteral, members: readonly AstNode[]): TSTypeLiteral { +// if (isSameNativeObject(members, original.members)) +// return original +// return updateNodeByNode(TSTypeLiteral.createTSTypeLiteral(members), original) +// } +// , +// createTSBooleanKeyword(): TSBooleanKeyword { +// return TSBooleanKeyword.createTSBooleanKeyword() +// } +// , +// updateTSBooleanKeyword(original: TSBooleanKeyword): TSBooleanKeyword { +// return updateNodeByNode(TSBooleanKeyword.createTSBooleanKeyword(), original) +// } +// , +// createTSTypePredicate(parameterName: Expression | undefined, typeAnnotation: TypeNode | undefined, asserts: boolean): TSTypePredicate { +// return TSTypePredicate.createTSTypePredicate(parameterName, typeAnnotation, asserts) +// } +// , +// updateTSTypePredicate(original: TSTypePredicate, parameterName: Expression | undefined, typeAnnotation: TypeNode | undefined, asserts: boolean): TSTypePredicate { +// if (isSameNativeObject(parameterName, original.parameterName) && isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(asserts, original.asserts)) +// return original +// return updateNodeByNode(TSTypePredicate.createTSTypePredicate(parameterName, typeAnnotation, asserts), original) +// } +// , +// createImportNamespaceSpecifier(local?: Identifier): ImportNamespaceSpecifier { +// return ImportNamespaceSpecifier.createImportNamespaceSpecifier(local) +// } +// , +// updateImportNamespaceSpecifier(original: ImportNamespaceSpecifier, local?: Identifier): ImportNamespaceSpecifier { +// if (isSameNativeObject(local, original.local)) +// return original +// return updateNodeByNode(ImportNamespaceSpecifier.createImportNamespaceSpecifier(local), original) +// } +// , +// createTSTypeParameterInstantiation(params: readonly TypeNode[]): TSTypeParameterInstantiation { +// return TSTypeParameterInstantiation.createTSTypeParameterInstantiation(params) +// } +// , +// updateTSTypeParameterInstantiation(original: TSTypeParameterInstantiation, params: readonly TypeNode[]): TSTypeParameterInstantiation { +// if (isSameNativeObject(params, original.params)) +// return original +// return updateNodeByNode(TSTypeParameterInstantiation.createTSTypeParameterInstantiation(params), original) +// } +// , +// createNullLiteral(): NullLiteral { +// return NullLiteral.createNullLiteral() +// } +// , +// updateNullLiteral(original: NullLiteral): NullLiteral { +// return updateNodeByNode(NullLiteral.createNullLiteral(), original) +// } +// , +// createTSInferType(typeParam?: TSTypeParameter): TSInferType { +// return TSInferType.createTSInferType(typeParam) +// } +// , +// updateTSInferType(original: TSInferType, typeParam?: TSTypeParameter): TSInferType { +// if (isSameNativeObject(typeParam, original.typeParam)) +// return original +// return updateNodeByNode(TSInferType.createTSInferType(typeParam), original) +// } +// , +// createSwitchCaseStatement(test: Expression | undefined, consequent: readonly Statement[]): SwitchCaseStatement { +// return SwitchCaseStatement.createSwitchCaseStatement(test, consequent) +// } +// , +// updateSwitchCaseStatement(original: SwitchCaseStatement, test: Expression | undefined, consequent: readonly Statement[]): SwitchCaseStatement { +// if (isSameNativeObject(test, original.test) && isSameNativeObject(consequent, original.consequent)) +// return original +// return updateNodeByNode(SwitchCaseStatement.createSwitchCaseStatement(test, consequent), original) +// } +// , +// createYieldExpression(argument: Expression | undefined, hasDelegate: boolean): YieldExpression { +// return YieldExpression.createYieldExpression(argument, hasDelegate) +// } +// , +// updateYieldExpression(original: YieldExpression, argument: Expression | undefined, hasDelegate: boolean): YieldExpression { +// if (isSameNativeObject(argument, original.argument) && isSameNativeObject(hasDelegate, original.hasDelegate)) +// return original +// return updateNodeByNode(YieldExpression.createYieldExpression(argument, hasDelegate), original) +// } +// , +// createTSImportEqualsDeclaration(id: Identifier | undefined, moduleReference: Expression | undefined, isExport: boolean): TSImportEqualsDeclaration { +// return TSImportEqualsDeclaration.createTSImportEqualsDeclaration(id, moduleReference, isExport) +// } +// , +// updateTSImportEqualsDeclaration(original: TSImportEqualsDeclaration, id: Identifier | undefined, moduleReference: Expression | undefined, isExport: boolean): TSImportEqualsDeclaration { +// if (isSameNativeObject(id, original.id) && isSameNativeObject(moduleReference, original.moduleReference) && isSameNativeObject(isExport, original.isExport)) +// return original +// return updateNodeByNode(TSImportEqualsDeclaration.createTSImportEqualsDeclaration(id, moduleReference, isExport), original) +// } +// , +// createBooleanLiteral(value: boolean): BooleanLiteral { +// return BooleanLiteral.createBooleanLiteral(value) +// } +// , +// updateBooleanLiteral(original: BooleanLiteral, value: boolean): BooleanLiteral { +// if (isSameNativeObject(value, original.value)) +// return original +// return updateNodeByNode(BooleanLiteral.createBooleanLiteral(value), original) +// } +// , +// createTSNumberKeyword(): TSNumberKeyword { +// return TSNumberKeyword.createTSNumberKeyword() +// } +// , +// updateTSNumberKeyword(original: TSNumberKeyword): TSNumberKeyword { +// return updateNodeByNode(TSNumberKeyword.createTSNumberKeyword(), original) +// } +// , +// createTSNonNullExpression(expr?: Expression): TSNonNullExpression { +// return TSNonNullExpression.createTSNonNullExpression(expr) +// } +// , +// updateTSNonNullExpression(original: TSNonNullExpression, expr?: Expression): TSNonNullExpression { +// if (isSameNativeObject(expr, original.expr)) +// return original +// return updateNodeByNode(TSNonNullExpression.createTSNonNullExpression(expr), original) +// } +// , +// createPrefixAssertionExpression(expr?: Expression, type?: TypeNode): PrefixAssertionExpression { +// return PrefixAssertionExpression.createPrefixAssertionExpression(expr, type) +// } +// , +// updatePrefixAssertionExpression(original: PrefixAssertionExpression, expr?: Expression, type?: TypeNode): PrefixAssertionExpression { +// if (isSameNativeObject(expr, original.expr) && isSameNativeObject(type, original.type)) +// return original +// return updateNodeByNode(PrefixAssertionExpression.createPrefixAssertionExpression(expr, type), original) +// } +// , +// createClassExpression(definition?: ClassDefinition): ClassExpression { +// return ClassExpression.createClassExpression(definition) +// } +// , +// updateClassExpression(original: ClassExpression, definition?: ClassDefinition): ClassExpression { +// if (isSameNativeObject(definition, original.definition)) +// return original +// return updateNodeByNode(ClassExpression.createClassExpression(definition), original) +// } +// , +// createForOfStatement(left: AstNode | undefined, right: Expression | undefined, body: Statement | undefined, isAwait: boolean): ForOfStatement { +// return ForOfStatement.createForOfStatement(left, right, body, isAwait) +// } +// , +// updateForOfStatement(original: ForOfStatement, left: AstNode | undefined, right: Expression | undefined, body: Statement | undefined, isAwait: boolean): ForOfStatement { +// if (isSameNativeObject(left, original.left) && isSameNativeObject(right, original.right) && isSameNativeObject(body, original.body) && isSameNativeObject(isAwait, original.isAwait)) +// return original +// return updateNodeByNode(ForOfStatement.createForOfStatement(left, right, body, isAwait), original) +// } +// , +// createTemplateLiteral(quasis: readonly TemplateElement[], expressions: readonly Expression[], multilineString: string): TemplateLiteral { +// return TemplateLiteral.createTemplateLiteral(quasis, expressions, multilineString) +// } +// , +// updateTemplateLiteral(original: TemplateLiteral, quasis: readonly TemplateElement[], expressions: readonly Expression[], multilineString: string): TemplateLiteral { +// if (isSameNativeObject(quasis, original.quasis) && isSameNativeObject(expressions, original.expressions) && isSameNativeObject(multilineString, original.multilineString)) +// return original +// return updateNodeByNode(TemplateLiteral.createTemplateLiteral(quasis, expressions, multilineString), original) +// } +// , +// createTSUnionType(types: readonly TypeNode[]): TSUnionType { +// return TSUnionType.createTSUnionType(types) +// } +// , +// updateTSUnionType(original: TSUnionType, types: readonly TypeNode[]): TSUnionType { +// if (isSameNativeObject(types, original.types)) +// return original +// return updateNodeByNode(TSUnionType.createTSUnionType(types), original) +// } +// , +// createTSUnknownKeyword(): TSUnknownKeyword { +// return TSUnknownKeyword.createTSUnknownKeyword() +// } +// , +// updateTSUnknownKeyword(original: TSUnknownKeyword): TSUnknownKeyword { +// return updateNodeByNode(TSUnknownKeyword.createTSUnknownKeyword(), original) +// } +// , +// createIdentifier(name: string, typeAnnotation?: TypeNode): Identifier { +// return Identifier.create2Identifier(name, typeAnnotation) +// } +// , +// updateIdentifier(original: Identifier, name: string, typeAnnotation?: TypeNode): Identifier { +// if (isSameNativeObject(name, original.name) && isSameNativeObject(typeAnnotation, original.typeAnnotation)) +// return original +// return updateNodeByNode(Identifier.create2Identifier(name, typeAnnotation), original) +// } +// , +// createOpaqueTypeNode(): OpaqueTypeNode { +// return OpaqueTypeNode.create1OpaqueTypeNode() +// } +// , +// updateOpaqueTypeNode(original: OpaqueTypeNode): OpaqueTypeNode { +// return updateNodeByNode(OpaqueTypeNode.create1OpaqueTypeNode(), original) +// } +// , +// createTSTypeParameterDeclaration(params: readonly TSTypeParameter[], requiredParams: number): TSTypeParameterDeclaration { +// return TSTypeParameterDeclaration.createTSTypeParameterDeclaration(params, requiredParams) +// } +// , +// updateTSTypeParameterDeclaration(original: TSTypeParameterDeclaration, params: readonly TSTypeParameter[], requiredParams: number): TSTypeParameterDeclaration { +// if (isSameNativeObject(params, original.params) && isSameNativeObject(requiredParams, original.requiredParams)) +// return original +// return updateNodeByNode(TSTypeParameterDeclaration.createTSTypeParameterDeclaration(params, requiredParams), original) +// } +// , +// createTSNullKeyword(): TSNullKeyword { +// return TSNullKeyword.createTSNullKeyword() +// } +// , +// updateTSNullKeyword(original: TSNullKeyword): TSNullKeyword { +// return updateNodeByNode(TSNullKeyword.createTSNullKeyword(), original) +// } +// , +// createTSInterfaceHeritage(expr?: TypeNode): TSInterfaceHeritage { +// return TSInterfaceHeritage.createTSInterfaceHeritage(expr) +// } +// , +// updateTSInterfaceHeritage(original: TSInterfaceHeritage, expr?: TypeNode): TSInterfaceHeritage { +// if (isSameNativeObject(expr, original.expr)) +// return original +// return updateNodeByNode(TSInterfaceHeritage.createTSInterfaceHeritage(expr), original) +// } +// , +// createETSClassLiteral(expr?: TypeNode): ETSClassLiteral { +// return ETSClassLiteral.createETSClassLiteral(expr) +// } +// , +// updateETSClassLiteral(original: ETSClassLiteral, expr?: TypeNode): ETSClassLiteral { +// if (isSameNativeObject(expr, original.expr)) +// return original +// return updateNodeByNode(ETSClassLiteral.createETSClassLiteral(expr), original) +// } +// , +// createBreakStatement(ident?: Identifier): BreakStatement { +// return BreakStatement.create1BreakStatement(ident) +// } +// , +// updateBreakStatement(original: BreakStatement, ident?: Identifier): BreakStatement { +// if (isSameNativeObject(ident, original.ident)) +// return original +// return updateNodeByNode(BreakStatement.create1BreakStatement(ident), original) +// } +// , +// createTSAnyKeyword(): TSAnyKeyword { +// return TSAnyKeyword.createTSAnyKeyword() +// } +// , +// updateTSAnyKeyword(original: TSAnyKeyword): TSAnyKeyword { +// return updateNodeByNode(TSAnyKeyword.createTSAnyKeyword(), original) +// } +// , +// createClassDeclaration(definition?: ClassDefinition): ClassDeclaration { +// return ClassDeclaration.createClassDeclaration(definition) +// } +// , +// updateClassDeclaration(original: ClassDeclaration, definition?: ClassDefinition): ClassDeclaration { +// if (isSameNativeObject(definition, original.definition)) +// return original +// return updateNodeByNode(ClassDeclaration.createClassDeclaration(definition), original) +// } +// , +// createTSIndexedAccessType(objectType?: TypeNode, indexType?: TypeNode): TSIndexedAccessType { +// return TSIndexedAccessType.createTSIndexedAccessType(objectType, indexType) +// } +// , +// updateTSIndexedAccessType(original: TSIndexedAccessType, objectType?: TypeNode, indexType?: TypeNode): TSIndexedAccessType { +// if (isSameNativeObject(objectType, original.objectType) && isSameNativeObject(indexType, original.indexType)) +// return original +// return updateNodeByNode(TSIndexedAccessType.createTSIndexedAccessType(objectType, indexType), original) +// } +// , +// createTSQualifiedName(left?: Expression, right?: Identifier): TSQualifiedName { +// return TSQualifiedName.createTSQualifiedName(left, right) +// } +// , +// updateTSQualifiedName(original: TSQualifiedName, left?: Expression, right?: Identifier): TSQualifiedName { +// if (isSameNativeObject(left, original.left) && isSameNativeObject(right, original.right)) +// return original +// return updateNodeByNode(TSQualifiedName.createTSQualifiedName(left, right), original) +// } +// , +// createAwaitExpression(argument?: Expression): AwaitExpression { +// return AwaitExpression.createAwaitExpression(argument) +// } +// , +// updateAwaitExpression(original: AwaitExpression, argument?: Expression): AwaitExpression { +// if (isSameNativeObject(argument, original.argument)) +// return original +// return updateNodeByNode(AwaitExpression.createAwaitExpression(argument), original) +// } +// , +// createContinueStatement(ident?: Identifier): ContinueStatement { +// return ContinueStatement.create1ContinueStatement(ident) +// } +// , +// updateContinueStatement(original: ContinueStatement, ident?: Identifier): ContinueStatement { +// if (isSameNativeObject(ident, original.ident)) +// return original +// return updateNodeByNode(ContinueStatement.create1ContinueStatement(ident), original) +// } +// , +// createETSNewMultiDimArrayInstanceExpression(typeReference: TypeNode | undefined, dimensions: readonly Expression[]): ETSNewMultiDimArrayInstanceExpression { +// return ETSNewMultiDimArrayInstanceExpression.createETSNewMultiDimArrayInstanceExpression(typeReference, dimensions) +// } +// , +// updateETSNewMultiDimArrayInstanceExpression(original: ETSNewMultiDimArrayInstanceExpression, typeReference: TypeNode | undefined, dimensions: readonly Expression[]): ETSNewMultiDimArrayInstanceExpression { +// if (isSameNativeObject(typeReference, original.typeReference) && isSameNativeObject(dimensions, original.dimensions)) +// return original +// return updateNodeByNode(ETSNewMultiDimArrayInstanceExpression.createETSNewMultiDimArrayInstanceExpression(typeReference, dimensions), original) +// } +// , +// createTSNamedTupleMember(label: Expression | undefined, elementType: TypeNode | undefined, isOptional: boolean): TSNamedTupleMember { +// return TSNamedTupleMember.createTSNamedTupleMember(label, elementType, isOptional) +// } +// , +// updateTSNamedTupleMember(original: TSNamedTupleMember, label: Expression | undefined, elementType: TypeNode | undefined, isOptional: boolean): TSNamedTupleMember { +// if (isSameNativeObject(label, original.label) && isSameNativeObject(elementType, original.elementType) && isSameNativeObject(isOptional, original.isOptional)) +// return original +// return updateNodeByNode(TSNamedTupleMember.createTSNamedTupleMember(label, elementType, isOptional), original) +// } +// , +// createImportExpression(source?: Expression): ImportExpression { +// return ImportExpression.createImportExpression(source) +// } +// , +// updateImportExpression(original: ImportExpression, source?: Expression): ImportExpression { +// if (isSameNativeObject(source, original.source)) +// return original +// return updateNodeByNode(ImportExpression.createImportExpression(source), original) +// } +// , +// createETSNullType(): ETSNullType { +// return ETSNullType.createETSNullType() +// } +// , +// updateETSNullType(original: ETSNullType): ETSNullType { +// return updateNodeByNode(ETSNullType.createETSNullType(), original) +// } +// , +// createETSUndefinedType(): ETSUndefinedType { +// return ETSUndefinedType.createETSUndefinedType() +// } +// , +// updateETSUndefinedType(original: ETSUndefinedType): ETSUndefinedType { +// return updateNodeByNode(ETSUndefinedType.createETSUndefinedType(), original) +// } +// , +// createTypeofExpression(argument?: Expression): TypeofExpression { +// return TypeofExpression.createTypeofExpression(argument) +// } +// , +// updateTypeofExpression(original: TypeofExpression, argument?: Expression): TypeofExpression { +// if (isSameNativeObject(argument, original.argument)) +// return original +// return updateNodeByNode(TypeofExpression.createTypeofExpression(argument), original) +// } +// , +// createTSEnumMember(key: Expression | undefined, init: Expression | undefined, isGenerated: boolean): TSEnumMember { +// return TSEnumMember.create1TSEnumMember(key, init, isGenerated) +// } +// , +// updateTSEnumMember(original: TSEnumMember, key: Expression | undefined, init: Expression | undefined, isGenerated: boolean): TSEnumMember { +// if (isSameNativeObject(key, original.key) && isSameNativeObject(init, original.init) && isSameNativeObject(isGenerated, original.isGenerated)) +// return original +// return updateNodeByNode(TSEnumMember.create1TSEnumMember(key, init, isGenerated), original) +// } +// , +// createSwitchStatement(discriminant: Expression | undefined, cases: readonly SwitchCaseStatement[]): SwitchStatement { +// return SwitchStatement.createSwitchStatement(discriminant, cases) +// } +// , +// updateSwitchStatement(original: SwitchStatement, discriminant: Expression | undefined, cases: readonly SwitchCaseStatement[]): SwitchStatement { +// if (isSameNativeObject(discriminant, original.discriminant) && isSameNativeObject(cases, original.cases)) +// return original +// return updateNodeByNode(SwitchStatement.createSwitchStatement(discriminant, cases), original) +// } +// , +// createDoWhileStatement(body?: Statement, test?: Expression): DoWhileStatement { +// return DoWhileStatement.createDoWhileStatement(body, test) +// } +// , +// updateDoWhileStatement(original: DoWhileStatement, body?: Statement, test?: Expression): DoWhileStatement { +// if (isSameNativeObject(body, original.body) && isSameNativeObject(test, original.test)) +// return original +// return updateNodeByNode(DoWhileStatement.createDoWhileStatement(body, test), original) +// } +// , +// createCatchClause(param?: Expression, body?: BlockStatement): CatchClause { +// return CatchClause.createCatchClause(param, body) +// } +// , +// updateCatchClause(original: CatchClause, param?: Expression, body?: BlockStatement): CatchClause { +// if (isSameNativeObject(param, original.param) && isSameNativeObject(body, original.body)) +// return original +// return updateNodeByNode(CatchClause.createCatchClause(param, body), original) +// } +// , +// createSequenceExpression(sequence: readonly Expression[]): SequenceExpression { +// return SequenceExpression.createSequenceExpression(sequence) +// } +// , +// updateSequenceExpression(original: SequenceExpression, sequence: readonly Expression[]): SequenceExpression { +// if (isSameNativeObject(sequence, original.sequence)) +// return original +// return updateNodeByNode(SequenceExpression.createSequenceExpression(sequence), original) +// } +// , +// createArrowFunctionExpression(_function?: ScriptFunction): ArrowFunctionExpression { +// return ArrowFunctionExpression.createArrowFunctionExpression(_function) +// } +// , +// updateArrowFunctionExpression(original: ArrowFunctionExpression, _function?: ScriptFunction): ArrowFunctionExpression { +// if (isSameNativeObject(_function, original.function)) +// return original +// return updateNodeByNode(ArrowFunctionExpression.createArrowFunctionExpression(_function), original) +// } +// , +// createOmittedExpression(): OmittedExpression { +// return OmittedExpression.createOmittedExpression() +// } +// , +// updateOmittedExpression(original: OmittedExpression): OmittedExpression { +// return updateNodeByNode(OmittedExpression.createOmittedExpression(), original) +// } +// , +// createETSNewClassInstanceExpression(typeRef: Expression | undefined, _arguments: readonly Expression[]): ETSNewClassInstanceExpression { +// return ETSNewClassInstanceExpression.createETSNewClassInstanceExpression(typeRef, _arguments) +// } +// , +// updateETSNewClassInstanceExpression(original: ETSNewClassInstanceExpression, typeRef: Expression | undefined, _arguments: readonly Expression[]): ETSNewClassInstanceExpression { +// if (isSameNativeObject(typeRef, original.typeRef) && isSameNativeObject(_arguments, original.arguments)) +// return original +// return updateNodeByNode(ETSNewClassInstanceExpression.createETSNewClassInstanceExpression(typeRef, _arguments), original) +// } +// , +// createTSAsExpression(expr: Expression | undefined, typeAnnotation: TypeNode | undefined, isConst: boolean): TSAsExpression { +// return TSAsExpression.createTSAsExpression(expr, typeAnnotation, isConst) +// } +// , +// updateTSAsExpression(original: TSAsExpression, expr: Expression | undefined, typeAnnotation: TypeNode | undefined, isConst: boolean): TSAsExpression { +// if (isSameNativeObject(expr, original.expr) && isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(isConst, original.isConst)) +// return original +// return updateNodeByNode(TSAsExpression.createTSAsExpression(expr, typeAnnotation, isConst), original) +// } +// , +// createForUpdateStatement(init?: AstNode, test?: Expression, update?: Expression, body?: Statement): ForUpdateStatement { +// return ForUpdateStatement.createForUpdateStatement(init, test, update, body) +// } +// , +// updateForUpdateStatement(original: ForUpdateStatement, init?: AstNode, test?: Expression, update?: Expression, body?: Statement): ForUpdateStatement { +// if (isSameNativeObject(init, original.init) && isSameNativeObject(test, original.test) && isSameNativeObject(update, original.update) && isSameNativeObject(body, original.body)) +// return original +// return updateNodeByNode(ForUpdateStatement.createForUpdateStatement(init, test, update, body), original) +// } +// , +// createETSPrimitiveType(primitiveType: Es2pandaPrimitiveType): ETSPrimitiveType { +// return ETSPrimitiveType.createETSPrimitiveType(primitiveType) +// } +// , +// updateETSPrimitiveType(original: ETSPrimitiveType, primitiveType: Es2pandaPrimitiveType): ETSPrimitiveType { +// if (isSameNativeObject(primitiveType, original.primitiveType)) +// return original +// return updateNodeByNode(ETSPrimitiveType.createETSPrimitiveType(primitiveType), original) +// } +// , +// createNewExpression(callee: Expression | undefined, _arguments: readonly Expression[]): NewExpression { +// return NewExpression.createNewExpression(callee, _arguments) +// } +// , +// updateNewExpression(original: NewExpression, callee: Expression | undefined, _arguments: readonly Expression[]): NewExpression { +// if (isSameNativeObject(callee, original.callee) && isSameNativeObject(_arguments, original.arguments)) +// return original +// return updateNodeByNode(NewExpression.createNewExpression(callee, _arguments), original) +// } +// , +// createTSThisType(): TSThisType { +// return TSThisType.createTSThisType() +// } +// , +// updateTSThisType(original: TSThisType): TSThisType { +// return updateNodeByNode(TSThisType.createTSThisType(), original) +// } +// , +// } \ No newline at end of file diff --git a/koala-wrapper/src/generated/index.ts b/koala-wrapper/src/generated/index.ts index 0416a0691..e85598df6 100644 --- a/koala-wrapper/src/generated/index.ts +++ b/koala-wrapper/src/generated/index.ts @@ -187,5 +187,4 @@ export * from "./peers/ETSWildcardType" export * from "./peers/TSThisType" export * from "./peers/ETSDynamicFunctionType" export * from "./peers/InterfaceDecl" -export * from "./peers/FunctionDecl" -export * from "./peers/Context" +export * from "./peers/FunctionDecl" \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/AnnotatedAstNode.ts b/koala-wrapper/src/generated/peers/AnnotatedAstNode.ts index f1199de4d..e184cd6a3 100644 --- a/koala-wrapper/src/generated/peers/AnnotatedAstNode.ts +++ b/koala-wrapper/src/generated/peers/AnnotatedAstNode.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -34,7 +33,8 @@ export class AnnotatedAstNode extends AstNode { super(pointer) } + protected readonly brandAnnotatedAstNode: undefined } -export function isAnnotatedAstNode(node: AstNode): node is AnnotatedAstNode { +export function isAnnotatedAstNode(node: object | undefined): node is AnnotatedAstNode { return node instanceof AnnotatedAstNode } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/AnnotatedExpression.ts b/koala-wrapper/src/generated/peers/AnnotatedExpression.ts index 2a5924eb9..4a17dbd54 100644 --- a/koala-wrapper/src/generated/peers/AnnotatedExpression.ts +++ b/koala-wrapper/src/generated/peers/AnnotatedExpression.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -40,11 +39,12 @@ export class AnnotatedExpression extends Expression { return unpackNode(global.generatedEs2panda._AnnotatedExpressionTypeAnnotationConst(global.context, this.peer)) } /** @deprecated */ - setTsTypeAnnotation(typeAnnotation: TypeNode): this { + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { global.generatedEs2panda._AnnotatedExpressionSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) return this } + protected readonly brandAnnotatedExpression: undefined } -export function isAnnotatedExpression(node: AstNode): node is AnnotatedExpression { +export function isAnnotatedExpression(node: object | undefined): node is AnnotatedExpression { return node instanceof AnnotatedExpression } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/AnnotatedStatement.ts b/koala-wrapper/src/generated/peers/AnnotatedStatement.ts index 64f91f5cf..948fb35da 100644 --- a/koala-wrapper/src/generated/peers/AnnotatedStatement.ts +++ b/koala-wrapper/src/generated/peers/AnnotatedStatement.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -35,7 +34,8 @@ export class AnnotatedStatement extends Statement { super(pointer) } + protected readonly brandAnnotatedStatement: undefined } -export function isAnnotatedStatement(node: AstNode): node is AnnotatedStatement { +export function isAnnotatedStatement(node: object | undefined): node is AnnotatedStatement { return node instanceof AnnotatedStatement } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/AnnotationDeclaration.ts b/koala-wrapper/src/generated/peers/AnnotationDeclaration.ts index 135f8ac73..f5bc10dc1 100644 --- a/koala-wrapper/src/generated/peers/AnnotationDeclaration.ts +++ b/koala-wrapper/src/generated/peers/AnnotationDeclaration.ts @@ -22,32 +22,28 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { Identifier } from "./Identifier" -import { AnnotationUsage } from "./AnnotationUsage" +import { Statement } from "./Statement" export class AnnotationDeclaration extends Statement { constructor(pointer: KNativePointer) { assertValidPeer(pointer, 1) super(pointer) - } - static createAnnotationDeclaration(expr?: Expression): AnnotationDeclaration { - return new AnnotationDeclaration(global.generatedEs2panda._CreateAnnotationDeclaration(global.context, passNode(expr))) + static create1AnnotationDeclaration(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationDeclaration { + return new AnnotationDeclaration(global.generatedEs2panda._CreateAnnotationDeclaration1(global.context, passNode(expr), passNodeArray(properties), properties.length)) } static updateAnnotationDeclaration(original?: AnnotationDeclaration, expr?: Expression): AnnotationDeclaration { return new AnnotationDeclaration(global.generatedEs2panda._UpdateAnnotationDeclaration(global.context, passNode(original), passNode(expr))) } - static create1AnnotationDeclaration(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationDeclaration { - return new AnnotationDeclaration(global.generatedEs2panda._CreateAnnotationDeclaration1(global.context, passNode(expr), passNodeArray(properties), properties.length)) - } static update1AnnotationDeclaration(original: AnnotationDeclaration | undefined, expr: Expression | undefined, properties: readonly AstNode[]): AnnotationDeclaration { return new AnnotationDeclaration(global.generatedEs2panda._UpdateAnnotationDeclaration1(global.context, passNode(original), passNode(expr), passNodeArray(properties), properties.length)) } @@ -60,14 +56,15 @@ export class AnnotationDeclaration extends Statement { return this } get expr(): Expression | undefined { - return unpackNode(global.generatedEs2panda._AnnotationDeclarationExprConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._AnnotationDeclarationExpr(global.context, this.peer)) } get properties(): readonly AstNode[] { - return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationPropertiesConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationProperties(global.context, this.peer)) } - get propertiesPtr(): readonly AstNode[] { - return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationPropertiesPtrConst(global.context, this.peer)) + get propertiesForUpdate(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationPropertiesForUpdate(global.context, this.peer)) } + /** @deprecated */ addProperties(properties: readonly AstNode[]): this { global.generatedEs2panda._AnnotationDeclarationAddProperties(global.context, this.peer, passNodeArray(properties), properties.length) @@ -97,18 +94,65 @@ export class AnnotationDeclaration extends Statement { global.generatedEs2panda._AnnotationDeclarationSetRuntimeRetention(global.context, this.peer) return this } + get baseName(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._AnnotationDeclarationGetBaseNameConst(global.context, this.peer)) + } + /** @deprecated */ + emplaceProperties(properties?: AstNode): this { + global.generatedEs2panda._AnnotationDeclarationEmplaceProperties(global.context, this.peer, passNode(properties)) + return this + } + /** @deprecated */ + clearProperties(): this { + global.generatedEs2panda._AnnotationDeclarationClearProperties(global.context, this.peer) + return this + } + /** @deprecated */ + setValueProperties(properties: AstNode | undefined, index: number): this { + global.generatedEs2panda._AnnotationDeclarationSetValueProperties(global.context, this.peer, passNode(properties), index) + return this + } + /** @deprecated */ + emplaceAnnotations(source?: AnnotationUsage): this { + global.generatedEs2panda._AnnotationDeclarationEmplaceAnnotations(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._AnnotationDeclarationClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + setValueAnnotations(source: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._AnnotationDeclarationSetValueAnnotations(global.context, this.peer, passNode(source), index) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationAnnotationsForUpdate(global.context, this.peer)) + } get annotations(): readonly AnnotationUsage[] { - return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationAnnotationsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._AnnotationDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._AnnotationDeclarationSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this } /** @deprecated */ - setAnnotations(annotations: readonly AnnotationUsage[]): this { - global.generatedEs2panda._AnnotationDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) + addAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._AnnotationDeclarationAddAnnotations(global.context, this.peer, passNode(annotations)) return this } + protected readonly brandAnnotationDeclaration: undefined } -export function isAnnotationDeclaration(node: AstNode): node is AnnotationDeclaration { +export function isAnnotationDeclaration(node: object | undefined): node is AnnotationDeclaration { return node instanceof AnnotationDeclaration } -if (!nodeByType.has(1)) { - nodeByType.set(1, AnnotationDeclaration) +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION, AnnotationDeclaration) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/AnnotationUsage.ts b/koala-wrapper/src/generated/peers/AnnotationUsage.ts index e7ae53061..f60a8b173 100644 --- a/koala-wrapper/src/generated/peers/AnnotationUsage.ts +++ b/koala-wrapper/src/generated/peers/AnnotationUsage.ts @@ -22,31 +22,31 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { Identifier } from "./Identifier" +import { Statement } from "./Statement" export class AnnotationUsage extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 2) super(pointer) } static createAnnotationUsage(expr?: Expression): AnnotationUsage { return new AnnotationUsage(global.generatedEs2panda._CreateAnnotationUsage(global.context, passNode(expr))) } - static updateAnnotationUsage(original?: AnnotationUsage, expr?: Expression): AnnotationUsage { - return new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsage(global.context, passNode(original), passNode(expr))) - } static create1AnnotationUsage(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage { return new AnnotationUsage(global.generatedEs2panda._CreateAnnotationUsage1(global.context, passNode(expr), passNodeArray(properties), properties.length)) } + static updateAnnotationUsage(original?: AnnotationUsage, expr?: Expression): AnnotationUsage { + return new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsage(global.context, passNode(original), passNode(expr))) + } static update1AnnotationUsage(original: AnnotationUsage | undefined, expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage { return new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsage1(global.context, passNode(original), passNode(expr), passNodeArray(properties), properties.length)) } @@ -54,13 +54,10 @@ export class AnnotationUsage extends Statement { return unpackNode(global.generatedEs2panda._AnnotationUsageExpr(global.context, this.peer)) } get properties(): readonly AstNode[] { - return unpackNodeArray(global.generatedEs2panda._AnnotationUsagePropertiesConst(global.context, this.peer)) - } - get propertiesPtr(): readonly AstNode[] { - return unpackNodeArray(global.generatedEs2panda._AnnotationUsageIrPropertiesPtrConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._AnnotationUsageProperties(global.context, this.peer)) } /** @deprecated */ - addProperty(property: AstNode): this { + addProperty(property?: AstNode): this { global.generatedEs2panda._AnnotationUsageAddProperty(global.context, this.peer, passNode(property)) return this } @@ -69,8 +66,12 @@ export class AnnotationUsage extends Statement { global.generatedEs2panda._AnnotationUsageSetProperties(global.context, this.peer, passNodeArray(properties), properties.length) return this } + get baseName(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._AnnotationUsageGetBaseNameConst(global.context, this.peer)) + } + protected readonly brandAnnotationUsage: undefined } -export function isAnnotationUsage(node: AstNode): node is AnnotationUsage { +export function isAnnotationUsage(node: object | undefined): node is AnnotationUsage { return node instanceof AnnotationUsage } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE)) { diff --git a/koala-wrapper/src/generated/peers/ArkTsConfig.ts b/koala-wrapper/src/generated/peers/ArkTsConfig.ts new file mode 100644 index 000000000..ae74d1fc0 --- /dev/null +++ b/koala-wrapper/src/generated/peers/ArkTsConfig.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class ArkTsConfig extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + /** @deprecated */ + resolveAllDependenciesInArkTsConfig(): this { + global.generatedEs2panda._ArkTsConfigResolveAllDependenciesInArkTsConfig(global.context, this.peer) + return this + } + get configPath(): string { + return unpackString(global.generatedEs2panda._ArkTsConfigConfigPathConst(global.context, this.peer)) + } + get package(): string { + return unpackString(global.generatedEs2panda._ArkTsConfigPackageConst(global.context, this.peer)) + } + get baseUrl(): string { + return unpackString(global.generatedEs2panda._ArkTsConfigBaseUrlConst(global.context, this.peer)) + } + get rootDir(): string { + return unpackString(global.generatedEs2panda._ArkTsConfigRootDirConst(global.context, this.peer)) + } + get outDir(): string { + return unpackString(global.generatedEs2panda._ArkTsConfigOutDirConst(global.context, this.peer)) + } + /** @deprecated */ + resetDependencies(): this { + global.generatedEs2panda._ArkTsConfigResetDependencies(global.context, this.peer) + return this + } + get entry(): string { + return unpackString(global.generatedEs2panda._ArkTsConfigEntryConst(global.context, this.peer)) + } + get useUrl(): boolean { + return global.generatedEs2panda._ArkTsConfigUseUrlConst(global.context, this.peer) + } + protected readonly brandArkTsConfig: undefined +} +export function isArkTsConfig(node: object | undefined): node is ArkTsConfig { + return node instanceof ArkTsConfig +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ArrayExpression.ts b/koala-wrapper/src/generated/peers/ArrayExpression.ts index 717ce5f45..0acea80c5 100644 --- a/koala-wrapper/src/generated/peers/ArrayExpression.ts +++ b/koala-wrapper/src/generated/peers/ArrayExpression.ts @@ -22,85 +22,89 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, - unpackString, -} from '../../reexport-for-generated'; + unpackString +} from "../../reexport-for-generated" -import { AnnotatedExpression } from './AnnotatedExpression'; -import { Expression } from './Expression'; -import { Decorator } from './Decorator'; -import { ValidationInfo } from './ValidationInfo'; -import { TypeNode } from './TypeNode'; +import { AnnotatedExpression } from "./AnnotatedExpression" +import { Decorator } from "./Decorator" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" +import { ValidationInfo } from "./ValidationInfo" export class ArrayExpression extends AnnotatedExpression { constructor(pointer: KNativePointer) { - super(pointer); + assertValidPeer(pointer, 157) + super(pointer) } static createArrayExpression(elements: readonly Expression[]): ArrayExpression { return new ArrayExpression( global.generatedEs2panda._CreateArrayExpression(global.context, passNodeArray(elements), elements.length) ); } - static updateArrayExpression( - original: ArrayExpression | undefined, - elements: readonly Expression[] - ): ArrayExpression { - return new ArrayExpression( - global.generatedEs2panda._UpdateArrayExpression( - global.context, - passNode(original), - passNodeArray(elements), - elements.length - ) - ); + static create1ArrayExpression(nodeType: Es2pandaAstNodeType, elements: readonly Expression[], trailingComma: boolean): ArrayExpression { + return new ArrayExpression(global.generatedEs2panda._CreateArrayExpression1(global.context, nodeType, passNodeArray(elements), elements.length, trailingComma)) + } + static updateArrayExpression(original: ArrayExpression | undefined, elements: readonly Expression[]): ArrayExpression { + return new ArrayExpression(global.generatedEs2panda._UpdateArrayExpression(global.context, passNode(original), passNodeArray(elements), elements.length)) } + static update1ArrayExpression(original: ArrayExpression | undefined, nodeType: Es2pandaAstNodeType, elements: readonly Expression[], trailingComma: boolean): ArrayExpression { + return new ArrayExpression(global.generatedEs2panda._UpdateArrayExpression1(global.context, passNode(original), nodeType, passNodeArray(elements), elements.length, trailingComma)) + } + get elements(): readonly Expression[] { - return unpackNodeArray(global.generatedEs2panda._ArrayExpressionElementsConst(global.context, this.peer)); + return unpackNodeArray(global.generatedEs2panda._ArrayExpressionElements(global.context, this.peer)) } /** @deprecated */ setElements(elements: readonly Expression[]): this { - global.generatedEs2panda._ArrayExpressionSetElements( - global.context, - this.peer, - passNodeArray(elements), - elements.length - ); - return this; + global.generatedEs2panda._ArrayExpressionSetElements(global.context, this.peer, passNodeArray(elements), elements.length) + return this } get isDeclaration(): boolean { - return global.generatedEs2panda._ArrayExpressionIsDeclarationConst(global.context, this.peer); + return global.generatedEs2panda._ArrayExpressionIsDeclarationConst(global.context, this.peer) } get isOptional(): boolean { - return global.generatedEs2panda._ArrayExpressionIsOptionalConst(global.context, this.peer); + return global.generatedEs2panda._ArrayExpressionIsOptionalConst(global.context, this.peer) } /** @deprecated */ setDeclaration(): this { - global.generatedEs2panda._ArrayExpressionSetDeclaration(global.context, this.peer); - return this; + global.generatedEs2panda._ArrayExpressionSetDeclaration(global.context, this.peer) + return this } /** @deprecated */ setOptional(optional_arg: boolean): this { - global.generatedEs2panda._ArrayExpressionSetOptional(global.context, this.peer, optional_arg); - return this; + global.generatedEs2panda._ArrayExpressionSetOptional(global.context, this.peer, optional_arg) + return this } get decorators(): readonly Decorator[] { - return unpackNodeArray(global.generatedEs2panda._ArrayExpressionDecoratorsConst(global.context, this.peer)); + return unpackNodeArray(global.generatedEs2panda._ArrayExpressionDecoratorsConst(global.context, this.peer)) + } + /** @deprecated */ + clearPreferredType(): this { + global.generatedEs2panda._ArrayExpressionClearPreferredType(global.context, this.peer) + return this + } + get convertibleToArrayPattern(): boolean { + return global.generatedEs2panda._ArrayExpressionConvertibleToArrayPattern(global.context, this.peer) + } + get validateExpression(): ValidationInfo | undefined { + return new ValidationInfo(global.generatedEs2panda._ArrayExpressionValidateExpression(global.context, this.peer)) } get typeAnnotation(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._ArrayExpressionTypeAnnotationConst(global.context, this.peer)); + return unpackNode(global.generatedEs2panda._ArrayExpressionTypeAnnotationConst(global.context, this.peer)) } /** @deprecated */ - setTsTypeAnnotation(typeAnnotation: TypeNode): this { - global.generatedEs2panda._ArrayExpressionSetTsTypeAnnotation( - global.context, - this.peer, - passNode(typeAnnotation) - ); - return this; + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { + global.generatedEs2panda._ArrayExpressionSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) + return this } + protected readonly brandArrayExpression: undefined } -export function isArrayExpression(node: AstNode): node is ArrayExpression { - return global.es2panda._IsArrayExpression(node.peer); +export function isArrayExpression(node: object | undefined): node is ArrayExpression { + return node instanceof ArrayExpression } +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION, ArrayExpression) +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ArrowFunctionExpression.ts b/koala-wrapper/src/generated/peers/ArrowFunctionExpression.ts index 75393b037..b7e85e111 100644 --- a/koala-wrapper/src/generated/peers/ArrowFunctionExpression.ts +++ b/koala-wrapper/src/generated/peers/ArrowFunctionExpression.ts @@ -22,20 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { ScriptFunction } from "./ScriptFunction" import { TypeNode } from "./TypeNode" -import { AnnotationUsage } from "./AnnotationUsage" export class ArrowFunctionExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 0) super(pointer) } @@ -45,25 +45,54 @@ export class ArrowFunctionExpression extends Expression { static updateArrowFunctionExpression(original?: ArrowFunctionExpression, func?: ScriptFunction): ArrowFunctionExpression { return new ArrowFunctionExpression(global.generatedEs2panda._UpdateArrowFunctionExpression(global.context, passNode(original), passNode(func))) } - static create1ArrowFunctionExpression(other?: ArrowFunctionExpression): ArrowFunctionExpression { - return new ArrowFunctionExpression(global.generatedEs2panda._CreateArrowFunctionExpression1(global.context, passNode(other))) - } static update1ArrowFunctionExpression(original?: ArrowFunctionExpression, other?: ArrowFunctionExpression): ArrowFunctionExpression { return new ArrowFunctionExpression(global.generatedEs2panda._UpdateArrowFunctionExpression1(global.context, passNode(original), passNode(other))) } get function(): ScriptFunction | undefined { - return unpackNode(global.generatedEs2panda._ArrowFunctionExpressionFunctionConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ArrowFunctionExpressionFunction(global.context, this.peer)) + } + get createTypeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ArrowFunctionExpressionCreateTypeAnnotation(global.context, this.peer)) + } + /** @deprecated */ + emplaceAnnotations(source?: AnnotationUsage): this { + global.generatedEs2panda._ArrowFunctionExpressionEmplaceAnnotations(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._ArrowFunctionExpressionClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + setValueAnnotations(source: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._ArrowFunctionExpressionSetValueAnnotations(global.context, this.peer, passNode(source), index) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ArrowFunctionExpressionAnnotationsForUpdate(global.context, this.peer)) } get annotations(): readonly AnnotationUsage[] { - return unpackNodeArray(global.generatedEs2panda._ArrowFunctionExpressionAnnotationsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ArrowFunctionExpressionAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ArrowFunctionExpressionSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ArrowFunctionExpressionSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this } /** @deprecated */ - setAnnotations(annotations: readonly AnnotationUsage[]): this { - global.generatedEs2panda._ArrowFunctionExpressionSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) + addAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._ArrowFunctionExpressionAddAnnotations(global.context, this.peer, passNode(annotations)) return this } + protected readonly brandArrowFunctionExpression: undefined } -export function isArrowFunctionExpression(node: AstNode): node is ArrowFunctionExpression { +export function isArrowFunctionExpression(node: object | undefined): node is ArrowFunctionExpression { return node instanceof ArrowFunctionExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/AssertStatement.ts b/koala-wrapper/src/generated/peers/AssertStatement.ts index 07f40d7c1..c065e6d66 100644 --- a/koala-wrapper/src/generated/peers/AssertStatement.ts +++ b/koala-wrapper/src/generated/peers/AssertStatement.ts @@ -22,18 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Statement } from "./Statement" export class AssertStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ASSERT_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 3) super(pointer) } @@ -44,13 +44,14 @@ export class AssertStatement extends Statement { return new AssertStatement(global.generatedEs2panda._UpdateAssertStatement(global.context, passNode(original), passNode(test), passNode(second))) } get test(): Expression | undefined { - return unpackNode(global.generatedEs2panda._AssertStatementTestConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._AssertStatementTest(global.context, this.peer)) } get second(): Expression | undefined { return unpackNode(global.generatedEs2panda._AssertStatementSecondConst(global.context, this.peer)) } + protected readonly brandAssertStatement: undefined } -export function isAssertStatement(node: AstNode): node is AssertStatement { +export function isAssertStatement(node: object | undefined): node is AssertStatement { return node instanceof AssertStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ASSERT_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/AssignmentExpression.ts b/koala-wrapper/src/generated/peers/AssignmentExpression.ts index 687fbd853..1c593ad01 100644 --- a/koala-wrapper/src/generated/peers/AssignmentExpression.ts +++ b/koala-wrapper/src/generated/peers/AssignmentExpression.ts @@ -22,44 +22,54 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Expression } from "./Expression" +import { CodeGen } from "./CodeGen" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaTokenType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" export class AssignmentExpression extends Expression { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 159) super(pointer) - + } + static create1AssignmentExpression(type: Es2pandaAstNodeType, left: Expression | undefined, right: Expression | undefined, assignmentOperator: Es2pandaTokenType): AssignmentExpression { + return new AssignmentExpression(global.generatedEs2panda._CreateAssignmentExpression1(global.context, type, passNode(left), passNode(right), assignmentOperator)) + } + static updateAssignmentExpression(original: AssignmentExpression | undefined, left: Expression | undefined, right: Expression | undefined, assignmentOperator: Es2pandaTokenType): AssignmentExpression { + return new AssignmentExpression(global.generatedEs2panda._UpdateAssignmentExpression(global.context, passNode(original), passNode(left), passNode(right), assignmentOperator)) + } + static update1AssignmentExpression(original: AssignmentExpression | undefined, type: Es2pandaAstNodeType, left: Expression | undefined, right: Expression | undefined, assignmentOperator: Es2pandaTokenType): AssignmentExpression { + return new AssignmentExpression(global.generatedEs2panda._UpdateAssignmentExpression1(global.context, passNode(original), type, passNode(left), passNode(right), assignmentOperator)) } get left(): Expression | undefined { - return unpackNode(global.generatedEs2panda._AssignmentExpressionLeftConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._AssignmentExpressionLeft(global.context, this.peer)) } get right(): Expression | undefined { - return unpackNode(global.generatedEs2panda._AssignmentExpressionRightConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._AssignmentExpressionRight(global.context, this.peer)) } /** @deprecated */ - setRight(expr: Expression): this { + setRight(expr?: Expression): this { global.generatedEs2panda._AssignmentExpressionSetRight(global.context, this.peer, passNode(expr)) return this } /** @deprecated */ - setLeft(expr: Expression): this { + setLeft(expr?: Expression): this { global.generatedEs2panda._AssignmentExpressionSetLeft(global.context, this.peer, passNode(expr)) return this } get result(): Expression | undefined { - return unpackNode(global.generatedEs2panda._AssignmentExpressionResultConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._AssignmentExpressionResult(global.context, this.peer)) } get operatorType(): Es2pandaTokenType { return global.generatedEs2panda._AssignmentExpressionOperatorTypeConst(global.context, this.peer) } /** @deprecated */ - setResult(expr: Expression): this { + setResult(expr?: Expression): this { global.generatedEs2panda._AssignmentExpressionSetResult(global.context, this.peer, passNode(expr)) return this } @@ -74,7 +84,19 @@ export class AssignmentExpression extends Expression { get isIgnoreConstAssign(): boolean { return global.generatedEs2panda._AssignmentExpressionIsIgnoreConstAssignConst(global.context, this.peer) } + get convertibleToAssignmentPatternRight(): boolean { + return global.generatedEs2panda._AssignmentExpressionConvertibleToAssignmentPatternRight(global.context, this.peer) + } + /** @deprecated */ + compilePattern(pg?: CodeGen): this { + global.generatedEs2panda._AssignmentExpressionCompilePatternConst(global.context, this.peer, passNode(pg)) + return this + } + protected readonly brandAssignmentExpression: undefined } -export function isAssignmentExpression(node: AstNode): node is AssignmentExpression { +export function isAssignmentExpression(node: object | undefined): node is AssignmentExpression { return node instanceof AssignmentExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION, AssignmentExpression) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/AstDumper.ts b/koala-wrapper/src/generated/peers/AstDumper.ts index dc62ec347..5b29e0716 100644 --- a/koala-wrapper/src/generated/peers/AstDumper.ts +++ b/koala-wrapper/src/generated/peers/AstDumper.ts @@ -22,15 +22,12 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Es2pandaModifierFlags } from "./../Es2pandaEnums" -import { Es2pandaTSOperatorType } from "./../Es2pandaEnums" export class AstDumper extends ArktsObject { constructor(pointer: KNativePointer) { super(pointer) @@ -42,4 +39,5 @@ export class AstDumper extends ArktsObject { get str(): string { return unpackString(global.generatedEs2panda._AstDumperStrConst(global.context, this.peer)) } + protected readonly brandAstDumper: undefined } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/AstVerifier.ts b/koala-wrapper/src/generated/peers/AstVerifier.ts new file mode 100644 index 000000000..370cf753c --- /dev/null +++ b/koala-wrapper/src/generated/peers/AstVerifier.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class AstVerifier extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandAstVerifier: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/AstVisitor.ts b/koala-wrapper/src/generated/peers/AstVisitor.ts new file mode 100644 index 000000000..d6f910272 --- /dev/null +++ b/koala-wrapper/src/generated/peers/AstVisitor.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class AstVisitor extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandAstVisitor: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/AwaitExpression.ts b/koala-wrapper/src/generated/peers/AwaitExpression.ts index b090abc87..eda623840 100644 --- a/koala-wrapper/src/generated/peers/AwaitExpression.ts +++ b/koala-wrapper/src/generated/peers/AwaitExpression.ts @@ -22,17 +22,17 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class AwaitExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_AWAIT_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 4) super(pointer) } @@ -45,8 +45,9 @@ export class AwaitExpression extends Expression { get argument(): Expression | undefined { return unpackNode(global.generatedEs2panda._AwaitExpressionArgumentConst(global.context, this.peer)) } + protected readonly brandAwaitExpression: undefined } -export function isAwaitExpression(node: AstNode): node is AwaitExpression { +export function isAwaitExpression(node: object | undefined): node is AwaitExpression { return node instanceof AwaitExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_AWAIT_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/BigIntLiteral.ts b/koala-wrapper/src/generated/peers/BigIntLiteral.ts index e03909d85..5bbdb857c 100644 --- a/koala-wrapper/src/generated/peers/BigIntLiteral.ts +++ b/koala-wrapper/src/generated/peers/BigIntLiteral.ts @@ -22,17 +22,17 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Literal } from "./Literal" export class BigIntLiteral extends Literal { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_BIGINT_LITERAL) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 5) super(pointer) } @@ -45,8 +45,9 @@ export class BigIntLiteral extends Literal { get str(): string { return unpackString(global.generatedEs2panda._BigIntLiteralStrConst(global.context, this.peer)) } + protected readonly brandBigIntLiteral: undefined } -export function isBigIntLiteral(node: AstNode): node is BigIntLiteral { +export function isBigIntLiteral(node: object | undefined): node is BigIntLiteral { return node instanceof BigIntLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BIGINT_LITERAL)) { diff --git a/koala-wrapper/src/generated/peers/BinaryExpression.ts b/koala-wrapper/src/generated/peers/BinaryExpression.ts index b911d0c58..c150445cd 100644 --- a/koala-wrapper/src/generated/peers/BinaryExpression.ts +++ b/koala-wrapper/src/generated/peers/BinaryExpression.ts @@ -22,18 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Expression } from "./Expression" +import { CodeGen } from "./CodeGen" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaTokenType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { VReg } from "./VReg" export class BinaryExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_BINARY_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 6) super(pointer) } @@ -44,13 +46,13 @@ export class BinaryExpression extends Expression { return new BinaryExpression(global.generatedEs2panda._UpdateBinaryExpression(global.context, passNode(original), passNode(left), passNode(right), operatorType)) } get left(): Expression | undefined { - return unpackNode(global.generatedEs2panda._BinaryExpressionLeftConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._BinaryExpressionLeft(global.context, this.peer)) } get right(): Expression | undefined { - return unpackNode(global.generatedEs2panda._BinaryExpressionRightConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._BinaryExpressionRight(global.context, this.peer)) } get result(): Expression | undefined { - return unpackNode(global.generatedEs2panda._BinaryExpressionResultConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._BinaryExpressionResult(global.context, this.peer)) } get operatorType(): Es2pandaTokenType { return global.generatedEs2panda._BinaryExpressionOperatorTypeConst(global.context, this.peer) @@ -68,17 +70,17 @@ export class BinaryExpression extends Expression { return global.generatedEs2panda._BinaryExpressionIsArithmeticConst(global.context, this.peer) } /** @deprecated */ - setLeft(expr: Expression): this { + setLeft(expr?: Expression): this { global.generatedEs2panda._BinaryExpressionSetLeft(global.context, this.peer, passNode(expr)) return this } /** @deprecated */ - setRight(expr: Expression): this { + setRight(expr?: Expression): this { global.generatedEs2panda._BinaryExpressionSetRight(global.context, this.peer, passNode(expr)) return this } /** @deprecated */ - setResult(expr: Expression): this { + setResult(expr?: Expression): this { global.generatedEs2panda._BinaryExpressionSetResult(global.context, this.peer, passNode(expr)) return this } @@ -87,8 +89,14 @@ export class BinaryExpression extends Expression { global.generatedEs2panda._BinaryExpressionSetOperator(global.context, this.peer, operatorType) return this } + /** @deprecated */ + compileOperands(etsg?: CodeGen, lhs?: VReg): this { + global.generatedEs2panda._BinaryExpressionCompileOperandsConst(global.context, this.peer, passNode(etsg), passNode(lhs)) + return this + } + protected readonly brandBinaryExpression: undefined } -export function isBinaryExpression(node: AstNode): node is BinaryExpression { +export function isBinaryExpression(node: object | undefined): node is BinaryExpression { return node instanceof BinaryExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BINARY_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/BindingProps.ts b/koala-wrapper/src/generated/peers/BindingProps.ts new file mode 100644 index 000000000..f85f7a8cf --- /dev/null +++ b/koala-wrapper/src/generated/peers/BindingProps.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class BindingProps extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandBindingProps: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/BlockExpression.ts b/koala-wrapper/src/generated/peers/BlockExpression.ts index 38520bcd3..636b8c670 100644 --- a/koala-wrapper/src/generated/peers/BlockExpression.ts +++ b/koala-wrapper/src/generated/peers/BlockExpression.ts @@ -22,18 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { Statement } from "./Statement" export class BlockExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 155) super(pointer) } @@ -44,7 +44,7 @@ export class BlockExpression extends Expression { return new BlockExpression(global.generatedEs2panda._UpdateBlockExpression(global.context, passNode(original), passNodeArray(statements), statements.length)) } get statements(): readonly Statement[] { - return unpackNodeArray(global.generatedEs2panda._BlockExpressionStatementsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._BlockExpressionStatements(global.context, this.peer)) } /** @deprecated */ addStatements(statements: readonly Statement[]): this { @@ -52,12 +52,13 @@ export class BlockExpression extends Expression { return this } /** @deprecated */ - addStatement(statement: Statement): this { + addStatement(statement?: Statement): this { global.generatedEs2panda._BlockExpressionAddStatement(global.context, this.peer, passNode(statement)) return this } + protected readonly brandBlockExpression: undefined } -export function isBlockExpression(node: AstNode): node is BlockExpression { +export function isBlockExpression(node: object | undefined): node is BlockExpression { return node instanceof BlockExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/BlockStatement.ts b/koala-wrapper/src/generated/peers/BlockStatement.ts index 09948d77c..e0a611384 100644 --- a/koala-wrapper/src/generated/peers/BlockStatement.ts +++ b/koala-wrapper/src/generated/peers/BlockStatement.ts @@ -22,17 +22,17 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Statement } from "./Statement" export class BlockStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 7) super(pointer) } @@ -42,8 +42,11 @@ export class BlockStatement extends Statement { static updateBlockStatement(original: BlockStatement | undefined, statementList: readonly Statement[]): BlockStatement { return new BlockStatement(global.generatedEs2panda._UpdateBlockStatement(global.context, passNode(original), passNodeArray(statementList), statementList.length)) } + get statementsForUpdates(): readonly Statement[] { + return unpackNodeArray(global.generatedEs2panda._BlockStatementStatementsForUpdates(global.context, this.peer)) + } get statements(): readonly Statement[] { - return unpackNodeArray(global.generatedEs2panda._BlockStatementStatementsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._BlockStatementStatements(global.context, this.peer)) } /** @deprecated */ setStatements(statementList: readonly Statement[]): this { @@ -51,12 +54,33 @@ export class BlockStatement extends Statement { return this } /** @deprecated */ - addTrailingBlock(stmt: AstNode, trailingBlock: BlockStatement): this { + addStatements(statementList: readonly Statement[]): this { + global.generatedEs2panda._BlockStatementAddStatements(global.context, this.peer, passNodeArray(statementList), statementList.length) + return this + } + /** @deprecated */ + clearStatements(): this { + global.generatedEs2panda._BlockStatementClearStatements(global.context, this.peer) + return this + } + /** @deprecated */ + addStatement(statement?: Statement): this { + global.generatedEs2panda._BlockStatementAddStatement(global.context, this.peer, passNode(statement)) + return this + } + /** @deprecated */ + addStatement1(idx: number, statement?: Statement): this { + global.generatedEs2panda._BlockStatementAddStatement1(global.context, this.peer, idx, passNode(statement)) + return this + } + /** @deprecated */ + addTrailingBlock(stmt?: AstNode, trailingBlock?: BlockStatement): this { global.generatedEs2panda._BlockStatementAddTrailingBlock(global.context, this.peer, passNode(stmt), passNode(trailingBlock)) return this } + protected readonly brandBlockStatement: undefined } -export function isBlockStatement(node: AstNode): node is BlockStatement { +export function isBlockStatement(node: object | undefined): node is BlockStatement { return node instanceof BlockStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/BooleanLiteral.ts b/koala-wrapper/src/generated/peers/BooleanLiteral.ts index f82d3a6ed..afc3c3f87 100644 --- a/koala-wrapper/src/generated/peers/BooleanLiteral.ts +++ b/koala-wrapper/src/generated/peers/BooleanLiteral.ts @@ -22,17 +22,17 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Literal } from "./Literal" export class BooleanLiteral extends Literal { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_BOOLEAN_LITERAL) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 8) super(pointer) } @@ -45,8 +45,9 @@ export class BooleanLiteral extends Literal { get value(): boolean { return global.generatedEs2panda._BooleanLiteralValueConst(global.context, this.peer) } + protected readonly brandBooleanLiteral: undefined } -export function isBooleanLiteral(node: AstNode): node is BooleanLiteral { +export function isBooleanLiteral(node: object | undefined): node is BooleanLiteral { return node instanceof BooleanLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BOOLEAN_LITERAL)) { diff --git a/koala-wrapper/src/generated/peers/BreakStatement.ts b/koala-wrapper/src/generated/peers/BreakStatement.ts index 77b609b0a..ac411279f 100644 --- a/koala-wrapper/src/generated/peers/BreakStatement.ts +++ b/koala-wrapper/src/generated/peers/BreakStatement.ts @@ -22,48 +22,48 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Identifier } from "./Identifier" +import { Statement } from "./Statement" export class BreakStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 9) super(pointer) - } - static createBreakStatement(): BreakStatement { - return new BreakStatement(global.generatedEs2panda._CreateBreakStatement(global.context)) + static create1BreakStatement(ident?: Identifier): BreakStatement { + return new BreakStatement(global.generatedEs2panda._CreateBreakStatement1(global.context, passNode(ident))) } static updateBreakStatement(original?: BreakStatement): BreakStatement { return new BreakStatement(global.generatedEs2panda._UpdateBreakStatement(global.context, passNode(original))) } - static create1BreakStatement(ident?: Identifier): BreakStatement { - return new BreakStatement(global.generatedEs2panda._CreateBreakStatement1(global.context, passNode(ident))) - } static update1BreakStatement(original?: BreakStatement, ident?: Identifier): BreakStatement { return new BreakStatement(global.generatedEs2panda._UpdateBreakStatement1(global.context, passNode(original), passNode(ident))) } get ident(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._BreakStatementIdentConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._BreakStatementIdent(global.context, this.peer)) } get target(): AstNode | undefined { return unpackNode(global.generatedEs2panda._BreakStatementTargetConst(global.context, this.peer)) } + get hasTarget(): boolean { + return global.generatedEs2panda._BreakStatementHasTargetConst(global.context, this.peer) + } /** @deprecated */ - setTarget(target: AstNode): this { + setTarget(target?: AstNode): this { global.generatedEs2panda._BreakStatementSetTarget(global.context, this.peer, passNode(target)) return this } + protected readonly brandBreakStatement: undefined } -export function isBreakStatement(node: AstNode): node is BreakStatement { +export function isBreakStatement(node: object | undefined): node is BreakStatement { return node instanceof BreakStatement } -if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT, BreakStatement) +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BREAK_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BREAK_STATEMENT, BreakStatement) } diff --git a/koala-wrapper/src/generated/peers/CallExpression.ts b/koala-wrapper/src/generated/peers/CallExpression.ts index 2a8422665..3419d2ea6 100644 --- a/koala-wrapper/src/generated/peers/CallExpression.ts +++ b/koala-wrapper/src/generated/peers/CallExpression.ts @@ -22,59 +22,59 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { MaybeOptionalExpression } from "./MaybeOptionalExpression" +import { BlockStatement } from "./BlockStatement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { MaybeOptionalExpression } from "./MaybeOptionalExpression" import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" -import { BlockStatement } from "./BlockStatement" export class CallExpression extends MaybeOptionalExpression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 10) super(pointer) } static createCallExpression(callee: Expression | undefined, _arguments: readonly Expression[], typeParams: TSTypeParameterInstantiation | undefined, optional_arg: boolean, trailingComma: boolean): CallExpression { return new CallExpression(global.generatedEs2panda._CreateCallExpression(global.context, passNode(callee), passNodeArray(_arguments), _arguments.length, passNode(typeParams), optional_arg, trailingComma)) } - static create1CallExpression(other?: CallExpression): CallExpression { - return new CallExpression(global.generatedEs2panda._CreateCallExpression1(global.context, passNode(other))) - } static update1CallExpression(original?: CallExpression, other?: CallExpression): CallExpression { return new CallExpression(global.generatedEs2panda._UpdateCallExpression1(global.context, passNode(original), passNode(other))) } get callee(): Expression | undefined { - return unpackNode(global.generatedEs2panda._CallExpressionCalleeConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._CallExpressionCallee(global.context, this.peer)) } /** @deprecated */ - setCallee(callee: Expression): this { + setCallee(callee?: Expression): this { global.generatedEs2panda._CallExpressionSetCallee(global.context, this.peer, passNode(callee)) return this } get typeParams(): TSTypeParameterInstantiation | undefined { - return unpackNode(global.generatedEs2panda._CallExpressionTypeParamsConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._CallExpressionTypeParams(global.context, this.peer)) } get arguments(): readonly Expression[] { - return unpackNodeArray(global.generatedEs2panda._CallExpressionArgumentsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._CallExpressionArguments(global.context, this.peer)) } get hasTrailingComma(): boolean { return global.generatedEs2panda._CallExpressionHasTrailingCommaConst(global.context, this.peer) } /** @deprecated */ - setTypeParams(typeParams: TSTypeParameterInstantiation): this { + setTypeParams(typeParams?: TSTypeParameterInstantiation): this { global.generatedEs2panda._CallExpressionSetTypeParams(global.context, this.peer, passNode(typeParams)) return this } /** @deprecated */ - setTrailingBlock(block: BlockStatement): this { + setTrailingBlock(block?: BlockStatement): this { global.generatedEs2panda._CallExpressionSetTrailingBlock(global.context, this.peer, passNode(block)) return this } + get isExtensionAccessorCall(): boolean { + return global.generatedEs2panda._CallExpressionIsExtensionAccessorCall(global.context, this.peer) + } get trailingBlock(): BlockStatement | undefined { return unpackNode(global.generatedEs2panda._CallExpressionTrailingBlockConst(global.context, this.peer)) } @@ -86,11 +86,20 @@ export class CallExpression extends MaybeOptionalExpression { get isTrailingBlockInNewLine(): boolean { return global.generatedEs2panda._CallExpressionIsTrailingBlockInNewLineConst(global.context, this.peer) } + /** @deprecated */ + setIsTrailingCall(isTrailingCall: boolean): this { + global.generatedEs2panda._CallExpressionSetIsTrailingCall(global.context, this.peer, isTrailingCall) + return this + } + get isTrailingCall(): boolean { + return global.generatedEs2panda._CallExpressionIsTrailingCallConst(global.context, this.peer) + } get isETSConstructorCall(): boolean { return global.generatedEs2panda._CallExpressionIsETSConstructorCallConst(global.context, this.peer) } + protected readonly brandCallExpression: undefined } -export function isCallExpression(node: AstNode): node is CallExpression { +export function isCallExpression(node: object | undefined): node is CallExpression { return node instanceof CallExpression } if (!nodeByType.has( Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/CatchClause.ts b/koala-wrapper/src/generated/peers/CatchClause.ts index 270650213..ad6cea023 100644 --- a/koala-wrapper/src/generated/peers/CatchClause.ts +++ b/koala-wrapper/src/generated/peers/CatchClause.ts @@ -22,19 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypedStatement } from "./TypedStatement" -import { Expression } from "./Expression" import { BlockStatement } from "./BlockStatement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypedStatement } from "./TypedStatement" export class CatchClause extends TypedStatement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_CATCH_CLAUSE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 11) super(pointer) } @@ -44,14 +44,21 @@ export class CatchClause extends TypedStatement { static updateCatchClause(original?: CatchClause, param?: Expression, body?: BlockStatement): CatchClause { return new CatchClause(global.generatedEs2panda._UpdateCatchClause(global.context, passNode(original), passNode(param), passNode(body))) } + static update1CatchClause(original?: CatchClause, other?: CatchClause): CatchClause { + return new CatchClause(global.generatedEs2panda._UpdateCatchClause1(global.context, passNode(original), passNode(other))) + } get param(): Expression | undefined { - return unpackNode(global.generatedEs2panda._CatchClauseParamConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._CatchClauseParam(global.context, this.peer)) } get body(): BlockStatement | undefined { - return unpackNode(global.generatedEs2panda._CatchClauseBodyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._CatchClauseBody(global.context, this.peer)) + } + get isDefaultCatchClause(): boolean { + return global.generatedEs2panda._CatchClauseIsDefaultCatchClauseConst(global.context, this.peer) } + protected readonly brandCatchClause: undefined } -export function isCatchClause(node: AstNode): node is CatchClause { +export function isCatchClause(node: object | undefined): node is CatchClause { return node instanceof CatchClause } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CATCH_CLAUSE)) { diff --git a/koala-wrapper/src/generated/peers/ChainExpression.ts b/koala-wrapper/src/generated/peers/ChainExpression.ts index 2c89dcd53..31a001886 100644 --- a/koala-wrapper/src/generated/peers/ChainExpression.ts +++ b/koala-wrapper/src/generated/peers/ChainExpression.ts @@ -22,19 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { CodeGen } from "./CodeGen" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { VReg } from "./VReg" export class ChainExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_CHAIN_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 12) super(pointer) - } static createChainExpression(expression?: Expression): ChainExpression { return new ChainExpression(global.generatedEs2panda._CreateChainExpression(global.context, passNode(expression))) @@ -42,11 +43,17 @@ export class ChainExpression extends Expression { static updateChainExpression(original?: ChainExpression, expression?: Expression): ChainExpression { return new ChainExpression(global.generatedEs2panda._UpdateChainExpression(global.context, passNode(original), passNode(expression))) } - get getExpression(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ChainExpressionGetExpressionConst(global.context, this.peer)) + get expression(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ChainExpressionGetExpression(global.context, this.peer)) } + /** @deprecated */ + compileToReg(pg?: CodeGen, objReg?: VReg): this { + global.generatedEs2panda._ChainExpressionCompileToRegConst(global.context, this.peer, passNode(pg), passNode(objReg)) + return this + } + protected readonly brandChainExpression: undefined } -export function isChainExpression(node: AstNode): node is ChainExpression { +export function isChainExpression(node: object | undefined): node is ChainExpression { return node instanceof ChainExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CHAIN_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/CharLiteral.ts b/koala-wrapper/src/generated/peers/CharLiteral.ts index 97c67d44e..82e593f60 100644 --- a/koala-wrapper/src/generated/peers/CharLiteral.ts +++ b/koala-wrapper/src/generated/peers/CharLiteral.ts @@ -22,17 +22,17 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Literal } from "./Literal" export class CharLiteral extends Literal { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_CHAR_LITERAL) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 13) super(pointer) } @@ -42,8 +42,9 @@ export class CharLiteral extends Literal { static updateCharLiteral(original?: CharLiteral): CharLiteral { return new CharLiteral(global.generatedEs2panda._UpdateCharLiteral(global.context, passNode(original))) } + protected readonly brandCharLiteral: undefined } -export function isCharLiteral(node: AstNode): node is CharLiteral { +export function isCharLiteral(node: object | undefined): node is CharLiteral { return node instanceof CharLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CHAR_LITERAL)) { diff --git a/koala-wrapper/src/generated/peers/ClassDeclaration.ts b/koala-wrapper/src/generated/peers/ClassDeclaration.ts index f163c2de3..7d8b45839 100644 --- a/koala-wrapper/src/generated/peers/ClassDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ClassDeclaration.ts @@ -22,19 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" import { ClassDefinition } from "./ClassDefinition" import { Decorator } from "./Decorator" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Statement } from "./Statement" export class ClassDeclaration extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 15) super(pointer) } @@ -45,13 +45,37 @@ export class ClassDeclaration extends Statement { return new ClassDeclaration(global.generatedEs2panda._UpdateClassDeclaration(global.context, passNode(original), passNode(def))) } get definition(): ClassDefinition | undefined { - return unpackNode(global.generatedEs2panda._ClassDeclarationDefinitionConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ClassDeclarationDefinition(global.context, this.peer)) + } + /** @deprecated */ + emplaceDecorators(decorators?: Decorator): this { + global.generatedEs2panda._ClassDeclarationEmplaceDecorators(global.context, this.peer, passNode(decorators)) + return this + } + /** @deprecated */ + clearDecorators(): this { + global.generatedEs2panda._ClassDeclarationClearDecorators(global.context, this.peer) + return this + } + /** @deprecated */ + setValueDecorators(decorators: Decorator | undefined, index: number): this { + global.generatedEs2panda._ClassDeclarationSetValueDecorators(global.context, this.peer, passNode(decorators), index) + return this } get decorators(): readonly Decorator[] { - return unpackNodeArray(global.generatedEs2panda._ClassDeclarationDecoratorsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ClassDeclarationDecorators(global.context, this.peer)) + } + get decoratorsForUpdate(): readonly Decorator[] { + return unpackNodeArray(global.generatedEs2panda._ClassDeclarationDecoratorsForUpdate(global.context, this.peer)) + } + /** @deprecated */ + setDefinition(def?: ClassDefinition): this { + global.generatedEs2panda._ClassDeclarationSetDefinition(global.context, this.peer, passNode(def)) + return this } + protected readonly brandClassDeclaration: undefined } -export function isClassDeclaration(node: AstNode): node is ClassDeclaration { +export function isClassDeclaration(node: object | undefined): node is ClassDeclaration { return node instanceof ClassDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/ClassDefinition.ts b/koala-wrapper/src/generated/peers/ClassDefinition.ts index fe51f912b..db80c1c72 100644 --- a/koala-wrapper/src/generated/peers/ClassDefinition.ts +++ b/koala-wrapper/src/generated/peers/ClassDefinition.ts @@ -22,29 +22,28 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypedAstNode } from "./TypedAstNode" -import { Identifier } from "./Identifier" -import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" -import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" -import { TSClassImplements } from "./TSClassImplements" -import { MethodDefinition } from "./MethodDefinition" -import { Expression } from "./Expression" +import { AnnotationUsage } from "./AnnotationUsage" +import { ClassDeclaration } from "./ClassDeclaration" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaClassDefinitionModifiers } from "./../Es2pandaEnums" import { Es2pandaModifierFlags } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { MethodDefinition } from "./MethodDefinition" +import { TSClassImplements } from "./TSClassImplements" import { TSEnumDeclaration } from "./TSEnumDeclaration" -import { ClassDeclaration } from "./ClassDeclaration" -import { FunctionExpression } from "./FunctionExpression" -import { AnnotationUsage } from "./AnnotationUsage" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" +import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" +import { TypedAstNode } from "./TypedAstNode" export class ClassDefinition extends TypedAstNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 14) super(pointer) } @@ -54,39 +53,28 @@ export class ClassDefinition extends TypedAstNode { static updateClassDefinition(original: ClassDefinition | undefined, ident: Identifier | undefined, typeParams: TSTypeParameterDeclaration | undefined, superTypeParams: TSTypeParameterInstantiation | undefined, _implements: readonly TSClassImplements[], ctor: MethodDefinition | undefined, superClass: Expression | undefined, body: readonly AstNode[], modifiers: Es2pandaClassDefinitionModifiers, flags: Es2pandaModifierFlags): ClassDefinition { return new ClassDefinition(global.generatedEs2panda._UpdateClassDefinition(global.context, passNode(original), passNode(ident), passNode(typeParams), passNode(superTypeParams), passNodeArray(_implements), _implements.length, passNode(ctor), passNode(superClass), passNodeArray(body), body.length, modifiers, flags)) } - static create1ClassDefinition(ident: Identifier | undefined, body: readonly AstNode[], modifiers: Es2pandaClassDefinitionModifiers, flags: Es2pandaModifierFlags): ClassDefinition { - return new ClassDefinition(global.generatedEs2panda._CreateClassDefinition1(global.context, passNode(ident), passNodeArray(body), body.length, modifiers, flags)) - } static update1ClassDefinition(original: ClassDefinition | undefined, ident: Identifier | undefined, body: readonly AstNode[], modifiers: Es2pandaClassDefinitionModifiers, flags: Es2pandaModifierFlags): ClassDefinition { return new ClassDefinition(global.generatedEs2panda._UpdateClassDefinition1(global.context, passNode(original), passNode(ident), passNodeArray(body), body.length, modifiers, flags)) } - static create2ClassDefinition(ident: Identifier | undefined, modifiers: Es2pandaClassDefinitionModifiers, flags: Es2pandaModifierFlags): ClassDefinition { - return new ClassDefinition(global.generatedEs2panda._CreateClassDefinition2(global.context, passNode(ident), modifiers, flags)) - } static update2ClassDefinition(original: ClassDefinition | undefined, ident: Identifier | undefined, modifiers: Es2pandaClassDefinitionModifiers, flags: Es2pandaModifierFlags): ClassDefinition { return new ClassDefinition(global.generatedEs2panda._UpdateClassDefinition2(global.context, passNode(original), passNode(ident), modifiers, flags)) } get ident(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._ClassDefinitionIdentConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ClassDefinitionIdent(global.context, this.peer)) } /** @deprecated */ - setIdent(ident: Identifier): this { + setIdent(ident?: Identifier): this { global.generatedEs2panda._ClassDefinitionSetIdent(global.context, this.peer, passNode(ident)) return this } get internalName(): string { return unpackString(global.generatedEs2panda._ClassDefinitionInternalNameConst(global.context, this.peer)) } - /** @deprecated */ - setInternalName(internalName: string): this { - global.generatedEs2panda._ClassDefinitionSetInternalName(global.context, this.peer, internalName) - return this - } get super(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ClassDefinitionSuperConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ClassDefinitionSuper(global.context, this.peer)) } /** @deprecated */ - setSuper(superClass: Expression): this { + setSuper(superClass?: Expression): this { global.generatedEs2panda._ClassDefinitionSetSuper(global.context, this.peer, passNode(superClass)) return this } @@ -114,9 +102,21 @@ export class ClassDefinition extends TypedAstNode { get isAnonymous(): boolean { return global.generatedEs2panda._ClassDefinitionIsAnonymousConst(global.context, this.peer) } + get isIntEnumTransformed(): boolean { + return global.generatedEs2panda._ClassDefinitionIsIntEnumTransformedConst(global.context, this.peer) + } + get isStringEnumTransformed(): boolean { + return global.generatedEs2panda._ClassDefinitionIsStringEnumTransformedConst(global.context, this.peer) + } + get isEnumTransformed(): boolean { + return global.generatedEs2panda._ClassDefinitionIsEnumTransformedConst(global.context, this.peer) + } get isNamespaceTransformed(): boolean { return global.generatedEs2panda._ClassDefinitionIsNamespaceTransformedConst(global.context, this.peer) } + get isFromStruct(): boolean { + return global.generatedEs2panda._ClassDefinitionIsFromStructConst(global.context, this.peer) + } get isModule(): boolean { return global.generatedEs2panda._ClassDefinitionIsModuleConst(global.context, this.peer) } @@ -145,76 +145,176 @@ export class ClassDefinition extends TypedAstNode { global.generatedEs2panda._ClassDefinitionSetNamespaceTransformed(global.context, this.peer) return this } + /** @deprecated */ + setFromStructModifier(): this { + global.generatedEs2panda._ClassDefinitionSetFromStructModifier(global.context, this.peer) + return this + } get modifiers(): Es2pandaClassDefinitionModifiers { return global.generatedEs2panda._ClassDefinitionModifiersConst(global.context, this.peer) } /** @deprecated */ + addProperties(body: readonly AstNode[]): this { + global.generatedEs2panda._ClassDefinitionAddProperties(global.context, this.peer, passNodeArray(body), body.length) + return this + } + get ctor(): MethodDefinition | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionCtor(global.context, this.peer)) + } + get typeParams(): TSTypeParameterDeclaration | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionTypeParams(global.context, this.peer)) + } + get superTypeParams(): TSTypeParameterInstantiation | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionSuperTypeParams(global.context, this.peer)) + } + get localTypeCounter(): number { + return global.generatedEs2panda._ClassDefinitionLocalTypeCounter(global.context, this.peer) + } + get localIndex(): number { + return global.generatedEs2panda._ClassDefinitionLocalIndexConst(global.context, this.peer) + } + get functionalReferenceReferencedMethod(): MethodDefinition | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionFunctionalReferenceReferencedMethodConst(global.context, this.peer)) + } + /** @deprecated */ + setFunctionalReferenceReferencedMethod(functionalReferenceReferencedMethod?: MethodDefinition): this { + global.generatedEs2panda._ClassDefinitionSetFunctionalReferenceReferencedMethod(global.context, this.peer, passNode(functionalReferenceReferencedMethod)) + return this + } + get localPrefix(): string { + return unpackString(global.generatedEs2panda._ClassDefinitionLocalPrefixConst(global.context, this.peer)) + } + get origEnumDecl(): TSEnumDeclaration | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionOrigEnumDeclConst(global.context, this.peer)) + } + get anonClass(): ClassDeclaration | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionGetAnonClass(global.context, this.peer)) + } + get hasPrivateMethod(): boolean { + return global.generatedEs2panda._ClassDefinitionHasPrivateMethodConst(global.context, this.peer) + } + get hasNativeMethod(): boolean { + return global.generatedEs2panda._ClassDefinitionHasNativeMethodConst(global.context, this.peer) + } + get hasComputedInstanceField(): boolean { + return global.generatedEs2panda._ClassDefinitionHasComputedInstanceFieldConst(global.context, this.peer) + } + /** @deprecated */ + addToExportedClasses(cls?: ClassDeclaration): this { + global.generatedEs2panda._ClassDefinitionAddToExportedClasses(global.context, this.peer, passNode(cls)) + return this + } + /** @deprecated */ setModifiers(modifiers: Es2pandaClassDefinitionModifiers): this { global.generatedEs2panda._ClassDefinitionSetModifiers(global.context, this.peer, modifiers) return this } /** @deprecated */ - addProperties(body: readonly AstNode[]): this { - global.generatedEs2panda._ClassDefinitionAddProperties(global.context, this.peer, passNodeArray(body), body.length) + emplaceBody(body?: AstNode): this { + global.generatedEs2panda._ClassDefinitionEmplaceBody(global.context, this.peer, passNode(body)) + return this + } + /** @deprecated */ + clearBody(): this { + global.generatedEs2panda._ClassDefinitionClearBody(global.context, this.peer) + return this + } + /** @deprecated */ + setValueBody(body: AstNode | undefined, index: number): this { + global.generatedEs2panda._ClassDefinitionSetValueBody(global.context, this.peer, passNode(body), index) return this } get body(): readonly AstNode[] { - return unpackNodeArray(global.generatedEs2panda._ClassDefinitionBodyConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ClassDefinitionBody(global.context, this.peer)) + } + get bodyForUpdate(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._ClassDefinitionBodyForUpdate(global.context, this.peer)) } /** @deprecated */ - setCtor(ctor: MethodDefinition): this { - global.generatedEs2panda._ClassDefinitionSetCtor(global.context, this.peer, passNode(ctor)) + emplaceImplements(_implements?: TSClassImplements): this { + global.generatedEs2panda._ClassDefinitionEmplaceImplements(global.context, this.peer, passNode(_implements)) + return this + } + /** @deprecated */ + clearImplements(): this { + global.generatedEs2panda._ClassDefinitionClearImplements(global.context, this.peer) + return this + } + /** @deprecated */ + setValueImplements(_implements: TSClassImplements | undefined, index: number): this { + global.generatedEs2panda._ClassDefinitionSetValueImplements(global.context, this.peer, passNode(_implements), index) return this } get implements(): readonly TSClassImplements[] { - return unpackNodeArray(global.generatedEs2panda._ClassDefinitionImplementsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ClassDefinitionImplements(global.context, this.peer)) } - get typeParams(): TSTypeParameterDeclaration | undefined { - return unpackNode(global.generatedEs2panda._ClassDefinitionTypeParamsConst(global.context, this.peer)) + get implementsForUpdate(): readonly TSClassImplements[] { + return unpackNodeArray(global.generatedEs2panda._ClassDefinitionImplementsForUpdate(global.context, this.peer)) + } + /** @deprecated */ + setCtor(ctor?: MethodDefinition): this { + global.generatedEs2panda._ClassDefinitionSetCtor(global.context, this.peer, passNode(ctor)) + return this } /** @deprecated */ - setTypeParams(typeParams: TSTypeParameterDeclaration): this { + setTypeParams(typeParams?: TSTypeParameterDeclaration): this { global.generatedEs2panda._ClassDefinitionSetTypeParams(global.context, this.peer, passNode(typeParams)) return this } - get superTypeParams(): TSTypeParameterInstantiation | undefined { - return unpackNode(global.generatedEs2panda._ClassDefinitionSuperTypeParamsConst(global.context, this.peer)) + /** @deprecated */ + setOrigEnumDecl(origEnumDecl?: TSEnumDeclaration): this { + global.generatedEs2panda._ClassDefinitionSetOrigEnumDecl(global.context, this.peer, passNode(origEnumDecl)) + return this } - get localTypeCounter(): number { - return global.generatedEs2panda._ClassDefinitionLocalTypeCounter(global.context, this.peer) + /** @deprecated */ + setAnonClass(anonClass?: ClassDeclaration): this { + global.generatedEs2panda._ClassDefinitionSetAnonClass(global.context, this.peer, passNode(anonClass)) + return this } - get localIndex(): number { - return global.generatedEs2panda._ClassDefinitionLocalIndexConst(global.context, this.peer) + /** @deprecated */ + setInternalName(internalName: string): this { + global.generatedEs2panda._ClassDefinitionSetInternalName(global.context, this.peer, internalName) + return this } - get localPrefix(): string { - return unpackString(global.generatedEs2panda._ClassDefinitionLocalPrefixConst(global.context, this.peer)) + /** @deprecated */ + emplaceAnnotations(source?: AnnotationUsage): this { + global.generatedEs2panda._ClassDefinitionEmplaceAnnotations(global.context, this.peer, passNode(source)) + return this } /** @deprecated */ - setOrigEnumDecl(enumDecl: TSEnumDeclaration): this { - global.generatedEs2panda._ClassDefinitionSetOrigEnumDecl(global.context, this.peer, passNode(enumDecl)) + clearAnnotations(): this { + global.generatedEs2panda._ClassDefinitionClearAnnotations(global.context, this.peer) return this } - get origEnumDecl(): TSEnumDeclaration | undefined { - return unpackNode(global.generatedEs2panda._ClassDefinitionOrigEnumDeclConst(global.context, this.peer)) + /** @deprecated */ + setValueAnnotations(source: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._ClassDefinitionSetValueAnnotations(global.context, this.peer, passNode(source), index) + return this } - get getAnonClass(): ClassDeclaration | undefined { - return unpackNode(global.generatedEs2panda._ClassDefinitionGetAnonClass(global.context, this.peer)) + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ClassDefinitionAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ClassDefinitionAnnotations(global.context, this.peer)) } /** @deprecated */ - setAnonClass(anonClass: ClassDeclaration): this { - global.generatedEs2panda._ClassDefinitionSetAnonClass(global.context, this.peer, passNode(anonClass)) + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ClassDefinitionSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) return this } - get annotations(): readonly AnnotationUsage[] { - return unpackNodeArray(global.generatedEs2panda._ClassDefinitionAnnotationsConst(global.context, this.peer)) + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ClassDefinitionSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this } /** @deprecated */ - setAnnotations(annotations: readonly AnnotationUsage[]): this { - global.generatedEs2panda._ClassDefinitionSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) + addAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._ClassDefinitionAddAnnotations(global.context, this.peer, passNode(annotations)) return this } + protected readonly brandClassDefinition: undefined } -export function isClassDefinition(node: AstNode): node is ClassDefinition { +export function isClassDefinition(node: object | undefined): node is ClassDefinition { return node instanceof ClassDefinition } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION)) { diff --git a/koala-wrapper/src/generated/peers/CodeGen.ts b/koala-wrapper/src/generated/peers/CodeGen.ts new file mode 100644 index 000000000..149f7f378 --- /dev/null +++ b/koala-wrapper/src/generated/peers/CodeGen.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class CodeGen extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandCodeGen: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/Declaration.ts b/koala-wrapper/src/generated/peers/Declaration.ts new file mode 100644 index 000000000..1fc4fbb48 --- /dev/null +++ b/koala-wrapper/src/generated/peers/Declaration.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class Declaration extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandDeclaration: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/DiagnosticInfo.ts b/koala-wrapper/src/generated/peers/DiagnosticInfo.ts new file mode 100644 index 000000000..fe7ef5cff --- /dev/null +++ b/koala-wrapper/src/generated/peers/DiagnosticInfo.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class DiagnosticInfo extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandDiagnosticInfo: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/DynamicImportData.ts b/koala-wrapper/src/generated/peers/DynamicImportData.ts new file mode 100644 index 000000000..04f36f294 --- /dev/null +++ b/koala-wrapper/src/generated/peers/DynamicImportData.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class DynamicImportData extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandDynamicImportData: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ETSKeyofType.ts b/koala-wrapper/src/generated/peers/ETSKeyofType.ts new file mode 100644 index 000000000..902599c00 --- /dev/null +++ b/koala-wrapper/src/generated/peers/ETSKeyofType.ts @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" +export class ETSKeyofType extends TypeNode { + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 75) + super(pointer) + } + static createETSKeyofType(type?: TypeNode): ETSKeyofType { + return new ETSKeyofType(global.generatedEs2panda._CreateETSKeyofType(global.context, passNode(type))) + } + static updateETSKeyofType(original?: ETSKeyofType, type?: TypeNode): ETSKeyofType { + return new ETSKeyofType(global.generatedEs2panda._UpdateETSKeyofType(global.context, passNode(original), passNode(type))) + } + get typeRef(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ETSKeyofTypeGetTypeRefConst(global.context, this.peer)) + } + protected readonly brandETSKeyofType: undefined +} +export function isETSKeyofType(node: object | undefined): node is ETSKeyofType { + return node instanceof ETSKeyofType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_KEYOF_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_KEYOF_TYPE, ETSKeyofType) +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ETSStringLiteralType.ts b/koala-wrapper/src/generated/peers/ETSStringLiteralType.ts new file mode 100644 index 000000000..7578d9521 --- /dev/null +++ b/koala-wrapper/src/generated/peers/ETSStringLiteralType.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" +export class ETSStringLiteralType extends TypeNode { + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 66) + super(pointer) + } + static createETSStringLiteralType(value: string): ETSStringLiteralType { + return new ETSStringLiteralType(global.generatedEs2panda._CreateETSStringLiteralType(global.context, value)) + } + static updateETSStringLiteralType(original: ETSStringLiteralType | undefined, value: string): ETSStringLiteralType { + return new ETSStringLiteralType(global.generatedEs2panda._UpdateETSStringLiteralType(global.context, passNode(original), value)) + } + protected readonly brandETSStringLiteralType: undefined +} +export function isETSStringLiteralType(node: object | undefined): node is ETSStringLiteralType { + return node instanceof ETSStringLiteralType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE, ETSStringLiteralType) +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ErrorLogger.ts b/koala-wrapper/src/generated/peers/ErrorLogger.ts new file mode 100644 index 000000000..2d43eb18b --- /dev/null +++ b/koala-wrapper/src/generated/peers/ErrorLogger.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class ErrorLogger extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandErrorLogger: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/IRNode.ts b/koala-wrapper/src/generated/peers/IRNode.ts new file mode 100644 index 000000000..3504509b5 --- /dev/null +++ b/koala-wrapper/src/generated/peers/IRNode.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class IRNode extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandIRNode: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/IndexInfo.ts b/koala-wrapper/src/generated/peers/IndexInfo.ts new file mode 100644 index 000000000..56f31a5fc --- /dev/null +++ b/koala-wrapper/src/generated/peers/IndexInfo.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class IndexInfo extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandIndexInfo: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/LabelPair.ts b/koala-wrapper/src/generated/peers/LabelPair.ts index c949e6fc1..77d2431a8 100644 --- a/koala-wrapper/src/generated/peers/LabelPair.ts +++ b/koala-wrapper/src/generated/peers/LabelPair.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/koala-wrapper/src/generated/peers/ObjectDescriptor.ts b/koala-wrapper/src/generated/peers/ObjectDescriptor.ts new file mode 100644 index 000000000..5a953119c --- /dev/null +++ b/koala-wrapper/src/generated/peers/ObjectDescriptor.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class ObjectDescriptor extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandObjectDescriptor: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/Program.ts b/koala-wrapper/src/generated/peers/Program.ts new file mode 100644 index 000000000..20331160d --- /dev/null +++ b/koala-wrapper/src/generated/peers/Program.ts @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { BlockStatement } from "./BlockStatement" +import { ClassDefinition } from "./ClassDefinition" +import { Es2pandaModuleKind } from "./../Es2pandaEnums" +import { Es2pandaProgramFlags } from "./../Es2pandaEnums" +import { Es2pandaScriptKind } from "./../Es2pandaEnums" +import { SourcePosition } from "./SourcePosition" +export class Program extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + /** @deprecated */ + setKind(kind: Es2pandaScriptKind): this { + global.generatedEs2panda._ProgramSetKind(global.context, this.peer, kind) + return this + } + /** @deprecated */ + pushVarBinder(): this { + global.generatedEs2panda._ProgramPushVarBinder(global.context, this.peer) + return this + } + /** @deprecated */ + pushChecker(): this { + global.generatedEs2panda._ProgramPushChecker(global.context, this.peer) + return this + } + get kind(): Es2pandaScriptKind { + return global.generatedEs2panda._ProgramKindConst(global.context, this.peer) + } + get sourceCode(): string { + return unpackString(global.generatedEs2panda._ProgramSourceCodeConst(global.context, this.peer)) + } + get sourceFilePath(): string { + return unpackString(global.generatedEs2panda._ProgramSourceFilePathConst(global.context, this.peer)) + } + get sourceFileFolder(): string { + return unpackString(global.generatedEs2panda._ProgramSourceFileFolderConst(global.context, this.peer)) + } + get fileName(): string { + return unpackString(global.generatedEs2panda._ProgramFileNameConst(global.context, this.peer)) + } + get fileNameWithExtension(): string { + return unpackString(global.generatedEs2panda._ProgramFileNameWithExtensionConst(global.context, this.peer)) + } + get absoluteName(): string { + return unpackString(global.generatedEs2panda._ProgramAbsoluteNameConst(global.context, this.peer)) + } + get resolvedFilePath(): string { + return unpackString(global.generatedEs2panda._ProgramResolvedFilePathConst(global.context, this.peer)) + } + get relativeFilePath(): string { + return unpackString(global.generatedEs2panda._ProgramRelativeFilePathConst(global.context, this.peer)) + } + /** @deprecated */ + setRelativeFilePath(relPath: string): this { + global.generatedEs2panda._ProgramSetRelativeFilePath(global.context, this.peer, relPath) + return this + } + get ast(): BlockStatement { + return unpackNonNullableNode(global.generatedEs2panda._ProgramAst(global.context, this.peer)) + } + /** @deprecated */ + setAst(ast?: BlockStatement): this { + global.generatedEs2panda._ProgramSetAst(global.context, this.peer, passNode(ast)) + return this + } + get globalClass(): ClassDefinition | undefined { + return unpackNode(global.generatedEs2panda._ProgramGlobalClass(global.context, this.peer)) + } + /** @deprecated */ + setGlobalClass(globalClass?: ClassDefinition): this { + global.generatedEs2panda._ProgramSetGlobalClass(global.context, this.peer, passNode(globalClass)) + return this + } + get packageStart(): SourcePosition | undefined { + return new SourcePosition(global.generatedEs2panda._ProgramPackageStartConst(global.context, this.peer)) + } + /** @deprecated */ + setPackageStart(start?: SourcePosition): this { + global.generatedEs2panda._ProgramSetPackageStart(global.context, this.peer, passNode(start)) + return this + } + /** @deprecated */ + setSource(sourceCode: string, sourceFilePath: string, sourceFileFolder: string): this { + global.generatedEs2panda._ProgramSetSource(global.context, this.peer, sourceCode, sourceFilePath, sourceFileFolder) + return this + } + /** @deprecated */ + setPackageInfo(name: string, kind: Es2pandaModuleKind): this { + global.generatedEs2panda._ProgramSetPackageInfo(global.context, this.peer, name, kind) + return this + } + get moduleName(): string { + return unpackString(global.generatedEs2panda._ProgramModuleNameConst(global.context, this.peer)) + } + get modulePrefix(): string { + return unpackString(global.generatedEs2panda._ProgramModulePrefixConst(global.context, this.peer)) + } + get isSeparateModule(): boolean { + return global.generatedEs2panda._ProgramIsSeparateModuleConst(global.context, this.peer) + } + get isDeclarationModule(): boolean { + return global.generatedEs2panda._ProgramIsDeclarationModuleConst(global.context, this.peer) + } + get isPackage(): boolean { + return global.generatedEs2panda._ProgramIsPackageConst(global.context, this.peer) + } + /** @deprecated */ + setFlag(flag: Es2pandaProgramFlags): this { + global.generatedEs2panda._ProgramSetFlag(global.context, this.peer, flag) + return this + } + /** @deprecated */ + setASTChecked(): this { + global.generatedEs2panda._ProgramSetASTChecked(global.context, this.peer) + return this + } + get isASTChecked(): boolean { + return global.generatedEs2panda._ProgramIsASTChecked(global.context, this.peer) + } + /** @deprecated */ + markASTAsLowered(): this { + global.generatedEs2panda._ProgramMarkASTAsLowered(global.context, this.peer) + return this + } + get isASTLowered(): boolean { + return global.generatedEs2panda._ProgramIsASTLoweredConst(global.context, this.peer) + } + get isStdLib(): boolean { + return global.generatedEs2panda._ProgramIsStdLibConst(global.context, this.peer) + } + get dump(): string { + return unpackString(global.generatedEs2panda._ProgramDumpConst(global.context, this.peer)) + } + /** @deprecated */ + dumpSilent(): this { + global.generatedEs2panda._ProgramDumpSilentConst(global.context, this.peer) + return this + } + /** @deprecated */ + addDeclGenExportNode(declGenExportStr: string, node?: AstNode): this { + global.generatedEs2panda._ProgramAddDeclGenExportNode(global.context, this.peer, declGenExportStr, passNode(node)) + return this + } + get isDied(): boolean { + return global.generatedEs2panda._ProgramIsDiedConst(global.context, this.peer) + } + /** @deprecated */ + addFileDependencies(file: string, depFile: string): this { + global.generatedEs2panda._ProgramAddFileDependencies(global.context, this.peer, file, depFile) + return this + } + protected readonly brandProgram: undefined +} +export function isProgram(node: object | undefined): node is Program { + return node instanceof Program +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ScopeFindResult.ts b/koala-wrapper/src/generated/peers/ScopeFindResult.ts new file mode 100644 index 000000000..60601169d --- /dev/null +++ b/koala-wrapper/src/generated/peers/ScopeFindResult.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class ScopeFindResult extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandScopeFindResult: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ScriptFunctionData.ts b/koala-wrapper/src/generated/peers/ScriptFunctionData.ts new file mode 100644 index 000000000..05f0b2b62 --- /dev/null +++ b/koala-wrapper/src/generated/peers/ScriptFunctionData.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class ScriptFunctionData extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandScriptFunctionData: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/SignatureInfo.ts b/koala-wrapper/src/generated/peers/SignatureInfo.ts new file mode 100644 index 000000000..ae3e1bb0f --- /dev/null +++ b/koala-wrapper/src/generated/peers/SignatureInfo.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class SignatureInfo extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandSignatureInfo: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/SourcePosition.ts b/koala-wrapper/src/generated/peers/SourcePosition.ts new file mode 100644 index 000000000..29055679a --- /dev/null +++ b/koala-wrapper/src/generated/peers/SourcePosition.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class SourcePosition extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandSourcePosition: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/SourceRange.ts b/koala-wrapper/src/generated/peers/SourceRange.ts new file mode 100644 index 000000000..050042f44 --- /dev/null +++ b/koala-wrapper/src/generated/peers/SourceRange.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class SourceRange extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandSourceRange: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/SuggestionInfo.ts b/koala-wrapper/src/generated/peers/SuggestionInfo.ts new file mode 100644 index 000000000..7dfebaa04 --- /dev/null +++ b/koala-wrapper/src/generated/peers/SuggestionInfo.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class SuggestionInfo extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandSuggestionInfo: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/VReg.ts b/koala-wrapper/src/generated/peers/VReg.ts new file mode 100644 index 000000000..7825e1414 --- /dev/null +++ b/koala-wrapper/src/generated/peers/VReg.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class VReg extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandVReg: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/VerificationContext.ts b/koala-wrapper/src/generated/peers/VerificationContext.ts new file mode 100644 index 000000000..be9899f2a --- /dev/null +++ b/koala-wrapper/src/generated/peers/VerificationContext.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class VerificationContext extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandVerificationContext: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/VerifierMessage.ts b/koala-wrapper/src/generated/peers/VerifierMessage.ts new file mode 100644 index 000000000..66e7ead29 --- /dev/null +++ b/koala-wrapper/src/generated/peers/VerifierMessage.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +export class VerifierMessage extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandVerifierMessage: undefined +} \ No newline at end of file diff --git a/koala-wrapper/src/plugin-utils.ts b/koala-wrapper/src/plugin-utils.ts new file mode 100644 index 000000000..c81554ddb --- /dev/null +++ b/koala-wrapper/src/plugin-utils.ts @@ -0,0 +1,118 @@ +// /* +// * Copyright (c) 2025 Huawei Device Co., Ltd. +// * Licensed under the Apache License, Version 2.0 (the "License"); +// * you may not use this file except in compliance with the License. +// * You may obtain a copy of the License at +// * +// * http://www.apache.org/licenses/LICENSE-2.0 +// * +// * Unless required by applicable law or agreed to in writing, software +// * distributed under the License is distributed on an "AS IS" BASIS, +// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// * See the License for the specific language governing permissions and +// * limitations under the License. +// */ + +// import { +// Es2pandaContextState, +// PluginContext, +// ImportStorage, +// setBaseOverloads, +// arktsGlobal, +// ChainExpressionFilter, +// ProgramTransformer, +// Program, +// inferVoidReturnType, +// ProgramProvider, +// CompilationOptions +// } from "./arkts-api" +// import { AstNode } from "./reexport-for-generated" + +// export interface RunTransformerHooks { +// onProgramTransformStart?(options: CompilationOptions): void +// onProgramTransformEnd?(options: CompilationOptions): void +// } + +// class ASTCache { +// processedPrograms = new Set() +// constructor() { } +// find(program: Program): boolean { +// return this.processedPrograms.has(program.absoluteName) +// } +// update(program: Program) { +// this.processedPrograms.add(program.absoluteName) +// } +// } + +// export function runTransformer(prog: Program, state: Es2pandaContextState, restart: boolean, transform: ProgramTransformer | undefined, pluginContext: PluginContext, hooks: RunTransformerHooks = {}, onlyModifyMain: boolean = false) { +// // Program provider used to provide programs to transformer dynamically relative to inserted imports +// const provider = new ProgramProvider(prog) + +// // The first program provided by program provider is the main program +// let currentProgram = provider.next() +// let isMainProgram = true + +// while (currentProgram) { +// // Options passed to plugin and hooks +// const options: CompilationOptions = { +// isMainProgram, +// stage: state, +// restart, +// } + +// // Perform some additional actions before the transformation start +// hooks.onProgramTransformStart?.(options) + +// // AST to be transformed +// const ast = currentProgram.ast + +// // Save currently existing imports in the program +// const importStorage = new ImportStorage(currentProgram, state == Es2pandaContextState.ES2PANDA_STATE_PARSED) + +// // Run some common plugins that should be run before plugin usage and depends on the current stage +// stageSpecificPreFilters(ast, state) + +// // Run the plugin itself +// if (options.isMainProgram || !onlyModifyMain) { +// transform?.(currentProgram, options, pluginContext) +// } + +// // Run some common plugins that should be run after plugin usage and depends on the current stage +// stageSpecificPostFilters(ast, state) + +// // For oveloads, set additional pointer to base overload to fix AST +// setBaseOverloads(ast) + +// // Update internal import information based on import modification by plugin +// importStorage.update() + +// // Set parents of all nodes in AST +// setAllParents(ast) + +// // Perform some additional actions after the transformation end +// hooks.onProgramTransformEnd?.(options) + +// // The first program is always the main program, so break here if should not proceed external sources +// if (restart) break +// isMainProgram = false + +// // Proceed to the next program +// currentProgram = provider.next() +// } +// } + +// function setAllParents(ast: AstNode) { +// arktsGlobal.es2panda._AstNodeUpdateAll(arktsGlobal.context, ast.peer) +// } + +// function stageSpecificPreFilters(script: AstNode, state: Es2pandaContextState) { +// if (state == Es2pandaContextState.ES2PANDA_STATE_CHECKED) { +// inferVoidReturnType(script) +// } +// } + +// function stageSpecificPostFilters(script: AstNode, state: Es2pandaContextState) { +// if (state == Es2pandaContextState.ES2PANDA_STATE_CHECKED) { +// new ChainExpressionFilter().visitor(script) +// } +// } diff --git a/koala-wrapper/src/reexport-for-generated.ts b/koala-wrapper/src/reexport-for-generated.ts index 1c49c9e74..728442ddb 100644 --- a/koala-wrapper/src/reexport-for-generated.ts +++ b/koala-wrapper/src/reexport-for-generated.ts @@ -14,7 +14,8 @@ */ export { KNativePointer } from "@koalaui/interop" export { AstNode } from "./arkts-api/peers/AstNode" -export { ArktsObject } from "./arkts-api/peers/ArktsObject" +export { ArktsObject, isSameNativeObject } from "./arkts-api/peers/ArktsObject" +// export { NodeCache } from "./arkts-api/node-cache" export { Es2pandaAstNodeType } from "./generated/Es2pandaEnums" export { passNode, -- Gitee From 17ae48e4cdc56462da468e6788eb03f83908d114 Mon Sep 17 00:00:00 2001 From: xieziang Date: Mon, 16 Jun 2025 16:21:24 +0800 Subject: [PATCH 15/17] update generated/ Signed-off-by: xieziang Change-Id: Iabcd0115ab5a59467960d73cf36de07cf997cc99 --- .../ETSNewClassInstanceExpression.ts | 4 +- .../node-utilities/ETSPrimitiveType.ts | 2 +- .../src/arkts-api/utilities/private.ts | 13 +- koala-wrapper/src/arkts-api/visitor.ts | 4 +- .../src/generated/peers/ClassElement.ts | 61 ++++++--- .../src/generated/peers/ClassExpression.ts | 12 +- .../src/generated/peers/ClassProperty.ts | 66 ++++++++-- .../src/generated/peers/ClassStaticBlock.ts | 16 ++- .../generated/peers/ConditionalExpression.ts | 22 ++-- .../src/generated/peers/ContinueStatement.ts | 26 ++-- .../src/generated/peers/DebuggerStatement.ts | 10 +- .../src/generated/peers/Decorator.ts | 12 +- .../generated/peers/DirectEvalExpression.ts | 10 +- .../src/generated/peers/DoWhileStatement.ts | 16 +-- .../src/generated/peers/ETSClassLiteral.ts | 10 +- .../generated/peers/ETSDynamicFunctionType.ts | 7 +- .../src/generated/peers/ETSFunctionType.ts | 24 ++-- .../generated/peers/ETSImportDeclaration.ts | 50 ++++--- .../src/generated/peers/ETSModule.ts | 69 ++++++++-- .../peers/ETSNewArrayInstanceExpression.ts | 21 +-- .../peers/ETSNewClassInstanceExpression.ts | 21 ++- .../ETSNewMultiDimArrayInstanceExpression.ts | 22 ++-- .../src/generated/peers/ETSNullType.ts | 10 +- .../generated/peers/ETSPackageDeclaration.ts | 12 +- .../generated/peers/ETSParameterExpression.ts | 82 +++++++++--- .../src/generated/peers/ETSPrimitiveType.ts | 14 +- .../generated/peers/ETSReExportDeclaration.ts | 18 +-- .../generated/peers/ETSStructDeclaration.ts | 10 +- koala-wrapper/src/generated/peers/ETSTuple.ts | 24 ++-- .../src/generated/peers/ETSTypeReference.ts | 17 ++- .../generated/peers/ETSTypeReferencePart.ts | 25 ++-- .../src/generated/peers/ETSUndefinedType.ts | 10 +- .../src/generated/peers/ETSUnionType.ts | 15 ++- .../src/generated/peers/ETSWildcardType.ts | 14 +- .../src/generated/peers/EmptyStatement.ts | 20 ++- .../generated/peers/ExportAllDeclaration.ts | 12 +- .../peers/ExportDefaultDeclaration.ts | 12 +- .../generated/peers/ExportNamedDeclaration.ts | 17 ++- .../src/generated/peers/ExportSpecifier.ts | 29 ++++- .../src/generated/peers/Expression.ts | 26 +++- .../generated/peers/ExpressionStatement.ts | 18 +-- .../src/generated/peers/ForInStatement.ts | 18 +-- .../src/generated/peers/ForOfStatement.ts | 18 +-- .../src/generated/peers/ForUpdateStatement.ts | 18 +-- .../src/generated/peers/FunctionDecl.ts | 7 +- .../generated/peers/FunctionDeclaration.ts | 59 ++++++--- .../src/generated/peers/FunctionExpression.ts | 21 ++- .../src/generated/peers/FunctionSignature.ts | 20 +-- .../src/generated/peers/Identifier.ts | 36 +++-- .../src/generated/peers/IfStatement.ts | 28 ++-- .../generated/peers/ImportDefaultSpecifier.ts | 14 +- .../src/generated/peers/ImportExpression.ts | 12 +- .../peers/ImportNamespaceSpecifier.ts | 14 +- .../src/generated/peers/ImportSource.ts | 18 +-- .../src/generated/peers/ImportSpecifier.ts | 24 ++-- .../src/generated/peers/InterfaceDecl.ts | 7 +- .../src/generated/peers/LabelPair.ts | 3 +- .../src/generated/peers/LabelledStatement.ts | 19 +-- koala-wrapper/src/generated/peers/Literal.ts | 15 ++- .../src/generated/peers/LoopStatement.ts | 7 +- .../peers/MaybeOptionalExpression.ts | 7 +- .../src/generated/peers/MemberExpression.ts | 41 ++++-- .../src/generated/peers/MetaProperty.ts | 12 +- .../src/generated/peers/MethodDefinition.ts | 67 +++++++--- .../src/generated/peers/NamedType.ts | 16 +-- .../src/generated/peers/NewExpression.ts | 10 +- .../src/generated/peers/NullLiteral.ts | 10 +- .../src/generated/peers/NumberLiteral.ts | 28 +++- .../src/generated/peers/ObjectExpression.ts | 38 +++--- .../src/generated/peers/OmittedExpression.ts | 10 +- .../src/generated/peers/OpaqueTypeNode.ts | 10 +- .../peers/PrefixAssertionExpression.ts | 10 +- koala-wrapper/src/generated/peers/Property.ts | 29 +++-- .../src/generated/peers/RegExpLiteral.ts | 12 +- .../src/generated/peers/ReturnStatement.ts | 27 ++-- .../src/generated/peers/ScriptFunction.ts | 123 ++++++++++++++---- .../src/generated/peers/SequenceExpression.ts | 12 +- 77 files changed, 1075 insertions(+), 628 deletions(-) diff --git a/koala-wrapper/src/arkts-api/node-utilities/ETSNewClassInstanceExpression.ts b/koala-wrapper/src/arkts-api/node-utilities/ETSNewClassInstanceExpression.ts index 493ab5b9d..ada8b8020 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ETSNewClassInstanceExpression.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ETSNewClassInstanceExpression.ts @@ -23,8 +23,8 @@ export function updateETSNewClassInstanceExpression( _arguments: readonly Expression[] ): ETSNewClassInstanceExpression { if ( - isSameNativeObject(typeReference, original.getTypeRef) && - isSameNativeObject(_arguments, original.getArguments) + isSameNativeObject(typeReference, original.typeRef) && + isSameNativeObject(_arguments, original.arguments) ) { return original; } diff --git a/koala-wrapper/src/arkts-api/node-utilities/ETSPrimitiveType.ts b/koala-wrapper/src/arkts-api/node-utilities/ETSPrimitiveType.ts index 71f261156..1c6333c5e 100644 --- a/koala-wrapper/src/arkts-api/node-utilities/ETSPrimitiveType.ts +++ b/koala-wrapper/src/arkts-api/node-utilities/ETSPrimitiveType.ts @@ -19,7 +19,7 @@ import { attachModifiers, updateThenAttach } from '../utilities/private'; import { Es2pandaPrimitiveType } from '../../generated/Es2pandaEnums'; export function updateETSPrimitiveType(original: ETSPrimitiveType, type: Es2pandaPrimitiveType): ETSPrimitiveType { - if (isSameNativeObject(type, original.getPrimitiveType)) { + if (isSameNativeObject(type, original.primitiveType)) { return original; } diff --git a/koala-wrapper/src/arkts-api/utilities/private.ts b/koala-wrapper/src/arkts-api/utilities/private.ts index 6451883cf..34cf12883 100644 --- a/koala-wrapper/src/arkts-api/utilities/private.ts +++ b/koala-wrapper/src/arkts-api/utilities/private.ts @@ -80,8 +80,17 @@ export function unpackNodeArray(nodesPtr: KNativePointer): T[ return new NativePtrDecoder().decode(nodesPtr).map((peer: KNativePointer) => unpackNonNullableNode(peer)); } -export function passNodeArray(nodes: readonly AstNode[] | undefined): BigUint64Array { - return new BigUint64Array(nodes?.map((node) => BigInt(node.peer)) ?? []); +// export function passNodeArray(nodes: readonly AstNode[] | undefined): BigUint64Array { +// return new BigUint64Array(nodes?.map((node) => BigInt(node.peer)) ?? []); +// } + +export function passNodeArray(nodes: readonly ArktsObject[] | undefined): BigUint64Array { + return new BigUint64Array( + nodes + ?.filter(it => it.peer != undefined) + ?.map(node => BigInt(node.peer)) + ?? [] + ) } export function unpackNonNullableObject( diff --git a/koala-wrapper/src/arkts-api/visitor.ts b/koala-wrapper/src/arkts-api/visitor.ts index 5199f48f2..13ba26795 100644 --- a/koala-wrapper/src/arkts-api/visitor.ts +++ b/koala-wrapper/src/arkts-api/visitor.ts @@ -144,8 +144,8 @@ function visitOuterExpression(node: AstNode, visitor: Visitor): AstNode { updated = true; return factory.updateETSNewClassInstanceExpression( node, - node.getTypeRef, - nodesVisitor(node.getArguments, visitor) + node.typeRef, + nodesVisitor(node.arguments, visitor) ); } if (isArrayExpression(node)) { diff --git a/koala-wrapper/src/generated/peers/ClassElement.ts b/koala-wrapper/src/generated/peers/ClassElement.ts index 2299f192f..0f2c814c0 100644 --- a/koala-wrapper/src/generated/peers/ClassElement.ts +++ b/koala-wrapper/src/generated/peers/ClassElement.ts @@ -22,46 +22,77 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypedStatement } from "./TypedStatement" -import { Identifier } from "./Identifier" -import { Expression } from "./Expression" import { Decorator } from "./Decorator" -import { Es2pandaPrivateFieldKind } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { TSEnumMember } from "./TSEnumMember" +import { TypedStatement } from "./TypedStatement" export class ClassElement extends TypedStatement { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - + } + get id(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ClassElementId(global.context, this.peer)) } get key(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ClassElementKeyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ClassElementKey(global.context, this.peer)) + } + get value(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ClassElementValue(global.context, this.peer)) } /** @deprecated */ - setValue(value: Expression): this { + setValue(value?: Expression): this { global.generatedEs2panda._ClassElementSetValue(global.context, this.peer, passNode(value)) return this } - get value(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ClassElementValueConst(global.context, this.peer)) + get originEnumMember(): TSEnumMember | undefined { + return unpackNode(global.generatedEs2panda._ClassElementOriginEnumMemberConst(global.context, this.peer)) } - get decorators(): readonly Decorator[] { - return unpackNodeArray(global.generatedEs2panda._ClassElementDecoratorsConst(global.context, this.peer)) + /** @deprecated */ + setOrigEnumMember(enumMember?: TSEnumMember): this { + global.generatedEs2panda._ClassElementSetOrigEnumMember(global.context, this.peer, passNode(enumMember)) + return this + } + get isPrivateElement(): boolean { + return global.generatedEs2panda._ClassElementIsPrivateElementConst(global.context, this.peer) } get isComputed(): boolean { return global.generatedEs2panda._ClassElementIsComputedConst(global.context, this.peer) } /** @deprecated */ - addDecorator(decorator: Decorator): this { + addDecorator(decorator?: Decorator): this { global.generatedEs2panda._ClassElementAddDecorator(global.context, this.peer, passNode(decorator)) return this } + /** @deprecated */ + emplaceDecorators(decorators?: Decorator): this { + global.generatedEs2panda._ClassElementEmplaceDecorators(global.context, this.peer, passNode(decorators)) + return this + } + /** @deprecated */ + clearDecorators(): this { + global.generatedEs2panda._ClassElementClearDecorators(global.context, this.peer) + return this + } + /** @deprecated */ + setValueDecorators(decorators: Decorator | undefined, index: number): this { + global.generatedEs2panda._ClassElementSetValueDecorators(global.context, this.peer, passNode(decorators), index) + return this + } + get decorators(): readonly Decorator[] { + return unpackNodeArray(global.generatedEs2panda._ClassElementDecorators(global.context, this.peer)) + } + get decoratorsForUpdate(): readonly Decorator[] { + return unpackNodeArray(global.generatedEs2panda._ClassElementDecoratorsForUpdate(global.context, this.peer)) + } + protected readonly brandClassElement: undefined } -export function isClassElement(node: AstNode): node is ClassElement { +export function isClassElement(node: object | undefined): node is ClassElement { return node instanceof ClassElement } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ClassExpression.ts b/koala-wrapper/src/generated/peers/ClassExpression.ts index e0e0bfef8..c7d07d461 100644 --- a/koala-wrapper/src/generated/peers/ClassExpression.ts +++ b/koala-wrapper/src/generated/peers/ClassExpression.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Expression } from "./Expression" import { ClassDefinition } from "./ClassDefinition" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" export class ClassExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 16) super(pointer) - } static createClassExpression(def?: ClassDefinition): ClassExpression { return new ClassExpression(global.generatedEs2panda._CreateClassExpression(global.context, passNode(def))) @@ -46,8 +45,9 @@ export class ClassExpression extends Expression { get definition(): ClassDefinition | undefined { return unpackNode(global.generatedEs2panda._ClassExpressionDefinitionConst(global.context, this.peer)) } + protected readonly brandClassExpression: undefined } -export function isClassExpression(node: AstNode): node is ClassExpression { +export function isClassExpression(node: object | undefined): node is ClassExpression { return node instanceof ClassExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/ClassProperty.ts b/koala-wrapper/src/generated/peers/ClassProperty.ts index 04648bd99..61133afd7 100644 --- a/koala-wrapper/src/generated/peers/ClassProperty.ts +++ b/koala-wrapper/src/generated/peers/ClassProperty.ts @@ -22,23 +22,22 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { AnnotationUsage } from "./AnnotationUsage" import { ClassElement } from "./ClassElement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaModifierFlags } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" -import { Es2pandaModifierFlags } from "./../Es2pandaEnums" -import { AnnotationUsage } from "./AnnotationUsage" export class ClassProperty extends ClassElement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_PROPERTY) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 17) super(pointer) - } static createClassProperty(key: Expression | undefined, value: Expression | undefined, typeAnnotation: TypeNode | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean): ClassProperty { return new ClassProperty(global.generatedEs2panda._CreateClassProperty(global.context, passNode(key), passNode(value), passNode(typeAnnotation), modifiers, isComputed)) @@ -46,24 +45,69 @@ export class ClassProperty extends ClassElement { static updateClassProperty(original: ClassProperty | undefined, key: Expression | undefined, value: Expression | undefined, typeAnnotation: TypeNode | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean): ClassProperty { return new ClassProperty(global.generatedEs2panda._UpdateClassProperty(global.context, passNode(original), passNode(key), passNode(value), passNode(typeAnnotation), modifiers, isComputed)) } + get isDefaultAccessModifier(): boolean { + return global.generatedEs2panda._ClassPropertyIsDefaultAccessModifierConst(global.context, this.peer) + } + /** @deprecated */ + setDefaultAccessModifier(isDefault: boolean): this { + global.generatedEs2panda._ClassPropertySetDefaultAccessModifier(global.context, this.peer, isDefault) + return this + } get typeAnnotation(): TypeNode | undefined { return unpackNode(global.generatedEs2panda._ClassPropertyTypeAnnotationConst(global.context, this.peer)) } /** @deprecated */ - setTypeAnnotation(typeAnnotation: TypeNode): this { + setTypeAnnotation(typeAnnotation?: TypeNode): this { global.generatedEs2panda._ClassPropertySetTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) return this } + get needInitInStaticBlock(): boolean { + return global.generatedEs2panda._ClassPropertyNeedInitInStaticBlockConst(global.context, this.peer) + } + /** @deprecated */ + setInitInStaticBlock(needInitInStaticBlock: boolean): this { + global.generatedEs2panda._ClassPropertySetInitInStaticBlock(global.context, this.peer, needInitInStaticBlock) + return this + } + /** @deprecated */ + emplaceAnnotations(source?: AnnotationUsage): this { + global.generatedEs2panda._ClassPropertyEmplaceAnnotations(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._ClassPropertyClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + setValueAnnotations(source: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._ClassPropertySetValueAnnotations(global.context, this.peer, passNode(source), index) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ClassPropertyAnnotationsForUpdate(global.context, this.peer)) + } get annotations(): readonly AnnotationUsage[] { - return unpackNodeArray(global.generatedEs2panda._ClassPropertyAnnotationsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ClassPropertyAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ClassPropertySetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ClassPropertySetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this } /** @deprecated */ - setAnnotations(annotations: readonly AnnotationUsage[]): this { - global.generatedEs2panda._ClassPropertySetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) + addAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._ClassPropertyAddAnnotations(global.context, this.peer, passNode(annotations)) return this } + protected readonly brandClassProperty: undefined } -export function isClassProperty(node: AstNode): node is ClassProperty { +export function isClassProperty(node: object | undefined): node is ClassProperty { return node instanceof ClassProperty } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_PROPERTY)) { diff --git a/koala-wrapper/src/generated/peers/ClassStaticBlock.ts b/koala-wrapper/src/generated/peers/ClassStaticBlock.ts index 5b2bef593..777a53dc6 100644 --- a/koala-wrapper/src/generated/peers/ClassStaticBlock.ts +++ b/koala-wrapper/src/generated/peers/ClassStaticBlock.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,13 +29,13 @@ import { } from "../../reexport-for-generated" import { ClassElement } from "./ClassElement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { ScriptFunction } from "./ScriptFunction" export class ClassStaticBlock extends ClassElement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_STATIC_BLOCK) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 18) super(pointer) - } static createClassStaticBlock(value?: Expression): ClassStaticBlock { return new ClassStaticBlock(global.generatedEs2panda._CreateClassStaticBlock(global.context, passNode(value))) @@ -44,8 +43,15 @@ export class ClassStaticBlock extends ClassElement { static updateClassStaticBlock(original?: ClassStaticBlock, value?: Expression): ClassStaticBlock { return new ClassStaticBlock(global.generatedEs2panda._UpdateClassStaticBlock(global.context, passNode(original), passNode(value))) } + get function(): ScriptFunction | undefined { + return unpackNode(global.generatedEs2panda._ClassStaticBlockFunction(global.context, this.peer)) + } + get name(): string { + return unpackString(global.generatedEs2panda._ClassStaticBlockNameConst(global.context, this.peer)) + } + protected readonly brandClassStaticBlock: undefined } -export function isClassStaticBlock(node: AstNode): node is ClassStaticBlock { +export function isClassStaticBlock(node: object | undefined): node is ClassStaticBlock { return node instanceof ClassStaticBlock } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_STATIC_BLOCK)) { diff --git a/koala-wrapper/src/generated/peers/ConditionalExpression.ts b/koala-wrapper/src/generated/peers/ConditionalExpression.ts index 998aa934d..e5ea431be 100644 --- a/koala-wrapper/src/generated/peers/ConditionalExpression.ts +++ b/koala-wrapper/src/generated/peers/ConditionalExpression.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class ConditionalExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_CONDITIONAL_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 19) super(pointer) - } static createConditionalExpression(test?: Expression, consequent?: Expression, alternate?: Expression): ConditionalExpression { return new ConditionalExpression(global.generatedEs2panda._CreateConditionalExpression(global.context, passNode(test), passNode(consequent), passNode(alternate))) @@ -43,31 +42,32 @@ export class ConditionalExpression extends Expression { return new ConditionalExpression(global.generatedEs2panda._UpdateConditionalExpression(global.context, passNode(original), passNode(test), passNode(consequent), passNode(alternate))) } get test(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ConditionalExpressionTestConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ConditionalExpressionTest(global.context, this.peer)) } /** @deprecated */ - setTest(expr: Expression): this { + setTest(expr?: Expression): this { global.generatedEs2panda._ConditionalExpressionSetTest(global.context, this.peer, passNode(expr)) return this } get consequent(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ConditionalExpressionConsequentConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ConditionalExpressionConsequent(global.context, this.peer)) } /** @deprecated */ - setConsequent(expr: Expression): this { + setConsequent(expr?: Expression): this { global.generatedEs2panda._ConditionalExpressionSetConsequent(global.context, this.peer, passNode(expr)) return this } get alternate(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ConditionalExpressionAlternateConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ConditionalExpressionAlternate(global.context, this.peer)) } /** @deprecated */ - setAlternate(expr: Expression): this { + setAlternate(expr?: Expression): this { global.generatedEs2panda._ConditionalExpressionSetAlternate(global.context, this.peer, passNode(expr)) return this } + protected readonly brandConditionalExpression: undefined } -export function isConditionalExpression(node: AstNode): node is ConditionalExpression { +export function isConditionalExpression(node: object | undefined): node is ConditionalExpression { return node instanceof ConditionalExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CONDITIONAL_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/ContinueStatement.ts b/koala-wrapper/src/generated/peers/ContinueStatement.ts index 52cd73c0d..e5e98cc99 100644 --- a/koala-wrapper/src/generated/peers/ContinueStatement.ts +++ b/koala-wrapper/src/generated/peers/ContinueStatement.ts @@ -22,46 +22,46 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Identifier } from "./Identifier" +import { Statement } from "./Statement" export class ContinueStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_CONTINUE_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 20) super(pointer) - } - static createContinueStatement(): ContinueStatement { - return new ContinueStatement(global.generatedEs2panda._CreateContinueStatement(global.context)) + static create1ContinueStatement(ident?: Identifier): ContinueStatement { + return new ContinueStatement(global.generatedEs2panda._CreateContinueStatement1(global.context, passNode(ident))) } static updateContinueStatement(original?: ContinueStatement): ContinueStatement { return new ContinueStatement(global.generatedEs2panda._UpdateContinueStatement(global.context, passNode(original))) } - static create1ContinueStatement(ident?: Identifier): ContinueStatement { - return new ContinueStatement(global.generatedEs2panda._CreateContinueStatement1(global.context, passNode(ident))) - } static update1ContinueStatement(original?: ContinueStatement, ident?: Identifier): ContinueStatement { return new ContinueStatement(global.generatedEs2panda._UpdateContinueStatement1(global.context, passNode(original), passNode(ident))) } get ident(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._ContinueStatementIdentConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ContinueStatementIdent(global.context, this.peer)) } get target(): AstNode | undefined { return unpackNode(global.generatedEs2panda._ContinueStatementTargetConst(global.context, this.peer)) } + get hasTarget(): boolean { + return global.generatedEs2panda._ContinueStatementHasTargetConst(global.context, this.peer) + } /** @deprecated */ - setTarget(target: AstNode): this { + setTarget(target?: AstNode): this { global.generatedEs2panda._ContinueStatementSetTarget(global.context, this.peer, passNode(target)) return this } + protected readonly brandContinueStatement: undefined } -export function isContinueStatement(node: AstNode): node is ContinueStatement { +export function isContinueStatement(node: object | undefined): node is ContinueStatement { return node instanceof ContinueStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CONTINUE_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/DebuggerStatement.ts b/koala-wrapper/src/generated/peers/DebuggerStatement.ts index 7bebfba19..88d4b5f5e 100644 --- a/koala-wrapper/src/generated/peers/DebuggerStatement.ts +++ b/koala-wrapper/src/generated/peers/DebuggerStatement.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Statement } from "./Statement" export class DebuggerStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_DEBUGGER_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 21) super(pointer) - } static createDebuggerStatement(): DebuggerStatement { return new DebuggerStatement(global.generatedEs2panda._CreateDebuggerStatement(global.context)) @@ -42,8 +41,9 @@ export class DebuggerStatement extends Statement { static updateDebuggerStatement(original?: DebuggerStatement): DebuggerStatement { return new DebuggerStatement(global.generatedEs2panda._UpdateDebuggerStatement(global.context, passNode(original))) } + protected readonly brandDebuggerStatement: undefined } -export function isDebuggerStatement(node: AstNode): node is DebuggerStatement { +export function isDebuggerStatement(node: object | undefined): node is DebuggerStatement { return node instanceof DebuggerStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_DEBUGGER_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/Decorator.ts b/koala-wrapper/src/generated/peers/Decorator.ts index 4f3366551..cb8b932bc 100644 --- a/koala-wrapper/src/generated/peers/Decorator.ts +++ b/koala-wrapper/src/generated/peers/Decorator.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Statement } from "./Statement" export class Decorator extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_DECORATOR) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 22) super(pointer) - } static createDecorator(expr?: Expression): Decorator { return new Decorator(global.generatedEs2panda._CreateDecorator(global.context, passNode(expr))) @@ -46,8 +45,9 @@ export class Decorator extends Statement { get expr(): Expression | undefined { return unpackNode(global.generatedEs2panda._DecoratorExprConst(global.context, this.peer)) } + protected readonly brandDecorator: undefined } -export function isDecorator(node: AstNode): node is Decorator { +export function isDecorator(node: object | undefined): node is Decorator { return node instanceof Decorator } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_DECORATOR)) { diff --git a/koala-wrapper/src/generated/peers/DirectEvalExpression.ts b/koala-wrapper/src/generated/peers/DirectEvalExpression.ts index 0accb0b24..b8f96ba3c 100644 --- a/koala-wrapper/src/generated/peers/DirectEvalExpression.ts +++ b/koala-wrapper/src/generated/peers/DirectEvalExpression.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,13 +29,13 @@ import { } from "../../reexport-for-generated" import { CallExpression } from "./CallExpression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" export class DirectEvalExpression extends CallExpression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_DIRECT_EVAL) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 23) super(pointer) - } static createDirectEvalExpression(callee: Expression | undefined, _arguments: readonly Expression[], typeParams: TSTypeParameterInstantiation | undefined, optional_arg: boolean, parserStatus: number): DirectEvalExpression { return new DirectEvalExpression(global.generatedEs2panda._CreateDirectEvalExpression(global.context, passNode(callee), passNodeArray(_arguments), _arguments.length, passNode(typeParams), optional_arg, parserStatus)) @@ -44,8 +43,9 @@ export class DirectEvalExpression extends CallExpression { static updateDirectEvalExpression(original: DirectEvalExpression | undefined, callee: Expression | undefined, _arguments: readonly Expression[], typeParams: TSTypeParameterInstantiation | undefined, optional_arg: boolean, parserStatus: number): DirectEvalExpression { return new DirectEvalExpression(global.generatedEs2panda._UpdateDirectEvalExpression(global.context, passNode(original), passNode(callee), passNodeArray(_arguments), _arguments.length, passNode(typeParams), optional_arg, parserStatus)) } + protected readonly brandDirectEvalExpression: undefined } -export function isDirectEvalExpression(node: AstNode): node is DirectEvalExpression { +export function isDirectEvalExpression(node: object | undefined): node is DirectEvalExpression { return node instanceof DirectEvalExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_DIRECT_EVAL)) { diff --git a/koala-wrapper/src/generated/peers/DoWhileStatement.ts b/koala-wrapper/src/generated/peers/DoWhileStatement.ts index 569c03d1f..0c4a03f65 100644 --- a/koala-wrapper/src/generated/peers/DoWhileStatement.ts +++ b/koala-wrapper/src/generated/peers/DoWhileStatement.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" import { LoopStatement } from "./LoopStatement" import { Statement } from "./Statement" -import { Expression } from "./Expression" export class DoWhileStatement extends LoopStatement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_DO_WHILE_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 24) super(pointer) - } static createDoWhileStatement(body?: Statement, test?: Expression): DoWhileStatement { return new DoWhileStatement(global.generatedEs2panda._CreateDoWhileStatement(global.context, passNode(body), passNode(test))) @@ -45,13 +44,14 @@ export class DoWhileStatement extends LoopStatement { return new DoWhileStatement(global.generatedEs2panda._UpdateDoWhileStatement(global.context, passNode(original), passNode(body), passNode(test))) } get body(): Statement | undefined { - return unpackNode(global.generatedEs2panda._DoWhileStatementBodyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._DoWhileStatementBody(global.context, this.peer)) } get test(): Expression | undefined { - return unpackNode(global.generatedEs2panda._DoWhileStatementTestConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._DoWhileStatementTest(global.context, this.peer)) } + protected readonly brandDoWhileStatement: undefined } -export function isDoWhileStatement(node: AstNode): node is DoWhileStatement { +export function isDoWhileStatement(node: object | undefined): node is DoWhileStatement { return node instanceof DoWhileStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_DO_WHILE_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/ETSClassLiteral.ts b/koala-wrapper/src/generated/peers/ETSClassLiteral.ts index 80d2e86a7..637367bf3 100644 --- a/koala-wrapper/src/generated/peers/ETSClassLiteral.ts +++ b/koala-wrapper/src/generated/peers/ETSClassLiteral.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" export class ETSClassLiteral extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_CLASS_LITERAL) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 71) super(pointer) - } static createETSClassLiteral(expr?: TypeNode): ETSClassLiteral { return new ETSClassLiteral(global.generatedEs2panda._CreateETSClassLiteral(global.context, passNode(expr))) @@ -46,8 +45,9 @@ export class ETSClassLiteral extends Expression { get expr(): TypeNode | undefined { return unpackNode(global.generatedEs2panda._ETSClassLiteralExprConst(global.context, this.peer)) } + protected readonly brandETSClassLiteral: undefined } -export function isETSClassLiteral(node: AstNode): node is ETSClassLiteral { +export function isETSClassLiteral(node: object | undefined): node is ETSClassLiteral { return node instanceof ETSClassLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_CLASS_LITERAL)) { diff --git a/koala-wrapper/src/generated/peers/ETSDynamicFunctionType.ts b/koala-wrapper/src/generated/peers/ETSDynamicFunctionType.ts index 8b9b32069..42da3e38a 100644 --- a/koala-wrapper/src/generated/peers/ETSDynamicFunctionType.ts +++ b/koala-wrapper/src/generated/peers/ETSDynamicFunctionType.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -31,11 +30,11 @@ import { import { ETSFunctionType } from "./ETSFunctionType" export class ETSDynamicFunctionType extends ETSFunctionType { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - } + protected readonly brandETSDynamicFunctionType: undefined } -export function isETSDynamicFunctionType(node: AstNode): node is ETSDynamicFunctionType { +export function isETSDynamicFunctionType(node: object | undefined): node is ETSDynamicFunctionType { return node instanceof ETSDynamicFunctionType } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ETSFunctionType.ts b/koala-wrapper/src/generated/peers/ETSFunctionType.ts index bbdd7470f..278d6fbf5 100644 --- a/koala-wrapper/src/generated/peers/ETSFunctionType.ts +++ b/koala-wrapper/src/generated/peers/ETSFunctionType.ts @@ -22,24 +22,23 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" -import { FunctionSignature } from "./FunctionSignature" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaScriptFunctionFlags } from "./../Es2pandaEnums" -import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" import { Expression } from "./Expression" +import { FunctionSignature } from "./FunctionSignature" import { TSInterfaceDeclaration } from "./TSInterfaceDeclaration" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" +import { TypeNode } from "./TypeNode" export class ETSFunctionType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 67) super(pointer) - } static createETSFunctionType(signature: FunctionSignature | undefined, funcFlags: Es2pandaScriptFunctionFlags): ETSFunctionType { return new ETSFunctionType(global.generatedEs2panda._CreateETSFunctionType(global.context, passNode(signature), funcFlags)) @@ -48,19 +47,19 @@ export class ETSFunctionType extends TypeNode { return new ETSFunctionType(global.generatedEs2panda._UpdateETSFunctionType(global.context, passNode(original), passNode(signature), funcFlags)) } get typeParams(): TSTypeParameterDeclaration | undefined { - return unpackNode(global.generatedEs2panda._ETSFunctionTypeTypeParamsConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSFunctionTypeTypeParams(global.context, this.peer)) } get params(): readonly Expression[] { return unpackNodeArray(global.generatedEs2panda._ETSFunctionTypeParamsConst(global.context, this.peer)) } get returnType(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._ETSFunctionTypeReturnTypeConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSFunctionTypeReturnType(global.context, this.peer)) } get functionalInterface(): TSInterfaceDeclaration | undefined { - return unpackNode(global.generatedEs2panda._ETSFunctionTypeFunctionalInterfaceConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSFunctionTypeFunctionalInterface(global.context, this.peer)) } /** @deprecated */ - setFunctionalInterface(functionalInterface: TSInterfaceDeclaration): this { + setFunctionalInterface(functionalInterface?: TSInterfaceDeclaration): this { global.generatedEs2panda._ETSFunctionTypeSetFunctionalInterface(global.context, this.peer, passNode(functionalInterface)) return this } @@ -76,8 +75,9 @@ export class ETSFunctionType extends TypeNode { get isExtensionFunction(): boolean { return global.generatedEs2panda._ETSFunctionTypeIsExtensionFunctionConst(global.context, this.peer) } + protected readonly brandETSFunctionType: undefined } -export function isETSFunctionType(node: AstNode): node is ETSFunctionType { +export function isETSFunctionType(node: object | undefined): node is ETSFunctionType { return node instanceof ETSFunctionType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts b/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts index 1a6513b75..b112bea6b 100644 --- a/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts @@ -22,21 +22,21 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { ImportDeclaration } from "./ImportDeclaration" -import { ImportSource } from "./ImportSource" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaId } from "./../Es2pandaEnums" +import { Es2pandaImportFlags } from "./../Es2pandaEnums" import { Es2pandaImportKinds } from "./../Es2pandaEnums" +import { ImportDeclaration } from "./ImportDeclaration" import { StringLiteral } from "./StringLiteral" -import { Es2pandaImportFlags } from "./../Es2pandaEnums" export class ETSImportDeclaration extends ImportDeclaration { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 79) super(pointer) } @@ -46,30 +46,40 @@ export class ETSImportDeclaration extends ImportDeclaration { static createETSImportDeclaration(source: StringLiteral | undefined, specifiers: readonly AstNode[], importKind: Es2pandaImportKinds, program: ArktsObject, flags: Es2pandaImportFlags): ETSImportDeclaration { return new ETSImportDeclaration(global.es2panda._ETSParserBuildImportDeclaration(global.context, passNode(source), passNodeArray(specifiers), specifiers.length, importKind, passNode(program), flags)) } - - // static createETSImportDeclaration(importPath: StringLiteral | undefined, specifiers: readonly AstNode[], importKinds: Es2pandaImportKinds): ETSImportDeclaration { - // return new ETSImportDeclaration(global.generatedEs2panda._CreateETSImportDeclaration(global.context, passNode(importPath), passNodeArray(specifiers), specifiers.length, importKinds)) - // } - static updateETSImportDeclaration(original: ETSImportDeclaration | undefined, source: StringLiteral | undefined, specifiers: readonly AstNode[], importKind: Es2pandaImportKinds): ETSImportDeclaration { - return new ETSImportDeclaration(global.generatedEs2panda._UpdateETSImportDeclaration(global.context, passNode(original), passNode(source), passNodeArray(specifiers), specifiers.length, importKind)) + static updateETSImportDeclaration(original: ETSImportDeclaration | undefined, importPath: StringLiteral | undefined, specifiers: readonly AstNode[], importKinds: Es2pandaImportKinds): ETSImportDeclaration { + return new ETSImportDeclaration(global.generatedEs2panda._UpdateETSImportDeclaration(global.context, passNode(original), passNode(importPath), passNodeArray(specifiers), specifiers.length, importKinds)) } - get hasDecl(): boolean { - return global.generatedEs2panda._ETSImportDeclarationHasDeclConst(global.context, this.peer) + /** @deprecated */ + setImportMetadata(importFlags: Es2pandaImportFlags, lang: Es2pandaId, resolvedSource: string, declPath: string, ohmUrl: string): this { + global.generatedEs2panda._ETSImportDeclarationSetImportMetadata(global.context, this.peer, importFlags, lang, resolvedSource, declPath, ohmUrl) + return this + } + get declPath(): string { + return unpackString(global.generatedEs2panda._ETSImportDeclarationDeclPathConst(global.context, this.peer)) + } + get ohmUrl(): string { + return unpackString(global.generatedEs2panda._ETSImportDeclarationOhmUrlConst(global.context, this.peer)) + } + get isValid(): boolean { + return global.generatedEs2panda._ETSImportDeclarationIsValidConst(global.context, this.peer) } get isPureDynamic(): boolean { return global.generatedEs2panda._ETSImportDeclarationIsPureDynamicConst(global.context, this.peer) } + /** @deprecated */ + setAssemblerName(assemblerName: string): this { + global.generatedEs2panda._ETSImportDeclarationSetAssemblerName(global.context, this.peer, assemblerName) + return this + } get assemblerName(): string { return unpackString(global.generatedEs2panda._ETSImportDeclarationAssemblerNameConst(global.context, this.peer)) } - // get source(): StringLiteral | undefined { - // return unpackNode(global.generatedEs2panda._ETSImportDeclarationSourceConst(global.context, this.peer)) - // } - get resolvedSource(): StringLiteral | undefined { - return unpackNode(global.generatedEs2panda._ETSImportDeclarationResolvedSourceConst(global.context, this.peer)) + get resolvedSource(): string { + return unpackString(global.generatedEs2panda._ETSImportDeclarationResolvedSourceConst(global.context, this.peer)) } + protected readonly brandETSImportDeclaration: undefined } -export function isETSImportDeclaration(node: AstNode): node is ETSImportDeclaration { +export function isETSImportDeclaration(node: object | undefined): node is ETSImportDeclaration { return node instanceof ETSImportDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/ETSModule.ts b/koala-wrapper/src/generated/peers/ETSModule.ts index 396edaac7..7f2b2a7c8 100644 --- a/koala-wrapper/src/generated/peers/ETSModule.ts +++ b/koala-wrapper/src/generated/peers/ETSModule.ts @@ -22,24 +22,44 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { AnnotationUsage } from "./AnnotationUsage" import { BlockStatement } from "./BlockStatement" +import { ClassDefinition } from "./ClassDefinition" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaModuleFlag } from "./../Es2pandaEnums" import { Identifier } from "./Identifier" -import { AnnotationUsage } from "./AnnotationUsage" +import { Program } from "./Program" +import { Statement } from "./Statement" export class ETSModule extends BlockStatement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 82) super(pointer) - + } + static createETSModule(statementList: readonly Statement[], ident: Identifier | undefined, flag: Es2pandaModuleFlag, program?: Program): ETSModule { + return new ETSModule(global.generatedEs2panda._CreateETSModule(global.context, passNodeArray(statementList), statementList.length, passNode(ident), flag, passNode(program))) + } + static updateETSModule(original: ETSModule | undefined, statementList: readonly Statement[], ident: Identifier | undefined, flag: Es2pandaModuleFlag, program?: Program): ETSModule { + return new ETSModule(global.generatedEs2panda._UpdateETSModule(global.context, passNode(original), passNodeArray(statementList), statementList.length, passNode(ident), flag, passNode(program))) } get ident(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._ETSModuleIdentConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSModuleIdent(global.context, this.peer)) + } + get program(): Program | undefined { + return new Program(global.generatedEs2panda._ETSModuleProgram(global.context, this.peer)) + } + get globalClass(): ClassDefinition | undefined { + return unpackNode(global.generatedEs2panda._ETSModuleGlobalClass(global.context, this.peer)) + } + /** @deprecated */ + setGlobalClass(globalClass?: ClassDefinition): this { + global.generatedEs2panda._ETSModuleSetGlobalClass(global.context, this.peer, passNode(globalClass)) + return this } get isETSScript(): boolean { return global.generatedEs2panda._ETSModuleIsETSScriptConst(global.context, this.peer) @@ -55,16 +75,45 @@ export class ETSModule extends BlockStatement { global.generatedEs2panda._ETSModuleSetNamespaceChainLastNode(global.context, this.peer) return this } + /** @deprecated */ + emplaceAnnotations(source?: AnnotationUsage): this { + global.generatedEs2panda._ETSModuleEmplaceAnnotations(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._ETSModuleClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + setValueAnnotations(source: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._ETSModuleSetValueAnnotations(global.context, this.peer, passNode(source), index) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ETSModuleAnnotationsForUpdate(global.context, this.peer)) + } get annotations(): readonly AnnotationUsage[] { - return unpackNodeArray(global.generatedEs2panda._ETSModuleAnnotationsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ETSModuleAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ETSModuleSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ETSModuleSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this } /** @deprecated */ - setAnnotations(annotations: readonly AnnotationUsage[]): this { - global.generatedEs2panda._ETSModuleSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) + addAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._ETSModuleAddAnnotations(global.context, this.peer, passNode(annotations)) return this } + protected readonly brandETSModule: undefined } -export function isETSModule(node: AstNode): node is ETSModule { +export function isETSModule(node: object | undefined): node is ETSModule { return node instanceof ETSModule } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE)) { diff --git a/koala-wrapper/src/generated/peers/ETSNewArrayInstanceExpression.ts b/koala-wrapper/src/generated/peers/ETSNewArrayInstanceExpression.ts index 63d66f230..b02567e1e 100644 --- a/koala-wrapper/src/generated/peers/ETSNewArrayInstanceExpression.ts +++ b/koala-wrapper/src/generated/peers/ETSNewArrayInstanceExpression.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" export class ETSNewArrayInstanceExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 76) super(pointer) - } static createETSNewArrayInstanceExpression(typeReference?: TypeNode, dimension?: Expression): ETSNewArrayInstanceExpression { return new ETSNewArrayInstanceExpression(global.generatedEs2panda._CreateETSNewArrayInstanceExpression(global.context, passNode(typeReference), passNode(dimension))) @@ -44,18 +43,24 @@ export class ETSNewArrayInstanceExpression extends Expression { return new ETSNewArrayInstanceExpression(global.generatedEs2panda._UpdateETSNewArrayInstanceExpression(global.context, passNode(original), passNode(typeReference), passNode(dimension))) } get typeReference(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._ETSNewArrayInstanceExpressionTypeReferenceConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSNewArrayInstanceExpressionTypeReference(global.context, this.peer)) } get dimension(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ETSNewArrayInstanceExpressionDimensionConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSNewArrayInstanceExpressionDimension(global.context, this.peer)) } /** @deprecated */ - setDimension(dimension: Expression): this { + setDimension(dimension?: Expression): this { global.generatedEs2panda._ETSNewArrayInstanceExpressionSetDimension(global.context, this.peer, passNode(dimension)) return this } + /** @deprecated */ + clearPreferredType(): this { + global.generatedEs2panda._ETSNewArrayInstanceExpressionClearPreferredType(global.context, this.peer) + return this + } + protected readonly brandETSNewArrayInstanceExpression: undefined } -export function isETSNewArrayInstanceExpression(node: AstNode): node is ETSNewArrayInstanceExpression { +export function isETSNewArrayInstanceExpression(node: object | undefined): node is ETSNewArrayInstanceExpression { return node instanceof ETSNewArrayInstanceExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/ETSNewClassInstanceExpression.ts b/koala-wrapper/src/generated/peers/ETSNewClassInstanceExpression.ts index a79deafb3..e67d29d37 100644 --- a/koala-wrapper/src/generated/peers/ETSNewClassInstanceExpression.ts +++ b/koala-wrapper/src/generated/peers/ETSNewClassInstanceExpression.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class ETSNewClassInstanceExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 78) super(pointer) - } static createETSNewClassInstanceExpression(typeReference: Expression | undefined, _arguments: readonly Expression[]): ETSNewClassInstanceExpression { return new ETSNewClassInstanceExpression(global.generatedEs2panda._CreateETSNewClassInstanceExpression(global.context, passNode(typeReference), passNodeArray(_arguments), _arguments.length)) @@ -42,17 +41,14 @@ export class ETSNewClassInstanceExpression extends Expression { static updateETSNewClassInstanceExpression(original: ETSNewClassInstanceExpression | undefined, typeReference: Expression | undefined, _arguments: readonly Expression[]): ETSNewClassInstanceExpression { return new ETSNewClassInstanceExpression(global.generatedEs2panda._UpdateETSNewClassInstanceExpression(global.context, passNode(original), passNode(typeReference), passNodeArray(_arguments), _arguments.length)) } - static create1ETSNewClassInstanceExpression(other?: ETSNewClassInstanceExpression): ETSNewClassInstanceExpression { - return new ETSNewClassInstanceExpression(global.generatedEs2panda._CreateETSNewClassInstanceExpression1(global.context, passNode(other))) - } static update1ETSNewClassInstanceExpression(original?: ETSNewClassInstanceExpression, other?: ETSNewClassInstanceExpression): ETSNewClassInstanceExpression { return new ETSNewClassInstanceExpression(global.generatedEs2panda._UpdateETSNewClassInstanceExpression1(global.context, passNode(original), passNode(other))) } - get getTypeRef(): Expression | undefined { + get typeRef(): Expression | undefined { return unpackNode(global.generatedEs2panda._ETSNewClassInstanceExpressionGetTypeRefConst(global.context, this.peer)) } - get getArguments(): readonly Expression[] { - return unpackNodeArray(global.generatedEs2panda._ETSNewClassInstanceExpressionGetArgumentsConst(global.context, this.peer)) + get arguments(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._ETSNewClassInstanceExpressionGetArguments(global.context, this.peer)) } /** @deprecated */ setArguments(_arguments: readonly Expression[]): this { @@ -60,12 +56,13 @@ export class ETSNewClassInstanceExpression extends Expression { return this } /** @deprecated */ - addToArgumentsFront(expr: Expression): this { + addToArgumentsFront(expr?: Expression): this { global.generatedEs2panda._ETSNewClassInstanceExpressionAddToArgumentsFront(global.context, this.peer, passNode(expr)) return this } + protected readonly brandETSNewClassInstanceExpression: undefined } -export function isETSNewClassInstanceExpression(node: AstNode): node is ETSNewClassInstanceExpression { +export function isETSNewClassInstanceExpression(node: object | undefined): node is ETSNewClassInstanceExpression { return node instanceof ETSNewClassInstanceExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts b/koala-wrapper/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts index 5b599dce6..1f37f6f94 100644 --- a/koala-wrapper/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +++ b/koala-wrapper/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" export class ETSNewMultiDimArrayInstanceExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 77) super(pointer) - } static createETSNewMultiDimArrayInstanceExpression(typeReference: TypeNode | undefined, dimensions: readonly Expression[]): ETSNewMultiDimArrayInstanceExpression { return new ETSNewMultiDimArrayInstanceExpression(global.generatedEs2panda._CreateETSNewMultiDimArrayInstanceExpression(global.context, passNode(typeReference), passNodeArray(dimensions), dimensions.length)) @@ -43,20 +42,23 @@ export class ETSNewMultiDimArrayInstanceExpression extends Expression { static updateETSNewMultiDimArrayInstanceExpression(original: ETSNewMultiDimArrayInstanceExpression | undefined, typeReference: TypeNode | undefined, dimensions: readonly Expression[]): ETSNewMultiDimArrayInstanceExpression { return new ETSNewMultiDimArrayInstanceExpression(global.generatedEs2panda._UpdateETSNewMultiDimArrayInstanceExpression(global.context, passNode(original), passNode(typeReference), passNodeArray(dimensions), dimensions.length)) } - static create1ETSNewMultiDimArrayInstanceExpression(other?: ETSNewMultiDimArrayInstanceExpression): ETSNewMultiDimArrayInstanceExpression { - return new ETSNewMultiDimArrayInstanceExpression(global.generatedEs2panda._CreateETSNewMultiDimArrayInstanceExpression1(global.context, passNode(other))) - } static update1ETSNewMultiDimArrayInstanceExpression(original?: ETSNewMultiDimArrayInstanceExpression, other?: ETSNewMultiDimArrayInstanceExpression): ETSNewMultiDimArrayInstanceExpression { return new ETSNewMultiDimArrayInstanceExpression(global.generatedEs2panda._UpdateETSNewMultiDimArrayInstanceExpression1(global.context, passNode(original), passNode(other))) } get typeReference(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._ETSNewMultiDimArrayInstanceExpressionTypeReferenceConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSNewMultiDimArrayInstanceExpressionTypeReference(global.context, this.peer)) } get dimensions(): readonly Expression[] { - return unpackNodeArray(global.generatedEs2panda._ETSNewMultiDimArrayInstanceExpressionDimensionsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ETSNewMultiDimArrayInstanceExpressionDimensions(global.context, this.peer)) + } + /** @deprecated */ + clearPreferredType(): this { + global.generatedEs2panda._ETSNewMultiDimArrayInstanceExpressionClearPreferredType(global.context, this.peer) + return this } + protected readonly brandETSNewMultiDimArrayInstanceExpression: undefined } -export function isETSNewMultiDimArrayInstanceExpression(node: AstNode): node is ETSNewMultiDimArrayInstanceExpression { +export function isETSNewMultiDimArrayInstanceExpression(node: object | undefined): node is ETSNewMultiDimArrayInstanceExpression { return node instanceof ETSNewMultiDimArrayInstanceExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/ETSNullType.ts b/koala-wrapper/src/generated/peers/ETSNullType.ts index bd8424e40..0000df8c0 100644 --- a/koala-wrapper/src/generated/peers/ETSNullType.ts +++ b/koala-wrapper/src/generated/peers/ETSNullType.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class ETSNullType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NULL_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 63) super(pointer) - } static createETSNullType(): ETSNullType { return new ETSNullType(global.generatedEs2panda._CreateETSNullType(global.context)) @@ -42,8 +41,9 @@ export class ETSNullType extends TypeNode { static updateETSNullType(original?: ETSNullType): ETSNullType { return new ETSNullType(global.generatedEs2panda._UpdateETSNullType(global.context, passNode(original))) } + protected readonly brandETSNullType: undefined } -export function isETSNullType(node: AstNode): node is ETSNullType { +export function isETSNullType(node: object | undefined): node is ETSNullType { return node instanceof ETSNullType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NULL_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/ETSPackageDeclaration.ts b/koala-wrapper/src/generated/peers/ETSPackageDeclaration.ts index dce8c6261..15a7ce07a 100644 --- a/koala-wrapper/src/generated/peers/ETSPackageDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ETSPackageDeclaration.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Statement } from "./Statement" export class ETSPackageDeclaration extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PACKAGE_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 70) super(pointer) - } static createETSPackageDeclaration(name?: Expression): ETSPackageDeclaration { return new ETSPackageDeclaration(global.generatedEs2panda._CreateETSPackageDeclaration(global.context, passNode(name))) @@ -43,8 +42,9 @@ export class ETSPackageDeclaration extends Statement { static updateETSPackageDeclaration(original?: ETSPackageDeclaration, name?: Expression): ETSPackageDeclaration { return new ETSPackageDeclaration(global.generatedEs2panda._UpdateETSPackageDeclaration(global.context, passNode(original), passNode(name))) } + protected readonly brandETSPackageDeclaration: undefined } -export function isETSPackageDeclaration(node: AstNode): node is ETSPackageDeclaration { +export function isETSPackageDeclaration(node: object | undefined): node is ETSPackageDeclaration { return node instanceof ETSPackageDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PACKAGE_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/ETSParameterExpression.ts b/koala-wrapper/src/generated/peers/ETSParameterExpression.ts index 7a16dc8e1..797625311 100644 --- a/koala-wrapper/src/generated/peers/ETSParameterExpression.ts +++ b/koala-wrapper/src/generated/peers/ETSParameterExpression.ts @@ -22,24 +22,23 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Expression } from "./Expression" import { AnnotatedExpression } from "./AnnotatedExpression" +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" import { Identifier } from "./Identifier" import { SpreadElement } from "./SpreadElement" import { TypeNode } from "./TypeNode" -import { AnnotationUsage } from "./AnnotationUsage" export class ETSParameterExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 80) super(pointer) - } static createETSParameterExpression(identOrSpread: AnnotatedExpression | undefined, isOptional: boolean): ETSParameterExpression { return new ETSParameterExpression(global.generatedEs2panda._CreateETSParameterExpression(global.context, passNode(identOrSpread), isOptional)) @@ -53,18 +52,36 @@ export class ETSParameterExpression extends Expression { static update1ETSParameterExpression(original?: ETSParameterExpression, identOrSpread?: AnnotatedExpression, initializer?: Expression): ETSParameterExpression { return new ETSParameterExpression(global.generatedEs2panda._UpdateETSParameterExpression1(global.context, passNode(original), passNode(identOrSpread), passNode(initializer))) } + get name(): string { + return unpackString(global.generatedEs2panda._ETSParameterExpressionNameConst(global.context, this.peer)) + } + get ident(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ETSParameterExpressionIdent(global.context, this.peer)) + } /** @deprecated */ - setIdent(ident: Identifier): this { + setIdent(ident?: Identifier): this { global.generatedEs2panda._ETSParameterExpressionSetIdent(global.context, this.peer, passNode(ident)) return this } + get restParameter(): SpreadElement | undefined { + return unpackNode(global.generatedEs2panda._ETSParameterExpressionRestParameter(global.context, this.peer)) + } + get initializer(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ETSParameterExpressionInitializer(global.context, this.peer)) + } /** @deprecated */ - setLexerSaved(s: string): this { - global.generatedEs2panda._ETSParameterExpressionSetLexerSaved(global.context, this.peer, s) + setLexerSaved(savedLexer: string): this { + global.generatedEs2panda._ETSParameterExpressionSetLexerSaved(global.context, this.peer, savedLexer) return this } + get lexerSaved(): string { + return unpackString(global.generatedEs2panda._ETSParameterExpressionLexerSavedConst(global.context, this.peer)) + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ETSParameterExpressionTypeAnnotation(global.context, this.peer)) + } /** @deprecated */ - setTypeAnnotation(typeNode: TypeNode): this { + setTypeAnnotation(typeNode?: TypeNode): this { global.generatedEs2panda._ETSParameterExpressionSetTypeAnnotation(global.context, this.peer, passNode(typeNode)) return this } @@ -77,31 +94,60 @@ export class ETSParameterExpression extends Expression { return this } /** @deprecated */ - setInitializer(initExpr: Expression): this { + setInitializer(initExpr?: Expression): this { global.generatedEs2panda._ETSParameterExpressionSetInitializer(global.context, this.peer, passNode(initExpr)) return this } get isRestParameter(): boolean { return global.generatedEs2panda._ETSParameterExpressionIsRestParameterConst(global.context, this.peer) } - get getRequiredParams(): number { + get requiredParams(): number { return global.generatedEs2panda._ETSParameterExpressionGetRequiredParamsConst(global.context, this.peer) } /** @deprecated */ - setRequiredParams(value: number): this { - global.generatedEs2panda._ETSParameterExpressionSetRequiredParams(global.context, this.peer, value) + setRequiredParams(extraValue: number): this { + global.generatedEs2panda._ETSParameterExpressionSetRequiredParams(global.context, this.peer, extraValue) + return this + } + /** @deprecated */ + emplaceAnnotations(source?: AnnotationUsage): this { + global.generatedEs2panda._ETSParameterExpressionEmplaceAnnotations(global.context, this.peer, passNode(source)) return this } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._ETSParameterExpressionClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + setValueAnnotations(source: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._ETSParameterExpressionSetValueAnnotations(global.context, this.peer, passNode(source), index) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ETSParameterExpressionAnnotationsForUpdate(global.context, this.peer)) + } get annotations(): readonly AnnotationUsage[] { - return unpackNodeArray(global.generatedEs2panda._ETSParameterExpressionAnnotationsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ETSParameterExpressionAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ETSParameterExpressionSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ETSParameterExpressionSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this } /** @deprecated */ - setAnnotations(annotations: readonly AnnotationUsage[]): this { - global.generatedEs2panda._ETSParameterExpressionSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) + addAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._ETSParameterExpressionAddAnnotations(global.context, this.peer, passNode(annotations)) return this } + protected readonly brandETSParameterExpression: undefined } -export function isETSParameterExpression(node: AstNode): node is ETSParameterExpression { +export function isETSParameterExpression(node: object | undefined): node is ETSParameterExpression { return node instanceof ETSParameterExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/ETSPrimitiveType.ts b/koala-wrapper/src/generated/peers/ETSPrimitiveType.ts index 6d433dff4..79de1e5ab 100644 --- a/koala-wrapper/src/generated/peers/ETSPrimitiveType.ts +++ b/koala-wrapper/src/generated/peers/ETSPrimitiveType.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaPrimitiveType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" export class ETSPrimitiveType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 69) super(pointer) - } static createETSPrimitiveType(type: Es2pandaPrimitiveType): ETSPrimitiveType { return new ETSPrimitiveType(global.generatedEs2panda._CreateETSPrimitiveType(global.context, type)) @@ -43,11 +42,12 @@ export class ETSPrimitiveType extends TypeNode { static updateETSPrimitiveType(original: ETSPrimitiveType | undefined, type: Es2pandaPrimitiveType): ETSPrimitiveType { return new ETSPrimitiveType(global.generatedEs2panda._UpdateETSPrimitiveType(global.context, passNode(original), type)) } - get getPrimitiveType(): Es2pandaPrimitiveType { + get primitiveType(): Es2pandaPrimitiveType { return global.generatedEs2panda._ETSPrimitiveTypeGetPrimitiveTypeConst(global.context, this.peer) } + protected readonly brandETSPrimitiveType: undefined } -export function isETSPrimitiveType(node: AstNode): node is ETSPrimitiveType { +export function isETSPrimitiveType(node: object | undefined): node is ETSPrimitiveType { return node instanceof ETSPrimitiveType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/ETSReExportDeclaration.ts b/koala-wrapper/src/generated/peers/ETSReExportDeclaration.ts index 669a54af1..32c4084b7 100644 --- a/koala-wrapper/src/generated/peers/ETSReExportDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ETSReExportDeclaration.ts @@ -22,29 +22,29 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" import { ETSImportDeclaration } from "./ETSImportDeclaration" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Statement } from "./Statement" export class ETSReExportDeclaration extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_REEXPORT_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 57) super(pointer) - } - get getETSImportDeclarations(): ETSImportDeclaration | undefined { - return unpackNode(global.generatedEs2panda._ETSReExportDeclarationGetETSImportDeclarationsConst(global.context, this.peer)) + get eTSImportDeclarations(): ETSImportDeclaration | undefined { + return unpackNode(global.generatedEs2panda._ETSReExportDeclarationGetETSImportDeclarations(global.context, this.peer)) } - get getProgramPath(): string { + get programPath(): string { return unpackString(global.generatedEs2panda._ETSReExportDeclarationGetProgramPathConst(global.context, this.peer)) } + protected readonly brandETSReExportDeclaration: undefined } -export function isETSReExportDeclaration(node: AstNode): node is ETSReExportDeclaration { +export function isETSReExportDeclaration(node: object | undefined): node is ETSReExportDeclaration { return node instanceof ETSReExportDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_REEXPORT_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/ETSStructDeclaration.ts b/koala-wrapper/src/generated/peers/ETSStructDeclaration.ts index dfa10cf4c..7963338c7 100644 --- a/koala-wrapper/src/generated/peers/ETSStructDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ETSStructDeclaration.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -31,11 +30,11 @@ import { import { ClassDeclaration } from "./ClassDeclaration" import { ClassDefinition } from "./ClassDefinition" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" export class ETSStructDeclaration extends ClassDeclaration { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 84) super(pointer) - } static createETSStructDeclaration(def?: ClassDefinition): ETSStructDeclaration { return new ETSStructDeclaration(global.generatedEs2panda._CreateETSStructDeclaration(global.context, passNode(def))) @@ -43,8 +42,9 @@ export class ETSStructDeclaration extends ClassDeclaration { static updateETSStructDeclaration(original?: ETSStructDeclaration, def?: ClassDefinition): ETSStructDeclaration { return new ETSStructDeclaration(global.generatedEs2panda._UpdateETSStructDeclaration(global.context, passNode(original), passNode(def))) } + protected readonly brandETSStructDeclaration: undefined } -export function isETSStructDeclaration(node: AstNode): node is ETSStructDeclaration { +export function isETSStructDeclaration(node: object | undefined): node is ETSStructDeclaration { return node instanceof ETSStructDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/ETSTuple.ts b/koala-wrapper/src/generated/peers/ETSTuple.ts index 8eee89765..dcd0b2903 100644 --- a/koala-wrapper/src/generated/peers/ETSTuple.ts +++ b/koala-wrapper/src/generated/peers/ETSTuple.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class ETSTuple extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 81) super(pointer) - } static createETSTuple(): ETSTuple { return new ETSTuple(global.generatedEs2panda._CreateETSTuple(global.context)) @@ -54,27 +53,20 @@ export class ETSTuple extends TypeNode { static update2ETSTuple(original: ETSTuple | undefined, typeList: readonly TypeNode[]): ETSTuple { return new ETSTuple(global.generatedEs2panda._UpdateETSTuple2(global.context, passNode(original), passNodeArray(typeList), typeList.length)) } - get getTupleSize(): number { + get tupleSize(): number { return global.generatedEs2panda._ETSTupleGetTupleSizeConst(global.context, this.peer) } - get getTupleTypeAnnotationsList(): readonly TypeNode[] { - return unpackNodeArray(global.generatedEs2panda._ETSTupleGetTupleTypeAnnotationsListConst(global.context, this.peer)) - } - get hasSpreadType(): boolean { - return global.generatedEs2panda._ETSTupleHasSpreadTypeConst(global.context, this.peer) - } - /** @deprecated */ - setSpreadType(newSpreadType: TypeNode): this { - global.generatedEs2panda._ETSTupleSetSpreadType(global.context, this.peer, passNode(newSpreadType)) - return this + get tupleTypeAnnotationsList(): readonly TypeNode[] { + return unpackNodeArray(global.generatedEs2panda._ETSTupleGetTupleTypeAnnotationsList(global.context, this.peer)) } /** @deprecated */ setTypeAnnotationsList(typeNodeList: readonly TypeNode[]): this { global.generatedEs2panda._ETSTupleSetTypeAnnotationsList(global.context, this.peer, passNodeArray(typeNodeList), typeNodeList.length) return this } + protected readonly brandETSTuple: undefined } -export function isETSTuple(node: AstNode): node is ETSTuple { +export function isETSTuple(node: object | undefined): node is ETSTuple { return node instanceof ETSTuple } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE)) { diff --git a/koala-wrapper/src/generated/peers/ETSTypeReference.ts b/koala-wrapper/src/generated/peers/ETSTypeReference.ts index 1089a11ab..fa35d9a2e 100644 --- a/koala-wrapper/src/generated/peers/ETSTypeReference.ts +++ b/koala-wrapper/src/generated/peers/ETSTypeReference.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" import { ETSTypeReferencePart } from "./ETSTypeReferencePart" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Identifier } from "./Identifier" +import { TypeNode } from "./TypeNode" export class ETSTypeReference extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 72) super(pointer) - } static createETSTypeReference(part?: ETSTypeReferencePart): ETSTypeReference { return new ETSTypeReference(global.generatedEs2panda._CreateETSTypeReference(global.context, passNode(part))) @@ -45,10 +44,14 @@ export class ETSTypeReference extends TypeNode { return new ETSTypeReference(global.generatedEs2panda._UpdateETSTypeReference(global.context, passNode(original), passNode(part))) } get part(): ETSTypeReferencePart | undefined { - return unpackNode(global.generatedEs2panda._ETSTypeReferencePartConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSTypeReferencePart(global.context, this.peer)) + } + get baseName(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ETSTypeReferenceBaseNameConst(global.context, this.peer)) } + protected readonly brandETSTypeReference: undefined } -export function isETSTypeReference(node: AstNode): node is ETSTypeReference { +export function isETSTypeReference(node: object | undefined): node is ETSTypeReference { return node instanceof ETSTypeReference } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE)) { diff --git a/koala-wrapper/src/generated/peers/ETSTypeReferencePart.ts b/koala-wrapper/src/generated/peers/ETSTypeReferencePart.ts index 1a7f1968f..e77a9809d 100644 --- a/koala-wrapper/src/generated/peers/ETSTypeReferencePart.ts +++ b/koala-wrapper/src/generated/peers/ETSTypeReferencePart.ts @@ -22,21 +22,21 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Identifier } from "./Identifier" import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" +import { TypeNode } from "./TypeNode" export class ETSTypeReferencePart extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 73) super(pointer) - } static createETSTypeReferencePart(name?: Expression, typeParams?: TSTypeParameterInstantiation, prev?: ETSTypeReferencePart): ETSTypeReferencePart { return new ETSTypeReferencePart(global.generatedEs2panda._CreateETSTypeReferencePart(global.context, passNode(name), passNode(typeParams), passNode(prev))) @@ -44,23 +44,24 @@ export class ETSTypeReferencePart extends TypeNode { static updateETSTypeReferencePart(original?: ETSTypeReferencePart, name?: Expression, typeParams?: TSTypeParameterInstantiation, prev?: ETSTypeReferencePart): ETSTypeReferencePart { return new ETSTypeReferencePart(global.generatedEs2panda._UpdateETSTypeReferencePart(global.context, passNode(original), passNode(name), passNode(typeParams), passNode(prev))) } - static create1ETSTypeReferencePart(name?: Expression): ETSTypeReferencePart { - return new ETSTypeReferencePart(global.generatedEs2panda._CreateETSTypeReferencePart1(global.context, passNode(name))) - } static update1ETSTypeReferencePart(original?: ETSTypeReferencePart, name?: Expression): ETSTypeReferencePart { return new ETSTypeReferencePart(global.generatedEs2panda._UpdateETSTypeReferencePart1(global.context, passNode(original), passNode(name))) } get previous(): ETSTypeReferencePart | undefined { - return unpackNode(global.generatedEs2panda._ETSTypeReferencePartPreviousConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSTypeReferencePartPrevious(global.context, this.peer)) + } + get name(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ETSTypeReferencePartName(global.context, this.peer)) } get typeParams(): TSTypeParameterInstantiation | undefined { return unpackNode(global.generatedEs2panda._ETSTypeReferencePartTypeParams(global.context, this.peer)) } - get name(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ETSTypeReferencePartNameConst(global.context, this.peer)) + get ident(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ETSTypeReferencePartGetIdent(global.context, this.peer)) } + protected readonly brandETSTypeReferencePart: undefined } -export function isETSTypeReferencePart(node: AstNode): node is ETSTypeReferencePart { +export function isETSTypeReferencePart(node: object | undefined): node is ETSTypeReferencePart { return node instanceof ETSTypeReferencePart } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART)) { diff --git a/koala-wrapper/src/generated/peers/ETSUndefinedType.ts b/koala-wrapper/src/generated/peers/ETSUndefinedType.ts index 4a70b0d8a..319b152fd 100644 --- a/koala-wrapper/src/generated/peers/ETSUndefinedType.ts +++ b/koala-wrapper/src/generated/peers/ETSUndefinedType.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class ETSUndefinedType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNDEFINED_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 64) super(pointer) - } static createETSUndefinedType(): ETSUndefinedType { return new ETSUndefinedType(global.generatedEs2panda._CreateETSUndefinedType(global.context)) @@ -42,8 +41,9 @@ export class ETSUndefinedType extends TypeNode { static updateETSUndefinedType(original?: ETSUndefinedType): ETSUndefinedType { return new ETSUndefinedType(global.generatedEs2panda._UpdateETSUndefinedType(global.context, passNode(original))) } + protected readonly brandETSUndefinedType: undefined } -export function isETSUndefinedType(node: AstNode): node is ETSUndefinedType { +export function isETSUndefinedType(node: object | undefined): node is ETSUndefinedType { return node instanceof ETSUndefinedType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNDEFINED_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/ETSUnionType.ts b/koala-wrapper/src/generated/peers/ETSUnionType.ts index 91efd07d3..8039c3d64 100644 --- a/koala-wrapper/src/generated/peers/ETSUnionType.ts +++ b/koala-wrapper/src/generated/peers/ETSUnionType.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class ETSUnionType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNION_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 74) super(pointer) - } static createETSUnionType(types: readonly TypeNode[]): ETSUnionType { return new ETSUnionType(global.generatedEs2panda._CreateETSUnionType(global.context, passNodeArray(types), types.length)) @@ -45,8 +44,14 @@ export class ETSUnionType extends TypeNode { get types(): readonly TypeNode[] { return unpackNodeArray(global.generatedEs2panda._ETSUnionTypeTypesConst(global.context, this.peer)) } + /** @deprecated */ + setValueTypes(type: TypeNode | undefined, index: number): this { + global.generatedEs2panda._ETSUnionTypeSetValueTypesConst(global.context, this.peer, passNode(type), index) + return this + } + protected readonly brandETSUnionType: undefined } -export function isETSUnionType(node: AstNode): node is ETSUnionType { +export function isETSUnionType(node: object | undefined): node is ETSUnionType { return node instanceof ETSUnionType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNION_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/ETSWildcardType.ts b/koala-wrapper/src/generated/peers/ETSWildcardType.ts index c34909ca7..5fda5aa79 100644 --- a/koala-wrapper/src/generated/peers/ETSWildcardType.ts +++ b/koala-wrapper/src/generated/peers/ETSWildcardType.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" import { ETSTypeReference } from "./ETSTypeReference" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaModifierFlags } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" export class ETSWildcardType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_WILDCARD_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 68) super(pointer) - } static createETSWildcardType(typeReference: ETSTypeReference | undefined, flags: Es2pandaModifierFlags): ETSWildcardType { return new ETSWildcardType(global.generatedEs2panda._CreateETSWildcardType(global.context, passNode(typeReference), flags)) @@ -45,10 +44,11 @@ export class ETSWildcardType extends TypeNode { return new ETSWildcardType(global.generatedEs2panda._UpdateETSWildcardType(global.context, passNode(original), passNode(typeReference), flags)) } get typeReference(): ETSTypeReference | undefined { - return unpackNode(global.generatedEs2panda._ETSWildcardTypeTypeReferenceConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ETSWildcardTypeTypeReference(global.context, this.peer)) } + protected readonly brandETSWildcardType: undefined } -export function isETSWildcardType(node: AstNode): node is ETSWildcardType { +export function isETSWildcardType(node: object | undefined): node is ETSWildcardType { return node instanceof ETSWildcardType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_WILDCARD_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/EmptyStatement.ts b/koala-wrapper/src/generated/peers/EmptyStatement.ts index b0b5e74f6..6dd676df8 100644 --- a/koala-wrapper/src/generated/peers/EmptyStatement.ts +++ b/koala-wrapper/src/generated/peers/EmptyStatement.ts @@ -22,28 +22,34 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Statement } from "./Statement" export class EmptyStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_EMPTY_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 25) super(pointer) - } - static createEmptyStatement(): EmptyStatement { - return new EmptyStatement(global.generatedEs2panda._CreateEmptyStatement(global.context)) + static create1EmptyStatement(isBrokenStatement: boolean): EmptyStatement { + return new EmptyStatement(global.generatedEs2panda._CreateEmptyStatement1(global.context, isBrokenStatement)) } static updateEmptyStatement(original?: EmptyStatement): EmptyStatement { return new EmptyStatement(global.generatedEs2panda._UpdateEmptyStatement(global.context, passNode(original))) } + static update1EmptyStatement(original: EmptyStatement | undefined, isBrokenStatement: boolean): EmptyStatement { + return new EmptyStatement(global.generatedEs2panda._UpdateEmptyStatement1(global.context, passNode(original), isBrokenStatement)) + } + get isBrokenStatement(): boolean { + return global.generatedEs2panda._EmptyStatementIsBrokenStatement(global.context, this.peer) + } + protected readonly brandEmptyStatement: undefined } -export function isEmptyStatement(node: AstNode): node is EmptyStatement { +export function isEmptyStatement(node: object | undefined): node is EmptyStatement { return node instanceof EmptyStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EMPTY_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/ExportAllDeclaration.ts b/koala-wrapper/src/generated/peers/ExportAllDeclaration.ts index b95b42687..0c5e310e4 100644 --- a/koala-wrapper/src/generated/peers/ExportAllDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ExportAllDeclaration.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" import { Statement } from "./Statement" import { StringLiteral } from "./StringLiteral" -import { Identifier } from "./Identifier" export class ExportAllDeclaration extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_ALL_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 26) super(pointer) - } static createExportAllDeclaration(source?: StringLiteral, exported?: Identifier): ExportAllDeclaration { return new ExportAllDeclaration(global.generatedEs2panda._CreateExportAllDeclaration(global.context, passNode(source), passNode(exported))) @@ -50,8 +49,9 @@ export class ExportAllDeclaration extends Statement { get exported(): Identifier | undefined { return unpackNode(global.generatedEs2panda._ExportAllDeclarationExportedConst(global.context, this.peer)) } + protected readonly brandExportAllDeclaration: undefined } -export function isExportAllDeclaration(node: AstNode): node is ExportAllDeclaration { +export function isExportAllDeclaration(node: object | undefined): node is ExportAllDeclaration { return node instanceof ExportAllDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_ALL_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/ExportDefaultDeclaration.ts b/koala-wrapper/src/generated/peers/ExportDefaultDeclaration.ts index 0a1600886..63f9a3806 100644 --- a/koala-wrapper/src/generated/peers/ExportDefaultDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ExportDefaultDeclaration.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Statement } from "./Statement" export class ExportDefaultDeclaration extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 27) super(pointer) - } static createExportDefaultDeclaration(decl: AstNode | undefined, exportEquals: boolean): ExportDefaultDeclaration { return new ExportDefaultDeclaration(global.generatedEs2panda._CreateExportDefaultDeclaration(global.context, passNode(decl), exportEquals)) @@ -43,13 +42,14 @@ export class ExportDefaultDeclaration extends Statement { return new ExportDefaultDeclaration(global.generatedEs2panda._UpdateExportDefaultDeclaration(global.context, passNode(original), passNode(decl), exportEquals)) } get decl(): AstNode | undefined { - return unpackNode(global.generatedEs2panda._ExportDefaultDeclarationDeclConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ExportDefaultDeclarationDecl(global.context, this.peer)) } get isExportEquals(): boolean { return global.generatedEs2panda._ExportDefaultDeclarationIsExportEqualsConst(global.context, this.peer) } + protected readonly brandExportDefaultDeclaration: undefined } -export function isExportDefaultDeclaration(node: AstNode): node is ExportDefaultDeclaration { +export function isExportDefaultDeclaration(node: object | undefined): node is ExportDefaultDeclaration { return node instanceof ExportDefaultDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/ExportNamedDeclaration.ts b/koala-wrapper/src/generated/peers/ExportNamedDeclaration.ts index 8fe0ed593..bb7836946 100644 --- a/koala-wrapper/src/generated/peers/ExportNamedDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ExportNamedDeclaration.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { ExportSpecifier } from "./ExportSpecifier" import { Statement } from "./Statement" import { StringLiteral } from "./StringLiteral" -import { ExportSpecifier } from "./ExportSpecifier" export class ExportNamedDeclaration extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 28) super(pointer) - } static createExportNamedDeclaration(source: StringLiteral | undefined, specifiers: readonly ExportSpecifier[]): ExportNamedDeclaration { return new ExportNamedDeclaration(global.generatedEs2panda._CreateExportNamedDeclaration(global.context, passNode(source), passNodeArray(specifiers), specifiers.length)) @@ -65,8 +64,14 @@ export class ExportNamedDeclaration extends Statement { get specifiers(): readonly ExportSpecifier[] { return unpackNodeArray(global.generatedEs2panda._ExportNamedDeclarationSpecifiersConst(global.context, this.peer)) } + /** @deprecated */ + replaceSpecifiers(specifiers: readonly ExportSpecifier[]): this { + global.generatedEs2panda._ExportNamedDeclarationReplaceSpecifiers(global.context, this.peer, passNodeArray(specifiers), specifiers.length) + return this + } + protected readonly brandExportNamedDeclaration: undefined } -export function isExportNamedDeclaration(node: AstNode): node is ExportNamedDeclaration { +export function isExportNamedDeclaration(node: object | undefined): node is ExportNamedDeclaration { return node instanceof ExportNamedDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/ExportSpecifier.ts b/koala-wrapper/src/generated/peers/ExportSpecifier.ts index d68740c1a..646825d26 100644 --- a/koala-wrapper/src/generated/peers/ExportSpecifier.ts +++ b/koala-wrapper/src/generated/peers/ExportSpecifier.ts @@ -22,20 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" import { Identifier } from "./Identifier" +import { Statement } from "./Statement" export class ExportSpecifier extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_SPECIFIER) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 29) super(pointer) - } static createExportSpecifier(local?: Identifier, exported?: Identifier): ExportSpecifier { return new ExportSpecifier(global.generatedEs2panda._CreateExportSpecifier(global.context, passNode(local), passNode(exported))) @@ -49,8 +49,25 @@ export class ExportSpecifier extends Statement { get exported(): Identifier | undefined { return unpackNode(global.generatedEs2panda._ExportSpecifierExportedConst(global.context, this.peer)) } + /** @deprecated */ + setDefault(): this { + global.generatedEs2panda._ExportSpecifierSetDefault(global.context, this.peer) + return this + } + get isDefault(): boolean { + return global.generatedEs2panda._ExportSpecifierIsDefaultConst(global.context, this.peer) + } + /** @deprecated */ + setConstantExpression(constantExpression?: Expression): this { + global.generatedEs2panda._ExportSpecifierSetConstantExpression(global.context, this.peer, passNode(constantExpression)) + return this + } + get constantExpression(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ExportSpecifierGetConstantExpressionConst(global.context, this.peer)) + } + protected readonly brandExportSpecifier: undefined } -export function isExportSpecifier(node: AstNode): node is ExportSpecifier { +export function isExportSpecifier(node: object | undefined): node is ExportSpecifier { return node instanceof ExportSpecifier } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_SPECIFIER)) { diff --git a/koala-wrapper/src/generated/peers/Expression.ts b/koala-wrapper/src/generated/peers/Expression.ts index 9a08ad491..350ecb513 100644 --- a/koala-wrapper/src/generated/peers/Expression.ts +++ b/koala-wrapper/src/generated/peers/Expression.ts @@ -22,21 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypedAstNode } from "./TypedAstNode" +import { AnnotatedExpression } from "./AnnotatedExpression" import { Literal } from "./Literal" import { TypeNode } from "./TypeNode" -import { AnnotatedExpression } from "./AnnotatedExpression" +import { TypedAstNode } from "./TypedAstNode" export class Expression extends TypedAstNode { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - } get isGrouped(): boolean { return global.generatedEs2panda._ExpressionIsGroupedConst(global.context, this.peer) @@ -46,6 +44,9 @@ export class Expression extends TypedAstNode { global.generatedEs2panda._ExpressionSetGrouped(global.context, this.peer) return this } + get asLiteral(): Literal | undefined { + return unpackNode(global.generatedEs2panda._ExpressionAsLiteral(global.context, this.peer)) + } get isLiteral(): boolean { return global.generatedEs2panda._ExpressionIsLiteralConst(global.context, this.peer) } @@ -55,7 +56,20 @@ export class Expression extends TypedAstNode { get isAnnotatedExpression(): boolean { return global.generatedEs2panda._ExpressionIsAnnotatedExpressionConst(global.context, this.peer) } + get asTypeNode(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ExpressionAsTypeNode(global.context, this.peer)) + } + get asAnnotatedExpression(): AnnotatedExpression | undefined { + return unpackNode(global.generatedEs2panda._ExpressionAsAnnotatedExpression(global.context, this.peer)) + } + get isBrokenExpression(): boolean { + return global.generatedEs2panda._ExpressionIsBrokenExpressionConst(global.context, this.peer) + } + get toString(): string { + return unpackString(global.generatedEs2panda._ExpressionToStringConst(global.context, this.peer)) + } + protected readonly brandExpression: undefined } -export function isExpression(node: AstNode): node is Expression { +export function isExpression(node: object | undefined): node is Expression { return node instanceof Expression } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ExpressionStatement.ts b/koala-wrapper/src/generated/peers/ExpressionStatement.ts index d7f6ec665..a0f0a5e9d 100644 --- a/koala-wrapper/src/generated/peers/ExpressionStatement.ts +++ b/koala-wrapper/src/generated/peers/ExpressionStatement.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Statement } from "./Statement" export class ExpressionStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_EXPRESSION_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 30) super(pointer) - } static createExpressionStatement(expr?: Expression): ExpressionStatement { return new ExpressionStatement(global.generatedEs2panda._CreateExpressionStatement(global.context, passNode(expr))) @@ -43,16 +42,17 @@ export class ExpressionStatement extends Statement { static updateExpressionStatement(original?: ExpressionStatement, expr?: Expression): ExpressionStatement { return new ExpressionStatement(global.generatedEs2panda._UpdateExpressionStatement(global.context, passNode(original), passNode(expr))) } - get getExpression(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ExpressionStatementGetExpressionConst(global.context, this.peer)) + get expression(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ExpressionStatementGetExpression(global.context, this.peer)) } /** @deprecated */ - setExpression(expr: Expression): this { + setExpression(expr?: Expression): this { global.generatedEs2panda._ExpressionStatementSetExpression(global.context, this.peer, passNode(expr)) return this } + protected readonly brandExpressionStatement: undefined } -export function isExpressionStatement(node: AstNode): node is ExpressionStatement { +export function isExpressionStatement(node: object | undefined): node is ExpressionStatement { return node instanceof ExpressionStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPRESSION_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/ForInStatement.ts b/koala-wrapper/src/generated/peers/ForInStatement.ts index adb587a5e..8fde9515e 100644 --- a/koala-wrapper/src/generated/peers/ForInStatement.ts +++ b/koala-wrapper/src/generated/peers/ForInStatement.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { LoopStatement } from "./LoopStatement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { LoopStatement } from "./LoopStatement" import { Statement } from "./Statement" export class ForInStatement extends LoopStatement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_FOR_IN_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 31) super(pointer) - } static createForInStatement(left?: AstNode, right?: Expression, body?: Statement): ForInStatement { return new ForInStatement(global.generatedEs2panda._CreateForInStatement(global.context, passNode(left), passNode(right), passNode(body))) @@ -45,16 +44,17 @@ export class ForInStatement extends LoopStatement { return new ForInStatement(global.generatedEs2panda._UpdateForInStatement(global.context, passNode(original), passNode(left), passNode(right), passNode(body))) } get left(): AstNode | undefined { - return unpackNode(global.generatedEs2panda._ForInStatementLeftConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ForInStatementLeft(global.context, this.peer)) } get right(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ForInStatementRightConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ForInStatementRight(global.context, this.peer)) } get body(): Statement | undefined { - return unpackNode(global.generatedEs2panda._ForInStatementBodyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ForInStatementBody(global.context, this.peer)) } + protected readonly brandForInStatement: undefined } -export function isForInStatement(node: AstNode): node is ForInStatement { +export function isForInStatement(node: object | undefined): node is ForInStatement { return node instanceof ForInStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_IN_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/ForOfStatement.ts b/koala-wrapper/src/generated/peers/ForOfStatement.ts index d958eb5a2..6fa6c83d2 100644 --- a/koala-wrapper/src/generated/peers/ForOfStatement.ts +++ b/koala-wrapper/src/generated/peers/ForOfStatement.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { LoopStatement } from "./LoopStatement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { LoopStatement } from "./LoopStatement" import { Statement } from "./Statement" export class ForOfStatement extends LoopStatement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_FOR_OF_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 32) super(pointer) - } static createForOfStatement(left: AstNode | undefined, right: Expression | undefined, body: Statement | undefined, isAwait: boolean): ForOfStatement { return new ForOfStatement(global.generatedEs2panda._CreateForOfStatement(global.context, passNode(left), passNode(right), passNode(body), isAwait)) @@ -45,19 +44,20 @@ export class ForOfStatement extends LoopStatement { return new ForOfStatement(global.generatedEs2panda._UpdateForOfStatement(global.context, passNode(original), passNode(left), passNode(right), passNode(body), isAwait)) } get left(): AstNode | undefined { - return unpackNode(global.generatedEs2panda._ForOfStatementLeftConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ForOfStatementLeft(global.context, this.peer)) } get right(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ForOfStatementRightConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ForOfStatementRight(global.context, this.peer)) } get body(): Statement | undefined { - return unpackNode(global.generatedEs2panda._ForOfStatementBodyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ForOfStatementBody(global.context, this.peer)) } get isAwait(): boolean { return global.generatedEs2panda._ForOfStatementIsAwaitConst(global.context, this.peer) } + protected readonly brandForOfStatement: undefined } -export function isForOfStatement(node: AstNode): node is ForOfStatement { +export function isForOfStatement(node: object | undefined): node is ForOfStatement { return node instanceof ForOfStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_OF_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/ForUpdateStatement.ts b/koala-wrapper/src/generated/peers/ForUpdateStatement.ts index cb7985248..30faa2881 100644 --- a/koala-wrapper/src/generated/peers/ForUpdateStatement.ts +++ b/koala-wrapper/src/generated/peers/ForUpdateStatement.ts @@ -22,39 +22,39 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { LoopStatement } from "./LoopStatement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { LoopStatement } from "./LoopStatement" import { Statement } from "./Statement" export class ForUpdateStatement extends LoopStatement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_FOR_UPDATE_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 33) super(pointer) - } static createForUpdateStatement(init?: AstNode, test?: Expression, update?: Expression, body?: Statement): ForUpdateStatement { return new ForUpdateStatement(global.generatedEs2panda._CreateForUpdateStatement(global.context, passNode(init), passNode(test), passNode(update), passNode(body))) } get init(): AstNode | undefined { - return unpackNode(global.generatedEs2panda._ForUpdateStatementInitConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ForUpdateStatementInit(global.context, this.peer)) } get test(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ForUpdateStatementTestConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ForUpdateStatementTest(global.context, this.peer)) } get update(): Expression | undefined { return unpackNode(global.generatedEs2panda._ForUpdateStatementUpdateConst(global.context, this.peer)) } get body(): Statement | undefined { - return unpackNode(global.generatedEs2panda._ForUpdateStatementBodyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ForUpdateStatementBody(global.context, this.peer)) } + protected readonly brandForUpdateStatement: undefined } -export function isForUpdateStatement(node: AstNode): node is ForUpdateStatement { +export function isForUpdateStatement(node: object | undefined): node is ForUpdateStatement { return node instanceof ForUpdateStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_UPDATE_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/FunctionDecl.ts b/koala-wrapper/src/generated/peers/FunctionDecl.ts index f4ede5520..41e6b471a 100644 --- a/koala-wrapper/src/generated/peers/FunctionDecl.ts +++ b/koala-wrapper/src/generated/peers/FunctionDecl.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -31,11 +30,11 @@ import { import { ScriptFunction } from "./ScriptFunction" export class FunctionDecl extends ScriptFunction { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - } + protected readonly brandFunctionDecl: undefined } -export function isFunctionDecl(node: AstNode): node is FunctionDecl { +export function isFunctionDecl(node: object | undefined): node is FunctionDecl { return node instanceof FunctionDecl } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/FunctionDeclaration.ts b/koala-wrapper/src/generated/peers/FunctionDeclaration.ts index 598654f02..02e26f717 100644 --- a/koala-wrapper/src/generated/peers/FunctionDeclaration.ts +++ b/koala-wrapper/src/generated/peers/FunctionDeclaration.ts @@ -22,21 +22,21 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" -import { ScriptFunction } from "./ScriptFunction" import { AnnotationUsage } from "./AnnotationUsage" +import { Decorator } from "./Decorator" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { ScriptFunction } from "./ScriptFunction" +import { Statement } from "./Statement" export class FunctionDeclaration extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 34) super(pointer) - } static createFunctionDeclaration(func: ScriptFunction | undefined, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration { return new FunctionDeclaration(global.generatedEs2panda._CreateFunctionDeclaration(global.context, passNode(func), passNodeArray(annotations), annotations.length, isAnonymous)) @@ -44,28 +44,57 @@ export class FunctionDeclaration extends Statement { static updateFunctionDeclaration(original: FunctionDeclaration | undefined, func: ScriptFunction | undefined, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration { return new FunctionDeclaration(global.generatedEs2panda._UpdateFunctionDeclaration(global.context, passNode(original), passNode(func), passNodeArray(annotations), annotations.length, isAnonymous)) } - static create1FunctionDeclaration(func: ScriptFunction | undefined, isAnonymous: boolean): FunctionDeclaration { - return new FunctionDeclaration(global.generatedEs2panda._CreateFunctionDeclaration1(global.context, passNode(func), isAnonymous)) - } static update1FunctionDeclaration(original: FunctionDeclaration | undefined, func: ScriptFunction | undefined, isAnonymous: boolean): FunctionDeclaration { return new FunctionDeclaration(global.generatedEs2panda._UpdateFunctionDeclaration1(global.context, passNode(original), passNode(func), isAnonymous)) } + get function(): ScriptFunction | undefined { + return unpackNode(global.generatedEs2panda._FunctionDeclarationFunction(global.context, this.peer)) + } get isAnonymous(): boolean { return global.generatedEs2panda._FunctionDeclarationIsAnonymousConst(global.context, this.peer) } - get function(): ScriptFunction | undefined { - return unpackNode(global.generatedEs2panda._FunctionDeclarationFunctionConst(global.context, this.peer)) + get decorators(): readonly Decorator[] { + return unpackNodeArray(global.generatedEs2panda._FunctionDeclarationDecoratorsConst(global.context, this.peer)) + } + /** @deprecated */ + emplaceAnnotations(source?: AnnotationUsage): this { + global.generatedEs2panda._FunctionDeclarationEmplaceAnnotations(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._FunctionDeclarationClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + setValueAnnotations(source: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._FunctionDeclarationSetValueAnnotations(global.context, this.peer, passNode(source), index) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._FunctionDeclarationAnnotationsForUpdate(global.context, this.peer)) } get annotations(): readonly AnnotationUsage[] { - return unpackNodeArray(global.generatedEs2panda._FunctionDeclarationAnnotationsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._FunctionDeclarationAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._FunctionDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._FunctionDeclarationSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this } /** @deprecated */ - setAnnotations(annotations: readonly AnnotationUsage[]): this { - global.generatedEs2panda._FunctionDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) + addAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._FunctionDeclarationAddAnnotations(global.context, this.peer, passNode(annotations)) return this } + protected readonly brandFunctionDeclaration: undefined } -export function isFunctionDeclaration(node: AstNode): node is FunctionDeclaration { +export function isFunctionDeclaration(node: object | undefined): node is FunctionDeclaration { return node instanceof FunctionDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/FunctionExpression.ts b/koala-wrapper/src/generated/peers/FunctionExpression.ts index 65c4ee87b..dd98ed64b 100644 --- a/koala-wrapper/src/generated/peers/FunctionExpression.ts +++ b/koala-wrapper/src/generated/peers/FunctionExpression.ts @@ -22,36 +22,32 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" -import { ScriptFunction } from "./ScriptFunction" import { Identifier } from "./Identifier" +import { ScriptFunction } from "./ScriptFunction" export class FunctionExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 35) super(pointer) - } - static createFunctionExpression(func?: ScriptFunction): FunctionExpression { - return new FunctionExpression(global.generatedEs2panda._CreateFunctionExpression(global.context, passNode(func))) + static create1FunctionExpression(namedExpr?: Identifier, func?: ScriptFunction): FunctionExpression { + return new FunctionExpression(global.generatedEs2panda._CreateFunctionExpression1(global.context, passNode(namedExpr), passNode(func))) } static updateFunctionExpression(original?: FunctionExpression, func?: ScriptFunction): FunctionExpression { return new FunctionExpression(global.generatedEs2panda._UpdateFunctionExpression(global.context, passNode(original), passNode(func))) } - static create1FunctionExpression(namedExpr?: Identifier, func?: ScriptFunction): FunctionExpression { - return new FunctionExpression(global.generatedEs2panda._CreateFunctionExpression1(global.context, passNode(namedExpr), passNode(func))) - } static update1FunctionExpression(original?: FunctionExpression, namedExpr?: Identifier, func?: ScriptFunction): FunctionExpression { return new FunctionExpression(global.generatedEs2panda._UpdateFunctionExpression1(global.context, passNode(original), passNode(namedExpr), passNode(func))) } get function(): ScriptFunction | undefined { - return unpackNode(global.generatedEs2panda._FunctionExpressionFunctionConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._FunctionExpressionFunction(global.context, this.peer)) } get isAnonymous(): boolean { return global.generatedEs2panda._FunctionExpressionIsAnonymousConst(global.context, this.peer) @@ -59,8 +55,9 @@ export class FunctionExpression extends Expression { get id(): Identifier | undefined { return unpackNode(global.generatedEs2panda._FunctionExpressionId(global.context, this.peer)) } + protected readonly brandFunctionExpression: undefined } -export function isFunctionExpression(node: AstNode): node is FunctionExpression { +export function isFunctionExpression(node: object | undefined): node is FunctionExpression { return node instanceof FunctionExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/FunctionSignature.ts b/koala-wrapper/src/generated/peers/FunctionSignature.ts index 127399ef3..d795b12b5 100644 --- a/koala-wrapper/src/generated/peers/FunctionSignature.ts +++ b/koala-wrapper/src/generated/peers/FunctionSignature.ts @@ -22,39 +22,41 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" import { Expression } from "./Expression" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" import { TypeNode } from "./TypeNode" export class FunctionSignature extends ArktsObject { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - } static createFunctionSignature(typeParams: TSTypeParameterDeclaration | undefined, params: readonly Expression[], returnTypeAnnotation: TypeNode | undefined, hasReceiver: boolean): FunctionSignature { return new FunctionSignature(global.generatedEs2panda._CreateFunctionSignature(global.context, passNode(typeParams), passNodeArray(params), params.length, passNode(returnTypeAnnotation), hasReceiver)) } get params(): readonly Expression[] { - return unpackNodeArray(global.generatedEs2panda._FunctionSignatureParamsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._FunctionSignatureParams(global.context, this.peer)) } get typeParams(): TSTypeParameterDeclaration | undefined { - return unpackNode(global.generatedEs2panda._FunctionSignatureTypeParamsConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._FunctionSignatureTypeParams(global.context, this.peer)) + } + get returnType(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._FunctionSignatureReturnType(global.context, this.peer)) } /** @deprecated */ - setReturnType(type: TypeNode): this { + setReturnType(type?: TypeNode): this { global.generatedEs2panda._FunctionSignatureSetReturnType(global.context, this.peer, passNode(type)) return this } - get returnType(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._FunctionSignatureReturnTypeConst(global.context, this.peer)) + get clone(): FunctionSignature | undefined { + return new FunctionSignature(global.generatedEs2panda._FunctionSignatureClone(global.context, this.peer)) } get hasReceiver(): boolean { return global.generatedEs2panda._FunctionSignatureHasReceiverConst(global.context, this.peer) } + protected readonly brandFunctionSignature: undefined } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/Identifier.ts b/koala-wrapper/src/generated/peers/Identifier.ts index f6a3967f5..3c17208ad 100644 --- a/koala-wrapper/src/generated/peers/Identifier.ts +++ b/koala-wrapper/src/generated/peers/Identifier.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,41 +29,46 @@ import { } from "../../reexport-for-generated" import { AnnotatedExpression } from "./AnnotatedExpression" -import { TypeNode } from "./TypeNode" import { Decorator } from "./Decorator" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" import { ValidationInfo } from "./ValidationInfo" export class Identifier extends AnnotatedExpression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 36) super(pointer) - } static createIdentifier(): Identifier { return new Identifier(global.generatedEs2panda._CreateIdentifier(global.context)) } - static updateIdentifier(original?: Identifier): Identifier { - return new Identifier(global.generatedEs2panda._UpdateIdentifier(global.context, passNode(original))) - } static create1Identifier(name: string): Identifier { return new Identifier(global.generatedEs2panda._CreateIdentifier1(global.context, name)) } - static update1Identifier(original: Identifier | undefined, name: string): Identifier { - return new Identifier(global.generatedEs2panda._UpdateIdentifier1(global.context, passNode(original), name)) - } static create2Identifier(name: string, typeAnnotation?: TypeNode): Identifier { return new Identifier(global.generatedEs2panda._CreateIdentifier2(global.context, name, passNode(typeAnnotation))) } + static updateIdentifier(original?: Identifier): Identifier { + return new Identifier(global.generatedEs2panda._UpdateIdentifier(global.context, passNode(original))) + } + static update1Identifier(original: Identifier | undefined, name: string): Identifier { + return new Identifier(global.generatedEs2panda._UpdateIdentifier1(global.context, passNode(original), name)) + } static update2Identifier(original: Identifier | undefined, name: string, typeAnnotation?: TypeNode): Identifier { return new Identifier(global.generatedEs2panda._UpdateIdentifier2(global.context, passNode(original), name, passNode(typeAnnotation))) } get name(): string { - return unpackString(global.generatedEs2panda._IdentifierNameConst(global.context, this.peer)) + return unpackString(global.generatedEs2panda._IdentifierName(global.context, this.peer)) } /** @deprecated */ setName(newName: string): this { global.generatedEs2panda._IdentifierSetName(global.context, this.peer, newName) return this } + /** @deprecated */ + setValueDecorators(source: Decorator | undefined, index: number): this { + global.generatedEs2panda._IdentifierSetValueDecorators(global.context, this.peer, passNode(source), index) + return this + } get decorators(): readonly Decorator[] { return unpackNodeArray(global.generatedEs2panda._IdentifierDecoratorsConst(global.context, this.peer)) } @@ -141,16 +145,20 @@ export class Identifier extends AnnotatedExpression { global.generatedEs2panda._IdentifierSetAnnotationUsage(global.context, this.peer) return this } + get validateExpression(): ValidationInfo | undefined { + return new ValidationInfo(global.generatedEs2panda._IdentifierValidateExpression(global.context, this.peer)) + } get typeAnnotation(): TypeNode | undefined { return unpackNode(global.generatedEs2panda._IdentifierTypeAnnotationConst(global.context, this.peer)) } /** @deprecated */ - setTsTypeAnnotation(typeAnnotation: TypeNode): this { + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { global.generatedEs2panda._IdentifierSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) return this } + protected readonly brandIdentifier: undefined } -export function isIdentifier(node: AstNode): node is Identifier { +export function isIdentifier(node: object | undefined): node is Identifier { return node instanceof Identifier } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER)) { diff --git a/koala-wrapper/src/generated/peers/IfStatement.ts b/koala-wrapper/src/generated/peers/IfStatement.ts index 2491ed7c6..ccb66ed66 100644 --- a/koala-wrapper/src/generated/peers/IfStatement.ts +++ b/koala-wrapper/src/generated/peers/IfStatement.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Statement } from "./Statement" export class IfStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_IF_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 38) super(pointer) - } static createIfStatement(test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement { return new IfStatement(global.generatedEs2panda._CreateIfStatement(global.context, passNode(test), passNode(consequent), passNode(alternate))) @@ -44,16 +43,27 @@ export class IfStatement extends Statement { return new IfStatement(global.generatedEs2panda._UpdateIfStatement(global.context, passNode(original), passNode(test), passNode(consequent), passNode(alternate))) } get test(): Expression | undefined { - return unpackNode(global.generatedEs2panda._IfStatementTestConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._IfStatementTest(global.context, this.peer)) + } + /** @deprecated */ + setTest(test?: Expression): this { + global.generatedEs2panda._IfStatementSetTest(global.context, this.peer, passNode(test)) + return this } get consequent(): Statement | undefined { - return unpackNode(global.generatedEs2panda._IfStatementConsequentConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._IfStatementConsequent(global.context, this.peer)) } get alternate(): Statement | undefined { - return unpackNode(global.generatedEs2panda._IfStatementAlternateConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._IfStatementAlternate(global.context, this.peer)) + } + /** @deprecated */ + setAlternate(alternate?: Statement): this { + global.generatedEs2panda._IfStatementSetAlternate(global.context, this.peer, passNode(alternate)) + return this } + protected readonly brandIfStatement: undefined } -export function isIfStatement(node: AstNode): node is IfStatement { +export function isIfStatement(node: object | undefined): node is IfStatement { return node instanceof IfStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IF_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/ImportDefaultSpecifier.ts b/koala-wrapper/src/generated/peers/ImportDefaultSpecifier.ts index 2ae1f64be..73fb9da42 100644 --- a/koala-wrapper/src/generated/peers/ImportDefaultSpecifier.ts +++ b/koala-wrapper/src/generated/peers/ImportDefaultSpecifier.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Identifier } from "./Identifier" +import { Statement } from "./Statement" export class ImportDefaultSpecifier extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 41) super(pointer) - } static createImportDefaultSpecifier(local?: Identifier): ImportDefaultSpecifier { return new ImportDefaultSpecifier(global.generatedEs2panda._CreateImportDefaultSpecifier(global.context, passNode(local))) @@ -44,10 +43,11 @@ export class ImportDefaultSpecifier extends Statement { return new ImportDefaultSpecifier(global.generatedEs2panda._UpdateImportDefaultSpecifier(global.context, passNode(original), passNode(local))) } get local(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._ImportDefaultSpecifierLocalConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ImportDefaultSpecifierLocal(global.context, this.peer)) } + protected readonly brandImportDefaultSpecifier: undefined } -export function isImportDefaultSpecifier(node: AstNode): node is ImportDefaultSpecifier { +export function isImportDefaultSpecifier(node: object | undefined): node is ImportDefaultSpecifier { return node instanceof ImportDefaultSpecifier } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER)) { diff --git a/koala-wrapper/src/generated/peers/ImportExpression.ts b/koala-wrapper/src/generated/peers/ImportExpression.ts index 25ae47eef..93f7db230 100644 --- a/koala-wrapper/src/generated/peers/ImportExpression.ts +++ b/koala-wrapper/src/generated/peers/ImportExpression.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class ImportExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 40) super(pointer) - } static createImportExpression(source?: Expression): ImportExpression { return new ImportExpression(global.generatedEs2panda._CreateImportExpression(global.context, passNode(source))) @@ -43,10 +42,11 @@ export class ImportExpression extends Expression { return new ImportExpression(global.generatedEs2panda._UpdateImportExpression(global.context, passNode(original), passNode(source))) } get source(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ImportExpressionSourceConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ImportExpressionSource(global.context, this.peer)) } + protected readonly brandImportExpression: undefined } -export function isImportExpression(node: AstNode): node is ImportExpression { +export function isImportExpression(node: object | undefined): node is ImportExpression { return node instanceof ImportExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/ImportNamespaceSpecifier.ts b/koala-wrapper/src/generated/peers/ImportNamespaceSpecifier.ts index 4caa2e2e8..6d3974c27 100644 --- a/koala-wrapper/src/generated/peers/ImportNamespaceSpecifier.ts +++ b/koala-wrapper/src/generated/peers/ImportNamespaceSpecifier.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Identifier } from "./Identifier" +import { Statement } from "./Statement" export class ImportNamespaceSpecifier extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 42) super(pointer) - } static createImportNamespaceSpecifier(local?: Identifier): ImportNamespaceSpecifier { return new ImportNamespaceSpecifier(global.generatedEs2panda._CreateImportNamespaceSpecifier(global.context, passNode(local))) @@ -44,10 +43,11 @@ export class ImportNamespaceSpecifier extends Statement { return new ImportNamespaceSpecifier(global.generatedEs2panda._UpdateImportNamespaceSpecifier(global.context, passNode(original), passNode(local))) } get local(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._ImportNamespaceSpecifierLocalConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ImportNamespaceSpecifierLocal(global.context, this.peer)) } + protected readonly brandImportNamespaceSpecifier: undefined } -export function isImportNamespaceSpecifier(node: AstNode): node is ImportNamespaceSpecifier { +export function isImportNamespaceSpecifier(node: object | undefined): node is ImportNamespaceSpecifier { return node instanceof ImportNamespaceSpecifier } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER)) { diff --git a/koala-wrapper/src/generated/peers/ImportSource.ts b/koala-wrapper/src/generated/peers/ImportSource.ts index 70c8fb289..b6e5268c4 100644 --- a/koala-wrapper/src/generated/peers/ImportSource.ts +++ b/koala-wrapper/src/generated/peers/ImportSource.ts @@ -22,29 +22,15 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { StringLiteral } from "./StringLiteral" export class ImportSource extends ArktsObject { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - - } - static createImportSource(source: StringLiteral | undefined, resolvedSource: StringLiteral | undefined, hasDecl: boolean): ImportSource { - return new ImportSource(global.generatedEs2panda._CreateImportSource(global.context, passNode(source), passNode(resolvedSource), hasDecl)) - } - get source(): StringLiteral | undefined { - return unpackNode(global.generatedEs2panda._ImportSourceSourceConst(global.context, this.peer)) - } - get resolvedSource(): StringLiteral | undefined { - return unpackNode(global.generatedEs2panda._ImportSourceResolvedSourceConst(global.context, this.peer)) - } - get hasDecl(): boolean { - return global.generatedEs2panda._ImportSourceHasDeclConst(global.context, this.peer) } + protected readonly brandImportSource: undefined } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ImportSpecifier.ts b/koala-wrapper/src/generated/peers/ImportSpecifier.ts index 828f1eebf..f904140db 100644 --- a/koala-wrapper/src/generated/peers/ImportSpecifier.ts +++ b/koala-wrapper/src/generated/peers/ImportSpecifier.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Identifier } from "./Identifier" +import { Statement } from "./Statement" export class ImportSpecifier extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_SPECIFIER) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 43) super(pointer) - } static createImportSpecifier(imported?: Identifier, local?: Identifier): ImportSpecifier { return new ImportSpecifier(global.generatedEs2panda._CreateImportSpecifier(global.context, passNode(imported), passNode(local))) @@ -44,13 +43,22 @@ export class ImportSpecifier extends Statement { return new ImportSpecifier(global.generatedEs2panda._UpdateImportSpecifier(global.context, passNode(original), passNode(imported), passNode(local))) } get imported(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._ImportSpecifierImportedConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ImportSpecifierImported(global.context, this.peer)) } get local(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._ImportSpecifierLocalConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ImportSpecifierLocal(global.context, this.peer)) + } + get isRemovable(): boolean { + return global.generatedEs2panda._ImportSpecifierIsRemovableConst(global.context, this.peer) + } + /** @deprecated */ + setRemovable(isRemovable: boolean): this { + global.generatedEs2panda._ImportSpecifierSetRemovable(global.context, this.peer, isRemovable) + return this } + protected readonly brandImportSpecifier: undefined } -export function isImportSpecifier(node: AstNode): node is ImportSpecifier { +export function isImportSpecifier(node: object | undefined): node is ImportSpecifier { return node instanceof ImportSpecifier } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_SPECIFIER)) { diff --git a/koala-wrapper/src/generated/peers/InterfaceDecl.ts b/koala-wrapper/src/generated/peers/InterfaceDecl.ts index 3e708c7f9..08c264738 100644 --- a/koala-wrapper/src/generated/peers/InterfaceDecl.ts +++ b/koala-wrapper/src/generated/peers/InterfaceDecl.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -31,11 +30,11 @@ import { import { TSInterfaceDeclaration } from "./TSInterfaceDeclaration" export class InterfaceDecl extends TSInterfaceDeclaration { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - } + protected readonly brandInterfaceDecl: undefined } -export function isInterfaceDecl(node: AstNode): node is InterfaceDecl { +export function isInterfaceDecl(node: object | undefined): node is InterfaceDecl { return node instanceof InterfaceDecl } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/LabelPair.ts b/koala-wrapper/src/generated/peers/LabelPair.ts index 77d2431a8..7bc31c23a 100644 --- a/koala-wrapper/src/generated/peers/LabelPair.ts +++ b/koala-wrapper/src/generated/peers/LabelPair.ts @@ -28,8 +28,9 @@ import { unpackString } from "../../reexport-for-generated" -export class LabelPair extends AstNode { +export class LabelPair extends ArktsObject { constructor(pointer: KNativePointer) { super(pointer) } + protected readonly brandLabelPair: undefined } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/LabelledStatement.ts b/koala-wrapper/src/generated/peers/LabelledStatement.ts index 9b9ac14b1..433bb9198 100644 --- a/koala-wrapper/src/generated/peers/LabelledStatement.ts +++ b/koala-wrapper/src/generated/peers/LabelledStatement.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Identifier } from "./Identifier" +import { Statement } from "./Statement" export class LabelledStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_LABELLED_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 44) super(pointer) - } static createLabelledStatement(ident?: Identifier, body?: Statement): LabelledStatement { return new LabelledStatement(global.generatedEs2panda._CreateLabelledStatement(global.context, passNode(ident), passNode(body))) @@ -44,13 +43,17 @@ export class LabelledStatement extends Statement { return new LabelledStatement(global.generatedEs2panda._UpdateLabelledStatement(global.context, passNode(original), passNode(ident), passNode(body))) } get body(): Statement | undefined { - return unpackNode(global.generatedEs2panda._LabelledStatementBodyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._LabelledStatementBody(global.context, this.peer)) } get ident(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._LabelledStatementIdentConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._LabelledStatementIdent(global.context, this.peer)) + } + get referencedStatement(): AstNode | undefined { + return unpackNode(global.generatedEs2panda._LabelledStatementGetReferencedStatementConst(global.context, this.peer)) } + protected readonly brandLabelledStatement: undefined } -export function isLabelledStatement(node: AstNode): node is LabelledStatement { +export function isLabelledStatement(node: object | undefined): node is LabelledStatement { return node instanceof LabelledStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_LABELLED_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/Literal.ts b/koala-wrapper/src/generated/peers/Literal.ts index 76b9e6681..c6ca869ac 100644 --- a/koala-wrapper/src/generated/peers/Literal.ts +++ b/koala-wrapper/src/generated/peers/Literal.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -31,11 +30,19 @@ import { import { Expression } from "./Expression" export class Literal extends Expression { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - } + get isFolded(): boolean { + return global.generatedEs2panda._LiteralIsFoldedConst(global.context, this.peer) + } + /** @deprecated */ + setFolded(folded: boolean): this { + global.generatedEs2panda._LiteralSetFolded(global.context, this.peer, folded) + return this + } + protected readonly brandLiteral: undefined } -export function isLiteral(node: AstNode): node is Literal { +export function isLiteral(node: object | undefined): node is Literal { return node instanceof Literal } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/LoopStatement.ts b/koala-wrapper/src/generated/peers/LoopStatement.ts index eaed67cf3..910132a1c 100644 --- a/koala-wrapper/src/generated/peers/LoopStatement.ts +++ b/koala-wrapper/src/generated/peers/LoopStatement.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -31,11 +30,11 @@ import { import { Statement } from "./Statement" export class LoopStatement extends Statement { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - } + protected readonly brandLoopStatement: undefined } -export function isLoopStatement(node: AstNode): node is LoopStatement { +export function isLoopStatement(node: object | undefined): node is LoopStatement { return node instanceof LoopStatement } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/MaybeOptionalExpression.ts b/koala-wrapper/src/generated/peers/MaybeOptionalExpression.ts index b02bcf152..d9cf55564 100644 --- a/koala-wrapper/src/generated/peers/MaybeOptionalExpression.ts +++ b/koala-wrapper/src/generated/peers/MaybeOptionalExpression.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -31,9 +30,8 @@ import { import { Expression } from "./Expression" export class MaybeOptionalExpression extends Expression { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - } get isOptional(): boolean { return global.generatedEs2panda._MaybeOptionalExpressionIsOptionalConst(global.context, this.peer) @@ -43,7 +41,8 @@ export class MaybeOptionalExpression extends Expression { global.generatedEs2panda._MaybeOptionalExpressionClearOptional(global.context, this.peer) return this } + protected readonly brandMaybeOptionalExpression: undefined } -export function isMaybeOptionalExpression(node: AstNode): node is MaybeOptionalExpression { +export function isMaybeOptionalExpression(node: object | undefined): node is MaybeOptionalExpression { return node instanceof MaybeOptionalExpression } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/MemberExpression.ts b/koala-wrapper/src/generated/peers/MemberExpression.ts index 530fc754e..6e5dec8e6 100644 --- a/koala-wrapper/src/generated/peers/MemberExpression.ts +++ b/koala-wrapper/src/generated/peers/MemberExpression.ts @@ -22,21 +22,23 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { MaybeOptionalExpression } from "./MaybeOptionalExpression" -import { Expression } from "./Expression" +import { CodeGen } from "./CodeGen" +import { ETSFunctionType } from "./ETSFunctionType" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaMemberExpressionKind } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { MaybeOptionalExpression } from "./MaybeOptionalExpression" +import { VReg } from "./VReg" export class MemberExpression extends MaybeOptionalExpression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_MEMBER_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 45) super(pointer) - } static createMemberExpression(object_arg: Expression | undefined, property: Expression | undefined, kind: Es2pandaMemberExpressionKind, computed: boolean, optional_arg: boolean): MemberExpression { return new MemberExpression(global.generatedEs2panda._CreateMemberExpression(global.context, passNode(object_arg), passNode(property), kind, computed, optional_arg)) @@ -45,20 +47,20 @@ export class MemberExpression extends MaybeOptionalExpression { return new MemberExpression(global.generatedEs2panda._UpdateMemberExpression(global.context, passNode(original), passNode(object_arg), passNode(property), kind, computed, optional_arg)) } get object(): Expression | undefined { - return unpackNode(global.generatedEs2panda._MemberExpressionObjectConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._MemberExpressionObject(global.context, this.peer)) } /** @deprecated */ - setObject(object_arg: Expression): this { + setObject(object_arg?: Expression): this { global.generatedEs2panda._MemberExpressionSetObject(global.context, this.peer, passNode(object_arg)) return this } /** @deprecated */ - setProperty(prop: Expression): this { + setProperty(prop?: Expression): this { global.generatedEs2panda._MemberExpressionSetProperty(global.context, this.peer, passNode(prop)) return this } get property(): Expression | undefined { - return unpackNode(global.generatedEs2panda._MemberExpressionPropertyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._MemberExpressionProperty(global.context, this.peer)) } get isComputed(): boolean { return global.generatedEs2panda._MemberExpressionIsComputedConst(global.context, this.peer) @@ -76,6 +78,9 @@ export class MemberExpression extends MaybeOptionalExpression { global.generatedEs2panda._MemberExpressionRemoveMemberKind(global.context, this.peer, kind) return this } + get extensionAccessorType(): ETSFunctionType | undefined { + return unpackNode(global.generatedEs2panda._MemberExpressionExtensionAccessorTypeConst(global.context, this.peer)) + } get isIgnoreBox(): boolean { return global.generatedEs2panda._MemberExpressionIsIgnoreBoxConst(global.context, this.peer) } @@ -84,8 +89,22 @@ export class MemberExpression extends MaybeOptionalExpression { global.generatedEs2panda._MemberExpressionSetIgnoreBox(global.context, this.peer) return this } + get isPrivateReference(): boolean { + return global.generatedEs2panda._MemberExpressionIsPrivateReferenceConst(global.context, this.peer) + } + /** @deprecated */ + compileToReg(pg?: CodeGen, objReg?: VReg): this { + global.generatedEs2panda._MemberExpressionCompileToRegConst(global.context, this.peer, passNode(pg), passNode(objReg)) + return this + } + /** @deprecated */ + compileToRegs(pg?: CodeGen, object_arg?: VReg, property?: VReg): this { + global.generatedEs2panda._MemberExpressionCompileToRegsConst(global.context, this.peer, passNode(pg), passNode(object_arg), passNode(property)) + return this + } + protected readonly brandMemberExpression: undefined } -export function isMemberExpression(node: AstNode): node is MemberExpression { +export function isMemberExpression(node: object | undefined): node is MemberExpression { return node instanceof MemberExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_MEMBER_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/MetaProperty.ts b/koala-wrapper/src/generated/peers/MetaProperty.ts index fbdb77b24..2e84a4977 100644 --- a/koala-wrapper/src/generated/peers/MetaProperty.ts +++ b/koala-wrapper/src/generated/peers/MetaProperty.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Expression } from "./Expression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaMetaPropertyKind } from "./../Es2pandaEnums" +import { Expression } from "./Expression" export class MetaProperty extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_META_PROPERTY_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 46) super(pointer) - } static createMetaProperty(kind: Es2pandaMetaPropertyKind): MetaProperty { return new MetaProperty(global.generatedEs2panda._CreateMetaProperty(global.context, kind)) @@ -46,8 +45,9 @@ export class MetaProperty extends Expression { get kind(): Es2pandaMetaPropertyKind { return global.generatedEs2panda._MetaPropertyKindConst(global.context, this.peer) } + protected readonly brandMetaProperty: undefined } -export function isMetaProperty(node: AstNode): node is MetaProperty { +export function isMetaProperty(node: object | undefined): node is MetaProperty { return node instanceof MetaProperty } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_META_PROPERTY_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/MethodDefinition.ts b/koala-wrapper/src/generated/peers/MethodDefinition.ts index 0cfbcff23..13342ae64 100644 --- a/koala-wrapper/src/generated/peers/MethodDefinition.ts +++ b/koala-wrapper/src/generated/peers/MethodDefinition.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,15 +29,15 @@ import { } from "../../reexport-for-generated" import { ClassElement } from "./ClassElement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaMethodDefinitionKind } from "./../Es2pandaEnums" -import { Expression } from "./Expression" import { Es2pandaModifierFlags } from "./../Es2pandaEnums" +import { Expression } from "./Expression" import { ScriptFunction } from "./ScriptFunction" export class MethodDefinition extends ClassElement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_METHOD_DEFINITION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 47) super(pointer) - } static createMethodDefinition(kind: Es2pandaMethodDefinitionKind, key: Expression | undefined, value: Expression | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean): MethodDefinition { return new MethodDefinition(global.generatedEs2panda._CreateMethodDefinition(global.context, kind, passNode(key), passNode(value), modifiers, isComputed)) @@ -52,17 +51,34 @@ export class MethodDefinition extends ClassElement { get isConstructor(): boolean { return global.generatedEs2panda._MethodDefinitionIsConstructorConst(global.context, this.peer) } + get isMethod(): boolean { + return global.generatedEs2panda._MethodDefinitionIsMethodConst(global.context, this.peer) + } get isExtensionMethod(): boolean { return global.generatedEs2panda._MethodDefinitionIsExtensionMethodConst(global.context, this.peer) } + get isGetter(): boolean { + return global.generatedEs2panda._MethodDefinitionIsGetterConst(global.context, this.peer) + } + get isSetter(): boolean { + return global.generatedEs2panda._MethodDefinitionIsSetterConst(global.context, this.peer) + } + get isDefaultAccessModifier(): boolean { + return global.generatedEs2panda._MethodDefinitionIsDefaultAccessModifierConst(global.context, this.peer) + } + /** @deprecated */ + setDefaultAccessModifier(isDefault: boolean): this { + global.generatedEs2panda._MethodDefinitionSetDefaultAccessModifier(global.context, this.peer, isDefault) + return this + } get overloads(): readonly MethodDefinition[] { return unpackNodeArray(global.generatedEs2panda._MethodDefinitionOverloadsConst(global.context, this.peer)) } get baseOverloadMethod(): MethodDefinition | undefined { - return unpackNode(global.generatedEs2panda._MethodDefinitionBaseOverloadMethodConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._MethodDefinitionBaseOverloadMethod(global.context, this.peer)) } get asyncPairMethod(): MethodDefinition | undefined { - return unpackNode(global.generatedEs2panda._MethodDefinitionAsyncPairMethodConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._MethodDefinitionAsyncPairMethod(global.context, this.peer)) } /** @deprecated */ setOverloads(overloads: readonly MethodDefinition[]): this { @@ -70,27 +86,46 @@ export class MethodDefinition extends ClassElement { return this } /** @deprecated */ - clearOverloads(): this { - global.generatedEs2panda._MethodDefinitionClearOverloads(global.context, this.peer) + addOverload(overload?: MethodDefinition): this { + global.generatedEs2panda._MethodDefinitionAddOverload(global.context, this.peer, passNode(overload)) return this } /** @deprecated */ - addOverload(overload: MethodDefinition): this { - global.generatedEs2panda._MethodDefinitionAddOverload(global.context, this.peer, passNode(overload)) + setBaseOverloadMethod(baseOverloadMethod?: MethodDefinition): this { + global.generatedEs2panda._MethodDefinitionSetBaseOverloadMethod(global.context, this.peer, passNode(baseOverloadMethod)) return this } /** @deprecated */ - setBaseOverloadMethod(baseOverloadMethod: MethodDefinition): this { - global.generatedEs2panda._MethodDefinitionSetBaseOverloadMethod(global.context, this.peer, passNode(baseOverloadMethod)) + setAsyncPairMethod(asyncPairMethod?: MethodDefinition): this { + global.generatedEs2panda._MethodDefinitionSetAsyncPairMethod(global.context, this.peer, passNode(asyncPairMethod)) + return this + } + get function(): ScriptFunction | undefined { + return unpackNode(global.generatedEs2panda._MethodDefinitionFunction(global.context, this.peer)) + } + /** @deprecated */ + initializeOverloadInfo(): this { + global.generatedEs2panda._MethodDefinitionInitializeOverloadInfo(global.context, this.peer) + return this + } + /** @deprecated */ + emplaceOverloads(overloads?: MethodDefinition): this { + global.generatedEs2panda._MethodDefinitionEmplaceOverloads(global.context, this.peer, passNode(overloads)) + return this + } + /** @deprecated */ + clearOverloads(): this { + global.generatedEs2panda._MethodDefinitionClearOverloads(global.context, this.peer) return this } /** @deprecated */ - setAsyncPairMethod(method: MethodDefinition): this { - global.generatedEs2panda._MethodDefinitionSetAsyncPairMethod(global.context, this.peer, passNode(method)) + setValueOverloads(overloads: MethodDefinition | undefined, index: number): this { + global.generatedEs2panda._MethodDefinitionSetValueOverloads(global.context, this.peer, passNode(overloads), index) return this } + protected readonly brandMethodDefinition: undefined } -export function isMethodDefinition(node: AstNode): node is MethodDefinition { +export function isMethodDefinition(node: object | undefined): node is MethodDefinition { return node instanceof MethodDefinition } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_METHOD_DEFINITION)) { diff --git a/koala-wrapper/src/generated/peers/NamedType.ts b/koala-wrapper/src/generated/peers/NamedType.ts index a95328543..29a79f857 100644 --- a/koala-wrapper/src/generated/peers/NamedType.ts +++ b/koala-wrapper/src/generated/peers/NamedType.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Identifier } from "./Identifier" import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" +import { TypeNode } from "./TypeNode" export class NamedType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_NAMED_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 48) super(pointer) - } static createNamedType(name?: Identifier): NamedType { return new NamedType(global.generatedEs2panda._CreateNamedType(global.context, passNode(name))) @@ -59,17 +58,18 @@ export class NamedType extends TypeNode { return this } /** @deprecated */ - setNext(next: NamedType): this { + setNext(next?: NamedType): this { global.generatedEs2panda._NamedTypeSetNext(global.context, this.peer, passNode(next)) return this } /** @deprecated */ - setTypeParams(typeParams: TSTypeParameterInstantiation): this { + setTypeParams(typeParams?: TSTypeParameterInstantiation): this { global.generatedEs2panda._NamedTypeSetTypeParams(global.context, this.peer, passNode(typeParams)) return this } + protected readonly brandNamedType: undefined } -export function isNamedType(node: AstNode): node is NamedType { +export function isNamedType(node: object | undefined): node is NamedType { return node instanceof NamedType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_NAMED_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/NewExpression.ts b/koala-wrapper/src/generated/peers/NewExpression.ts index f09cf3d6e..e7518c865 100644 --- a/koala-wrapper/src/generated/peers/NewExpression.ts +++ b/koala-wrapper/src/generated/peers/NewExpression.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class NewExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_NEW_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 49) super(pointer) - } static createNewExpression(callee: Expression | undefined, _arguments: readonly Expression[]): NewExpression { return new NewExpression(global.generatedEs2panda._CreateNewExpression(global.context, passNode(callee), passNodeArray(_arguments), _arguments.length)) @@ -48,8 +47,9 @@ export class NewExpression extends Expression { get arguments(): readonly Expression[] { return unpackNodeArray(global.generatedEs2panda._NewExpressionArgumentsConst(global.context, this.peer)) } + protected readonly brandNewExpression: undefined } -export function isNewExpression(node: AstNode): node is NewExpression { +export function isNewExpression(node: object | undefined): node is NewExpression { return node instanceof NewExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_NEW_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/NullLiteral.ts b/koala-wrapper/src/generated/peers/NullLiteral.ts index 11f751021..d34e63a64 100644 --- a/koala-wrapper/src/generated/peers/NullLiteral.ts +++ b/koala-wrapper/src/generated/peers/NullLiteral.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Literal } from "./Literal" export class NullLiteral extends Literal { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_NULL_LITERAL) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 50) super(pointer) - } static createNullLiteral(): NullLiteral { return new NullLiteral(global.generatedEs2panda._CreateNullLiteral(global.context)) @@ -42,8 +41,9 @@ export class NullLiteral extends Literal { static updateNullLiteral(original?: NullLiteral): NullLiteral { return new NullLiteral(global.generatedEs2panda._UpdateNullLiteral(global.context, passNode(original))) } + protected readonly brandNullLiteral: undefined } -export function isNullLiteral(node: AstNode): node is NullLiteral { +export function isNullLiteral(node: object | undefined): node is NullLiteral { return node instanceof NullLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_NULL_LITERAL)) { diff --git a/koala-wrapper/src/generated/peers/NumberLiteral.ts b/koala-wrapper/src/generated/peers/NumberLiteral.ts index 0930bbc02..c6f720610 100644 --- a/koala-wrapper/src/generated/peers/NumberLiteral.ts +++ b/koala-wrapper/src/generated/peers/NumberLiteral.ts @@ -22,22 +22,40 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Literal } from "./Literal" export class NumberLiteral extends Literal { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 52) super(pointer) - } + static createNumberLiteral(value: number): AstNode { + return new NumberLiteral(global.generatedEs2panda._CreateNumberLiteral(global.context, value)) + } + static updateNumberLiteral(original: AstNode | undefined, value: number): AstNode { + return new NumberLiteral(global.generatedEs2panda._UpdateNumberLiteral(global.context, passNode(original), value)) + } + static update1NumberLiteral(original: AstNode | undefined, value: number): AstNode { + return new NumberLiteral(global.generatedEs2panda._UpdateNumberLiteral1(global.context, passNode(original), value)) + } + static update2NumberLiteral(original: AstNode | undefined, value: number): AstNode { + return new NumberLiteral(global.generatedEs2panda._UpdateNumberLiteral2(global.context, passNode(original), value)) + } + static update3NumberLiteral(original: AstNode | undefined, value: number): AstNode { + return new NumberLiteral(global.generatedEs2panda._UpdateNumberLiteral3(global.context, passNode(original), value)) + } + get str(): string { + return unpackString(global.generatedEs2panda._NumberLiteralStrConst(global.context, this.peer)) + } + protected readonly brandNumberLiteral: undefined } -export function isNumberLiteral(node: AstNode): node is NumberLiteral { +export function isNumberLiteral(node: object | undefined): node is NumberLiteral { return node instanceof NumberLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL)) { diff --git a/koala-wrapper/src/generated/peers/ObjectExpression.ts b/koala-wrapper/src/generated/peers/ObjectExpression.ts index 3c008e515..4909445fd 100644 --- a/koala-wrapper/src/generated/peers/ObjectExpression.ts +++ b/koala-wrapper/src/generated/peers/ObjectExpression.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,16 +29,21 @@ import { } from "../../reexport-for-generated" import { AnnotatedExpression } from "./AnnotatedExpression" -import { Expression } from "./Expression" import { Decorator } from "./Decorator" -import { ValidationInfo } from "./ValidationInfo" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" -import { Es2pandaObjectTypeKind } from "../Es2pandaEnums" -import { Property } from "./Property" +import { ValidationInfo } from "./ValidationInfo" export class ObjectExpression extends AnnotatedExpression { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 161) super(pointer) - + } + static createObjectExpression(nodeType: Es2pandaAstNodeType, properties: readonly Expression[], trailingComma: boolean): ObjectExpression { + return new ObjectExpression(global.generatedEs2panda._CreateObjectExpression(global.context, nodeType, passNodeArray(properties), properties.length, trailingComma)) + } + static updateObjectExpression(original: ObjectExpression | undefined, nodeType: Es2pandaAstNodeType, properties: readonly Expression[], trailingComma: boolean): ObjectExpression { + return new ObjectExpression(global.generatedEs2panda._UpdateObjectExpression(global.context, passNode(original), nodeType, passNodeArray(properties), properties.length, trailingComma)) } get properties(): readonly Expression[] { return unpackNodeArray(global.generatedEs2panda._ObjectExpressionPropertiesConst(global.context, this.peer)) @@ -53,6 +57,12 @@ export class ObjectExpression extends AnnotatedExpression { get decorators(): readonly Decorator[] { return unpackNodeArray(global.generatedEs2panda._ObjectExpressionDecoratorsConst(global.context, this.peer)) } + get validateExpression(): ValidationInfo | undefined { + return new ValidationInfo(global.generatedEs2panda._ObjectExpressionValidateExpression(global.context, this.peer)) + } + get convertibleToObjectPattern(): boolean { + return global.generatedEs2panda._ObjectExpressionConvertibleToObjectPattern(global.context, this.peer) + } /** @deprecated */ setDeclaration(): this { global.generatedEs2panda._ObjectExpressionSetDeclaration(global.context, this.peer) @@ -67,17 +77,15 @@ export class ObjectExpression extends AnnotatedExpression { return unpackNode(global.generatedEs2panda._ObjectExpressionTypeAnnotationConst(global.context, this.peer)) } /** @deprecated */ - setTsTypeAnnotation(typeAnnotation: TypeNode): this { + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { global.generatedEs2panda._ObjectExpressionSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) return this } - static createObjectExpression(nodeType: Es2pandaAstNodeType, properties: Property[], trailingComma: boolean): ObjectExpression { - return new ObjectExpression(global.generatedEs2panda._CreateObjectExpression(global.context, nodeType, passNodeArray(properties), properties.length, trailingComma)) - } - static updateObjectExpression(original: ObjectExpression, nodeType: Es2pandaAstNodeType, properties: Property[], trailingComma: boolean): ObjectExpression { - return new ObjectExpression(global.generatedEs2panda._UpdateObjectExpression(global.context, passNode(original), nodeType, passNodeArray(properties), properties.length, trailingComma)) - } + protected readonly brandObjectExpression: undefined } -export function isObjectExpression(node: AstNode): node is ObjectExpression { +export function isObjectExpression(node: object | undefined): node is ObjectExpression { return node instanceof ObjectExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION, ObjectExpression) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/OmittedExpression.ts b/koala-wrapper/src/generated/peers/OmittedExpression.ts index 4449960a1..4c56847b7 100644 --- a/koala-wrapper/src/generated/peers/OmittedExpression.ts +++ b/koala-wrapper/src/generated/peers/OmittedExpression.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class OmittedExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_OMITTED_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 53) super(pointer) - } static createOmittedExpression(): OmittedExpression { return new OmittedExpression(global.generatedEs2panda._CreateOmittedExpression(global.context)) @@ -42,8 +41,9 @@ export class OmittedExpression extends Expression { static updateOmittedExpression(original?: OmittedExpression): OmittedExpression { return new OmittedExpression(global.generatedEs2panda._UpdateOmittedExpression(global.context, passNode(original))) } + protected readonly brandOmittedExpression: undefined } -export function isOmittedExpression(node: AstNode): node is OmittedExpression { +export function isOmittedExpression(node: object | undefined): node is OmittedExpression { return node instanceof OmittedExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_OMITTED_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/OpaqueTypeNode.ts b/koala-wrapper/src/generated/peers/OpaqueTypeNode.ts index 8fbc0101b..763e54bef 100644 --- a/koala-wrapper/src/generated/peers/OpaqueTypeNode.ts +++ b/koala-wrapper/src/generated/peers/OpaqueTypeNode.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class OpaqueTypeNode extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_OPAQUE_TYPE_NODE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 154) super(pointer) - } static create1OpaqueTypeNode(): OpaqueTypeNode { return new OpaqueTypeNode(global.generatedEs2panda._CreateOpaqueTypeNode1(global.context)) @@ -42,8 +41,9 @@ export class OpaqueTypeNode extends TypeNode { static update1OpaqueTypeNode(original?: OpaqueTypeNode): OpaqueTypeNode { return new OpaqueTypeNode(global.generatedEs2panda._UpdateOpaqueTypeNode1(global.context, passNode(original))) } + protected readonly brandOpaqueTypeNode: undefined } -export function isOpaqueTypeNode(node: AstNode): node is OpaqueTypeNode { +export function isOpaqueTypeNode(node: object | undefined): node is OpaqueTypeNode { return node instanceof OpaqueTypeNode } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_OPAQUE_TYPE_NODE)) { diff --git a/koala-wrapper/src/generated/peers/PrefixAssertionExpression.ts b/koala-wrapper/src/generated/peers/PrefixAssertionExpression.ts index 30dc3d43a..6c77c1633 100644 --- a/koala-wrapper/src/generated/peers/PrefixAssertionExpression.ts +++ b/koala-wrapper/src/generated/peers/PrefixAssertionExpression.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" export class PrefixAssertionExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 54) super(pointer) - } static createPrefixAssertionExpression(expr?: Expression, type?: TypeNode): PrefixAssertionExpression { return new PrefixAssertionExpression(global.generatedEs2panda._CreatePrefixAssertionExpression(global.context, passNode(expr), passNode(type))) @@ -49,8 +48,9 @@ export class PrefixAssertionExpression extends Expression { get type(): TypeNode | undefined { return unpackNode(global.generatedEs2panda._PrefixAssertionExpressionTypeConst(global.context, this.peer)) } + protected readonly brandPrefixAssertionExpression: undefined } -export function isPrefixAssertionExpression(node: AstNode): node is PrefixAssertionExpression { +export function isPrefixAssertionExpression(node: object | undefined): node is PrefixAssertionExpression { return node instanceof PrefixAssertionExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/Property.ts b/koala-wrapper/src/generated/peers/Property.ts index 6a576762b..d50532751 100644 --- a/koala-wrapper/src/generated/peers/Property.ts +++ b/koala-wrapper/src/generated/peers/Property.ts @@ -22,39 +22,39 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Expression } from "./Expression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaPropertyKind } from "./../Es2pandaEnums" +import { Expression } from "./Expression" import { ValidationInfo } from "./ValidationInfo" export class Property extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 55) super(pointer) } + static create1Property(kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property { + return new Property(global.generatedEs2panda._CreateProperty1(global.context, kind, passNode(key), passNode(value), isMethod, isComputed)) + } static createProperty(key?: Expression, value?: Expression): Property { return new Property(global.generatedEs2panda._CreateProperty(global.context, passNode(key), passNode(value))) } static updateProperty(original?: Property, key?: Expression, value?: Expression): Property { return new Property(global.generatedEs2panda._UpdateProperty(global.context, passNode(original), passNode(key), passNode(value))) } - static create1Property(kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property { - return new Property(global.generatedEs2panda._CreateProperty1(global.context, kind, passNode(key), passNode(value), isMethod, isComputed)) - } - static update1Property(original: Property | undefined, kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property { + static update1Property(original: Property | undefined, kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property { return new Property(global.generatedEs2panda._UpdateProperty1(global.context, passNode(original), kind, passNode(key), passNode(value), isMethod, isComputed)) } get key(): Expression | undefined { - return unpackNode(global.generatedEs2panda._PropertyKeyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._PropertyKey(global.context, this.peer)) } get value(): Expression | undefined { - return unpackNode(global.generatedEs2panda._PropertyValueConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._PropertyValue(global.context, this.peer)) } get kind(): Es2pandaPropertyKind { return global.generatedEs2panda._PropertyKindConst(global.context, this.peer) @@ -71,8 +71,15 @@ export class Property extends Expression { get isAccessor(): boolean { return global.generatedEs2panda._PropertyIsAccessorConst(global.context, this.peer) } + get convertibleToPatternProperty(): boolean { + return global.generatedEs2panda._PropertyConvertibleToPatternProperty(global.context, this.peer) + } + get validateExpression(): ValidationInfo | undefined { + return new ValidationInfo(global.generatedEs2panda._PropertyValidateExpression(global.context, this.peer)) + } + protected readonly brandProperty: undefined } -export function isProperty(node: AstNode): node is Property { +export function isProperty(node: object | undefined): node is Property { return node instanceof Property } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY)) { diff --git a/koala-wrapper/src/generated/peers/RegExpLiteral.ts b/koala-wrapper/src/generated/peers/RegExpLiteral.ts index 0d91a57d9..937b9621b 100644 --- a/koala-wrapper/src/generated/peers/RegExpLiteral.ts +++ b/koala-wrapper/src/generated/peers/RegExpLiteral.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Literal } from "./Literal" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaRegExpFlags } from "./../Es2pandaEnums" +import { Literal } from "./Literal" export class RegExpLiteral extends Literal { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_REGEXP_LITERAL) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 56) super(pointer) - } static createRegExpLiteral(pattern: string, flags: Es2pandaRegExpFlags, flagsStr: string): RegExpLiteral { return new RegExpLiteral(global.generatedEs2panda._CreateRegExpLiteral(global.context, pattern, flags, flagsStr)) @@ -49,8 +48,9 @@ export class RegExpLiteral extends Literal { get flags(): Es2pandaRegExpFlags { return global.generatedEs2panda._RegExpLiteralFlagsConst(global.context, this.peer) } + protected readonly brandRegExpLiteral: undefined } -export function isRegExpLiteral(node: AstNode): node is RegExpLiteral { +export function isRegExpLiteral(node: object | undefined): node is RegExpLiteral { return node instanceof RegExpLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_REGEXP_LITERAL)) { diff --git a/koala-wrapper/src/generated/peers/ReturnStatement.ts b/koala-wrapper/src/generated/peers/ReturnStatement.ts index 4607dbe40..aa11d63cc 100644 --- a/koala-wrapper/src/generated/peers/ReturnStatement.ts +++ b/koala-wrapper/src/generated/peers/ReturnStatement.ts @@ -22,43 +22,38 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Statement } from "./Statement" export class ReturnStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 58) super(pointer) - } - static createReturnStatement(): ReturnStatement { - return new ReturnStatement(global.generatedEs2panda._CreateReturnStatement(global.context)) + static create1ReturnStatement(argument?: Expression): ReturnStatement { + return new ReturnStatement(global.generatedEs2panda._CreateReturnStatement1(global.context, passNode(argument))) } static updateReturnStatement(original?: ReturnStatement): ReturnStatement { return new ReturnStatement(global.generatedEs2panda._UpdateReturnStatement(global.context, passNode(original))) } - static create1ReturnStatement(argument?: Expression): ReturnStatement { - return new ReturnStatement(global.generatedEs2panda._CreateReturnStatement1(global.context, passNode(argument))) - } static update1ReturnStatement(original?: ReturnStatement, argument?: Expression): ReturnStatement { return new ReturnStatement(global.generatedEs2panda._UpdateReturnStatement1(global.context, passNode(original), passNode(argument))) } get argument(): Expression | undefined { - return unpackNode(global.generatedEs2panda._ReturnStatementArgumentConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ReturnStatementArgument(global.context, this.peer)) } - /** @deprecated */ - setArgument(arg: Expression): this { - global.generatedEs2panda._ReturnStatementSetArgument(global.context, this.peer, passNode(arg)) - return this + get isAsyncImplReturn(): boolean { + return global.generatedEs2panda._ReturnStatementIsAsyncImplReturnConst(global.context, this.peer) } + protected readonly brandReturnStatement: undefined } -export function isReturnStatement(node: AstNode): node is ReturnStatement { +export function isReturnStatement(node: object | undefined): node is ReturnStatement { return node instanceof ReturnStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/ScriptFunction.ts b/koala-wrapper/src/generated/peers/ScriptFunction.ts index 69389b8d5..0e91939c4 100644 --- a/koala-wrapper/src/generated/peers/ScriptFunction.ts +++ b/koala-wrapper/src/generated/peers/ScriptFunction.ts @@ -22,27 +22,25 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaScriptFunctionFlags } from "./../Es2pandaEnums" +import { Expression } from "./Expression" import { FunctionSignature } from "./FunctionSignature" import { Identifier } from "./Identifier" -import { Expression } from "./Expression" import { ReturnStatement } from "./ReturnStatement" import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" import { TypeNode } from "./TypeNode" -import { Es2pandaScriptFunctionFlags } from "./../Es2pandaEnums" -import { Es2pandaModifierFlags } from "./../Es2pandaEnums" -import { AnnotationUsage } from "./AnnotationUsage" export class ScriptFunction extends AstNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 59) super(pointer) - } static createScriptFunction(databody: AstNode | undefined, datasignature: FunctionSignature | undefined, datafuncFlags: number, dataflags: number): ScriptFunction { return new ScriptFunction(global.generatedEs2panda._CreateScriptFunction(global.context, passNode(databody), passNode(datasignature), datafuncFlags, dataflags)) @@ -51,35 +49,38 @@ export class ScriptFunction extends AstNode { return new ScriptFunction(global.generatedEs2panda._UpdateScriptFunction(global.context, passNode(original), passNode(databody), passNode(datasignature), datafuncFlags, dataflags)) } get id(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._ScriptFunctionIdConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ScriptFunctionId(global.context, this.peer)) } get params(): readonly Expression[] { - return unpackNodeArray(global.generatedEs2panda._ScriptFunctionParamsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ScriptFunctionParams(global.context, this.peer)) } get returnStatements(): readonly ReturnStatement[] { - return unpackNodeArray(global.generatedEs2panda._ScriptFunctionReturnStatementsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ScriptFunctionReturnStatements(global.context, this.peer)) + } + get returnStatementsForUpdate(): readonly ReturnStatement[] { + return unpackNodeArray(global.generatedEs2panda._ScriptFunctionReturnStatementsForUpdate(global.context, this.peer)) } get typeParams(): TSTypeParameterDeclaration | undefined { - return unpackNode(global.generatedEs2panda._ScriptFunctionTypeParamsConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ScriptFunctionTypeParams(global.context, this.peer)) } get body(): AstNode | undefined { - return unpackNode(global.generatedEs2panda._ScriptFunctionBodyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ScriptFunctionBody(global.context, this.peer)) } /** @deprecated */ - addReturnStatement(returnStatement: ReturnStatement): this { + addReturnStatement(returnStatement?: ReturnStatement): this { global.generatedEs2panda._ScriptFunctionAddReturnStatement(global.context, this.peer, passNode(returnStatement)) return this } /** @deprecated */ - setBody(body: AstNode): this { + setBody(body?: AstNode): this { global.generatedEs2panda._ScriptFunctionSetBody(global.context, this.peer, passNode(body)) return this } get returnTypeAnnotation(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._ScriptFunctionReturnTypeAnnotationConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._ScriptFunctionReturnTypeAnnotation(global.context, this.peer)) } /** @deprecated */ - setReturnTypeAnnotation(node: TypeNode): this { + setReturnTypeAnnotation(node?: TypeNode): this { global.generatedEs2panda._ScriptFunctionSetReturnTypeAnnotation(global.context, this.peer, passNode(node)) return this } @@ -155,6 +156,9 @@ export class ScriptFunction extends AstNode { get isRethrowing(): boolean { return global.generatedEs2panda._ScriptFunctionIsRethrowingConst(global.context, this.peer) } + get isTrailingLambda(): boolean { + return global.generatedEs2panda._ScriptFunctionIsTrailingLambdaConst(global.context, this.peer) + } get isDynamic(): boolean { return global.generatedEs2panda._ScriptFunctionIsDynamicConst(global.context, this.peer) } @@ -178,20 +182,93 @@ export class ScriptFunction extends AstNode { return this } /** @deprecated */ - addModifier(flags: Es2pandaModifierFlags): this { - global.generatedEs2panda._AstNodeAddModifier(global.context, this.peer, flags) + clearFlag(flags: Es2pandaScriptFunctionFlags): this { + global.generatedEs2panda._ScriptFunctionClearFlag(global.context, this.peer, flags) + return this + } + get formalParamsLength(): number { + return global.generatedEs2panda._ScriptFunctionFormalParamsLengthConst(global.context, this.peer) + } + /** @deprecated */ + setIsolatedDeclgenReturnType(type: string): this { + global.generatedEs2panda._ScriptFunctionSetIsolatedDeclgenReturnType(global.context, this.peer, type) + return this + } + get isolatedDeclgenReturnType(): string { + return unpackString(global.generatedEs2panda._ScriptFunctionGetIsolatedDeclgenReturnTypeConst(global.context, this.peer)) + } + /** @deprecated */ + emplaceReturnStatements(returnStatements?: ReturnStatement): this { + global.generatedEs2panda._ScriptFunctionEmplaceReturnStatements(global.context, this.peer, passNode(returnStatements)) + return this + } + /** @deprecated */ + clearReturnStatements(): this { + global.generatedEs2panda._ScriptFunctionClearReturnStatements(global.context, this.peer) + return this + } + /** @deprecated */ + setValueReturnStatements(returnStatements: ReturnStatement | undefined, index: number): this { + global.generatedEs2panda._ScriptFunctionSetValueReturnStatements(global.context, this.peer, passNode(returnStatements), index) + return this + } + /** @deprecated */ + emplaceParams(params?: Expression): this { + global.generatedEs2panda._ScriptFunctionEmplaceParams(global.context, this.peer, passNode(params)) + return this + } + /** @deprecated */ + clearParams(): this { + global.generatedEs2panda._ScriptFunctionClearParams(global.context, this.peer) + return this + } + /** @deprecated */ + setValueParams(params: Expression | undefined, index: number): this { + global.generatedEs2panda._ScriptFunctionSetValueParams(global.context, this.peer, passNode(params), index) + return this + } + get paramsForUpdate(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._ScriptFunctionParamsForUpdate(global.context, this.peer)) + } + /** @deprecated */ + emplaceAnnotations(source?: AnnotationUsage): this { + global.generatedEs2panda._ScriptFunctionEmplaceAnnotations(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._ScriptFunctionClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + setValueAnnotations(source: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._ScriptFunctionSetValueAnnotations(global.context, this.peer, passNode(source), index) return this } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ScriptFunctionAnnotationsForUpdate(global.context, this.peer)) + } get annotations(): readonly AnnotationUsage[] { - return unpackNodeArray(global.generatedEs2panda._ScriptFunctionAnnotationsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._ScriptFunctionAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ScriptFunctionSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ScriptFunctionSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this } /** @deprecated */ - setAnnotations(annotations: readonly AnnotationUsage[]): this { - global.generatedEs2panda._ScriptFunctionSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) + addAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._ScriptFunctionAddAnnotations(global.context, this.peer, passNode(annotations)) return this } + protected readonly brandScriptFunction: undefined } -export function isScriptFunction(node: AstNode): node is ScriptFunction { +export function isScriptFunction(node: object | undefined): node is ScriptFunction { return node instanceof ScriptFunction } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION)) { diff --git a/koala-wrapper/src/generated/peers/SequenceExpression.ts b/koala-wrapper/src/generated/peers/SequenceExpression.ts index dc814dd4d..e826f6e80 100644 --- a/koala-wrapper/src/generated/peers/SequenceExpression.ts +++ b/koala-wrapper/src/generated/peers/SequenceExpression.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class SequenceExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_SEQUENCE_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 60) super(pointer) - } static createSequenceExpression(sequence_arg: readonly Expression[]): SequenceExpression { return new SequenceExpression(global.generatedEs2panda._CreateSequenceExpression(global.context, passNodeArray(sequence_arg), sequence_arg.length)) @@ -43,10 +42,11 @@ export class SequenceExpression extends Expression { return new SequenceExpression(global.generatedEs2panda._UpdateSequenceExpression(global.context, passNode(original), passNodeArray(sequence_arg), sequence_arg.length)) } get sequence(): readonly Expression[] { - return unpackNodeArray(global.generatedEs2panda._SequenceExpressionSequenceConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._SequenceExpressionSequence(global.context, this.peer)) } + protected readonly brandSequenceExpression: undefined } -export function isSequenceExpression(node: AstNode): node is SequenceExpression { +export function isSequenceExpression(node: object | undefined): node is SequenceExpression { return node instanceof SequenceExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SEQUENCE_EXPRESSION)) { -- Gitee From 56319a57a9ea05a7546634094f7536d3c9f7636b Mon Sep 17 00:00:00 2001 From: xieziang Date: Mon, 16 Jun 2025 17:16:21 +0800 Subject: [PATCH 16/17] update generated/* Signed-off-by: xieziang Change-Id: I1432888fd30a695b11b1ab231dae8fac7abb8471 --- .../src/generated/Es2pandaNativeModule.ts | 6 +- .../src/generated/peers/SpreadElement.ts | 26 +++-- .../src/generated/peers/SrcDumper.ts | 54 +++++++-- .../src/generated/peers/Statement.ts | 7 +- .../src/generated/peers/StringLiteral.ts | 18 ++- .../src/generated/peers/SuperExpression.ts | 10 +- .../generated/peers/SwitchCaseStatement.ts | 19 +-- .../src/generated/peers/SwitchStatement.ts | 21 ++-- .../src/generated/peers/TSAnyKeyword.ts | 10 +- .../src/generated/peers/TSArrayType.ts | 10 +- .../src/generated/peers/TSAsExpression.ts | 16 +-- .../src/generated/peers/TSBigintKeyword.ts | 10 +- .../src/generated/peers/TSBooleanKeyword.ts | 10 +- .../src/generated/peers/TSClassImplements.ts | 15 +-- .../src/generated/peers/TSConditionalType.ts | 12 +- .../src/generated/peers/TSConstructorType.ts | 18 +-- .../src/generated/peers/TSEnumDeclaration.ts | 56 +++++++-- .../src/generated/peers/TSEnumMember.ts | 26 ++--- .../peers/TSExternalModuleReference.ts | 10 +- .../src/generated/peers/TSFunctionType.ts | 18 +-- .../peers/TSImportEqualsDeclaration.ts | 14 +-- .../src/generated/peers/TSImportType.ts | 12 +- .../src/generated/peers/TSIndexSignature.ts | 17 +-- .../generated/peers/TSIndexedAccessType.ts | 10 +- .../src/generated/peers/TSInferType.ts | 12 +- .../src/generated/peers/TSInterfaceBody.ts | 15 +-- .../generated/peers/TSInterfaceDeclaration.ts | 110 ++++++++++++++---- .../generated/peers/TSInterfaceHeritage.ts | 12 +- .../src/generated/peers/TSIntersectionType.ts | 12 +- .../src/generated/peers/TSLiteralType.ts | 12 +- .../src/generated/peers/TSMappedType.ts | 14 +-- .../src/generated/peers/TSMethodSignature.ts | 16 +-- .../src/generated/peers/TSModuleBlock.ts | 10 +- .../generated/peers/TSModuleDeclaration.ts | 12 +- .../src/generated/peers/TSNamedTupleMember.ts | 14 +-- .../src/generated/peers/TSNeverKeyword.ts | 10 +- .../generated/peers/TSNonNullExpression.ts | 14 +-- .../src/generated/peers/TSNullKeyword.ts | 10 +- .../src/generated/peers/TSNumberKeyword.ts | 10 +- .../src/generated/peers/TSObjectKeyword.ts | 10 +- .../generated/peers/TSParameterProperty.ts | 12 +- .../generated/peers/TSParenthesizedType.ts | 12 +- .../generated/peers/TSPropertySignature.ts | 14 +-- .../src/generated/peers/TSQualifiedName.ts | 20 ++-- .../generated/peers/TSSignatureDeclaration.ts | 18 +-- .../src/generated/peers/TSStringKeyword.ts | 10 +- .../src/generated/peers/TSThisType.ts | 10 +- .../src/generated/peers/TSTupleType.ts | 10 +- .../generated/peers/TSTypeAliasDeclaration.ts | 68 ++++++++--- .../src/generated/peers/TSTypeAssertion.ts | 16 +-- .../src/generated/peers/TSTypeLiteral.ts | 10 +- .../src/generated/peers/TSTypeOperator.ts | 12 +- .../src/generated/peers/TSTypeParameter.ts | 62 +++++++--- .../peers/TSTypeParameterDeclaration.ts | 17 ++- .../peers/TSTypeParameterInstantiation.ts | 10 +- .../src/generated/peers/TSTypePredicate.ts | 12 +- .../src/generated/peers/TSTypeQuery.ts | 12 +- .../src/generated/peers/TSTypeReference.ts | 17 +-- .../src/generated/peers/TSUndefinedKeyword.ts | 10 +- .../src/generated/peers/TSUnionType.ts | 10 +- .../src/generated/peers/TSUnknownKeyword.ts | 10 +- .../src/generated/peers/TSVoidKeyword.ts | 10 +- .../peers/TaggedTemplateExpression.ts | 12 +- .../src/generated/peers/TemplateElement.ts | 17 ++- .../src/generated/peers/TemplateLiteral.ts | 12 +- .../src/generated/peers/ThisExpression.ts | 10 +- .../src/generated/peers/ThrowStatement.ts | 12 +- .../src/generated/peers/TryStatement.ts | 9 +- koala-wrapper/src/generated/peers/TypeNode.ts | 43 +++++-- .../src/generated/peers/TypedAstNode.ts | 7 +- .../src/generated/peers/TypedStatement.ts | 7 +- .../src/generated/peers/TypeofExpression.ts | 10 +- .../src/generated/peers/UnaryExpression.ts | 19 +-- .../src/generated/peers/UndefinedLiteral.ts | 10 +- .../src/generated/peers/UpdateExpression.ts | 14 +-- .../src/generated/peers/ValidationInfo.ts | 10 +- .../generated/peers/VariableDeclaration.ts | 60 +++++++--- .../src/generated/peers/VariableDeclarator.ts | 25 ++-- .../src/generated/peers/WhileStatement.ts | 21 ++-- .../src/generated/peers/YieldExpression.ts | 10 +- 80 files changed, 851 insertions(+), 557 deletions(-) diff --git a/koala-wrapper/src/generated/Es2pandaNativeModule.ts b/koala-wrapper/src/generated/Es2pandaNativeModule.ts index bb1a2b7ca..90693935b 100644 --- a/koala-wrapper/src/generated/Es2pandaNativeModule.ts +++ b/koala-wrapper/src/generated/Es2pandaNativeModule.ts @@ -3583,15 +3583,15 @@ export class Es2pandaNativeModule { _UpdateBlockStatement(context: KNativePointer, original: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt): KNativePointer { throw new Error("This methods was not overloaded by native module initialization") } - _BlockStatementStatementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { - throw new Error("This methods was not overloaded by native module initialization") - } _BlockStatementStatementsForUpdates(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("This methods was not overloaded by native module initialization") } _BlockStatementStatements(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("This methods was not overloaded by native module initialization") } + _BlockStatementStatementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } _BlockStatementSetStatements(context: KNativePointer, receiver: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt): void { throw new Error("This methods was not overloaded by native module initialization") } diff --git a/koala-wrapper/src/generated/peers/SpreadElement.ts b/koala-wrapper/src/generated/peers/SpreadElement.ts index 4b721b993..c936f0ca9 100644 --- a/koala-wrapper/src/generated/peers/SpreadElement.ts +++ b/koala-wrapper/src/generated/peers/SpreadElement.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,17 +29,24 @@ import { } from "../../reexport-for-generated" import { AnnotatedExpression } from "./AnnotatedExpression" -import { Expression } from "./Expression" import { Decorator } from "./Decorator" -import { ValidationInfo } from "./ValidationInfo" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" +import { ValidationInfo } from "./ValidationInfo" export class SpreadElement extends AnnotatedExpression { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 163) super(pointer) - + } + static createSpreadElement(nodeType: Es2pandaAstNodeType, argument?: Expression): SpreadElement { + return new SpreadElement(global.generatedEs2panda._CreateSpreadElement(global.context, nodeType, passNode(argument))) + } + static updateSpreadElement(original: SpreadElement | undefined, nodeType: Es2pandaAstNodeType, argument?: Expression): SpreadElement { + return new SpreadElement(global.generatedEs2panda._UpdateSpreadElement(global.context, passNode(original), nodeType, passNode(argument))) } get argument(): Expression | undefined { - return unpackNode(global.generatedEs2panda._SpreadElementArgumentConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._SpreadElementArgument(global.context, this.peer)) } get isOptional(): boolean { return global.generatedEs2panda._SpreadElementIsOptionalConst(global.context, this.peer) @@ -53,15 +59,19 @@ export class SpreadElement extends AnnotatedExpression { global.generatedEs2panda._SpreadElementSetOptional(global.context, this.peer, optional_arg) return this } + get validateExpression(): ValidationInfo | undefined { + return new ValidationInfo(global.generatedEs2panda._SpreadElementValidateExpression(global.context, this.peer)) + } get typeAnnotation(): TypeNode | undefined { return unpackNode(global.generatedEs2panda._SpreadElementTypeAnnotationConst(global.context, this.peer)) } /** @deprecated */ - setTsTypeAnnotation(typeAnnotation: TypeNode): this { + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { global.generatedEs2panda._SpreadElementSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) return this } + protected readonly brandSpreadElement: undefined } -export function isSpreadElement(node: AstNode): node is SpreadElement { +export function isSpreadElement(node: object | undefined): node is SpreadElement { return node instanceof SpreadElement } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/SrcDumper.ts b/koala-wrapper/src/generated/peers/SrcDumper.ts index cb17a8868..9545d3e7b 100644 --- a/koala-wrapper/src/generated/peers/SrcDumper.ts +++ b/koala-wrapper/src/generated/peers/SrcDumper.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,9 +29,11 @@ import { } from "../../reexport-for-generated" export class SrcDumper extends ArktsObject { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - + } + static create1SrcDumper(node: AstNode | undefined, isDeclgen: boolean, isIsolatedDeclgen: boolean): SrcDumper { + return new SrcDumper(global.generatedEs2panda._CreateSrcDumper1(global.context, passNode(node), isDeclgen, isIsolatedDeclgen)) } static createSrcDumper(node?: AstNode): SrcDumper { return new SrcDumper(global.generatedEs2panda._CreateSrcDumper(global.context, passNode(node))) @@ -48,18 +49,28 @@ export class SrcDumper extends ArktsObject { return this } /** @deprecated */ - add2(l: number): this { - global.generatedEs2panda._SrcDumperAdd2(global.context, this.peer, l) + add2(i: number): this { + global.generatedEs2panda._SrcDumperAdd2(global.context, this.peer, i) + return this + } + /** @deprecated */ + add3(i: number): this { + global.generatedEs2panda._SrcDumperAdd3(global.context, this.peer, i) + return this + } + /** @deprecated */ + add4(l: number): this { + global.generatedEs2panda._SrcDumperAdd4(global.context, this.peer, l) return this } /** @deprecated */ - add3(f: number): this { - global.generatedEs2panda._SrcDumperAdd3(global.context, this.peer, f) + add5(f: number): this { + global.generatedEs2panda._SrcDumperAdd5(global.context, this.peer, f) return this } /** @deprecated */ - add4(d: number): this { - global.generatedEs2panda._SrcDumperAdd4(global.context, this.peer, d) + add6(d: number): this { + global.generatedEs2panda._SrcDumperAdd6(global.context, this.peer, d) return this } get str(): string { @@ -80,4 +91,29 @@ export class SrcDumper extends ArktsObject { global.generatedEs2panda._SrcDumperEndl(global.context, this.peer, num) return this } + get isDeclgen(): boolean { + return global.generatedEs2panda._SrcDumperIsDeclgenConst(global.context, this.peer) + } + get isIsolatedDeclgen(): boolean { + return global.generatedEs2panda._SrcDumperIsIsolatedDeclgenConst(global.context, this.peer) + } + /** @deprecated */ + dumpNode(key: string): this { + global.generatedEs2panda._SrcDumperDumpNode(global.context, this.peer, key) + return this + } + /** @deprecated */ + removeNode(key: string): this { + global.generatedEs2panda._SrcDumperRemoveNode(global.context, this.peer, key) + return this + } + get isIndirectDepPhase(): boolean { + return global.generatedEs2panda._SrcDumperIsIndirectDepPhaseConst(global.context, this.peer) + } + /** @deprecated */ + run(): this { + global.generatedEs2panda._SrcDumperRun(global.context, this.peer) + return this + } + protected readonly brandSrcDumper: undefined } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/Statement.ts b/koala-wrapper/src/generated/peers/Statement.ts index ace0ee9dc..9307bf6b2 100644 --- a/koala-wrapper/src/generated/peers/Statement.ts +++ b/koala-wrapper/src/generated/peers/Statement.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,11 +29,11 @@ import { } from "../../reexport-for-generated" export class Statement extends AstNode { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - } + protected readonly brandStatement: undefined } -export function isStatement(node: AstNode): node is Statement { +export function isStatement(node: object | undefined): node is Statement { return node instanceof Statement } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/StringLiteral.ts b/koala-wrapper/src/generated/peers/StringLiteral.ts index cf03dca5c..4ada461ae 100644 --- a/koala-wrapper/src/generated/peers/StringLiteral.ts +++ b/koala-wrapper/src/generated/peers/StringLiteral.ts @@ -22,36 +22,34 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, + ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Literal } from "./Literal" export class StringLiteral extends Literal { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 61) super(pointer) - } - static createStringLiteral(): StringLiteral { - return new StringLiteral(global.generatedEs2panda._CreateStringLiteral(global.context)) + static create1StringLiteral(str: string): StringLiteral { + return new StringLiteral(global.generatedEs2panda._CreateStringLiteral1(global.context, str)) } static updateStringLiteral(original?: StringLiteral): StringLiteral { return new StringLiteral(global.generatedEs2panda._UpdateStringLiteral(global.context, passNode(original))) } - static create1StringLiteral(str: string): StringLiteral { - return new StringLiteral(global.generatedEs2panda._CreateStringLiteral1(global.context, str)) - } static update1StringLiteral(original: StringLiteral | undefined, str: string): StringLiteral { return new StringLiteral(global.generatedEs2panda._UpdateStringLiteral1(global.context, passNode(original), str)) } get str(): string { return unpackString(global.generatedEs2panda._StringLiteralStrConst(global.context, this.peer)) } + protected readonly brandStringLiteral: undefined } -export function isStringLiteral(node: AstNode): node is StringLiteral { +export function isStringLiteral(node: object | undefined): node is StringLiteral { return node instanceof StringLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL)) { diff --git a/koala-wrapper/src/generated/peers/SuperExpression.ts b/koala-wrapper/src/generated/peers/SuperExpression.ts index 6f7c877c0..b8fff84da 100644 --- a/koala-wrapper/src/generated/peers/SuperExpression.ts +++ b/koala-wrapper/src/generated/peers/SuperExpression.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class SuperExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 83) super(pointer) - } static createSuperExpression(): SuperExpression { return new SuperExpression(global.generatedEs2panda._CreateSuperExpression(global.context)) @@ -42,8 +41,9 @@ export class SuperExpression extends Expression { static updateSuperExpression(original?: SuperExpression): SuperExpression { return new SuperExpression(global.generatedEs2panda._UpdateSuperExpression(global.context, passNode(original))) } + protected readonly brandSuperExpression: undefined } -export function isSuperExpression(node: AstNode): node is SuperExpression { +export function isSuperExpression(node: object | undefined): node is SuperExpression { return node instanceof SuperExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/SwitchCaseStatement.ts b/koala-wrapper/src/generated/peers/SwitchCaseStatement.ts index 27f1d7e98..c24d3ee11 100644 --- a/koala-wrapper/src/generated/peers/SwitchCaseStatement.ts +++ b/koala-wrapper/src/generated/peers/SwitchCaseStatement.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Statement } from "./Statement" export class SwitchCaseStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 85) super(pointer) - } static createSwitchCaseStatement(test: Expression | undefined, consequent: readonly Statement[]): SwitchCaseStatement { return new SwitchCaseStatement(global.generatedEs2panda._CreateSwitchCaseStatement(global.context, passNode(test), passNodeArray(consequent), consequent.length)) @@ -44,13 +43,19 @@ export class SwitchCaseStatement extends Statement { return new SwitchCaseStatement(global.generatedEs2panda._UpdateSwitchCaseStatement(global.context, passNode(original), passNode(test), passNodeArray(consequent), consequent.length)) } get test(): Expression | undefined { - return unpackNode(global.generatedEs2panda._SwitchCaseStatementTestConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._SwitchCaseStatementTest(global.context, this.peer)) + } + /** @deprecated */ + setTest(test?: Expression): this { + global.generatedEs2panda._SwitchCaseStatementSetTest(global.context, this.peer, passNode(test)) + return this } get consequent(): readonly Statement[] { return unpackNodeArray(global.generatedEs2panda._SwitchCaseStatementConsequentConst(global.context, this.peer)) } + protected readonly brandSwitchCaseStatement: undefined } -export function isSwitchCaseStatement(node: AstNode): node is SwitchCaseStatement { +export function isSwitchCaseStatement(node: object | undefined): node is SwitchCaseStatement { return node instanceof SwitchCaseStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/SwitchStatement.ts b/koala-wrapper/src/generated/peers/SwitchStatement.ts index d7c9289cd..96f2179dd 100644 --- a/koala-wrapper/src/generated/peers/SwitchStatement.ts +++ b/koala-wrapper/src/generated/peers/SwitchStatement.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Statement } from "./Statement" import { SwitchCaseStatement } from "./SwitchCaseStatement" export class SwitchStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 86) super(pointer) - } static createSwitchStatement(discriminant: Expression | undefined, cases: readonly SwitchCaseStatement[]): SwitchStatement { return new SwitchStatement(global.generatedEs2panda._CreateSwitchStatement(global.context, passNode(discriminant), passNodeArray(cases), cases.length)) @@ -45,13 +44,19 @@ export class SwitchStatement extends Statement { return new SwitchStatement(global.generatedEs2panda._UpdateSwitchStatement(global.context, passNode(original), passNode(discriminant), passNodeArray(cases), cases.length)) } get discriminant(): Expression | undefined { - return unpackNode(global.generatedEs2panda._SwitchStatementDiscriminantConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._SwitchStatementDiscriminant(global.context, this.peer)) + } + /** @deprecated */ + setDiscriminant(discriminant?: Expression): this { + global.generatedEs2panda._SwitchStatementSetDiscriminant(global.context, this.peer, passNode(discriminant)) + return this } get cases(): readonly SwitchCaseStatement[] { - return unpackNodeArray(global.generatedEs2panda._SwitchStatementCasesConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._SwitchStatementCases(global.context, this.peer)) } + protected readonly brandSwitchStatement: undefined } -export function isSwitchStatement(node: AstNode): node is SwitchStatement { +export function isSwitchStatement(node: object | undefined): node is SwitchStatement { return node instanceof SwitchStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/TSAnyKeyword.ts b/koala-wrapper/src/generated/peers/TSAnyKeyword.ts index 7f0133efb..9fd173cc2 100644 --- a/koala-wrapper/src/generated/peers/TSAnyKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSAnyKeyword.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSAnyKeyword extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_ANY_KEYWORD) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 91) super(pointer) - } static createTSAnyKeyword(): TSAnyKeyword { return new TSAnyKeyword(global.generatedEs2panda._CreateTSAnyKeyword(global.context)) @@ -42,8 +41,9 @@ export class TSAnyKeyword extends TypeNode { static updateTSAnyKeyword(original?: TSAnyKeyword): TSAnyKeyword { return new TSAnyKeyword(global.generatedEs2panda._UpdateTSAnyKeyword(global.context, passNode(original))) } + protected readonly brandTSAnyKeyword: undefined } -export function isTSAnyKeyword(node: AstNode): node is TSAnyKeyword { +export function isTSAnyKeyword(node: object | undefined): node is TSAnyKeyword { return node instanceof TSAnyKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ANY_KEYWORD)) { diff --git a/koala-wrapper/src/generated/peers/TSArrayType.ts b/koala-wrapper/src/generated/peers/TSArrayType.ts index 475b248cc..15718c2f2 100644 --- a/koala-wrapper/src/generated/peers/TSArrayType.ts +++ b/koala-wrapper/src/generated/peers/TSArrayType.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSArrayType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_ARRAY_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 102) super(pointer) - } static createTSArrayType(elementType?: TypeNode): TSArrayType { return new TSArrayType(global.generatedEs2panda._CreateTSArrayType(global.context, passNode(elementType))) @@ -45,8 +44,9 @@ export class TSArrayType extends TypeNode { get elementType(): TypeNode | undefined { return unpackNode(global.generatedEs2panda._TSArrayTypeElementTypeConst(global.context, this.peer)) } + protected readonly brandTSArrayType: undefined } -export function isTSArrayType(node: AstNode): node is TSArrayType { +export function isTSArrayType(node: object | undefined): node is TSArrayType { return node instanceof TSArrayType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ARRAY_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSAsExpression.ts b/koala-wrapper/src/generated/peers/TSAsExpression.ts index 99c58edd4..03b7e91b5 100644 --- a/koala-wrapper/src/generated/peers/TSAsExpression.ts +++ b/koala-wrapper/src/generated/peers/TSAsExpression.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,13 +29,13 @@ import { } from "../../reexport-for-generated" import { AnnotatedExpression } from "./AnnotatedExpression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" export class TSAsExpression extends AnnotatedExpression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_AS_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 138) super(pointer) - } static createTSAsExpression(expression: Expression | undefined, typeAnnotation: TypeNode | undefined, isConst: boolean): TSAsExpression { return new TSAsExpression(global.generatedEs2panda._CreateTSAsExpression(global.context, passNode(expression), passNode(typeAnnotation), isConst)) @@ -45,10 +44,10 @@ export class TSAsExpression extends AnnotatedExpression { return new TSAsExpression(global.generatedEs2panda._UpdateTSAsExpression(global.context, passNode(original), passNode(expression), passNode(typeAnnotation), isConst)) } get expr(): Expression | undefined { - return unpackNode(global.generatedEs2panda._TSAsExpressionExprConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSAsExpressionExpr(global.context, this.peer)) } /** @deprecated */ - setExpr(expr: Expression): this { + setExpr(expr?: Expression): this { global.generatedEs2panda._TSAsExpressionSetExpr(global.context, this.peer, passNode(expr)) return this } @@ -64,12 +63,13 @@ export class TSAsExpression extends AnnotatedExpression { return unpackNode(global.generatedEs2panda._TSAsExpressionTypeAnnotationConst(global.context, this.peer)) } /** @deprecated */ - setTsTypeAnnotation(typeAnnotation: TypeNode): this { + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { global.generatedEs2panda._TSAsExpressionSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) return this } + protected readonly brandTSAsExpression: undefined } -export function isTSAsExpression(node: AstNode): node is TSAsExpression { +export function isTSAsExpression(node: object | undefined): node is TSAsExpression { return node instanceof TSAsExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_AS_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/TSBigintKeyword.ts b/koala-wrapper/src/generated/peers/TSBigintKeyword.ts index 12da1be06..eebccba9a 100644 --- a/koala-wrapper/src/generated/peers/TSBigintKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSBigintKeyword.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSBigintKeyword extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_BIGINT_KEYWORD) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 98) super(pointer) - } static createTSBigintKeyword(): TSBigintKeyword { return new TSBigintKeyword(global.generatedEs2panda._CreateTSBigintKeyword(global.context)) @@ -42,8 +41,9 @@ export class TSBigintKeyword extends TypeNode { static updateTSBigintKeyword(original?: TSBigintKeyword): TSBigintKeyword { return new TSBigintKeyword(global.generatedEs2panda._UpdateTSBigintKeyword(global.context, passNode(original))) } + protected readonly brandTSBigintKeyword: undefined } -export function isTSBigintKeyword(node: AstNode): node is TSBigintKeyword { +export function isTSBigintKeyword(node: object | undefined): node is TSBigintKeyword { return node instanceof TSBigintKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_BIGINT_KEYWORD)) { diff --git a/koala-wrapper/src/generated/peers/TSBooleanKeyword.ts b/koala-wrapper/src/generated/peers/TSBooleanKeyword.ts index 6459f6fdb..d9467540d 100644 --- a/koala-wrapper/src/generated/peers/TSBooleanKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSBooleanKeyword.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSBooleanKeyword extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_BOOLEAN_KEYWORD) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 93) super(pointer) - } static createTSBooleanKeyword(): TSBooleanKeyword { return new TSBooleanKeyword(global.generatedEs2panda._CreateTSBooleanKeyword(global.context)) @@ -42,8 +41,9 @@ export class TSBooleanKeyword extends TypeNode { static updateTSBooleanKeyword(original?: TSBooleanKeyword): TSBooleanKeyword { return new TSBooleanKeyword(global.generatedEs2panda._UpdateTSBooleanKeyword(global.context, passNode(original))) } + protected readonly brandTSBooleanKeyword: undefined } -export function isTSBooleanKeyword(node: AstNode): node is TSBooleanKeyword { +export function isTSBooleanKeyword(node: object | undefined): node is TSBooleanKeyword { return node instanceof TSBooleanKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_BOOLEAN_KEYWORD)) { diff --git a/koala-wrapper/src/generated/peers/TSClassImplements.ts b/koala-wrapper/src/generated/peers/TSClassImplements.ts index ed621c260..a54e488a3 100644 --- a/koala-wrapper/src/generated/peers/TSClassImplements.ts +++ b/koala-wrapper/src/generated/peers/TSClassImplements.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" export class TSClassImplements extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_CLASS_IMPLEMENTS) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 139) super(pointer) - } static createTSClassImplements(expression?: Expression, typeParameters?: TSTypeParameterInstantiation): TSClassImplements { return new TSClassImplements(global.generatedEs2panda._CreateTSClassImplements(global.context, passNode(expression), passNode(typeParameters))) @@ -43,20 +42,18 @@ export class TSClassImplements extends Expression { static updateTSClassImplements(original?: TSClassImplements, expression?: Expression, typeParameters?: TSTypeParameterInstantiation): TSClassImplements { return new TSClassImplements(global.generatedEs2panda._UpdateTSClassImplements(global.context, passNode(original), passNode(expression), passNode(typeParameters))) } - static create1TSClassImplements(expression?: Expression): TSClassImplements { - return new TSClassImplements(global.generatedEs2panda._CreateTSClassImplements1(global.context, passNode(expression))) - } static update1TSClassImplements(original?: TSClassImplements, expression?: Expression): TSClassImplements { return new TSClassImplements(global.generatedEs2panda._UpdateTSClassImplements1(global.context, passNode(original), passNode(expression))) } get expr(): Expression | undefined { - return unpackNode(global.generatedEs2panda._TSClassImplementsExprConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSClassImplementsExpr(global.context, this.peer)) } get typeParameters(): TSTypeParameterInstantiation | undefined { return unpackNode(global.generatedEs2panda._TSClassImplementsTypeParametersConst(global.context, this.peer)) } + protected readonly brandTSClassImplements: undefined } -export function isTSClassImplements(node: AstNode): node is TSClassImplements { +export function isTSClassImplements(node: object | undefined): node is TSClassImplements { return node instanceof TSClassImplements } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CLASS_IMPLEMENTS)) { diff --git a/koala-wrapper/src/generated/peers/TSConditionalType.ts b/koala-wrapper/src/generated/peers/TSConditionalType.ts index 6b6ab8f22..eb99666f3 100644 --- a/koala-wrapper/src/generated/peers/TSConditionalType.ts +++ b/koala-wrapper/src/generated/peers/TSConditionalType.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" export class TSConditionalType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONDITIONAL_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 111) super(pointer) - } static createTSConditionalType(checkType?: Expression, extendsType?: Expression, trueType?: Expression, falseType?: Expression): TSConditionalType { return new TSConditionalType(global.generatedEs2panda._CreateTSConditionalType(global.context, passNode(checkType), passNode(extendsType), passNode(trueType), passNode(falseType))) @@ -55,8 +54,9 @@ export class TSConditionalType extends TypeNode { get falseType(): Expression | undefined { return unpackNode(global.generatedEs2panda._TSConditionalTypeFalseTypeConst(global.context, this.peer)) } + protected readonly brandTSConditionalType: undefined } -export function isTSConditionalType(node: AstNode): node is TSConditionalType { +export function isTSConditionalType(node: object | undefined): node is TSConditionalType { return node instanceof TSConditionalType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONDITIONAL_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSConstructorType.ts b/koala-wrapper/src/generated/peers/TSConstructorType.ts index be2be772c..16c019727 100644 --- a/koala-wrapper/src/generated/peers/TSConstructorType.ts +++ b/koala-wrapper/src/generated/peers/TSConstructorType.ts @@ -22,22 +22,21 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" import { FunctionSignature } from "./FunctionSignature" import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" -import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" export class TSConstructorType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 126) super(pointer) - } static createTSConstructorType(signature: FunctionSignature | undefined, abstract: boolean): TSConstructorType { return new TSConstructorType(global.generatedEs2panda._CreateTSConstructorType(global.context, passNode(signature), abstract)) @@ -46,19 +45,20 @@ export class TSConstructorType extends TypeNode { return new TSConstructorType(global.generatedEs2panda._UpdateTSConstructorType(global.context, passNode(original), passNode(signature), abstract)) } get typeParams(): TSTypeParameterDeclaration | undefined { - return unpackNode(global.generatedEs2panda._TSConstructorTypeTypeParamsConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSConstructorTypeTypeParams(global.context, this.peer)) } get params(): readonly Expression[] { return unpackNodeArray(global.generatedEs2panda._TSConstructorTypeParamsConst(global.context, this.peer)) } get returnType(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._TSConstructorTypeReturnTypeConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSConstructorTypeReturnType(global.context, this.peer)) } get abstract(): boolean { return global.generatedEs2panda._TSConstructorTypeAbstractConst(global.context, this.peer) } + protected readonly brandTSConstructorType: undefined } -export function isTSConstructorType(node: AstNode): node is TSConstructorType { +export function isTSConstructorType(node: object | undefined): node is TSConstructorType { return node instanceof TSConstructorType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSEnumDeclaration.ts b/koala-wrapper/src/generated/peers/TSEnumDeclaration.ts index 707334a8c..31edab47d 100644 --- a/koala-wrapper/src/generated/peers/TSEnumDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSEnumDeclaration.ts @@ -22,22 +22,21 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypedStatement } from "./TypedStatement" -import { Identifier } from "./Identifier" import { ClassDefinition } from "./ClassDefinition" import { Decorator } from "./Decorator" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { TypedStatement } from "./TypedStatement" export class TSEnumDeclaration extends TypedStatement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 87) super(pointer) - } static createTSEnumDeclaration(key: Identifier | undefined, members: readonly AstNode[], isConst: boolean, isStatic: boolean, isDeclare: boolean): TSEnumDeclaration { return new TSEnumDeclaration(global.generatedEs2panda._CreateTSEnumDeclaration(global.context, passNode(key), passNodeArray(members), members.length, isConst, isStatic, isDeclare)) @@ -46,7 +45,7 @@ export class TSEnumDeclaration extends TypedStatement { return new TSEnumDeclaration(global.generatedEs2panda._UpdateTSEnumDeclaration(global.context, passNode(original), passNode(key), passNodeArray(members), members.length, isConst, isStatic, isDeclare)) } get key(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._TSEnumDeclarationKeyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSEnumDeclarationKey(global.context, this.peer)) } get members(): readonly AstNode[] { return unpackNodeArray(global.generatedEs2panda._TSEnumDeclarationMembersConst(global.context, this.peer)) @@ -63,8 +62,8 @@ export class TSEnumDeclaration extends TypedStatement { return unpackNode(global.generatedEs2panda._TSEnumDeclarationBoxedClassConst(global.context, this.peer)) } /** @deprecated */ - setBoxedClass(wrapperClass: ClassDefinition): this { - global.generatedEs2panda._TSEnumDeclarationSetBoxedClass(global.context, this.peer, passNode(wrapperClass)) + setBoxedClass(boxedClass?: ClassDefinition): this { + global.generatedEs2panda._TSEnumDeclarationSetBoxedClass(global.context, this.peer, passNode(boxedClass)) return this } get isConst(): boolean { @@ -73,8 +72,45 @@ export class TSEnumDeclaration extends TypedStatement { get decorators(): readonly Decorator[] { return unpackNodeArray(global.generatedEs2panda._TSEnumDeclarationDecoratorsConst(global.context, this.peer)) } + /** @deprecated */ + emplaceDecorators(source?: Decorator): this { + global.generatedEs2panda._TSEnumDeclarationEmplaceDecorators(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearDecorators(): this { + global.generatedEs2panda._TSEnumDeclarationClearDecorators(global.context, this.peer) + return this + } + /** @deprecated */ + setValueDecorators(source: Decorator | undefined, index: number): this { + global.generatedEs2panda._TSEnumDeclarationSetValueDecorators(global.context, this.peer, passNode(source), index) + return this + } + get decoratorsForUpdate(): readonly Decorator[] { + return unpackNodeArray(global.generatedEs2panda._TSEnumDeclarationDecoratorsForUpdate(global.context, this.peer)) + } + /** @deprecated */ + emplaceMembers(source?: AstNode): this { + global.generatedEs2panda._TSEnumDeclarationEmplaceMembers(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearMembers(): this { + global.generatedEs2panda._TSEnumDeclarationClearMembers(global.context, this.peer) + return this + } + /** @deprecated */ + setValueMembers(source: AstNode | undefined, index: number): this { + global.generatedEs2panda._TSEnumDeclarationSetValueMembers(global.context, this.peer, passNode(source), index) + return this + } + get membersForUpdate(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._TSEnumDeclarationMembersForUpdate(global.context, this.peer)) + } + protected readonly brandTSEnumDeclaration: undefined } -export function isTSEnumDeclaration(node: AstNode): node is TSEnumDeclaration { +export function isTSEnumDeclaration(node: object | undefined): node is TSEnumDeclaration { return node instanceof TSEnumDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/TSEnumMember.ts b/koala-wrapper/src/generated/peers/TSEnumMember.ts index 862e08867..e351bd3aa 100644 --- a/koala-wrapper/src/generated/peers/TSEnumMember.ts +++ b/koala-wrapper/src/generated/peers/TSEnumMember.ts @@ -22,44 +22,44 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Statement } from "./Statement" export class TSEnumMember extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_MEMBER) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 88) super(pointer) - } - static createTSEnumMember(key?: Expression, init?: Expression): TSEnumMember { - return new TSEnumMember(global.generatedEs2panda._CreateTSEnumMember(global.context, passNode(key), passNode(init))) + static create1TSEnumMember(key: Expression | undefined, init: Expression | undefined, isGenerated: boolean): TSEnumMember { + return new TSEnumMember(global.generatedEs2panda._CreateTSEnumMember1(global.context, passNode(key), passNode(init), isGenerated)) } static updateTSEnumMember(original?: TSEnumMember, key?: Expression, init?: Expression): TSEnumMember { return new TSEnumMember(global.generatedEs2panda._UpdateTSEnumMember(global.context, passNode(original), passNode(key), passNode(init))) } - static create1TSEnumMember(key: Expression | undefined, init: Expression | undefined, isGenerated: boolean): TSEnumMember { - return new TSEnumMember(global.generatedEs2panda._CreateTSEnumMember1(global.context, passNode(key), passNode(init), isGenerated)) - } static update1TSEnumMember(original: TSEnumMember | undefined, key: Expression | undefined, init: Expression | undefined, isGenerated: boolean): TSEnumMember { return new TSEnumMember(global.generatedEs2panda._UpdateTSEnumMember1(global.context, passNode(original), passNode(key), passNode(init), isGenerated)) } get key(): Expression | undefined { - return unpackNode(global.generatedEs2panda._TSEnumMemberKeyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSEnumMemberKey(global.context, this.peer)) } get init(): Expression | undefined { - return unpackNode(global.generatedEs2panda._TSEnumMemberInitConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSEnumMemberInit(global.context, this.peer)) } get isGenerated(): boolean { return global.generatedEs2panda._TSEnumMemberIsGeneratedConst(global.context, this.peer) } + get name(): string { + return unpackString(global.generatedEs2panda._TSEnumMemberNameConst(global.context, this.peer)) + } + protected readonly brandTSEnumMember: undefined } -export function isTSEnumMember(node: AstNode): node is TSEnumMember { +export function isTSEnumMember(node: object | undefined): node is TSEnumMember { return node instanceof TSEnumMember } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_MEMBER)) { diff --git a/koala-wrapper/src/generated/peers/TSExternalModuleReference.ts b/koala-wrapper/src/generated/peers/TSExternalModuleReference.ts index 44303a741..cb53bac66 100644 --- a/koala-wrapper/src/generated/peers/TSExternalModuleReference.ts +++ b/koala-wrapper/src/generated/peers/TSExternalModuleReference.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class TSExternalModuleReference extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 89) super(pointer) - } static createTSExternalModuleReference(expr?: Expression): TSExternalModuleReference { return new TSExternalModuleReference(global.generatedEs2panda._CreateTSExternalModuleReference(global.context, passNode(expr))) @@ -45,8 +44,9 @@ export class TSExternalModuleReference extends Expression { get expr(): Expression | undefined { return unpackNode(global.generatedEs2panda._TSExternalModuleReferenceExprConst(global.context, this.peer)) } + protected readonly brandTSExternalModuleReference: undefined } -export function isTSExternalModuleReference(node: AstNode): node is TSExternalModuleReference { +export function isTSExternalModuleReference(node: object | undefined): node is TSExternalModuleReference { return node instanceof TSExternalModuleReference } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE)) { diff --git a/koala-wrapper/src/generated/peers/TSFunctionType.ts b/koala-wrapper/src/generated/peers/TSFunctionType.ts index 6f2df8cb4..8b8c8808b 100644 --- a/koala-wrapper/src/generated/peers/TSFunctionType.ts +++ b/koala-wrapper/src/generated/peers/TSFunctionType.ts @@ -22,22 +22,21 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" import { FunctionSignature } from "./FunctionSignature" import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" -import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" export class TSFunctionType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_FUNCTION_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 125) super(pointer) - } static createTSFunctionType(signature?: FunctionSignature): TSFunctionType { return new TSFunctionType(global.generatedEs2panda._CreateTSFunctionType(global.context, passNode(signature))) @@ -46,21 +45,22 @@ export class TSFunctionType extends TypeNode { return new TSFunctionType(global.generatedEs2panda._UpdateTSFunctionType(global.context, passNode(original), passNode(signature))) } get typeParams(): TSTypeParameterDeclaration | undefined { - return unpackNode(global.generatedEs2panda._TSFunctionTypeTypeParamsConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSFunctionTypeTypeParams(global.context, this.peer)) } get params(): readonly Expression[] { return unpackNodeArray(global.generatedEs2panda._TSFunctionTypeParamsConst(global.context, this.peer)) } get returnType(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._TSFunctionTypeReturnTypeConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSFunctionTypeReturnType(global.context, this.peer)) } /** @deprecated */ setNullable(nullable: boolean): this { global.generatedEs2panda._TSFunctionTypeSetNullable(global.context, this.peer, nullable) return this } + protected readonly brandTSFunctionType: undefined } -export function isTSFunctionType(node: AstNode): node is TSFunctionType { +export function isTSFunctionType(node: object | undefined): node is TSFunctionType { return node instanceof TSFunctionType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_FUNCTION_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSImportEqualsDeclaration.ts b/koala-wrapper/src/generated/peers/TSImportEqualsDeclaration.ts index 6f561a769..9a72448fc 100644 --- a/koala-wrapper/src/generated/peers/TSImportEqualsDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSImportEqualsDeclaration.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" -import { Identifier } from "./Identifier" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { Statement } from "./Statement" export class TSImportEqualsDeclaration extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 124) super(pointer) - } static createTSImportEqualsDeclaration(id: Identifier | undefined, moduleReference: Expression | undefined, isExport: boolean): TSImportEqualsDeclaration { return new TSImportEqualsDeclaration(global.generatedEs2panda._CreateTSImportEqualsDeclaration(global.context, passNode(id), passNode(moduleReference), isExport)) @@ -53,8 +52,9 @@ export class TSImportEqualsDeclaration extends Statement { get isExport(): boolean { return global.generatedEs2panda._TSImportEqualsDeclarationIsExportConst(global.context, this.peer) } + protected readonly brandTSImportEqualsDeclaration: undefined } -export function isTSImportEqualsDeclaration(node: AstNode): node is TSImportEqualsDeclaration { +export function isTSImportEqualsDeclaration(node: object | undefined): node is TSImportEqualsDeclaration { return node instanceof TSImportEqualsDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/TSImportType.ts b/koala-wrapper/src/generated/peers/TSImportType.ts index 7f57afe79..e8bcf4be3 100644 --- a/koala-wrapper/src/generated/peers/TSImportType.ts +++ b/koala-wrapper/src/generated/peers/TSImportType.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" +import { TypeNode } from "./TypeNode" export class TSImportType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 112) super(pointer) - } static createTSImportType(param: Expression | undefined, typeParams: TSTypeParameterInstantiation | undefined, qualifier: Expression | undefined, isTypeof: boolean): TSImportType { return new TSImportType(global.generatedEs2panda._CreateTSImportType(global.context, passNode(param), passNode(typeParams), passNode(qualifier), isTypeof)) @@ -56,8 +55,9 @@ export class TSImportType extends TypeNode { get isTypeof(): boolean { return global.generatedEs2panda._TSImportTypeIsTypeofConst(global.context, this.peer) } + protected readonly brandTSImportType: undefined } -export function isTSImportType(node: AstNode): node is TSImportType { +export function isTSImportType(node: object | undefined): node is TSImportType { return node instanceof TSImportType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSIndexSignature.ts b/koala-wrapper/src/generated/peers/TSIndexSignature.ts index 827218b25..db45b0e22 100644 --- a/koala-wrapper/src/generated/peers/TSIndexSignature.ts +++ b/koala-wrapper/src/generated/peers/TSIndexSignature.ts @@ -22,22 +22,21 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypedAstNode } from "./TypedAstNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaTSIndexSignatureKind } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" -import { Es2pandaTSIndexSignatureKind } from "./../Es2pandaEnums" +import { TypedAstNode } from "./TypedAstNode" export class TSIndexSignature extends TypedAstNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEX_SIGNATURE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 136) super(pointer) - } static createTSIndexSignature(param: Expression | undefined, typeAnnotation: TypeNode | undefined, readonly_arg: boolean): TSIndexSignature { return new TSIndexSignature(global.generatedEs2panda._CreateTSIndexSignature(global.context, passNode(param), passNode(typeAnnotation), readonly_arg)) @@ -54,8 +53,12 @@ export class TSIndexSignature extends TypedAstNode { get readonly(): boolean { return global.generatedEs2panda._TSIndexSignatureReadonlyConst(global.context, this.peer) } + get kind(): Es2pandaTSIndexSignatureKind { + return global.generatedEs2panda._TSIndexSignatureKindConst(global.context, this.peer) + } + protected readonly brandTSIndexSignature: undefined } -export function isTSIndexSignature(node: AstNode): node is TSIndexSignature { +export function isTSIndexSignature(node: object | undefined): node is TSIndexSignature { return node instanceof TSIndexSignature } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEX_SIGNATURE)) { diff --git a/koala-wrapper/src/generated/peers/TSIndexedAccessType.ts b/koala-wrapper/src/generated/peers/TSIndexedAccessType.ts index 7faab853a..1fdf82246 100644 --- a/koala-wrapper/src/generated/peers/TSIndexedAccessType.ts +++ b/koala-wrapper/src/generated/peers/TSIndexedAccessType.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSIndexedAccessType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 130) super(pointer) - } static createTSIndexedAccessType(objectType?: TypeNode, indexType?: TypeNode): TSIndexedAccessType { return new TSIndexedAccessType(global.generatedEs2panda._CreateTSIndexedAccessType(global.context, passNode(objectType), passNode(indexType))) @@ -48,8 +47,9 @@ export class TSIndexedAccessType extends TypeNode { get indexType(): TypeNode | undefined { return unpackNode(global.generatedEs2panda._TSIndexedAccessTypeIndexTypeConst(global.context, this.peer)) } + protected readonly brandTSIndexedAccessType: undefined } -export function isTSIndexedAccessType(node: AstNode): node is TSIndexedAccessType { +export function isTSIndexedAccessType(node: object | undefined): node is TSIndexedAccessType { return node instanceof TSIndexedAccessType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSInferType.ts b/koala-wrapper/src/generated/peers/TSInferType.ts index aea447732..399032853 100644 --- a/koala-wrapper/src/generated/peers/TSInferType.ts +++ b/koala-wrapper/src/generated/peers/TSInferType.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TSTypeParameter } from "./TSTypeParameter" +import { TypeNode } from "./TypeNode" export class TSInferType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INFER_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 110) super(pointer) - } static createTSInferType(typeParam?: TSTypeParameter): TSInferType { return new TSInferType(global.generatedEs2panda._CreateTSInferType(global.context, passNode(typeParam))) @@ -46,8 +45,9 @@ export class TSInferType extends TypeNode { get typeParam(): TSTypeParameter | undefined { return unpackNode(global.generatedEs2panda._TSInferTypeTypeParamConst(global.context, this.peer)) } + protected readonly brandTSInferType: undefined } -export function isTSInferType(node: AstNode): node is TSInferType { +export function isTSInferType(node: object | undefined): node is TSInferType { return node instanceof TSInferType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INFER_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSInterfaceBody.ts b/koala-wrapper/src/generated/peers/TSInterfaceBody.ts index fa9c4e80a..49dcffcaa 100644 --- a/koala-wrapper/src/generated/peers/TSInterfaceBody.ts +++ b/koala-wrapper/src/generated/peers/TSInterfaceBody.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class TSInterfaceBody extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_BODY) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 132) super(pointer) - } static createTSInterfaceBody(body: readonly AstNode[]): TSInterfaceBody { return new TSInterfaceBody(global.generatedEs2panda._CreateTSInterfaceBody(global.context, passNodeArray(body), body.length)) @@ -42,14 +41,12 @@ export class TSInterfaceBody extends Expression { static updateTSInterfaceBody(original: TSInterfaceBody | undefined, body: readonly AstNode[]): TSInterfaceBody { return new TSInterfaceBody(global.generatedEs2panda._UpdateTSInterfaceBody(global.context, passNode(original), passNodeArray(body), body.length)) } - get bodyPtr(): readonly AstNode[] { - return unpackNodeArray(global.generatedEs2panda._TSInterfaceBodyBodyPtr(global.context, this.peer)) - } get body(): readonly AstNode[] { - return unpackNodeArray(global.generatedEs2panda._TSInterfaceBodyBodyConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._TSInterfaceBodyBody(global.context, this.peer)) } + protected readonly brandTSInterfaceBody: undefined } -export function isTSInterfaceBody(node: AstNode): node is TSInterfaceBody { +export function isTSInterfaceBody(node: object | undefined): node is TSInterfaceBody { return node instanceof TSInterfaceBody } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_BODY)) { diff --git a/koala-wrapper/src/generated/peers/TSInterfaceDeclaration.ts b/koala-wrapper/src/generated/peers/TSInterfaceDeclaration.ts index a44a0c8e6..c40525486 100644 --- a/koala-wrapper/src/generated/peers/TSInterfaceDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSInterfaceDeclaration.ts @@ -22,26 +22,25 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypedStatement } from "./TypedStatement" -import { TSInterfaceHeritage } from "./TSInterfaceHeritage" -import { TSInterfaceBody } from "./TSInterfaceBody" +import { AnnotationUsage } from "./AnnotationUsage" +import { ClassDeclaration } from "./ClassDeclaration" +import { Decorator } from "./Decorator" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Identifier } from "./Identifier" +import { TSInterfaceBody } from "./TSInterfaceBody" +import { TSInterfaceHeritage } from "./TSInterfaceHeritage" import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" -import { Decorator } from "./Decorator" -import { ClassDeclaration } from "./ClassDeclaration" -import { AnnotationUsage } from "./AnnotationUsage" +import { TypedStatement } from "./TypedStatement" export class TSInterfaceDeclaration extends TypedStatement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 131) super(pointer) - } static createTSInterfaceDeclaration(_extends: readonly TSInterfaceHeritage[], id: AstNode | undefined, typeParams: AstNode | undefined, body: AstNode | undefined, isStatic: boolean, isExternal: boolean): TSInterfaceDeclaration { return new TSInterfaceDeclaration(global.generatedEs2panda._CreateTSInterfaceDeclaration(global.context, passNodeArray(_extends), _extends.length, passNode(id), passNode(typeParams), passNode(body), isStatic, isExternal)) @@ -50,10 +49,10 @@ export class TSInterfaceDeclaration extends TypedStatement { return new TSInterfaceDeclaration(global.generatedEs2panda._UpdateTSInterfaceDeclaration(global.context, passNode(original), passNodeArray(_extends), _extends.length, passNode(id), passNode(typeParams), passNode(body), isStatic, isExternal)) } get body(): TSInterfaceBody | undefined { - return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationBodyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationBody(global.context, this.peer)) } get id(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationIdConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationId(global.context, this.peer)) } get internalName(): string { return unpackString(global.generatedEs2panda._TSInterfaceDeclarationInternalNameConst(global.context, this.peer)) @@ -70,32 +69,97 @@ export class TSInterfaceDeclaration extends TypedStatement { return global.generatedEs2panda._TSInterfaceDeclarationIsFromExternalConst(global.context, this.peer) } get typeParams(): TSTypeParameterDeclaration | undefined { - return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationTypeParamsConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationTypeParams(global.context, this.peer)) } get extends(): readonly TSInterfaceHeritage[] { - return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationExtendsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationExtends(global.context, this.peer)) } - get decorators(): readonly Decorator[] { - return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationDecoratorsConst(global.context, this.peer)) + get extendsForUpdate(): readonly TSInterfaceHeritage[] { + return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationExtendsForUpdate(global.context, this.peer)) } - get getAnonClass(): ClassDeclaration | undefined { - return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationGetAnonClassConst(global.context, this.peer)) + get anonClass(): ClassDeclaration | undefined { + return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationGetAnonClass(global.context, this.peer)) } /** @deprecated */ - setAnonClass(anonClass: ClassDeclaration): this { + setAnonClass(anonClass?: ClassDeclaration): this { global.generatedEs2panda._TSInterfaceDeclarationSetAnonClass(global.context, this.peer, passNode(anonClass)) return this } + /** @deprecated */ + emplaceExtends(_extends?: TSInterfaceHeritage): this { + global.generatedEs2panda._TSInterfaceDeclarationEmplaceExtends(global.context, this.peer, passNode(_extends)) + return this + } + /** @deprecated */ + clearExtends(): this { + global.generatedEs2panda._TSInterfaceDeclarationClearExtends(global.context, this.peer) + return this + } + /** @deprecated */ + setValueExtends(_extends: TSInterfaceHeritage | undefined, index: number): this { + global.generatedEs2panda._TSInterfaceDeclarationSetValueExtends(global.context, this.peer, passNode(_extends), index) + return this + } + /** @deprecated */ + emplaceDecorators(decorators?: Decorator): this { + global.generatedEs2panda._TSInterfaceDeclarationEmplaceDecorators(global.context, this.peer, passNode(decorators)) + return this + } + /** @deprecated */ + clearDecorators(): this { + global.generatedEs2panda._TSInterfaceDeclarationClearDecorators(global.context, this.peer) + return this + } + /** @deprecated */ + setValueDecorators(decorators: Decorator | undefined, index: number): this { + global.generatedEs2panda._TSInterfaceDeclarationSetValueDecorators(global.context, this.peer, passNode(decorators), index) + return this + } + get decorators(): readonly Decorator[] { + return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationDecorators(global.context, this.peer)) + } + get decoratorsForUpdate(): readonly Decorator[] { + return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationDecoratorsForUpdate(global.context, this.peer)) + } + /** @deprecated */ + emplaceAnnotations(source?: AnnotationUsage): this { + global.generatedEs2panda._TSInterfaceDeclarationEmplaceAnnotations(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._TSInterfaceDeclarationClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + setValueAnnotations(source: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._TSInterfaceDeclarationSetValueAnnotations(global.context, this.peer, passNode(source), index) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationAnnotationsForUpdate(global.context, this.peer)) + } get annotations(): readonly AnnotationUsage[] { - return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationAnnotationsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TSInterfaceDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TSInterfaceDeclarationSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this } /** @deprecated */ - setAnnotations(annotations: readonly AnnotationUsage[]): this { - global.generatedEs2panda._TSInterfaceDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) + addAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._TSInterfaceDeclarationAddAnnotations(global.context, this.peer, passNode(annotations)) return this } + protected readonly brandTSInterfaceDeclaration: undefined } -export function isTSInterfaceDeclaration(node: AstNode): node is TSInterfaceDeclaration { +export function isTSInterfaceDeclaration(node: object | undefined): node is TSInterfaceDeclaration { return node instanceof TSInterfaceDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/TSInterfaceHeritage.ts b/koala-wrapper/src/generated/peers/TSInterfaceHeritage.ts index 4b22c6eaa..09933a9c6 100644 --- a/koala-wrapper/src/generated/peers/TSInterfaceHeritage.ts +++ b/koala-wrapper/src/generated/peers/TSInterfaceHeritage.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" export class TSInterfaceHeritage extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_HERITAGE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 133) super(pointer) - } static createTSInterfaceHeritage(expr?: TypeNode): TSInterfaceHeritage { return new TSInterfaceHeritage(global.generatedEs2panda._CreateTSInterfaceHeritage(global.context, passNode(expr))) @@ -44,10 +43,11 @@ export class TSInterfaceHeritage extends Expression { return new TSInterfaceHeritage(global.generatedEs2panda._UpdateTSInterfaceHeritage(global.context, passNode(original), passNode(expr))) } get expr(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._TSInterfaceHeritageExprConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSInterfaceHeritageExpr(global.context, this.peer)) } + protected readonly brandTSInterfaceHeritage: undefined } -export function isTSInterfaceHeritage(node: AstNode): node is TSInterfaceHeritage { +export function isTSInterfaceHeritage(node: object | undefined): node is TSInterfaceHeritage { return node instanceof TSInterfaceHeritage } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_HERITAGE)) { diff --git a/koala-wrapper/src/generated/peers/TSIntersectionType.ts b/koala-wrapper/src/generated/peers/TSIntersectionType.ts index 8f58edf65..69a951020 100644 --- a/koala-wrapper/src/generated/peers/TSIntersectionType.ts +++ b/koala-wrapper/src/generated/peers/TSIntersectionType.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" export class TSIntersectionType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERSECTION_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 113) super(pointer) - } static createTSIntersectionType(types: readonly Expression[]): TSIntersectionType { return new TSIntersectionType(global.generatedEs2panda._CreateTSIntersectionType(global.context, passNodeArray(types), types.length)) @@ -46,8 +45,9 @@ export class TSIntersectionType extends TypeNode { get types(): readonly Expression[] { return unpackNodeArray(global.generatedEs2panda._TSIntersectionTypeTypesConst(global.context, this.peer)) } + protected readonly brandTSIntersectionType: undefined } -export function isTSIntersectionType(node: AstNode): node is TSIntersectionType { +export function isTSIntersectionType(node: object | undefined): node is TSIntersectionType { return node instanceof TSIntersectionType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERSECTION_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSLiteralType.ts b/koala-wrapper/src/generated/peers/TSLiteralType.ts index a3ea5c9c1..56cd38fa5 100644 --- a/koala-wrapper/src/generated/peers/TSLiteralType.ts +++ b/koala-wrapper/src/generated/peers/TSLiteralType.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" export class TSLiteralType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 109) super(pointer) - } static createTSLiteralType(literal?: Expression): TSLiteralType { return new TSLiteralType(global.generatedEs2panda._CreateTSLiteralType(global.context, passNode(literal))) @@ -46,8 +45,9 @@ export class TSLiteralType extends TypeNode { get literal(): Expression | undefined { return unpackNode(global.generatedEs2panda._TSLiteralTypeLiteralConst(global.context, this.peer)) } + protected readonly brandTSLiteralType: undefined } -export function isTSLiteralType(node: AstNode): node is TSLiteralType { +export function isTSLiteralType(node: object | undefined): node is TSLiteralType { return node instanceof TSLiteralType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSMappedType.ts b/koala-wrapper/src/generated/peers/TSMappedType.ts index dc8344d7c..f2e0b41ed 100644 --- a/koala-wrapper/src/generated/peers/TSMappedType.ts +++ b/koala-wrapper/src/generated/peers/TSMappedType.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" -import { TSTypeParameter } from "./TSTypeParameter" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaMappedOption } from "./../Es2pandaEnums" +import { TSTypeParameter } from "./TSTypeParameter" +import { TypeNode } from "./TypeNode" export class TSMappedType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_MAPPED_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 114) super(pointer) - } static createTSMappedType(typeParameter: TSTypeParameter | undefined, typeAnnotation: TypeNode | undefined, readonly_arg: Es2pandaMappedOption, optional_arg: Es2pandaMappedOption): TSMappedType { return new TSMappedType(global.generatedEs2panda._CreateTSMappedType(global.context, passNode(typeParameter), passNode(typeAnnotation), readonly_arg, optional_arg)) @@ -56,8 +55,9 @@ export class TSMappedType extends TypeNode { get optional(): Es2pandaMappedOption { return global.generatedEs2panda._TSMappedTypeOptional(global.context, this.peer) } + protected readonly brandTSMappedType: undefined } -export function isTSMappedType(node: AstNode): node is TSMappedType { +export function isTSMappedType(node: object | undefined): node is TSMappedType { return node instanceof TSMappedType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MAPPED_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSMethodSignature.ts b/koala-wrapper/src/generated/peers/TSMethodSignature.ts index f0d05604b..7bb5e650e 100644 --- a/koala-wrapper/src/generated/peers/TSMethodSignature.ts +++ b/koala-wrapper/src/generated/peers/TSMethodSignature.ts @@ -22,22 +22,21 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { FunctionSignature } from "./FunctionSignature" import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" import { TypeNode } from "./TypeNode" export class TSMethodSignature extends AstNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_METHOD_SIGNATURE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 106) super(pointer) - } static createTSMethodSignature(key: Expression | undefined, signature: FunctionSignature | undefined, computed: boolean, optional_arg: boolean): TSMethodSignature { return new TSMethodSignature(global.generatedEs2panda._CreateTSMethodSignature(global.context, passNode(key), passNode(signature), computed, optional_arg)) @@ -46,16 +45,16 @@ export class TSMethodSignature extends AstNode { return new TSMethodSignature(global.generatedEs2panda._UpdateTSMethodSignature(global.context, passNode(original), passNode(key), passNode(signature), computed, optional_arg)) } get key(): Expression | undefined { - return unpackNode(global.generatedEs2panda._TSMethodSignatureKeyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSMethodSignatureKey(global.context, this.peer)) } get typeParams(): TSTypeParameterDeclaration | undefined { - return unpackNode(global.generatedEs2panda._TSMethodSignatureTypeParamsConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSMethodSignatureTypeParams(global.context, this.peer)) } get params(): readonly Expression[] { return unpackNodeArray(global.generatedEs2panda._TSMethodSignatureParamsConst(global.context, this.peer)) } get returnTypeAnnotation(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._TSMethodSignatureReturnTypeAnnotationConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSMethodSignatureReturnTypeAnnotation(global.context, this.peer)) } get computed(): boolean { return global.generatedEs2panda._TSMethodSignatureComputedConst(global.context, this.peer) @@ -63,8 +62,9 @@ export class TSMethodSignature extends AstNode { get optional(): boolean { return global.generatedEs2panda._TSMethodSignatureOptionalConst(global.context, this.peer) } + protected readonly brandTSMethodSignature: undefined } -export function isTSMethodSignature(node: AstNode): node is TSMethodSignature { +export function isTSMethodSignature(node: object | undefined): node is TSMethodSignature { return node instanceof TSMethodSignature } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_METHOD_SIGNATURE)) { diff --git a/koala-wrapper/src/generated/peers/TSModuleBlock.ts b/koala-wrapper/src/generated/peers/TSModuleBlock.ts index 57f8c51a3..f1e7edc91 100644 --- a/koala-wrapper/src/generated/peers/TSModuleBlock.ts +++ b/koala-wrapper/src/generated/peers/TSModuleBlock.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Statement } from "./Statement" export class TSModuleBlock extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_BLOCK) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 115) super(pointer) - } static createTSModuleBlock(statements: readonly Statement[]): TSModuleBlock { return new TSModuleBlock(global.generatedEs2panda._CreateTSModuleBlock(global.context, passNodeArray(statements), statements.length)) @@ -45,8 +44,9 @@ export class TSModuleBlock extends Statement { get statements(): readonly Statement[] { return unpackNodeArray(global.generatedEs2panda._TSModuleBlockStatementsConst(global.context, this.peer)) } + protected readonly brandTSModuleBlock: undefined } -export function isTSModuleBlock(node: AstNode): node is TSModuleBlock { +export function isTSModuleBlock(node: object | undefined): node is TSModuleBlock { return node instanceof TSModuleBlock } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_BLOCK)) { diff --git a/koala-wrapper/src/generated/peers/TSModuleDeclaration.ts b/koala-wrapper/src/generated/peers/TSModuleDeclaration.ts index f78854027..75ca87a17 100644 --- a/koala-wrapper/src/generated/peers/TSModuleDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSModuleDeclaration.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Statement } from "./Statement" export class TSModuleDeclaration extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 123) super(pointer) - } static createTSModuleDeclaration(name: Expression | undefined, body: Statement | undefined, declare: boolean, _global: boolean): TSModuleDeclaration { return new TSModuleDeclaration(global.generatedEs2panda._CreateTSModuleDeclaration(global.context, passNode(name), passNode(body), declare, _global)) @@ -55,8 +54,9 @@ export class TSModuleDeclaration extends Statement { get isExternalOrAmbient(): boolean { return global.generatedEs2panda._TSModuleDeclarationIsExternalOrAmbientConst(global.context, this.peer) } + protected readonly brandTSModuleDeclaration: undefined } -export function isTSModuleDeclaration(node: AstNode): node is TSModuleDeclaration { +export function isTSModuleDeclaration(node: object | undefined): node is TSModuleDeclaration { return node instanceof TSModuleDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/TSNamedTupleMember.ts b/koala-wrapper/src/generated/peers/TSNamedTupleMember.ts index 93085dfa1..637e206b3 100644 --- a/koala-wrapper/src/generated/peers/TSNamedTupleMember.ts +++ b/koala-wrapper/src/generated/peers/TSNamedTupleMember.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" export class TSNamedTupleMember extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 135) super(pointer) - } static createTSNamedTupleMember(label: Expression | undefined, elementType: TypeNode | undefined, optional_arg: boolean): TSNamedTupleMember { return new TSNamedTupleMember(global.generatedEs2panda._CreateTSNamedTupleMember(global.context, passNode(label), passNode(elementType), optional_arg)) @@ -47,13 +46,14 @@ export class TSNamedTupleMember extends TypeNode { return unpackNode(global.generatedEs2panda._TSNamedTupleMemberLabelConst(global.context, this.peer)) } get elementType(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._TSNamedTupleMemberElementTypeConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSNamedTupleMemberElementType(global.context, this.peer)) } get isOptional(): boolean { return global.generatedEs2panda._TSNamedTupleMemberIsOptionalConst(global.context, this.peer) } + protected readonly brandTSNamedTupleMember: undefined } -export function isTSNamedTupleMember(node: AstNode): node is TSNamedTupleMember { +export function isTSNamedTupleMember(node: object | undefined): node is TSNamedTupleMember { return node instanceof TSNamedTupleMember } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER)) { diff --git a/koala-wrapper/src/generated/peers/TSNeverKeyword.ts b/koala-wrapper/src/generated/peers/TSNeverKeyword.ts index 039db43d4..253a7bf10 100644 --- a/koala-wrapper/src/generated/peers/TSNeverKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSNeverKeyword.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSNeverKeyword extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_NEVER_KEYWORD) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 99) super(pointer) - } static createTSNeverKeyword(): TSNeverKeyword { return new TSNeverKeyword(global.generatedEs2panda._CreateTSNeverKeyword(global.context)) @@ -42,8 +41,9 @@ export class TSNeverKeyword extends TypeNode { static updateTSNeverKeyword(original?: TSNeverKeyword): TSNeverKeyword { return new TSNeverKeyword(global.generatedEs2panda._UpdateTSNeverKeyword(global.context, passNode(original))) } + protected readonly brandTSNeverKeyword: undefined } -export function isTSNeverKeyword(node: AstNode): node is TSNeverKeyword { +export function isTSNeverKeyword(node: object | undefined): node is TSNeverKeyword { return node instanceof TSNeverKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NEVER_KEYWORD)) { diff --git a/koala-wrapper/src/generated/peers/TSNonNullExpression.ts b/koala-wrapper/src/generated/peers/TSNonNullExpression.ts index 6ed71ba17..16b16b888 100644 --- a/koala-wrapper/src/generated/peers/TSNonNullExpression.ts +++ b/koala-wrapper/src/generated/peers/TSNonNullExpression.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class TSNonNullExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_NON_NULL_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 100) super(pointer) - } static createTSNonNullExpression(expr?: Expression): TSNonNullExpression { return new TSNonNullExpression(global.generatedEs2panda._CreateTSNonNullExpression(global.context, passNode(expr))) @@ -43,15 +42,16 @@ export class TSNonNullExpression extends Expression { return new TSNonNullExpression(global.generatedEs2panda._UpdateTSNonNullExpression(global.context, passNode(original), passNode(expr))) } get expr(): Expression | undefined { - return unpackNode(global.generatedEs2panda._TSNonNullExpressionExprConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSNonNullExpressionExpr(global.context, this.peer)) } /** @deprecated */ - setExpr(expr: Expression): this { + setExpr(expr?: Expression): this { global.generatedEs2panda._TSNonNullExpressionSetExpr(global.context, this.peer, passNode(expr)) return this } + protected readonly brandTSNonNullExpression: undefined } -export function isTSNonNullExpression(node: AstNode): node is TSNonNullExpression { +export function isTSNonNullExpression(node: object | undefined): node is TSNonNullExpression { return node instanceof TSNonNullExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NON_NULL_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/TSNullKeyword.ts b/koala-wrapper/src/generated/peers/TSNullKeyword.ts index 2abd26dfe..cb1bfebee 100644 --- a/koala-wrapper/src/generated/peers/TSNullKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSNullKeyword.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSNullKeyword extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_NULL_KEYWORD) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 101) super(pointer) - } static createTSNullKeyword(): TSNullKeyword { return new TSNullKeyword(global.generatedEs2panda._CreateTSNullKeyword(global.context)) @@ -42,8 +41,9 @@ export class TSNullKeyword extends TypeNode { static updateTSNullKeyword(original?: TSNullKeyword): TSNullKeyword { return new TSNullKeyword(global.generatedEs2panda._UpdateTSNullKeyword(global.context, passNode(original))) } + protected readonly brandTSNullKeyword: undefined } -export function isTSNullKeyword(node: AstNode): node is TSNullKeyword { +export function isTSNullKeyword(node: object | undefined): node is TSNullKeyword { return node instanceof TSNullKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NULL_KEYWORD)) { diff --git a/koala-wrapper/src/generated/peers/TSNumberKeyword.ts b/koala-wrapper/src/generated/peers/TSNumberKeyword.ts index 6620e5c98..0f826cf0b 100644 --- a/koala-wrapper/src/generated/peers/TSNumberKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSNumberKeyword.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSNumberKeyword extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_NUMBER_KEYWORD) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 90) super(pointer) - } static createTSNumberKeyword(): TSNumberKeyword { return new TSNumberKeyword(global.generatedEs2panda._CreateTSNumberKeyword(global.context)) @@ -42,8 +41,9 @@ export class TSNumberKeyword extends TypeNode { static updateTSNumberKeyword(original?: TSNumberKeyword): TSNumberKeyword { return new TSNumberKeyword(global.generatedEs2panda._UpdateTSNumberKeyword(global.context, passNode(original))) } + protected readonly brandTSNumberKeyword: undefined } -export function isTSNumberKeyword(node: AstNode): node is TSNumberKeyword { +export function isTSNumberKeyword(node: object | undefined): node is TSNumberKeyword { return node instanceof TSNumberKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NUMBER_KEYWORD)) { diff --git a/koala-wrapper/src/generated/peers/TSObjectKeyword.ts b/koala-wrapper/src/generated/peers/TSObjectKeyword.ts index 0a345482b..b14f250e3 100644 --- a/koala-wrapper/src/generated/peers/TSObjectKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSObjectKeyword.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSObjectKeyword extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_OBJECT_KEYWORD) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 97) super(pointer) - } static createTSObjectKeyword(): TSObjectKeyword { return new TSObjectKeyword(global.generatedEs2panda._CreateTSObjectKeyword(global.context)) @@ -42,8 +41,9 @@ export class TSObjectKeyword extends TypeNode { static updateTSObjectKeyword(original?: TSObjectKeyword): TSObjectKeyword { return new TSObjectKeyword(global.generatedEs2panda._UpdateTSObjectKeyword(global.context, passNode(original))) } + protected readonly brandTSObjectKeyword: undefined } -export function isTSObjectKeyword(node: AstNode): node is TSObjectKeyword { +export function isTSObjectKeyword(node: object | undefined): node is TSObjectKeyword { return node instanceof TSObjectKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_OBJECT_KEYWORD)) { diff --git a/koala-wrapper/src/generated/peers/TSParameterProperty.ts b/koala-wrapper/src/generated/peers/TSParameterProperty.ts index fc86857ec..6d73b9c44 100644 --- a/koala-wrapper/src/generated/peers/TSParameterProperty.ts +++ b/koala-wrapper/src/generated/peers/TSParameterProperty.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Expression } from "./Expression" import { Es2pandaAccessibilityOption } from "./../Es2pandaEnums" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" export class TSParameterProperty extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARAMETER_PROPERTY) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 122) super(pointer) - } static createTSParameterProperty(accessibility: Es2pandaAccessibilityOption, parameter: Expression | undefined, readonly_arg: boolean, isStatic: boolean, isExport: boolean): TSParameterProperty { return new TSParameterProperty(global.generatedEs2panda._CreateTSParameterProperty(global.context, accessibility, passNode(parameter), readonly_arg, isStatic, isExport)) @@ -58,8 +57,9 @@ export class TSParameterProperty extends Expression { get parameter(): Expression | undefined { return unpackNode(global.generatedEs2panda._TSParameterPropertyParameterConst(global.context, this.peer)) } + protected readonly brandTSParameterProperty: undefined } -export function isTSParameterProperty(node: AstNode): node is TSParameterProperty { +export function isTSParameterProperty(node: object | undefined): node is TSParameterProperty { return node instanceof TSParameterProperty } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARAMETER_PROPERTY)) { diff --git a/koala-wrapper/src/generated/peers/TSParenthesizedType.ts b/koala-wrapper/src/generated/peers/TSParenthesizedType.ts index 1171f2f04..69c1ce194 100644 --- a/koala-wrapper/src/generated/peers/TSParenthesizedType.ts +++ b/koala-wrapper/src/generated/peers/TSParenthesizedType.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" export class TSParenthesizedType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARENT_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 108) super(pointer) - } static createTSParenthesizedType(type?: TypeNode): TSParenthesizedType { return new TSParenthesizedType(global.generatedEs2panda._CreateTSParenthesizedType(global.context, passNode(type))) @@ -46,8 +45,9 @@ export class TSParenthesizedType extends TypeNode { get type(): Expression | undefined { return unpackNode(global.generatedEs2panda._TSParenthesizedTypeTypeConst(global.context, this.peer)) } + protected readonly brandTSParenthesizedType: undefined } -export function isTSParenthesizedType(node: AstNode): node is TSParenthesizedType { +export function isTSParenthesizedType(node: object | undefined): node is TSParenthesizedType { return node instanceof TSParenthesizedType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARENT_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSPropertySignature.ts b/koala-wrapper/src/generated/peers/TSPropertySignature.ts index cf57e262d..814f9b11c 100644 --- a/koala-wrapper/src/generated/peers/TSPropertySignature.ts +++ b/koala-wrapper/src/generated/peers/TSPropertySignature.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,13 +29,13 @@ import { } from "../../reexport-for-generated" import { AnnotatedAstNode } from "./AnnotatedAstNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" export class TSPropertySignature extends AnnotatedAstNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_PROPERTY_SIGNATURE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 105) super(pointer) - } static createTSPropertySignature(key: Expression | undefined, typeAnnotation: TypeNode | undefined, computed: boolean, optional_arg: boolean, readonly_arg: boolean): TSPropertySignature { return new TSPropertySignature(global.generatedEs2panda._CreateTSPropertySignature(global.context, passNode(key), passNode(typeAnnotation), computed, optional_arg, readonly_arg)) @@ -45,7 +44,7 @@ export class TSPropertySignature extends AnnotatedAstNode { return new TSPropertySignature(global.generatedEs2panda._UpdateTSPropertySignature(global.context, passNode(original), passNode(key), passNode(typeAnnotation), computed, optional_arg, readonly_arg)) } get key(): Expression | undefined { - return unpackNode(global.generatedEs2panda._TSPropertySignatureKeyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSPropertySignatureKey(global.context, this.peer)) } get computed(): boolean { return global.generatedEs2panda._TSPropertySignatureComputedConst(global.context, this.peer) @@ -60,12 +59,13 @@ export class TSPropertySignature extends AnnotatedAstNode { return unpackNode(global.generatedEs2panda._TSPropertySignatureTypeAnnotationConst(global.context, this.peer)) } /** @deprecated */ - setTsTypeAnnotation(typeAnnotation: TypeNode): this { + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { global.generatedEs2panda._TSPropertySignatureSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) return this } + protected readonly brandTSPropertySignature: undefined } -export function isTSPropertySignature(node: AstNode): node is TSPropertySignature { +export function isTSPropertySignature(node: object | undefined): node is TSPropertySignature { return node instanceof TSPropertySignature } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PROPERTY_SIGNATURE)) { diff --git a/koala-wrapper/src/generated/peers/TSQualifiedName.ts b/koala-wrapper/src/generated/peers/TSQualifiedName.ts index e9e4806ef..6406a6a95 100644 --- a/koala-wrapper/src/generated/peers/TSQualifiedName.ts +++ b/koala-wrapper/src/generated/peers/TSQualifiedName.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { Identifier } from "./Identifier" export class TSQualifiedName extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_QUALIFIED_NAME) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 129) super(pointer) - } static createTSQualifiedName(left?: Expression, right?: Identifier): TSQualifiedName { return new TSQualifiedName(global.generatedEs2panda._CreateTSQualifiedName(global.context, passNode(left), passNode(right))) @@ -44,13 +43,20 @@ export class TSQualifiedName extends Expression { return new TSQualifiedName(global.generatedEs2panda._UpdateTSQualifiedName(global.context, passNode(original), passNode(left), passNode(right))) } get left(): Expression | undefined { - return unpackNode(global.generatedEs2panda._TSQualifiedNameLeftConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSQualifiedNameLeft(global.context, this.peer)) } get right(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._TSQualifiedNameRightConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSQualifiedNameRight(global.context, this.peer)) } + get name(): string { + return unpackString(global.generatedEs2panda._TSQualifiedNameNameConst(global.context, this.peer)) + } + get resolveLeftMostQualifiedName(): TSQualifiedName | undefined { + return unpackNode(global.generatedEs2panda._TSQualifiedNameResolveLeftMostQualifiedName(global.context, this.peer)) + } + protected readonly brandTSQualifiedName: undefined } -export function isTSQualifiedName(node: AstNode): node is TSQualifiedName { +export function isTSQualifiedName(node: object | undefined): node is TSQualifiedName { return node instanceof TSQualifiedName } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_QUALIFIED_NAME)) { diff --git a/koala-wrapper/src/generated/peers/TSSignatureDeclaration.ts b/koala-wrapper/src/generated/peers/TSSignatureDeclaration.ts index 053a2dc3d..0fbb39ba8 100644 --- a/koala-wrapper/src/generated/peers/TSSignatureDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSSignatureDeclaration.ts @@ -22,24 +22,23 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypedAstNode } from "./TypedAstNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaTSSignatureDeclarationKind } from "./../Es2pandaEnums" +import { Expression } from "./Expression" import { FunctionSignature } from "./FunctionSignature" import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" -import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" +import { TypedAstNode } from "./TypedAstNode" export class TSSignatureDeclaration extends TypedAstNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_SIGNATURE_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 107) super(pointer) - } static createTSSignatureDeclaration(kind: Es2pandaTSSignatureDeclarationKind, signature?: FunctionSignature): TSSignatureDeclaration { return new TSSignatureDeclaration(global.generatedEs2panda._CreateTSSignatureDeclaration(global.context, kind, passNode(signature))) @@ -48,19 +47,20 @@ export class TSSignatureDeclaration extends TypedAstNode { return new TSSignatureDeclaration(global.generatedEs2panda._UpdateTSSignatureDeclaration(global.context, passNode(original), kind, passNode(signature))) } get typeParams(): TSTypeParameterDeclaration | undefined { - return unpackNode(global.generatedEs2panda._TSSignatureDeclarationTypeParamsConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSSignatureDeclarationTypeParams(global.context, this.peer)) } get params(): readonly Expression[] { return unpackNodeArray(global.generatedEs2panda._TSSignatureDeclarationParamsConst(global.context, this.peer)) } get returnTypeAnnotation(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._TSSignatureDeclarationReturnTypeAnnotationConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSSignatureDeclarationReturnTypeAnnotation(global.context, this.peer)) } get kind(): Es2pandaTSSignatureDeclarationKind { return global.generatedEs2panda._TSSignatureDeclarationKindConst(global.context, this.peer) } + protected readonly brandTSSignatureDeclaration: undefined } -export function isTSSignatureDeclaration(node: AstNode): node is TSSignatureDeclaration { +export function isTSSignatureDeclaration(node: object | undefined): node is TSSignatureDeclaration { return node instanceof TSSignatureDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_SIGNATURE_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/TSStringKeyword.ts b/koala-wrapper/src/generated/peers/TSStringKeyword.ts index 71fb6c6b1..4bfdabe8b 100644 --- a/koala-wrapper/src/generated/peers/TSStringKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSStringKeyword.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSStringKeyword extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_STRING_KEYWORD) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 92) super(pointer) - } static createTSStringKeyword(): TSStringKeyword { return new TSStringKeyword(global.generatedEs2panda._CreateTSStringKeyword(global.context)) @@ -42,8 +41,9 @@ export class TSStringKeyword extends TypeNode { static updateTSStringKeyword(original?: TSStringKeyword): TSStringKeyword { return new TSStringKeyword(global.generatedEs2panda._UpdateTSStringKeyword(global.context, passNode(original))) } + protected readonly brandTSStringKeyword: undefined } -export function isTSStringKeyword(node: AstNode): node is TSStringKeyword { +export function isTSStringKeyword(node: object | undefined): node is TSStringKeyword { return node instanceof TSStringKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_STRING_KEYWORD)) { diff --git a/koala-wrapper/src/generated/peers/TSThisType.ts b/koala-wrapper/src/generated/peers/TSThisType.ts index 7a87d159c..da6d0ac67 100644 --- a/koala-wrapper/src/generated/peers/TSThisType.ts +++ b/koala-wrapper/src/generated/peers/TSThisType.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSThisType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_THIS_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 116) super(pointer) - } static createTSThisType(): TSThisType { return new TSThisType(global.generatedEs2panda._CreateTSThisType(global.context)) @@ -42,8 +41,9 @@ export class TSThisType extends TypeNode { static updateTSThisType(original?: TSThisType): TSThisType { return new TSThisType(global.generatedEs2panda._UpdateTSThisType(global.context, passNode(original))) } + protected readonly brandTSThisType: undefined } -export function isTSThisType(node: AstNode): node is TSThisType { +export function isTSThisType(node: object | undefined): node is TSThisType { return node instanceof TSThisType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_THIS_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSTupleType.ts b/koala-wrapper/src/generated/peers/TSTupleType.ts index 8780f3e66..5299a607f 100644 --- a/koala-wrapper/src/generated/peers/TSTupleType.ts +++ b/koala-wrapper/src/generated/peers/TSTupleType.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSTupleType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TUPLE_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 134) super(pointer) - } static createTSTupleType(elementTypes: readonly TypeNode[]): TSTupleType { return new TSTupleType(global.generatedEs2panda._CreateTSTupleType(global.context, passNodeArray(elementTypes), elementTypes.length)) @@ -45,8 +44,9 @@ export class TSTupleType extends TypeNode { get elementType(): readonly TypeNode[] { return unpackNodeArray(global.generatedEs2panda._TSTupleTypeElementTypeConst(global.context, this.peer)) } + protected readonly brandTSTupleType: undefined } -export function isTSTupleType(node: AstNode): node is TSTupleType { +export function isTSTupleType(node: object | undefined): node is TSTupleType { return node instanceof TSTupleType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TUPLE_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSTypeAliasDeclaration.ts b/koala-wrapper/src/generated/peers/TSTypeAliasDeclaration.ts index 025686869..fae5cfa1a 100644 --- a/koala-wrapper/src/generated/peers/TSTypeAliasDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSTypeAliasDeclaration.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,16 +29,16 @@ import { } from "../../reexport-for-generated" import { AnnotatedStatement } from "./AnnotatedStatement" +import { AnnotationUsage } from "./AnnotationUsage" +import { Decorator } from "./Decorator" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Identifier } from "./Identifier" import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" import { TypeNode } from "./TypeNode" -import { Decorator } from "./Decorator" -import { AnnotationUsage } from "./AnnotationUsage" export class TSTypeAliasDeclaration extends AnnotatedStatement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 127) super(pointer) - } static createTSTypeAliasDeclaration(id?: Identifier, typeParams?: TSTypeParameterDeclaration, typeAnnotation?: TypeNode): TSTypeAliasDeclaration { return new TSTypeAliasDeclaration(global.generatedEs2panda._CreateTSTypeAliasDeclaration(global.context, passNode(id), passNode(typeParams), passNode(typeAnnotation))) @@ -47,14 +46,11 @@ export class TSTypeAliasDeclaration extends AnnotatedStatement { static updateTSTypeAliasDeclaration(original?: TSTypeAliasDeclaration, id?: Identifier, typeParams?: TSTypeParameterDeclaration, typeAnnotation?: TypeNode): TSTypeAliasDeclaration { return new TSTypeAliasDeclaration(global.generatedEs2panda._UpdateTSTypeAliasDeclaration(global.context, passNode(original), passNode(id), passNode(typeParams), passNode(typeAnnotation))) } - static create1TSTypeAliasDeclaration(id?: Identifier): TSTypeAliasDeclaration { - return new TSTypeAliasDeclaration(global.generatedEs2panda._CreateTSTypeAliasDeclaration1(global.context, passNode(id))) - } static update1TSTypeAliasDeclaration(original?: TSTypeAliasDeclaration, id?: Identifier): TSTypeAliasDeclaration { return new TSTypeAliasDeclaration(global.generatedEs2panda._UpdateTSTypeAliasDeclaration1(global.context, passNode(original), passNode(id))) } get id(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._TSTypeAliasDeclarationIdConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSTypeAliasDeclarationId(global.context, this.peer)) } get typeParams(): TSTypeParameterDeclaration | undefined { return unpackNode(global.generatedEs2panda._TSTypeAliasDeclarationTypeParamsConst(global.context, this.peer)) @@ -63,7 +59,7 @@ export class TSTypeAliasDeclaration extends AnnotatedStatement { return unpackNodeArray(global.generatedEs2panda._TSTypeAliasDeclarationDecoratorsConst(global.context, this.peer)) } /** @deprecated */ - setTypeParameters(typeParams: TSTypeParameterDeclaration): this { + setTypeParameters(typeParams?: TSTypeParameterDeclaration): this { global.generatedEs2panda._TSTypeAliasDeclarationSetTypeParameters(global.context, this.peer, passNode(typeParams)) return this } @@ -75,16 +71,58 @@ export class TSTypeAliasDeclaration extends AnnotatedStatement { global.generatedEs2panda._TSTypeAliasDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) return this } - get typeAnnotation(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._TSTypeAliasDeclarationTypeAnnotationConst(global.context, this.peer)) + /** @deprecated */ + emplaceAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._TSTypeAliasDeclarationEmplaceAnnotations(global.context, this.peer, passNode(annotations)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._TSTypeAliasDeclarationClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + setValueAnnotations(annotations: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._TSTypeAliasDeclarationSetValueAnnotations(global.context, this.peer, passNode(annotations), index) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._TSTypeAliasDeclarationAnnotationsForUpdate(global.context, this.peer)) + } + /** @deprecated */ + clearTypeParamterTypes(): this { + global.generatedEs2panda._TSTypeAliasDeclarationClearTypeParamterTypes(global.context, this.peer) + return this + } + /** @deprecated */ + emplaceDecorators(decorators?: Decorator): this { + global.generatedEs2panda._TSTypeAliasDeclarationEmplaceDecorators(global.context, this.peer, passNode(decorators)) + return this + } + /** @deprecated */ + clearDecorators(): this { + global.generatedEs2panda._TSTypeAliasDeclarationClearDecorators(global.context, this.peer) + return this + } + /** @deprecated */ + setValueDecorators(decorators: Decorator | undefined, index: number): this { + global.generatedEs2panda._TSTypeAliasDeclarationSetValueDecorators(global.context, this.peer, passNode(decorators), index) + return this + } + get decoratorsForUpdate(): readonly Decorator[] { + return unpackNodeArray(global.generatedEs2panda._TSTypeAliasDeclarationDecoratorsForUpdate(global.context, this.peer)) + } + get typeAnnotation(): TypeNode { + return unpackNonNullableNode(global.generatedEs2panda._TSTypeAliasDeclarationTypeAnnotationConst(global.context, this.peer)) } /** @deprecated */ - setTsTypeAnnotation(typeAnnotation: TypeNode): this { + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { global.generatedEs2panda._TSTypeAliasDeclarationSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) return this } + protected readonly brandTSTypeAliasDeclaration: undefined } -export function isTSTypeAliasDeclaration(node: AstNode): node is TSTypeAliasDeclaration { +export function isTSTypeAliasDeclaration(node: object | undefined): node is TSTypeAliasDeclaration { return node instanceof TSTypeAliasDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/TSTypeAssertion.ts b/koala-wrapper/src/generated/peers/TSTypeAssertion.ts index 05bb8207b..27a4c9e07 100644 --- a/koala-wrapper/src/generated/peers/TSTypeAssertion.ts +++ b/koala-wrapper/src/generated/peers/TSTypeAssertion.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,13 +29,13 @@ import { } from "../../reexport-for-generated" import { AnnotatedExpression } from "./AnnotatedExpression" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" export class TSTypeAssertion extends AnnotatedExpression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ASSERTION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 140) super(pointer) - } static createTSTypeAssertion(typeAnnotation?: TypeNode, expression?: Expression): TSTypeAssertion { return new TSTypeAssertion(global.generatedEs2panda._CreateTSTypeAssertion(global.context, passNode(typeAnnotation), passNode(expression))) @@ -44,19 +43,20 @@ export class TSTypeAssertion extends AnnotatedExpression { static updateTSTypeAssertion(original?: TSTypeAssertion, typeAnnotation?: TypeNode, expression?: Expression): TSTypeAssertion { return new TSTypeAssertion(global.generatedEs2panda._UpdateTSTypeAssertion(global.context, passNode(original), passNode(typeAnnotation), passNode(expression))) } - get getExpression(): Expression | undefined { + get expression(): Expression | undefined { return unpackNode(global.generatedEs2panda._TSTypeAssertionGetExpressionConst(global.context, this.peer)) } get typeAnnotation(): TypeNode | undefined { return unpackNode(global.generatedEs2panda._TSTypeAssertionTypeAnnotationConst(global.context, this.peer)) } /** @deprecated */ - setTsTypeAnnotation(typeAnnotation: TypeNode): this { + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { global.generatedEs2panda._TSTypeAssertionSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) return this } + protected readonly brandTSTypeAssertion: undefined } -export function isTSTypeAssertion(node: AstNode): node is TSTypeAssertion { +export function isTSTypeAssertion(node: object | undefined): node is TSTypeAssertion { return node instanceof TSTypeAssertion } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ASSERTION)) { diff --git a/koala-wrapper/src/generated/peers/TSTypeLiteral.ts b/koala-wrapper/src/generated/peers/TSTypeLiteral.ts index c6f790a26..3d129eff9 100644 --- a/koala-wrapper/src/generated/peers/TSTypeLiteral.ts +++ b/koala-wrapper/src/generated/peers/TSTypeLiteral.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSTypeLiteral extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 104) super(pointer) - } static createTSTypeLiteral(members: readonly AstNode[]): TSTypeLiteral { return new TSTypeLiteral(global.generatedEs2panda._CreateTSTypeLiteral(global.context, passNodeArray(members), members.length)) @@ -45,8 +44,9 @@ export class TSTypeLiteral extends TypeNode { get members(): readonly AstNode[] { return unpackNodeArray(global.generatedEs2panda._TSTypeLiteralMembersConst(global.context, this.peer)) } + protected readonly brandTSTypeLiteral: undefined } -export function isTSTypeLiteral(node: AstNode): node is TSTypeLiteral { +export function isTSTypeLiteral(node: object | undefined): node is TSTypeLiteral { return node instanceof TSTypeLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSTypeOperator.ts b/koala-wrapper/src/generated/peers/TSTypeOperator.ts index e082c1075..9a53027d0 100644 --- a/koala-wrapper/src/generated/peers/TSTypeOperator.ts +++ b/koala-wrapper/src/generated/peers/TSTypeOperator.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaTSOperatorType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" export class TSTypeOperator extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_OPERATOR) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 117) super(pointer) - } static createTSTypeOperator(type: TypeNode | undefined, operatorType: Es2pandaTSOperatorType): TSTypeOperator { return new TSTypeOperator(global.generatedEs2panda._CreateTSTypeOperator(global.context, passNode(type), operatorType)) @@ -55,8 +54,9 @@ export class TSTypeOperator extends TypeNode { get isUnique(): boolean { return global.generatedEs2panda._TSTypeOperatorIsUniqueConst(global.context, this.peer) } + protected readonly brandTSTypeOperator: undefined } -export function isTSTypeOperator(node: AstNode): node is TSTypeOperator { +export function isTSTypeOperator(node: object | undefined): node is TSTypeOperator { return node instanceof TSTypeOperator } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_OPERATOR)) { diff --git a/koala-wrapper/src/generated/peers/TSTypeParameter.ts b/koala-wrapper/src/generated/peers/TSTypeParameter.ts index 7451ad017..4701a74d9 100644 --- a/koala-wrapper/src/generated/peers/TSTypeParameter.ts +++ b/koala-wrapper/src/generated/peers/TSTypeParameter.ts @@ -22,44 +22,43 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaModifierFlags } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { Identifier } from "./Identifier" import { TypeNode } from "./TypeNode" -import { Es2pandaModifierFlags } from "./../Es2pandaEnums" -import { AnnotationUsage } from "./AnnotationUsage" export class TSTypeParameter extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 118) super(pointer) - } static createTSTypeParameter(name?: Identifier, constraint?: TypeNode, defaultType?: TypeNode): TSTypeParameter { return new TSTypeParameter(global.generatedEs2panda._CreateTSTypeParameter(global.context, passNode(name), passNode(constraint), passNode(defaultType))) } - static updateTSTypeParameter(original?: TSTypeParameter, name?: Identifier, constraint?: TypeNode, defaultType?: TypeNode): TSTypeParameter { - return new TSTypeParameter(global.generatedEs2panda._UpdateTSTypeParameter(global.context, passNode(original), passNode(name), passNode(constraint), passNode(defaultType))) - } static create1TSTypeParameter(name: Identifier | undefined, constraint: TypeNode | undefined, defaultType: TypeNode | undefined, flags: Es2pandaModifierFlags): TSTypeParameter { return new TSTypeParameter(global.generatedEs2panda._CreateTSTypeParameter1(global.context, passNode(name), passNode(constraint), passNode(defaultType), flags)) } + static updateTSTypeParameter(original?: TSTypeParameter, name?: Identifier, constraint?: TypeNode, defaultType?: TypeNode): TSTypeParameter { + return new TSTypeParameter(global.generatedEs2panda._UpdateTSTypeParameter(global.context, passNode(original), passNode(name), passNode(constraint), passNode(defaultType))) + } static update1TSTypeParameter(original: TSTypeParameter | undefined, name: Identifier | undefined, constraint: TypeNode | undefined, defaultType: TypeNode | undefined, flags: Es2pandaModifierFlags): TSTypeParameter { return new TSTypeParameter(global.generatedEs2panda._UpdateTSTypeParameter1(global.context, passNode(original), passNode(name), passNode(constraint), passNode(defaultType), flags)) } get name(): Identifier | undefined { - return unpackNode(global.generatedEs2panda._TSTypeParameterNameConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSTypeParameterName(global.context, this.peer)) } get constraint(): TypeNode | undefined { - return unpackNode(global.generatedEs2panda._TSTypeParameterConstraintConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._TSTypeParameterConstraint(global.context, this.peer)) } /** @deprecated */ - setConstraint(constraint: TypeNode): this { + setConstraint(constraint?: TypeNode): this { global.generatedEs2panda._TSTypeParameterSetConstraint(global.context, this.peer, passNode(constraint)) return this } @@ -67,20 +66,49 @@ export class TSTypeParameter extends Expression { return unpackNode(global.generatedEs2panda._TSTypeParameterDefaultTypeConst(global.context, this.peer)) } /** @deprecated */ - setDefaultType(defaultType: TypeNode): this { + setDefaultType(defaultType?: TypeNode): this { global.generatedEs2panda._TSTypeParameterSetDefaultType(global.context, this.peer, passNode(defaultType)) return this } + /** @deprecated */ + emplaceAnnotations(source?: AnnotationUsage): this { + global.generatedEs2panda._TSTypeParameterEmplaceAnnotations(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._TSTypeParameterClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + setValueAnnotations(source: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._TSTypeParameterSetValueAnnotations(global.context, this.peer, passNode(source), index) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._TSTypeParameterAnnotationsForUpdate(global.context, this.peer)) + } get annotations(): readonly AnnotationUsage[] { - return unpackNodeArray(global.generatedEs2panda._TSTypeParameterAnnotationsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._TSTypeParameterAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TSTypeParameterSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TSTypeParameterSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this } /** @deprecated */ - setAnnotations(annotations: readonly AnnotationUsage[]): this { - global.generatedEs2panda._TSTypeParameterSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) + addAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._TSTypeParameterAddAnnotations(global.context, this.peer, passNode(annotations)) return this } + protected readonly brandTSTypeParameter: undefined } -export function isTSTypeParameter(node: AstNode): node is TSTypeParameter { +export function isTSTypeParameter(node: object | undefined): node is TSTypeParameter { return node instanceof TSTypeParameter } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER)) { diff --git a/koala-wrapper/src/generated/peers/TSTypeParameterDeclaration.ts b/koala-wrapper/src/generated/peers/TSTypeParameterDeclaration.ts index 61f91a8b6..875f22f33 100644 --- a/koala-wrapper/src/generated/peers/TSTypeParameterDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSTypeParameterDeclaration.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TSTypeParameter } from "./TSTypeParameter" export class TSTypeParameterDeclaration extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 119) super(pointer) - } static createTSTypeParameterDeclaration(params: readonly TSTypeParameter[], requiredParams: number): TSTypeParameterDeclaration { return new TSTypeParameterDeclaration(global.generatedEs2panda._CreateTSTypeParameterDeclaration(global.context, passNodeArray(params), params.length, requiredParams)) @@ -47,15 +46,21 @@ export class TSTypeParameterDeclaration extends Expression { return unpackNodeArray(global.generatedEs2panda._TSTypeParameterDeclarationParamsConst(global.context, this.peer)) } /** @deprecated */ - addParam(param: TSTypeParameter): this { + addParam(param?: TSTypeParameter): this { global.generatedEs2panda._TSTypeParameterDeclarationAddParam(global.context, this.peer, passNode(param)) return this } + /** @deprecated */ + setValueParams(source: TSTypeParameter | undefined, index: number): this { + global.generatedEs2panda._TSTypeParameterDeclarationSetValueParams(global.context, this.peer, passNode(source), index) + return this + } get requiredParams(): number { return global.generatedEs2panda._TSTypeParameterDeclarationRequiredParamsConst(global.context, this.peer) } + protected readonly brandTSTypeParameterDeclaration: undefined } -export function isTSTypeParameterDeclaration(node: AstNode): node is TSTypeParameterDeclaration { +export function isTSTypeParameterDeclaration(node: object | undefined): node is TSTypeParameterDeclaration { return node instanceof TSTypeParameterDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/TSTypeParameterInstantiation.ts b/koala-wrapper/src/generated/peers/TSTypeParameterInstantiation.ts index 8c30a3aa0..9eaa629ca 100644 --- a/koala-wrapper/src/generated/peers/TSTypeParameterInstantiation.ts +++ b/koala-wrapper/src/generated/peers/TSTypeParameterInstantiation.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TypeNode } from "./TypeNode" export class TSTypeParameterInstantiation extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 120) super(pointer) - } static createTSTypeParameterInstantiation(params: readonly TypeNode[]): TSTypeParameterInstantiation { return new TSTypeParameterInstantiation(global.generatedEs2panda._CreateTSTypeParameterInstantiation(global.context, passNodeArray(params), params.length)) @@ -46,8 +45,9 @@ export class TSTypeParameterInstantiation extends Expression { get params(): readonly TypeNode[] { return unpackNodeArray(global.generatedEs2panda._TSTypeParameterInstantiationParamsConst(global.context, this.peer)) } + protected readonly brandTSTypeParameterInstantiation: undefined } -export function isTSTypeParameterInstantiation(node: AstNode): node is TSTypeParameterInstantiation { +export function isTSTypeParameterInstantiation(node: object | undefined): node is TSTypeParameterInstantiation { return node instanceof TSTypeParameterInstantiation } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION)) { diff --git a/koala-wrapper/src/generated/peers/TSTypePredicate.ts b/koala-wrapper/src/generated/peers/TSTypePredicate.ts index 27ce97a73..4f111617c 100644 --- a/koala-wrapper/src/generated/peers/TSTypePredicate.ts +++ b/koala-wrapper/src/generated/peers/TSTypePredicate.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" export class TSTypePredicate extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PREDICATE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 121) super(pointer) - } static createTSTypePredicate(parameterName: Expression | undefined, typeAnnotation: TypeNode | undefined, asserts: boolean): TSTypePredicate { return new TSTypePredicate(global.generatedEs2panda._CreateTSTypePredicate(global.context, passNode(parameterName), passNode(typeAnnotation), asserts)) @@ -52,8 +51,9 @@ export class TSTypePredicate extends TypeNode { get asserts(): boolean { return global.generatedEs2panda._TSTypePredicateAssertsConst(global.context, this.peer) } + protected readonly brandTSTypePredicate: undefined } -export function isTSTypePredicate(node: AstNode): node is TSTypePredicate { +export function isTSTypePredicate(node: object | undefined): node is TSTypePredicate { return node instanceof TSTypePredicate } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PREDICATE)) { diff --git a/koala-wrapper/src/generated/peers/TSTypeQuery.ts b/koala-wrapper/src/generated/peers/TSTypeQuery.ts index 603124f7f..28d81813a 100644 --- a/koala-wrapper/src/generated/peers/TSTypeQuery.ts +++ b/koala-wrapper/src/generated/peers/TSTypeQuery.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" export class TSTypeQuery extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_QUERY) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 137) super(pointer) - } static createTSTypeQuery(exprName?: Expression): TSTypeQuery { return new TSTypeQuery(global.generatedEs2panda._CreateTSTypeQuery(global.context, passNode(exprName))) @@ -46,8 +45,9 @@ export class TSTypeQuery extends TypeNode { get exprName(): Expression | undefined { return unpackNode(global.generatedEs2panda._TSTypeQueryExprNameConst(global.context, this.peer)) } + protected readonly brandTSTypeQuery: undefined } -export function isTSTypeQuery(node: AstNode): node is TSTypeQuery { +export function isTSTypeQuery(node: object | undefined): node is TSTypeQuery { return node instanceof TSTypeQuery } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_QUERY)) { diff --git a/koala-wrapper/src/generated/peers/TSTypeReference.ts b/koala-wrapper/src/generated/peers/TSTypeReference.ts index f70f708c7..7b876f4f3 100644 --- a/koala-wrapper/src/generated/peers/TSTypeReference.ts +++ b/koala-wrapper/src/generated/peers/TSTypeReference.ts @@ -22,22 +22,21 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypeNode } from "./TypeNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" -import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" import { Identifier } from "./Identifier" +import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" +import { TypeNode } from "./TypeNode" export class TSTypeReference extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_REFERENCE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 128) super(pointer) - } static createTSTypeReference(typeName?: Expression, typeParams?: TSTypeParameterInstantiation): TSTypeReference { return new TSTypeReference(global.generatedEs2panda._CreateTSTypeReference(global.context, passNode(typeName), passNode(typeParams))) @@ -51,8 +50,12 @@ export class TSTypeReference extends TypeNode { get typeName(): Expression | undefined { return unpackNode(global.generatedEs2panda._TSTypeReferenceTypeNameConst(global.context, this.peer)) } + get baseName(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._TSTypeReferenceBaseNameConst(global.context, this.peer)) + } + protected readonly brandTSTypeReference: undefined } -export function isTSTypeReference(node: AstNode): node is TSTypeReference { +export function isTSTypeReference(node: object | undefined): node is TSTypeReference { return node instanceof TSTypeReference } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_REFERENCE)) { diff --git a/koala-wrapper/src/generated/peers/TSUndefinedKeyword.ts b/koala-wrapper/src/generated/peers/TSUndefinedKeyword.ts index c7809258a..e560d9e83 100644 --- a/koala-wrapper/src/generated/peers/TSUndefinedKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSUndefinedKeyword.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSUndefinedKeyword extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNDEFINED_KEYWORD) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 95) super(pointer) - } static createTSUndefinedKeyword(): TSUndefinedKeyword { return new TSUndefinedKeyword(global.generatedEs2panda._CreateTSUndefinedKeyword(global.context)) @@ -42,8 +41,9 @@ export class TSUndefinedKeyword extends TypeNode { static updateTSUndefinedKeyword(original?: TSUndefinedKeyword): TSUndefinedKeyword { return new TSUndefinedKeyword(global.generatedEs2panda._UpdateTSUndefinedKeyword(global.context, passNode(original))) } + protected readonly brandTSUndefinedKeyword: undefined } -export function isTSUndefinedKeyword(node: AstNode): node is TSUndefinedKeyword { +export function isTSUndefinedKeyword(node: object | undefined): node is TSUndefinedKeyword { return node instanceof TSUndefinedKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNDEFINED_KEYWORD)) { diff --git a/koala-wrapper/src/generated/peers/TSUnionType.ts b/koala-wrapper/src/generated/peers/TSUnionType.ts index df5479501..868691982 100644 --- a/koala-wrapper/src/generated/peers/TSUnionType.ts +++ b/koala-wrapper/src/generated/peers/TSUnionType.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSUnionType extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNION_TYPE) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 103) super(pointer) - } static createTSUnionType(types: readonly TypeNode[]): TSUnionType { return new TSUnionType(global.generatedEs2panda._CreateTSUnionType(global.context, passNodeArray(types), types.length)) @@ -45,8 +44,9 @@ export class TSUnionType extends TypeNode { get types(): readonly TypeNode[] { return unpackNodeArray(global.generatedEs2panda._TSUnionTypeTypesConst(global.context, this.peer)) } + protected readonly brandTSUnionType: undefined } -export function isTSUnionType(node: AstNode): node is TSUnionType { +export function isTSUnionType(node: object | undefined): node is TSUnionType { return node instanceof TSUnionType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNION_TYPE)) { diff --git a/koala-wrapper/src/generated/peers/TSUnknownKeyword.ts b/koala-wrapper/src/generated/peers/TSUnknownKeyword.ts index 0eb71b7d2..49d14b720 100644 --- a/koala-wrapper/src/generated/peers/TSUnknownKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSUnknownKeyword.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSUnknownKeyword extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNKNOWN_KEYWORD) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 96) super(pointer) - } static createTSUnknownKeyword(): TSUnknownKeyword { return new TSUnknownKeyword(global.generatedEs2panda._CreateTSUnknownKeyword(global.context)) @@ -42,8 +41,9 @@ export class TSUnknownKeyword extends TypeNode { static updateTSUnknownKeyword(original?: TSUnknownKeyword): TSUnknownKeyword { return new TSUnknownKeyword(global.generatedEs2panda._UpdateTSUnknownKeyword(global.context, passNode(original))) } + protected readonly brandTSUnknownKeyword: undefined } -export function isTSUnknownKeyword(node: AstNode): node is TSUnknownKeyword { +export function isTSUnknownKeyword(node: object | undefined): node is TSUnknownKeyword { return node instanceof TSUnknownKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNKNOWN_KEYWORD)) { diff --git a/koala-wrapper/src/generated/peers/TSVoidKeyword.ts b/koala-wrapper/src/generated/peers/TSVoidKeyword.ts index 1cfe4091d..8d4d74944 100644 --- a/koala-wrapper/src/generated/peers/TSVoidKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSVoidKeyword.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { TypeNode } from "./TypeNode" export class TSVoidKeyword extends TypeNode { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_VOID_KEYWORD) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 94) super(pointer) - } static createTSVoidKeyword(): TSVoidKeyword { return new TSVoidKeyword(global.generatedEs2panda._CreateTSVoidKeyword(global.context)) @@ -42,8 +41,9 @@ export class TSVoidKeyword extends TypeNode { static updateTSVoidKeyword(original?: TSVoidKeyword): TSVoidKeyword { return new TSVoidKeyword(global.generatedEs2panda._UpdateTSVoidKeyword(global.context, passNode(original))) } + protected readonly brandTSVoidKeyword: undefined } -export function isTSVoidKeyword(node: AstNode): node is TSVoidKeyword { +export function isTSVoidKeyword(node: object | undefined): node is TSVoidKeyword { return node instanceof TSVoidKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_VOID_KEYWORD)) { diff --git a/koala-wrapper/src/generated/peers/TaggedTemplateExpression.ts b/koala-wrapper/src/generated/peers/TaggedTemplateExpression.ts index 1f1a7dcc1..8313f0833 100644 --- a/koala-wrapper/src/generated/peers/TaggedTemplateExpression.ts +++ b/koala-wrapper/src/generated/peers/TaggedTemplateExpression.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" -import { TemplateLiteral } from "./TemplateLiteral" import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" +import { TemplateLiteral } from "./TemplateLiteral" export class TaggedTemplateExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 141) super(pointer) - } static createTaggedTemplateExpression(tag?: Expression, quasi?: TemplateLiteral, typeParams?: TSTypeParameterInstantiation): TaggedTemplateExpression { return new TaggedTemplateExpression(global.generatedEs2panda._CreateTaggedTemplateExpression(global.context, passNode(tag), passNode(quasi), passNode(typeParams))) @@ -53,8 +52,9 @@ export class TaggedTemplateExpression extends Expression { get typeParams(): TSTypeParameterInstantiation | undefined { return unpackNode(global.generatedEs2panda._TaggedTemplateExpressionTypeParamsConst(global.context, this.peer)) } + protected readonly brandTaggedTemplateExpression: undefined } -export function isTaggedTemplateExpression(node: AstNode): node is TaggedTemplateExpression { +export function isTaggedTemplateExpression(node: object | undefined): node is TaggedTemplateExpression { return node instanceof TaggedTemplateExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/TemplateElement.ts b/koala-wrapper/src/generated/peers/TemplateElement.ts index 32602cccc..1dbb05b8e 100644 --- a/koala-wrapper/src/generated/peers/TemplateElement.ts +++ b/koala-wrapper/src/generated/peers/TemplateElement.ts @@ -22,29 +22,25 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class TemplateElement extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_ELEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 142) super(pointer) - } - static createTemplateElement(): TemplateElement { - return new TemplateElement(global.generatedEs2panda._CreateTemplateElement(global.context)) + static create1TemplateElement(raw: string, cooked: string): TemplateElement { + return new TemplateElement(global.generatedEs2panda._CreateTemplateElement1(global.context, raw, cooked)) } static updateTemplateElement(original?: TemplateElement): TemplateElement { return new TemplateElement(global.generatedEs2panda._UpdateTemplateElement(global.context, passNode(original))) } - static create1TemplateElement(raw: string, cooked: string): TemplateElement { - return new TemplateElement(global.generatedEs2panda._CreateTemplateElement1(global.context, raw, cooked)) - } static update1TemplateElement(original: TemplateElement | undefined, raw: string, cooked: string): TemplateElement { return new TemplateElement(global.generatedEs2panda._UpdateTemplateElement1(global.context, passNode(original), raw, cooked)) } @@ -54,8 +50,9 @@ export class TemplateElement extends Expression { get cooked(): string { return unpackString(global.generatedEs2panda._TemplateElementCookedConst(global.context, this.peer)) } + protected readonly brandTemplateElement: undefined } -export function isTemplateElement(node: AstNode): node is TemplateElement { +export function isTemplateElement(node: object | undefined): node is TemplateElement { return node instanceof TemplateElement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_ELEMENT)) { diff --git a/koala-wrapper/src/generated/peers/TemplateLiteral.ts b/koala-wrapper/src/generated/peers/TemplateLiteral.ts index b51bb606f..f4dd7437b 100644 --- a/koala-wrapper/src/generated/peers/TemplateLiteral.ts +++ b/koala-wrapper/src/generated/peers/TemplateLiteral.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" import { TemplateElement } from "./TemplateElement" export class TemplateLiteral extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_LITERAL) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 143) super(pointer) - } static createTemplateLiteral(quasis: readonly TemplateElement[], expressions: readonly Expression[], multilineString: string): TemplateLiteral { return new TemplateLiteral(global.generatedEs2panda._CreateTemplateLiteral(global.context, passNodeArray(quasis), quasis.length, passNodeArray(expressions), expressions.length, multilineString)) @@ -50,10 +49,11 @@ export class TemplateLiteral extends Expression { return unpackNodeArray(global.generatedEs2panda._TemplateLiteralExpressionsConst(global.context, this.peer)) } get multilineString(): string { - return unpackString(global.generatedEs2panda._TemplateLiteralGetMultilineStringConst(global.context, this.peer)); + return unpackString(global.generatedEs2panda._TemplateLiteralGetMultilineStringConst(global.context, this.peer)) } + protected readonly brandTemplateLiteral: undefined } -export function isTemplateLiteral(node: AstNode): node is TemplateLiteral { +export function isTemplateLiteral(node: object | undefined): node is TemplateLiteral { return node instanceof TemplateLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_LITERAL)) { diff --git a/koala-wrapper/src/generated/peers/ThisExpression.ts b/koala-wrapper/src/generated/peers/ThisExpression.ts index c16668c4f..f3cbdb099 100644 --- a/koala-wrapper/src/generated/peers/ThisExpression.ts +++ b/koala-wrapper/src/generated/peers/ThisExpression.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class ThisExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_THIS_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 144) super(pointer) - } static createThisExpression(): ThisExpression { return new ThisExpression(global.generatedEs2panda._CreateThisExpression(global.context)) @@ -42,8 +41,9 @@ export class ThisExpression extends Expression { static updateThisExpression(original?: ThisExpression): ThisExpression { return new ThisExpression(global.generatedEs2panda._UpdateThisExpression(global.context, passNode(original))) } + protected readonly brandThisExpression: undefined } -export function isThisExpression(node: AstNode): node is ThisExpression { +export function isThisExpression(node: object | undefined): node is ThisExpression { return node instanceof ThisExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_THIS_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/ThrowStatement.ts b/koala-wrapper/src/generated/peers/ThrowStatement.ts index e4f40a1fb..67bfd843b 100644 --- a/koala-wrapper/src/generated/peers/ThrowStatement.ts +++ b/koala-wrapper/src/generated/peers/ThrowStatement.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { Statement } from "./Statement" export class ThrowStatement extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_THROW_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 146) super(pointer) - } static createThrowStatement(argument?: Expression): ThrowStatement { return new ThrowStatement(global.generatedEs2panda._CreateThrowStatement(global.context, passNode(argument))) @@ -46,8 +45,9 @@ export class ThrowStatement extends Statement { get argument(): Expression | undefined { return unpackNode(global.generatedEs2panda._ThrowStatementArgumentConst(global.context, this.peer)) } + protected readonly brandThrowStatement: undefined } -export function isThrowStatement(node: AstNode): node is ThrowStatement { +export function isThrowStatement(node: object | undefined): node is ThrowStatement { return node instanceof ThrowStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_THROW_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/TryStatement.ts b/koala-wrapper/src/generated/peers/TryStatement.ts index 93bde0b00..992101614 100644 --- a/koala-wrapper/src/generated/peers/TryStatement.ts +++ b/koala-wrapper/src/generated/peers/TryStatement.ts @@ -25,17 +25,17 @@ import { KNativePointer, nodeByType, ArktsObject, - unpackString, - Es2pandaAstNodeType + unpackString } from "../../reexport-for-generated" import { BlockStatement } from "./BlockStatement" import { CatchClause } from "./CatchClause" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { LabelPair } from "./LabelPair" import { Statement } from "./Statement" export class TryStatement extends Statement { constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TRY_STATEMENT) + assertValidPeer(pointer, 147) super(pointer) } static createTryStatement(block: BlockStatement | undefined, catchClauses: readonly CatchClause[], finalizer: BlockStatement | undefined, finalizerInsertionsLabelPair: readonly LabelPair[], finalizerInsertionsStatement: readonly Statement[]): TryStatement { @@ -57,7 +57,7 @@ export class TryStatement extends Statement { return global.generatedEs2panda._TryStatementHasFinalizerConst(global.context, this.peer) } get hasDefaultCatchClause(): boolean { - return global.generatedEs2panda._TryStatementHasDefaultCatchClauseConst(global.context, this.peer); + return global.generatedEs2panda._TryStatementHasDefaultCatchClauseConst(global.context, this.peer) } get catchClauses(): readonly CatchClause[] { return unpackNodeArray(global.generatedEs2panda._TryStatementCatchClausesConst(global.context, this.peer)) @@ -70,6 +70,7 @@ export class TryStatement extends Statement { global.generatedEs2panda._TryStatementSetFinallyCanCompleteNormally(global.context, this.peer, finallyCanCompleteNormally) return this } + protected readonly brandTryStatement: undefined } export function isTryStatement(node: object | undefined): node is TryStatement { return node instanceof TryStatement diff --git a/koala-wrapper/src/generated/peers/TypeNode.ts b/koala-wrapper/src/generated/peers/TypeNode.ts index 18b915e47..de560167a 100644 --- a/koala-wrapper/src/generated/peers/TypeNode.ts +++ b/koala-wrapper/src/generated/peers/TypeNode.ts @@ -22,29 +22,56 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Expression } from "./Expression" import { AnnotationUsage } from "./AnnotationUsage" +import { Expression } from "./Expression" export class TypeNode extends Expression { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - + } + /** @deprecated */ + emplaceAnnotations(source?: AnnotationUsage): this { + global.generatedEs2panda._TypeNodeEmplaceAnnotations(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._TypeNodeClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + setValueAnnotations(source: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._TypeNodeSetValueAnnotations(global.context, this.peer, passNode(source), index) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._TypeNodeAnnotationsForUpdate(global.context, this.peer)) } get annotations(): readonly AnnotationUsage[] { - return unpackNodeArray(global.generatedEs2panda._TypeNodeAnnotationsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._TypeNodeAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TypeNodeSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TypeNodeSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this } /** @deprecated */ - setAnnotations(annotations: readonly AnnotationUsage[]): this { - global.generatedEs2panda._TypeNodeSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) + addAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._TypeNodeAddAnnotations(global.context, this.peer, passNode(annotations)) return this } + protected readonly brandTypeNode: undefined } -export function isTypeNode(node: AstNode): node is TypeNode { +export function isTypeNode(node: object | undefined): node is TypeNode { return node instanceof TypeNode } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TypedAstNode.ts b/koala-wrapper/src/generated/peers/TypedAstNode.ts index d749fe3be..d09b0c4d0 100644 --- a/koala-wrapper/src/generated/peers/TypedAstNode.ts +++ b/koala-wrapper/src/generated/peers/TypedAstNode.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -30,11 +29,11 @@ import { } from "../../reexport-for-generated" export class TypedAstNode extends AstNode { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - } + protected readonly brandTypedAstNode: undefined } -export function isTypedAstNode(node: AstNode): node is TypedAstNode { +export function isTypedAstNode(node: object | undefined): node is TypedAstNode { return node instanceof TypedAstNode } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TypedStatement.ts b/koala-wrapper/src/generated/peers/TypedStatement.ts index a87344b96..e27fc5522 100644 --- a/koala-wrapper/src/generated/peers/TypedStatement.ts +++ b/koala-wrapper/src/generated/peers/TypedStatement.ts @@ -22,7 +22,6 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, @@ -31,11 +30,11 @@ import { import { Statement } from "./Statement" export class TypedStatement extends Statement { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - } + protected readonly brandTypedStatement: undefined } -export function isTypedStatement(node: AstNode): node is TypedStatement { +export function isTypedStatement(node: object | undefined): node is TypedStatement { return node instanceof TypedStatement } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TypeofExpression.ts b/koala-wrapper/src/generated/peers/TypeofExpression.ts index 8496fe19c..70136a358 100644 --- a/koala-wrapper/src/generated/peers/TypeofExpression.ts +++ b/koala-wrapper/src/generated/peers/TypeofExpression.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class TypeofExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_TYPEOF_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 145) super(pointer) - } static createTypeofExpression(argument?: Expression): TypeofExpression { return new TypeofExpression(global.generatedEs2panda._CreateTypeofExpression(global.context, passNode(argument))) @@ -45,8 +44,9 @@ export class TypeofExpression extends Expression { get argument(): Expression | undefined { return unpackNode(global.generatedEs2panda._TypeofExpressionArgumentConst(global.context, this.peer)) } + protected readonly brandTypeofExpression: undefined } -export function isTypeofExpression(node: AstNode): node is TypeofExpression { +export function isTypeofExpression(node: object | undefined): node is TypeofExpression { return node instanceof TypeofExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TYPEOF_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/UnaryExpression.ts b/koala-wrapper/src/generated/peers/UnaryExpression.ts index 88a9071dc..14c835880 100644 --- a/koala-wrapper/src/generated/peers/UnaryExpression.ts +++ b/koala-wrapper/src/generated/peers/UnaryExpression.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Expression } from "./Expression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaTokenType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" export class UnaryExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_UNARY_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 148) super(pointer) - } static createUnaryExpression(argument: Expression | undefined, unaryOperator: Es2pandaTokenType): UnaryExpression { return new UnaryExpression(global.generatedEs2panda._CreateUnaryExpression(global.context, passNode(argument), unaryOperator)) @@ -47,10 +46,16 @@ export class UnaryExpression extends Expression { return global.generatedEs2panda._UnaryExpressionOperatorTypeConst(global.context, this.peer) } get argument(): Expression | undefined { - return unpackNode(global.generatedEs2panda._UnaryExpressionArgumentConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._UnaryExpressionArgument(global.context, this.peer)) + } + /** @deprecated */ + setArgument(arg?: Expression): this { + global.generatedEs2panda._UnaryExpressionSetArgument(global.context, this.peer, passNode(arg)) + return this } + protected readonly brandUnaryExpression: undefined } -export function isUnaryExpression(node: AstNode): node is UnaryExpression { +export function isUnaryExpression(node: object | undefined): node is UnaryExpression { return node instanceof UnaryExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_UNARY_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/UndefinedLiteral.ts b/koala-wrapper/src/generated/peers/UndefinedLiteral.ts index b50432720..6a7b197f7 100644 --- a/koala-wrapper/src/generated/peers/UndefinedLiteral.ts +++ b/koala-wrapper/src/generated/peers/UndefinedLiteral.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Literal } from "./Literal" export class UndefinedLiteral extends Literal { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_UNDEFINED_LITERAL) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 51) super(pointer) - } static createUndefinedLiteral(): UndefinedLiteral { return new UndefinedLiteral(global.generatedEs2panda._CreateUndefinedLiteral(global.context)) @@ -42,8 +41,9 @@ export class UndefinedLiteral extends Literal { static updateUndefinedLiteral(original?: UndefinedLiteral): UndefinedLiteral { return new UndefinedLiteral(global.generatedEs2panda._UpdateUndefinedLiteral(global.context, passNode(original))) } + protected readonly brandUndefinedLiteral: undefined } -export function isUndefinedLiteral(node: AstNode): node is UndefinedLiteral { +export function isUndefinedLiteral(node: object | undefined): node is UndefinedLiteral { return node instanceof UndefinedLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_UNDEFINED_LITERAL)) { diff --git a/koala-wrapper/src/generated/peers/UpdateExpression.ts b/koala-wrapper/src/generated/peers/UpdateExpression.ts index 30d9f1839..b01cd9e26 100644 --- a/koala-wrapper/src/generated/peers/UpdateExpression.ts +++ b/koala-wrapper/src/generated/peers/UpdateExpression.ts @@ -22,20 +22,19 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Expression } from "./Expression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaTokenType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" export class UpdateExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_UPDATE_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 149) super(pointer) - } static createUpdateExpression(argument: Expression | undefined, updateOperator: Es2pandaTokenType, isPrefix: boolean): UpdateExpression { return new UpdateExpression(global.generatedEs2panda._CreateUpdateExpression(global.context, passNode(argument), updateOperator, isPrefix)) @@ -47,13 +46,14 @@ export class UpdateExpression extends Expression { return global.generatedEs2panda._UpdateExpressionOperatorTypeConst(global.context, this.peer) } get argument(): Expression | undefined { - return unpackNode(global.generatedEs2panda._UpdateExpressionArgumentConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._UpdateExpressionArgument(global.context, this.peer)) } get isPrefix(): boolean { return global.generatedEs2panda._UpdateExpressionIsPrefixConst(global.context, this.peer) } + protected readonly brandUpdateExpression: undefined } -export function isUpdateExpression(node: AstNode): node is UpdateExpression { +export function isUpdateExpression(node: object | undefined): node is UpdateExpression { return node instanceof UpdateExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_UPDATE_EXPRESSION)) { diff --git a/koala-wrapper/src/generated/peers/ValidationInfo.ts b/koala-wrapper/src/generated/peers/ValidationInfo.ts index 45e6b8212..8a86bb55e 100644 --- a/koala-wrapper/src/generated/peers/ValidationInfo.ts +++ b/koala-wrapper/src/generated/peers/ValidationInfo.ts @@ -22,22 +22,22 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { SourcePosition } from "./SourcePosition" export class ValidationInfo extends ArktsObject { - constructor(pointer: KNativePointer) { + constructor(pointer: KNativePointer) { super(pointer) - } - static createValidationInfo(): ValidationInfo { - return new ValidationInfo(global.generatedEs2panda._CreateValidationInfo(global.context)) + static create1ValidationInfo(m: string, p?: SourcePosition): ValidationInfo { + return new ValidationInfo(global.generatedEs2panda._CreateValidationInfo1(global.context, m, passNode(p))) } get fail(): boolean { return global.generatedEs2panda._ValidationInfoFailConst(global.context, this.peer) } + protected readonly brandValidationInfo: undefined } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/VariableDeclaration.ts b/koala-wrapper/src/generated/peers/VariableDeclaration.ts index 6699e1f55..2097a5d2d 100644 --- a/koala-wrapper/src/generated/peers/VariableDeclaration.ts +++ b/koala-wrapper/src/generated/peers/VariableDeclaration.ts @@ -22,23 +22,22 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { Statement } from "./Statement" +import { AnnotationUsage } from "./AnnotationUsage" +import { Decorator } from "./Decorator" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaVariableDeclarationKind } from "./../Es2pandaEnums" +import { Statement } from "./Statement" import { VariableDeclarator } from "./VariableDeclarator" -import { Decorator } from "./Decorator" -import { AnnotationUsage } from "./AnnotationUsage" export class VariableDeclaration extends Statement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 150) super(pointer) - } static createVariableDeclaration(kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[]): VariableDeclaration { return new VariableDeclaration(global.generatedEs2panda._CreateVariableDeclaration(global.context, kind, passNodeArray(declarators), declarators.length)) @@ -47,24 +46,59 @@ export class VariableDeclaration extends Statement { return new VariableDeclaration(global.generatedEs2panda._UpdateVariableDeclaration(global.context, passNode(original), kind, passNodeArray(declarators), declarators.length)) } get declarators(): readonly VariableDeclarator[] { - return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDeclaratorsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDeclarators(global.context, this.peer)) + } + get declaratorsForUpdate(): readonly VariableDeclarator[] { + return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDeclaratorsForUpdate(global.context, this.peer)) } get kind(): Es2pandaVariableDeclarationKind { return global.generatedEs2panda._VariableDeclarationKindConst(global.context, this.peer) } get decorators(): readonly Decorator[] { - return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDecoratorsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDecorators(global.context, this.peer)) + } + get decoratorsForUpdate(): readonly Decorator[] { + return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDecoratorsForUpdate(global.context, this.peer)) + } + /** @deprecated */ + emplaceAnnotations(source?: AnnotationUsage): this { + global.generatedEs2panda._VariableDeclarationEmplaceAnnotations(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._VariableDeclarationClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + setValueAnnotations(source: AnnotationUsage | undefined, index: number): this { + global.generatedEs2panda._VariableDeclarationSetValueAnnotations(global.context, this.peer, passNode(source), index) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._VariableDeclarationAnnotationsForUpdate(global.context, this.peer)) } get annotations(): readonly AnnotationUsage[] { - return unpackNodeArray(global.generatedEs2panda._VariableDeclarationAnnotationsConst(global.context, this.peer)) + return unpackNodeArray(global.generatedEs2panda._VariableDeclarationAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._VariableDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._VariableDeclarationSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this } /** @deprecated */ - setAnnotations(annotations: readonly AnnotationUsage[]): this { - global.generatedEs2panda._VariableDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotations), annotations.length) + addAnnotations(annotations?: AnnotationUsage): this { + global.generatedEs2panda._VariableDeclarationAddAnnotations(global.context, this.peer, passNode(annotations)) return this } + protected readonly brandVariableDeclaration: undefined } -export function isVariableDeclaration(node: AstNode): node is VariableDeclaration { +export function isVariableDeclaration(node: object | undefined): node is VariableDeclaration { return node instanceof VariableDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATION)) { diff --git a/koala-wrapper/src/generated/peers/VariableDeclarator.ts b/koala-wrapper/src/generated/peers/VariableDeclarator.ts index 3913fc3d6..f1e72101a 100644 --- a/koala-wrapper/src/generated/peers/VariableDeclarator.ts +++ b/koala-wrapper/src/generated/peers/VariableDeclarator.ts @@ -22,50 +22,47 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { TypedStatement } from "./TypedStatement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Es2pandaVariableDeclaratorFlag } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { TypedStatement } from "./TypedStatement" export class VariableDeclarator extends TypedStatement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 151) super(pointer) - } - static createVariableDeclarator(flag: Es2pandaVariableDeclaratorFlag, ident?: Expression): VariableDeclarator { - return new VariableDeclarator(global.generatedEs2panda._CreateVariableDeclarator(global.context, flag, passNode(ident))) + static create1VariableDeclarator(flag: Es2pandaVariableDeclaratorFlag, ident?: Expression, init?: Expression): VariableDeclarator { + return new VariableDeclarator(global.generatedEs2panda._CreateVariableDeclarator1(global.context, flag, passNode(ident), passNode(init))) } static updateVariableDeclarator(original: VariableDeclarator | undefined, flag: Es2pandaVariableDeclaratorFlag, ident?: Expression): VariableDeclarator { return new VariableDeclarator(global.generatedEs2panda._UpdateVariableDeclarator(global.context, passNode(original), flag, passNode(ident))) } - static create1VariableDeclarator(flag: Es2pandaVariableDeclaratorFlag, ident?: Expression, init?: Expression): VariableDeclarator { - return new VariableDeclarator(global.generatedEs2panda._CreateVariableDeclarator1(global.context, flag, passNode(ident), passNode(init))) - } static update1VariableDeclarator(original: VariableDeclarator | undefined, flag: Es2pandaVariableDeclaratorFlag, ident?: Expression, init?: Expression): VariableDeclarator { return new VariableDeclarator(global.generatedEs2panda._UpdateVariableDeclarator1(global.context, passNode(original), flag, passNode(ident), passNode(init))) } get init(): Expression | undefined { - return unpackNode(global.generatedEs2panda._VariableDeclaratorInitConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._VariableDeclaratorInit(global.context, this.peer)) } /** @deprecated */ - setInit(init: Expression): this { + setInit(init?: Expression): this { global.generatedEs2panda._VariableDeclaratorSetInit(global.context, this.peer, passNode(init)) return this } get id(): Expression | undefined { - return unpackNode(global.generatedEs2panda._VariableDeclaratorIdConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._VariableDeclaratorId(global.context, this.peer)) } get flag(): Es2pandaVariableDeclaratorFlag { return global.generatedEs2panda._VariableDeclaratorFlag(global.context, this.peer) } + protected readonly brandVariableDeclarator: undefined } -export function isVariableDeclarator(node: AstNode): node is VariableDeclarator { +export function isVariableDeclarator(node: object | undefined): node is VariableDeclarator { return node instanceof VariableDeclarator } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR)) { diff --git a/koala-wrapper/src/generated/peers/WhileStatement.ts b/koala-wrapper/src/generated/peers/WhileStatement.ts index 548fd8bf2..b2bf6278f 100644 --- a/koala-wrapper/src/generated/peers/WhileStatement.ts +++ b/koala-wrapper/src/generated/peers/WhileStatement.ts @@ -22,21 +22,20 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" -import { LoopStatement } from "./LoopStatement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" +import { LoopStatement } from "./LoopStatement" import { Statement } from "./Statement" export class WhileStatement extends LoopStatement { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_WHILE_STATEMENT) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 152) super(pointer) - } static createWhileStatement(test?: Expression, body?: Statement): WhileStatement { return new WhileStatement(global.generatedEs2panda._CreateWhileStatement(global.context, passNode(test), passNode(body))) @@ -45,13 +44,19 @@ export class WhileStatement extends LoopStatement { return new WhileStatement(global.generatedEs2panda._UpdateWhileStatement(global.context, passNode(original), passNode(test), passNode(body))) } get test(): Expression | undefined { - return unpackNode(global.generatedEs2panda._WhileStatementTestConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._WhileStatementTest(global.context, this.peer)) + } + /** @deprecated */ + setTest(test?: Expression): this { + global.generatedEs2panda._WhileStatementSetTest(global.context, this.peer, passNode(test)) + return this } get body(): Statement | undefined { - return unpackNode(global.generatedEs2panda._WhileStatementBodyConst(global.context, this.peer)) + return unpackNode(global.generatedEs2panda._WhileStatementBody(global.context, this.peer)) } + protected readonly brandWhileStatement: undefined } -export function isWhileStatement(node: AstNode): node is WhileStatement { +export function isWhileStatement(node: object | undefined): node is WhileStatement { return node instanceof WhileStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_WHILE_STATEMENT)) { diff --git a/koala-wrapper/src/generated/peers/YieldExpression.ts b/koala-wrapper/src/generated/peers/YieldExpression.ts index 90846a933..473f88930 100644 --- a/koala-wrapper/src/generated/peers/YieldExpression.ts +++ b/koala-wrapper/src/generated/peers/YieldExpression.ts @@ -22,19 +22,18 @@ import { unpackNodeArray, assertValidPeer, AstNode, - Es2pandaAstNodeType, KNativePointer, nodeByType, ArktsObject, unpackString } from "../../reexport-for-generated" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" import { Expression } from "./Expression" export class YieldExpression extends Expression { - constructor(pointer: KNativePointer) { - assertValidPeer(pointer, Es2pandaAstNodeType.AST_NODE_TYPE_YIELD_EXPRESSION) + constructor(pointer: KNativePointer) { + assertValidPeer(pointer, 153) super(pointer) - } static createYieldExpression(argument: Expression | undefined, isDelegate: boolean): YieldExpression { return new YieldExpression(global.generatedEs2panda._CreateYieldExpression(global.context, passNode(argument), isDelegate)) @@ -48,8 +47,9 @@ export class YieldExpression extends Expression { get argument(): Expression | undefined { return unpackNode(global.generatedEs2panda._YieldExpressionArgumentConst(global.context, this.peer)) } + protected readonly brandYieldExpression: undefined } -export function isYieldExpression(node: AstNode): node is YieldExpression { +export function isYieldExpression(node: object | undefined): node is YieldExpression { return node instanceof YieldExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_YIELD_EXPRESSION)) { -- Gitee From 16f71ad224fe11082b895b8e03c60158e9eb7267 Mon Sep 17 00:00:00 2001 From: xieziang Date: Mon, 16 Jun 2025 19:37:51 +0800 Subject: [PATCH 17/17] update nodeByType Signed-off-by: xieziang Change-Id: I942245ceb4b5a53303aa2e71537e239ad4418a1f --- koala-wrapper/src/arkts-api/class-by-peer.ts | 19 +++++++++--- koala-wrapper/src/arkts-api/types.ts | 2 +- .../src/generated/Es2pandaNativeModule.ts | 2 +- koala-wrapper/src/generated/index.ts | 31 +++++++++++++++++-- .../generated/peers/AnnotationDeclaration.ts | 2 +- .../src/generated/peers/AnnotationUsage.ts | 2 +- .../src/generated/peers/ArrayExpression.ts | 2 +- .../peers/ArrowFunctionExpression.ts | 2 +- .../src/generated/peers/AssertStatement.ts | 2 +- .../generated/peers/AssignmentExpression.ts | 2 +- .../src/generated/peers/AwaitExpression.ts | 2 +- .../src/generated/peers/BigIntLiteral.ts | 2 +- .../src/generated/peers/BinaryExpression.ts | 2 +- .../src/generated/peers/BlockExpression.ts | 2 +- .../src/generated/peers/BlockStatement.ts | 2 +- .../src/generated/peers/BooleanLiteral.ts | 2 +- .../src/generated/peers/BreakStatement.ts | 2 +- .../src/generated/peers/CallExpression.ts | 4 +-- .../src/generated/peers/CatchClause.ts | 2 +- .../src/generated/peers/ChainExpression.ts | 2 +- .../src/generated/peers/CharLiteral.ts | 2 +- .../src/generated/peers/ClassDeclaration.ts | 2 +- .../src/generated/peers/ClassDefinition.ts | 2 +- .../src/generated/peers/ClassExpression.ts | 2 +- .../src/generated/peers/ClassProperty.ts | 2 +- .../src/generated/peers/ClassStaticBlock.ts | 2 +- .../generated/peers/ConditionalExpression.ts | 2 +- .../src/generated/peers/ContinueStatement.ts | 2 +- .../src/generated/peers/DebuggerStatement.ts | 2 +- .../src/generated/peers/Decorator.ts | 2 +- .../generated/peers/DirectEvalExpression.ts | 2 +- .../src/generated/peers/DoWhileStatement.ts | 2 +- .../src/generated/peers/ETSClassLiteral.ts | 2 +- .../src/generated/peers/ETSFunctionType.ts | 2 +- .../generated/peers/ETSImportDeclaration.ts | 2 +- .../src/generated/peers/ETSKeyofType.ts | 2 +- .../src/generated/peers/ETSModule.ts | 2 +- .../peers/ETSNewArrayInstanceExpression.ts | 2 +- .../peers/ETSNewClassInstanceExpression.ts | 2 +- .../ETSNewMultiDimArrayInstanceExpression.ts | 2 +- .../src/generated/peers/ETSNullType.ts | 2 +- .../generated/peers/ETSPackageDeclaration.ts | 2 +- .../generated/peers/ETSParameterExpression.ts | 2 +- .../src/generated/peers/ETSPrimitiveType.ts | 2 +- .../generated/peers/ETSReExportDeclaration.ts | 2 +- .../generated/peers/ETSStringLiteralType.ts | 2 +- .../generated/peers/ETSStructDeclaration.ts | 2 +- koala-wrapper/src/generated/peers/ETSTuple.ts | 2 +- .../src/generated/peers/ETSTypeReference.ts | 2 +- .../generated/peers/ETSTypeReferencePart.ts | 2 +- .../src/generated/peers/ETSUndefinedType.ts | 2 +- .../src/generated/peers/ETSUnionType.ts | 2 +- .../src/generated/peers/ETSWildcardType.ts | 2 +- .../src/generated/peers/EmptyStatement.ts | 2 +- .../generated/peers/ExportAllDeclaration.ts | 2 +- .../peers/ExportDefaultDeclaration.ts | 2 +- .../generated/peers/ExportNamedDeclaration.ts | 2 +- .../src/generated/peers/ExportSpecifier.ts | 2 +- .../generated/peers/ExpressionStatement.ts | 2 +- .../src/generated/peers/ForInStatement.ts | 2 +- .../src/generated/peers/ForOfStatement.ts | 2 +- .../src/generated/peers/ForUpdateStatement.ts | 2 +- .../generated/peers/FunctionDeclaration.ts | 2 +- .../src/generated/peers/FunctionExpression.ts | 2 +- .../src/generated/peers/Identifier.ts | 2 +- .../src/generated/peers/IfStatement.ts | 2 +- .../src/generated/peers/ImportDeclaration.ts | 2 +- .../generated/peers/ImportDefaultSpecifier.ts | 2 +- .../src/generated/peers/ImportExpression.ts | 2 +- .../peers/ImportNamespaceSpecifier.ts | 2 +- .../src/generated/peers/ImportSpecifier.ts | 2 +- .../src/generated/peers/LabelledStatement.ts | 2 +- .../src/generated/peers/MemberExpression.ts | 2 +- .../src/generated/peers/MetaProperty.ts | 2 +- .../src/generated/peers/MethodDefinition.ts | 2 +- .../src/generated/peers/NamedType.ts | 2 +- .../src/generated/peers/NewExpression.ts | 2 +- .../src/generated/peers/NullLiteral.ts | 2 +- .../src/generated/peers/NumberLiteral.ts | 2 +- .../src/generated/peers/ObjectExpression.ts | 2 +- .../src/generated/peers/OmittedExpression.ts | 2 +- .../src/generated/peers/OpaqueTypeNode.ts | 2 +- .../peers/PrefixAssertionExpression.ts | 2 +- koala-wrapper/src/generated/peers/Property.ts | 2 +- .../src/generated/peers/RegExpLiteral.ts | 2 +- .../src/generated/peers/ReturnStatement.ts | 2 +- .../src/generated/peers/ScriptFunction.ts | 2 +- .../src/generated/peers/SequenceExpression.ts | 2 +- .../src/generated/peers/StringLiteral.ts | 2 +- .../src/generated/peers/SuperExpression.ts | 2 +- .../generated/peers/SwitchCaseStatement.ts | 2 +- .../src/generated/peers/SwitchStatement.ts | 2 +- .../src/generated/peers/TSAnyKeyword.ts | 2 +- .../src/generated/peers/TSArrayType.ts | 2 +- .../src/generated/peers/TSAsExpression.ts | 2 +- .../src/generated/peers/TSBigintKeyword.ts | 2 +- .../src/generated/peers/TSBooleanKeyword.ts | 2 +- .../src/generated/peers/TSClassImplements.ts | 2 +- .../src/generated/peers/TSConditionalType.ts | 2 +- .../src/generated/peers/TSConstructorType.ts | 2 +- .../src/generated/peers/TSEnumDeclaration.ts | 2 +- .../src/generated/peers/TSEnumMember.ts | 2 +- .../peers/TSExternalModuleReference.ts | 2 +- .../src/generated/peers/TSFunctionType.ts | 2 +- .../peers/TSImportEqualsDeclaration.ts | 2 +- .../src/generated/peers/TSImportType.ts | 2 +- .../src/generated/peers/TSIndexSignature.ts | 2 +- .../generated/peers/TSIndexedAccessType.ts | 2 +- .../src/generated/peers/TSInferType.ts | 2 +- .../src/generated/peers/TSInterfaceBody.ts | 2 +- .../generated/peers/TSInterfaceDeclaration.ts | 2 +- .../generated/peers/TSInterfaceHeritage.ts | 2 +- .../src/generated/peers/TSIntersectionType.ts | 2 +- .../src/generated/peers/TSLiteralType.ts | 2 +- .../src/generated/peers/TSMappedType.ts | 2 +- .../src/generated/peers/TSMethodSignature.ts | 2 +- .../src/generated/peers/TSModuleBlock.ts | 2 +- .../generated/peers/TSModuleDeclaration.ts | 2 +- .../src/generated/peers/TSNamedTupleMember.ts | 2 +- .../src/generated/peers/TSNeverKeyword.ts | 2 +- .../generated/peers/TSNonNullExpression.ts | 2 +- .../src/generated/peers/TSNullKeyword.ts | 2 +- .../src/generated/peers/TSNumberKeyword.ts | 2 +- .../src/generated/peers/TSObjectKeyword.ts | 2 +- .../generated/peers/TSParameterProperty.ts | 2 +- .../generated/peers/TSParenthesizedType.ts | 2 +- .../generated/peers/TSPropertySignature.ts | 2 +- .../src/generated/peers/TSQualifiedName.ts | 2 +- .../generated/peers/TSSignatureDeclaration.ts | 2 +- .../src/generated/peers/TSStringKeyword.ts | 2 +- .../src/generated/peers/TSThisType.ts | 2 +- .../src/generated/peers/TSTupleType.ts | 2 +- .../generated/peers/TSTypeAliasDeclaration.ts | 2 +- .../src/generated/peers/TSTypeAssertion.ts | 2 +- .../src/generated/peers/TSTypeLiteral.ts | 2 +- .../src/generated/peers/TSTypeOperator.ts | 2 +- .../src/generated/peers/TSTypeParameter.ts | 2 +- .../peers/TSTypeParameterDeclaration.ts | 2 +- .../peers/TSTypeParameterInstantiation.ts | 2 +- .../src/generated/peers/TSTypePredicate.ts | 2 +- .../src/generated/peers/TSTypeQuery.ts | 2 +- .../src/generated/peers/TSTypeReference.ts | 2 +- .../src/generated/peers/TSUndefinedKeyword.ts | 2 +- .../src/generated/peers/TSUnionType.ts | 2 +- .../src/generated/peers/TSUnknownKeyword.ts | 2 +- .../src/generated/peers/TSVoidKeyword.ts | 2 +- .../peers/TaggedTemplateExpression.ts | 2 +- .../src/generated/peers/TemplateElement.ts | 2 +- .../src/generated/peers/TemplateLiteral.ts | 2 +- .../src/generated/peers/ThisExpression.ts | 2 +- .../src/generated/peers/ThrowStatement.ts | 2 +- .../src/generated/peers/TryStatement.ts | 2 +- .../src/generated/peers/TypeofExpression.ts | 2 +- .../src/generated/peers/UnaryExpression.ts | 2 +- .../src/generated/peers/UndefinedLiteral.ts | 2 +- .../src/generated/peers/UpdateExpression.ts | 2 +- .../generated/peers/VariableDeclaration.ts | 2 +- .../src/generated/peers/VariableDeclarator.ts | 2 +- .../src/generated/peers/WhileStatement.ts | 2 +- .../src/generated/peers/YieldExpression.ts | 2 +- 160 files changed, 201 insertions(+), 167 deletions(-) diff --git a/koala-wrapper/src/arkts-api/class-by-peer.ts b/koala-wrapper/src/arkts-api/class-by-peer.ts index 22e2c0661..cf7710491 100644 --- a/koala-wrapper/src/arkts-api/class-by-peer.ts +++ b/koala-wrapper/src/arkts-api/class-by-peer.ts @@ -19,7 +19,7 @@ import { global } from './static/global'; import { KNativePointer, nullptr } from '@koalaui/interop'; import { AstNode, UnsupportedNode } from './peers/AstNode'; -export const nodeByType = new Map([]); +export const nodeByType = new Map AstNode>([]) const cache = new Map(); export function clearNodeCache(): void { @@ -36,11 +36,20 @@ function getOrPut(peer: KNativePointer, create: (peer: KNativePointer) => AstNod return newNode; } +// export function classByPeer(peer: KNativePointer): T { +// if (peer === nullptr) { +// throwError('classByPeer: peer is NULLPTR'); +// } +// const type = global.generatedEs2panda._AstNodeTypeConst(global.context, peer); +// const node = nodeByType.get(type) ?? UnsupportedNode; +// return getOrPut(peer, (peer) => new node(peer)) as T; +// } + export function classByPeer(peer: KNativePointer): T { if (peer === nullptr) { - throwError('classByPeer: peer is NULLPTR'); + throwError('classByPeer: peer is NULLPTR') } - const type = global.generatedEs2panda._AstNodeTypeConst(global.context, peer); - const node = nodeByType.get(type) ?? UnsupportedNode; - return getOrPut(peer, (peer) => new node(peer)) as T; + const type = global.generatedEs2panda._AstNodeTypeConst(global.context, peer) + const create = nodeByType.get(type) ?? throwError(`unknown node type: ${type}`) + return create(peer) as T } diff --git a/koala-wrapper/src/arkts-api/types.ts b/koala-wrapper/src/arkts-api/types.ts index cd9c66cef..4f0c09f72 100644 --- a/koala-wrapper/src/arkts-api/types.ts +++ b/koala-wrapper/src/arkts-api/types.ts @@ -919,4 +919,4 @@ const pairs: [Es2pandaAstNodeType, { new (peer: KNativePointer): AstNode }][] = [Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION, ObjectExpression], [Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION, ArrayExpression], ]; -pairs.forEach(([nodeType, astNode]) => nodeByType.set(nodeType, astNode)); +pairs.forEach(([nodeType, astNode]) => nodeByType.set(nodeType, (peer: KNativePointer) => new astNode(peer))); diff --git a/koala-wrapper/src/generated/Es2pandaNativeModule.ts b/koala-wrapper/src/generated/Es2pandaNativeModule.ts index 90693935b..50a79aa15 100644 --- a/koala-wrapper/src/generated/Es2pandaNativeModule.ts +++ b/koala-wrapper/src/generated/Es2pandaNativeModule.ts @@ -3217,7 +3217,7 @@ export class Es2pandaNativeModule { _ETSParameterExpressionInitializer(context: KNativePointer, receiver: KNativePointer): KNativePointer { throw new Error("This methods was not overloaded by native module initialization") } - _ETSParameterExpressionSetLexerSaved(context: KNativePointer, receiver: KNativePointer, s: KStringPtr): void { + _ETSParameterExpressionSetLexerSaved(context: KNativePointer, receiver: KNativePointer, savedLexer: KStringPtr): void { throw new Error("This methods was not overloaded by native module initialization") } _ETSParameterExpressionLexerSavedConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { diff --git a/koala-wrapper/src/generated/index.ts b/koala-wrapper/src/generated/index.ts index e85598df6..725adc0c7 100644 --- a/koala-wrapper/src/generated/index.ts +++ b/koala-wrapper/src/generated/index.ts @@ -13,6 +13,29 @@ * limitations under the License. */ +export * from "./peers/SourcePosition" +export * from "./peers/SourceRange" +export * from "./peers/LabelPair" +export * from "./peers/ScriptFunctionData" +export * from "./peers/ImportSource" +export * from "./peers/SignatureInfo" +export * from "./peers/IndexInfo" +export * from "./peers/ObjectDescriptor" +export * from "./peers/ScopeFindResult" +export * from "./peers/BindingProps" +export * from "./peers/Declaration" +export * from "./peers/AstVisitor" +export * from "./peers/AstVerifier" +export * from "./peers/VerifierMessage" +export * from "./peers/CodeGen" +export * from "./peers/VReg" +export * from "./peers/IRNode" +export * from "./peers/ErrorLogger" +export * from "./peers/VerificationContext" +export * from "./peers/DynamicImportData" +export * from "./peers/SuggestionInfo" +export * from "./peers/DiagnosticInfo" +export * from "./peers/NumberLiteral" export * from "./peers/TypedAstNode" export * from "./peers/AnnotatedAstNode" export * from "./peers/TypedStatement" @@ -40,9 +63,7 @@ export * from "./peers/TaggedTemplateExpression" export * from "./peers/FunctionDeclaration" export * from "./peers/ETSTypeReference" export * from "./peers/TSTypeReference" -export * from "./peers/ImportSource" export * from "./peers/NamedType" -export * from "./peers/NumberLiteral" export * from "./peers/TSFunctionType" export * from "./peers/TemplateElement" export * from "./peers/TSInterfaceDeclaration" @@ -52,6 +73,7 @@ export * from "./peers/MemberExpression" export * from "./peers/TSClassImplements" export * from "./peers/TSObjectKeyword" export * from "./peers/ETSUnionType" +export * from "./peers/ETSKeyofType" export * from "./peers/TSPropertySignature" export * from "./peers/TSConditionalType" export * from "./peers/TSLiteralType" @@ -72,6 +94,7 @@ export * from "./peers/TSTypeAssertion" export * from "./peers/TSExternalModuleReference" export * from "./peers/TSUndefinedKeyword" export * from "./peers/ETSTuple" +export * from "./peers/ETSStringLiteralType" export * from "./peers/TryStatement" export * from "./peers/UnaryExpression" export * from "./peers/ForInStatement" @@ -187,4 +210,6 @@ export * from "./peers/ETSWildcardType" export * from "./peers/TSThisType" export * from "./peers/ETSDynamicFunctionType" export * from "./peers/InterfaceDecl" -export * from "./peers/FunctionDecl" \ No newline at end of file +export * from "./peers/FunctionDecl" +export * from "./peers/Program" +export * from "./peers/ArkTsConfig" \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/AnnotationDeclaration.ts b/koala-wrapper/src/generated/peers/AnnotationDeclaration.ts index f5bc10dc1..fc3e01998 100644 --- a/koala-wrapper/src/generated/peers/AnnotationDeclaration.ts +++ b/koala-wrapper/src/generated/peers/AnnotationDeclaration.ts @@ -154,5 +154,5 @@ export function isAnnotationDeclaration(node: object | undefined): node is Annot return node instanceof AnnotationDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION, AnnotationDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION, (peer: KNativePointer) => new AnnotationDeclaration(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/AnnotationUsage.ts b/koala-wrapper/src/generated/peers/AnnotationUsage.ts index f60a8b173..b9f456f72 100644 --- a/koala-wrapper/src/generated/peers/AnnotationUsage.ts +++ b/koala-wrapper/src/generated/peers/AnnotationUsage.ts @@ -75,5 +75,5 @@ export function isAnnotationUsage(node: object | undefined): node is AnnotationU return node instanceof AnnotationUsage } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE, AnnotationUsage) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE, (peer: KNativePointer) => new AnnotationUsage(peer)) } diff --git a/koala-wrapper/src/generated/peers/ArrayExpression.ts b/koala-wrapper/src/generated/peers/ArrayExpression.ts index 0acea80c5..7b2771c44 100644 --- a/koala-wrapper/src/generated/peers/ArrayExpression.ts +++ b/koala-wrapper/src/generated/peers/ArrayExpression.ts @@ -106,5 +106,5 @@ export function isArrayExpression(node: object | undefined): node is ArrayExpres return node instanceof ArrayExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION, ArrayExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION, (peer: KNativePointer) => new ArrayExpression(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ArrowFunctionExpression.ts b/koala-wrapper/src/generated/peers/ArrowFunctionExpression.ts index b7e85e111..532b8c172 100644 --- a/koala-wrapper/src/generated/peers/ArrowFunctionExpression.ts +++ b/koala-wrapper/src/generated/peers/ArrowFunctionExpression.ts @@ -96,5 +96,5 @@ export function isArrowFunctionExpression(node: object | undefined): node is Arr return node instanceof ArrowFunctionExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION, ArrowFunctionExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION, (peer: KNativePointer) => new ArrowFunctionExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/AssertStatement.ts b/koala-wrapper/src/generated/peers/AssertStatement.ts index c065e6d66..c78622f36 100644 --- a/koala-wrapper/src/generated/peers/AssertStatement.ts +++ b/koala-wrapper/src/generated/peers/AssertStatement.ts @@ -55,5 +55,5 @@ export function isAssertStatement(node: object | undefined): node is AssertState return node instanceof AssertStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ASSERT_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ASSERT_STATEMENT, AssertStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ASSERT_STATEMENT, (peer: KNativePointer) => new AssertStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/AssignmentExpression.ts b/koala-wrapper/src/generated/peers/AssignmentExpression.ts index 1c593ad01..bd5c8f256 100644 --- a/koala-wrapper/src/generated/peers/AssignmentExpression.ts +++ b/koala-wrapper/src/generated/peers/AssignmentExpression.ts @@ -98,5 +98,5 @@ export function isAssignmentExpression(node: object | undefined): node is Assign return node instanceof AssignmentExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION, AssignmentExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION, (peer: KNativePointer) => new AssignmentExpression(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/AwaitExpression.ts b/koala-wrapper/src/generated/peers/AwaitExpression.ts index eda623840..e0411c487 100644 --- a/koala-wrapper/src/generated/peers/AwaitExpression.ts +++ b/koala-wrapper/src/generated/peers/AwaitExpression.ts @@ -51,5 +51,5 @@ export function isAwaitExpression(node: object | undefined): node is AwaitExpres return node instanceof AwaitExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_AWAIT_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_AWAIT_EXPRESSION, AwaitExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_AWAIT_EXPRESSION, (peer: KNativePointer) => new AwaitExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/BigIntLiteral.ts b/koala-wrapper/src/generated/peers/BigIntLiteral.ts index 5bbdb857c..4ae89d5cc 100644 --- a/koala-wrapper/src/generated/peers/BigIntLiteral.ts +++ b/koala-wrapper/src/generated/peers/BigIntLiteral.ts @@ -51,5 +51,5 @@ export function isBigIntLiteral(node: object | undefined): node is BigIntLiteral return node instanceof BigIntLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BIGINT_LITERAL)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BIGINT_LITERAL, BigIntLiteral) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BIGINT_LITERAL, (peer: KNativePointer) => new BigIntLiteral(peer)) } diff --git a/koala-wrapper/src/generated/peers/BinaryExpression.ts b/koala-wrapper/src/generated/peers/BinaryExpression.ts index c150445cd..bd32450d5 100644 --- a/koala-wrapper/src/generated/peers/BinaryExpression.ts +++ b/koala-wrapper/src/generated/peers/BinaryExpression.ts @@ -100,5 +100,5 @@ export function isBinaryExpression(node: object | undefined): node is BinaryExpr return node instanceof BinaryExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BINARY_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BINARY_EXPRESSION, BinaryExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BINARY_EXPRESSION, (peer: KNativePointer) => new BinaryExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/BlockExpression.ts b/koala-wrapper/src/generated/peers/BlockExpression.ts index 636b8c670..4d61352ac 100644 --- a/koala-wrapper/src/generated/peers/BlockExpression.ts +++ b/koala-wrapper/src/generated/peers/BlockExpression.ts @@ -62,5 +62,5 @@ export function isBlockExpression(node: object | undefined): node is BlockExpres return node instanceof BlockExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_EXPRESSION, BlockExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_EXPRESSION, (peer: KNativePointer) => new BlockExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/BlockStatement.ts b/koala-wrapper/src/generated/peers/BlockStatement.ts index e0a611384..d355f98af 100644 --- a/koala-wrapper/src/generated/peers/BlockStatement.ts +++ b/koala-wrapper/src/generated/peers/BlockStatement.ts @@ -84,5 +84,5 @@ export function isBlockStatement(node: object | undefined): node is BlockStateme return node instanceof BlockStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT, BlockStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT, (peer: KNativePointer) => new BlockStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/BooleanLiteral.ts b/koala-wrapper/src/generated/peers/BooleanLiteral.ts index afc3c3f87..771b896f9 100644 --- a/koala-wrapper/src/generated/peers/BooleanLiteral.ts +++ b/koala-wrapper/src/generated/peers/BooleanLiteral.ts @@ -51,5 +51,5 @@ export function isBooleanLiteral(node: object | undefined): node is BooleanLiter return node instanceof BooleanLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BOOLEAN_LITERAL)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BOOLEAN_LITERAL, BooleanLiteral) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BOOLEAN_LITERAL, (peer: KNativePointer) => new BooleanLiteral(peer)) } diff --git a/koala-wrapper/src/generated/peers/BreakStatement.ts b/koala-wrapper/src/generated/peers/BreakStatement.ts index ac411279f..e586f5857 100644 --- a/koala-wrapper/src/generated/peers/BreakStatement.ts +++ b/koala-wrapper/src/generated/peers/BreakStatement.ts @@ -65,5 +65,5 @@ export function isBreakStatement(node: object | undefined): node is BreakStateme return node instanceof BreakStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BREAK_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BREAK_STATEMENT, BreakStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BREAK_STATEMENT, (peer: KNativePointer) => new BreakStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/CallExpression.ts b/koala-wrapper/src/generated/peers/CallExpression.ts index 3419d2ea6..831952076 100644 --- a/koala-wrapper/src/generated/peers/CallExpression.ts +++ b/koala-wrapper/src/generated/peers/CallExpression.ts @@ -102,6 +102,6 @@ export class CallExpression extends MaybeOptionalExpression { export function isCallExpression(node: object | undefined): node is CallExpression { return node instanceof CallExpression } -if (!nodeByType.has( Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION)) { - nodeByType.set( Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION, CallExpression) +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION, (peer: KNativePointer) => new CallExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/CatchClause.ts b/koala-wrapper/src/generated/peers/CatchClause.ts index ad6cea023..e8cb9e753 100644 --- a/koala-wrapper/src/generated/peers/CatchClause.ts +++ b/koala-wrapper/src/generated/peers/CatchClause.ts @@ -62,5 +62,5 @@ export function isCatchClause(node: object | undefined): node is CatchClause { return node instanceof CatchClause } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CATCH_CLAUSE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CATCH_CLAUSE, CatchClause) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CATCH_CLAUSE, (peer: KNativePointer) => new CatchClause(peer)) } diff --git a/koala-wrapper/src/generated/peers/ChainExpression.ts b/koala-wrapper/src/generated/peers/ChainExpression.ts index 31a001886..d18013515 100644 --- a/koala-wrapper/src/generated/peers/ChainExpression.ts +++ b/koala-wrapper/src/generated/peers/ChainExpression.ts @@ -57,5 +57,5 @@ export function isChainExpression(node: object | undefined): node is ChainExpres return node instanceof ChainExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CHAIN_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CHAIN_EXPRESSION, ChainExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CHAIN_EXPRESSION, (peer: KNativePointer) => new ChainExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/CharLiteral.ts b/koala-wrapper/src/generated/peers/CharLiteral.ts index 82e593f60..c2a60ada8 100644 --- a/koala-wrapper/src/generated/peers/CharLiteral.ts +++ b/koala-wrapper/src/generated/peers/CharLiteral.ts @@ -48,5 +48,5 @@ export function isCharLiteral(node: object | undefined): node is CharLiteral { return node instanceof CharLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CHAR_LITERAL)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CHAR_LITERAL, CharLiteral) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CHAR_LITERAL, (peer: KNativePointer) => new CharLiteral(peer)) } diff --git a/koala-wrapper/src/generated/peers/ClassDeclaration.ts b/koala-wrapper/src/generated/peers/ClassDeclaration.ts index 7d8b45839..6cd985110 100644 --- a/koala-wrapper/src/generated/peers/ClassDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ClassDeclaration.ts @@ -79,5 +79,5 @@ export function isClassDeclaration(node: object | undefined): node is ClassDecla return node instanceof ClassDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION, ClassDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION, (peer: KNativePointer) => new ClassDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/ClassDefinition.ts b/koala-wrapper/src/generated/peers/ClassDefinition.ts index db80c1c72..df96d21c5 100644 --- a/koala-wrapper/src/generated/peers/ClassDefinition.ts +++ b/koala-wrapper/src/generated/peers/ClassDefinition.ts @@ -318,5 +318,5 @@ export function isClassDefinition(node: object | undefined): node is ClassDefini return node instanceof ClassDefinition } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION, ClassDefinition) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION, (peer: KNativePointer) => new ClassDefinition(peer)) } diff --git a/koala-wrapper/src/generated/peers/ClassExpression.ts b/koala-wrapper/src/generated/peers/ClassExpression.ts index c7d07d461..ef45b2cb5 100644 --- a/koala-wrapper/src/generated/peers/ClassExpression.ts +++ b/koala-wrapper/src/generated/peers/ClassExpression.ts @@ -51,5 +51,5 @@ export function isClassExpression(node: object | undefined): node is ClassExpres return node instanceof ClassExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_EXPRESSION, ClassExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_EXPRESSION, (peer: KNativePointer) => new ClassExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/ClassProperty.ts b/koala-wrapper/src/generated/peers/ClassProperty.ts index 61133afd7..3b5624637 100644 --- a/koala-wrapper/src/generated/peers/ClassProperty.ts +++ b/koala-wrapper/src/generated/peers/ClassProperty.ts @@ -111,5 +111,5 @@ export function isClassProperty(node: object | undefined): node is ClassProperty return node instanceof ClassProperty } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_PROPERTY)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_PROPERTY, ClassProperty) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_PROPERTY, (peer: KNativePointer) => new ClassProperty(peer)) } diff --git a/koala-wrapper/src/generated/peers/ClassStaticBlock.ts b/koala-wrapper/src/generated/peers/ClassStaticBlock.ts index 777a53dc6..9203b1295 100644 --- a/koala-wrapper/src/generated/peers/ClassStaticBlock.ts +++ b/koala-wrapper/src/generated/peers/ClassStaticBlock.ts @@ -55,5 +55,5 @@ export function isClassStaticBlock(node: object | undefined): node is ClassStati return node instanceof ClassStaticBlock } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_STATIC_BLOCK)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_STATIC_BLOCK, ClassStaticBlock) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_STATIC_BLOCK, (peer: KNativePointer) => new ClassStaticBlock(peer)) } diff --git a/koala-wrapper/src/generated/peers/ConditionalExpression.ts b/koala-wrapper/src/generated/peers/ConditionalExpression.ts index e5ea431be..f75834e48 100644 --- a/koala-wrapper/src/generated/peers/ConditionalExpression.ts +++ b/koala-wrapper/src/generated/peers/ConditionalExpression.ts @@ -71,5 +71,5 @@ export function isConditionalExpression(node: object | undefined): node is Condi return node instanceof ConditionalExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CONDITIONAL_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CONDITIONAL_EXPRESSION, ConditionalExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CONDITIONAL_EXPRESSION, (peer: KNativePointer) => new ConditionalExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/ContinueStatement.ts b/koala-wrapper/src/generated/peers/ContinueStatement.ts index e5e98cc99..09d65f8ec 100644 --- a/koala-wrapper/src/generated/peers/ContinueStatement.ts +++ b/koala-wrapper/src/generated/peers/ContinueStatement.ts @@ -65,5 +65,5 @@ export function isContinueStatement(node: object | undefined): node is ContinueS return node instanceof ContinueStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CONTINUE_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CONTINUE_STATEMENT, ContinueStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CONTINUE_STATEMENT, (peer: KNativePointer) => new ContinueStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/DebuggerStatement.ts b/koala-wrapper/src/generated/peers/DebuggerStatement.ts index 88d4b5f5e..9572d9102 100644 --- a/koala-wrapper/src/generated/peers/DebuggerStatement.ts +++ b/koala-wrapper/src/generated/peers/DebuggerStatement.ts @@ -47,5 +47,5 @@ export function isDebuggerStatement(node: object | undefined): node is DebuggerS return node instanceof DebuggerStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_DEBUGGER_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_DEBUGGER_STATEMENT, DebuggerStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_DEBUGGER_STATEMENT, (peer: KNativePointer) => new DebuggerStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/Decorator.ts b/koala-wrapper/src/generated/peers/Decorator.ts index cb8b932bc..38b6f1297 100644 --- a/koala-wrapper/src/generated/peers/Decorator.ts +++ b/koala-wrapper/src/generated/peers/Decorator.ts @@ -51,5 +51,5 @@ export function isDecorator(node: object | undefined): node is Decorator { return node instanceof Decorator } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_DECORATOR)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_DECORATOR, Decorator) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_DECORATOR, (peer: KNativePointer) => new Decorator(peer)) } diff --git a/koala-wrapper/src/generated/peers/DirectEvalExpression.ts b/koala-wrapper/src/generated/peers/DirectEvalExpression.ts index b8f96ba3c..7a5e13e06 100644 --- a/koala-wrapper/src/generated/peers/DirectEvalExpression.ts +++ b/koala-wrapper/src/generated/peers/DirectEvalExpression.ts @@ -49,5 +49,5 @@ export function isDirectEvalExpression(node: object | undefined): node is Direct return node instanceof DirectEvalExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_DIRECT_EVAL)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_DIRECT_EVAL, DirectEvalExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_DIRECT_EVAL, (peer: KNativePointer) => new DirectEvalExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/DoWhileStatement.ts b/koala-wrapper/src/generated/peers/DoWhileStatement.ts index 0c4a03f65..91f7dced8 100644 --- a/koala-wrapper/src/generated/peers/DoWhileStatement.ts +++ b/koala-wrapper/src/generated/peers/DoWhileStatement.ts @@ -55,5 +55,5 @@ export function isDoWhileStatement(node: object | undefined): node is DoWhileSta return node instanceof DoWhileStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_DO_WHILE_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_DO_WHILE_STATEMENT, DoWhileStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_DO_WHILE_STATEMENT, (peer: KNativePointer) => new DoWhileStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSClassLiteral.ts b/koala-wrapper/src/generated/peers/ETSClassLiteral.ts index 637367bf3..8fd3a6cb7 100644 --- a/koala-wrapper/src/generated/peers/ETSClassLiteral.ts +++ b/koala-wrapper/src/generated/peers/ETSClassLiteral.ts @@ -51,5 +51,5 @@ export function isETSClassLiteral(node: object | undefined): node is ETSClassLit return node instanceof ETSClassLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_CLASS_LITERAL)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_CLASS_LITERAL, ETSClassLiteral) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_CLASS_LITERAL, (peer: KNativePointer) => new ETSClassLiteral(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSFunctionType.ts b/koala-wrapper/src/generated/peers/ETSFunctionType.ts index 278d6fbf5..b3175de5f 100644 --- a/koala-wrapper/src/generated/peers/ETSFunctionType.ts +++ b/koala-wrapper/src/generated/peers/ETSFunctionType.ts @@ -81,5 +81,5 @@ export function isETSFunctionType(node: object | undefined): node is ETSFunction return node instanceof ETSFunctionType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE, ETSFunctionType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE, (peer: KNativePointer) => new ETSFunctionType(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts b/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts index b112bea6b..9a00aae44 100644 --- a/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ETSImportDeclaration.ts @@ -83,5 +83,5 @@ export function isETSImportDeclaration(node: object | undefined): node is ETSImp return node instanceof ETSImportDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION, ETSImportDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION, (peer: KNativePointer) => new ETSImportDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSKeyofType.ts b/koala-wrapper/src/generated/peers/ETSKeyofType.ts index 902599c00..6511ab715 100644 --- a/koala-wrapper/src/generated/peers/ETSKeyofType.ts +++ b/koala-wrapper/src/generated/peers/ETSKeyofType.ts @@ -50,5 +50,5 @@ export function isETSKeyofType(node: object | undefined): node is ETSKeyofType { return node instanceof ETSKeyofType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_KEYOF_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_KEYOF_TYPE, ETSKeyofType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_KEYOF_TYPE, (peer: KNativePointer) => new ETSKeyofType(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ETSModule.ts b/koala-wrapper/src/generated/peers/ETSModule.ts index 7f2b2a7c8..1dde141d5 100644 --- a/koala-wrapper/src/generated/peers/ETSModule.ts +++ b/koala-wrapper/src/generated/peers/ETSModule.ts @@ -117,5 +117,5 @@ export function isETSModule(node: object | undefined): node is ETSModule { return node instanceof ETSModule } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE, ETSModule) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE, (peer: KNativePointer) => new ETSModule(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSNewArrayInstanceExpression.ts b/koala-wrapper/src/generated/peers/ETSNewArrayInstanceExpression.ts index b02567e1e..a6023fb41 100644 --- a/koala-wrapper/src/generated/peers/ETSNewArrayInstanceExpression.ts +++ b/koala-wrapper/src/generated/peers/ETSNewArrayInstanceExpression.ts @@ -64,5 +64,5 @@ export function isETSNewArrayInstanceExpression(node: object | undefined): node return node instanceof ETSNewArrayInstanceExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION, ETSNewArrayInstanceExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION, (peer: KNativePointer) => new ETSNewArrayInstanceExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSNewClassInstanceExpression.ts b/koala-wrapper/src/generated/peers/ETSNewClassInstanceExpression.ts index e67d29d37..25e1d31d4 100644 --- a/koala-wrapper/src/generated/peers/ETSNewClassInstanceExpression.ts +++ b/koala-wrapper/src/generated/peers/ETSNewClassInstanceExpression.ts @@ -66,5 +66,5 @@ export function isETSNewClassInstanceExpression(node: object | undefined): node return node instanceof ETSNewClassInstanceExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION, ETSNewClassInstanceExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION, (peer: KNativePointer) => new ETSNewClassInstanceExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts b/koala-wrapper/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts index 1f37f6f94..6db804a81 100644 --- a/koala-wrapper/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts +++ b/koala-wrapper/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts @@ -62,5 +62,5 @@ export function isETSNewMultiDimArrayInstanceExpression(node: object | undefined return node instanceof ETSNewMultiDimArrayInstanceExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION, ETSNewMultiDimArrayInstanceExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION, (peer: KNativePointer) => new ETSNewMultiDimArrayInstanceExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSNullType.ts b/koala-wrapper/src/generated/peers/ETSNullType.ts index 0000df8c0..c17dfa926 100644 --- a/koala-wrapper/src/generated/peers/ETSNullType.ts +++ b/koala-wrapper/src/generated/peers/ETSNullType.ts @@ -47,5 +47,5 @@ export function isETSNullType(node: object | undefined): node is ETSNullType { return node instanceof ETSNullType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NULL_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NULL_TYPE, ETSNullType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NULL_TYPE, (peer: KNativePointer) => new ETSNullType(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSPackageDeclaration.ts b/koala-wrapper/src/generated/peers/ETSPackageDeclaration.ts index 15a7ce07a..21c151c52 100644 --- a/koala-wrapper/src/generated/peers/ETSPackageDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ETSPackageDeclaration.ts @@ -48,5 +48,5 @@ export function isETSPackageDeclaration(node: object | undefined): node is ETSPa return node instanceof ETSPackageDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PACKAGE_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PACKAGE_DECLARATION, ETSPackageDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PACKAGE_DECLARATION, (peer: KNativePointer) => new ETSPackageDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSParameterExpression.ts b/koala-wrapper/src/generated/peers/ETSParameterExpression.ts index 797625311..6b8932465 100644 --- a/koala-wrapper/src/generated/peers/ETSParameterExpression.ts +++ b/koala-wrapper/src/generated/peers/ETSParameterExpression.ts @@ -151,5 +151,5 @@ export function isETSParameterExpression(node: object | undefined): node is ETSP return node instanceof ETSParameterExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION, ETSParameterExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION, (peer: KNativePointer) => new ETSParameterExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSPrimitiveType.ts b/koala-wrapper/src/generated/peers/ETSPrimitiveType.ts index 79de1e5ab..1bd657395 100644 --- a/koala-wrapper/src/generated/peers/ETSPrimitiveType.ts +++ b/koala-wrapper/src/generated/peers/ETSPrimitiveType.ts @@ -51,5 +51,5 @@ export function isETSPrimitiveType(node: object | undefined): node is ETSPrimiti return node instanceof ETSPrimitiveType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE, ETSPrimitiveType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE, (peer: KNativePointer) => new ETSPrimitiveType(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSReExportDeclaration.ts b/koala-wrapper/src/generated/peers/ETSReExportDeclaration.ts index 32c4084b7..a69394814 100644 --- a/koala-wrapper/src/generated/peers/ETSReExportDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ETSReExportDeclaration.ts @@ -48,5 +48,5 @@ export function isETSReExportDeclaration(node: object | undefined): node is ETSR return node instanceof ETSReExportDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_REEXPORT_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_REEXPORT_STATEMENT, ETSReExportDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_REEXPORT_STATEMENT, (peer: KNativePointer) => new ETSReExportDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSStringLiteralType.ts b/koala-wrapper/src/generated/peers/ETSStringLiteralType.ts index 7578d9521..a0fd65f84 100644 --- a/koala-wrapper/src/generated/peers/ETSStringLiteralType.ts +++ b/koala-wrapper/src/generated/peers/ETSStringLiteralType.ts @@ -47,5 +47,5 @@ export function isETSStringLiteralType(node: object | undefined): node is ETSStr return node instanceof ETSStringLiteralType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE, ETSStringLiteralType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE, (peer: KNativePointer) => new ETSStringLiteralType(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/ETSStructDeclaration.ts b/koala-wrapper/src/generated/peers/ETSStructDeclaration.ts index 7963338c7..2bdb64ae9 100644 --- a/koala-wrapper/src/generated/peers/ETSStructDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ETSStructDeclaration.ts @@ -48,5 +48,5 @@ export function isETSStructDeclaration(node: object | undefined): node is ETSStr return node instanceof ETSStructDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION, ETSStructDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION, (peer: KNativePointer) => new ETSStructDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSTuple.ts b/koala-wrapper/src/generated/peers/ETSTuple.ts index dcd0b2903..30e609cac 100644 --- a/koala-wrapper/src/generated/peers/ETSTuple.ts +++ b/koala-wrapper/src/generated/peers/ETSTuple.ts @@ -70,5 +70,5 @@ export function isETSTuple(node: object | undefined): node is ETSTuple { return node instanceof ETSTuple } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE, ETSTuple) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE, (peer: KNativePointer) => new ETSTuple(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSTypeReference.ts b/koala-wrapper/src/generated/peers/ETSTypeReference.ts index fa35d9a2e..e59b3c8d1 100644 --- a/koala-wrapper/src/generated/peers/ETSTypeReference.ts +++ b/koala-wrapper/src/generated/peers/ETSTypeReference.ts @@ -55,5 +55,5 @@ export function isETSTypeReference(node: object | undefined): node is ETSTypeRef return node instanceof ETSTypeReference } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE, ETSTypeReference) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE, (peer: KNativePointer) => new ETSTypeReference(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSTypeReferencePart.ts b/koala-wrapper/src/generated/peers/ETSTypeReferencePart.ts index e77a9809d..1d906f330 100644 --- a/koala-wrapper/src/generated/peers/ETSTypeReferencePart.ts +++ b/koala-wrapper/src/generated/peers/ETSTypeReferencePart.ts @@ -65,5 +65,5 @@ export function isETSTypeReferencePart(node: object | undefined): node is ETSTyp return node instanceof ETSTypeReferencePart } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART, ETSTypeReferencePart) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART, (peer: KNativePointer) => new ETSTypeReferencePart(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSUndefinedType.ts b/koala-wrapper/src/generated/peers/ETSUndefinedType.ts index 319b152fd..48d2554ba 100644 --- a/koala-wrapper/src/generated/peers/ETSUndefinedType.ts +++ b/koala-wrapper/src/generated/peers/ETSUndefinedType.ts @@ -47,5 +47,5 @@ export function isETSUndefinedType(node: object | undefined): node is ETSUndefin return node instanceof ETSUndefinedType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNDEFINED_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNDEFINED_TYPE, ETSUndefinedType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNDEFINED_TYPE, (peer: KNativePointer) => new ETSUndefinedType(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSUnionType.ts b/koala-wrapper/src/generated/peers/ETSUnionType.ts index 8039c3d64..bfa93a7a9 100644 --- a/koala-wrapper/src/generated/peers/ETSUnionType.ts +++ b/koala-wrapper/src/generated/peers/ETSUnionType.ts @@ -55,5 +55,5 @@ export function isETSUnionType(node: object | undefined): node is ETSUnionType { return node instanceof ETSUnionType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNION_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNION_TYPE, ETSUnionType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNION_TYPE, (peer: KNativePointer) => new ETSUnionType(peer)) } diff --git a/koala-wrapper/src/generated/peers/ETSWildcardType.ts b/koala-wrapper/src/generated/peers/ETSWildcardType.ts index 5fda5aa79..5ec4b50b2 100644 --- a/koala-wrapper/src/generated/peers/ETSWildcardType.ts +++ b/koala-wrapper/src/generated/peers/ETSWildcardType.ts @@ -52,5 +52,5 @@ export function isETSWildcardType(node: object | undefined): node is ETSWildcard return node instanceof ETSWildcardType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_WILDCARD_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_WILDCARD_TYPE, ETSWildcardType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_WILDCARD_TYPE, (peer: KNativePointer) => new ETSWildcardType(peer)) } diff --git a/koala-wrapper/src/generated/peers/EmptyStatement.ts b/koala-wrapper/src/generated/peers/EmptyStatement.ts index 6dd676df8..95a8698d8 100644 --- a/koala-wrapper/src/generated/peers/EmptyStatement.ts +++ b/koala-wrapper/src/generated/peers/EmptyStatement.ts @@ -53,5 +53,5 @@ export function isEmptyStatement(node: object | undefined): node is EmptyStateme return node instanceof EmptyStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EMPTY_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EMPTY_STATEMENT, EmptyStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EMPTY_STATEMENT, (peer: KNativePointer) => new EmptyStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/ExportAllDeclaration.ts b/koala-wrapper/src/generated/peers/ExportAllDeclaration.ts index 0c5e310e4..9e5628c96 100644 --- a/koala-wrapper/src/generated/peers/ExportAllDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ExportAllDeclaration.ts @@ -55,5 +55,5 @@ export function isExportAllDeclaration(node: object | undefined): node is Export return node instanceof ExportAllDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_ALL_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_ALL_DECLARATION, ExportAllDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_ALL_DECLARATION, (peer: KNativePointer) => new ExportAllDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/ExportDefaultDeclaration.ts b/koala-wrapper/src/generated/peers/ExportDefaultDeclaration.ts index 63f9a3806..6cbde16bf 100644 --- a/koala-wrapper/src/generated/peers/ExportDefaultDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ExportDefaultDeclaration.ts @@ -53,5 +53,5 @@ export function isExportDefaultDeclaration(node: object | undefined): node is Ex return node instanceof ExportDefaultDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION, ExportDefaultDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION, (peer: KNativePointer) => new ExportDefaultDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/ExportNamedDeclaration.ts b/koala-wrapper/src/generated/peers/ExportNamedDeclaration.ts index bb7836946..72d7765b2 100644 --- a/koala-wrapper/src/generated/peers/ExportNamedDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ExportNamedDeclaration.ts @@ -75,5 +75,5 @@ export function isExportNamedDeclaration(node: object | undefined): node is Expo return node instanceof ExportNamedDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION, ExportNamedDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION, (peer: KNativePointer) => new ExportNamedDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/ExportSpecifier.ts b/koala-wrapper/src/generated/peers/ExportSpecifier.ts index 646825d26..7f438a9b0 100644 --- a/koala-wrapper/src/generated/peers/ExportSpecifier.ts +++ b/koala-wrapper/src/generated/peers/ExportSpecifier.ts @@ -71,5 +71,5 @@ export function isExportSpecifier(node: object | undefined): node is ExportSpeci return node instanceof ExportSpecifier } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_SPECIFIER)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_SPECIFIER, ExportSpecifier) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_SPECIFIER, (peer: KNativePointer) => new ExportSpecifier(peer)) } diff --git a/koala-wrapper/src/generated/peers/ExpressionStatement.ts b/koala-wrapper/src/generated/peers/ExpressionStatement.ts index a0f0a5e9d..8be19252f 100644 --- a/koala-wrapper/src/generated/peers/ExpressionStatement.ts +++ b/koala-wrapper/src/generated/peers/ExpressionStatement.ts @@ -56,5 +56,5 @@ export function isExpressionStatement(node: object | undefined): node is Express return node instanceof ExpressionStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPRESSION_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPRESSION_STATEMENT, ExpressionStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPRESSION_STATEMENT, (peer: KNativePointer) => new ExpressionStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/ForInStatement.ts b/koala-wrapper/src/generated/peers/ForInStatement.ts index 8fde9515e..6a6393aa6 100644 --- a/koala-wrapper/src/generated/peers/ForInStatement.ts +++ b/koala-wrapper/src/generated/peers/ForInStatement.ts @@ -58,5 +58,5 @@ export function isForInStatement(node: object | undefined): node is ForInStateme return node instanceof ForInStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_IN_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_IN_STATEMENT, ForInStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_IN_STATEMENT, (peer: KNativePointer) => new ForInStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/ForOfStatement.ts b/koala-wrapper/src/generated/peers/ForOfStatement.ts index 6fa6c83d2..9e62e7370 100644 --- a/koala-wrapper/src/generated/peers/ForOfStatement.ts +++ b/koala-wrapper/src/generated/peers/ForOfStatement.ts @@ -61,5 +61,5 @@ export function isForOfStatement(node: object | undefined): node is ForOfStateme return node instanceof ForOfStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_OF_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_OF_STATEMENT, ForOfStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_OF_STATEMENT, (peer: KNativePointer) => new ForOfStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/ForUpdateStatement.ts b/koala-wrapper/src/generated/peers/ForUpdateStatement.ts index 30faa2881..fa81df574 100644 --- a/koala-wrapper/src/generated/peers/ForUpdateStatement.ts +++ b/koala-wrapper/src/generated/peers/ForUpdateStatement.ts @@ -58,5 +58,5 @@ export function isForUpdateStatement(node: object | undefined): node is ForUpdat return node instanceof ForUpdateStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_UPDATE_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_UPDATE_STATEMENT, ForUpdateStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_UPDATE_STATEMENT, (peer: KNativePointer) => new ForUpdateStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/FunctionDeclaration.ts b/koala-wrapper/src/generated/peers/FunctionDeclaration.ts index 02e26f717..64f03a75a 100644 --- a/koala-wrapper/src/generated/peers/FunctionDeclaration.ts +++ b/koala-wrapper/src/generated/peers/FunctionDeclaration.ts @@ -98,5 +98,5 @@ export function isFunctionDeclaration(node: object | undefined): node is Functio return node instanceof FunctionDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION, FunctionDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION, (peer: KNativePointer) => new FunctionDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/FunctionExpression.ts b/koala-wrapper/src/generated/peers/FunctionExpression.ts index dd98ed64b..733a60891 100644 --- a/koala-wrapper/src/generated/peers/FunctionExpression.ts +++ b/koala-wrapper/src/generated/peers/FunctionExpression.ts @@ -61,5 +61,5 @@ export function isFunctionExpression(node: object | undefined): node is Function return node instanceof FunctionExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_EXPRESSION, FunctionExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_EXPRESSION, (peer: KNativePointer) => new FunctionExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/Identifier.ts b/koala-wrapper/src/generated/peers/Identifier.ts index 3c17208ad..dc4f5c318 100644 --- a/koala-wrapper/src/generated/peers/Identifier.ts +++ b/koala-wrapper/src/generated/peers/Identifier.ts @@ -162,5 +162,5 @@ export function isIdentifier(node: object | undefined): node is Identifier { return node instanceof Identifier } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER, Identifier) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER, (peer: KNativePointer) => new Identifier(peer)) } diff --git a/koala-wrapper/src/generated/peers/IfStatement.ts b/koala-wrapper/src/generated/peers/IfStatement.ts index ccb66ed66..51f79695b 100644 --- a/koala-wrapper/src/generated/peers/IfStatement.ts +++ b/koala-wrapper/src/generated/peers/IfStatement.ts @@ -67,5 +67,5 @@ export function isIfStatement(node: object | undefined): node is IfStatement { return node instanceof IfStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IF_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IF_STATEMENT, IfStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IF_STATEMENT, (peer: KNativePointer) => new IfStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/ImportDeclaration.ts b/koala-wrapper/src/generated/peers/ImportDeclaration.ts index eaed6d450..362545dd7 100644 --- a/koala-wrapper/src/generated/peers/ImportDeclaration.ts +++ b/koala-wrapper/src/generated/peers/ImportDeclaration.ts @@ -58,5 +58,5 @@ export function isImportDeclaration(node: AstNode): node is ImportDeclaration { return node instanceof ImportDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DECLARATION, ImportDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DECLARATION, (peer: KNativePointer) => new ImportDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/ImportDefaultSpecifier.ts b/koala-wrapper/src/generated/peers/ImportDefaultSpecifier.ts index 73fb9da42..108110c2b 100644 --- a/koala-wrapper/src/generated/peers/ImportDefaultSpecifier.ts +++ b/koala-wrapper/src/generated/peers/ImportDefaultSpecifier.ts @@ -51,5 +51,5 @@ export function isImportDefaultSpecifier(node: object | undefined): node is Impo return node instanceof ImportDefaultSpecifier } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER, ImportDefaultSpecifier) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER, (peer: KNativePointer) => new ImportDefaultSpecifier(peer)) } diff --git a/koala-wrapper/src/generated/peers/ImportExpression.ts b/koala-wrapper/src/generated/peers/ImportExpression.ts index 93f7db230..1470689f2 100644 --- a/koala-wrapper/src/generated/peers/ImportExpression.ts +++ b/koala-wrapper/src/generated/peers/ImportExpression.ts @@ -50,5 +50,5 @@ export function isImportExpression(node: object | undefined): node is ImportExpr return node instanceof ImportExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_EXPRESSION, ImportExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_EXPRESSION, (peer: KNativePointer) => new ImportExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/ImportNamespaceSpecifier.ts b/koala-wrapper/src/generated/peers/ImportNamespaceSpecifier.ts index 6d3974c27..f5e509572 100644 --- a/koala-wrapper/src/generated/peers/ImportNamespaceSpecifier.ts +++ b/koala-wrapper/src/generated/peers/ImportNamespaceSpecifier.ts @@ -51,5 +51,5 @@ export function isImportNamespaceSpecifier(node: object | undefined): node is Im return node instanceof ImportNamespaceSpecifier } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER, ImportNamespaceSpecifier) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER, (peer: KNativePointer) => new ImportNamespaceSpecifier(peer)) } diff --git a/koala-wrapper/src/generated/peers/ImportSpecifier.ts b/koala-wrapper/src/generated/peers/ImportSpecifier.ts index f904140db..5c6ec34c9 100644 --- a/koala-wrapper/src/generated/peers/ImportSpecifier.ts +++ b/koala-wrapper/src/generated/peers/ImportSpecifier.ts @@ -62,5 +62,5 @@ export function isImportSpecifier(node: object | undefined): node is ImportSpeci return node instanceof ImportSpecifier } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_SPECIFIER)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_SPECIFIER, ImportSpecifier) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_SPECIFIER, (peer: KNativePointer) => new ImportSpecifier(peer)) } diff --git a/koala-wrapper/src/generated/peers/LabelledStatement.ts b/koala-wrapper/src/generated/peers/LabelledStatement.ts index 433bb9198..2452457fa 100644 --- a/koala-wrapper/src/generated/peers/LabelledStatement.ts +++ b/koala-wrapper/src/generated/peers/LabelledStatement.ts @@ -57,5 +57,5 @@ export function isLabelledStatement(node: object | undefined): node is LabelledS return node instanceof LabelledStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_LABELLED_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_LABELLED_STATEMENT, LabelledStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_LABELLED_STATEMENT, (peer: KNativePointer) => new LabelledStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/MemberExpression.ts b/koala-wrapper/src/generated/peers/MemberExpression.ts index 6e5dec8e6..8faf665af 100644 --- a/koala-wrapper/src/generated/peers/MemberExpression.ts +++ b/koala-wrapper/src/generated/peers/MemberExpression.ts @@ -108,5 +108,5 @@ export function isMemberExpression(node: object | undefined): node is MemberExpr return node instanceof MemberExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_MEMBER_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_MEMBER_EXPRESSION, MemberExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_MEMBER_EXPRESSION, (peer: KNativePointer) => new MemberExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/MetaProperty.ts b/koala-wrapper/src/generated/peers/MetaProperty.ts index 2e84a4977..7d1b0a3b0 100644 --- a/koala-wrapper/src/generated/peers/MetaProperty.ts +++ b/koala-wrapper/src/generated/peers/MetaProperty.ts @@ -51,5 +51,5 @@ export function isMetaProperty(node: object | undefined): node is MetaProperty { return node instanceof MetaProperty } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_META_PROPERTY_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_META_PROPERTY_EXPRESSION, MetaProperty) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_META_PROPERTY_EXPRESSION, (peer: KNativePointer) => new MetaProperty(peer)) } diff --git a/koala-wrapper/src/generated/peers/MethodDefinition.ts b/koala-wrapper/src/generated/peers/MethodDefinition.ts index 13342ae64..3c37f246c 100644 --- a/koala-wrapper/src/generated/peers/MethodDefinition.ts +++ b/koala-wrapper/src/generated/peers/MethodDefinition.ts @@ -129,5 +129,5 @@ export function isMethodDefinition(node: object | undefined): node is MethodDefi return node instanceof MethodDefinition } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_METHOD_DEFINITION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_METHOD_DEFINITION, MethodDefinition) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_METHOD_DEFINITION, (peer: KNativePointer) => new MethodDefinition(peer)) } diff --git a/koala-wrapper/src/generated/peers/NamedType.ts b/koala-wrapper/src/generated/peers/NamedType.ts index 29a79f857..ddbde81ff 100644 --- a/koala-wrapper/src/generated/peers/NamedType.ts +++ b/koala-wrapper/src/generated/peers/NamedType.ts @@ -73,5 +73,5 @@ export function isNamedType(node: object | undefined): node is NamedType { return node instanceof NamedType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_NAMED_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_NAMED_TYPE, NamedType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_NAMED_TYPE, (peer: KNativePointer) => new NamedType(peer)) } diff --git a/koala-wrapper/src/generated/peers/NewExpression.ts b/koala-wrapper/src/generated/peers/NewExpression.ts index e7518c865..eac849468 100644 --- a/koala-wrapper/src/generated/peers/NewExpression.ts +++ b/koala-wrapper/src/generated/peers/NewExpression.ts @@ -53,5 +53,5 @@ export function isNewExpression(node: object | undefined): node is NewExpression return node instanceof NewExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_NEW_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_NEW_EXPRESSION, NewExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_NEW_EXPRESSION, (peer: KNativePointer) => new NewExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/NullLiteral.ts b/koala-wrapper/src/generated/peers/NullLiteral.ts index d34e63a64..fd6ccb30e 100644 --- a/koala-wrapper/src/generated/peers/NullLiteral.ts +++ b/koala-wrapper/src/generated/peers/NullLiteral.ts @@ -47,5 +47,5 @@ export function isNullLiteral(node: object | undefined): node is NullLiteral { return node instanceof NullLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_NULL_LITERAL)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_NULL_LITERAL, NullLiteral) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_NULL_LITERAL, (peer: KNativePointer) => new NullLiteral(peer)) } diff --git a/koala-wrapper/src/generated/peers/NumberLiteral.ts b/koala-wrapper/src/generated/peers/NumberLiteral.ts index c6f720610..6ad1a6aa1 100644 --- a/koala-wrapper/src/generated/peers/NumberLiteral.ts +++ b/koala-wrapper/src/generated/peers/NumberLiteral.ts @@ -59,5 +59,5 @@ export function isNumberLiteral(node: object | undefined): node is NumberLiteral return node instanceof NumberLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL, NumberLiteral) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL, (peer: KNativePointer) => new NumberLiteral(peer)) } diff --git a/koala-wrapper/src/generated/peers/ObjectExpression.ts b/koala-wrapper/src/generated/peers/ObjectExpression.ts index 4909445fd..2b807cf37 100644 --- a/koala-wrapper/src/generated/peers/ObjectExpression.ts +++ b/koala-wrapper/src/generated/peers/ObjectExpression.ts @@ -87,5 +87,5 @@ export function isObjectExpression(node: object | undefined): node is ObjectExpr return node instanceof ObjectExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION, ObjectExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION, (peer: KNativePointer) => new ObjectExpression(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/OmittedExpression.ts b/koala-wrapper/src/generated/peers/OmittedExpression.ts index 4c56847b7..08dde5865 100644 --- a/koala-wrapper/src/generated/peers/OmittedExpression.ts +++ b/koala-wrapper/src/generated/peers/OmittedExpression.ts @@ -47,5 +47,5 @@ export function isOmittedExpression(node: object | undefined): node is OmittedEx return node instanceof OmittedExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_OMITTED_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_OMITTED_EXPRESSION, OmittedExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_OMITTED_EXPRESSION, (peer: KNativePointer) => new OmittedExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/OpaqueTypeNode.ts b/koala-wrapper/src/generated/peers/OpaqueTypeNode.ts index 763e54bef..55a32aa88 100644 --- a/koala-wrapper/src/generated/peers/OpaqueTypeNode.ts +++ b/koala-wrapper/src/generated/peers/OpaqueTypeNode.ts @@ -47,5 +47,5 @@ export function isOpaqueTypeNode(node: object | undefined): node is OpaqueTypeNo return node instanceof OpaqueTypeNode } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_OPAQUE_TYPE_NODE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_OPAQUE_TYPE_NODE, OpaqueTypeNode) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_OPAQUE_TYPE_NODE, (peer: KNativePointer) => new OpaqueTypeNode(peer)) } diff --git a/koala-wrapper/src/generated/peers/PrefixAssertionExpression.ts b/koala-wrapper/src/generated/peers/PrefixAssertionExpression.ts index 6c77c1633..15c4176c5 100644 --- a/koala-wrapper/src/generated/peers/PrefixAssertionExpression.ts +++ b/koala-wrapper/src/generated/peers/PrefixAssertionExpression.ts @@ -54,5 +54,5 @@ export function isPrefixAssertionExpression(node: object | undefined): node is P return node instanceof PrefixAssertionExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION, PrefixAssertionExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION, (peer: KNativePointer) => new PrefixAssertionExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/Property.ts b/koala-wrapper/src/generated/peers/Property.ts index d50532751..d11af5652 100644 --- a/koala-wrapper/src/generated/peers/Property.ts +++ b/koala-wrapper/src/generated/peers/Property.ts @@ -83,5 +83,5 @@ export function isProperty(node: object | undefined): node is Property { return node instanceof Property } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY, Property) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY, (peer: KNativePointer) => new Property(peer)) } diff --git a/koala-wrapper/src/generated/peers/RegExpLiteral.ts b/koala-wrapper/src/generated/peers/RegExpLiteral.ts index 937b9621b..4b37cbab7 100644 --- a/koala-wrapper/src/generated/peers/RegExpLiteral.ts +++ b/koala-wrapper/src/generated/peers/RegExpLiteral.ts @@ -54,5 +54,5 @@ export function isRegExpLiteral(node: object | undefined): node is RegExpLiteral return node instanceof RegExpLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_REGEXP_LITERAL)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_REGEXP_LITERAL, RegExpLiteral) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_REGEXP_LITERAL, (peer: KNativePointer) => new RegExpLiteral(peer)) } diff --git a/koala-wrapper/src/generated/peers/ReturnStatement.ts b/koala-wrapper/src/generated/peers/ReturnStatement.ts index aa11d63cc..7f554ba41 100644 --- a/koala-wrapper/src/generated/peers/ReturnStatement.ts +++ b/koala-wrapper/src/generated/peers/ReturnStatement.ts @@ -57,5 +57,5 @@ export function isReturnStatement(node: object | undefined): node is ReturnState return node instanceof ReturnStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT, ReturnStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT, (peer: KNativePointer) => new ReturnStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/ScriptFunction.ts b/koala-wrapper/src/generated/peers/ScriptFunction.ts index 0e91939c4..c482d0ed2 100644 --- a/koala-wrapper/src/generated/peers/ScriptFunction.ts +++ b/koala-wrapper/src/generated/peers/ScriptFunction.ts @@ -272,5 +272,5 @@ export function isScriptFunction(node: object | undefined): node is ScriptFuncti return node instanceof ScriptFunction } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION, ScriptFunction) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION, (peer: KNativePointer) => new ScriptFunction(peer)) } diff --git a/koala-wrapper/src/generated/peers/SequenceExpression.ts b/koala-wrapper/src/generated/peers/SequenceExpression.ts index e826f6e80..7e6d6b9d4 100644 --- a/koala-wrapper/src/generated/peers/SequenceExpression.ts +++ b/koala-wrapper/src/generated/peers/SequenceExpression.ts @@ -50,5 +50,5 @@ export function isSequenceExpression(node: object | undefined): node is Sequence return node instanceof SequenceExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SEQUENCE_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SEQUENCE_EXPRESSION, SequenceExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SEQUENCE_EXPRESSION, (peer: KNativePointer) => new SequenceExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/StringLiteral.ts b/koala-wrapper/src/generated/peers/StringLiteral.ts index 4ada461ae..5dc405511 100644 --- a/koala-wrapper/src/generated/peers/StringLiteral.ts +++ b/koala-wrapper/src/generated/peers/StringLiteral.ts @@ -53,5 +53,5 @@ export function isStringLiteral(node: object | undefined): node is StringLiteral return node instanceof StringLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL, StringLiteral) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL, (peer: KNativePointer) => new StringLiteral(peer)) } diff --git a/koala-wrapper/src/generated/peers/SuperExpression.ts b/koala-wrapper/src/generated/peers/SuperExpression.ts index b8fff84da..be0117333 100644 --- a/koala-wrapper/src/generated/peers/SuperExpression.ts +++ b/koala-wrapper/src/generated/peers/SuperExpression.ts @@ -47,5 +47,5 @@ export function isSuperExpression(node: object | undefined): node is SuperExpres return node instanceof SuperExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION, SuperExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION, (peer: KNativePointer) => new SuperExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/SwitchCaseStatement.ts b/koala-wrapper/src/generated/peers/SwitchCaseStatement.ts index c24d3ee11..05a4a06e0 100644 --- a/koala-wrapper/src/generated/peers/SwitchCaseStatement.ts +++ b/koala-wrapper/src/generated/peers/SwitchCaseStatement.ts @@ -59,5 +59,5 @@ export function isSwitchCaseStatement(node: object | undefined): node is SwitchC return node instanceof SwitchCaseStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT, SwitchCaseStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT, (peer: KNativePointer) => new SwitchCaseStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/SwitchStatement.ts b/koala-wrapper/src/generated/peers/SwitchStatement.ts index 96f2179dd..5f020302b 100644 --- a/koala-wrapper/src/generated/peers/SwitchStatement.ts +++ b/koala-wrapper/src/generated/peers/SwitchStatement.ts @@ -60,5 +60,5 @@ export function isSwitchStatement(node: object | undefined): node is SwitchState return node instanceof SwitchStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT, SwitchStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT, (peer: KNativePointer) => new SwitchStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSAnyKeyword.ts b/koala-wrapper/src/generated/peers/TSAnyKeyword.ts index 9fd173cc2..7a113fd99 100644 --- a/koala-wrapper/src/generated/peers/TSAnyKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSAnyKeyword.ts @@ -47,5 +47,5 @@ export function isTSAnyKeyword(node: object | undefined): node is TSAnyKeyword { return node instanceof TSAnyKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ANY_KEYWORD)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ANY_KEYWORD, TSAnyKeyword) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ANY_KEYWORD, (peer: KNativePointer) => new TSAnyKeyword(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSArrayType.ts b/koala-wrapper/src/generated/peers/TSArrayType.ts index 15718c2f2..3129eef35 100644 --- a/koala-wrapper/src/generated/peers/TSArrayType.ts +++ b/koala-wrapper/src/generated/peers/TSArrayType.ts @@ -50,5 +50,5 @@ export function isTSArrayType(node: object | undefined): node is TSArrayType { return node instanceof TSArrayType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ARRAY_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ARRAY_TYPE, TSArrayType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ARRAY_TYPE, (peer: KNativePointer) => new TSArrayType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSAsExpression.ts b/koala-wrapper/src/generated/peers/TSAsExpression.ts index 03b7e91b5..ef55713ca 100644 --- a/koala-wrapper/src/generated/peers/TSAsExpression.ts +++ b/koala-wrapper/src/generated/peers/TSAsExpression.ts @@ -73,5 +73,5 @@ export function isTSAsExpression(node: object | undefined): node is TSAsExpressi return node instanceof TSAsExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_AS_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_AS_EXPRESSION, TSAsExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_AS_EXPRESSION, (peer: KNativePointer) => new TSAsExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSBigintKeyword.ts b/koala-wrapper/src/generated/peers/TSBigintKeyword.ts index eebccba9a..32c455fbf 100644 --- a/koala-wrapper/src/generated/peers/TSBigintKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSBigintKeyword.ts @@ -47,5 +47,5 @@ export function isTSBigintKeyword(node: object | undefined): node is TSBigintKey return node instanceof TSBigintKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_BIGINT_KEYWORD)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_BIGINT_KEYWORD, TSBigintKeyword) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_BIGINT_KEYWORD, (peer: KNativePointer) => new TSBigintKeyword(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSBooleanKeyword.ts b/koala-wrapper/src/generated/peers/TSBooleanKeyword.ts index d9467540d..2e3b27f21 100644 --- a/koala-wrapper/src/generated/peers/TSBooleanKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSBooleanKeyword.ts @@ -47,5 +47,5 @@ export function isTSBooleanKeyword(node: object | undefined): node is TSBooleanK return node instanceof TSBooleanKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_BOOLEAN_KEYWORD)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_BOOLEAN_KEYWORD, TSBooleanKeyword) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_BOOLEAN_KEYWORD, (peer: KNativePointer) => new TSBooleanKeyword(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSClassImplements.ts b/koala-wrapper/src/generated/peers/TSClassImplements.ts index a54e488a3..9875fd54d 100644 --- a/koala-wrapper/src/generated/peers/TSClassImplements.ts +++ b/koala-wrapper/src/generated/peers/TSClassImplements.ts @@ -57,5 +57,5 @@ export function isTSClassImplements(node: object | undefined): node is TSClassIm return node instanceof TSClassImplements } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CLASS_IMPLEMENTS)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CLASS_IMPLEMENTS, TSClassImplements) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CLASS_IMPLEMENTS, (peer: KNativePointer) => new TSClassImplements(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSConditionalType.ts b/koala-wrapper/src/generated/peers/TSConditionalType.ts index eb99666f3..8011c1432 100644 --- a/koala-wrapper/src/generated/peers/TSConditionalType.ts +++ b/koala-wrapper/src/generated/peers/TSConditionalType.ts @@ -60,5 +60,5 @@ export function isTSConditionalType(node: object | undefined): node is TSConditi return node instanceof TSConditionalType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONDITIONAL_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONDITIONAL_TYPE, TSConditionalType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONDITIONAL_TYPE, (peer: KNativePointer) => new TSConditionalType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSConstructorType.ts b/koala-wrapper/src/generated/peers/TSConstructorType.ts index 16c019727..d83b8b9ec 100644 --- a/koala-wrapper/src/generated/peers/TSConstructorType.ts +++ b/koala-wrapper/src/generated/peers/TSConstructorType.ts @@ -62,5 +62,5 @@ export function isTSConstructorType(node: object | undefined): node is TSConstru return node instanceof TSConstructorType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE, TSConstructorType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE, (peer: KNativePointer) => new TSConstructorType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSEnumDeclaration.ts b/koala-wrapper/src/generated/peers/TSEnumDeclaration.ts index 31edab47d..df8ef7a6f 100644 --- a/koala-wrapper/src/generated/peers/TSEnumDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSEnumDeclaration.ts @@ -114,5 +114,5 @@ export function isTSEnumDeclaration(node: object | undefined): node is TSEnumDec return node instanceof TSEnumDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_DECLARATION, TSEnumDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_DECLARATION, (peer: KNativePointer) => new TSEnumDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSEnumMember.ts b/koala-wrapper/src/generated/peers/TSEnumMember.ts index e351bd3aa..eec797a4e 100644 --- a/koala-wrapper/src/generated/peers/TSEnumMember.ts +++ b/koala-wrapper/src/generated/peers/TSEnumMember.ts @@ -63,5 +63,5 @@ export function isTSEnumMember(node: object | undefined): node is TSEnumMember { return node instanceof TSEnumMember } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_MEMBER)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_MEMBER, TSEnumMember) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_MEMBER, (peer: KNativePointer) => new TSEnumMember(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSExternalModuleReference.ts b/koala-wrapper/src/generated/peers/TSExternalModuleReference.ts index cb53bac66..f16c413eb 100644 --- a/koala-wrapper/src/generated/peers/TSExternalModuleReference.ts +++ b/koala-wrapper/src/generated/peers/TSExternalModuleReference.ts @@ -50,5 +50,5 @@ export function isTSExternalModuleReference(node: object | undefined): node is T return node instanceof TSExternalModuleReference } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE, TSExternalModuleReference) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE, (peer: KNativePointer) => new TSExternalModuleReference(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSFunctionType.ts b/koala-wrapper/src/generated/peers/TSFunctionType.ts index 8b8c8808b..4f4af1798 100644 --- a/koala-wrapper/src/generated/peers/TSFunctionType.ts +++ b/koala-wrapper/src/generated/peers/TSFunctionType.ts @@ -64,5 +64,5 @@ export function isTSFunctionType(node: object | undefined): node is TSFunctionTy return node instanceof TSFunctionType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_FUNCTION_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_FUNCTION_TYPE, TSFunctionType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_FUNCTION_TYPE, (peer: KNativePointer) => new TSFunctionType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSImportEqualsDeclaration.ts b/koala-wrapper/src/generated/peers/TSImportEqualsDeclaration.ts index 9a72448fc..e94402fea 100644 --- a/koala-wrapper/src/generated/peers/TSImportEqualsDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSImportEqualsDeclaration.ts @@ -58,5 +58,5 @@ export function isTSImportEqualsDeclaration(node: object | undefined): node is T return node instanceof TSImportEqualsDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION, TSImportEqualsDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION, (peer: KNativePointer) => new TSImportEqualsDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSImportType.ts b/koala-wrapper/src/generated/peers/TSImportType.ts index e8bcf4be3..4a26f691b 100644 --- a/koala-wrapper/src/generated/peers/TSImportType.ts +++ b/koala-wrapper/src/generated/peers/TSImportType.ts @@ -61,5 +61,5 @@ export function isTSImportType(node: object | undefined): node is TSImportType { return node instanceof TSImportType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_TYPE, TSImportType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_TYPE, (peer: KNativePointer) => new TSImportType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSIndexSignature.ts b/koala-wrapper/src/generated/peers/TSIndexSignature.ts index db45b0e22..6a3fd64a0 100644 --- a/koala-wrapper/src/generated/peers/TSIndexSignature.ts +++ b/koala-wrapper/src/generated/peers/TSIndexSignature.ts @@ -62,5 +62,5 @@ export function isTSIndexSignature(node: object | undefined): node is TSIndexSig return node instanceof TSIndexSignature } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEX_SIGNATURE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEX_SIGNATURE, TSIndexSignature) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEX_SIGNATURE, (peer: KNativePointer) => new TSIndexSignature(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSIndexedAccessType.ts b/koala-wrapper/src/generated/peers/TSIndexedAccessType.ts index 1fdf82246..648fb2726 100644 --- a/koala-wrapper/src/generated/peers/TSIndexedAccessType.ts +++ b/koala-wrapper/src/generated/peers/TSIndexedAccessType.ts @@ -53,5 +53,5 @@ export function isTSIndexedAccessType(node: object | undefined): node is TSIndex return node instanceof TSIndexedAccessType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE, TSIndexedAccessType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE, (peer: KNativePointer) => new TSIndexedAccessType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSInferType.ts b/koala-wrapper/src/generated/peers/TSInferType.ts index 399032853..0770c5b88 100644 --- a/koala-wrapper/src/generated/peers/TSInferType.ts +++ b/koala-wrapper/src/generated/peers/TSInferType.ts @@ -51,5 +51,5 @@ export function isTSInferType(node: object | undefined): node is TSInferType { return node instanceof TSInferType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INFER_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INFER_TYPE, TSInferType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INFER_TYPE, (peer: KNativePointer) => new TSInferType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSInterfaceBody.ts b/koala-wrapper/src/generated/peers/TSInterfaceBody.ts index 49dcffcaa..6b21d33af 100644 --- a/koala-wrapper/src/generated/peers/TSInterfaceBody.ts +++ b/koala-wrapper/src/generated/peers/TSInterfaceBody.ts @@ -50,5 +50,5 @@ export function isTSInterfaceBody(node: object | undefined): node is TSInterface return node instanceof TSInterfaceBody } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_BODY)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_BODY, TSInterfaceBody) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_BODY, (peer: KNativePointer) => new TSInterfaceBody(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSInterfaceDeclaration.ts b/koala-wrapper/src/generated/peers/TSInterfaceDeclaration.ts index c40525486..41ef40019 100644 --- a/koala-wrapper/src/generated/peers/TSInterfaceDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSInterfaceDeclaration.ts @@ -163,5 +163,5 @@ export function isTSInterfaceDeclaration(node: object | undefined): node is TSIn return node instanceof TSInterfaceDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_DECLARATION, TSInterfaceDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_DECLARATION, (peer: KNativePointer) => new TSInterfaceDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSInterfaceHeritage.ts b/koala-wrapper/src/generated/peers/TSInterfaceHeritage.ts index 09933a9c6..eb388ebf6 100644 --- a/koala-wrapper/src/generated/peers/TSInterfaceHeritage.ts +++ b/koala-wrapper/src/generated/peers/TSInterfaceHeritage.ts @@ -51,5 +51,5 @@ export function isTSInterfaceHeritage(node: object | undefined): node is TSInter return node instanceof TSInterfaceHeritage } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_HERITAGE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_HERITAGE, TSInterfaceHeritage) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_HERITAGE, (peer: KNativePointer) => new TSInterfaceHeritage(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSIntersectionType.ts b/koala-wrapper/src/generated/peers/TSIntersectionType.ts index 69a951020..ca6fe2dd8 100644 --- a/koala-wrapper/src/generated/peers/TSIntersectionType.ts +++ b/koala-wrapper/src/generated/peers/TSIntersectionType.ts @@ -51,5 +51,5 @@ export function isTSIntersectionType(node: object | undefined): node is TSInters return node instanceof TSIntersectionType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERSECTION_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERSECTION_TYPE, TSIntersectionType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERSECTION_TYPE, (peer: KNativePointer) => new TSIntersectionType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSLiteralType.ts b/koala-wrapper/src/generated/peers/TSLiteralType.ts index 56cd38fa5..e23add307 100644 --- a/koala-wrapper/src/generated/peers/TSLiteralType.ts +++ b/koala-wrapper/src/generated/peers/TSLiteralType.ts @@ -51,5 +51,5 @@ export function isTSLiteralType(node: object | undefined): node is TSLiteralType return node instanceof TSLiteralType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE, TSLiteralType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE, (peer: KNativePointer) => new TSLiteralType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSMappedType.ts b/koala-wrapper/src/generated/peers/TSMappedType.ts index f2e0b41ed..a49954bc2 100644 --- a/koala-wrapper/src/generated/peers/TSMappedType.ts +++ b/koala-wrapper/src/generated/peers/TSMappedType.ts @@ -61,5 +61,5 @@ export function isTSMappedType(node: object | undefined): node is TSMappedType { return node instanceof TSMappedType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MAPPED_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MAPPED_TYPE, TSMappedType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MAPPED_TYPE, (peer: KNativePointer) => new TSMappedType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSMethodSignature.ts b/koala-wrapper/src/generated/peers/TSMethodSignature.ts index 7bb5e650e..7fcaf7a6a 100644 --- a/koala-wrapper/src/generated/peers/TSMethodSignature.ts +++ b/koala-wrapper/src/generated/peers/TSMethodSignature.ts @@ -68,5 +68,5 @@ export function isTSMethodSignature(node: object | undefined): node is TSMethodS return node instanceof TSMethodSignature } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_METHOD_SIGNATURE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_METHOD_SIGNATURE, TSMethodSignature) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_METHOD_SIGNATURE, (peer: KNativePointer) => new TSMethodSignature(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSModuleBlock.ts b/koala-wrapper/src/generated/peers/TSModuleBlock.ts index f1e7edc91..f57bb18cf 100644 --- a/koala-wrapper/src/generated/peers/TSModuleBlock.ts +++ b/koala-wrapper/src/generated/peers/TSModuleBlock.ts @@ -50,5 +50,5 @@ export function isTSModuleBlock(node: object | undefined): node is TSModuleBlock return node instanceof TSModuleBlock } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_BLOCK)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_BLOCK, TSModuleBlock) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_BLOCK, (peer: KNativePointer) => new TSModuleBlock(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSModuleDeclaration.ts b/koala-wrapper/src/generated/peers/TSModuleDeclaration.ts index 75ca87a17..b11080d42 100644 --- a/koala-wrapper/src/generated/peers/TSModuleDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSModuleDeclaration.ts @@ -60,5 +60,5 @@ export function isTSModuleDeclaration(node: object | undefined): node is TSModul return node instanceof TSModuleDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_DECLARATION, TSModuleDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_DECLARATION, (peer: KNativePointer) => new TSModuleDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSNamedTupleMember.ts b/koala-wrapper/src/generated/peers/TSNamedTupleMember.ts index 637e206b3..9bb458729 100644 --- a/koala-wrapper/src/generated/peers/TSNamedTupleMember.ts +++ b/koala-wrapper/src/generated/peers/TSNamedTupleMember.ts @@ -57,5 +57,5 @@ export function isTSNamedTupleMember(node: object | undefined): node is TSNamedT return node instanceof TSNamedTupleMember } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER, TSNamedTupleMember) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER, (peer: KNativePointer) => new TSNamedTupleMember(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSNeverKeyword.ts b/koala-wrapper/src/generated/peers/TSNeverKeyword.ts index 253a7bf10..dc6d9d429 100644 --- a/koala-wrapper/src/generated/peers/TSNeverKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSNeverKeyword.ts @@ -47,5 +47,5 @@ export function isTSNeverKeyword(node: object | undefined): node is TSNeverKeywo return node instanceof TSNeverKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NEVER_KEYWORD)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NEVER_KEYWORD, TSNeverKeyword) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NEVER_KEYWORD, (peer: KNativePointer) => new TSNeverKeyword(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSNonNullExpression.ts b/koala-wrapper/src/generated/peers/TSNonNullExpression.ts index 16b16b888..4490c5ab7 100644 --- a/koala-wrapper/src/generated/peers/TSNonNullExpression.ts +++ b/koala-wrapper/src/generated/peers/TSNonNullExpression.ts @@ -55,5 +55,5 @@ export function isTSNonNullExpression(node: object | undefined): node is TSNonNu return node instanceof TSNonNullExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NON_NULL_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NON_NULL_EXPRESSION, TSNonNullExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NON_NULL_EXPRESSION, (peer: KNativePointer) => new TSNonNullExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSNullKeyword.ts b/koala-wrapper/src/generated/peers/TSNullKeyword.ts index cb1bfebee..81af26c5a 100644 --- a/koala-wrapper/src/generated/peers/TSNullKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSNullKeyword.ts @@ -47,5 +47,5 @@ export function isTSNullKeyword(node: object | undefined): node is TSNullKeyword return node instanceof TSNullKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NULL_KEYWORD)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NULL_KEYWORD, TSNullKeyword) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NULL_KEYWORD, (peer: KNativePointer) => new TSNullKeyword(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSNumberKeyword.ts b/koala-wrapper/src/generated/peers/TSNumberKeyword.ts index 0f826cf0b..162c09bea 100644 --- a/koala-wrapper/src/generated/peers/TSNumberKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSNumberKeyword.ts @@ -47,5 +47,5 @@ export function isTSNumberKeyword(node: object | undefined): node is TSNumberKey return node instanceof TSNumberKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NUMBER_KEYWORD)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NUMBER_KEYWORD, TSNumberKeyword) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NUMBER_KEYWORD, (peer: KNativePointer) => new TSNumberKeyword(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSObjectKeyword.ts b/koala-wrapper/src/generated/peers/TSObjectKeyword.ts index b14f250e3..9f3d78803 100644 --- a/koala-wrapper/src/generated/peers/TSObjectKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSObjectKeyword.ts @@ -47,5 +47,5 @@ export function isTSObjectKeyword(node: object | undefined): node is TSObjectKey return node instanceof TSObjectKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_OBJECT_KEYWORD)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_OBJECT_KEYWORD, TSObjectKeyword) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_OBJECT_KEYWORD, (peer: KNativePointer) => new TSObjectKeyword(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSParameterProperty.ts b/koala-wrapper/src/generated/peers/TSParameterProperty.ts index 6d73b9c44..94edc79dc 100644 --- a/koala-wrapper/src/generated/peers/TSParameterProperty.ts +++ b/koala-wrapper/src/generated/peers/TSParameterProperty.ts @@ -63,5 +63,5 @@ export function isTSParameterProperty(node: object | undefined): node is TSParam return node instanceof TSParameterProperty } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARAMETER_PROPERTY)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARAMETER_PROPERTY, TSParameterProperty) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARAMETER_PROPERTY, (peer: KNativePointer) => new TSParameterProperty(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSParenthesizedType.ts b/koala-wrapper/src/generated/peers/TSParenthesizedType.ts index 69c1ce194..0859dab7c 100644 --- a/koala-wrapper/src/generated/peers/TSParenthesizedType.ts +++ b/koala-wrapper/src/generated/peers/TSParenthesizedType.ts @@ -51,5 +51,5 @@ export function isTSParenthesizedType(node: object | undefined): node is TSParen return node instanceof TSParenthesizedType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARENT_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARENT_TYPE, TSParenthesizedType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARENT_TYPE, (peer: KNativePointer) => new TSParenthesizedType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSPropertySignature.ts b/koala-wrapper/src/generated/peers/TSPropertySignature.ts index 814f9b11c..aceabdd4b 100644 --- a/koala-wrapper/src/generated/peers/TSPropertySignature.ts +++ b/koala-wrapper/src/generated/peers/TSPropertySignature.ts @@ -69,5 +69,5 @@ export function isTSPropertySignature(node: object | undefined): node is TSPrope return node instanceof TSPropertySignature } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PROPERTY_SIGNATURE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PROPERTY_SIGNATURE, TSPropertySignature) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PROPERTY_SIGNATURE, (peer: KNativePointer) => new TSPropertySignature(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSQualifiedName.ts b/koala-wrapper/src/generated/peers/TSQualifiedName.ts index 6406a6a95..43f95a0ee 100644 --- a/koala-wrapper/src/generated/peers/TSQualifiedName.ts +++ b/koala-wrapper/src/generated/peers/TSQualifiedName.ts @@ -60,5 +60,5 @@ export function isTSQualifiedName(node: object | undefined): node is TSQualified return node instanceof TSQualifiedName } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_QUALIFIED_NAME)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_QUALIFIED_NAME, TSQualifiedName) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_QUALIFIED_NAME, (peer: KNativePointer) => new TSQualifiedName(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSSignatureDeclaration.ts b/koala-wrapper/src/generated/peers/TSSignatureDeclaration.ts index 0fbb39ba8..b633ef59b 100644 --- a/koala-wrapper/src/generated/peers/TSSignatureDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSSignatureDeclaration.ts @@ -64,5 +64,5 @@ export function isTSSignatureDeclaration(node: object | undefined): node is TSSi return node instanceof TSSignatureDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_SIGNATURE_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_SIGNATURE_DECLARATION, TSSignatureDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_SIGNATURE_DECLARATION, (peer: KNativePointer) => new TSSignatureDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSStringKeyword.ts b/koala-wrapper/src/generated/peers/TSStringKeyword.ts index 4bfdabe8b..f49274631 100644 --- a/koala-wrapper/src/generated/peers/TSStringKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSStringKeyword.ts @@ -47,5 +47,5 @@ export function isTSStringKeyword(node: object | undefined): node is TSStringKey return node instanceof TSStringKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_STRING_KEYWORD)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_STRING_KEYWORD, TSStringKeyword) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_STRING_KEYWORD, (peer: KNativePointer) => new TSStringKeyword(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSThisType.ts b/koala-wrapper/src/generated/peers/TSThisType.ts index da6d0ac67..4a7d386e4 100644 --- a/koala-wrapper/src/generated/peers/TSThisType.ts +++ b/koala-wrapper/src/generated/peers/TSThisType.ts @@ -47,5 +47,5 @@ export function isTSThisType(node: object | undefined): node is TSThisType { return node instanceof TSThisType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_THIS_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_THIS_TYPE, TSThisType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_THIS_TYPE, (peer: KNativePointer) => new TSThisType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSTupleType.ts b/koala-wrapper/src/generated/peers/TSTupleType.ts index 5299a607f..c18e25586 100644 --- a/koala-wrapper/src/generated/peers/TSTupleType.ts +++ b/koala-wrapper/src/generated/peers/TSTupleType.ts @@ -50,5 +50,5 @@ export function isTSTupleType(node: object | undefined): node is TSTupleType { return node instanceof TSTupleType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TUPLE_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TUPLE_TYPE, TSTupleType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TUPLE_TYPE, (peer: KNativePointer) => new TSTupleType(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSTypeAliasDeclaration.ts b/koala-wrapper/src/generated/peers/TSTypeAliasDeclaration.ts index fae5cfa1a..963e8b46f 100644 --- a/koala-wrapper/src/generated/peers/TSTypeAliasDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSTypeAliasDeclaration.ts @@ -126,5 +126,5 @@ export function isTSTypeAliasDeclaration(node: object | undefined): node is TSTy return node instanceof TSTypeAliasDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION, TSTypeAliasDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION, (peer: KNativePointer) => new TSTypeAliasDeclaration(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSTypeAssertion.ts b/koala-wrapper/src/generated/peers/TSTypeAssertion.ts index 27a4c9e07..6005ce064 100644 --- a/koala-wrapper/src/generated/peers/TSTypeAssertion.ts +++ b/koala-wrapper/src/generated/peers/TSTypeAssertion.ts @@ -60,5 +60,5 @@ export function isTSTypeAssertion(node: object | undefined): node is TSTypeAsser return node instanceof TSTypeAssertion } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ASSERTION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ASSERTION, TSTypeAssertion) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ASSERTION, (peer: KNativePointer) => new TSTypeAssertion(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSTypeLiteral.ts b/koala-wrapper/src/generated/peers/TSTypeLiteral.ts index 3d129eff9..2b678444f 100644 --- a/koala-wrapper/src/generated/peers/TSTypeLiteral.ts +++ b/koala-wrapper/src/generated/peers/TSTypeLiteral.ts @@ -50,5 +50,5 @@ export function isTSTypeLiteral(node: object | undefined): node is TSTypeLiteral return node instanceof TSTypeLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE, TSTypeLiteral) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE, (peer: KNativePointer) => new TSTypeLiteral(peer)) } diff --git a/koala-wrapper/src/generated/peers/TSTypeOperator.ts b/koala-wrapper/src/generated/peers/TSTypeOperator.ts index 9a53027d0..81eb28314 100644 --- a/koala-wrapper/src/generated/peers/TSTypeOperator.ts +++ b/koala-wrapper/src/generated/peers/TSTypeOperator.ts @@ -60,5 +60,5 @@ export function isTSTypeOperator(node: object | undefined): node is TSTypeOperat return node instanceof TSTypeOperator } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_OPERATOR)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_OPERATOR, TSTypeOperator) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_OPERATOR, (peer: KNativePointer) => new TSTypeOperator(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TSTypeParameter.ts b/koala-wrapper/src/generated/peers/TSTypeParameter.ts index 4701a74d9..f404bdbf8 100644 --- a/koala-wrapper/src/generated/peers/TSTypeParameter.ts +++ b/koala-wrapper/src/generated/peers/TSTypeParameter.ts @@ -112,5 +112,5 @@ export function isTSTypeParameter(node: object | undefined): node is TSTypeParam return node instanceof TSTypeParameter } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER, TSTypeParameter) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER, (peer: KNativePointer) => new TSTypeParameter(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TSTypeParameterDeclaration.ts b/koala-wrapper/src/generated/peers/TSTypeParameterDeclaration.ts index 875f22f33..a2cb58d63 100644 --- a/koala-wrapper/src/generated/peers/TSTypeParameterDeclaration.ts +++ b/koala-wrapper/src/generated/peers/TSTypeParameterDeclaration.ts @@ -64,5 +64,5 @@ export function isTSTypeParameterDeclaration(node: object | undefined): node is return node instanceof TSTypeParameterDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION, TSTypeParameterDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION, (peer: KNativePointer) => new TSTypeParameterDeclaration(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TSTypeParameterInstantiation.ts b/koala-wrapper/src/generated/peers/TSTypeParameterInstantiation.ts index 9eaa629ca..e83346d85 100644 --- a/koala-wrapper/src/generated/peers/TSTypeParameterInstantiation.ts +++ b/koala-wrapper/src/generated/peers/TSTypeParameterInstantiation.ts @@ -51,5 +51,5 @@ export function isTSTypeParameterInstantiation(node: object | undefined): node i return node instanceof TSTypeParameterInstantiation } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION, TSTypeParameterInstantiation) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION, (peer: KNativePointer) => new TSTypeParameterInstantiation(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TSTypePredicate.ts b/koala-wrapper/src/generated/peers/TSTypePredicate.ts index 4f111617c..439109ff5 100644 --- a/koala-wrapper/src/generated/peers/TSTypePredicate.ts +++ b/koala-wrapper/src/generated/peers/TSTypePredicate.ts @@ -57,5 +57,5 @@ export function isTSTypePredicate(node: object | undefined): node is TSTypePredi return node instanceof TSTypePredicate } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PREDICATE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PREDICATE, TSTypePredicate) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PREDICATE, (peer: KNativePointer) => new TSTypePredicate(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TSTypeQuery.ts b/koala-wrapper/src/generated/peers/TSTypeQuery.ts index 28d81813a..b5ca1cba1 100644 --- a/koala-wrapper/src/generated/peers/TSTypeQuery.ts +++ b/koala-wrapper/src/generated/peers/TSTypeQuery.ts @@ -51,5 +51,5 @@ export function isTSTypeQuery(node: object | undefined): node is TSTypeQuery { return node instanceof TSTypeQuery } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_QUERY)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_QUERY, TSTypeQuery) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_QUERY, (peer: KNativePointer) => new TSTypeQuery(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TSTypeReference.ts b/koala-wrapper/src/generated/peers/TSTypeReference.ts index 7b876f4f3..5e9155e6f 100644 --- a/koala-wrapper/src/generated/peers/TSTypeReference.ts +++ b/koala-wrapper/src/generated/peers/TSTypeReference.ts @@ -59,5 +59,5 @@ export function isTSTypeReference(node: object | undefined): node is TSTypeRefer return node instanceof TSTypeReference } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_REFERENCE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_REFERENCE, TSTypeReference) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_REFERENCE, (peer: KNativePointer) => new TSTypeReference(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TSUndefinedKeyword.ts b/koala-wrapper/src/generated/peers/TSUndefinedKeyword.ts index e560d9e83..4de7fcfc6 100644 --- a/koala-wrapper/src/generated/peers/TSUndefinedKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSUndefinedKeyword.ts @@ -47,5 +47,5 @@ export function isTSUndefinedKeyword(node: object | undefined): node is TSUndefi return node instanceof TSUndefinedKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNDEFINED_KEYWORD)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNDEFINED_KEYWORD, TSUndefinedKeyword) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNDEFINED_KEYWORD, (peer: KNativePointer) => new TSUndefinedKeyword(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TSUnionType.ts b/koala-wrapper/src/generated/peers/TSUnionType.ts index 868691982..5255bf27f 100644 --- a/koala-wrapper/src/generated/peers/TSUnionType.ts +++ b/koala-wrapper/src/generated/peers/TSUnionType.ts @@ -50,5 +50,5 @@ export function isTSUnionType(node: object | undefined): node is TSUnionType { return node instanceof TSUnionType } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNION_TYPE)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNION_TYPE, TSUnionType) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNION_TYPE, (peer: KNativePointer) => new TSUnionType(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TSUnknownKeyword.ts b/koala-wrapper/src/generated/peers/TSUnknownKeyword.ts index 49d14b720..2a7f0c9bc 100644 --- a/koala-wrapper/src/generated/peers/TSUnknownKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSUnknownKeyword.ts @@ -47,5 +47,5 @@ export function isTSUnknownKeyword(node: object | undefined): node is TSUnknownK return node instanceof TSUnknownKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNKNOWN_KEYWORD)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNKNOWN_KEYWORD, TSUnknownKeyword) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNKNOWN_KEYWORD, (peer: KNativePointer) => new TSUnknownKeyword(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TSVoidKeyword.ts b/koala-wrapper/src/generated/peers/TSVoidKeyword.ts index 8d4d74944..5308fc6b6 100644 --- a/koala-wrapper/src/generated/peers/TSVoidKeyword.ts +++ b/koala-wrapper/src/generated/peers/TSVoidKeyword.ts @@ -47,5 +47,5 @@ export function isTSVoidKeyword(node: object | undefined): node is TSVoidKeyword return node instanceof TSVoidKeyword } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_VOID_KEYWORD)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_VOID_KEYWORD, TSVoidKeyword) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_VOID_KEYWORD, (peer: KNativePointer) => new TSVoidKeyword(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TaggedTemplateExpression.ts b/koala-wrapper/src/generated/peers/TaggedTemplateExpression.ts index 8313f0833..84c8b7482 100644 --- a/koala-wrapper/src/generated/peers/TaggedTemplateExpression.ts +++ b/koala-wrapper/src/generated/peers/TaggedTemplateExpression.ts @@ -58,5 +58,5 @@ export function isTaggedTemplateExpression(node: object | undefined): node is Ta return node instanceof TaggedTemplateExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION, TaggedTemplateExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION, (peer: KNativePointer) => new TaggedTemplateExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/TemplateElement.ts b/koala-wrapper/src/generated/peers/TemplateElement.ts index 1dbb05b8e..39a7e3c31 100644 --- a/koala-wrapper/src/generated/peers/TemplateElement.ts +++ b/koala-wrapper/src/generated/peers/TemplateElement.ts @@ -56,5 +56,5 @@ export function isTemplateElement(node: object | undefined): node is TemplateEle return node instanceof TemplateElement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_ELEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_ELEMENT, TemplateElement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_ELEMENT, (peer: KNativePointer) => new TemplateElement(peer)) } diff --git a/koala-wrapper/src/generated/peers/TemplateLiteral.ts b/koala-wrapper/src/generated/peers/TemplateLiteral.ts index f4dd7437b..2d296b9ce 100644 --- a/koala-wrapper/src/generated/peers/TemplateLiteral.ts +++ b/koala-wrapper/src/generated/peers/TemplateLiteral.ts @@ -57,5 +57,5 @@ export function isTemplateLiteral(node: object | undefined): node is TemplateLit return node instanceof TemplateLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_LITERAL)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_LITERAL, TemplateLiteral) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_LITERAL, (peer: KNativePointer) => new TemplateLiteral(peer)) } diff --git a/koala-wrapper/src/generated/peers/ThisExpression.ts b/koala-wrapper/src/generated/peers/ThisExpression.ts index f3cbdb099..09af317e6 100644 --- a/koala-wrapper/src/generated/peers/ThisExpression.ts +++ b/koala-wrapper/src/generated/peers/ThisExpression.ts @@ -47,5 +47,5 @@ export function isThisExpression(node: object | undefined): node is ThisExpressi return node instanceof ThisExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_THIS_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_THIS_EXPRESSION, ThisExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_THIS_EXPRESSION, (peer: KNativePointer) => new ThisExpression(peer)) } diff --git a/koala-wrapper/src/generated/peers/ThrowStatement.ts b/koala-wrapper/src/generated/peers/ThrowStatement.ts index 67bfd843b..f0cd1b695 100644 --- a/koala-wrapper/src/generated/peers/ThrowStatement.ts +++ b/koala-wrapper/src/generated/peers/ThrowStatement.ts @@ -51,5 +51,5 @@ export function isThrowStatement(node: object | undefined): node is ThrowStateme return node instanceof ThrowStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_THROW_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_THROW_STATEMENT, ThrowStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_THROW_STATEMENT, (peer: KNativePointer) => new ThrowStatement(peer)) } diff --git a/koala-wrapper/src/generated/peers/TryStatement.ts b/koala-wrapper/src/generated/peers/TryStatement.ts index 992101614..579ed6772 100644 --- a/koala-wrapper/src/generated/peers/TryStatement.ts +++ b/koala-wrapper/src/generated/peers/TryStatement.ts @@ -76,5 +76,5 @@ export function isTryStatement(node: object | undefined): node is TryStatement { return node instanceof TryStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TRY_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TRY_STATEMENT, TryStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TRY_STATEMENT, (peer: KNativePointer) => new TryStatement(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/TypeofExpression.ts b/koala-wrapper/src/generated/peers/TypeofExpression.ts index 70136a358..35dfe87dc 100644 --- a/koala-wrapper/src/generated/peers/TypeofExpression.ts +++ b/koala-wrapper/src/generated/peers/TypeofExpression.ts @@ -50,5 +50,5 @@ export function isTypeofExpression(node: object | undefined): node is TypeofExpr return node instanceof TypeofExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TYPEOF_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TYPEOF_EXPRESSION, TypeofExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TYPEOF_EXPRESSION, (peer: KNativePointer) => new TypeofExpression(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/UnaryExpression.ts b/koala-wrapper/src/generated/peers/UnaryExpression.ts index 14c835880..3683f76a2 100644 --- a/koala-wrapper/src/generated/peers/UnaryExpression.ts +++ b/koala-wrapper/src/generated/peers/UnaryExpression.ts @@ -59,5 +59,5 @@ export function isUnaryExpression(node: object | undefined): node is UnaryExpres return node instanceof UnaryExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_UNARY_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_UNARY_EXPRESSION, UnaryExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_UNARY_EXPRESSION, (peer: KNativePointer) => new UnaryExpression(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/UndefinedLiteral.ts b/koala-wrapper/src/generated/peers/UndefinedLiteral.ts index 6a7b197f7..22a00c448 100644 --- a/koala-wrapper/src/generated/peers/UndefinedLiteral.ts +++ b/koala-wrapper/src/generated/peers/UndefinedLiteral.ts @@ -47,5 +47,5 @@ export function isUndefinedLiteral(node: object | undefined): node is UndefinedL return node instanceof UndefinedLiteral } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_UNDEFINED_LITERAL)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_UNDEFINED_LITERAL, UndefinedLiteral) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_UNDEFINED_LITERAL, (peer: KNativePointer) => new UndefinedLiteral(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/UpdateExpression.ts b/koala-wrapper/src/generated/peers/UpdateExpression.ts index b01cd9e26..0f8829ef6 100644 --- a/koala-wrapper/src/generated/peers/UpdateExpression.ts +++ b/koala-wrapper/src/generated/peers/UpdateExpression.ts @@ -57,5 +57,5 @@ export function isUpdateExpression(node: object | undefined): node is UpdateExpr return node instanceof UpdateExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_UPDATE_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_UPDATE_EXPRESSION, UpdateExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_UPDATE_EXPRESSION, (peer: KNativePointer) => new UpdateExpression(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/VariableDeclaration.ts b/koala-wrapper/src/generated/peers/VariableDeclaration.ts index 2097a5d2d..6ba516823 100644 --- a/koala-wrapper/src/generated/peers/VariableDeclaration.ts +++ b/koala-wrapper/src/generated/peers/VariableDeclaration.ts @@ -102,5 +102,5 @@ export function isVariableDeclaration(node: object | undefined): node is Variabl return node instanceof VariableDeclaration } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATION, VariableDeclaration) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATION, (peer: KNativePointer) => new VariableDeclaration(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/VariableDeclarator.ts b/koala-wrapper/src/generated/peers/VariableDeclarator.ts index f1e72101a..18b1c1421 100644 --- a/koala-wrapper/src/generated/peers/VariableDeclarator.ts +++ b/koala-wrapper/src/generated/peers/VariableDeclarator.ts @@ -66,5 +66,5 @@ export function isVariableDeclarator(node: object | undefined): node is Variable return node instanceof VariableDeclarator } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR, VariableDeclarator) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR, (peer: KNativePointer) => new VariableDeclarator(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/WhileStatement.ts b/koala-wrapper/src/generated/peers/WhileStatement.ts index b2bf6278f..35760348a 100644 --- a/koala-wrapper/src/generated/peers/WhileStatement.ts +++ b/koala-wrapper/src/generated/peers/WhileStatement.ts @@ -60,5 +60,5 @@ export function isWhileStatement(node: object | undefined): node is WhileStateme return node instanceof WhileStatement } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_WHILE_STATEMENT)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_WHILE_STATEMENT, WhileStatement) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_WHILE_STATEMENT, (peer: KNativePointer) => new WhileStatement(peer)) } \ No newline at end of file diff --git a/koala-wrapper/src/generated/peers/YieldExpression.ts b/koala-wrapper/src/generated/peers/YieldExpression.ts index 473f88930..bda5b2818 100644 --- a/koala-wrapper/src/generated/peers/YieldExpression.ts +++ b/koala-wrapper/src/generated/peers/YieldExpression.ts @@ -53,5 +53,5 @@ export function isYieldExpression(node: object | undefined): node is YieldExpres return node instanceof YieldExpression } if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_YIELD_EXPRESSION)) { - nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_YIELD_EXPRESSION, YieldExpression) + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_YIELD_EXPRESSION, (peer: KNativePointer) => new YieldExpression(peer)) } \ No newline at end of file -- Gitee