Commit graph

3330 commits

Author SHA1 Message Date
Michael Sullivan
491d110645 Make type_desc fields have useful types and better names. Add in cmp_glue. 2011-06-14 15:35:08 -07:00
Tim Chevalier
36755e42df Remove some unnecessary xfails 2011-06-14 15:11:48 -07:00
Tim Chevalier
05b7eb6dff Make the typechecker check that dynamically sized arguments are passed by alias
Before, this would cause an assertion failure in trans.
2011-06-14 15:11:48 -07:00
Rafael Ávila de Espíndola
c3015b8952 Apply the makefile changes again, this time fixin the driver to not produce a
rustc.exe.exe.
2011-06-14 17:51:31 -04:00
Tim Chevalier
1cc7165e62 Un-xfail test/run-fail/pred.rs 2011-06-14 14:17:28 -07:00
Tim Chevalier
1513539b67 Improve error message for a failed assert or check 2011-06-14 14:17:28 -07:00
Patrick Walton
bf5840d530 rustc: Do a dynamic alloca for generic interior vectors; fix data pointer calculation when spilling vectors 2011-06-14 14:03:38 -07:00
Tim Chevalier
206429e075 Un-xfail working test cases 2011-06-14 13:58:10 -07:00
Marijn Haverbeke
df27699a57 Modernize some code in parser.rs
No more explicit type params or working around rustboot bugs
2011-06-14 22:09:00 +02:00
Rafael Ávila de Espíndola
7b5c3afae5 Revert part of my last change while I figure out why windows doesn't like it. 2011-06-14 15:55:51 -04:00
Marijn Haverbeke
f24408d89a Don't error when trans_lval is called on a non-lval
This allows directly calling a function expression, or the
result of an alt/if/block expression.
2011-06-14 21:38:56 +02:00
Tim Chevalier
6142c731a0 Un-xfail some tests that work 2011-06-14 12:27:23 -07:00
Tim Chevalier
7532681612 Add xfail-stage0 to some tests (not sure if it matters...) 2011-06-14 12:27:23 -07:00
Rafael Ávila de Espíndola
8d7f7c2a97 Move a bit more to use the driver. 2011-06-14 14:49:18 -04:00
Graydon Hoare
9ae843ab1c Print parens on unops when necessary. 'make reformat' output now builds to stage3. 2011-06-14 11:32:20 -07:00
Graydon Hoare
a1edf91f48 Fix bug in detecting trailing comments when at beginning-of-file. 2011-06-14 11:11:22 -07:00
Graydon Hoare
700c525c4f Revive 'make reformat' target. 2011-06-14 11:11:07 -07:00
Marijn Haverbeke
fa2b4d3a8d Remove a bunch of primitive-compiler-workarounds from pprust.rs 2011-06-14 18:23:27 +02:00
Marijn Haverbeke
471436a299 Implement function expressions/anonymous functions
Looks like 'fn(..arg..) -> ret {body;}. They don't support type
parameters or upvars yet.
2011-06-14 18:22:46 +02:00
Marijn Haverbeke
8c06d1bcb0 Remove 'peeking_at_item' from parser
parse_item now returns a value to indicate it didn't find an item
2011-06-14 14:53:01 +02:00
Patrick Walton
355c417267 rustc: Add some interior vector spill code, untested as of yet 2011-06-13 19:27:04 -07:00
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
ff8af3c2db Use the driver to build stage3. This worked on all 3 platforms for me,
lets see if the bots agree.
2011-06-13 19:10:51 -04:00
Graydon Hoare
a3be0454f9 Bug fix for last commit, of course. 2011-06-13 14:48:37 -07:00
Graydon Hoare
0a8f9a394b Handle missing git in build env. 2011-06-13 14:45:49 -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
b0a80104a3 Un-XFAIL pred-on-wrong-slots 2011-06-10 19:17:15 -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
Graydon Hoare
a1bc2b17cc Make darwin happy. 2011-06-10 18:32:38 -07:00
Graydon Hoare
603ad1748b Fix printf flags. 2011-06-10 17:59:34 -07:00
Brian Anderson
10a4ecbd96 stdlib: Remove a FIXME for issue #452 2011-06-11 00:42:52 +00:00
Brian Anderson
2723e1c48f test: Add tests for issue #452 2011-06-11 00:42:52 +00:00
Graydon Hoare
c734c969fb Merge branch 'master' of github.com:graydon/rust 2011-06-10 17:36:23 -07:00
Graydon Hoare
1d1010cac0 Move rt:: logging namespace to ::rt:: and implement RUST_LOG=? and RUST_LOG=::help as synonyms that dump the crate logging map. Also warn when some logging specs don't match. 2011-06-10 17:31:48 -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