Commit Graph

9309 Commits

Author SHA1 Message Date
Patrick Walton
383a801993 rustc: Universally quantify regions when looking up typeclass implementations 2012-03-14 18:17:40 -07:00
Niko Matsakis
a3d2882ffd fixup auto_serialize's treatment of nullary variants 2012-03-14 21:05:06 -04:00
Niko Matsakis
e702d20191 allow immut vars to be moved. enforce mut vars after stage0 in std. 2012-03-14 20:46:36 -04:00
Niko Matsakis
6b35875dca annotate libstd and start enforcing mutability 2012-03-14 20:46:36 -04:00
Patrick Walton
273c5e5f11 rustc: Lift the @ from the type definition of crate_ctxt into its uses
This will make it easier to convert crate_ctxt into a region pointer, since
there are functions that return crate contexts. There would be no way to type
these functions if crate_ctxt had to be an inferred region pointer.
2012-03-14 17:31:16 -07:00
Patrick Walton
1e0e089185 rustc: Fix a couple of bugs that prevented taking addresses of rvalues 2012-03-14 16:50:20 -07:00
Patrick Walton
b516913a5d test: Remove unsafe from the region tests 2012-03-14 16:18:33 -07:00
Patrick Walton
fd9c9ac912 rustc: Make region dereference no longer require an unsafe block 2012-03-14 16:17:45 -07:00
Patrick Walton
0cd72d24dc rustc: Autoderef through region pointers 2012-03-14 16:13:05 -07:00
Patrick Walton
45d0b5f0b9 rustc: Reword field/method-not-found error message to mention the possibility that a field wasn't found 2012-03-14 16:02:59 -07:00
Patrick Walton
83ed4f4bc4 test: Add a test case for the "self" region in enums 2012-03-14 15:41:54 -07:00
Patrick Walton
1ed768bc3b rustc: Determine the region of pointer dereference expressions 2012-03-14 15:13:04 -07:00
Niko Matsakis
1600be2c3b fix auto_serialize for enums with type parameters 2012-03-14 17:19:33 -04:00
Patrick Walton
715d1995d7 rustc: Make the self region work properly in enums 2012-03-14 14:05:57 -07:00
Patrick Walton
3a45f87620 rustc: Record the parent blocks of locals 2012-03-14 11:41:50 -07:00
Marijn Haverbeke
de79caa97e Add crude support for casts in constant expressions
Only casts to integral and float types are supported

Closes #1975
2012-03-14 18:05:28 +01:00
Marijn Haverbeke
c988800cf5 Properly walk pat_lit and pat_range in visit.rs
Issue #1975
2012-03-14 18:04:31 +01:00
Niko Matsakis
ffa187db25 adjust auto_serialize to generate fns named serialize_T()
We used to generate a module T with a serialize() and deserialize() fn,
but this was suboptimal for a number of reasons:

- it required moving serialization into core so that uint etc worked
- it was harder to override the serialization behavior locally
  (this is now trivial)
