Brian Anderson
5601a6f534
Move metadata::cwriter::encode to metadata::tyencode
2011-06-27 16:30:27 -07:00
Brian Anderson
ba5c7a570d
Rename middle::metadata to metadata::cwriter. Move creader to metadata
...
Preparation for a lot more metadata refactoring
2011-06-27 16:30:27 -07:00
Brian Anderson
d4a5487e1c
Limit exports from middle::metadata
2011-06-27 16:30:27 -07:00
Patrick Walton
e4b5d910dc
rustc: Directly emit calls to glue if possible
2011-06-27 15:38:21 -07:00
Patrick Walton
4558167307
build: Remove --vex-iropt-level=0
2011-06-27 12:39:37 -07:00
Michael Sullivan
12d9d07a84
Improve the tests for vector self appending.
2011-06-27 12:34:45 -07:00
Michael Sullivan
99b4fff4d2
Properly handle the case where src==dst but we have to allocate a new vector.
2011-06-27 12:34:45 -07:00
Michael Sullivan
ec80918865
Add a test written by jdm that tests repeated vector self appending.
2011-06-27 12:34:45 -07:00
Michael Sullivan
8ad7f3b56b
Properly handle the case where src==dst in upcall_vec_append.
2011-06-27 12:34:44 -07:00
Brian Anderson
36fb754476
Index obj and res ctor metadata by ctor id, not item id
...
Both the type and the ctor were trying to use the same id and this was making
creader unable to find the ctor when running 'rustc --ls'
2011-06-27 12:34:44 -07:00
Patrick Walton
b55277002b
etc: Eliminate dyld valgrind errors on OS X
2011-06-27 12:34:13 -07:00
Rafael Ávila de Espíndola
ac081c30be
Record and link with used native libraries.
2011-06-27 15:24:44 -04:00
Graydon Hoare
8fc51dfc65
Some work on reviving the mingw-cross build. Not working yet.
2011-06-27 11:53:28 -07:00
Tim Chevalier
a6f36ba3f5
removing log statement that snuck in there
2011-06-27 11:38:07 -07:00
Tim Chevalier
1656fa19ef
Implement move for scalar values
...
Before, something like:
let int y = 42;
let int x;
x <- y;
would cause an LLVM assertion failure. Fixed it.
2011-06-27 11:32:06 -07:00
Graydon Hoare
bc9fa31618
A little tidying in rt.
2011-06-27 10:08:57 -07:00
Eric Holk
022ebc198b
Implementation mising features in lock_and_signal for Win32. Also lowered the minimum stack size to get the pfib benchmark to run without exhausting its address space on Windows.
2011-06-27 09:58:39 -07:00
Eric Holk
681c063ec0
Conservatively serialize nearly all upcalls. Successfuly ran make check with RUST_THREADS=8, so we're probably fairly safe now. In the future we can relax the synchronization to get better performance.
2011-06-27 09:58:39 -07:00
Eric Holk
6367bcf427
Fixed a few concurrency bugs. Still not perfect, but overall it seems much more reliable.
2011-06-27 09:58:39 -07:00
Eric Holk
4d99bf9af2
Added some locking to ports to prevent the case where two threads simultaneously wake up a task blocked on a certain port.
2011-06-27 09:58:39 -07:00
Eric Holk
cb00befff0
Added an environment variable to control how many threads to use.
2011-06-27 09:58:39 -07:00
Eric Holk
4bc773465f
Basic multithreading support. The infinite loops test successfully maxes out the CPU.
2011-06-27 09:58:39 -07:00
Eric Holk
91eadfd1ea
Added a parallel fibonacci program. It doesn't actually run in parallel yet, but it will give us something fun to test threading with.
2011-06-27 09:58:39 -07:00
Rafael Ávila de Espíndola
bea28ea537
Easy fix for using newer LLVMs: just use the MachOObjectFile.cpp they provide.
2011-06-27 11:52:23 -04:00
Brian Anderson
fcbdac96dd
Update README files
2011-06-26 22:27:22 -07:00
Brian Anderson
f2d76bcd7d
Remove src/run.py
...
This script is totally bitrotted
2011-06-26 22:01:32 -07:00
Brian Anderson
16b98f93d5
Update Brian's email address in AUTHORS.txt
2011-06-26 21:58:40 -07:00
Brian Anderson
29a8219c4c
Add a very simple map implementation for sequential integer keys
...
Use it for the ast_map. Cuts 40% off the time spent prior to LLVM.
2011-06-26 20:37:08 -07:00
Brian Anderson
08b49a5d8f
Reformulate an assert in ty::tag_variants
...
This was doing a redundant hashmap lookup. Removing the redundancy trims 5%
(2.8s) off rustc's compile time
2011-06-26 18:02:47 -07:00
Brian Anderson
cfaa0f4b91
Fail typechecking for bad binop/type combinations
...
Includes assignment operations. Add regression tests for lots of less useful,
less used or unexpected combinations, as well as a selection of compile-fail
tests. Closes #500 (again!)
2011-06-25 19:42:59 -07:00
Brian Anderson
51d07830ba
Add a test for mismatched types when comparing functions
2011-06-25 19:28:19 -07:00
Brian Anderson
eb0d56f8c5
Add a FIXME to the docs about literal suffixes
2011-06-25 19:28:19 -07:00
Graydon Hoare
79ba31504b
Fixes to speed and clean up makefiles.
2011-06-25 19:23:32 +00:00
Marijn Haverbeke
afa632124f
Use single-bar or to make tstate/states.rs prettier
...
Sorry. This is the kind of thing I do when I'm on a plane and too
tired to manage anything that requires thinking.
2011-06-25 21:16:03 +02:00
Marijn Haverbeke
7432017d5e
Primitive support for non-copyable values
2011-06-25 21:15:11 +02:00
Marijn Haverbeke
f6753be655
Allow moving out of temporary values
...
This will probably need more work, as moving doesn't appear to do
quite the right thing yet in general, and we should also check
somewhere that we're not, for example, moving out the content out of
an immutable field (probably moving out of fields is not okay in
general).
2011-06-25 21:15:11 +02:00
Marijn Haverbeke
61fc12d0d0
Partial implementation of resources
...
Non-copyability is not enforced yet, and something is still flaky with
dropping of the internal value, so don't actually use them yet. I'm
merging this in so that I don't have to keep merging against new
patches.
2011-06-25 21:15:11 +02:00
Marijn Haverbeke
781a265b88
Remove variable name 'res' from test suite
2011-06-25 21:15:04 +02:00
Tim Chevalier
c772269f08
Fix inexhaustive match in parser
2011-06-24 22:38:01 -07:00
Tim Chevalier
582e1f13f0
Invalidate constraints correctly after an assignment expression
...
Modified typestate to throw away any constraints mentioning a
variable on the LHS of an assignment, recv, assign_op, or on
either side of a swap.
Some code cleanup as well.
2011-06-24 22:36:53 -07:00
Michael Sullivan
818d7c9398
Use visit_fn_{pre,post} to avoid going past lambdas during writeback instead of explicitly casing.
2011-06-24 15:55:08 -07:00
Michael Sullivan
4499ebe858
Add a test that tests typestate checking inside of fn exprs.
2011-06-24 15:46:20 -07:00
Michael Sullivan
b732ec6f82
Have walk call visit_fn_pre and visit_fn_post on fn expressions.
...
As a side effect, this fixes a bug where typestate would not properly be checked
inside of fn expressions.
2011-06-24 15:46:20 -07:00
Michael Sullivan
f3717da1b1
Modify the fn vistors in walk so that they can handle functions without names. Update the typestate code to understand this.
2011-06-24 15:46:20 -07:00
Paul Stansifer
142ff011da
Make a test compile faster.
2011-06-24 14:47:36 -07:00
Patrick Walton
baf474443a
rustc: Increment by the unit size in iter_structural_ty when iterating over interior vectors if the unit size is dynamic
2011-06-24 17:36:30 -04:00
Marijn Haverbeke
2ebd19477b
Sanitize use of ids for obj constructors.
...
Typeck and trans used to, by historical coincidence, use the item_obj
node id, which was used to identify the obj type by the rest of the
system, for the constructor function. This is now identified by the
ctor id stored in the tag throughout.
2011-06-24 21:22:52 +02:00
Marijn Haverbeke
9643aedb04
Remove uses of variable name 'res' from rustc
...
This in preparation of making 'res' a keyword for defining resources.
Please don't introduce too many new ones in the meantime...
2011-06-24 21:22:23 +02:00
Marijn Haverbeke
d507d5fe91
Remove res idents from stdlib
2011-06-24 21:13:26 +02:00
Marijn Haverbeke
3d7fdb509a
Remove def_obj
...
Since obj constructors and types have different def_ids now,
their def can simply be a def_fn and a def_ty.
2011-06-24 21:13:25 +02:00