Eric Holk
1c852ac9c0
Removing runtime tests. The runtime is tested well enough by the standard library tests, so we might as well have less code to fix during refactoring.
2011-06-28 16:12:33 -07:00
Eric Holk
64596e6583
Teach the parser and typechecker to understand port[int](). Closes #588
2011-06-28 16:11:04 -07:00
Brian Anderson
1c6ae8cadf
Use span_fatal for failure to find crates
2011-06-28 16:04:09 -07:00
Brian Anderson
46b83a92d6
Add test case for non-matching crate metadata in use statements
2011-06-28 15:58:22 -07:00
Brian Anderson
8ac60e99ea
Extract meta_item sorting from back::link to middle::attr
2011-06-28 15:46:09 -07:00
Brian Anderson
aecc5e6e0f
Add comments to middle::attr. Issue #487
2011-06-28 15:34:27 -07:00
Brian Anderson
a83b64d15d
Rework how linkage attributes are determined
...
The meta items within a crate's link attribute are used in linkage:
#[link(name = "std",
vers = "1.0",
custom = "whatever")];
Name and vers are treated specially, and everything else is hashed together
into the crate meta hash.
Issue #487
2011-06-28 15:25:47 -07:00
Brian Anderson
0608e277b6
Add some helper functions for attributes. Issue #487
2011-06-28 15:25:47 -07:00
Patrick Walton
7554423423
stdlib: Remove old botch from ufind
2011-06-28 14:16:09 -07:00
Tim Chevalier
d832f7abec
Another test for typestate and expr_fn
2011-06-28 13:14:52 -07:00
Tim Chevalier
28459ca0eb
Handle lazy binops properly in typestate
...
The typestate analysis now reflects that the second operand of a
logical and or or may not be evaluated.
2011-06-28 13:07:52 -07:00
Tim Chevalier
a7c4c19d4b
add a predicate that determines whether a binop is lazy (and and or are lazy)
2011-06-28 13:07:52 -07:00
Rafael Ávila de Espíndola
d5fc01caef
Move glue.o to stageN/lib.
2011-06-28 15:20:43 -04:00
Tim Chevalier
926049eddd
Tests only: more tests with constraints and loops
2011-06-28 11:49:11 -07:00
Patrick Walton
1ca0db5421
rustc: Add a "type-owns-heap-mem" cache. 2x translation speedup.
2011-06-28 11:36:11 -07:00
Patrick Walton
5f5b7e3348
rustc: Don't call cmp glue if the type is a simple scalar
2011-06-28 11:24:34 -07:00
Graydon Hoare
0dc2aa3d09
Bit more work on mingw cross. Pending on other changes now (test combination, build artifact locations)
2011-06-28 11:18:34 -07:00
Graydon Hoare
8ebcab711d
More work on mingw cross build.
2011-06-28 11:18:34 -07:00
Graydon Hoare
4e89b5afe7
Silence texi2pdf during make
2011-06-28 11:18:34 -07:00
Brian Anderson
cab73f8897
Write metadata for more meta_item types. Issue #487
2011-06-28 10:12:05 -07:00
Brian Anderson
f53c4f79d7
Write metadata for crate attributes. Issue #487
2011-06-28 10:03:41 -07:00
Brian Anderson
894e2229ac
Add emacs variables to encoder.rs
2011-06-28 10:03:40 -07:00
Brian Anderson
d328c7e03e
List crate attributes when running rustc with '--ls'
2011-06-28 10:03:40 -07:00
Marijn Haverbeke
9561def209
Use 'resource' rather than 'res' as a keyword
...
Resources are now defined like...
resource fd(int n) { close(n); }
Calling fd with an int will then produce a non-copyable value
that, when dropped, will call close on the given int.
2011-06-28 18:00:39 +02:00
Marijn Haverbeke
fb14afd5eb
Add test cases for resources
2011-06-28 18:00:38 +02:00
Marijn Haverbeke
07125aa38b
Fix bug that prevented boxes-in-resources from being freed
2011-06-28 18:00:05 +02:00
Marijn Haverbeke
e2cb97a2fc
Add some missing cases for ty_res in ty.rs
2011-06-28 18:00:05 +02:00
Marijn Haverbeke
d730bb730a
Make it possible to use * to dereference a resource
2011-06-28 18:00:05 +02:00
Paul Stansifer
b3443eb049
'#simplext' -> '#macro'
2011-06-28 15:02:12 +00:00
Paul Stansifer
c3901cdf8e
Add simple syntax extension (#simplext)
2011-06-28 15:02:12 +00:00
Paul Stansifer
b632681780
Add AST fold.
2011-06-28 15:02:12 +00:00
Marijn Haverbeke
be748fc215
Properly guard resource values against double-drop
...
Ths involved adding an extra field to their representation, so that there is
something to check for zero.
2011-06-28 16:14:15 +02:00
Rafael Ávila de Espíndola
ecc080ed0b
Use "" in the native_name as an indication that no extra options have to
...
be passed to the "linker". Use that for libc.
2011-06-28 08:21:13 -04:00
Patrick Walton
663aa76635
rustc: Call cmp glue directly if we statically know it
2011-06-27 18:35:01 -07:00
Patrick Walton
dfccd5a138
rustc: Fix stack explosion on -O0 from Alloca() instead of alloca() in cmp glue
2011-06-27 18:27:26 -07:00
Tim Chevalier
85b5b2a8e4
Tests for while loops that may invalidate constraints
...
Wrote some small test cases that use while loops and moves, to
make sure the poststate for the loop body gets propagated into the
new prestate and deinitialization gets reflected.
Along with that, rewrite the code for intersecting states. I still
find it dodgy, but I guess I'll continue trying to add more tests.
Also, I'll probably feel better about it once I start formalizing
the algorithm.
2011-06-27 18:14:23 -07:00
Tim Chevalier
6d1050b1c7
pure_exp should set the state, not extend it
...
This fixes a bug where de-initializations were getting masked
(and programs that used a variable that had been de-initialized
snuck through).
2011-06-27 18:14:23 -07:00
Brian Anderson
a72481f90b
Rename metadata::defs to metadata::tags
2011-06-27 16:43:50 -07:00
Brian Anderson
55944f4e7f
Don't export some of the metadata modules
2011-06-27 16:38:57 -07:00
Brian Anderson
df2cfac07f
Move what's left of metadata::cwriter into middle::trans
2011-06-27 16:30:27 -07:00
Brian Anderson
45efb1f02a
Cleanup in metadata module
2011-06-27 16:30:27 -07:00
Brian Anderson
119193497e
Extract metadata::decoder from metadata::creader
2011-06-27 16:30:27 -07:00
Brian Anderson
a3a2cc3d98
Extract metadata::tydecode from metadata::creader
2011-06-27 16:30:27 -07:00
Brian Anderson
33294c7293
Extract llvm-independent code from cwriter to metadata::encoder
2011-06-27 16:30:27 -07:00
Brian Anderson
279a229414
Move metadata tag definition to metadata::defs
2011-06-27 16:30:27 -07:00
Brian Anderson
6c23e09454
Limit exports from metadata::tyencode
2011-06-27 16:30:27 -07:00
Brian Anderson
5601a6f534
Move metadata::cwriter::encode to metadata::tyencode
2011-06-27 16:30:27 -07:00
Brian Anderson
ba5c7a570d
Rename middle::metadata to metadata::cwriter. Move creader to metadata
...
Preparation for a lot more metadata refactoring
2011-06-27 16:30:27 -07:00
Brian Anderson
d4a5487e1c
Limit exports from middle::metadata
2011-06-27 16:30:27 -07:00
Patrick Walton
e4b5d910dc
rustc: Directly emit calls to glue if possible
2011-06-27 15:38:21 -07:00