Commit graph

4989 commits

Author SHA1 Message Date
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
Brian Anderson
e417e78e2b Add missing struct keyword to rust_gc 2011-08-19 18:42:33 -07:00
Patrick Walton
d8d9f2adf2 rustc: Unconditionally zero out all GC-relevant types for now 2011-08-19 17:55:42 -07:00
Patrick Walton
907ab4a11b rt: Find roots on the stack; stub mark and sweep routines 2011-08-19 17:42:58 -07:00
Michael Sullivan
84a6b888c0 Add an iter2 iterator to vec. 2011-08-19 16:14:38 -07:00
Brian Anderson
56c8d16326 Register new snapshots 2011-08-19 15:45:15 -07:00
Patrick Walton
d1836034e2 rt: Attempt to put out burning tinderbox by fully qualifying gc::gc(). 2011-08-19 15:21:48 -07:00
Patrick Walton
cede5e53b3 rt: Call maybe_gc on mallocs 2011-08-19 14:30:01 -07:00
Brian Anderson
390dd38619 Pretty-print new index syntax 2011-08-19 12:50:05 -07:00
Brian Anderson
7053b6010a Parse x[y] as indexes 2011-08-19 12:50:05 -07:00
Lindsey Kuper
325ea41a1e Getting rid of superfluous log statement. 2011-08-19 12:01:55 -07:00
Michael Sullivan
a7e559ee2e Fix polymorphic iterators. Closes #829. 2011-08-19 11:54:46 -07:00
Brian Anderson
cc2ebbec92 Pretty-print constrained types correctly 2011-08-19 10:16:39 -07:00
Brian Anderson
09e21fe2b9 Pretty-print parens around more things that need disambiguation
Ridiculous stuff like (ret 0) == (log "error")
2011-08-19 10:16:38 -07:00
Brian Anderson
8327416411 Teach the pretty-printer to disambiguate 'if ret { }' et. al 2011-08-19 10:16:38 -07:00
Brian Anderson
664b0ad3fc Add some tests for expression corner cases, mostly involving ret and fail
Some of these don't actually work.
2011-08-19 10:16:38 -07:00
Brian Anderson
d681f062c7 Clean up run-pass/fun-call-variants
Uncomment parts of the test that work correctly now, enable pretty testing
2011-08-19 10:16:38 -07:00