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
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
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
Patrick Walton
d8d9f2adf2
rustc: Unconditionally zero out all GC-relevant types for now
2011-08-19 17:55:42 -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
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