Eric Holk
45cac8a95f
Adding a test case to make sure spawning polymorphic functions works.
2011-08-26 16:31:14 -07:00
Paul Stansifer
230a5869b4
Bugfix. --pretty typed
requires expansion. Closes #691 .
2011-08-26 15:13:57 -07:00
Paul Stansifer
5815f4f1de
Update docs for macro-related stuff.
2011-08-26 15:13:57 -07:00
Brian Anderson
22d4641a30
Fix invalid reads of cstrs in trans
2011-08-26 14:03:22 -07:00
Brian Anderson
2744bcd693
Revert "Use cstrcache in C_str, C_cstr, C_shape."
...
This reverts commit d5173b1f2c
.
2011-08-26 13:58:26 -07:00
Brian Anderson
f0820662c9
Revert "Add rustc::middle::cstrcache for getting c string bufs safely"
...
This reverts commit 4e136d1fd9
.
2011-08-26 13:58:19 -07:00
Brian Anderson
d5173b1f2c
Use cstrcache in C_str, C_cstr, C_shape.
...
This fixes up the current leaks.
2011-08-26 13:20:23 -07:00
Brian Anderson
4e136d1fd9
Add rustc::middle::cstrcache for getting c string bufs safely
...
We continue to leak string buffers in trans so this creates a way to get c
string buffers from strings while guaranteeing that they are not freed before
use.
Hopefully this can be made efficient in the istr regime.
2011-08-26 13:20:23 -07:00
Brian Anderson
3aef2c1d7d
Add a valgrind suppression for the llvm::User leak
...
It's been around forever. I don't know what it is, but I need the compiler to
be valgrind clean for the istr transition so I'm suppressing it.
2011-08-26 13:20:22 -07:00
Brian Anderson
e3d3aaadaa
Don't run the stage0 compiler under valgrind when CFG_VALGRIND_COMPILE
...
There's nothing to be done for stage0 at this point.
2011-08-26 13:20:22 -07:00
Graydon Hoare
4133e3ec82
Mostly-trivial commit to test build cycle on windows service.
2011-08-26 13:14:02 -07:00
Tim Chevalier
c02f346e2c
Revert "Revert "Use typestate constraints for trans_be""
...
This reverts commit b0db13956f
.
(Should work now that we have a new snapshot)
2011-08-26 10:14:58 -07:00
Tim Chevalier
5472d2238a
Merge remote-tracking branch 'graydon/master' into snap
2011-08-26 10:11:04 -07:00
Tim Chevalier
8b9a78e8c4
Register snapshot
2011-08-26 09:55:26 -07:00
Marijn Haverbeke
5917d80cd7
Pass stuff to take_ty, free_ty, and drop_ty by address, even when immediate
...
The glue-calling will spill the values again anyway. This should
prevent a lot of load/spill junk in the output. It is also necessary
to be able to have unique vecs be immediate values (take must know the
actual address to be able to duplicate).
2011-08-26 11:20:10 +02:00
Tim Chevalier
b0db13956f
Revert "Use typestate constraints for trans_be"
...
This reverts commit 1b60bba141
.
(Need a snapshot first)
2011-08-26 00:59:41 -07:00
Tim Chevalier
1b60bba141
Use typestate constraints for trans_be
...
trans_be now has a precondition that its expression argument
is a call expr. Obviously this code may be going away soon, but
I wanted to exercise typestate somehow and this was an easy one :-)
2011-08-26 00:47:21 -07:00
Tim Chevalier
844e2d7d1c
Test case for checks on pattern-bound vars
2011-08-26 00:46:53 -07:00
Tim Chevalier
26e1cacb21
Let typestate constraints mention pattern-bound vars
2011-08-26 00:39:50 -07:00
Tim Chevalier
b099760269
Remove remaining use of 'pred' and make 'pred' a non-reserved word. Huzzah\!
2011-08-25 22:26:45 -07:00
Tim Chevalier
63f9b43d36
Docs for pure fn and unchecked
2011-08-25 19:09:30 -07:00
Tim Chevalier
48c6953001
Remove typestate workaround that's no longer necessary
2011-08-25 18:48:34 -07:00
Tim Chevalier
809a833e34
Test case for unchecked blocks
2011-08-25 18:33:57 -07:00
Tim Chevalier
f841e89443
Support unchecked blocks
...
This patch supports the syntax
unchecked {
...
}
to disable purity checking within a block. Presumably it will only be
used within a declared "pure fn". However, there is no checking that it
doesn't occur elsewhere, and it would be harmless for it to do so.
I went with Lindsey's suggestion for the syntax, but it's subject to
change.
This allows you to write code that uses predicates that call arbitrary
Rust functions, but you must declare your intentions by wrapping it in
an unchecked { ... } block. The test case run-pass/unchecked-predicates.rs
demonstrates how to do that.
2011-08-25 18:28:23 -07:00
Tim Chevalier
d9bc3cb10c
Change "pred" to "pure fn" in all libraries and test cases
2011-08-25 18:24:45 -07:00
Tim Chevalier
1cb85015c3
Change "pred" to "pure fn" within the compiler.
2011-08-25 18:24:40 -07:00
Tim Chevalier
2e89edab1d
Register snapshot
2011-08-25 18:01:40 -07:00
Tim Chevalier
e241f2996d
Allow pure fns to have any return type
2011-08-25 17:23:35 -07:00
Patrick Walton
4dd23f24d6
rt: Null check in walk_obj_contents. Prevents marking from crashing when calling object constructors.
2011-08-25 17:14:54 -07:00
Patrick Walton
8bd019bdc8
rt: Remember the number of captured type descriptors for objects in the type descriptor crate cache
2011-08-25 14:21:05 -07:00
Brian Anderson
608f7ccded
Move ast::pat_id_map to ast::util
2011-08-25 14:15:54 -07:00
Eric Holk
4d92cb5c63
Removing mention of domain, updating the communication examples.
2011-08-25 12:33:09 -07:00
Patrick Walton
880fd788eb
rustc: Add an extra flag to object tydescs so that shapes know how to find the captured subtydescs
2011-08-25 12:01:10 -07:00
Eric Holk
2f7c583bc1
Cleaning up task and comm exports, updating all the test cases.
2011-08-25 11:21:25 -07:00
Brian Anderson
b31815f8a0
Fix istr::unsafe_from_bytes. Issue #855
2011-08-25 10:33:28 -07:00
Patrick Walton
b371891c7c
rt: Fix walk_obj_contents for type-parameteric objects. Hash tables can be logged now.
2011-08-24 16:54:10 -07:00
Patrick Walton
72d78e6a93
rt: Factor out type param construction into from_tydesc and from_obj_shape. (The latter is unimplemented at the moment.)
2011-08-24 15:19:59 -07:00
Brian Anderson
0dc1d7ee57
Register new snapshots
2011-08-24 15:00:26 -07:00
Tim Chevalier
da766791d3
hmm, this should have been in the last commit. Oops.
2011-08-24 14:29:08 -07:00
Tim Chevalier
c6155d1fd1
Change "pred" to "pure fn" (but still accept "pred")
...
This is part 1 of changing the "pred" keyword to "pure fn".
Right now, the compiler accepts both "pred" and "pure fn".
2011-08-24 14:21:37 -07:00
Brian Anderson
5b5689d4dd
Test that processes that are supposed to fail return a non-zero status
2011-08-24 13:24:03 -07:00
Patrick Walton
b07968dda4
rt: Print out fields of objects when logging them
2011-08-24 12:09:06 -07:00
Brian Anderson
65357eeecc
XFAIL task-comm-2. Doesn't work under windows
2011-08-24 12:03:08 -07:00
Brian Anderson
b7d74c32b6
Fix combine-tests.py for new ivec regime
2011-08-24 12:03:08 -07:00
Brian Anderson
a0208e3899
Return an error code after fail under win32
2011-08-24 12:03:07 -07:00
Patrick Walton
db72bd90f5
mk: Introduce CFG_DISABLE_OPTIMIZE_CXX
2011-08-24 11:59:21 -07:00
Marijn Haverbeke
fa97793139
Revert "Back out copy-glue"
...
This reverts commit 629ee94a0b
.
2011-08-24 20:30:20 +02:00
Brian Anderson
60547f6500
Use memmove to load istr literals. Issue #855
2011-08-24 10:24:59 -07:00
Marijn Haverbeke
629ee94a0b
Back out copy-glue
...
This wasn't a good idea after all.
2011-08-24 17:05:53 +02:00
Marijn Haverbeke
15b540ded4
Use a single builder object throughout
...
This seems to be faster than creating separate ones for each block
context.
2011-08-24 16:57:33 +02:00