Commit Graph

2128 Commits

Author SHA1 Message Date
Tim Chevalier
d7e8818414 Further work on typestate. Handles expr_rec and expr_assign now.
Also changed the ts_ann field on statements to be an ann instead,
which explains most of the changes.

As well, got rid of the "warning: no type for expression" error
by filling in annotations for local decls in typeck (not sure whether
this was my fault or not).

Finally, in bitv, added a clone() function to copy a bit vector,
and fixed is_true, is_false, and to_str to not be nonsense.
2011-04-12 14:31:46 -07:00
Rafael Ávila de Espíndola
87d17c3a2c Add LLVMAddLoopIdiomPass. 2011-04-12 16:13:31 -04:00
Rafael Ávila de Espíndola
424d3e3837 Add LLVMAddCorrelatedValuePropagationPass. 2011-04-12 16:08:13 -04:00
Rafael Ávila de Espíndola
8e5109d4ed Add LLVMAddScalarReplAggregatesPassSSA. 2011-04-12 15:59:38 -04:00
Graydon Hoare
5f6abdc0e8 Un-XFAIL generic-tag-corruption.rs. 2011-04-12 12:58:43 -07:00
Graydon Hoare
7c55938125 Make glue always pass-by-alias and rename "scalar_or_boxed" concept to "immediate" 2011-04-12 12:48:46 -07:00
Graydon Hoare
f374fa44b6 Tighten up condition on use of opaque_tag, remove blunt hammer of alias arg-casting in trans_args. 2011-04-12 12:48:46 -07:00
Rafael Ávila de Espíndola
832ad0e041 Add LLVMAddEarlyCSEPass to the .def file. 2011-04-12 15:48:11 -04:00
Rafael Ávila de Espíndola
dd6fc607a4 Enable more optimizations. 2011-04-12 15:33:39 -04:00
Brian Anderson
73eecbd0ca Factor out creation of calls into ExtFmt.RT 2011-04-11 21:55:03 -04:00
Brian Anderson
bba245f3e6 Add support for bool, char to extfmt.
XFAIL syntax-extension-fmt in rustboot.
2011-04-11 21:54:03 -04:00
Brian Anderson
37f87161cc Move ExtFmt compile-time functions into their own module 2011-04-11 21:51:23 -04:00
Brian Anderson
c41796f2ca Use correct indentation for ExtFmt.rs 2011-04-11 21:51:23 -04:00
Brian Anderson
ce85b9eb7b Make ExtFmt call its own functions instead of others defined in std 2011-04-11 21:51:23 -04:00
Brian Anderson
d4d0144bcf Move extfmt parsing into standard library 2011-04-11 21:51:23 -04:00
Brian Anderson
5a36786634 Move the extfmt data model into the standard library. 2011-04-11 21:51:23 -04:00
Patrick Walton
9d9790c7f5 rustc: Add a uint hash function 2011-04-11 16:54:05 -07:00
Patrick Walton
e0faf57313 rustc: Factor out expr_ty() into expr_ann() and expr_ty() 2011-04-11 15:05:39 -07:00
Graydon Hoare
d218df02bf Add new minimal testcase showing generic tag memory corruption. 2011-04-11 15:00:18 -07:00
Rafael Ávila de Espíndola
fcb344799a Add a hack to force the linker to fetch Object.o 2011-04-11 15:49:45 -04:00
Rafael Ávila de Espíndola
cca6335c26 Implement the "attempted dynamic environment-capture" error in rustc. 2011-04-11 15:35:01 -04:00
Rafael Ávila de Espíndola
4bd8dcccbc Try to fix the windows build. 2011-04-11 15:05:18 -04:00
Rafael Ávila de Espíndola
e733311a95 Make sure RustWrapper.cpp is linked in. 2011-04-11 14:52:11 -04:00
Brian Anderson
1f04c3dcef Un-XFAIL expr-block-fn.rs
It mysteriously works now.
2011-04-10 16:25:09 -04:00
Patrick Walton
3efb7f5459 rustc: Push down types for all expressions; add logic for recv and send 2011-04-08 18:14:31 -07:00
Graydon Hoare
35573144c5 Remove silly legacy glue-offset encoding, predicate runtime adjustments by ABI. LLVM should inline most glue now. 2011-04-09 00:54:46 +00:00
Graydon Hoare
19ebc0f376 Actually disable optimize in --disable-optimize case, duh. 2011-04-08 17:28:14 -07:00
Marijn Haverbeke
c0d0b717ee Fix codemap.lookup_pos
Previously, it would place every single location in the first
file of the crate that was parsed.
2011-04-09 01:57:48 +02:00
Patrick Walton
129c8392af rustc: Rename "demand" to "pushdown" in the typechecker and explain more clearly what it's for 2011-04-08 16:22:03 -07:00
Marijn Haverbeke
1af3174fe3 Move to single-uint file-position representation.
This makes passing them around cheaper. There is now a table (see
front/codemap.rs) that is needed to transform such an uint into an
actual filename/line/col location.

