David Maas

Results 177 comments of David Maas

Random thought I had the other night while failing to sleep: Is there anything in the SysV ABI that says we *have* to use the register space? Could we construct...

B is actually much more viable as of https://github.com/InfectedLibraries/Biohazrd/commit/e4c8c7e6c467d84dc062380d7c299bf8958628dc (which was implemented for #75.) This will probably be the preference with one of the other options as a fallback.

Whenever we do this, make sure to add relevant support to `MoveLooseDeclarationsIntoTypesTransformation` for C#.

We might want to use `InlineExportHelper` to expose constants which cannot be converted to C# constants.

`TranslatedConstant` was added in https://github.com/MochiLibraries/Biohazrd/commit/9a2e781a44f0b201d6c57687c5fed3f86c6c2651, but it's currently not emitted by Biohazrd its self. (It can however be used in transformations.)

Repro test for `ScopeTests`: ```csharp [Fact] [RelatedIssue("https://github.com/InfectedLibraries/Biohazrd/issues/172")] public void OutOfScopeIgnoredDeclarationInsideInScopeDeclarationIsNotInScope() { TranslatedLibraryBuilder builder = new(); builder.AddFile(new SourceFile("A.h") { Contents = "struct __declspec(dllexport) MyStruct;", IsInScope = false, IndexDirectly = false });...

I've marked this with the relatively small label. Each one of these is small on its own, not the entire issue.

The easy solution here might be to skip Clang statements here: https://github.com/InfectedLibraries/Biohazrd/blob/8f179a30531cb063128887d1aa607178b62c09cd/Biohazrd/TranslationUnitParser.cs#L393 We already skip attributes for a similar reason. This would likely also solve this contrived example (which also...

Some constructors seem to be affected too. (In particular, `VecWriterProxy` in OpenCV.)

I believe the new ABI changes are going to start asserting around here since the cursor parameter list and the arranged argument list sizes are not going to match. We...