summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-08-14Auto merge of #892 - tmfink:feature-832-custom-rust-target, r=emiliobors-servo
Re-add --rust-target option to replace --unstable-rust Re-apply commit. Addresses #832 Instead of specifying whether or not to use stable, specify the Rust release to support (one of several stable/beta releases or nightly). The `--unstable-rust` option is still accepted and implies nightly. The definitions of `RustTarget` and `RustFeatures` are created with macros. For each test that uses unions, there is a version that uses the latest stable and 1.0.
2017-08-14Stablize name of reference and nested combination of ref, ptr, and arrayXidorn Quan
2017-08-13Re-add --rust-target to replace --unstable-rustTravis Finkenauer
Instead of specifying whether or not to use stable, specify the Rust release to support (one of several stable/beta releases or nightly). The `--unstable-rust` option is still accepted and implies nightly. The definitions of `RustTarget` and `RustFeatures` are created with macros. For each test that uses unions, there is a version that uses the latest stable and 1.0. This also fixes the bug where unions were generated with non-Copy fields.
2017-08-13ir: Sanitize base names more aggressively.Emilio Cobos Álvarez
This fixes stylo build failures when template instantiations tests caused a rust compile error due to a bad test name. This commit makes names better sanitized, preventing similar errors in the future.
2017-08-10Auto merge of #899 - bkchr:manual_debug_impl, r=fitzgenbors-servo
Implements Debug trait for types which do not support derive Debug For types that do not support derive Debug be implemented automatically by rust, we know can generate implementations of the Debug trait. This code generation is hidden behind the '--force-derive-debug' command-line flag. Should solve: #875 Sorry for the extra noise in lib.rs, codegen/mod.rs etc, that was rustfmt.
2017-08-11Renames cli --force-derive-debug to --impl-debugBastian Köcher
2017-08-10Adds ImplDebug trait for creating the Debug trait implementationsBastian Köcher
2017-08-10Implements Debug trait for types which do not support derive DebugBastian Köcher
For types that do not support derive Debug be implemented automatically by rust, we know can generate implementations of the Debug trait. This code generation is hidden behind the '--force-derive-debug' command-line flag.
2017-08-09Can derive Hash analysiszzhu
2017-08-04Revert "Add --rust-target to replace --unstable-rust"Nick Fitzgerald
This reverts commit 0bb7b9f1c4652f63f41eba4064b79c044fd3d955. It turns out our CI stopped running test expectations in an earlier regression (from d73507e; fix incoming) and so this pull request actually introduced a bunch of failures when compiling the test expectations and running their unit tests :(
2017-08-04Add --rust-target to replace --unstable-rustTravis Finkenauer
Instead of specifying whether or not to use stable, specify the Rust release to support (one of several stable/beta releases or nightly). The --unstable-rust option is still accepted and implies nightly. The definitions of `RustTarget` and `RustFeatures` are created with macros. For each test that uses unions, there is a version that uses the latest stable release and stable 1.0.
2017-08-03Auto merge of #889 - photoszzt:fix_recursive_whitelist_opaque, r=fitzgenbors-servo
Fix recursive whitelisting and handling of opaque for derive default Fix regression of derive default analysis. Also fix opaque handing exposed by the above fix. r? @fitzgen
2017-08-03Can derive copy analysiszzhu
2017-08-02Clean up trivially derive debugzzhu
2017-08-02Fix recursive whitelisting and handling of opaquezzhu
Fix regression of derive default analysis. Also fix opaque handing exposed by the above fix.
2017-08-01Not derive Copy for C flexible array memberWangshan Lu
2017-08-01Support deriving copy for large arrayWangshan Lu
2017-07-31Clean up left over derive debug nitszzhu
2017-07-31Auto merge of #861 - photoszzt:derive_default, r=fitzgenbors-servo
Can derive default analysis r? @fitzgen
2017-07-31Stablize name of pointer and arrayXidorn Quan
2017-07-28Auto merge of #863 - fitzgen:rm-used, r=emiliobors-servo
Remove the incomplete `--dummy-uses` feature This would generate dummy uses of all the whitelisted types, which we were planning on eventually using to generate DWARF for more layout testing of our types, but we decided that isn't worth the trouble. Kill it! r? @emilio
2017-07-28Remove the incomplete `--dummy-uses` featureNick Fitzgerald
This would generate dummy uses of all the whitelisted types, which we were planning on eventually using to generate DWARF for more layout testing of our types, but we decided that isn't worth the trouble. Kill it!
2017-07-27Auto merge of #860 - emilio:issue-848, r=fitzgenv0.29.0bors-servo
lib: Filter out include paths when looking for clang paths. Fixes #848
2017-07-27can derive default analysiszzhu
2017-07-27Remove the `CanDeriveDebug::Extra` associated typeNick Fitzgerald
Similar to `HasVtable::Extra`, it is no longer needed.
2017-07-27Remove unused `CanDeriveDebug` implNick Fitzgerald
2017-07-27Remove unused `HasVtable::Extra` associated typeNick Fitzgerald
This is a throwback from the old, ad-hoc computation before we used the fixpoint analysis.
2017-07-27lib: Filter out include paths when looking for clang paths.Emilio Cobos Álvarez
2017-07-26Report what the unknown generate item was when parsing `--generate`Nick Fitzgerald
2017-07-26Be conservative about deriving Debug/Default with large alignmentNick Fitzgerald
When there is large enough alignment that we might generate padding which has more members that `RUST_DERIVE_IN_ARRAY_LIMIT`, we can break our ability to derive traits. This commit solves this issue conservatively: there are cases where we leave a derive on the table, because in order to know that we could add that derive, we would need to compute padding before we determine whether we can derive. Fixes #648
2017-07-26Merge pull request #855 from photoszzt/move_dependency_outNick Fitzgerald
Pull out the loop that generates dependency map into its own function.
2017-07-25Pull out the loop that generates dependency map into its own function.zzhu
2017-07-25Merge pull request #853 from fitzgen/rust-lang-nurseryNick Fitzgerald
s/servo/rust-lang-nursery/ \o/
2017-07-25s/servo/rust-lang-nursery/ \o/Nick Fitzgerald
Fixes #852
2017-07-25has vtable analysiszzhu
2017-07-24Pull `return` up out of the branch armsNick Fitzgerald
2017-07-24Add `trace!` logging for the derive(Debug) analysisNick Fitzgerald
Useful for debugging when constraints go wrong.
2017-07-24Handle all opaque types at once in derive(Debug) analysisNick Fitzgerald
There are lots of different ways that a type can end up being opaque, and it is best to handle all the ways in one fell swoop, rather than check each different ways (for example, if a struct has non-type template params, if a template instantiation's template definition has them, etc...) for each different type kind.
2017-07-24A `ResolvedTypeRef` is opaque if it points to another opaque typeNick Fitzgerald
2017-07-22Never use spaces in generated name (fixes #844)Manish Goregaokar
2017-07-22Remove whitelisted_items as arg to codegen funcsOmar Akkila
2017-07-22analysis: Account for template instantiations of opaque types in the derive ↵Emilio Cobos Álvarez
debug analysis. We have a special-case for them in codegen to generate a blob, that can derive debug. This is a regression from #824, and hit stylo.
2017-07-21ir: Track the codegen-reachable items, and use it instead of ↵Emilio Cobos Álvarez
whitelisted_items() for code generation. This standardizes the behavior change at #834, but without regressions. I've added a few more tests for #833 here.
2017-07-21ir: We really need to traverse all edges for the used template parameter ↵Emilio Cobos Álvarez
analysis to be sound.
2017-07-21Auto merge of #829 - servo:disambig, r=emiliobors-servo
Use fully disambiguated name instead of a number for layout tests (fixes #394) These numbers cause tons of churn in the diffs for checked in bindings. r? @fitzgen
2017-07-20The `CannotDeriveDebug` analysis shouldn't special case blacklistingNick Fitzgerald
This is some copy-paste from the template param usage analysis that we don't need here. We already assume that blacklisted items are `derive(Debug)`able, and this doesn't change that.
2017-07-20Define a type for communicating that the constraint function hasn't reached ↵Nick Fitzgerald
a fixed point `ConstrainResult::Changed` is much more legible than `true`.
2017-07-20Capitalize, punctuate, and format a commentNick Fitzgerald
2017-07-20Use object literal short hand for `CannotDeriveDebug`Nick Fitzgerald
2017-07-20Also assert against dangling references after resolving typerefs and ↵Nick Fitzgerald
processing replacements Because these operations mutate the IR graph, its better to be safe and double check again. Don't worry -- these checks only happen on `testing_only_extra_assertions` builds!