Skip to content

Algebraic Datatype Renovation #5183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
626ad48
Unified algebraic datatype representation implementation, initial ver…
jld Feb 18, 2013
c4682dc
Convert match on enums to use trans::adt.
jld Feb 28, 2013
5e2302a
Convert type_of to use trans::adt.
jld Feb 23, 2013
8a17066
Avoid unnecessary casts in struct_GEP
jld Feb 23, 2013
04ecab9
Re-add discriminant range annotations
jld Feb 23, 2013
7b2b4fa
Add a test for enum discriminant range overflow.
jld Feb 23, 2013
e09a843
Handle unit-like types specially.
jld Feb 25, 2013
a5030e7
Wrap const structs in as many LLVM structs as the non-const case.
jld Mar 7, 2013
b673b26
Factor out discriminant loading more, for use in casts.
jld Feb 28, 2013
5cbc257
Renovate expr_tup translation
jld Feb 23, 2013
fdd2845
Convert expr_struct to use adt, and try to share code with tuples.
jld Feb 24, 2013
40313fb
Renovate nullary variant construction
jld Feb 24, 2013
3a4714d
Renovate field projection expressions
jld Feb 24, 2013
c7325c4
Convert the rest of the adt GEPi's in _match
jld Feb 24, 2013
80844f9
Add regression tests for a subtle aspect of expr_struct translation.
jld Feb 24, 2013
2a028c5
Convert newtype "dereference" to trans::adt.
jld Feb 24, 2013
bb689c0
Convert const ADT construction to trans::adt.
jld Feb 24, 2013
f0c6a8e
Test for struct-like variants in consts
jld Feb 24, 2013
59daf76
Make functional-update struct consts not an ICE
jld Feb 24, 2013
075affa
Convert const field extraction to trans::adt
jld Feb 24, 2013
6bb6bab
Renovate cast-to-int
jld Feb 25, 2013
ca450e3
Move trans_enum_variant to trans::adt.
jld Feb 25, 2013
68b3f0d
base::iter_structural_ty: tuples
jld Feb 25, 2013
c0f6909
base::iter_structural_ty: structs and records
jld Feb 25, 2013
29d0430
Convert iter_structural_ty to trans::adt
jld Feb 25, 2013
5ca4fdf
Convert trans_tuple_struct to trans::adt.
jld Feb 25, 2013
71b6e94
glue::trans_struct_drop -> adt
jld Feb 25, 2013
b6bcf1a
Finish removing struct layout dependencies from glue.
jld Feb 25, 2013
8105da8
GC the now-unused old layout helpers
jld Feb 25, 2013
a8237a4
Bonus Fix: typarams are no longer inhabited
jld Feb 25, 2013
a9026c7
Memoize trans::adt::represent_type
jld Feb 25, 2013
d6acb96
Add lots of comments to adt.rs, and some minor cleanup.
jld Feb 28, 2013
8dca7be
A little more cosmetic cleanup
jld Feb 28, 2013
6840b48
trans_cast_to_int is hard to explain; make it trans_get_discr instead.
jld Feb 28, 2013
e13111f
Even more comments for ADT-related interfaces
jld Mar 2, 2013
1f9bc64
adt.rs renaming: "field" rather than "element"; set_discr -> start_init.
jld Mar 3, 2013
a69ec17
GC now-unused imports
jld Mar 5, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/librustc/middle/check_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ pub fn check_expr(sess: Session,
expr_field(*) |
expr_index(*) |
expr_tup(*) |
expr_struct(*) |
expr_rec(*) => { }
expr_struct(_, _, None) |
expr_rec(_, None) => { }
expr_addr_of(*) => {
sess.span_err(
e.span,
Expand Down
169 changes: 72 additions & 97 deletions src/librustc/middle/trans/_match.rs

Large diffs are not rendered by default.

Loading