Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typemap cleanup #1802

Merged
merged 12 commits into from
Dec 7, 2023
Merged

Typemap cleanup #1802

merged 12 commits into from
Dec 7, 2023

Conversation

deadlocklogic
Copy link
Contributor

This PR cleans TypeMap into a modular design.

@deadlocklogic deadlocklogic marked this pull request as draft December 4, 2023 03:42

[TypeMap("TypeMappedIndex", GeneratorKindID = GeneratorKind.CSharp_ID)]
public class TypeMappedIndex : TypeMap
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking we should rename this into CSharpTypeMappedIndex as well to keep the same convention.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes indeed, I will review all the changes carefully a final time.
I was a bit analyzing the C# backend and after a lot of digging I found out that CLI backend uses C# backend typemaps too. So we need to load all available typemaps, and let the user select them according to their GeneratorKind.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking we should rename this into CSharpTypeMappedIndex as well to keep the same convention.

After my next commit, we can actually define each TypeMap in its own namespace and therefore avoid name collision.

Copy link
Contributor Author

@deadlocklogic deadlocklogic Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, in a separate PR I want to introduce 3 concepts which leverage TypeMap concept even more.
1- Registerable typemaps: therefore we can register typemaps manually with custom predicate, not strictly bound by the type as string anymore <= something which will give huge advantage over SWIG.
2- Ability to register many typemaps which might collide, we just return the latest registered one.
3- This one is a bigger one: introduce DeclarationDatabase concept which will allow attaching typemaps and other heuristics to a declaration, and which will have priority over global heuristics.

Copy link
Contributor Author

@deadlocklogic deadlocklogic Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tritao Basically the PR is ready for a review. I will do another checkup and see if everything is OK so you can merge it.
As you can see now, the typemaps are fully independent/self contained => easily extendable for new generators:

namespace CLI
{
    [TypeMap("TestMappedTypeNonConstRefParam", GeneratorKindID = GeneratorKind.CLI_ID)]
    public class TestMappedTypeNonConstRefParamTypeMap : TypeMap
    {
        public override Type SignatureType(TypePrinterContext ctx)
        {
            // return Stub
        }

        public override void MarshalToManaged(MarshalContext ctx)
        {
            // Stub
        }

        public override void MarshalToNative(MarshalContext ctx)
        {
            // Stub
        }
    }
}

namespace Cpp
{
    [TypeMap("TestMappedTypeNonConstRefParam", GeneratorKindID = GeneratorKind.CPlusPlus_ID)]
    public class TestMappedTypeNonConstRefParamTypeMap : TypeMap
    {
        public override Type SignatureType(TypePrinterContext ctx)
        {
            // return Stub
        }
    }
}

@deadlocklogic
Copy link
Contributor Author

deadlocklogic commented Dec 5, 2023

The only problem with this PR will be backward compatibility, but this is the only way going forward. We can rename MarshalToManaged to MarshalToScript or something similar but this is not of high priority.

