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
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
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
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
Brian Anderson
f5ce3bf15d
More misc ivec->vec renaming
2011-08-18 15:01:49 -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
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
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
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
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
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
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
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
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
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
af21a27002
Port the compiler to the expr 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
e4a0f997fb
Port the compiler to the typaram foo<T> syntax.
2011-08-16 15:05:56 -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
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
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
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
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
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
Lindsey Kuper
f91351aaf6
The wonky for...in... whitespace was bothering me. Sorry!
2011-08-15 22:19:50 -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
Michael Sullivan
f1cec5793f
Make GEPi use InBoundsGEP.
2011-08-15 16:19:47 -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
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
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
be7325073a
Removed spawn and task from the parser. Updated all the tests except for the benchmarks.
2011-08-15 09:26:52 -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
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
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
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
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
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
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
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
7625ed52ee
Remove vecs from std::sort
2011-08-12 12:14:06 -07:00
Brian Anderson
13439dc870
Convert std::run to ivecs
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
7d05da96f7
Rename std::ioivec to std::io
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
369be5c8df
Convert uses of str::connect to str::connect_ivec
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
64f53dfbb0
Convert uses of str::split to split_ivec
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
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
2e7e58812b
Remove vec version of str::bytes, rename bytes_ivec to str::bytes
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
Marijn Haverbeke
de4b383a0f
Properly typecheck unary minus
...
Closes #813
2011-08-12 16:05:56 +02: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
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
4ff6763b60
rustc: Lowercase "main function not found" error
2011-08-11 10:09:02 -07:00