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
Brian Anderson
a0ca1ac1bc
Remove xfail-pretty directives from working tests
2011-08-19 10:16:38 -07:00
Brian Anderson
22c8eebc48
Add a comment about our single use of no-reformat
2011-08-19 10:16:38 -07:00
Brian Anderson
113be53df3
Do better at preserving blank lines during pretty-printing
2011-08-19 10:16:38 -07:00
Brian Anderson
8c3ed8640b
Don't pretty-print extra blank lines after anon object methods
2011-08-19 10:16:38 -07:00
Marijn Haverbeke
bc998c6140
Use move semantics when returning a local var
...
(Since the variable won't be used after return anyway.)
2011-08-19 10:19:21 +02:00
Marijn Haverbeke
f6ae60a432
Temporary work-around for issue #843
2011-08-19 10:19:21 +02:00
Tim Chevalier
0ba1037834
Revert "Disable warnings for unused function arguments. Temporary hack."
...
This reverts commit 1ec2211a98
.
2011-08-19 01:15:30 -07:00
Tim Chevalier
1ec2211a98
Disable warnings for unused function arguments. Temporary hack.
2011-08-19 01:10:55 -07:00
Brian Anderson
b02f1f46e5
Don't pretty-print trailing whitespace for blank lines inside block comments
2011-08-18 19:22:10 -07:00
Brian Anderson
84fb821e40
Try harder to disambig blocks followed by various exprs in pprust. Closes #840
...
As it turns out, it's not just unops we need to worry about. Also tuples and
anything that requires parens.
2011-08-18 18:53:36 -07:00
Patrick Walton
4d03b7b1fb
rt: Remove "TODO: Windows"
2011-08-18 18:52:11 -07:00
Patrick Walton
9c2abb8253
rt: Fix the calculation of the location of GC safe points
2011-08-18 18:51:49 -07:00
Patrick Walton
955bef3f4d
rustllvm: Emit frame map labels
2011-08-18 18:51:25 -07:00
Patrick Walton
396f6b4f59
rustc: Stub GC routines
2011-08-18 18:48:32 -07:00
Patrick Walton
0fedea39ce
rt: Remove rust_alarm dead code
2011-08-18 18:21:03 -07:00
Michael Sullivan
c11f8a468b
Shut up an uninitialized variable warning.
2011-08-18 18:16:45 -07:00
Michael Sullivan
30b5f851c5
Merge remote-tracking branch 'graydon/master'
2011-08-18 18:16:11 -07:00
Patrick Walton
031529e3fe
rustc: Only emit gc root intrinsic calls if the GC flag is on, to work around #836
2011-08-18 18:13:36 -07:00
Michael Sullivan
e7c8019dd9
Kind check tuples. Closes #841 .
2011-08-18 18:13:18 -07:00
Michael Sullivan
94c6160c73
Some cleanup in ty_to_str.
2011-08-18 18:13:18 -07:00
Michael Sullivan
f8ac788d66
Print tag names in type error messages. Closes #834 .
2011-08-18 18:13:18 -07:00
Patrick Walton
4a894dae8e
rustllvm: Emit a stack map for frames with only static type descriptors
2011-08-18 18:09:45 -07:00
Tim Chevalier
d81d86440f
Handle sequential let semantics properly in typestate
...
Closes #824
2011-08-18 17:21:55 -07:00
Tim Chevalier
3ddb26e993
Comments
2011-08-18 17:21:55 -07:00
Graydon Hoare
e8bcca2829
Kill another case of a spurious blank line. Closes #809 .
2011-08-18 17:02:23 -07:00
Michael Sullivan
6e5af8996d
Get rid of equal_type_structures. Closes #514 .
2011-08-18 16:31:23 -07:00
Michael Sullivan
ddc2076902
Make windows respect RUST_SEED. Closes #627 .
2011-08-18 16:24:36 -07:00
Michael Sullivan
0a00fab249
Fix task-comm-15 type errors and un-xfail.
2011-08-18 16:13:03 -07:00
Michael Sullivan
eb368d1b34
Remove rc_base. Closes #603 .
2011-08-18 15:49:58 -07:00
Brian Anderson
f5ce3bf15d
More misc ivec->vec renaming
2011-08-18 15:01:49 -07:00
Brian Anderson
223f6017c7
Remove rust_intrinsic_vec_len
...
I just edited the ll by hand since I don't have clang on hand
2011-08-18 14:51:07 -07:00
Brian Anderson
0467fa6a00
Rename rust_vec to rust_evec
2011-08-18 14:43:17 -07:00
Brian Anderson
1739200b02
Rename T_vec to T_evec
2011-08-18 14:36:22 -07:00
Brian Anderson
1aa1f8c4b7
Rename various things from ivec to vec
2011-08-18 14:32:25 -07:00
Brian Anderson
4fc3618233
Change ast::ty_ivec, ty::ty_ivec to ty_vec
2011-08-18 14:11:06 -07:00
Brian Anderson
504ec8b00d
Rename some vec upcalls and trans functions from vec* to evec*
2011-08-18 13:09:50 -07:00
Brian Anderson
7903daf86f
Remove upcall_new_vec
2011-08-18 13:09:50 -07:00
Brian Anderson
c2d2dad093
Remove ast::ty_vec
2011-08-18 13:09:50 -07:00
Brian Anderson
ec898244f7
Remove seq_kind from ast::expr_vec
2011-08-18 13:09:50 -07:00
Brian Anderson
250cc45c3b
Remove oldvecs from runtime command line processing
2011-08-18 13:09:49 -07:00
Brian Anderson
0a8bffceb3
Simplify the _rust_main/rust_start interface
...
rust_start will always call _rust_main with the command line args, and it is
_rust_main's responsibility to free the args ivec heap. _rust_main will be
generated slightly differently depending on whether main takes an ivec or not:
if so then it's just passed through to main, otherwise it frees the ivec
directly.
2011-08-18 13:09:49 -07:00
Brian Anderson
c2d8a4df35
Continue transition to an ivec-only main
...
Only generate a single main function. Rename rust_start_ivec to rust_start,
leaving a transitional rust_start_ivec in place.
2011-08-18 13:09:49 -07:00
Brian Anderson
53eb4a3025
Pretty-print ivecs as []
2011-08-18 13:09:00 -07:00
Marijn Haverbeke
079fae28e6
Fix long line
2011-08-18 10:23:24 +02:00
Marijn Haverbeke
cd440d338e
Remove or _-prefix all unused function arguments
...
This should make the compilation process a bit less noisy.
2011-08-18 10:02:13 +02:00
Marijn Haverbeke
2885c67d47
Don't warn about unused vars whose name starts with _
...
Closes #832
2011-08-18 10:02:02 +02:00
Patrick Walton
117d21d6c2
rustc: Stub stack map generation machinery
2011-08-17 19:18:44 -07:00
Patrick Walton
51af43f192
rustc: Use "rust" GC in Rust functions
2011-08-17 18:26:51 -07:00
Patrick Walton
f17edf9829
rustc: Use obstacks in lieu of dynamically-allocated frames only when the frame is actually dynamically-sized
2011-08-17 18:14:57 -07:00
Patrick Walton
0b7af40384
rustc: Use explicit return blocks
2011-08-17 17:49:54 -07:00
Patrick Walton
df51fe36f1
Revert "rt: Use obstacks in lieu of dynamically-sized frames"
...
This reverts commit cc5fcfce89
.
2011-08-17 17:27:31 -07:00
Patrick Walton
49397b5af6
rustc: Remove dead i2p function
2011-08-17 17:26:55 -07:00
Patrick Walton
cc5fcfce89
rt: Use obstacks in lieu of dynamically-sized frames
2011-08-17 17:24:57 -07:00
Eric Holk
3ab21e5ee0
Better type inference for chans and ports.
2011-08-17 17:16:23 -07:00
Tim Chevalier
f023f82090
Track arguments in typestate
...
Add the infrastructure for arguments -- as well as local vars --
to be deinitialized with move-mode calls. Address Issue #819
2011-08-17 17:15:46 -07:00
Brian Anderson
69d4838169
Stop parsing old-style vec types
2011-08-17 16:08:45 -07:00
Brian Anderson
df10df821b
Remove last mentions of vec<> type in Rust source
2011-08-17 16:08:17 -07:00
Graydon Hoare
5dd62b7d41
Trivial commit to test github AMQP hook
2011-08-17 16:06:33 -07:00
Graydon Hoare
b7bf1dd5b0
Trivial commit to test github AMQP hook
2011-08-17 15:59:26 -07:00
Brian Anderson
ad598ebea0
Use the new task join methods in the test runner. Closes #826
...
It should report failures properly again
2011-08-17 15:34:54 -07:00
Brian Anderson
15f9f1a1f1
Remove more hacks from the test runner
2011-08-17 15:12:38 -07:00
Brian Anderson
87a782c0b3
Simplify default_test_to_task
...
Doesn't appear to require an unsafe pointer now
2011-08-17 15:12:35 -07:00
Brian Anderson
deef212bf7
Move some test setup from runtest to compiletest
2011-08-17 15:11:17 -07:00
Eric Holk
9e020b8b8f
Convenience methods for spawning and joining tasks.
2011-08-17 15:07:19 -07:00
Eric Holk
ae89ea223d
Making more of the rust_task structure directly accessible from Rust.
2011-08-17 14:42:40 -07:00
Eric Holk
efac7c9a19
Yet another comm interface.
2011-08-17 14:42:40 -07:00
Patrick Walton
72b2f8207d
rustc: Add missing "bcx = "
2011-08-17 14:01:59 -07:00
Patrick Walton
702fe5cdac
rustc: Run obstack cleanups at the end of each function
2011-08-17 13:58:49 -07:00
Patrick Walton
3aab46b020
rustc: Mark an obstack fencepost when entering a dynamically-sized frame
2011-08-17 13:16:15 -07:00
Brian Anderson
62ac9d0b2e
Restore test task setup
...
This is needed in order for the test runner to continue on failure, and I
don't see that it causes any problems.
2011-08-17 12:08:43 -07:00
Eric Holk
94260fb91d
Using move-mode for spawn thunks to avoid race conditions.
2011-08-17 11:44:50 -07:00
Patrick Walton
1d7ca9c189
rustc: Add the dynastack upcalls to upcall.rs
2011-08-17 11:43:45 -07:00
Brian Anderson
0d83956e2b
Refactor resolve_import
...
Issue #817
2011-08-17 11:05:20 -07:00
Brian Anderson
206495b0a9
Refactor resolve_import
...
Issue #817
2011-08-17 11:05:15 -07:00
Brian Anderson
45706a63bf
Remove unused case in resolve
...
Issue #817
2011-08-17 11:05:11 -07:00
Brian Anderson
bfbe8870d7
Refactor import lookup in middle:resolve
...
Issue #817
2011-08-17 11:05:04 -07:00
Brian Anderson
cd54e77720
Allow multiple imports in a single statement
...
Like so: import foo::{bar, baz};
Issue #817
2011-08-17 11:04:56 -07:00
Brian Anderson
c4ce463f37
Add compile-fail tests for malformed glob imports
2011-08-17 11:04:05 -07:00
Brian Anderson
c6482c0083
Refactor ast::view_item to differentiate between [ident]s and paths
2011-08-17 11:04:05 -07:00
Brian Anderson
67cc5b9e34
Allow multiple exports in a single export statement. Issue #817
2011-08-17 11:04:05 -07:00
Brian Anderson
c95e3ab6a8
Remove transitional interfaces from std::extfmt
2011-08-17 09:55:55 -07:00
Brian Anderson
53df58a177
Purge vecs from the std::test interface
2011-08-17 09:55:55 -07:00
Brian Anderson
7bd0437b08
Convert rustc main to ivecs
2011-08-17 09:55:55 -07:00
Patrick Walton
d8c5bd6195
rt: Implement obstacks, untested as of yet
2011-08-16 19:49:25 -07:00
Graydon Hoare
5a209c8350
Fix some comments.
2011-08-16 17:39:25 -07:00
Graydon Hoare
ce276211f5
Remove dead send/recv operator tokens.
2011-08-16 17:39:25 -07:00
Eric Holk
fc616af820
Updating to new type parameter syntax.
2011-08-16 16:52:52 -07:00
Eric Holk
8686645aad
New channel-based task status notifications.
2011-08-16 16:47:40 -07:00
Michael Sullivan
07225e2169
Make a call with the wrong number of arguments non-fatal. Closes #784 .
2011-08-16 16:41:29 -07:00
Michael Sullivan
837342242c
Make fewer typechecker errors immediately fatal.
2011-08-16 16:39:49 -07:00
Erick Tryzelaar
70b009178c
Remove support for expr[T] syntax.
2011-08-16 15:05:57 -07:00
Erick Tryzelaar
c92f5b34d5
Remove support for foo[T] declaration syntax.
2011-08-16 15:05:57 -07:00
Erick Tryzelaar
adb9cde399
Remove type parameter and vec/port/chan foo[T] syntax.
2011-08-16 15:05:57 -07:00
Erick Tryzelaar
b3eba15271
Port the tests to the expr foo::<T> syntax.
2011-08-16 15:05:57 -07:00
Erick Tryzelaar
af21a27002
Port the compiler to the expr foo::<T> syntax.
2011-08-16 15:05:56 -07:00
Erick Tryzelaar
d9327a61bb
Port the stdlib to the expr foo::<T> syntax.
2011-08-16 15:05:56 -07:00
Erick Tryzelaar
3520499544
Port the tests to the decl foo<T> syntax.
2011-08-16 15:05:56 -07:00
Erick Tryzelaar
4abc471390
Port the compiler to foo<T> decl syntax.
2011-08-16 15:05:56 -07:00
Erick Tryzelaar
4c9049c50c
Port the stdlib to the decl foo<T> syntax.
2011-08-16 15:05:56 -07:00
Erick Tryzelaar
21f46a1655
Port the tests to the typaram foo<T> syntax.
2011-08-16 15:05:56 -07:00
Erick Tryzelaar
e4a0f997fb
Port the compiler to the typaram foo<T> syntax.
2011-08-16 15:05:56 -07:00
Erick Tryzelaar
f764f9a8cf
Port the stdlib to the typaram foo<T> syntax.
2011-08-16 15:05:56 -07:00
Graydon Hoare
8043788e3a
Register new snapshots.
2011-08-16 14:59:52 -07:00
Erick Tryzelaar
014c6922e1
Change expr foo[T] syntax to foo::<T>.
...
This preserves the old syntax for now.
2011-08-16 14:16:14 -07:00
Erick Tryzelaar
9304b7ee59
Change declaration type parameter syntax to foo<T>.
2011-08-16 14:16:14 -07:00
Erick Tryzelaar
0107d6a81d
Change type parameter syntax to foo<T>.
...
This preserves the old syntax for now.
2011-08-16 14:16:14 -07:00
Patrick Walton
6e06893819
fuzzer: Remove send and recv
2011-08-16 12:46:43 -07:00
Patrick Walton
03174b4379
rustc: Implement unique pointer allocation and deallocation
2011-08-16 12:41:53 -07:00
Marijn Haverbeke
27169387fe
Remove partial DPS back-end
...
It won't be finished on the short term, and it's already bit-rotting
fast. We can fetch this from git's autumn annals if we need it.
2011-08-16 21:35:50 +02:00
Eric Holk
3db300b06e
Removing port, chan and task shapes.
2011-08-16 12:30:32 -07:00
Michael Sullivan
a9c46e29bc
Don't put the target in the bind closure if it is statically known. Closes #177 .
2011-08-16 12:13:21 -07:00
Brian Anderson
2f61848b24
Add pp test for interleaving comments through vectors. Closes #679
2011-08-16 11:39:04 -07:00
Eric Holk
89df915a13
Removing task, chan and port upcalls.
2011-08-16 11:22:24 -07:00
Eric Holk
862bc521a1
Removing tasks, ports and chans from the compiler.
2011-08-16 10:59:49 -07:00
Brian Anderson
f05a91a0dc
Rename std::ivec to std::vec
2011-08-16 10:36:19 -07:00
Brian Anderson
38c2363c45
Replace std::ufind with std::ufindivec. Remove std::ufindivec
2011-08-16 10:29:09 -07:00
Brian Anderson
df402a5029
Rename bitv::to_ivec to to_vec
2011-08-16 10:29:09 -07:00
Brian Anderson
bab29af449
Continue migrating the std #fmt interface to ivecs
...
Only thing left is to remove some duplicate interfaces in std::extfmt::rt
after the next snapshot
2011-08-16 10:29:09 -07:00
Brian Anderson
46658c4a9c
Revert "Revert "Make [] and ~[] both construct ivecs""
...
This reverts commit 28bf190219
.
Should work now that tests are all using ivecs
2011-08-16 10:29:09 -07:00
Brian Anderson
f32079f7c0
Convert most main functions to the ivec signature
...
Converting rustc will still take a snapshot
2011-08-16 10:29:08 -07:00
Brian Anderson
184eac90ab
Add and use an ivec interface to std::test
2011-08-16 10:29:08 -07:00
Brian Anderson
053b8bff5a
Accept main(args: [str]) as main signature
2011-08-16 10:29:08 -07:00
Eric Holk
76aab80e39
Disabling TRACK_ALLOCATIONS
2011-08-16 10:28:09 -07:00
Eric Holk
88a47020cf
Updating sio tests.
2011-08-16 09:45:55 -07:00
Eric Holk
cf2def46c1
Removed trans_comm.rs from the compiler. Updating aio/sio to work with the new chan and port system, started on a networking module for the standard library.
2011-08-16 09:36:29 -07:00
Marijn Haverbeke
e33af7e0b5
Make let bindings' scope start at their definition
...
Also, allow let bindings in a block to shadow each other.
2011-08-16 13:45:41 +02:00
Marijn Haverbeke
92719e438c
Clean up zip and unzip in std::ivec
2011-08-16 13:45:41 +02:00
Marijn Haverbeke
dfcf997801
Register new snapshot
2011-08-16 13:45:41 +02:00
Lindsey Kuper
f91351aaf6
The wonky for...in... whitespace was bothering me. Sorry!
2011-08-15 22:19:50 -07:00
Brian Anderson
cb239cc028
XFAIL task-comm-15
...
Fails consistently on windows
2011-08-15 19:28:38 -07:00
Brian Anderson
977d8ba0e9
Abort abruptly on failure on windows
...
Trying to shutdown cleanly results in wierd failures
2011-08-15 19:25:47 -07:00
Patrick Walton
e3d5b8a8d5
rustc: Add a few type-related methods to unique pointers; add typestate support
2011-08-15 18:12:31 -07:00
Michael Sullivan
42034f5e34
Remove a FIXME that I just made obsolete...
2011-08-15 17:40:08 -07:00
Michael Sullivan
14d85ca87a
Make bind glue do an llvm tail call to the target. Closes #2 .
...
Now, llvm probably won't actually *emit* a tail call with the compiler
options and configuration we have, but this should punt it over to the
more general "do tail calls" bug.
2011-08-15 17:36:28 -07:00
Lindsey Kuper
d55048ec5c
Test case for issue #115 .
2011-08-15 17:10:13 -07:00
Lindsey Kuper
4ff6b6fc27
Test cases for issue #822 .
2011-08-15 16:29:42 -07:00
Michael Sullivan
f1cec5793f
Make GEPi use InBoundsGEP.
2011-08-15 16:19:47 -07:00
Lindsey Kuper
93d425e7a5
Simple example of anonymous objects from nothing. Closes #812 .
2011-08-15 16:13:29 -07:00
Michael Sullivan
886c2ee93e
Tests for type inferred lambda-blocks.
2011-08-15 15:48:11 -07:00
Michael Sullivan
9e084469af
Pretty print lambda-blocks.
2011-08-15 15:48:11 -07:00
Michael Sullivan
9eb798e965
Change arg typechecking procedure to make blocks more useful.
2011-08-15 15:48:10 -07:00
Michael Sullivan
d68f1a80dc
Implement type inference for type-inferred blocks.
2011-08-15 15:48:10 -07:00
Michael Sullivan
9b50011aae
Parse type inferred lambda-block expressions.
2011-08-15 15:48:10 -07:00
Graydon Hoare
814bf41d89
Add operator 'copy', translates as fall-through.
2011-08-15 15:44:41 -07:00
Brian Anderson
9ca8df93b3
XFAIL run-pass/task-killjoin
...
Seems to be failing with some consistency
2011-08-15 15:41:33 -07:00
Paul Stansifer
ac0e5ea0ef
Implement an untyped version of the AST, with a coversion back to the typed AST..
2011-08-15 15:35:28 -07:00
Paul Stansifer
ebb16e6a25
Use span stacks to track macro expansion for less troublesome error messages.
2011-08-15 15:35:28 -07:00
Paul Stansifer
c48036c0b7
Make spans into stacks (to store expansion backtraces).
2011-08-15 15:35:27 -07:00
Paul Stansifer
87b56b5565
Allow [a, b, ..., c]
transcription patterns in MBE.
2011-08-15 15:35:27 -07:00
Paul Stansifer
d2f9b15052
Rename a field (so that macros can mention it).
2011-08-15 15:35:27 -07:00
Paul Stansifer
b803326063
Change node_id
s when expanding, to avoid duplicates.
2011-08-15 15:35:27 -07:00
Paul Stansifer
f50a582126
Add a syntax extension to log syntax, for debugging macros.
2011-08-15 15:35:27 -07:00
Paul Stansifer
e7139e28f4
Add a layer of boxing as a hack; this code can segfault otherwise.
2011-08-15 15:35:27 -07:00
Paul Stansifer
6d39be465f
Add backtraces for syntax problems.
2011-08-15 15:35:27 -07:00
Paul Stansifer
5428d4ee6d
Check for nonconsistent macro names.
2011-08-15 15:35:27 -07:00
Michael Sullivan
e39d835390
Fix compilation of paths containing ".". Closes #821 .
2011-08-15 15:15:34 -07:00
Patrick Walton
af61daf294
rustc: Parse and typecheck unique pointers
2011-08-15 14:38:48 -07:00
Eric Holk
5c6790519b
Reducing the chances for race conditions in join.
2011-08-15 12:39:55 -07:00
Patrick Walton
55c9842e7d
rustc: Unbreak "3 as uint < 5u"
2011-08-15 12:06:10 -07:00
Patrick Walton
91d83f5547
rustc: Accept <T> for type parameters in type and item declarations
2011-08-15 11:01:31 -07:00
Eric Holk
3fd3f35699
Fixing win32 build.
2011-08-15 10:48:04 -07:00
Eric Holk
871013b942
Syntax updates.
2011-08-15 09:52:18 -07:00
Eric Holk
d63f8340a5
Properly ref counting to fix valgrind issues on linux.
2011-08-15 09:26:52 -07:00
Eric Holk
aa0a51a7f5
Converted over benchmarks.
2011-08-15 09:26:52 -07:00
Eric Holk
be7325073a
Removed spawn and task from the parser. Updated all the tests except for the benchmarks.
2011-08-15 09:26:52 -07:00
Eric Holk
c3535f5842
Porting a bunch of tests over.
2011-08-15 09:26:52 -07:00
Eric Holk
cc353aa17a
Removed old object-based chans.
2011-08-15 09:26:51 -07:00
Eric Holk
7ad13392bd
Converted two more spawn tests.
2011-08-15 09:26:51 -07:00
Eric Holk
b9f1f77622
Fixed memory accounting and task stack creation bugs.
2011-08-15 09:26:51 -07:00
Eric Holk
2f23405a60
Working on more spawn test cases.
2011-08-15 09:26:51 -07:00
Eric Holk
a332043561
Updating to build on Linux and Mac, and hopefully Windows too.
2011-08-15 09:26:51 -07:00
Eric Holk
b2dad8af31
Added a library version of spawn. Before long, we can remove the old version.
2011-08-15 09:26:51 -07:00
Eric Holk
871d1317e5
Move mode for lib comm, converted a few tests.
2011-08-15 09:26:51 -07:00
Eric Holk
39b16077bb
Port ID-based channels.
2011-08-15 09:26:51 -07:00
Eric Holk
04af99ecb0
First step towards port handles.
2011-08-15 09:26:51 -07:00
Marijn Haverbeke
a21ebb2f5e
Fix bad argument type of pprust::print_type
...
AST types are boxed, there's no need for every caller to do the unboxing
2011-08-15 13:45:04 +02:00
Marijn Haverbeke
1570949ef1
Re-add some deleted tuple tests
2011-08-15 13:39:45 +02:00
Marijn Haverbeke
3f127e397f
Add tuple patterns
2011-08-15 13:20:16 +02:00
Marijn Haverbeke
1ee24d31e1
Make tuples constructable
2011-08-15 12:18:27 +02:00
Marijn Haverbeke
29ea87542f
Tuple fields are immutable
2011-08-15 12:08:05 +02:00
Marijn Haverbeke
9538b00363
Tuple types back, not constructable yet
2011-08-15 11:40:38 +02:00
Brian Anderson
25b85df370
Register new snapshots
...
Use main.o from the snapshot
2011-08-14 14:38:08 -07:00
Brian Anderson
83128f441b
Fix typo in snapshot.py
2011-08-14 13:40:22 -07:00
Brian Anderson
28bf190219
Revert "Make [] and ~[] both construct ivecs"
...
This reverts commit 60e1cead9b
.
The check-fast driver can't work with this commit. Need to wait until main
taks ivecs
2011-08-14 12:54:18 -07:00
Brian Anderson
1dbf0965a1
Add lib/main.o to snapshot
...
Snapshotting main.o is going to make it easier (I think) to convert main to
use ivecs
2011-08-14 12:14:58 -07:00
Michael Sullivan
0340f32748
Eliminate autoderef on binops and unary negation.
...
Autoderef on binops is basically unused, kind of silly, and
complicates typechecking. There were only three instances of it in the
compiler and the test drivers, two of which were of the form "*foo =
foo + 1", which should be written as "*foo += 1" anyways.
2011-08-12 18:28:03 -07:00
Michael Sullivan
e527140548
Change some tests that used binop autoderef.
2011-08-12 18:28:03 -07:00
Tim Chevalier
1ba9af92bf
Remove typestate workaround that's no longer necessary
2011-08-12 18:26:23 -07:00
Michael Sullivan
8e92be3b94
Small whitespace cleanups.
2011-08-12 16:36:50 -07:00
Tim Chevalier
c01e487485
Un-XFAIL do-while-body-fails
...
Made it work both with optimization enabled, and with optimization
disabled. Huzzah!
2011-08-12 16:26:10 -07:00
Brian Anderson
60e1cead9b
Make [] and ~[] both construct ivecs
...
It's no longer possible to create an exterior vec
2011-08-12 16:23:33 -07:00
Brian Anderson
34abbde694
Remove std::ivec::to_vec
...
Nobody needs to create vecs now
2011-08-12 16:13:14 -07:00
Brian Anderson
ee7d03f7d7
Convert most working tests to ivecs
...
I tried to pay attention to what was actually being tested so, e.g. when I
test was just using a vec as a boxed thing, I converted to boxed ints, etc.
Haven't converted the macro tests yet. Not sure what to do there.
2011-08-12 16:13:13 -07:00
Brian Anderson
594c7fb0c6
Remove the last remaining vec expressions in rustc
2011-08-12 16:13:13 -07:00
Brian Anderson
12b03dd3d4
Add an ivec interface to the #fmt library functions
...
It will take a snapshot to finish the ivec conversion for #fmt
2011-08-12 16:13:13 -07:00
Michael Sullivan
2421312dea
Don't rely on binop autoderef in the compiler.
2011-08-12 15:16:01 -07:00
Brian Anderson
4e62c0d6cb
Remove std::vec
2011-08-12 12:14:07 -07:00
Brian Anderson
4fc0848a49
Rename rust_list_files_ivec to rust_list_files
2011-08-12 12:14:07 -07:00
Brian Anderson
8561f7654c
Remove rust_list_files from std and rt
2011-08-12 12:14:07 -07:00
Brian Anderson
d1b3ed8c3f
Remove runtime vector builtins
2011-08-12 12:14:07 -07:00
Brian Anderson
533becef2f
Don't export anything from std::vec
2011-08-12 12:14:07 -07:00
Brian Anderson
3d1634db15
Remove all usages of std::vec::vbuf
2011-08-12 12:14:07 -07:00
Brian Anderson
f9db0390f9
Remove last use of vec:buf
2011-08-12 12:14:07 -07:00
Brian Anderson
f9623f0056
Remove vecs from std::sha1
2011-08-12 12:14:07 -07:00
Brian Anderson
235109f8d2
XFAIL run-pass/vec-self-append
...
Broken under the ivec regime
2011-08-12 12:14:07 -07:00
Brian Anderson
12cd11ecda
Remove last uses of vec::len
2011-08-12 12:14:07 -07:00
Brian Anderson
544bdf05c5
Convert uint::parse_buf to ivecs
2011-08-12 12:14:07 -07:00
Brian Anderson
5f71a204d3
Remove vecs from std::getopts
2011-08-12 12:14:07 -07:00
Brian Anderson
8840fab822
Remove unused functions from std::vec
2011-08-12 12:14:07 -07:00
Brian Anderson
784884cc07
Remove more exports from std::vec
2011-08-12 12:14:06 -07:00
Brian Anderson
f323aeed17
Remove more vectors from std
2011-08-12 12:14:06 -07:00
Brian Anderson
0fed53921f
Remove ebmlivec module
2011-08-12 12:14:06 -07:00
Brian Anderson
674fb0911c
Rename std::termivec to std::term
2011-08-12 12:14:06 -07:00
Brian Anderson
495b0bf65e
Remove std::term
2011-08-12 12:14:06 -07:00
Brian Anderson
7625ed52ee
Remove vecs from std::sort
2011-08-12 12:14:06 -07:00
Brian Anderson
abf41e15ea
Remove usages of vec:print_debug_info
2011-08-12 12:11:12 -07:00
Brian Anderson
13439dc870
Convert std::run to ivecs
2011-08-12 12:11:12 -07:00
Brian Anderson
5c042a02cd
Remove vecs from std::bitv
2011-08-12 12:11:12 -07:00
Brian Anderson
72773e6d4d
Hide even more exports from std::vec
2011-08-12 12:11:12 -07:00
Brian Anderson
28437a1890
Convert compile-fail/alias-mismatch to ivecs
2011-08-12 12:11:12 -07:00
Brian Anderson
b762ba0890
Convert benchmarks to ivecs
2011-08-12 12:11:12 -07:00
Brian Anderson
5ed5ae8918
Remove a bunch of exports from std::vec
2011-08-12 12:11:12 -07:00
Brian Anderson
48ad07b5d6
Convert run-pass/import-glob-crate to ivecs
2011-08-12 12:11:12 -07:00
Brian Anderson
cb59e28679
Convert run-pass/mod-view-items to ivecs
2011-08-12 12:11:12 -07:00
Brian Anderson
a76165f670
Move the ivec::reverse tests to stdtest
2011-08-12 12:11:11 -07:00
Brian Anderson
4dec0f6d96
Add reverse and reversed to std::ivec
...
Modify tests to use the ivec version
2011-08-12 12:11:11 -07:00
Brian Anderson
97dc75da16
Remove stdtest::vec
2011-08-12 12:11:11 -07:00
Brian Anderson
ae4c17e267
Add some of stdtest::vec into stdtest::ivec
...
Add missing functions to std::ivec as needed
2011-08-12 12:10:25 -07:00
Brian Anderson
9638f522bd
Don't export vec::alloc, vec::refcount
2011-08-12 12:08:28 -07:00
Brian Anderson
3814d8d4b0
Convert run-pass/vec-append to ivecs
2011-08-12 12:08:28 -07:00
Brian Anderson
c06d95f178
Remove references to std::vec from compile-fail/cross-crate-glob-collision.rs
2011-08-12 12:08:28 -07:00
Brian Anderson
e790f1e6c5
Remove run-pass/vec-alloc-append.rs
...
There is no ivec::append and this is the only remaining user of vec::append
2011-08-12 12:08:28 -07:00
Brian Anderson
fc7664e4c6
Remove run-pass/vec-ref-count.rs
...
This test will be irellevant when vecs are gone
2011-08-12 12:08:28 -07:00
Brian Anderson
a679ea5c3c
Limit the exports from std::vec
2011-08-12 12:08:27 -07:00
Brian Anderson
7d05da96f7
Rename std::ioivec to std::io
2011-08-12 12:08:27 -07:00
Brian Anderson
0b71d1d445
Remove std::io
2011-08-12 12:08:27 -07:00
Brian Anderson
82b1e3f5cc
Convert all uses of std::io to std::ioivec
2011-08-12 12:08:27 -07:00
Brian Anderson
c0846525e8
Remove a vbuf import from std::str
2011-08-12 12:08:27 -07:00
Brian Anderson
119f43e0c7
Rename str::connect_ivec to str::connect
2011-08-12 12:08:27 -07:00
Brian Anderson
21693db2a7
Remove str::connect
2011-08-12 12:08:27 -07:00
Brian Anderson
369be5c8df
Convert uses of str::connect to str::connect_ivec
2011-08-12 12:08:27 -07:00
Brian Anderson
09cc957030
Convert str::concat to ivecs
2011-08-12 12:08:27 -07:00
Brian Anderson
1e397eee2a
Rename str::split_ivec to str::split
2011-08-12 12:08:27 -07:00
Brian Anderson
e3e9811b7f
Remove str::split
2011-08-12 12:08:27 -07:00
Brian Anderson
64f53dfbb0
Convert uses of str::split to split_ivec
2011-08-12 12:08:27 -07:00
Brian Anderson
cfb9cba19f
Convert str::from_chars, to_chars to ivecs
2011-08-12 12:08:27 -07:00
Brian Anderson
878fbac278
Remove str_from_vec runtime function
2011-08-12 12:08:27 -07:00
Brian Anderson
740196987e
Rename std::str::unsafe_from_bytes_ivec to unsafe_from_bytes
2011-08-12 12:08:27 -07:00
Brian Anderson
6050e1d4f6
Remove std::str::unsafe_from_bytes
2011-08-12 12:08:27 -07:00
Brian Anderson
a9ce342fa3
Convert all uses of unsafe_from_bytes to unsafe_from_bytes_ivec
2011-08-12 12:08:26 -07:00
Brian Anderson
49b80f9bf7
Remove str::from_bytes
...
This is exactly the same as str::unsafe_from_bytes
2011-08-12 12:08:26 -07:00
Brian Anderson
7e255335d2
Convert str::is_utf8 to ivecs
2011-08-12 12:08:26 -07:00
Brian Anderson
2e7e58812b
Remove vec version of str::bytes, rename bytes_ivec to str::bytes
2011-08-12 12:08:26 -07:00
Brian Anderson
d6626143cc
Remove vecs from compiletest
2011-08-12 12:08:26 -07:00
Brian Anderson
4caeba9178
Remove vecs from the rustc driver
2011-08-12 12:08:26 -07:00
Brian Anderson
b32889d82c
Remove vecs from simplext
2011-08-12 12:08:26 -07:00
Brian Anderson
f195814df3
Begin removing vecs from #fmt
2011-08-12 12:08:26 -07:00
Michael Sullivan
8a9766000e
Change a bunch of places in the stdlib to use blocks.
2011-08-12 11:47:44 -07:00
Marijn Haverbeke
de4b383a0f
Properly typecheck unary minus
...
Closes #813
2011-08-12 16:05:56 +02:00
Patrick Walton
e8d170beae
rt: Stub Rust GC metadata printer and Rust GC strategy modules
2011-08-11 21:15:26 -07:00
Brian Anderson
0a22f91c9c
Revert "Add missing functions to rustllvm.def.in"
...
This reverts commit 1bea273974
.
Looks like this is not actually necessary. Hard to tell since the tinderboxes
are falling behind.
2011-08-11 18:23:21 -07:00
Brian Anderson
5e840182e6
XFAIL do-while-body-fails
...
Doesn't work w/out optimizations
2011-08-11 18:05:39 -07:00
Brian Anderson
1bea273974
Add missing functions to rustllvm.def.in
2011-08-11 17:50:10 -07:00
Tim Chevalier
051b401051
Handle _|_ - typed things in the bodies of do-while loops
...
The resulting code is strange, but perhaps someone else can
fix it. The obvious things, like returning body_res, all resulted
in completely incomprehensible LLVM errors.
Closes #814
2011-08-11 17:23:47 -07:00
Lindsey Kuper
19bbd02049
Fix too-long line.
2011-08-11 16:21:09 -07:00
Lindsey Kuper
f2e22b2e8e
Sanity-check the code examples that appear in the object system docs.
2011-08-11 16:19:51 -07:00
Rafael Ávila de Espíndola
6402b63b4f
Use the new C API for PassManagerBuilder.
2011-08-11 19:09:52 -04:00
Rafael Ávila de Espíndola
4cee063976
Update for llvm api change.
2011-08-11 14:58:30 -07:00
Patrick Walton
5079f51386
rustc: Associate type descriptors with allocas as metadata
2011-08-11 14:35:33 -07:00
Brian Anderson
4b22243416
Un-ignore stdtest::task::test_sleep
...
Works for me.
2011-08-11 10:15:14 -07:00
Brian Anderson
9742148e25
Bring run-pass/spawn-fn up to date and un-XFAIL
2011-08-11 10:15:14 -07:00
Brian Anderson
d4a17caf1e
Bring run-pass/spawn-module-qualified up to date and un-XFAIL
2011-08-11 10:15:14 -07:00
Brian Anderson
832d89db47
Bring run-pass/task-killjoin up to date and un-XFAIL
2011-08-11 10:15:14 -07:00
Brian Anderson
ffd6ee0730
Fill out some of the run-pass/binops tests
...
Un-XFAIL, and just comment out and add a FIXME to the two cases that fail on
linux.
Closes #577 . This still doesn't compare <, >, etc for channels, ports and
tasks, but since they use pointer equality, that's a bit difficult to set up.
2011-08-11 10:15:07 -07:00
Brian Anderson
29ceb41cc3
Update and un-XFAIL run-pass/many.rs
2011-08-11 10:09:02 -07:00
Brian Anderson
4ff6763b60
rustc: Lowercase "main function not found" error
2011-08-11 10:09:02 -07:00
Brian Anderson
0cddcac016
rustc: Use spans in some main typeck errors
2011-08-11 10:09:02 -07:00
Brian Anderson
612fe3d2d6
Add ast_map::node_span function
2011-08-11 10:09:02 -07:00
Brian Anderson
14b3ad194a
Switch a check for main type from an error to an ICE
...
This code path doesn't look possible, so I think it indicates a bug. Also,
make the message lowercase.
2011-08-11 10:09:02 -07:00
Brian Anderson
0f8e58e3ce
Lowercase the "wrong type in main fn" error
2011-08-11 10:09:02 -07:00
Brian Anderson
32438e82b3
Fix the error-pattern in compile-fail/bad-main.rs. Un-XFAIL
...
This is also tested by compile-fail/main-wrong-type.rs but the type signatures
are slightly different, so I guess it's worth holding on to.
2011-08-11 10:09:02 -07:00
Patrick Walton
7b337e3581
rustc: Don't free shared memory when --gc is on
2011-08-10 22:47:18 -07:00
Patrick Walton
a5d5f9ef48
rustc: Add a --gc switch for debugging and experimentation
2011-08-10 22:13:30 -07:00
Michael Sullivan
c5c8258937
Rework check_expr substantially.
...
The bulk of check_expr is now check_expr_with_unifier, which takes an
expected type and a unification function and will perform the
unification on the type it produces. check_expr calls
check_expr_with_unifier with a dummy unifier and a new function,
check_expr_with, takes an expected type and uses the simple unifier.
I think this generally makes thing cleaner, but the purpose for doing
this is to enable type inferred lambda-blocks to be useful by allowing
the argument types to be unified before the body of the lambda is
checked.
2011-08-10 20:18:07 -07:00
Michael Sullivan
67e361a940
Introduce a ty_infer ast node and use it instead of option::t[ty].
...
This actually basically makes things worse, since we get less nice
type system guarentees but it will make doing type inferred blocks a
fair deal less painful. I'm not /really/ happy about this...
2011-08-10 20:18:07 -07:00
Patrick Walton
1e6074ca73
rustc: Mark functions as "rust" GC
2011-08-10 20:12:30 -07:00
Michael Sullivan
43c9fe65bd
Eliminate the last vestiges of init_recv.
2011-08-10 19:21:29 -07:00
Michael Sullivan
00b781e495
Some cleanup in check_expr.
2011-08-10 19:20:00 -07:00
Patrick Walton
ba7c8f18d4
rustc: Remove unused "trace" upcalls
2011-08-10 18:09:52 -07:00
Patrick Walton
d1494901d0
rustc: Declare GC-related intrinsics
2011-08-10 17:59:33 -07:00
Patrick Walton
19424dfab6
rustc: Add unique pointers to the set of types we support
2011-08-10 17:24:22 -07:00
Tim Chevalier
a8a4d4ec05
Use actual type, not declared type, when zeroing move arguments
...
trans was failing with a bounds check error because the caller
was using the declared type (an out-of-scope ty param) and not
the actual type in a list of argument types to zero.
Closes #811
2011-08-10 17:22:57 -07:00
Graydon Hoare
511c053856
Remove dead keywords from parser.
2011-08-10 17:11:24 -07:00
Lindsey Kuper
bf81a05223
Factor out creation of object body types.
2011-08-10 16:53:32 -07:00
Michael Sullivan
bcc30cb4f6
Rename unify::simple to unify::unify.
2011-08-10 16:43:03 -07:00
Michael Sullivan
7d5092ee7b
Some trivial cleanup.
2011-08-10 16:28:34 -07:00
Patrick Walton
347230b001
rt: Add the last few cases to polymorphic log
2011-08-10 15:45:32 -07:00
Patrick Walton
955ac84da4
rt: Step over type params properly in glue
2011-08-10 15:39:05 -07:00
Patrick Walton
15e1e3185d
rt: Allow records and boxes to be logged
2011-08-10 15:36:37 -07:00
Lindsey Kuper
007af36bb3
Comments, cleanup, whitespace, refactoring.
2011-08-10 15:11:32 -07:00
Lindsey Kuper
b23360ec8e
Test case for issue #812 .
2011-08-10 15:11:32 -07:00
Patrick Walton
6affa3264b
rt: Allow tags to be logged
2011-08-10 14:57:02 -07:00
Patrick Walton
f5c8c85196
rt: Implement logging of vectors
2011-08-10 14:42:06 -07:00
Patrick Walton
dc720c3aba
rt: Implement polymorphic log on strings
2011-08-10 14:35:12 -07:00
Patrick Walton
adce35acd4
rustc: Use polymorphic logging
2011-08-10 14:35:12 -07:00
Brian Anderson
40ae704ff2
Begin valgrinding run-fail tests
...
Introduce a temporary no-valgrind directive for the few that aren't clean
2011-08-10 13:36:57 -07:00
Brian Anderson
0cd607bcbd
rt: Shutdown gracefully on failure
...
When the kernel fails, kill all tasks and wait for the schedulers to stop
instead of just exiting. I'm sure there are tons of lurking issues here but
this is enough to fail without leaking (at least in the absence of cleanups).
2011-08-10 13:02:31 -07:00
Patrick Walton
f6ad051408
rt: Use _LP64 instead of SIZE_MAX and UINT64_MAX to try to put out the burning tinderbox
2011-08-10 10:55:41 -07:00
Patrick Walton
ceaf02abe1
rt: Attempt to quiet MinGW by including limits.h
2011-08-10 05:17:30 -07:00
Patrick Walton
6fbb7ffdbd
rt: Stub code for polymorphic log
2011-08-09 19:01:15 -07:00
Patrick Walton
8e6e6f5f89
rustc: Make iter_structural_ty_full and friends take one value, not two. Shaves a second off codegen.
2011-08-09 18:31:14 -07:00
Patrick Walton
044b16ad68
rustc: Remove the code to generate cmp glue
2011-08-09 18:31:13 -07:00
Graydon Hoare
a5997f2eb2
Actually perform handoff from caller to callee on move-mode args.
2011-08-09 17:56:26 -07:00
Michael Sullivan
5adaa6f956
Do some cleanup in stdlib.
2011-08-09 17:53:52 -07:00
Patrick Walton
169f1e5b5a
test: XFAIL binops.rs for now due to mysterious tinderbox failure on Linux
2011-08-09 17:50:21 -07:00
Patrick Walton
865ca749dc
rustc: Use shapes instead of codegen'd cmp glue
2011-08-09 17:02:17 -07:00
Patrick Walton
a73a0dd74e
test: Update binops.rs with the new equality semantics
2011-08-09 17:02:17 -07:00
Patrick Walton
1f8e0fa083
rt: Implement comparison of functions, objects, ports, channels, and tasks
2011-08-09 17:02:17 -07:00
Patrick Walton
ade998d743
rt: Don't walk vars twice. We self-host with compare glue now.
2011-08-09 17:02:17 -07:00
Patrick Walton
1e1125fcbe
rt: Initialize "result" in all constructors for cmp
2011-08-09 17:02:17 -07:00
Lindsey Kuper
5d9680fc7e
Move object-system-related trans stuff to its own file.
2011-08-09 16:42:55 -07:00
Brian Anderson
61425c8d13
Convert remaning ivec decls to new syntax
...
These snuck in during rebasing
2011-08-09 15:53:26 -07:00
Erick Tryzelaar
00ccd6ba42
Remove support for the ivec T[] syntax.
2011-08-09 15:53:26 -07:00
Erick Tryzelaar
491ed7f12c
Port the fuzzer and tests to ivec type [T] syntax.
2011-08-09 15:53:26 -07:00
Erick Tryzelaar
8b15045224
Port the compiler to the ivec type [T] syntax.
2011-08-09 15:53:26 -07:00
Erick Tryzelaar
50f97cb368
Port the stdlib to the ivec type [T] syntax.
2011-08-09 15:53:26 -07:00
Lindsey Kuper
bf84d20f7c
Move along; nothing to see here...
2011-08-09 15:42:48 -07:00
Brian Anderson
fed62af887
Register new snapshots
2011-08-09 15:07:00 -07:00
Patrick Walton
e5533a5d5e
rt: Compare exterior vectors
2011-08-09 12:49:52 -07:00
Lindsey Kuper
0d74d22eda
Un-XFAIL a test. Issue #435 .
2011-08-09 12:35:41 -07:00
Brian Anderson
c4877f88fa
Update comments on sio-ctx test
2011-08-09 12:30:50 -07:00
Lindsey Kuper
eaefb0f1f6
Test case for issue #758 .
2011-08-09 12:25:47 -07:00
Patrick Walton
b83167cf91
rt: Make comparison through type vars work
2011-08-09 12:19:40 -07:00
Patrick Walton
f9363f01a1
rt: Fix comparison of interior vectors
2011-08-09 12:19:40 -07:00
Brian Anderson
dcc9a81d17
XFAIL sio-ctx
...
Reportedly fails sometimes, probably when RUST_THREADS > 1
2011-08-09 12:03:30 -07:00
Lindsey Kuper
ff22368279
The self-stack stuff (from #702 ) also closes issue #718 .
2011-08-09 11:46:15 -07:00
Erick Tryzelaar
a37e00ed1f
Change the ivec type syntax to [T].
...
This preserves the old syntax for now.
2011-08-09 11:29:36 -07:00
Erick Tryzelaar
bf7b516bdb
Add newlines to the end of some files.
2011-08-09 11:29:36 -07:00
Lindsey Kuper
d5c8bb9d86
A little backwarding cleanup/refactoring.
2011-08-09 11:19:24 -07:00
Lindsey Kuper
a334adaab9
Thread "self" through the stack. Backwarding! Closes #702 .
2011-08-09 10:59:13 -07:00
Graydon Hoare
b2cac5afa3
Implement typestate checking for move-mode args. Un-XFAIL compile-fail/move-arg.rs.
2011-08-08 19:41:54 -07:00
Patrick Walton
f7749b1608
rt: Add code to walk over interior vectors, untested as of yet
2011-08-08 19:16:33 -07:00
Patrick Walton
7d7f62613a
rt: Compare tags
2011-08-08 18:29:20 -07:00
Patrick Walton
e5531504c9
rt: Align when comparing the insides of boxes
2011-08-08 17:30:21 -07:00
Patrick Walton
0459e38bde
rt: Align mallocs to 16 byte boundaries
2011-08-08 17:30:21 -07:00
Eric Holk
42b13c1db3
Disabling TRACK_ALLOCATIONS
2011-08-08 17:12:44 -07:00
unknown
44bef5f2cb
Introduced task handles.
...
This is the new way to refer to tasks in rust-land. Currently all they
do is serve as a key to look up the old rust_task structure. Ideally
they won't be ref counted, but baby steps.
2011-08-08 16:55:38 -07:00
Patrick Walton
f4f057ced1
rt: Compare the insides of boxes
2011-08-08 16:52:11 -07:00
Patrick Walton
72fdb1a3bf
rustc: Emit the shape of "float" as f64, not f32
2011-08-08 16:52:10 -07:00
Michael Sullivan
059c66b9f7
Don't bother zeroing out slots in cleanups.
2011-08-08 16:17:09 -07:00
Patrick Walton
c0fc204112
rustc: Fix signature on cmp glue upcall
2011-08-08 16:01:03 -07:00
Graydon Hoare
b54e7e4506
Add new arg-passing mode 'move' denoted with '-T'. Translate as pass-by-value, doesn't deinit source yet nor get proper analysis in typestate, alias passes.
2011-08-08 15:53:41 -07:00
Patrick Walton
3dda9aabf2
stdlib: std::ebmlivec and std::ebml are now synonyms
2011-08-08 15:30:37 -07:00
Patrick Walton
4d7f866eec
rustc: Declare upcall_cmp_type
2011-08-08 15:05:12 -07:00
Patrick Walton
42daeab7df
rt: "const foo const &" == "const foo &", duh. Puts out burning tinderbox.
2011-08-08 14:55:35 -07:00
Patrick Walton
eb7e9dce4d
rt: Stub the shape-based cmp upcall
2011-08-08 14:33:06 -07:00
Eric Holk
d4a4224d1b
Using unsafe chan pointer idiom to make task-comm-16.rs pass again.
2011-08-08 10:48:21 -07:00
Eric Holk
c54d57b4b4
Temporarily disabling chan test to put out linux fire.
2011-08-08 10:05:00 -07:00
Eric Holk
d9b84a546c
Converted the rest of the task-comm-* tests over. Also fixed some
...
channel lifecycle bugs.
2011-08-08 08:57:52 -07:00
Eric Holk
86babab2fe
Added an unsafe way to pass libchans over spawn and chans, and converted task-comm-0 to use libcomm.
2011-08-08 08:57:52 -07:00
Patrick Walton
0aeddb3673
rt: Stub compare glue
2011-08-05 18:47:12 -07:00
Patrick Walton
d7828e694d
rt: Uncomment data<T>
2011-08-05 17:50:59 -07:00
Eric Holk
50670eb426
Removing trailing whitespace in rust_shape.cpp
2011-08-05 17:08:22 -07:00
Eric Holk
f9fd785cf5
Removing an invalid operation in the attempt to restore valgrind cleanness.
2011-08-05 17:01:06 -07:00
Brian Anderson
5f89a4f5f3
XFAIL sio-srv
...
Needs to run on loopback so it doesn't trigger windows firewall, but seems
to be hanging. Giving up for now.
2011-08-05 16:49:43 -07:00
Patrick Walton
5261bd771f
rt: Simplify the signature of walk_tag; stub code for the data walker
2011-08-05 16:47:43 -07:00
Paul Stansifer
a9471d8296
Revert "rustc: bzero in zero_alloca. Shaves off a second or three."
...
This causes trouble in Valgrind in drop glue in parsing.
This reverts commit 4d180793f0
.
2011-08-05 16:38:49 -07:00
Brian Anderson
f918418953
Fix a type in the libuv mingw makefile
2011-08-05 15:48:19 -07:00
Tim Chevalier
c35bf9ca04
Another test for the occurs check, this one from issue 778
2011-08-05 15:47:17 -07:00
Eric Holk
b62e80c1f0
Atomic ref counting for chans.
2011-08-05 15:27:28 -07:00
Eric Holk
200bbcf91b
Rewrote receive to return a value. This lets us initialize variables by receiving them.
2011-08-05 15:27:27 -07:00
Tim Chevalier
1c786bcc82
Initialize all constraints to False
...
Previously, typestate was initializing the init constraint for
a declared-but-not-initialized variable (like x in "let x;") to False,
but other constraints to Don't-know. This led to over-lenient results
when a variable was used before declaration (see the included test
case). Now, everything gets initialized to False in the prestate/poststate-
finding phase, and Don't-know should only be used in pre/postconditions.
This aspect of the algorithm really needs formalization (just on paper),
but for now, this closes #700
2011-08-05 15:25:52 -07:00
Patrick Walton
e76efbc43a
etc: Add "lambda" and "inline" to the vim mode
2011-08-05 14:01:45 -07:00
Patrick Walton
b079e1adbb
rustc: Parse "inline". Also write it into metadata.
2011-08-05 13:59:27 -07:00
Brian Anderson
18ef7cc531
Un-XFAIL sio-ctx, sio-srv
...
Seem to work consistently
2011-08-05 11:57:07 -07:00
Graydon Hoare
7da64ae461
Munge libuv makefiles sufficiently to build out of tree.
2011-08-05 11:57:07 -07:00
Brian Anderson
f6d5c56f21
Tweak libuv makefiles so they pick up custom CFLAGS
2011-08-05 11:57:07 -07:00
Brian Anderson
e653520a6f
Fix uv_buf_t declaration on win32
...
The fields of this structure are mysteriously defined in the opposite order
on windows as on unix
2011-08-05 11:57:06 -07:00
Brian Anderson
4178e52c8f
XFAIL all the sio tests
...
They have random failures still, sadly.
2011-08-05 11:57:06 -07:00
Rob Arnold
a4951cab7f
Add libuv Makefile
2011-08-05 11:57:06 -07:00
Rob Arnold
8229c3fa75
Update libuv to revision ee599ec1141cc48f895de1f9d148033babdf9c2a
2011-08-05 11:57:06 -07:00
Rob Arnold
f4b87c749f
Basic async IO module using libuv
2011-08-05 11:57:06 -07:00
Rob Arnold
b64a52df42
Integrate libuv into the build system
2011-08-05 11:57:06 -07:00
Rob Arnold
904f443fa9
Drop in libuv rev 2b5707d834a6b85b8e589ac04cb61a6db2dab94b
2011-08-05 11:57:06 -07:00
Rob Arnold
b6be83885f
Log tags in memory_region::{free,realloc}
...
Make this useful and consistent with the destructor.
2011-08-05 11:57:06 -07:00
Patrick Walton
fd7ffd5ac2
rustc: Add inlineness to the fn decl instead
2011-08-05 11:46:43 -07:00
Patrick Walton
59e9b629c0
Revert "rustc: Introduce the concept of inline to the AST"
...
This reverts commit 9b9170f9fe
.
2011-08-05 11:38:06 -07:00
Patrick Walton
9b9170f9fe
rustc: Introduce the concept of inline to the AST
2011-08-05 11:33:48 -07:00
Patrick Walton
684df97ef0
etc: Update the Vim syntax mode with new keywords
2011-08-05 09:25:27 -07:00
Tim Chevalier
d7ee55bfd0
(Almost) Always unify a function tail expr with the function result type
...
typeck::check_fn had an exception for the case where the tail expr
was compatible with type nil -- in that case, it doesn't unify the
tail expr's type with the enclosing function's result type. This
seems wrong to me. There are several test cases in Issue #719
that illustrate why. If the tail expr has type T, for some type
variable T that isn't resolved when this check happens, then T
never gets unified with anything, which is incorrect -- T should
be unified with the result type of the enclosing function. (The
bug was occurring because an unconstrained type variable is
compatible with type nil.)
Instead, I removed the check for type nil and added a check that
the function isn't an iterator -- if it's an iterator, I don't
check the tail expr's type against the function result type,
as that wouldn't make sense.
However, this broke two test cases, and after discussion with
brson, I understood that the purpose of the check was to allow
semicolons to be omitted in some cases. The whole thing seems
rather ad hoc. But I came up with a hacky compromise solution:
instead of checking whether the tailexpr type is *compatible*
with nil, we now just check whether it *is* nil. This also
necessitates calling resolve_type_vars_if_possible before
the check happens, which worries me. But, this fixes the bug
from Issue #719 without requiring changes to any test cases.
Closes #719 but I didn't try every variation -- so reopen the bug
if one of the variations still doesn't work.
2011-08-05 02:21:58 -07:00
Michael Sullivan
c5d55ef918
Prohibit assignment to upvars in lambdas. Closes #805 .
2011-08-04 19:35:44 -07:00
Patrick Walton
a26c027731
Revert "rustc: Don't emit memset for non-structural types" due to crashes
...
This reverts commit 3d5a777fe1
.
2011-08-04 19:06:13 -07:00
Patrick Walton
3d5a777fe1
rustc: Don't emit memset for non-structural types
2011-08-04 18:24:57 -07:00
Michael Sullivan
66a255ac92
Add a cleanup for copying closures. Closes #804 .
2011-08-04 17:58:12 -07:00
Michael Sullivan
9a5e9806f3
Don't force resolution of type variables until there is no enclosing function scope. Closes #803 .
2011-08-04 17:33:15 -07:00
Patrick Walton
d4fe1b3127
stdlib: Pass getopt matches by alias
2011-08-04 17:11:50 -07:00
Patrick Walton
6c0297cfe7
rustc: bzero in drop_slot
2011-08-04 16:47:20 -07:00
Lindsey Kuper
fcec628203
Enable creation of backwarding vtables (issue #702 ), but don't start
...
using them yet. Also, refactor process_fwding_mthd into separate
functions to handle backwarding and forwarding, and refactor
create_vtbl to be more digestible.
2011-08-04 16:40:17 -07:00
Patrick Walton
4d180793f0
rustc: bzero in zero_alloca. Shaves off a second or three.
2011-08-04 16:33:38 -07:00
Michael Sullivan
cf9c0f9d93
Use lambdas in gather_locals in typeck.
2011-08-04 16:18:12 -07:00
Michael Sullivan
95680474e2
Use lambdas in the freevars pass.
2011-08-04 16:18:12 -07:00
Patrick Walton
ae3312002a
rustc: Use memmove in copy_ty. 45% LLVM codegen speed improvement.
2011-08-04 16:14:28 -07:00
Tim Chevalier
e0985c1060
Handle alt on a _|_ - typed value
...
Return the result of the discriminant from trans_alt,
rather than nil, in the _|_ case. This was breaking the
enclosed test case (alt-bot-2) when optimization was disabled.
Closes #769
2011-08-04 16:07:26 -07:00
Tim Chevalier
5f03ca48d8
Add a fast path in ty::occurs_check_fails
...
Use type_contains_vars in occurs_check_fails to avoid doing
any work most of the time. This fixes a performance regression.
(No one else noticed yet that typechecking just got 4x slower, right?
Well, now it isn't anymore. :-})
2011-08-04 15:56:40 -07:00
Tim Chevalier
2baaeab784
Implement the occurs check
...
In the writeback phase, the typechecker now checks that it isn't
replacing a type variable T with a type that contains T. It
also does an occurs check in do_autoderef in order to avoid
getting into an infinite chain of derefs.
I'm a bit worried that there are more places where the occurs
check needs to happen where I'm not doing it now, though.
Closes #768
2011-08-04 15:30:09 -07:00
Lindsey Kuper
d7d4b4fc38
trans_args no longer needs llobj argument.
2011-08-04 11:34:06 -07:00
Patrick Walton
2a3235b58c
rustc: Actually emit shapes
2011-08-04 11:25:46 -07:00
Eric Holk
b55b80ed11
Merge commit '6ec4829' into snap
2011-08-04 11:13:52 -07:00
Eric Holk
6ec4829068
Registering snapshot.
2011-08-04 11:06:11 -07:00
Patrick Walton
4061ca2bbd
rustc: Generate shapes
2011-08-04 10:46:10 -07:00
Patrick Walton
6bb6922c28
rt: Change int to uint32_t. Put out burning tinderbox.
2011-08-04 09:50:11 -07:00
Patrick Walton
e351ad762d
rt: Stub shape glue and implement shape::print and shape::size_of.
2011-08-03 20:25:44 -07:00
Lindsey Kuper
1b1d8e7b91
Killing an obsolete comment.
2011-08-03 20:03:05 -07:00
Lindsey Kuper
6df7c041bc
Pointer-ifying llenv. Step 1 of 2 steps to object system sanity.
2011-08-03 19:50:19 -07:00
Lindsey Kuper
29ec2503db
Put comments on trans contexts back where they belong. :(
2011-08-03 19:49:29 -07:00