@@ -36,7 +36,7 @@ public override TypePrinterResult VisitTagType(TagType tag, TypeQualifiers quals
return string.Empty;

TypeMap typeMap;
if (TypeMapDatabase.FindTypeMap(tag, out typeMap))
if (TypeMapDatabase.FindTypeMap(tag, GeneratorKind.CSharp, out typeMap))
Copy link
Contributor Author

@deadlocklogic deadlocklogic Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we explicitly specify GeneratorKind.CSharp because CSharpTypePrinter is used in CLI. Many similar cases are found in this file, src/Generator/Passes/ExpressionHelper.cs and src/Generator/Passes/ValidateOperatorsPass.cs

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I totally understand why, why is it a problem to pass GeneratorKind.CLI in these cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a bit of analysis and tests I found out that the CLI backend depends on CSharp typemaps in some ways.
Consider the DelegatesPass which is common for CLI and CSharp, it uses CSharpTypePrinter which itself uses the CSharp typemaps. Not passing the GeneratorKind.CSharp explicitly will make the DelegatesPass uses CLI typemaps, which is not desirable in this case.
Consider the Employee.h example:
Using CLI typemap (undesired):

// Employee.h CLI generated header
[::System::Runtime::InteropServices::UnmanagedFunctionPointer(::System::Runtime::InteropServices::CallingConvention::Cdecl)]
delegate ::System::String^ Func__System_String^ ___IntPtr(::System::IntPtr __instance);

Using C# typemaps (desired):

// Employee.h CLI generated header
[::System::Runtime::InteropServices::UnmanagedFunctionPointer(::System::Runtime::InteropServices::CallingConvention::Cdecl)]
delegate ::System::String^ Func_std_basic_string___Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___IntPtr(::System::IntPtr __instance);

Apparently this signature must match the CSharp one (in the generated .cs file) in order for the project to compile.
To he honest, I was a bit confused why such mess is going on, but then I focused on refactoring rather than changing semantics.
This is why I am working on refactoring the project into modular design because with its current status it is nearly impossible to afford more generators with new semantics/heuristics. Isolating generators is a big win for future development, allowing reusable components as the current status which is also good (but we should add remarks/best practices).
Maybe someone with deeper knowledge on how the CSharp/CLI backend is operating can help us too. I can invest some time into these backends and see how they can be improved (and you should know that there is a lot of room for improvements), but I am thinking of sparing my efforts for newer generators.
By the way, I was thinking if we can standardize/document the typemap concept in details because it is a major concept in binding generation and currently I am finding it a bit confusing when comparing its usage across different generators. Maybe a kind of README/pseudocode can help a lot for users/collaborators.

@deadlocklogic deadlocklogic marked this pull request as ready for review December 5, 2023 08:13
@@ -63,12 +63,9 @@ public static bool IsPrimitiveTypeConvertibleToRef(this Type type)
Type = typeMap.Type
};

switch (generatorKind)
if (generatorKind == GeneratorKind.CLI || generatorKind == GeneratorKind.CSharp)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this if now?

Copy link
Contributor Author

@deadlocklogic deadlocklogic Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I am not totally sure, I can try removing it and run the tests and see what goes on. Here I am refactoring while keeping the same semantics.
We can investigate desired behavior thought, I don't exactly know if this behavior is intended exclusively for CLI/CSharp or can be extended for other generators.
Isolating the current tightly coupled architecture needs many steps, which this PR addresses one of them.

@deadlocklogic
Copy link
Contributor Author

deadlocklogic commented Dec 6, 2023

My next PR, when this passes, will introduce the concept of Registerable typemaps.
Consider:

[TypeMap("basic_string<char, char_traits<char>, allocator<char>>", GeneratorKindID = GeneratorKind.CLI_ID)]
public class String : TypeMap
{
}

This is messy for sure, hardcoded types are risky, let alone the verbosity and tight rules.
This can be refactored into a more elegant solution, while still taking benefit of the reflection system.

public class String : TypeMap
{
    // Can be null for global typemaps
    public static GeneratorKind SupportedGeneratorKind()
    {
        return GeneratorKind.CLI;
    }

    // Now we can use this predicate for any type: No more checking for template specialization name: like in std::map
    public override bool IsTypeMatch(Type type) // or MatchesType not really sure about the naming convention
    {
        return /* Stub */ true;
    }
}

After this we don't necessarily need TypeMapAttribute, and TypeMapDatabase will have cleaner interface, while delegating the typemap matching to the typemap itself. So a cleanup would eliminate the ID concept introduced in an earlier PR.
Another note, in its current form the TypeMapDatabase is running multiple stages for typemap querying (checking against TemplateSpecializationType etc ...), when in fact these steps should be carried out by the typemap itself in a fine grained way. We can add helper methods for desugared matchers in the TypeMap class for easier usage.
Suppose we want to add a custom typemap which only works for types which inherit from BaseClass.
In the current form, this is close to impossible.
Marshalling pointers to opaque types will be nothing more than a simple typemap.
This issue #1788 might benefit from this too, next to DeclMap too.

@deadlocklogic
Copy link
Contributor Author

Another notice: few changes are just formatter changes induced by visual studio formatter. Maybe adding a format file would unify codestyle across different IDE's. (I can revert such changes if you want).

