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

Rework the package -- Take 1 #278

Merged
merged 52 commits into from
Apr 16, 2021
Merged
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
1d8601c
Rework the package
Gnimuc Jan 3, 2021
349356c
Add back basic macro support
Gnimuc Feb 23, 2021
d4b6071
Add an option to ignore header guards
Gnimuc Feb 23, 2021
94604e3
Add `CLANG_INCLUDE` if `auto_detect_system_headers` is `true`
Gnimuc Feb 23, 2021
2832928
Default behavior auditing
Gnimuc Feb 23, 2021
33e861b
Automatically detect those missing inclusion directive headers and ot…
Gnimuc Feb 24, 2021
7047e90
Fix `pretty_print` for `opaque_as_mutable_struct`
Gnimuc Feb 24, 2021
d47704e
Add a handy macro `add_def` for adding extra definitions
Gnimuc Feb 25, 2021
c651f2b
Remove extra space
Gnimuc Feb 25, 2021
02d3086
Fix the condition for `StructMutualRef`
Gnimuc Feb 25, 2021
97cea24
Fall back to use `children` if `fields` returns an empty array
Gnimuc Feb 25, 2021
2be54b9
Add `is_same` function for comparing cursors in different TUs
Gnimuc Feb 25, 2021
639d460
Print blocked headers
Gnimuc Feb 25, 2021
f25e2a8
Duplicated tag-types should also be marked
Gnimuc Feb 25, 2021
73bde47
Implement `CatchDuplicatedAnonymousTags` pass
Gnimuc Feb 25, 2021
fceb8a4
Add `TypedefMutualRef`
Gnimuc Feb 27, 2021
aef113e
Clean C code in the test folder since real-world C libraries are now …
Gnimuc Feb 27, 2021
46d5877
Implement `CollectNestedRecord` pass for collecting nested record typ…
Gnimuc Feb 27, 2021
0149486
Recursively collect nested record nodes
Gnimuc Feb 28, 2021
e3704fc
Do not cut the cycle at a typedef unless we must do
Gnimuc Feb 28, 2021
3c8c1d1
Add codegen method for generating `getproperty`
Gnimuc Mar 1, 2021
9c0bb28
Generate `Base.setproperty!`
Gnimuc Mar 1, 2021
f01399e
Support C11's nested anonymous records
Gnimuc Mar 1, 2021
9c05d38
Ignore function-like macros in the "basic" macro mode
Gnimuc Mar 2, 2021
9a1450a
Add an option for ignoring nodes in the printing passes
Gnimuc Mar 2, 2021
734f6d1
Add `StdPrinter`
Gnimuc Mar 3, 2021
246a061
Don't convert UInt to Int through type-assert (#282)
vchuravy Mar 5, 2021
429c052
Minor updates
Gnimuc Mar 10, 2021
139c600
Fix wrong translation for the return type of `FunctionNoProto` decls
Gnimuc Mar 10, 2021
6ce9801
Bump version for Julia 1.6
Gnimuc Mar 30, 2021
aa39920
Bump CI version
Gnimuc Mar 30, 2021
d2e4083
Add `TweakMutability` pass
Gnimuc Apr 2, 2021
60254e9
Use more strict rules for "auto-mutability"
Gnimuc Apr 3, 2021
68bbff3
Fix offset
Gnimuc Apr 4, 2021
fe61454
Add the `field_access_method_list` entry for generating field access …
Gnimuc Apr 4, 2021
c49cf36
Add `definition_whitelist` for peeking some definitions in the stdlib
Gnimuc Apr 5, 2021
d12ca65
Add experimental support for generating field access methods for bitf…
Gnimuc Apr 5, 2021
946e964
Correct the illegal use of `isa`
Gnimuc Apr 6, 2021
22950d4
Allow multiple jll pkgs
Gnimuc Apr 8, 2021
c7c797f
Fix a comment printing issue
Gnimuc Apr 8, 2021
88ecf0c
Add naive compiler integer types
Gnimuc Apr 8, 2021
56f71a9
Misc. fixes on Windows
Gnimuc Apr 10, 2021
084d3b4
Merge branch 'dag' of https://github.com/ihnorton/Clang.jl into dag
Gnimuc Apr 10, 2021
305a797
Fix a `normpath` issue
Gnimuc Apr 10, 2021
c7ed768
Merge branch 'dag' of https://github.com/ihnorton/Clang.jl into dag
Gnimuc Apr 10, 2021
7d7127b
Add an option for selecting compiler headers
Gnimuc Apr 11, 2021
5418e89
Generate more helper overloading methods for mutual-referenced struct…
Gnimuc Apr 11, 2021
471242f
Add support for generating deterministic symbols
Gnimuc Apr 11, 2021
f476f99
Macro: support simple binary operator macro and other improvements
Gnimuc Apr 12, 2021
63e0e78
Support `function_argument_conflict_symbols`
Gnimuc Apr 14, 2021
af19b7c
Add support for ignoring useless pure definition macros
Gnimuc Apr 14, 2021
fe798d9
Add more macro cases
Gnimuc Apr 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/generator/codegen.jl
Original file line number Diff line number Diff line change
@@ -175,7 +175,7 @@ function _emit_getproperty_ptr!(body, root_cursor, cursor, options)
fsym = make_symbol_safe(n)
fty = getCursorType(field_cursor)
ty = translate(tojulia(fty), options)
offset = getOffsetOf(getCursorType(root_cursor), n)
offset = getOffsetOf(getCursorType(root_cursor), n) ÷ 8
ex = :(f === $(QuoteNode(fsym)) && return Ptr{$ty}(x + $offset))
push!(body.args, ex)
end