Age | Commit message (Collapse) | Author |
|
|
|
|
|
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
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
- 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
|
|
|
|
Our debug-detection code assumes so.
Fixes #246
r? @fitzgen
|
|
Handle macro redefinition a bit more graciously.
r? @fitzgen
|
|
|
|
Proper fix on aster soon, still worth to get this in I guess.
r? @fitzgen
|
|
Add support for bindings to overloaded functions
This commit (re)adds support for generating bindings to overloaded
functions. First, we use the symbol name instead of the canonical name
when checking if we have already generated bindings for a given
function. Second, we add a map from canonical names to number of times
we have generated a function with that canonical name. We increment this
number every time we generate a function. When the number is greater
than zero, we append it to the function name so that overloaded
functions get a unique Rust symbol.
Fixes #239
r? @emilio
|
|
This commit (re)adds support for generating bindings to overloaded
functions. First, we use the symbol name instead of the canonical name
when checking if we have already generated bindings for a given
function. Second, we add a map from canonical names to number of times
we have generated a function with that canonical name. We increment this
number every time we generate a function. When the number is greater
than zero, we append it to the function name so that overloaded
functions get a unique Rust symbol.
|
|
C complex only exists for floating point types.
C Complex are built in types
long double _Complex is not supported.
Long double would be an f128, runing generated binding test produces:
assertion failed: `(left == right)` (left: `16`, right: `32`)',
tests/expectations/tests/complex.rs:72
We test global long double _Complex because it does not require
layout tests.
Handle all the different way a complex can be present in
BindgenContext calling generated_bindegen_complex to indicate
that __BindgenContext will need to be added.
|
|
Add rudimentary support for `__float128`
This adds `__float128` as a builtin type, and generates an opaque array
of 16 `u8`s to represent it in the generated bindings since Rust doesn't
have an `f128` type.
Context and motivation: Somehow `__float128` is getting pulled into
SpiderMonkey headers from somewhere, and the lack of `__float128`
support was causing bindgen to hard fail in bindings generation.
r? @emilio
|
|
This adds `__float128` as a builtin type, and generates an opaque array
of 16 `u8`s to represent it in the generated bindings since Rust doesn't
have an `f128` type.
Context and motivation: Somehow `__float128` is getting pulled into
SpiderMonkey headers from somewhere, and the lack of `__float128`
support was causing bindgen to hard fail in bindings generation.
|
|
class cursor.
And it's not a valid identifier as a template parameter. See the comment and the
tests for details.
|
|
Parse macro expressions.
Clang is trolling me really hard so I'm going to see if the extra token I'm always getting is LLVM 3.9 specific.
|
|
|
|
default BitOr implementation.
|
|
|
|
Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
|
|
Add an option to avoid converting to f32/f64 automatically float types.
This implements another feature that we need for parity with upstream bindgen.
r? @fitzgen
|
|
|
|
|
|
|
|
Speed up running 'cargo test':
-Before: 2'17s
-After: 30s
Update to use new path:
Makefile, .travis.yml, CONTRIBUTING.md, tests/tests.rs
Delete unused expectation that fail to compile:
tests/expectations/moar_bitfields.rs
tests/expectations/variadic_template_args.rs
For every 'cargo test' run, the bindgen output where built.
We already test that the bindgen output match expectations/*.rs,
so there is no need to check it build unless the expectation is updated.
Move tests/expectations/*.rs to tests/expectations/tests/*.rs and make
tests/expectations a new dev-dependency package. This allow running:
- cargo test -p tests_expectations
In addition to the speed up, we also get a clean output for the build
and test run. In particular, a number of warnings are generated that should
probably be silenced, and eventually enforced modifying travis to build:
- RUSTFLAGS='-D warnings' cargo test -p tests_expectations
The benefit of having it as a new package is that it avoid polluting
the 'cargo test' output that should focus on bindgen.
|
|
|
|
clang: Some partially specialized templates return no template argument count.
Trying to construct a test case, meanwhile: r? @fitzgen
|
|
|
|
This extends the test runner to generate dummy C/C++ uses of the whitelisted
types in a test header in the tests/uses/ directory. It does not yet compile the
dummy uses into an object file whose DWARF debug info can be compared against
our Rust bindings' DWARF debug info.
Part of #151.
|
|
This replaces the manual gathering and traversal of the transitive closure of
whitelisted items with the new canonical method.
|
|
|
|
The only difference in bindings is because the methods were inlined, so with
llvm 3.9 we can skip those.
Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
|
|
Run tests on release builds
This makes `cargo test` test the appropriate release/debug bindgen binary and extends Travis CI testing to also test release builds.
r? @emilio
|
|
|
|
|
|
Follow review suggestion to use chunks to run test in parallel.
Set default to 16 which works well even on my limited laptop,
and which should benefit better machine.
To run with a different batch size:
BINDGEN_TEST_BATCH_SIZE=32 cargo test
On my machine:
1 parallel test takes 3'53
2 parallel test takes 2'10
8 parallel test takes 2'08
32 parallel test takes 2'07
|
|
|
|
After the rewrite, this works.
Fixes #3
|
|
parameter case.
|