summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-10-10Auto merge of #1065 - liranringel:thiscall, r=fitzgenbors-servo
Add support for the thiscall ABI Fixes https://github.com/rust-lang-nursery/rust-bindgen/issues/541 The thiscall ABI is experimental, so in order to use it nightly is required and also the following statement: `#![feature(abi_thiscall)]` That's a problem because the `tests_expectations` crate (in the tests folder) tries to compile it (and stable is required).
2017-10-09Auto merge of #1066 - pepyakin:bitfields-in-unions, r=fitzgenbors-servo
Bitfields in unions Fixes #744 I think it is WIP for the moment as I didn't run tests locally.
2017-10-10Add support for the thiscall ABILiran Ringel
2017-10-09Fix bitfields in bindgen unionsSergey Pepyakin
2017-10-09Fix bitfields in untagged Rust unionsSergey Pepyakin
2017-10-07Tell LLVM to not mangle names if they're already mangled through link_name ↵Liran Ringel
attribute
2017-10-05Review fixesSergey Pepyakin
2017-10-05rustfmtSergey Pepyakin
2017-10-05Introduce `with_loaned_item`.Sergey Pepyakin
2017-10-05Use bitfield getter_name in impl_debug.Sergey Pepyakin
Also make impl_partialeq test to also cover impl_debug case.
2017-10-05Use bitfield getter_name in impl_partialeqSergey Pepyakin
2017-10-05Eagerly generate bitfield accessor namesSergey Pepyakin
Also clean a bit.
2017-10-04Make bitfields larger than type opaque.Oliver Geller
2017-10-04Remove early anonymous bitfield filtering and consolidate name methodOliver Geller
2017-10-03Assert we only gen partialeq for non rust unionsSergey Pepyakin
2017-10-03Use `if let` instead of plain if.Sergey Pepyakin
2017-10-03Derive partialeq "manually" when possibleSergey Pepyakin
Remove derive-partialeq-template-inst test. Add comments. Don't implement PartialEq for incomplete arrays Handle opaque bases and template instantiations Extract constrain_type. Extract `is whitelisted?` check Add failing partialeq-anonfield join for comps Fix: return insert if not whitelisted Delegate TypeRefs and alias to constrain_join. Delegate Template instantiations to constrain_join Add derive-partialeq-pointer.hpp test Update comment. Fix layout alignment larger that array limit Add missing test for derive-partialeq-anonfield.rs Clean Clean Fix typo in opaque-template-inst-member test Remove redudant stmt Add comment on can_supersede. Format impl_partialeq and leave a comment Extract requires_storage into it's own function. Clean
2017-10-02s/lookup_item_id/lookup/ in method namesNick Fitzgerald
Its not just item ids now, and that name was pretty long...
2017-10-02Make `has_destructor` checks operate on TypeIdNick Fitzgerald
2017-10-02Tighten up `is_unsized` and `has_vtable` checks to operated on TypeIdNick Fitzgerald
2017-10-02Make methods/constructors/destructors use FunctionIdNick Fitzgerald
And also allow ID comparison across ID types, as this makes implementing the above much easier.
2017-10-02Introduce the `FunctionId` newtype for ids pointing to functionsNick Fitzgerald
2017-10-02Make `CompInfo::inner_vars` use `VarId` instead of `ItemId`Nick Fitzgerald
2017-10-02Introduce VarId for ids pointing to VarNick Fitzgerald
2017-10-02Put newtype-of-ItemId boilerplate behind a macroNick Fitzgerald
2017-10-02Introduce ModuleId to strongly type IDs pointing at ModulesNick Fitzgerald
2017-10-02Replace `as_type_id_unchecked` calls with checked calls where possibleNick Fitzgerald
2017-10-02Replacement should use TypeId rather than ItemIdNick Fitzgerald
2017-10-02Turn `CompInfo::inner_types` into TypeIdNick Fitzgerald
2017-10-02A bunch of parsing things should return TypeIdNick Fitzgerald
2017-10-02Make `Enum::repr` into a `TypeId`Nick Fitzgerald
2017-10-02`instantiate_template` should take a `TypeId` for the template definitionNick Fitzgerald
2017-10-02Make base members use TypeId rather than ItemIdNick Fitzgerald
2017-10-02Make a bunch more methods take generic idsNick Fitzgerald
2017-10-02Make comp fields contain `TypeId`sNick Fitzgerald
2017-10-02Make functions which take an ItemId generic to take any kind of idNick Fitzgerald
2017-10-02Make TemplateInstantiation's definition into a TypeIdNick Fitzgerald
The definition of a template is always a type, so it should be a TypeId rather than an ItemId. Template arguments, on the other hand are not guaranteed to be types. They can be constant values, for example.
2017-10-02Make `TypeKind::{Alias,TemplateAlias,Array,Pointer,Reference}` use `TypeId`Nick Fitzgerald
This commit makes certain `TypeKind`s that can only reference other types use `TypeId` instead of `ItemId`.
2017-10-02Resolve an `Item` with any id type that converts into an `ItemId`Nick Fitzgerald
2017-10-02Turn `build_templated_path` into `build_path`Nick Fitzgerald
None of the callers were passing template parameters.
2017-10-02Remove unused parameter to `codegen::utils::type_from_named`Nick Fitzgerald
2017-10-02Introduce the `TypeId` newtype over `ItemId`Nick Fitzgerald
This commit also makes `BindgenContext::resolve_type` take a `TypeId`, and adds unchecked conversions everywhere that we call it. Next, I'm going to go through the code base, replacing these unchecked conversions with checked ones, and tightening up types as I go.
2017-09-29ir: Prefer using known semantic parentsNick Fitzgerald
When choosing a parent ID for a type that we are parsing, prefer known semantic parents over the provided parent ID. It seems like we shouldn't even be passing explicit parent IDs around (they're often buggy), and instead should expand the `known_semantic_parent` infrastructure, but I'll leave that to some future work. Fixes #1048
2017-09-25Auto merge of #1022 - harlanhaskins:rustfmt-by-default, r=fitzgenbors-servo
Enable --rustfmt-bindings by default This patch flips --rustfmt-bindings to --no-rustfmt-bindings and enables formatting by default. If rustfmt is not accessible, a warning is printed and the bindings are printed unformatted. Addresses #977.
2017-09-25Auto merge of #1030 - emilio:repr, r=fitzgenbors-servo
codegen: Avoid generating wrong type for enums with unknown representation Fixes #1025
2017-09-25Auto merge of #1031 - emilio:warn-stderr, r=fitzgenbors-servo
lib: Print warnings to stderr instead of stdout. Seems like the right thing to do, and allows me to test stuff piping to rustc instead of saving to a file.
2017-09-25Auto merge of #1026 - alexeyzab:fix-compiling-expectations-macos, r=fitzgenbors-servo
Make objc-related expectations compile Fixes #1004. After looking at how `msg_send!` is supposed to be used, I realized that we were erroneously passing type signatures to it. The expectations compile now, but some of them are not formatted properly. My guess is that `rustfmt` does not know how to format the following: ``` msg_send!(obj, arg1:1 arg2:2 arg3:3) ``` Notice the lack of separatros between the `arg`s. Any advice on how to proceed here is appreciated. r? @fitzgen
2017-09-25lib: Print warnings to stderr instead of stdout.Emilio Cobos Álvarez
2017-09-25codegen: Avoid generating wrong type for enums with unknown representations.Emilio Cobos Álvarez
2017-09-24Auto merge of #1005 - fitzgen:some-little-deriving-cleanups, r=emiliobors-servo
Some little deriving cleanups See each commit for details. r? @emilio