Patrick Walton
c3bf7d07e9
rustc: Implement simple interior vector append translation
2011-06-13 18:57:25 -07:00
Tim Chevalier
a1bb4a4ded
Refactor some typestate-related data structures
2011-06-13 18:21:22 -07:00
Eric Holk
d1857d30fc
This is the mega-ucontext commit. It replaces the task switching mechanism with a new one inspired by ucontext. It works under Linux, OS X and Windows, and is Valgrind clean on Linux and OS X (provided the runtime is built with gcc).
...
This commit also moves yield and join to the standard library, as requested in #42 . Join is currently a no-op though.
2011-06-13 18:14:13 -07:00
Brian Anderson
1595c9d767
rustc: Assignment expressions have nil type. Closes #483
2011-06-13 17:57:43 -07:00
Tim Chevalier
d65ad8c31c
Change decl to local in expr_for and expr_for_each
...
Since the decl in a for or for-each loop must always be a local
decl, I changed the AST to express this. Fewer potential match
failures and "the impossible happened" error messages = yay!
2011-06-13 17:33:04 -07:00
Rafael Ávila de Espíndola
eb811a903f
Enough driver support to link an empty program on linux. Will
...
try to update the Makefiles to use it.
2011-06-13 16:08:07 -04:00
Patrick Walton
913383d775
rustc: Preserve more type information for interior vectors at the LLVM level, allowing SROA to take place. log ~[ 2 ].(0)
now optimizes to just log 2
.
2011-06-12 00:44:43 -07:00
Patrick Walton
770bf24d72
rustc: Use in-bounds GEPs for fetching length and data of interior vectors
2011-06-11 23:32:21 -07:00
Patrick Walton
4375329031
rustc: Translate interior vector index expressions
2011-06-11 23:15:16 -07:00
Patrick Walton
8b318be4ce
rustc: Typecheck vector index expressions for interior vectors
2011-06-11 19:52:49 -07:00
Patrick Walton
ac206068d9
rustc: Bump the default interior vector size up to 64 bytes
2011-06-11 19:42:48 -07:00
Patrick Walton
182b933ac4
rustc: Link with main.o
2011-06-11 19:31:47 -07:00
Patrick Walton
00eb3f5798
rustc: Sketch out translation of interior vector literals and take/drop glue
2011-06-10 19:36:33 -07:00
Tim Chevalier
698c6406ba
Reject programs with unsatisfied predicate constraints
...
Generate appropriate constraints for calls to functions with
preconditions, and reject calls where those constraints don't
hold true in the prestate.
...by which I mean that it works for one test case :-)
2011-06-10 19:17:15 -07:00
Lindsey Kuper
f6d7d75699
More work on typechecking anon objs.
2011-06-10 17:18:08 -07:00
Graydon Hoare
8876e2c29e
Oops, fix logging string specs. Nobody likes writing RUST_LOG=_ZN5rustc5front7creaderE, do they?
2011-06-10 16:32:21 -07:00
Graydon Hoare
9671d21408
Implement meta tag matching in creader. Start using it in rustc.rc. Close #459 . Close #457 .
2011-06-10 15:54:41 -07:00
Tim Chevalier
774c6d0198
Friendlier error message for break outside a loop
...
The typechecker should really check for this, but at least now
there's an error message rather than an inexhaustive match failure
in trans.
2011-06-10 14:34:01 -07:00
Tim Chevalier
e5eacf8ea9
Use RHS type when translating assignments
...
In code like "auto foo = fail", a type gets inferred for foo
depending on how it's used. However, fail still has type _|_ and
still should be treated that way: particularly, its value shouldn't
be copied. Fixed trans to reflect that.
2011-06-10 14:05:06 -07:00
Patrick Walton
f1431adb40
rustc: Add a generic struct_elt() function to trans
2011-06-10 13:49:22 -07:00
Patrick Walton
451fc176d3
rustc: Derive flags for unsafe pointers. Puts out burning tinderbox.
2011-06-10 13:13:46 -07:00
Graydon Hoare
52c4c9014f
Encode meta tags in the crate and start sketching enhanced logic for resolving crate "use" directives.
...
Now with extra "works on OSX" kludging.
2011-06-10 12:57:29 -07:00
Patrick Walton
4634f236a9
rustc: Add some missing cases to ty.rs for interior vectors, and modify the pattern match so this is less likely to happen again. Add the LLVM type mapping as well.
2011-06-10 12:07:38 -07:00
Patrick Walton
cc3d484d9d
rustc: Add missing cases for istr and ivec to equal_type_structures()
2011-06-10 11:00:56 -07:00
Lindsey Kuper
3ce82d2e70
Fix a non-exhaustive match failure.
2011-06-10 10:58:55 -07:00
Patrick Walton
7b7c746c1e
Merge pull request #447 from paulstansifer/quick_error_message_fix
...
Error message, instead of segfault, when recursive types are used.
2011-06-10 10:53:42 -07:00
Patrick Walton
dfdd6dbc54
rustc: Remove the bitwise not operator
2011-06-10 10:47:33 -07:00
Lindsey Kuper
7a066ba547
Dead code elimination.
2011-06-10 10:23:48 -07:00
Marijn Haverbeke
1dbf3e8477
Minimal comment for visit.rs
2011-06-10 17:29:34 +02:00
Marijn Haverbeke
97576bd149
Move some uses of walk to visit in trans.rs
2011-06-10 17:24:20 +02:00
Marijn Haverbeke
e25e05539e
Handle mutable references in alias analysis
2011-06-10 16:44:33 +02:00
Marijn Haverbeke
f28796ed99
Fix unsafe uses of mutable references
2011-06-10 16:44:32 +02:00
Marijn Haverbeke
fccf065266
Implement mutable/immutable alias distinction.
...
Before, all aliases were implicitly mutable, and writing
&mutable was the same as writing &. Now, the two are
distinguished, and assignments to regular aliases are
no longer allowed.
2011-06-10 12:15:58 +02:00
Marijn Haverbeke
798bbd2e22
Fix all occurrences of writing to immutable aliases
...
You'd be surprised.
2011-06-10 12:15:28 +02:00
Lindsey Kuper
c51c6ba354
Sketching trans_anon_obj.
2011-06-09 18:16:28 -07:00
Patrick Walton
40e3a9fcbc
Revert "Encode meta tags in the crate and start sketching enhanced logic for resolving crate "use" directives." due to tree bustage
...
This reverts commit ab3635eebe
.
2011-06-09 18:15:13 -07:00
Patrick Walton
60706f1e35
rustc: Write interior vecs and strings into the metadata and add logic for them in ty_to_str
2011-06-09 18:00:46 -07:00
Graydon Hoare
ab3635eebe
Encode meta tags in the crate and start sketching enhanced logic for resolving crate "use" directives.
2011-06-09 17:24:32 -07:00
Patrick Walton
c9c1d860f1
rustc: Report type errors in terms of the actual types involved, not type variables
2011-06-09 17:23:15 -07:00
Patrick Walton
5318248f24
rustc: Annotate vector and string literals in the AST with their uniqueness or lack thereof
2011-06-09 17:11:21 -07:00
Patrick Walton
1c48102838
rustc: Add ty_istr and ty_ivec types
2011-06-09 16:23:19 -07:00
Patrick Walton
54d34bec59
rustc: Parse istr and ivec
2011-06-09 15:05:08 -07:00
Tim Chevalier
1cc3fe567c
Improve error message for wrong number of type arguments
...
Improve error message in the case where a use of a polymorphic tag has
insufficient type arguments given. Before, the typechecker was
just crashing with a bounds check error.
2011-06-09 14:50:49 -07:00
Patrick Walton
efcf8570f0
rustc: Remove comment dating back to the rustboot days from typeck
2011-06-09 14:19:04 -07:00
Patrick Walton
c7ca08d1b6
rustc: Remove all calls to resolve_all_vars and the function itself
2011-06-09 14:17:50 -07:00
Patrick Walton
06d706e197
rustc: Remove the call to resolve_all_vars when typechecking field exprs
2011-06-09 14:04:11 -07:00
Patrick Walton
3009574165
rustc: Unify with the root types
2011-06-09 14:04:11 -07:00
Marijn Haverbeke
1146136fa8
Fix double import that now somehow gets caught by resolve
2011-06-09 20:48:06 +02:00
Marijn Haverbeke
4ab862a50d
Switch resolve pass to use visit.rs rather than walk.rs
2011-06-09 20:44:04 +02:00
Marijn Haverbeke
d8516178e5
Pass ty params to visit::visit_fn
2011-06-09 20:44:04 +02:00