diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-09-07 14:02:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-07 14:02:09 -0500 |
commit | b13f0766e28cf75dd04f358bf64d87ea96b111c3 (patch) | |
tree | d8686bf93e5fa8c52ff6d085008a6b25c2cba42e /tests/headers/class_with_inner_struct.hpp | |
parent | dcd8385a41f6fd6d8f5208931c418cbc745672b4 (diff) | |
parent | 46f74c189c95fc6a41daf8ded741e0cf5f5bed92 (diff) |
Auto merge of #940 - fitzgen:no-syntex, r=emilio
No more syntex
There are a few commits in this PR, but the big one is the commit that goes `syntex` -> `quote` for code generation. I've included a copy of its commit message below.
I tried to verify that it works with the stylo build still, but there were some issues, and then I checked with master, and that wasn't working either. So now I'm C-Reducing the failures on master and figured that this is at least ready for feedback in the meantime.
r? @emilio
----------------------------
The `syntex` crate is unmaintained. It is slow to build, and additionally it requires that we pre-process `src/codegen/mod.rs` before we build the `bindgen` crate.
The `quote` crate provides similar quasi-quoting functionality, is maintained, and builds faster. It doesn't have a typed API or builders, however; it only deals with tokens.
Before this commit:
```
$ cargo clean; cargo build
<snip>
Finished dev [unoptimized + debuginfo] target(s) in 98.75 secs
```
After this commit:
```
$ cargo clean; cargo build
<snip>
Finished dev [unoptimized + debuginfo] target(s) in 46.26 secs
```
Build time is cut in half! But what about run time?
Before this commit:
```
Generated Stylo bindings in: Duration { secs: 3, nanos: 521105668 }
```
After this commit:
```
Generated Stylo bindings in: Duration { secs: 3, nanos: 548797242 }
```
So it appears to be about 20ms slower at generating Stylo bindings, but I suspect this is well within the noise.
Finally, this also lets us remove that nasty `mem::transmute` inside `bindgen::ir::BindgenContext::gen` that was used for the old `syntex` context. Now `BindgenContext` doesn't have a lifetime parameter either. This should make it easier to revisit doing our analyses in parallel with `rayon`, since that context was one of the things that made it hard for `BindgenContext` to implement `Sync`.
Fixes #925
Diffstat (limited to 'tests/headers/class_with_inner_struct.hpp')
0 files changed, 0 insertions, 0 deletions