Marijn Haverbeke
9aa78e34e4
Never pass tydesc to functions
...
My assumption that native generics needed them was wrong, so tydescs
can be eliminated from function signatures completely.
2012-03-15 09:40:52 +01:00
Marijn Haverbeke
47f35c9d34
Properly replace iface tps with impl tps in static method calls
...
Un-xfail iface-generic.rs
2012-03-15 09:32:53 +01:00
Marijn Haverbeke
fe90c189f4
Only write metadata for items that actually appear in the root AST
...
Not for imported ASTs from inlined items.
2012-03-15 09:32:53 +01:00
Marijn Haverbeke
2c8c50d6cb
Make sure enum and resource constructors are inlined properly
2012-03-15 09:32:53 +01:00
Marijn Haverbeke
4650e8bcf4
Make sure resource destructors are properly monomorphized
2012-03-15 09:32:53 +01:00
Marijn Haverbeke
8f84d4c8b6
Remove a large part of the tydesc-passing code
2012-03-15 09:31:34 +01:00
Marijn Haverbeke
83c9f58534
Rename dict to vtable throughout the compiler
...
The difference went away.
2012-03-15 09:28:50 +01:00
Marijn Haverbeke
4511f936b1
Hugely simplify iface handling
...
With the assumption of monomorphization
2012-03-15 09:26:54 +01:00
Marijn Haverbeke
168398bb3d
Stop generating generic versions of generic functions
...
Monomorphic instances are generated on demand.
2012-03-15 09:00:21 +01:00
Marijn Haverbeke
47e65403b7
Disallow calling generic methods through a boxed iface
2012-03-15 08:59:29 +01:00
Marijn Haverbeke
5e647d799e
Fix assumption that monomorphized method's impls are crate-local
2012-03-15 08:59:29 +01:00
Marijn Haverbeke
75e6fb4feb
Fix monomorphization of resource constructors
2012-03-15 08:59:29 +01:00
Marijn Haverbeke
0e5da379dd
Turn on monomorphization by default
2012-03-15 08:59:29 +01:00
Marijn Haverbeke
c67679ea03
Write out the AST for all externally-reachable generics
2012-03-15 08:59:29 +01:00
Graydon Hoare
b2e4872e2c
Upgrade LLVM and add fix to PE/COFF relocation overflow handling.
2012-03-14 20:11:14 -07:00
Brian Anderson
2a293ed8b8
Convert *u8 native string users to *c_char
2012-03-14 18:20:14 -07:00
Brian Anderson
e5dea87f43
core: Add str::from_c_str, from_c_str_len, as_c_str
2012-03-14 18:19:08 -07:00
Brian Anderson
3a2df84d89
core: Rename str::from_cstr et. al to from_buf
2012-03-14 18:19:08 -07:00
Brian Anderson
9e480708a2
core:: Eliminate str::sbuf. Replace with *u8
2012-03-14 18:19:08 -07:00
Brian Anderson
3864d6d845
std: Rename the hashmap constructors to conform to new standards
...
Instead of using the new_ prefix just name them after their type
2012-03-14 18:19:08 -07:00
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