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

Refactoring Bindings Generator #215

Merged
merged 1 commit into from
Nov 21, 2021

Conversation

smaillet
Copy link
Member

@smaillet smaillet commented Nov 21, 2021

Refactoring LlvmBindingsGenerator

A Major goal of this work is to remove the confusion from CppSharp's automatic morphing of types and to get around it's weird AST.Type.ToString() implementation that has no default implementation to show the source language type. Additionally this is intended to help in splitting the code generator portions from the actual "driver" application so that research into use with Roslyn SourceGeneratos is a viable option. (See #214 for additional info) Even with code gen for the interop there still needs to be support to generate the EXPORTS.DEF for the native code, so there is likely a need for an intermediate "database" that can store the relevant data from the parse tree that is then useable for code generation. (e.g., Generation doesn't actually need the FULL parse tree, just a fairly small subset of the information is needed to generate the interop code)

  • Removed use of using LlvmBindingsGenerator.CppSharpExtensions namespace for consistency
  • Major re-work of type printer support to take full control of the mapping to managed code
    • Bypassed all the default conversion to CIL types that CppSharp would do during a parse so that only the real native types are in place and ToString() shows the underlying source type.
  • Code analysis cleanup
  • Bumped default range of VS to include VS2022 if available

…pace for consistency

* Major re-work of type printer support to take full control of the mapping to managed code
    - Bypassed all the default conversion to CIL types that CppSharp would do during a parse so that only the real native types are in place and ToString() shows the underlying source type.
* Code analysis cleanup
* Bumped default range of VS to include VS2022 if available
@smaillet smaillet merged commit d9ab70b into UbiquityDotNET:develop Nov 21, 2021
@smaillet smaillet deleted the RefactorBindingsGenerator branch November 21, 2021 20:48
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