@tritao tritao merged commit e068f2a into mono:main Dec 7, 2023
5 checks passed
deadlocklogic added a commit to deadlocklogic/CppSharp that referenced this pull request Dec 16, 2023
JordanL8 added a commit to MoonCollider/CppSharp that referenced this pull request Feb 1, 2024
commit b5ab95e
Author: Joao Matos <joao@tritao.eu>
Date:   Thu Feb 1 11:39:24 2024 +0000

    Update iOS64 ABI name to the more accurate AppleARM64.

commit d1307a5
Author: Joao Matos <joao@tritao.eu>
Date:   Thu Feb 1 11:21:52 2024 +0000

    Add support for AArch64 C++ ABI.

commit 9071cd2
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sun Dec 17 17:03:24 2023 +0200

    Implement ClassTemplatePartialSpecialization::Parameters (mono#1809)

    * Implement ClassTemplatePartialSpecialization::Parameters

    * Template.cs: Implement ClassTemplatePartialSpecialization.Parameters

    * GeneratorKind: fix bug introduced while migrating from enum to class

    * Implement native ClassTemplatePartialSpecialization.Parameters + ASTConverter

    * regenerated bindings (mono#1813)

    * regenerated bindings

    * regenerated bindings after rebase

    * Directory.Build.props: support C# 10.0

    * Implement native ClassTemplatePartialSpecialization.Parameters + ASTConverter

    * Regenerated bindings

    * TestAST.cs: add TestASTClassTemplatePartialSpecialization

commit 2ecd952
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sun Dec 17 13:08:34 2023 +0200

    regenerated bindings (mono#1813)

    * regenerated bindings

    * regenerated bindings after rebase

    * Directory.Build.props: support C# 10.0

commit 24d1a84
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sun Dec 17 11:44:00 2023 +0200

    Stdlib.CSharp.cs: remove buggy typemap (mono#1812)

commit 1327971
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sat Dec 16 21:36:04 2023 +0200

    GeneratorKind: patch bug caused by missing ToString (mono#1811)

commit 519e97f
Author: Joao Matos <joao@tritao.eu>
Date:   Tue Dec 12 15:30:14 2023 +0000

    Remove 32-bit builds and non-debug symbols release builds from LLVM Windows CI.

commit 1211272
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Tue Dec 12 17:25:12 2023 +0200

    Build llvm `Debug`/`Release` for `Windows`. (mono#1800)

    * Update llvm-win.yml

    * Update llvm-win.yml

    * Update llvm-win.yml

commit 12c267d
Author: zylalx1 <zylalx1@163.com>
Date:   Fri Dec 8 03:58:10 2023 +0800

    Fixed a bug causing the header file to be included twice when Options.GenerateName is not null (mono#1803)

commit e068f2a
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Thu Dec 7 16:35:02 2023 +0200

    Typemap cleanup (mono#1802)

    * TypeMap: prepare refactoring into a modular design

    * TypeMap: refactor C++ backend into common methods

    * TypeMap: refactor CLI backend into common methods

    * CLI.Gen.cs: fix omitted typemap from previous commit

    * Common.Gen.cs: fixed silly modification while testing

    * GeneratorKind: add FindGeneratorKindByID method

    * TypeMapDatabase: heavy refactor: group typemaps by GeneratorKind

    * TypeMap: refactor CSharp backend into common methods + migration

    * TypeMap: cleanup patches from previous commits

    * TypeMapDatabase: fix passing GeneratorKind to FindTypeMap calls

    * Stdlib.CSharp.cs: move std::map typemap from Stdlib.CLI.cs

    * TypeMapDatabase: improve parameter name

commit 8c2da6d
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Mon Nov 13 22:00:41 2023 +0200

    Major refactor: TypePrinter: improve modular design + cleanup (mono#1796)

commit 0edd48c
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Mon Nov 13 20:15:24 2023 +0200

    Major refactoring: refactor GeneratorKind enum into a class (mono#1794)

    * Major refactoring: refactor GeneratorKind enum into a class

    * Minor fix: add readonly

    * Add Type property for GenerationKind + cleanup

    * GeneratorKind: add Name property + refactor hardcoded names

    * GeneratorKind: add CLIOptions property + refactor hardcoded options

    * CppSharp.CLI: minor fix: use generator.ToLower()

    * GeneratorKind: fix warning

commit 40f3a09
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sat Nov 11 16:51:18 2023 +0200

    Minor improvements (mono#1793)

    * CppSharp.Generators.Options: added pre/post TranslationUnitPass callback

    * CppSharp.Generators.Passes.Pass: added TranslationUnitPassGeneratorDependent

commit b14038a
Author: Stefan <29021710+Saalvage@users.noreply.github.com>
Date:   Mon Oct 23 14:23:51 2023 +0200

    Value types may generate `Dispose` (mono#1787)

commit 3b2a15d
Author: João Matos <joao@tritao.eu>
Date:   Sat Oct 21 19:33:13 2023 +0100

    Update README.md

commit a5afda8
Author: Stefan <29021710+Saalvage@users.noreply.github.com>
Date:   Fri Oct 20 21:00:04 2023 +0200

    Fix parameterless constructors not being generated for structs (mono#1783)

    * Fix parameterless constructors not being generated for structs

    * Fix implicit non-trivial default ctor

    * Adjust `Ignore` linked issue

commit b16e809
Author: Stefan <29021710+Saalvage@users.noreply.github.com>
Date:   Fri Oct 20 18:54:58 2023 +0200

    Introduce `GenerateFreeStandingFunctionsClassName` option (mono#1782)

    * Introduce `GenerateFreeStandingFunctionsClassName` option

    * Support CLI and fixes

commit 03874e7
Author: Stefan <29021710+Saalvage@users.noreply.github.com>
Date:   Thu Oct 19 17:24:55 2023 +0200

    Fix Value Type String Member Invalid Codegen (mono#1778)

    * Fix code generation

    * Generate exception on broken struct set op

    * Remove redundant usings

commit adffc99
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Thu Oct 19 14:51:06 2023 +0200

    Fix erroneous newline

commit b4f261e
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Thu Oct 19 14:26:00 2023 +0200

    Simplify `IsTemplateParameterType`

commit 28000a1
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Thu Oct 19 01:19:07 2023 +0200

    Fix mono#1251 three parameter equality operator

    - Operators in generic classes do not attempt to generate as extension methods anymore
    - Empty `...Extensions` classes are no longer generated
    - `string` as a template argument is correctly cast
    - `MarshalCharAsManagedChar` option also generates correct casts
    - Suppress warning regarding returning struct field by ref
    - Eliminate some tabs that snuck into the test C++ header

commit d7faf5f
Author: Joao Matos <joao@tritao.eu>
Date:   Wed Oct 18 17:39:49 2023 +0100

    Fix SDL_PollEvent generation in the SDL example.

    Fixes mono#978.

    Thanks to @Saalvage.

commit 7f567b6
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 18:26:03 2023 +0200

    Fix non-void returning functions with value-type out parameters

    Also fixes indentation

commit 0c60384
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 16:49:41 2023 +0200

    Additional bump

commit 0534e33
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 16:35:10 2023 +0200

    Bump GH actions versions to solve warnings

commit a6ef9d9
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 16:19:42 2023 +0200

    Fix source dir

commit 7e6c492
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 16:08:51 2023 +0200

    Test fix broken packages

commit 2a351b7
Author: Joao Matos <joao@tritao.eu>
Date:   Wed Oct 18 16:03:36 2023 +0100

    Update our version to 1.1.

commit 20950c5
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 04:58:38 2023 +0200

    More stringent test; Fix indentation (of the code itself, not in the generator)

commit ebe6b8a
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 04:47:13 2023 +0200

    Fix value type out parameters
JordanL8 added a commit to MoonCollider/CppSharp that referenced this pull request Feb 5, 2024
commit 1d1b21f
Author: Conrad Kreyling <conrad@kreyling.biz>
Date:   Fri Feb 2 15:12:42 2024 -0500

    Instruct generator to build ARM64 bindings

commit 491248b
Author: Conrad Kreyling <conrad@kreyling.biz>
Date:   Fri Feb 2 15:09:44 2024 -0500

    Fix missing AArch64 entry in CLI CppAbi

commit bbb0693
Author: Conrad Kreyling <conrad@kreyling.biz>
Date:   Fri Feb 2 13:35:11 2024 -0500

    Enable ARM64 support on LLVM builds

commit b5ab95e
Author: Joao Matos <joao@tritao.eu>
Date:   Thu Feb 1 11:39:24 2024 +0000

    Update iOS64 ABI name to the more accurate AppleARM64.

commit d1307a5
Author: Joao Matos <joao@tritao.eu>
Date:   Thu Feb 1 11:21:52 2024 +0000

    Add support for AArch64 C++ ABI.

commit 9071cd2
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sun Dec 17 17:03:24 2023 +0200

    Implement ClassTemplatePartialSpecialization::Parameters (mono#1809)

    * Implement ClassTemplatePartialSpecialization::Parameters

    * Template.cs: Implement ClassTemplatePartialSpecialization.Parameters

    * GeneratorKind: fix bug introduced while migrating from enum to class

    * Implement native ClassTemplatePartialSpecialization.Parameters + ASTConverter

    * regenerated bindings (mono#1813)

    * regenerated bindings

    * regenerated bindings after rebase

    * Directory.Build.props: support C# 10.0

    * Implement native ClassTemplatePartialSpecialization.Parameters + ASTConverter

    * Regenerated bindings

    * TestAST.cs: add TestASTClassTemplatePartialSpecialization

commit 2ecd952
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sun Dec 17 13:08:34 2023 +0200

    regenerated bindings (mono#1813)

    * regenerated bindings

    * regenerated bindings after rebase

    * Directory.Build.props: support C# 10.0

commit 24d1a84
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sun Dec 17 11:44:00 2023 +0200

    Stdlib.CSharp.cs: remove buggy typemap (mono#1812)

commit 1327971
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sat Dec 16 21:36:04 2023 +0200

    GeneratorKind: patch bug caused by missing ToString (mono#1811)

commit 519e97f
Author: Joao Matos <joao@tritao.eu>
Date:   Tue Dec 12 15:30:14 2023 +0000

    Remove 32-bit builds and non-debug symbols release builds from LLVM Windows CI.

commit 1211272
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Tue Dec 12 17:25:12 2023 +0200

    Build llvm `Debug`/`Release` for `Windows`. (mono#1800)

    * Update llvm-win.yml

    * Update llvm-win.yml

    * Update llvm-win.yml

commit 12c267d
Author: zylalx1 <zylalx1@163.com>
Date:   Fri Dec 8 03:58:10 2023 +0800

    Fixed a bug causing the header file to be included twice when Options.GenerateName is not null (mono#1803)

commit e068f2a
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Thu Dec 7 16:35:02 2023 +0200

    Typemap cleanup (mono#1802)

    * TypeMap: prepare refactoring into a modular design

    * TypeMap: refactor C++ backend into common methods

    * TypeMap: refactor CLI backend into common methods

    * CLI.Gen.cs: fix omitted typemap from previous commit

    * Common.Gen.cs: fixed silly modification while testing

    * GeneratorKind: add FindGeneratorKindByID method

    * TypeMapDatabase: heavy refactor: group typemaps by GeneratorKind

    * TypeMap: refactor CSharp backend into common methods + migration

    * TypeMap: cleanup patches from previous commits

    * TypeMapDatabase: fix passing GeneratorKind to FindTypeMap calls

    * Stdlib.CSharp.cs: move std::map typemap from Stdlib.CLI.cs

    * TypeMapDatabase: improve parameter name

commit 8c2da6d
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Mon Nov 13 22:00:41 2023 +0200

    Major refactor: TypePrinter: improve modular design + cleanup (mono#1796)

commit 0edd48c
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Mon Nov 13 20:15:24 2023 +0200

    Major refactoring: refactor GeneratorKind enum into a class (mono#1794)

    * Major refactoring: refactor GeneratorKind enum into a class

    * Minor fix: add readonly

    * Add Type property for GenerationKind + cleanup

    * GeneratorKind: add Name property + refactor hardcoded names

    * GeneratorKind: add CLIOptions property + refactor hardcoded options

    * CppSharp.CLI: minor fix: use generator.ToLower()

    * GeneratorKind: fix warning

commit 40f3a09
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sat Nov 11 16:51:18 2023 +0200

    Minor improvements (mono#1793)

    * CppSharp.Generators.Options: added pre/post TranslationUnitPass callback

    * CppSharp.Generators.Passes.Pass: added TranslationUnitPassGeneratorDependent

commit b14038a
Author: Stefan <29021710+Saalvage@users.noreply.github.com>
Date:   Mon Oct 23 14:23:51 2023 +0200

    Value types may generate `Dispose` (mono#1787)

commit 3b2a15d
Author: João Matos <joao@tritao.eu>
Date:   Sat Oct 21 19:33:13 2023 +0100

    Update README.md

commit a5afda8
Author: Stefan <29021710+Saalvage@users.noreply.github.com>
Date:   Fri Oct 20 21:00:04 2023 +0200

    Fix parameterless constructors not being generated for structs (mono#1783)

    * Fix parameterless constructors not being generated for structs

    * Fix implicit non-trivial default ctor

    * Adjust `Ignore` linked issue

commit b16e809
Author: Stefan <29021710+Saalvage@users.noreply.github.com>
Date:   Fri Oct 20 18:54:58 2023 +0200

    Introduce `GenerateFreeStandingFunctionsClassName` option (mono#1782)

    * Introduce `GenerateFreeStandingFunctionsClassName` option

    * Support CLI and fixes

commit 03874e7
Author: Stefan <29021710+Saalvage@users.noreply.github.com>
Date:   Thu Oct 19 17:24:55 2023 +0200

    Fix Value Type String Member Invalid Codegen (mono#1778)

    * Fix code generation

    * Generate exception on broken struct set op

    * Remove redundant usings

commit adffc99
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Thu Oct 19 14:51:06 2023 +0200

    Fix erroneous newline

commit b4f261e
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Thu Oct 19 14:26:00 2023 +0200

    Simplify `IsTemplateParameterType`

commit 28000a1
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Thu Oct 19 01:19:07 2023 +0200

    Fix mono#1251 three parameter equality operator

    - Operators in generic classes do not attempt to generate as extension methods anymore
    - Empty `...Extensions` classes are no longer generated
    - `string` as a template argument is correctly cast
    - `MarshalCharAsManagedChar` option also generates correct casts
    - Suppress warning regarding returning struct field by ref
    - Eliminate some tabs that snuck into the test C++ header

commit d7faf5f
Author: Joao Matos <joao@tritao.eu>
Date:   Wed Oct 18 17:39:49 2023 +0100

    Fix SDL_PollEvent generation in the SDL example.

    Fixes mono#978.

    Thanks to @Saalvage.

commit 7f567b6
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 18:26:03 2023 +0200

    Fix non-void returning functions with value-type out parameters

    Also fixes indentation

commit 0c60384
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 16:49:41 2023 +0200

    Additional bump

commit 0534e33
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 16:35:10 2023 +0200

    Bump GH actions versions to solve warnings

commit a6ef9d9
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 16:19:42 2023 +0200

    Fix source dir

commit 7e6c492
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 16:08:51 2023 +0200

    Test fix broken packages

commit 2a351b7
Author: Joao Matos <joao@tritao.eu>
Date:   Wed Oct 18 16:03:36 2023 +0100

    Update our version to 1.1.

commit 20950c5
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 04:58:38 2023 +0200

    More stringent test; Fix indentation (of the code itself, not in the generator)

commit ebe6b8a
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 04:47:13 2023 +0200

    Fix value type out parameters
JordanL8 added a commit to MoonCollider/CppSharp that referenced this pull request Feb 7, 2024
commit 8bd3f45
Author: João Matos <joao@tritao.eu>
Date:   Tue Feb 6 18:30:12 2024 +0000

    Update llvm.yml to install AArch64 cross compilers

commit a81abd5
Author: Conrad Kreyling <conrad@kreyling.biz>
Date:   Tue Feb 6 11:29:07 2024 -0500

    LLVM crosscompile x64 for ARM64 (mono#1826)

    * LLVM crosscompile x64 for ARM64

    * Fix MacOS host platform test

    * Ensure options is persistent in cross compile paths

commit 1d1b21f
Author: Conrad Kreyling <conrad@kreyling.biz>
Date:   Fri Feb 2 15:12:42 2024 -0500

    Instruct generator to build ARM64 bindings

commit 491248b
Author: Conrad Kreyling <conrad@kreyling.biz>
Date:   Fri Feb 2 15:09:44 2024 -0500

    Fix missing AArch64 entry in CLI CppAbi

commit bbb0693
Author: Conrad Kreyling <conrad@kreyling.biz>
Date:   Fri Feb 2 13:35:11 2024 -0500

    Enable ARM64 support on LLVM builds

commit b5ab95e
Author: Joao Matos <joao@tritao.eu>
Date:   Thu Feb 1 11:39:24 2024 +0000

    Update iOS64 ABI name to the more accurate AppleARM64.

commit d1307a5
Author: Joao Matos <joao@tritao.eu>
Date:   Thu Feb 1 11:21:52 2024 +0000

    Add support for AArch64 C++ ABI.

commit 9071cd2
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sun Dec 17 17:03:24 2023 +0200

    Implement ClassTemplatePartialSpecialization::Parameters (mono#1809)

    * Implement ClassTemplatePartialSpecialization::Parameters

    * Template.cs: Implement ClassTemplatePartialSpecialization.Parameters

    * GeneratorKind: fix bug introduced while migrating from enum to class

    * Implement native ClassTemplatePartialSpecialization.Parameters + ASTConverter

    * regenerated bindings (mono#1813)

    * regenerated bindings

    * regenerated bindings after rebase

    * Directory.Build.props: support C# 10.0

    * Implement native ClassTemplatePartialSpecialization.Parameters + ASTConverter

    * Regenerated bindings

    * TestAST.cs: add TestASTClassTemplatePartialSpecialization

commit 2ecd952
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sun Dec 17 13:08:34 2023 +0200

    regenerated bindings (mono#1813)

    * regenerated bindings

    * regenerated bindings after rebase

    * Directory.Build.props: support C# 10.0

commit 24d1a84
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sun Dec 17 11:44:00 2023 +0200

    Stdlib.CSharp.cs: remove buggy typemap (mono#1812)

commit 1327971
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sat Dec 16 21:36:04 2023 +0200

    GeneratorKind: patch bug caused by missing ToString (mono#1811)

commit 519e97f
Author: Joao Matos <joao@tritao.eu>
Date:   Tue Dec 12 15:30:14 2023 +0000

    Remove 32-bit builds and non-debug symbols release builds from LLVM Windows CI.

commit 1211272
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Tue Dec 12 17:25:12 2023 +0200

    Build llvm `Debug`/`Release` for `Windows`. (mono#1800)

    * Update llvm-win.yml

    * Update llvm-win.yml

    * Update llvm-win.yml

commit 12c267d
Author: zylalx1 <zylalx1@163.com>
Date:   Fri Dec 8 03:58:10 2023 +0800

    Fixed a bug causing the header file to be included twice when Options.GenerateName is not null (mono#1803)

commit e068f2a
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Thu Dec 7 16:35:02 2023 +0200

    Typemap cleanup (mono#1802)

    * TypeMap: prepare refactoring into a modular design

    * TypeMap: refactor C++ backend into common methods

    * TypeMap: refactor CLI backend into common methods

    * CLI.Gen.cs: fix omitted typemap from previous commit

    * Common.Gen.cs: fixed silly modification while testing

    * GeneratorKind: add FindGeneratorKindByID method

    * TypeMapDatabase: heavy refactor: group typemaps by GeneratorKind

    * TypeMap: refactor CSharp backend into common methods + migration

    * TypeMap: cleanup patches from previous commits

    * TypeMapDatabase: fix passing GeneratorKind to FindTypeMap calls

    * Stdlib.CSharp.cs: move std::map typemap from Stdlib.CLI.cs

    * TypeMapDatabase: improve parameter name

commit 8c2da6d
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Mon Nov 13 22:00:41 2023 +0200

    Major refactor: TypePrinter: improve modular design + cleanup (mono#1796)

commit 0edd48c
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Mon Nov 13 20:15:24 2023 +0200

    Major refactoring: refactor GeneratorKind enum into a class (mono#1794)

    * Major refactoring: refactor GeneratorKind enum into a class

    * Minor fix: add readonly

    * Add Type property for GenerationKind + cleanup

    * GeneratorKind: add Name property + refactor hardcoded names

    * GeneratorKind: add CLIOptions property + refactor hardcoded options

    * CppSharp.CLI: minor fix: use generator.ToLower()

    * GeneratorKind: fix warning

commit 40f3a09
Author: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com>
Date:   Sat Nov 11 16:51:18 2023 +0200

    Minor improvements (mono#1793)

    * CppSharp.Generators.Options: added pre/post TranslationUnitPass callback

    * CppSharp.Generators.Passes.Pass: added TranslationUnitPassGeneratorDependent

commit b14038a
Author: Stefan <29021710+Saalvage@users.noreply.github.com>
Date:   Mon Oct 23 14:23:51 2023 +0200

    Value types may generate `Dispose` (mono#1787)

commit 3b2a15d
Author: João Matos <joao@tritao.eu>
Date:   Sat Oct 21 19:33:13 2023 +0100

    Update README.md

commit a5afda8
Author: Stefan <29021710+Saalvage@users.noreply.github.com>
Date:   Fri Oct 20 21:00:04 2023 +0200

    Fix parameterless constructors not being generated for structs (mono#1783)

    * Fix parameterless constructors not being generated for structs

    * Fix implicit non-trivial default ctor

    * Adjust `Ignore` linked issue

commit b16e809
Author: Stefan <29021710+Saalvage@users.noreply.github.com>
Date:   Fri Oct 20 18:54:58 2023 +0200

    Introduce `GenerateFreeStandingFunctionsClassName` option (mono#1782)

    * Introduce `GenerateFreeStandingFunctionsClassName` option

    * Support CLI and fixes

commit 03874e7
Author: Stefan <29021710+Saalvage@users.noreply.github.com>
Date:   Thu Oct 19 17:24:55 2023 +0200

    Fix Value Type String Member Invalid Codegen (mono#1778)

    * Fix code generation

    * Generate exception on broken struct set op

    * Remove redundant usings

commit adffc99
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Thu Oct 19 14:51:06 2023 +0200

    Fix erroneous newline

commit b4f261e
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Thu Oct 19 14:26:00 2023 +0200

    Simplify `IsTemplateParameterType`

commit 28000a1
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Thu Oct 19 01:19:07 2023 +0200

    Fix mono#1251 three parameter equality operator

    - Operators in generic classes do not attempt to generate as extension methods anymore
    - Empty `...Extensions` classes are no longer generated
    - `string` as a template argument is correctly cast
    - `MarshalCharAsManagedChar` option also generates correct casts
    - Suppress warning regarding returning struct field by ref
    - Eliminate some tabs that snuck into the test C++ header

commit d7faf5f
Author: Joao Matos <joao@tritao.eu>
Date:   Wed Oct 18 17:39:49 2023 +0100

    Fix SDL_PollEvent generation in the SDL example.

    Fixes mono#978.

    Thanks to @Saalvage.

commit 7f567b6
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 18:26:03 2023 +0200

    Fix non-void returning functions with value-type out parameters

    Also fixes indentation

commit 0c60384
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 16:49:41 2023 +0200

    Additional bump

commit 0534e33
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 16:35:10 2023 +0200

    Bump GH actions versions to solve warnings

commit a6ef9d9
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 16:19:42 2023 +0200

    Fix source dir

commit 7e6c492
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 16:08:51 2023 +0200

    Test fix broken packages

commit 2a351b7
Author: Joao Matos <joao@tritao.eu>
Date:   Wed Oct 18 16:03:36 2023 +0100

    Update our version to 1.1.

commit 20950c5
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 04:58:38 2023 +0200

    More stringent test; Fix indentation (of the code itself, not in the generator)

commit ebe6b8a
Author: Salvage <29021710+Saalvage@users.noreply.github.com>
Date:   Wed Oct 18 04:47:13 2023 +0200

    Fix value type out parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants