Luqman Aden
fc78b93c41
Wrap llvm::InlineAsm::AsmDialect
2013-03-12 01:03:34 -07:00
Luqman Aden
ecccc0d649
Parse inline assembly.
2013-03-12 01:03:34 -07:00
Brian Anderson
82f190355b
Remove uses of log
2013-03-11 23:19:42 -07:00
Josh Matthews
1e1efbf2c3
Avoid propagating link_arg values that are unlikely to be resolveable under arbitrary directories.
2013-03-12 00:50:19 -04:00
bors
9b9ffd5b41
auto merge of #5304 : jld/rust/const-adjustments, r=graydon
...
These changes make const translation use adjustments (autodereference, autoreference, bare-fn-to-closure), like normal code does, replacing some ad-hoc logic that wasn't always right.
As a convenient side-effect, explicit dereference (both of pointers and of newtypes) is also supported in const expressions.
There is also a “bonus fix” for a bug in the pretty-printer exposed by one of the added tests.
2013-03-11 21:12:43 -07:00
Brian Leibig
c978025d0d
Debuginfo revamp
2013-03-11 14:09:06 -07:00
bors
ce24ebb858
auto merge of #5314 : jld/rust/adt-simplification, r=pcwalton
...
Struct and enum representations have some complicatedness that's no longer needed. Now that everything's in one place and has access to anything we'd want to know about the type, flatten some of that out. Slight changes to representations in some cases.
2013-03-11 11:54:49 -07:00
Patrick Walton
08c840205e
librustc: Lint the old drop
destructor notation off
2013-03-11 09:36:00 -07:00
Patrick Walton
7353568cd8
librustc: Remove old-style operator overloading
2013-03-11 09:36:00 -07:00
Patrick Walton
dc4869945c
librustc: Remove newtype enums from librustc
2013-03-11 09:35:59 -07:00
Patrick Walton
d18f785457
librustc: Replace all uses of fn()
with &fn()
. rs=defun
2013-03-11 09:35:58 -07:00
Seo Sanghyeon
9e85589ad3
Implement vector destructuring from tail
2013-03-11 19:01:51 +09:00
Jed Davis
9eaa608b04
Get rid of the Unit
enum representation.
...
The only thing we really lose is that C-like enums with one variant and a
non-zero discriminant now take up space, but I do not think this is a
common usage. As previously noted, that was mostly there for
transitional compatibility with the pre-adt.rs codebase.
2013-03-11 00:01:04 -07:00
Jed Davis
e6b5e00ea2
Simplify struct representation.
...
Out goes the extra layer of struct wrapping; the destructedness flag is
added to the end of the struct. This means that, if the struct
previously had alignment padding at the end, the flag will live there
instead of increasing the struct size.
2013-03-10 23:57:38 -07:00
Niko Matsakis
62aa8d7de9
Simplify the interface to check_fn by pulling some of the madness out to its callers
2013-03-10 15:05:22 -04:00
Jed Davis
1df0a0ba0f
Const dereference works now, so allow it.
2013-03-09 17:40:59 -08:00
Jed Davis
122e4a28b8
Don't copy const data to do an autoderef+autoref.
2013-03-09 17:40:59 -08:00
Jed Davis
e42afd3129
Let const_deref "dereference" newtypes.
2013-03-09 17:40:59 -08:00
Jed Davis
5ca1d353de
Implement most of adjustment handling for consts.
...
Changes the ad-hoc closure adjustment into using adjustment info instead
of being separately driven from types, and likewise for autoderef.
Also takes care of autoref (the cases we should be seeing in consts,
at least, since we can't be doing method calls which would need the
ref-to-vec mode), which didn't quite work right previously.
However, "dereference" of a newtype isn't handled yet....
2013-03-09 17:40:59 -08:00
Jed Davis
5571ca9b21
Break out const_addr_of.
2013-03-09 17:40:59 -08:00
Niko Matsakis
7cbd4b20ee
Remove @ast::Region and replace with @ast::Lifetime.
...
Modify pretty-printer to emit lifetimes and fix a few minor
parser bugs that this uncovered.
2013-03-09 19:43:59 -05:00
Ben Striegel
fdf69dd7b0
Finish de-implicit-selfing everything but the test suite
2013-03-08 19:34:39 -05:00
Alex Crichton
2c87920f52
test: Removing dvec uses
2013-03-08 09:54:41 -05:00
Alex Crichton
2a72099063
rustc: Remove uses of DVec
2013-03-08 09:54:20 -05:00
Patrick Walton
48b14f5562
librustc: Add #[link_args] to metadata
2013-03-07 22:37:58 -08:00
Patrick Walton
d661711cc2
test: Fix tests.
2013-03-07 22:37:58 -08:00
Patrick Walton
9a17ef9b52
librustc: Stop parsing assert
.
2013-03-07 22:37:57 -08:00
Patrick Walton
d7e74b5e91
librustc: Convert all uses of assert
over to fail_unless!
2013-03-07 22:37:57 -08:00
Patrick Walton
0ea031bcb8
librustc: Remove record patterns from the compiler
2013-03-07 22:37:03 -08:00
Patrick Walton
954ae9c975
libsyntax: Remove struct literal expressions from the compiler
2013-03-07 22:32:55 -08:00
Patrick Walton
4e3dbfe052
librustc: Remove structural record types from the compiler
2013-03-07 22:32:54 -08:00
Patrick Walton
239e64242c
libsyntax: Stop parsing structural record types
2013-03-07 22:32:52 -08:00
Patrick Walton
6b5d1afeec
librustc: Remove "extern mod { ... }" from librustc, librustdoc, and tests. rs=deexterning
2013-03-07 22:32:52 -08:00
Josh Matthews
27668fbfab
Allow casting integers to unsafe pointers in constant expressions.
2013-03-07 15:36:55 -05:00
Josh Matthews
7bb03345cf
Inline constants across crates.
2013-03-07 15:34:52 -05:00
Josh Matthews
50277ec555
Permit casting region pointers to unsafe ones.
2013-03-07 14:48:28 -05:00
Brian Anderson
81e370285f
Merge remote-tracking branch 'brson/cross7'
...
Conflicts:
configure
mk/rt.mk
2013-03-06 23:54:35 -08:00
Jed Davis
a69ec175f8
GC now-unused imports
2013-03-06 20:41:58 -08:00
Jed Davis
1f9bc64bae
adt.rs renaming: "field" rather than "element"; set_discr -> start_init.
...
This way "field" refers to the abstraction and "element" (as in get_elt,
"get element pointer", etc.) refers to the low-level LLVM operations.
2013-03-06 20:41:58 -08:00
Jed Davis
e13111fc5a
Even more comments for ADT-related interfaces
2013-03-06 20:41:58 -08:00
Jed Davis
6840b48074
trans_cast_to_int is hard to explain; make it trans_get_discr instead.
2013-03-06 20:41:58 -08:00
Jed Davis
8dca7be1df
A little more cosmetic cleanup
2013-03-06 20:41:58 -08:00
Jed Davis
d6acb96c9c
Add lots of comments to adt.rs, and some minor cleanup.
2013-03-06 20:41:58 -08:00
Jed Davis
a9026c7f19
Memoize trans::adt::represent_type
2013-03-06 20:41:58 -08:00
Jed Davis
a8237a46f1
Bonus Fix: typarams are no longer inhabited
2013-03-06 20:41:58 -08:00
Jed Davis
8105da8067
GC the now-unused old layout helpers
2013-03-06 20:41:58 -08:00
Jed Davis
b6bcf1a81f
Finish removing struct layout dependencies from glue.
2013-03-06 20:41:58 -08:00
Jed Davis
71b6e945c1
glue::trans_struct_drop -> adt
2013-03-06 20:41:58 -08:00
Jed Davis
5ca4fdfc98
Convert trans_tuple_struct to trans::adt.
...
Surely this cannot be the best way to get the type.
2013-03-06 20:41:57 -08:00
Jed Davis
29d0430c56
Convert iter_structural_ty to trans::adt
2013-03-06 20:41:57 -08:00