Brian Anderson
c1f2394245
Zero locals with initializers that may break or terminate. Closes #787
2011-08-23 16:29:21 -07:00
Graydon Hoare
c011f13144
Add kind-checking for assign-op, copy, ret, be, fail exprs. Fix caught kinding-violations in rustc and libstd.
2011-08-23 15:58:53 -07:00
Brian Anderson
a3c8d4a5a5
Recheck the while loop contition after continuing. Closes #825
2011-08-23 14:51:22 -07:00
Brian Anderson
68fd28c2c1
Cleanup formatting in std::sha1
...
This file has suffered a lot of reformats and was looking pretty ragged
2011-08-23 13:22:44 -07:00
Brian Anderson
7b12924813
Fix pretty-printing of istr literals. Issue #855
2011-08-23 11:09:38 -07:00
Brian Anderson
c274d16b7f
Eliminate unused variable warnings in stdtest
2011-08-22 21:33:52 -07:00
Brian Anderson
45b614f54a
Add ivec::from_str and to_str methods. Issue #855
2011-08-22 21:33:52 -07:00
Brian Anderson
663d07d319
Add std::istr. Issue #855
2011-08-22 21:33:49 -07:00
Brian Anderson
55c54f0db5
Promote std::task::rustrt::leak to std::unsafe::leak
...
I want to use this for std::istr
2011-08-22 18:05:34 -07:00
Brian Anderson
d6e4fa6b44
Teach rustc to append istrs. Issue #855
2011-08-22 17:40:06 -07:00
Brian Anderson
3ab86fb79e
Teach rustc to add istrs. Issue #855
2011-08-22 16:39:18 -07:00
Brian Anderson
aae212727d
Encode the istr shape correctly. Issue #855
2011-08-22 16:12:42 -07:00
Brian Anderson
6841f3827a
Fix ivec self-append. Closes #816
2011-08-22 15:04:28 -07:00
Brian Anderson
0f1f5e67ea
Create correct drop glue for istrs. Issue #855
2011-08-22 14:34:55 -07:00
Brian Anderson
fd8ca2cf5d
Translate istr literals. Issue #855
2011-08-22 14:34:36 -07:00
Brian Anderson
0a93a48ff5
Extract trans_ivec::alloc_with_heap from trans_ivec::trans_ivec
...
Need this for building istrs
2011-08-22 13:30:53 -07:00
Brian Anderson
309a7534d7
Move trans::ivec to middle::trans_ivec
2011-08-22 12:04:05 -07:00
Brian Anderson
179658e20f
Move trans_ivec into the ivec module
2011-08-22 11:23:46 -07:00
Brian Anderson
3a5bfae9d9
Silence unused variable warnings in compiletest
2011-08-22 11:00:43 -07:00
Brian Anderson
152cbaade7
Move functions from syntax::ast to syntax::ast_util
...
This leaves syntax::ast just defining the AST, which strikes me as somewhat
nicer
2011-08-22 10:44:04 -07:00
Brian Anderson
a3affaa20f
Remove ast::spawn_dom
2011-08-22 10:42:29 -07:00
Marijn Haverbeke
7d08678b74
Implement pattern guards
...
The syntax is
alt x {
mypat where mycond { ... }
}
The condition may refer to any of the variables bound by the pattern.
When a guard fails, pattern-matching continues with the next pattern.
Closes #857
2011-08-22 17:49:31 +02:00
Marijn Haverbeke
a2466233b4
Fix bug introduced by 1a45a84e73
2011-08-22 17:49:31 +02:00
Marijn Haverbeke
1a45a84e73
Start using copy glue to copy bits that may contain ivecs
...
This is not currently necessary, but will be, when I land the new ivec
representation.
2011-08-22 14:17:27 +02:00
Marijn Haverbeke
3948f132d9
Write a type_structurally_contains, use it to rewrite has_dynamic_size
...
(I'll be using this for type-needs-copy-glue in the near future.)
2011-08-22 14:06:20 +02:00
Marijn Haverbeke
42864377a4
Remove silly restriction on passing type params by alias
...
Since they are now passed by pointer, this is no longer a problem
2011-08-22 14:06:20 +02:00
Marijn Haverbeke
10269dfaeb
Replace &ty::t with ty::t throughout the compiler
...
Type handles are uints, passing them by reference only causes
unnecessary spilling.
2011-08-22 14:06:17 +02:00
Marijn Haverbeke
081caf5bb8
Do not check for self-assign unless dest is initialized
...
Also, give copy_val and move_val a more sane return type.
2011-08-22 14:05:56 +02:00
Marijn Haverbeke
c930af74d5
Write call_copy_glue
2011-08-22 14:05:54 +02:00
Marijn Haverbeke
cd5e4c21ee
Add skeleton of copy glue that actually copies
2011-08-22 11:41:49 +02:00
Marijn Haverbeke
7588a89553
Rename copy_glue back to take_glue
2011-08-22 10:42:56 +02:00
Marijn Haverbeke
b24f978011
Drop arguments on the caller side, not the callee
...
This makes it easier for the caller to optimize the take/drop away for
temporary values, and opens up new possibilities for alias handling.
Breaks tail calls.
2011-08-22 10:16:09 +02:00
Marijn Haverbeke
35c962e9a1
Pass structural types by pointer, not by value
...
If we lose tail calls, this is possible. It simplifies things a lot.
Direct motivation: We want ivecs with pointers pointing into
themselves. When copying those, the pointers have to be adjusted. It
is impossible to this when copying them with Load/Store.
2011-08-22 10:16:09 +02:00
Brian Anderson
6ad5b71ad9
Conditionally define CDECL and FASTCALL on windows
...
These may already be defined by other includes. Hopefully puts out the windows
fire.
2011-08-20 16:31:38 -07:00
Brian Anderson
7dad31d11c
Fix comment typos
2011-08-20 16:30:27 -07:00
Brian Anderson
abdb6cd71b
Rewrite reap_dead_tasks to never grab the sched lock before a task lock
...
Doing so contradicts the locking order used everywhere else and causes
deadlocks.
Un-XFAIL task-perf-spawnalot
Closes #854
2011-08-20 16:21:27 -07:00
Patrick Walton
25416bfae1
rustc: Introduce ABI versioning so we can change value representations without breaking the compiler
2011-08-20 14:22:09 -07:00
Patrick Walton
2f650038ad
rt: Move the GetProcAddress/dlsym stuff out of rust_gc.cpp into rust_abi.h
2011-08-20 14:06:04 -07:00
Brian Anderson
15e456d547
Convert task-perf-spawnalot to spawn_joinable. XFAIL
2011-08-20 13:02:53 -07:00
Brian Anderson
bc1b6b594b
Stop parsing ~[] vector syntax
2011-08-20 11:04:00 -07:00
Brian Anderson
a7d837be74
Stop parsing .() indexes
2011-08-20 11:04:00 -07:00
Brian Anderson
518dc52f85
Reformat
...
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00
Brian Anderson
4aa165553b
Move bump_dp, get_dp from rust_shape.cpp to rust_shape.h
...
Put out the darwin fire for real
2011-08-20 10:51:31 -07:00
Brian Anderson
6751d40c60
Revert "Add another 'using namespace shape' inside namespace shape"
...
This reverts commit 09f4cd90a8
.
2011-08-20 10:33:41 -07:00
Brian Anderson
09f4cd90a8
Add another 'using namespace shape' inside namespace shape
...
Try again to put out the darwin tinderbox
2011-08-20 10:28:30 -07:00
Brian Anderson
2c54b46408
Revert "Shuffle around definitions in rust_shape.h"
...
This reverts commit d09b421d55
.
2011-08-20 10:19:45 -07:00
Brian Anderson
d09b421d55
Shuffle around definitions in rust_shape.h
...
Try to put out darwin tinderbox fire
2011-08-20 09:48:00 -07:00
Patrick Walton
d0171913aa
rt: Remove rustboot's GC infrastructure
2011-08-19 19:17:05 -07:00
Patrick Walton
8fa86672ab
rt: Implement stack crawling
2011-08-19 18:52:36 -07:00
Patrick Walton
a3f4a1b6ad
rt: Split out shapes into rust_shape.cpp and rust_shape.h so that shape code can be written outside of rust_shape.cpp
2011-08-19 18:52:35 -07:00