Skip to content

Commit

Permalink
(C#) - Basic types, Lists, Results & Variants (#807)
Browse files Browse the repository at this point in the history
* feat(c#): Multi-return support

Signed-off-by: James Sturtevant <[email protected]>

* wip

* simple lists codegen passing

* fix warning

* multi return passing

* passes ret-areas

* passes simple-functions and zero-size-tuple

* fixes regression with tcp-interop

* integers passing

* passes keywords

* remove old code

* Merge branch 'main' into wip

Signed-off-by: James Sturtevant <[email protected]>

* use new tuple work

Signed-off-by: James Sturtevant <[email protected]>

* fix up codegen tests

Signed-off-by: James Sturtevant <[email protected]>

* fmt and remove debug line

Signed-off-by: James Sturtevant <[email protected]>

* Use internal for imports function

Signed-off-by: James Sturtevant <[email protected]>

* Fix up test implemetation (not complete yet)

Signed-off-by: James Sturtevant <[email protected]>

* handle empyt array

Signed-off-by: James Sturtevant <[email protected]>

* Copy data from parameter properly

Signed-off-by: James Sturtevant <[email protected]>

* List Exports now work

Signed-off-by: James Sturtevant <[email protected]>

* All export tests work

Signed-off-by: James Sturtevant <[email protected]>

* Fix up strings with changes to lists

Signed-off-by: James Sturtevant <[email protected]>

* Start on list imports

Signed-off-by: James Sturtevant <[email protected]>

* Basic list imports work

Signed-off-by: James Sturtevant <[email protected]>

* List<string> works

Signed-off-by: James Sturtevant <[email protected]>

* more imports work

Signed-off-by: James Sturtevant <[email protected]>

* list results work

Signed-off-by: James Sturtevant <[email protected]>

* All the tests pass 🚀

Signed-off-by: James Sturtevant <[email protected]>

* Fix up return area code-gen

Signed-off-by: James Sturtevant <[email protected]>

* fix up records test

Signed-off-by: James Sturtevant <[email protected]>

* Simplify the Return area code

Signed-off-by: James Sturtevant <[email protected]>

* fix return area imports

Signed-off-by: James Sturtevant <[email protected]>

* clean up allocs

Signed-off-by: James Sturtevant <[email protected]>

* Now passes variants and result tests. Still an issue with return pointer alignment and missing cleanup function.

* added todo

* Debugging issues with variant lower

Signed-off-by: James Sturtevant <[email protected]>

* only write the affected bytes and do not extra bytes write to the following memory addresses

* Fixed bug wit float conversion and return area alignment

* removed trailing space

* fixees incorrect type name for results and variants

* Converted option to generic

* Changes tests to use option generic

* Use stack based return area for imports but don't set the generic return area size/alignment

Signed-off-by: James Sturtevant <[email protected]>

* uncomment debug statement

Signed-off-by: James Sturtevant <[email protected]>

* Add in the new bitcases

Signed-off-by: James Sturtevant <[email protected]>

* Remove extra copy

Signed-off-by: James Sturtevant <[email protected]>

* Update crates/csharp/src/lib.rs

Co-authored-by: yowl <[email protected]>

* Update crates/csharp/src/lib.rs

Co-authored-by: yowl <[email protected]>

* rename and fix ca2018

Signed-off-by: James Sturtevant <[email protected]>

* Update return pointer to match c version on imports

Signed-off-by: James Sturtevant <[email protected]>

* Use local return varaible

Signed-off-by: James Sturtevant <[email protected]>

* Fix types

Signed-off-by: James Sturtevant <[email protected]>

---------

Signed-off-by: James Sturtevant <[email protected]>
Co-authored-by: James Sturtevant <[email protected]>
Co-authored-by: Timmy Silesmo <[email protected]>
Co-authored-by: yowl <[email protected]>
  • Loading branch information
4 people authored Mar 30, 2024
1 parent ed26dbf commit 42f01a6
Show file tree
Hide file tree
Showing 4 changed files with 1,023 additions and 369 deletions.
Loading

0 comments on commit 42f01a6

Please sign in to comment.