Age | Commit message (Collapse) | Author |
|
|
|
Add initial Objective C support
Hi! I made an attempt to support parsing objective c headers. This is very much incomplete,
and likely not quite yet ready for merging, but I thought I'd share the progress so far.
Comments appreciated, I'm still very much a newbie in just about everything related to this change (rust as a language, rust ast, libclang, rust-bindgen), and there were many parts of code I wasn't quite sure about.
Commit message:
It parses interfaces and protocol but ignores base classes,
methods that don’t have arguments, the arguments are currently ignored.
Also you can pass objc class instances to C functions.
Next steps are inheritance/base classes, method signatures,
properties, categories.
Then check with system headers what is missing.
|
|
Fixes https://github.com/servo/rust-bindgen/issues/462
|
|
It parses interfaces and protocol but ignores base classes, and their
methods which don’t have arguments, the method signature is currently
ignored. Also you can pass objc class instances to C functions.
Next steps are inheritance/base classes, method signatures, properties,
categories. Then check with system headers what is missing.
|
|
It's just dumb.
|
|
We do the same for template parameters with `typename` on aliases.
This is not great, but it's better than generating invalid code.
|
|
These aren't extremely great, since this usually requires extra bookkeeping. But
C allows it, so let's keep the same semantics.
|
|
|
|
|
|
fix issue #455
|
|
This fails under BaseErrorResult in Stylo builds.
I have no idea right now why that isn't whitelisted (should be, given we're
calling it from TErrorResult's code generation).
Let's disable this pending further investigation since I don't have time to dig
into it right now.
|
|
So Rust is happy when you use them in template parameters, since the Derive
implementations can't catch this otherwise.
|
|
This is a useful debugging tool for us to catch when code generation and
whitelisting have different understandings of the world.
|
|
Fixes #447
|
|
Fixes #429
|
|
This is mostly a work around https://github.com/servo/rust-bindgen/issues/426,
until we implement the proper fix.
|
|
Forward declared structs now generate opaque enums
@emilio : I checked the test outputs again, and it seems that these changes are affecting struct *definitions* as well. Hence, I have not committed the test changes yet.
Fixes #62
|
|
|
|
codegen: Respect original repr for bitfield-like enums, add a constifying variant.
r? @fitzgen
Fixes #430
|
|
Honor and expose the derive_debug option.
Fixes #432
r? @fitzgen
|
|
codegen: Fix typedef re-export in namespaces when bindings aren't at the root.
|
|
Fixes #432
|
|
variant.
|
|
There's just no advantage in doing so.
|
|
The problem with #425 was the following:
We were parsing the methods after reaching the JS::Value definition.
Those methods contained a JSWhyMagic that we hadn't seen, so we parsed it as
being in the JS:: module.
|
|
|
|
|
|
|
|
We trace all things in the vtable via tracing the base types.
|
|
|
|
|
|
Fixes #410
|
|
|
|
|
|
|
|
|
|
Similar to our ability to emit the clang AST, this adds an option to
emit our IR for debugging purposes.
|
|
- The root crate is the `bindgen` binary
- Rust-ify the test suite, no more subprocesses!
- Update Travis config to test both crates
|
|
|
|
Template alias full and partial specialization improvements.
This doesn't completely fix #251, but fixes other related problems.
r? @fitzgen
|
|
|
|
This adds `debug!` logging for all paths that insert items into
`BindgenContext::items`, and adds some `debug_assert!`s against dangling
`ItemId`s.
|
|
codegen: Always implement debug for __BindgenUnionField.
Our debug-detection code assumes so.
Fixes #246
r? @fitzgen
|
|
Clean up TypeCollector implementations
Rather than making `TypeCollector` implementations recursively call
`collect_types` on their subtypes, just gather immediate subtypes into
the `ItemSet`. The subtypes' `TypeCollector` implementation will be
recursively called by `WhitelistedItemsIter`. This makes it less likely
we will "skip" a layer by recursively calling `collect_types` on
some subtypes without adding the subtypes themselves to the set.
r? @emilio
|
|
When we fail to parse Clang stuff into our IR and give up, and assume
that we are looking at a named template type, we now emit a warning to
assist with debugging.
|
|
Rather than making `TypeCollector` implementations recursively call
`type_collector` on their subtypes, just gather immediate subtypes into
the `ItemSet`. The subtypes' `TypeCollector` implementation will be
recursively called by `WhitelistedItemsIter`. This makes it less likely
we will "skip" a layer by recursively calling `collect_types` on
some subtypes without adding the subtypes themselves to the set.
|
|
Our debug-detection code assumes so.
Fixes #246
r? @fitzgen
|
|
Handle macro redefinition a bit more graciously.
r? @fitzgen
|
|
codegen: Special-case i64::MIN since it produces a overflow on aster.
Proper fix on aster soon, still worth to get this in I guess.
r? @fitzgen
|
|
Fix path detection after #228
r? @fitzgen
Too bad we can't test it on CI because CI has the path correctly setup :(
Fixes #242
|