Patrick Walton
7c27ec72d1
rustc: Add some simple region checking (no region vars yet)
...
Amazingly, this causes no test cases to fail!
2012-03-24 18:44:05 -07:00
Niko Matsakis
3e385a80d4
prune unused unification code; leave region code that still needs to be ported
2012-03-24 09:22:09 -07:00
Tim Chevalier
aae14e352a
Allow methods to call other methods in the same class
2012-03-23 23:10:45 -07:00
Tim Chevalier
bebdfe8ce8
Add another test for cross-crate method calls
2012-03-23 23:10:45 -07:00
Niko Matsakis
6b84cee5d3
add a few measly comments, remove some dead code
2012-03-23 22:36:37 -07:00
Niko Matsakis
f5edb5ee18
xfail-test regions tests
2012-03-23 22:06:39 -07:00
Niko Matsakis
042c532a08
Implement new inference algorithm.
2012-03-23 21:47:28 -07:00
Tim Chevalier
40443768b1
Fix breakage
2012-03-23 20:53:38 -07:00
Tim Chevalier
8bbd78075f
Handle self correctly when translating classes
...
This change uses the same code for handling the "self" reference for
classes as is already used for impls/ifaces. This allows removing the
extra maybe_self_id argument (which was just for classes) to trans_closure
that I added before. I also rewrote the translation for class ctors so
that it doesn't generate new AST nodes (instead translating directly).
Also changed visit so that it visits class ctors correctly with visit_fn,
and changed typestate to not do return-checking when visiting a class ctor.
2012-03-23 20:37:50 -07:00
Patrick Walton
713b3585c6
rustc: Remove // */
sequence from trans/base.rs; it breaks vi syntax highlighting
2012-03-23 18:21:23 -07:00
Patrick Walton
0eae490669
rustc: Stub a table of borrowings
2012-03-23 17:28:24 -07:00
Patrick Walton
c56910fc9a
rustc: Make region folding not descend into function types
...
Since region parameters are always universally quantified at the function
level, this would be incorrect.
2012-03-23 17:06:24 -07:00
Tim Chevalier
1ffaedac2b
Remove unneeded code
2012-03-23 16:25:10 -07:00
Tim Chevalier
17cd9b4308
Remove ctypes -- it's no longer used.
2012-03-23 16:25:10 -07:00
Tim Chevalier
cb0eeed539
Remove a FIXME and workaround that appear to be obsolete
2012-03-23 16:25:10 -07:00
Tim Chevalier
372673b58c
Remove char::to_lower, char::to_upper, use libc versions instead
...
As per Graydon's comments on #1985 : remove char::to_lower and
char::to_upper. The str versions of these functions now call
libc::tolower and libc::toupper (using wrappers that cast between
char and c_char). Not sure how much better that is, but it at least
makes it clearer that these functions are Unicode-unsafe.
2012-03-23 16:25:10 -07:00
Patrick Walton
cab4f1685b
test: Add a test case that ensures ret &EXPR
works.
2012-03-23 16:18:28 -07:00
Patrick Walton
cba007e6c8
rustc: Fix parsing of ret &EXPR
...
The parser didn't think that `&` could start an expression.
2012-03-23 16:15:58 -07:00
Patrick Walton
7592dae949
test: Fix unresolved name in regions-mock-trans-impls.rs
2012-03-23 15:44:37 -07:00
Patrick Walton
c56ec7b02a
test: Add a version of the "mock-trans" regions test case that uses impls
2012-03-23 15:28:47 -07:00
Patrick Walton
b9c4dbeb33
test: Fix leak in regions-mock-trans
2012-03-23 15:17:34 -07:00
Patrick Walton
df77eb433b
test: Fix whitespace at EOL
2012-03-23 15:05:39 -07:00
Patrick Walton
aa0f25ae31
test: Add a trans.rs-workalike test case for regions
2012-03-23 14:42:39 -07:00
Patrick Walton
7931a61ebb
rustc: Redo region inference to be a bit less broken
2012-03-23 12:22:58 -07:00
Marijn Haverbeke
84019aa0dc
Keep an explicit map of things that have to be spilled
...
This prevents us from spilling locals more than once.
Closes #2040
2012-03-23 16:08:01 +01:00
Marijn Haverbeke
1b81c5112a
Remove last vestiges of old-style intrinsics
...
Closes #2048
2012-03-23 16:08:01 +01:00
Marijn Haverbeke
837478ccb0
Register new snapshot
2012-03-23 16:07:54 +01:00
Marijn Haverbeke
a84b56bc70
Remove more needless context threading in trans
2012-03-23 14:45:47 +01:00
Marijn Haverbeke
5cfbbbc9ed
Revert resolve kludge that was working around #2049
2012-03-23 13:32:00 +01:00
Marijn Haverbeke
3e7a514521
Fix inconsistent-iteration hazard in map.rs
...
Closes #2049
2012-03-23 13:30:29 +01:00
Marijn Haverbeke
683085b3f0
Stop trying to link intrinsics.bc
2012-03-23 12:57:37 +01:00
Marijn Haverbeke
ca71e01bce
Interpret native mods with ABI rust-intrinsic as builtins
2012-03-23 12:52:53 +01:00
Marijn Haverbeke
52d618a99a
Revert removal of intrinsics
...
Oops. We can't do this yet until the next snapshot.
2012-03-23 12:51:20 +01:00
Marijn Haverbeke
c704d5a5d3
Clean up some confused shuffling of def_ids in resolve.rs
2012-03-23 12:38:36 +01:00
Marijn Haverbeke
562afef216
Rename builtin back to intrinsic
...
As per Graydon's request
Issue #1981
2012-03-23 12:21:56 +01:00
Marijn Haverbeke
f5024692d4
Remove support for the old-style intrinsics
...
Closes #2042
Closes #1981
2012-03-23 12:21:55 +01:00
Marijn Haverbeke
0303396f4c
Register snapshot, turn off USE_SNAPSHOT flags
2012-03-23 12:21:46 +01:00
Marijn Haverbeke
6374ffc5f3
Kludge in resolve to be able to land builtins
...
Something strange is happening to hash maps. I'm still investigating but
want to get my snapshot built in the meantime. (Problem only happened on
OS X.)
2012-03-23 11:09:19 +01:00
Marijn Haverbeke
cdb93d70a1
Fix bug in function-instance reuse
...
You can't safely reuse functions that pass a T by move, since they might
zero it out, which will not end well when it doesn't know its precise
size.
2012-03-23 10:49:47 +01:00
Marijn Haverbeke
16ca6e8d7f
Change vector append to no longer rely on an intrinsic
...
Issue #1981
2012-03-23 10:49:47 +01:00
Marijn Haverbeke
0545e4a920
Support [rust_stack] annotation on native functions (crudely)
2012-03-23 10:49:47 +01:00
Marijn Haverbeke
894b7469d6
Replace most uses of intrinsics in core with builtins
...
Issue #1981
2012-03-23 10:49:47 +01:00
Marijn Haverbeke
b2aace2cca
Temporarily turn on USE_SNAPSHOT_RUNTIME and USE_SNAPSHOT_CORELIB
2012-03-23 10:49:47 +01:00
Marijn Haverbeke
ea2e379e4f
Implement built-in native modules as an alternative to intrinsics
...
Issue #1981
2012-03-23 10:49:47 +01:00
Tim Chevalier
73a0c17d77
Make cross-crate calls to class methods work
2012-03-22 20:32:47 -07:00
Brian Anderson
f7f1490d6e
rt: Run resource destructors during cycle collection
2012-03-22 19:07:31 -07:00
Brian Anderson
f3fe85dad7
Bump version numbers to 0.2
2012-03-22 15:25:02 -07:00
Graydon Hoare
b224bcf6e1
Add an LLVM-instruction-counting mode to trans.
...
Pipe to xdu to see a trans call graph of generated insns.
2012-03-22 13:44:20 -07:00
Niko Matsakis
dc07280b08
make --enforce-mut-vars always on, add mut annotations to remaining files
2012-03-22 09:58:19 -07:00
Niko Matsakis
ea6030878a
update promotion rules to not fail when .dsym file does not exist
2012-03-22 07:31:18 -07:00