Commit Graph

3091 Commits

Author SHA1 Message Date
Erick Tryzelaar
29e14a0f81 Fix compiling the fuzzer. 2011-06-14 19:12:55 -07:00
Patrick Walton
ac743cfcb0 Merge pull request #490 from msullivan/fix_vec_append
Move the implementation of vec_append from llvm assembly to a regular upcall
2011-06-14 18:32:04 -07:00
Patrick Walton
c6be352f73 rustc: Implement on-heap resizing for interior vectors 2011-06-14 18:23:13 -07:00
Graydon Hoare
b7f043eeb7 Add new testcase to show the nature of our exciting block-expr / trailing unop interaction. 2011-06-14 17:07:48 -07:00
Rafael Ávila de Espíndola
ec9c4fdde7 Merge remote branch 'upstream/master' 2011-06-14 19:29:30 -04:00
Rafael Ávila de Espíndola
e6f87a7525 Use new snapshot. 2011-06-14 19:28:39 -04:00
Michael Sullivan
ccd1bcf7a7 Make tydesc glue functions use cdecl. 2011-06-14 16:09:21 -07:00
Michael Sullivan
5378f48a03 Remove vec_append_glue from the compiler. 2011-06-14 16:09:17 -07:00
Patrick Walton
14258b87a7 rustc: Free heapified interior vectors 2011-06-14 16:00:30 -07:00
Patrick Walton
bd18860be7 rustc: Fix LLVM type error that occurred when translating large unique vector literals 2011-06-14 16:00:02 -07:00
Michael Sullivan
95def699f1 Implement upcall_vec_append and use it for vector append. 2011-06-14 15:35:09 -07:00
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