From e5ae40079a7a34a5bfb7b96c15e47c7675e22af2 Mon Sep 17 00:00:00 2001 From: Keerecles Date: Tue, 10 Jun 2025 11:05:19 +0800 Subject: [PATCH 1/7] update config Signed-off-by: Keerecles Change-Id: I1660846190ad21e368d0b876328e1eb12398ae21 --- .../demo/localtest/build_config_template.json | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/arkui-plugins/test/demo/localtest/build_config_template.json b/arkui-plugins/test/demo/localtest/build_config_template.json index 0df152f9d..64b8fdafb 100755 --- a/arkui-plugins/test/demo/localtest/build_config_template.json +++ b/arkui-plugins/test/demo/localtest/build_config_template.json @@ -1,5 +1,6 @@ { "plugins": { + "ui_syntax_plugin": "workspace/out/sdk/ohos-sdk/linux/ets/ets1.2/build-tools/ui-plugins/lib/ui-syntax-plugins/index", "ui_plugin": "workspace/out/sdk/ohos-sdk/linux/ets/ets1.2/build-tools/ui-plugins/lib/ui-plugins/index", "memo_plugin": "workspace/out/sdk/ohos-sdk/linux/ets/ets1.2/build-tools/ui-plugins/lib/memo-plugins/index" }, @@ -12,19 +13,35 @@ "./demo/localtest/entry/new.ets" ], - "packageName" : "entry", - "moduleType": "shared", - "hasMainModule": true, - - "buildType": "build", "buildMode": "Debug", + "projectRootPath": "./demo/localtest/", "moduleRootPath": "./demo/localtest/entry/", - "sourceRoots": ["./"], - - "loaderOutPath": "./dist", "cachePath": "./dist/cache", - + "loaderOutPath": "./dist", + "compileSdkVersion": 20, + "compatibleSdkVersion": 20, + "bundleName": "com.example.myapplication", + "useNormalizedOHMUrl": true, + "buildType": "build", + "packageName": "entry", "buildSdkPath": "workspace/out/sdk/ohos-sdk/linux/ets/ets1.2/", - - "dependentModuleList": [] -} \ No newline at end of file + "sourceRoots": [ + "./" + ], + "moduleType": "shared", + "moduleName": "entry", + "dependentModuleList": [], + "hasMainModule": true, + "buildLoaderJson": "", + "integratedHsp": false, + "allowEmptyBundleName": false, + "declgenV2OutPath": "", + "externalApiPaths": [ + ], + "level": { + "level": 20000, + "levelStr": "INFO", + "colour": "green" + }, + "isBuildConfigModified": false +} -- Gitee From c8060aca505308e5baf0bc45a159bf299489a6e7 Mon Sep 17 00:00:00 2001 From: Keerecles Date: Tue, 10 Jun 2025 17:52:47 +0800 Subject: [PATCH 2/7] 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 553a1079b..998564884 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" @@ -82,15 +134,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; @@ -160,13 +215,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); @@ -183,6 +238,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) @@ -207,7 +263,7 @@ KNativePointer impl_UpdateCallExpression( auto nn = GetImpl()->CreateCallExpression( context, callee, arguments, argumentsLen, typeParams, optional, trailingComma - ); + ); GetImpl()->AstNodeSetOriginalNode(context, nn, node); return nn; } @@ -279,7 +335,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); } @@ -293,7 +350,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 f75de8b692b069784708baa84ea04b099a617a2f Mon Sep 17 00:00:00 2001 From: Keerecles Date: Tue, 10 Jun 2025 19:20:59 +0800 Subject: [PATCH 3/7] 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 6c5b48e7d..404e4deff 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 010c03151a07e66e78a6a920482f3f37436dad4f Mon Sep 17 00:00:00 2001 From: Keerecles Date: Tue, 10 Jun 2025 19:41:27 +0800 Subject: [PATCH 4/7] 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 998564884..1425747c0 100644 --- a/koala-wrapper/native/src/common.cc +++ b/koala-wrapper/native/src/common.cc @@ -141,7 +141,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) @@ -215,13 +215,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); @@ -238,7 +238,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) @@ -350,7 +349,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 cccaa4f64badc8b76d561414ff454c03d5351c04 Mon Sep 17 00:00:00 2001 From: Keerecles Date: Tue, 10 Jun 2025 22:05:45 +0800 Subject: [PATCH 5/7] 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 404e4deff..1458acf71 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 82c1749d70dcf50bea3fd7724e3635250087a1ca Mon Sep 17 00:00:00 2001 From: Keerecles Date: Wed, 11 Jun 2025 10:00:08 +0800 Subject: [PATCH 6/7] 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 1425747c0..5b0edf95e 100644 --- a/koala-wrapper/native/src/common.cc +++ b/koala-wrapper/native/src/common.cc @@ -144,24 +144,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 370b7f27bb1cb217e660748e3ec3dc070a815985 Mon Sep 17 00:00:00 2001 From: Keerecles Date: Wed, 11 Jun 2025 16:00:13 +0800 Subject: [PATCH 7/7] 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/Es2pandaEnums.ts | 190 --- 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 +- 17 files changed, 638 insertions(+), 762 deletions(-) delete mode 100644 koala-wrapper/src/Es2pandaEnums.ts 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/Es2pandaEnums.ts b/koala-wrapper/src/Es2pandaEnums.ts deleted file mode 100644 index bf2ce0783..000000000 --- a/koala-wrapper/src/Es2pandaEnums.ts +++ /dev/null @@ -1,190 +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. - */ - -// HANDWRITTEN (for now) - -export enum Es2pandaAstNodeType { - AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION, - AST_NODE_TYPE_ANNOTATION_DECLARATION, - AST_NODE_TYPE_ANNOTATION_USAGE, - AST_NODE_TYPE_ASSERT_STATEMENT, - AST_NODE_TYPE_AWAIT_EXPRESSION, - AST_NODE_TYPE_BIGINT_LITERAL, - AST_NODE_TYPE_BINARY_EXPRESSION, - AST_NODE_TYPE_BLOCK_STATEMENT, - AST_NODE_TYPE_BOOLEAN_LITERAL, - AST_NODE_TYPE_BREAK_STATEMENT, - AST_NODE_TYPE_CALL_EXPRESSION, - AST_NODE_TYPE_CATCH_CLAUSE, - AST_NODE_TYPE_CHAIN_EXPRESSION, - AST_NODE_TYPE_CHAR_LITERAL, - AST_NODE_TYPE_CLASS_DEFINITION, - AST_NODE_TYPE_CLASS_DECLARATION, - AST_NODE_TYPE_CLASS_EXPRESSION, - AST_NODE_TYPE_CLASS_PROPERTY, - AST_NODE_TYPE_CLASS_STATIC_BLOCK, - AST_NODE_TYPE_CONDITIONAL_EXPRESSION, - AST_NODE_TYPE_CONTINUE_STATEMENT, - AST_NODE_TYPE_DEBUGGER_STATEMENT, - AST_NODE_TYPE_DECORATOR, - AST_NODE_TYPE_DIRECT_EVAL, - AST_NODE_TYPE_DO_WHILE_STATEMENT, - AST_NODE_TYPE_EMPTY_STATEMENT, - AST_NODE_TYPE_EXPORT_ALL_DECLARATION, - AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION, - AST_NODE_TYPE_EXPORT_NAMED_DECLARATION, - AST_NODE_TYPE_EXPORT_SPECIFIER, - AST_NODE_TYPE_EXPRESSION_STATEMENT, - AST_NODE_TYPE_FOR_IN_STATEMENT, - AST_NODE_TYPE_FOR_OF_STATEMENT, - AST_NODE_TYPE_FOR_UPDATE_STATEMENT, - AST_NODE_TYPE_FUNCTION_DECLARATION, - AST_NODE_TYPE_FUNCTION_EXPRESSION, - AST_NODE_TYPE_IDENTIFIER, - AST_NODE_TYPE_DUMMYNODE, - AST_NODE_TYPE_IF_STATEMENT, - AST_NODE_TYPE_IMPORT_DECLARATION, - AST_NODE_TYPE_IMPORT_EXPRESSION, - AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER, - AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER, - AST_NODE_TYPE_IMPORT_SPECIFIER, - AST_NODE_TYPE_LABELLED_STATEMENT, - AST_NODE_TYPE_MEMBER_EXPRESSION, - AST_NODE_TYPE_META_PROPERTY_EXPRESSION, - AST_NODE_TYPE_METHOD_DEFINITION, - AST_NODE_TYPE_NAMED_TYPE, - AST_NODE_TYPE_NEW_EXPRESSION, - AST_NODE_TYPE_NULL_LITERAL, - AST_NODE_TYPE_UNDEFINED_LITERAL, - AST_NODE_TYPE_NUMBER_LITERAL, - AST_NODE_TYPE_OMITTED_EXPRESSION, - AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION, - AST_NODE_TYPE_PROPERTY, - AST_NODE_TYPE_REGEXP_LITERAL, - AST_NODE_TYPE_REEXPORT_STATEMENT, - AST_NODE_TYPE_RETURN_STATEMENT, - AST_NODE_TYPE_SCRIPT_FUNCTION, - AST_NODE_TYPE_SEQUENCE_EXPRESSION, - AST_NODE_TYPE_STRING_LITERAL, - AST_NODE_TYPE_ETS_NON_NULLISH_TYPE, - AST_NODE_TYPE_ETS_NULL_TYPE, - AST_NODE_TYPE_ETS_UNDEFINED_TYPE, - AST_NODE_TYPE_ETS_NEVER_TYPE, - AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE, - AST_NODE_TYPE_ETS_FUNCTION_TYPE, - AST_NODE_TYPE_ETS_WILDCARD_TYPE, - AST_NODE_TYPE_ETS_PRIMITIVE_TYPE, - AST_NODE_TYPE_ETS_PACKAGE_DECLARATION, - AST_NODE_TYPE_ETS_CLASS_LITERAL, - AST_NODE_TYPE_ETS_TYPE_REFERENCE, - AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART, - AST_NODE_TYPE_ETS_UNION_TYPE, - AST_NODE_TYPE_ETS_KEYOF_TYPE, - AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION, - AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION, - AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION, - AST_NODE_TYPE_ETS_IMPORT_DECLARATION, - AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION, - AST_NODE_TYPE_ETS_TUPLE, - AST_NODE_TYPE_ETS_MODULE, - AST_NODE_TYPE_SUPER_EXPRESSION, - AST_NODE_TYPE_STRUCT_DECLARATION, - AST_NODE_TYPE_SWITCH_CASE_STATEMENT, - AST_NODE_TYPE_SWITCH_STATEMENT, - AST_NODE_TYPE_TS_ENUM_DECLARATION, - AST_NODE_TYPE_TS_ENUM_MEMBER, - AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE, - AST_NODE_TYPE_TS_NUMBER_KEYWORD, - AST_NODE_TYPE_TS_ANY_KEYWORD, - AST_NODE_TYPE_TS_STRING_KEYWORD, - AST_NODE_TYPE_TS_BOOLEAN_KEYWORD, - AST_NODE_TYPE_TS_VOID_KEYWORD, - AST_NODE_TYPE_TS_UNDEFINED_KEYWORD, - AST_NODE_TYPE_TS_UNKNOWN_KEYWORD, - AST_NODE_TYPE_TS_OBJECT_KEYWORD, - AST_NODE_TYPE_TS_BIGINT_KEYWORD, - AST_NODE_TYPE_TS_NEVER_KEYWORD, - AST_NODE_TYPE_TS_NON_NULL_EXPRESSION, - AST_NODE_TYPE_TS_NULL_KEYWORD, - AST_NODE_TYPE_TS_ARRAY_TYPE, - AST_NODE_TYPE_TS_UNION_TYPE, - AST_NODE_TYPE_TS_TYPE_LITERAL, - AST_NODE_TYPE_TS_PROPERTY_SIGNATURE, - AST_NODE_TYPE_TS_METHOD_SIGNATURE, - AST_NODE_TYPE_TS_SIGNATURE_DECLARATION, - AST_NODE_TYPE_TS_PARENT_TYPE, - AST_NODE_TYPE_TS_LITERAL_TYPE, - AST_NODE_TYPE_TS_INFER_TYPE, - AST_NODE_TYPE_TS_CONDITIONAL_TYPE, - AST_NODE_TYPE_TS_IMPORT_TYPE, - AST_NODE_TYPE_TS_INTERSECTION_TYPE, - AST_NODE_TYPE_TS_MAPPED_TYPE, - AST_NODE_TYPE_TS_MODULE_BLOCK, - AST_NODE_TYPE_TS_THIS_TYPE, - AST_NODE_TYPE_TS_TYPE_OPERATOR, - AST_NODE_TYPE_TS_TYPE_PARAMETER, - AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION, - AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION, - AST_NODE_TYPE_TS_TYPE_PREDICATE, - AST_NODE_TYPE_TS_PARAMETER_PROPERTY, - AST_NODE_TYPE_TS_MODULE_DECLARATION, - AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION, - AST_NODE_TYPE_TS_FUNCTION_TYPE, - AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE, - AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION, - AST_NODE_TYPE_TS_TYPE_REFERENCE, - AST_NODE_TYPE_TS_QUALIFIED_NAME, - AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE, - AST_NODE_TYPE_TS_INTERFACE_DECLARATION, - AST_NODE_TYPE_TS_INTERFACE_BODY, - AST_NODE_TYPE_TS_INTERFACE_HERITAGE, - AST_NODE_TYPE_TS_TUPLE_TYPE, - AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER, - AST_NODE_TYPE_TS_INDEX_SIGNATURE, - AST_NODE_TYPE_TS_TYPE_QUERY, - AST_NODE_TYPE_TS_AS_EXPRESSION, - AST_NODE_TYPE_TS_CLASS_IMPLEMENTS, - AST_NODE_TYPE_TS_TYPE_ASSERTION, - AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION, - AST_NODE_TYPE_TEMPLATE_ELEMENT, - AST_NODE_TYPE_TEMPLATE_LITERAL, - AST_NODE_TYPE_THIS_EXPRESSION, - AST_NODE_TYPE_TYPEOF_EXPRESSION, - AST_NODE_TYPE_THROW_STATEMENT, - AST_NODE_TYPE_TRY_STATEMENT, - AST_NODE_TYPE_UNARY_EXPRESSION, - AST_NODE_TYPE_UPDATE_EXPRESSION, - AST_NODE_TYPE_VARIABLE_DECLARATION, - AST_NODE_TYPE_VARIABLE_DECLARATOR, - AST_NODE_TYPE_WHILE_STATEMENT, - 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_ARRAY_EXPRESSION, - AST_NODE_TYPE_ARRAY_PATTERN, - AST_NODE_TYPE_ASSIGNMENT_EXPRESSION, - AST_NODE_TYPE_ASSIGNMENT_PATTERN, - AST_NODE_TYPE_OBJECT_EXPRESSION, - AST_NODE_TYPE_OBJECT_PATTERN, - AST_NODE_TYPE_SPREAD_ELEMENT, - AST_NODE_TYPE_REST_ELEMENT, -} - -export enum Es2pandaImportFlags { - IMPORT_FLAGS_NONE, - IMPORT_FLAGS_DEFAULT_IMPORT, - IMPORT_FLAGS_IMPLICIT_PACKAGE_IMPORT, -} 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 ffab3c5cf..2bad86edf 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