Граф коммитов

5514 Коммитов

Автор SHA1 Сообщение Дата
João Matos 166e45e9af
Simplify build output directory to not contain the architecture. (#1869) 2024-09-05 02:02:57 +01:00
Joao Matos 3ca746a654 Use the same module filename convention for Emscripten and QuickJS generators. 2024-09-05 01:33:24 +01:00
João Matos c645b047b3
Emscripten CI (#1868)
* Refactor non working JS tests with feature-based checks.

* Add Emscripten testing to CI.

* Compile Emscripten tests as C++14.

* Update Emscripten generated files naming scheme.

* Disable Emscripten property generation.

* Emscripten testing fixes.

* Add CMake to CI.
2024-09-04 10:48:15 +01:00
Joao Matos 7871125e9c Minor test script improvements. 2024-09-03 23:49:42 +01:00
João Matos 45d6b3279b
Rework property handling (#1714)
* Rewrite property detection logic to be more configurable.

* Add new property modes to the CLI driver.

* Refactor property handling in GetterSetterToProperty.
2024-09-03 23:45:28 +01:00
Joao Matos de0b0ba11e Add logo to readme. 2024-09-03 23:18:45 +01:00
João Matos 3f5fc994c0
QuickJS generator improvements. (#1865)
* Fixes to QuickJS marshaling.

* Handle more primitive types in `GetInfo`.

* Fix generator kind CLI option matching.

* Alias QuickJS generator kind to `quickjs`.

* General CLI code cleanups.

* Default to x64 platform over x86 for the CLI.

* Implement new Lua bindings file and commands for CLI tool.

* Fix QuickJS primitive type marshaling to take target sizes into account.

* Minor code cleanup.

* Avoid generating includes to units when generating the QuickJS module.

* Update file generation naming pattern for QuickJS files.

* Update QuickJS JS_GetOpaque and JS_GetAnyOpaque references to work with latest upstream.

* Update QuickJS runtime and support code to work with latest upstream.

* Avoid generating properties when generating QuickJS register code.

* Update QuickJS test suite to bootstrap its own QuickJS runtime.

* Update QuickJS test suite to use a Lua bindings definition file.

* Minor fixes to test header files.

* Fix C++ warning about return values for event invokes.

* Disable some non working tests for QuickJS.

* Enable QuickJS testing on CI.

* Fix shell color attributes for test scripts when under CI.

* WIP CI fixes.

* Fix warnings in QuickJS support runtime code.

* Use C99 designated initializers for all QuickJS class def members.

* Disable QuickJS CI steps on Windows.

* Clean up error handling for `JS_ToBool`.

* More QuickJS support code fixes.

* Rename Signal.cpp to QuickJS nomenclature.

* Fix QuickJS JS_ToBigUint call.

* Remove QuickJS test script verbosity.

* More CI fixes.

* Verbose build.

* Extension fix.
2024-09-03 21:47:10 +01:00
João Matos d82f78d5cc
Upgrade CI to macOS 12. (#1867) 2024-09-03 17:05:18 +01:00
João Matos bf03942a92
Auto-detect .NET target framework to use in `build.sh` (#1864)
* Auto-detect .NET target framework to use in `build.sh`.

* Remove some unused build code and files.
2024-09-01 15:47:23 +01:00
Henrik Valve 345de8b1fb
Couldn't remove mobules without translation unit (#1861)
I do not know I'm first to encounter this, however, loop that removes module without translation units, could not have worked.

In C# Enumerator prohibs editing the collection so you cannot remove modules from `options.Module` while iterating `options.Mobule`.

Chose `RemoveAll` for its simplicity. Not necessary optimal solution although it might be.

Co-authored-by: HenrikVDestia <henrik.valve@destia.fi>
2024-08-20 08:54:49 +01:00
Ruben Tytgat b658ff32f1
Fix issue #1283 (#1855)
* Fixes issue #1283

* Add test for issue #1283

* Move test for issue #1283 to CSharp test suite

* Fix typo
2024-07-26 12:54:08 -03:00
Christian Howe 3f923b1c64
Fix Xcode C++ include path (#1844) 2024-04-22 23:16:08 +04:00
Stefan 81e0a931cf
Don't add values to enums that can't be parsed (#1836)
* Don't add values to enums that can't be parsed

* Fix test case

* Oops
2024-03-14 10:28:02 +00:00
João Matos f2f48dc1a3
Update LLVM.md
Fix documentation.
2024-02-12 14:49:57 +00:00
João Matos 099fadb9a1
ABI handling fixes in Parser.cpp (#1829)
* ABI handling fixes in Parser.cpp

* Update Parser.cpp
2024-02-08 17:02:09 +00:00
João Matos 8bd3f456a1 Update llvm.yml to install AArch64 cross compilers 2024-02-06 18:37:09 +00:00
Conrad Kreyling a81abd5614
LLVM crosscompile x64 for ARM64 (#1826)
* LLVM crosscompile x64 for ARM64

* Fix MacOS host platform test

* Ensure options is persistent in cross compile paths
2024-02-06 16:29:07 +00:00
Conrad Kreyling 1d1b21f25e Instruct generator to build ARM64 bindings 2024-02-03 09:08:04 +00:00
Conrad Kreyling 491248b7d5 Fix missing AArch64 entry in CLI CppAbi 2024-02-03 09:08:04 +00:00
Conrad Kreyling bbb0693ef5 Enable ARM64 support on LLVM builds 2024-02-03 09:08:04 +00:00
Joao Matos b5ab95e11d Update iOS64 ABI name to the more accurate AppleARM64. 2024-02-01 11:47:13 +00:00
Joao Matos d1307a532f Add support for AArch64 C++ ABI. 2024-02-01 11:47:13 +00:00
deadlocklogic 9071cd2a59
Implement ClassTemplatePartialSpecialization::Parameters (#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 (#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
2023-12-17 15:03:24 +00:00
deadlocklogic 2ecd9528ff
regenerated bindings (#1813)
* regenerated bindings

* regenerated bindings after rebase

* Directory.Build.props: support C# 10.0
2023-12-17 11:08:34 +00:00
deadlocklogic 24d1a8491d
Stdlib.CSharp.cs: remove buggy typemap (#1812) 2023-12-17 09:44:00 +00:00
deadlocklogic 1327971e25
GeneratorKind: patch bug caused by missing ToString (#1811) 2023-12-16 19:36:04 +00:00
Joao Matos 519e97f2da Remove 32-bit builds and non-debug symbols release builds from LLVM Windows CI. 2023-12-12 15:30:14 +00:00
deadlocklogic 12112720f3
Build llvm `Debug`/`Release` for `Windows`. (#1800)
* Update llvm-win.yml

* Update llvm-win.yml

* Update llvm-win.yml
2023-12-12 15:25:12 +00:00
zylalx1 12c267d9c4
Fixed a bug causing the header file to be included twice when Options.GenerateName is not null (#1803) 2023-12-07 19:58:10 +00:00
deadlocklogic e068f2a14a
Typemap cleanup (#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
2023-12-07 14:35:02 +00:00
deadlocklogic 8c2da6d542
Major refactor: TypePrinter: improve modular design + cleanup (#1796) 2023-11-13 20:00:41 +00:00
deadlocklogic 0edd48c6a1
Major refactoring: refactor GeneratorKind enum into a class (#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
2023-11-13 18:15:24 +00:00
deadlocklogic 40f3a09296
Minor improvements (#1793)
* CppSharp.Generators.Options: added pre/post TranslationUnitPass callback

* CppSharp.Generators.Passes.Pass: added TranslationUnitPassGeneratorDependent
2023-11-11 14:51:18 +00:00
Stefan b14038ab07
Value types may generate `Dispose` (#1787) 2023-10-23 13:23:51 +01:00
João Matos 3b2a15d9f5
Update README.md 2023-10-21 19:33:13 +01:00
Stefan a5afda8603
Fix parameterless constructors not being generated for structs (#1783)
* Fix parameterless constructors not being generated for structs

* Fix implicit non-trivial default ctor

* Adjust `Ignore` linked issue
2023-10-20 20:00:04 +01:00
Stefan b16e809b9e
Introduce `GenerateFreeStandingFunctionsClassName` option (#1782)
* Introduce `GenerateFreeStandingFunctionsClassName` option

* Support CLI and fixes
2023-10-20 17:54:58 +01:00
Stefan 03874e743f
Fix Value Type String Member Invalid Codegen (#1778)
* Fix code generation

* Generate exception on broken struct set op

* Remove redundant usings
2023-10-19 16:24:55 +01:00
Salvage adffc99bc8 Fix erroneous newline 2023-10-19 14:01:33 +01:00
Salvage b4f261ea38 Simplify `IsTemplateParameterType` 2023-10-19 14:01:33 +01:00
Salvage 28000a14b4 Fix #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
2023-10-19 14:01:33 +01:00
Joao Matos d7faf5f063 Fix SDL_PollEvent generation in the SDL example.
Fixes https://github.com/mono/CppSharp/issues/978.

Thanks to @Saalvage.
2023-10-18 17:40:15 +01:00
Salvage 7f567b604b Fix non-void returning functions with value-type out parameters
Also fixes indentation
2023-10-18 17:37:00 +01:00
Salvage 0c60384ea3 Additional bump 2023-10-18 16:27:43 +01:00
Salvage 0534e33178 Bump GH actions versions to solve warnings 2023-10-18 16:27:43 +01:00
Salvage a6ef9d9095 Fix source dir 2023-10-18 16:27:43 +01:00
Salvage 7e6c49225f Test fix broken packages 2023-10-18 16:27:43 +01:00
Joao Matos 2a351b7f22 Update our version to 1.1. 2023-10-18 16:03:36 +01:00
Salvage 20950c5a34 More stringent test; Fix indentation (of the code itself, not in the generator) 2023-10-18 12:33:08 +01:00
Salvage ebe6b8a415 Fix value type out parameters 2023-10-18 12:33:08 +01:00