2012-03-14 11:49:28 -04:00
Niko Matsakis
c6f2594319 register new snapshots 2012-03-14 08:02:16 -04:00
Niko Matsakis
7c70d35a10 rewrite unify in a modal style, extend result module 2012-03-13 21:53:14 -04:00
Niko Matsakis
9086c6f5a2 merge all auto_serialize tests into one 2012-03-13 21:30:07 -04:00
Niko Matsakis
b30cb8e43a implement deserialization, rename mk_mem_buffer() to mem_buffer() 2012-03-13 21:30:07 -04:00
Niko Matsakis
d91742294f first (functional) version of the auto_serialize syntax ext 2012-03-13 21:30:07 -04:00
Niko Matsakis
06c8acdd31 fixup serialize_variant 2012-03-13 21:30:07 -04:00
Niko Matsakis
bdd0c9387b get new decorator extensions working 2012-03-13 21:30:06 -04:00
Patrick Walton
c3516f091b rustc: Allow the addresses of rvalues to be taken 2012-03-13 18:24:14 -07:00
Brian Anderson
ffc1d0a55d Fix typo in snapshots.txt 2012-03-13 17:57:31 -07:00
Brian Anderson
94421749fe Register snapshots 2012-03-13 17:38:13 -07:00
Patrick Walton
fc50abe6c5 rustc: Instantiate "caller" regions when calling functions 2012-03-13 17:31:34 -07:00
Brian Anderson
aeb445b2ea rustc: Don't make the while loop body's basic block a child of the condition
As a child of the condition, when the body encounters a ret or break it
incorrectly re-runs the cleanups of the condition.
2012-03-13 17:27:17 -07:00
Patrick Walton
b87cdd8572 rustc: Infer regions of variant arguments to the caller region 2012-03-13 16:16:27 -07:00
Brian Anderson
5c23d21e83 rt: Remove an incorrect assert in lock_and_signal
This assert doesn't hold because it isn't made while holding the lock
2012-03-13 16:12:38 -07:00
Patrick Walton
8cbaebbb49 rustc: Get reference typedefs working 2012-03-13 15:53:16 -07:00
Brian Anderson
b968c8e6cd Name types after their modules instead of 't' 2012-03-13 15:14:17 -07:00
Patrick Walton
a38ccf1254 rustc: Thread the use site around in ast_ty_to_ty 2012-03-13 14:41:18 -07:00
Patrick Walton
0837a6ba04 rustc: Don't cache ast_ty_to_ty results for types that have references 2012-03-13 14:13:13 -07:00
Brian Anderson
02e9400a82 core: Fix os::self_exe_path on FreeBSD 2012-03-13 13:51:03 -07:00
Patrick Walton
107767731a rustc: Use only ast_ty_to_ty for region inference 2012-03-13 12:01:34 -07:00
Patrick Walton
014dd547a0 rustc: Use the inferred region as the self region in ast_ty_to_ty as well 2012-03-13 11:34:48 -07:00
Patrick Walton
ec340c8f40 rustc: Look up inferred regions in ast_ty_to_ty 2012-03-13 11:26:55 -07:00
Brian Anderson
cd72b1f848 Overhaul constructor naming in libs 2012-03-13 11:07:22 -07:00
Patrick Walton
aea8736129 rustc: Fix long line 2012-03-13 11:04:02 -07:00
Patrick Walton
07b4c80c68 rustc: Record what & would resolve to for every AST type 2012-03-13 10:44:37 -07:00
Marijn Haverbeke
e54cde5215 Use type size/alignment of target, rather than host, in debuginfo 2012-03-13 16:20:31 +01:00
Marijn Haverbeke
463cf837eb rustc: Teach trans::alt.rs about exhaustive alts
Closes #1971
2012-03-13 16:20:31 +01:00
Kevin Atkinson
15985277b9 Fix Issue #1926 by sorting the gather list. 2012-03-13 07:40:41 -04:00
Graydon Hoare
6f5853f5a1 Libc/os/run/rand/io reorganization. Close #1373. Close #1638.
- Move io, run and rand to core.
 - Remove incorrect ctypes module (use libc).
 - Remove os-specific modules for os and fs.
 - Split fs between core::path and core::os.
2012-03-12 20:08:29 -07:00
Patrick Walton
ac57bb3856 rustc: Word a comment more clearly in region.rs 2012-03-12 18:56:13 -07:00
Patrick Walton
afa046a56b rustc: Use linked lists instead of hash tables for region binding scopes
Hash tables are overkill.
2012-03-12 18:47:18 -07:00
Patrick Walton
4571175568 stdlib: Make list::find do what the docs say it does.
Talked on #rust about this change, got approval from graydon and brson. Will bring up tomorrow at meeting to verify.
2012-03-12 18:28:16 -07:00