Also cleans up the span building in the parser a bit.
2011-04-09 01:05:18 +02:00
Marijn Haverbeke
094d31f5e4 Make lexer buffer the whole file
This way, it won't have to go through a bunch of calls for each
byte fetched.
2011-04-09 01:05:18 +02:00
Graydon Hoare
cae703c0b1 Add support for --disable-optimize 2011-04-08 15:49:14 -07:00
Patrick Walton
573bc5ad01 rustc: Resolve ty_locals 2011-04-08 15:41:08 -07:00
Patrick Walton
5355811859 rustc: Add the ability to fold over annotations 2011-04-08 15:21:49 -07:00
Rafael Ávila de Espíndola
ad7aff8203 Remove unused function. 2011-04-08 16:03:35 -04:00
Rafael Ávila de Espíndola
70bc63a3af Remove unused function. 2011-04-08 15:14:26 -04:00
Rafael Ávila de Espíndola
2cbe2bcb5e Link with -lm now that it is not included with --whole-archive when
building rustllvm.
2011-04-08 14:51:47 -04:00
Rafael Ávila de Espíndola
f8e22cdff3 Gold is more strict about --whole-archive and will report duplicated
symbols because of an Object.o in a .a and one outside. A similar
problem happens for the non-shared part of libpthread.

This patch moves the -whole-archive/-no-whole-archive to include just the
llvm libs.
2011-04-08 14:25:18 -04:00
Tim Chevalier
97d0f76c63 fix long lines 2011-04-08 17:46:46 +00:00
Tim Chevalier
9c001af07c Implemented computing prestates and poststates for a few expression forms.
The typestate checker (if it's uncommented) now correctly rejects a
trivial example program that has an uninitialized variable.
2011-04-08 17:46:46 +00:00
Marijn Haverbeke
6109dba305 Disable effect checking in rustboot 2011-04-08 18:44:58 +02:00
Brian Anderson
b883ec4c9d Avoid some gotchas with logging macros
I think this is sufficient to eliminate multiple evaluation and the
possibility of accidental miscompilation from the logging macros.
2011-04-07 22:53:16 -04:00
Brian Anderson
0abccc6370 Add a test case for calling generic functions taking alias args with box types 2011-04-07 22:23:07 -04:00
Brian Anderson
a4f8de382a Add an XFAILed test for blocks that result in functions 2011-04-07 22:13:39 -04:00
Brian Anderson
d2d42fd4c7 Make block results work for generic types
I think just about every type can be used as a block result now. There's quite
a proliferation of tests here, but they all test slightly different things and
some are split out to remain XFAILed. The tests of generic vectors are still
XFAILed because generic aliased boxes still don't work in general.
2011-04-07 21:58:36 -04:00
Patrick Walton
ed14ea1d3f build: Use -O0 on Darwin. Seems that Darwin's GCC optimizations break rustrt. 2011-04-07 18:14:13 -07:00
Patrick Walton
afa6d85d61 stdlib: Add a simple union-find data structure 2011-04-07 18:02:01 -07:00
Patrick Walton
f28a9d8f52 rustc: Pointer cast when crossing a box boundary for statically-sized elements in trans_index() 2011-04-07 18:02:01 -07:00
Marijn Haverbeke
009e01dbe7 add FIXME related to the -fno-strict-aliasing workaround 2011-04-08 02:23:33 +02:00
Marijn Haverbeke
53cc673db1 Re-add a read_byte() method to buf_reader objs
This was removed because of the repetition, but doing single-byte
reads in terms of read_bytes (which allocates a vec) is needlessly
slow. This change speeds up parsing by 22%.

(Eventually, we won't be able to escape handling the buffering in the
stdlib itself.)
2011-04-08 02:23:14 +02:00