Michael Sullivan
0beb271d8c
Fix bind to work with boxed arguments with type parameters.
...
This still doesn't work with bare fn arguments with type parameters.
2011-07-11 11:37:55 -07:00
Rafael Ávila de Espíndola
15a670a1b1
Use new snapshot.
2011-07-11 14:32:18 -04:00
Brian Anderson
64ad5928e7
Actually run tests from the std runner. Issue #428
2011-07-11 11:19:32 -07:00
Rafael Ávila de Espíndola
f666c97e6d
Step 1/n for moving to the new type system: include intrinsics.bc in the
...
snapshot.
2011-07-11 12:09:52 -04:00
Marijn Haverbeke
7595fe5153
Implement record patterns
...
Closes #469 .
2011-07-11 15:32:41 +02:00
Marijn Haverbeke
12cb128a0a
Move visit to newtype-style nominal type
...
This makes getting the function fields out of the visitor less
cumbersome and more efficient (no take/drop).
2011-07-11 13:53:50 +02:00
Marijn Haverbeke
5f544b1366
Output a meaningful error when too few or too many type parameters given
...
Closes #619
2011-07-11 13:19:34 +02:00
Marijn Haverbeke
86ee3454a1
Implement or-patterns in case clauses
...
You can now say
expr_move(?dst, ?src) | expr_assign(?dst, ?src) { ... }
to match both expr_move and expr_assign. The names, types, and number
of bound names have to match in all the patterns.
Closes #449 .
2011-07-11 11:01:54 +02:00
Marijn Haverbeke
4d325b1a15
Spill instead of copy when binding a pattern that's only a var binding
...
The alias rules guarantee that the alt-ed value will outlive the binding's
last use, so this is safe.
This is a preparation for or-patterns. Joining scoped bindings seems like
it would get messy.
2011-07-11 10:33:19 +02:00
Brian Anderson
1e965412d8
Add Jesse Ruderman to AUTHORS.txt
2011-07-10 17:08:18 -07:00
Jesse Ruderman
fa78fee4de
Add uint::min
2011-07-10 17:05:25 -07:00
Jesse Ruderman
ea69f48eac
Add a missing case so nbody.rs can pp
2011-07-10 17:05:25 -07:00
Jesse Ruderman
ab50da9445
Export noop_fold_expr so the fuzzer can use it
2011-07-10 17:05:25 -07:00
Jesse Ruderman
425b331dee
fuzzer.rs is now a pseudo-fuzzer that takes an AST and replaces expressions inside it
2011-07-10 17:05:25 -07:00
Jesse Ruderman
b4781bf8dd
Type-parameterize ivec_fuzz
2011-07-10 17:05:25 -07:00
Jesse Ruderman
3671cddcba
Remove comments complaining about https://github.com/graydon/rust/issues/633 since it is fixed
2011-07-10 17:05:25 -07:00
Jesse Ruderman
e91f8b5db2
Pieces of a fuzzer, WIP
2011-07-10 17:05:25 -07:00
Brian Anderson
6d3513eaee
Make #fmt work from inside std. Issue #175
...
At long last, this patch makes #fmt usable from inside the standard library.
The way it does it us very hackish, but at least it works now.
2011-07-10 17:00:28 -07:00
Brian Anderson
e494e73cdd
Use more encapsulation for metadata::cstore
2011-07-10 15:44:11 -07:00
Patrick Walton
18ebef5bba
stdlib: Remove FIXME that's more like a WONTFIX
2011-07-10 15:35:06 -07:00
Patrick Walton
4008cad044
stdlib: Remove the cast from ioivec
2011-07-10 13:22:29 -07:00
Patrick Walton
7871b55597
stdlib: Implement an interior-vector version of the io module
2011-07-10 12:47:51 -07:00
Patrick Walton
875c4622fb
stdlib: Implement str::bytes_ivec() using pointers and casts
2011-07-10 02:05:52 -07:00
Patrick Walton
91dcc1d054
stdlib: Add missing unsafe.rs. Puts out burning tinderbox.
2011-07-10 01:32:35 -07:00
Patrick Walton
7efb942639
rt: Remove the now-unused upcall_ivec_resize and upcall_ivec_spill, which allocated from the wrong heap
2011-07-10 01:30:45 -07:00
Patrick Walton
0babfd9f98
stdlib: Add unsafe to the std.rc, now that it actually builds
2011-07-10 01:24:31 -07:00
Patrick Walton
d30f22eb65
rt: Remove the _2 prefix from intrinsics; all rust-intrinsics now use explicit return pointers
2011-07-10 01:20:18 -07:00
Patrick Walton
f02c998a8d
snap: Register new snapshots
2011-07-10 01:13:00 -07:00
Patrick Walton
f42c94740a
rustc: Make rust-intrinsics take an explicit return pointer
2011-07-09 21:13:25 -07:00
Patrick Walton
e823ca4965
stdlib: Implement casts. The horror.
2011-07-09 20:14:47 -07:00
Brian Anderson
75047ea87e
Generate code to load a crate's tests into the std test runner. Issue #428
2011-07-09 19:30:04 -07:00
Brian Anderson
09982784c6
Begin adding some test runner types to std. Issue #428
2011-07-09 16:08:03 -07:00
Brian Anderson
f72dbec9b5
Collect functions that look like unit tests. Issue #428
2011-07-09 12:36:03 -07:00
Brian Anderson
5543404abe
Track the path as we fold over the AST looking for unit tests. Issue #428
2011-07-09 12:35:30 -07:00
Brian Anderson
9af59f9d81
Add sha1 and int tests to stdtest. Issue #428
2011-07-09 12:35:30 -07:00
Brian Anderson
45b00935f3
Begin running the test for int::pow
...
Somehow this has been disabled forever
2011-07-09 12:35:30 -07:00
Tim Chevalier
9ec5e90608
Tests for constraint propagation
2011-07-08 22:25:57 -07:00
Tim Chevalier
182c413af1
Propagate constraints through copy, move, and swap
...
Assignments and moves with a simple local variable reference on the
RHS now propagate any typestate constraints the RHS was involved
in to the LHS. Swaps where both sides are local variables
exchange the constraints.
This was a pain in the butt and I'm still not proud of the resulting
code. Needs refactoring like whoa.
2011-07-08 22:25:57 -07:00
Tim Chevalier
be6febb46d
Minor refactoring
2011-07-08 22:25:57 -07:00
Tim Chevalier
7060f4c89c
Alias-ify some prettyprinting functions
2011-07-08 22:25:57 -07:00
Tim Chevalier
36c4cb37ad
Improve impossible-case handling in ty::get_element_type
2011-07-08 22:25:57 -07:00
Patrick Walton
91d45b91e6
stdlib: Implement str::unsafe_from_bytes_ivec()
2011-07-08 22:23:11 -07:00
Patrick Walton
aa0f6f4961
stdlib: Add an offset function for simple pointer arithmetic on unsafe pointers
2011-07-08 21:56:15 -07:00
Brian Anderson
7498d03693
Improve the error message for import glob collisions. Closes #482
...
Instead of noting where the imported things were defined, note where they were
imported. This is more useful and avoids issue #482 .
2011-07-08 18:55:01 -07:00
Brian Anderson
394b8fcd1c
Add test case for issue #333 . Closes #333
...
This has been fixed by a mystery hacker.
2011-07-08 17:43:44 -07:00
Patrick Walton
1ff426b89f
rustc: Use interior vectors for the union-find in rustc
2011-07-08 17:00:21 -07:00
Patrick Walton
9b7984c250
snap: Register new snapshots
2011-07-08 16:51:25 -07:00
Patrick Walton
ccfbb74f11
rustc: Move maps over to interior vectors
2011-07-08 16:37:43 -07:00
Patrick Walton
8450ab9a2b
rustc: Fix a level-of-indirection problem by using size_of() to compute dynamically sized interior vector element sizes instead of field_of_tydesc()
2011-07-08 16:37:43 -07:00
Brian Anderson
f5d604f0c3
Decode types across multiple crates. Closes #632
2011-07-08 15:07:14 -07:00