Commit Graph

827 Commits

Author SHA1 Message Date
Ralph Giles
6b9a9a7874 Check the llvm version against a fixed list.
This change is thanks to Peter Hull, who independently resolved
the 2.8 vs 2.8svn issue this way. His patch checked the version
string against a fixed set of options, which is easier to read
and simpler to adjust in the future.
(cherry picked from commit 83cc297561a78ad13fcd1c2943f17ace81c725b8)
2010-10-21 16:06:39 -07:00
Ralph Giles
c3879c19c2 Also search the bare ocaml standard library path for llvm bindings.
Ubuntu ships the llvm bindings in /usr/lib/ocaml/llvm/ but Fedora
is installing them directly in /usr/lib/ocaml so we need to check
there as well.

The patch is untested; Fedora 14, the current beta, includes llvm 2.7.
It does add an unnecessary -I directive, but should at least have a
better chance of working on Fedora 15.
(cherry picked from commit 8af7360bd3de851668a133ae6ba4419e3722c6aa)
2010-10-21 16:06:21 -07:00
Ralph Giles
45056fc022 Update llvm version detection for the 2.8 release.
The LLVM project recently released version 2.8, and updated
the SVN tree version to 2.9svn, obsoleting the simple check
for 'llvm-config --version' returning 2.8svn.

With this commit we instead check for the substrings 2.8 and 2.9
in the output of 'llvm-config --version', since we (currently)
support both the svn and released varieties of those versions.

A stable release also complicates our check for the ocaml bindings.
Previously we looked in `llvm-config --libdir`/ocaml which is
appropriate for local compiles, but distribution packagers are
likely to put the bindings in the default search path, e.g.
/usr/lib/ocaml/llvm. We now fall back to trying variations on
the standard library path returned by 'ocamlc -config' if we
don't find it under 'llvm-config --libdir'.

With this change, rust builds against LLVM 2.8 as packaged
in Ubuntu 10.10 as well as LLVM 2.9svn compiled locally.
(cherry picked from commit b606b65756f087c403180abd5418fe7dce469758)
2010-10-21 16:06:15 -07:00
Graydon Hoare
a7599a7968 De-burninate tree. 2010-10-21 15:02:05 -07:00
Dave Herman
6421c13157 eliminated bitv.test, which now lives in test/run-pass 2010-10-21 13:34:16 -07:00
Dave Herman
dbe27199b8 line length police; moved comp.util.bits to std.bitv 2010-10-21 11:39:53 -07:00
Patrick Walton
194f38fdff rustboot: Don't use ridiculous type names when describing simple types like int and uint 2010-10-21 11:31:04 -07:00
Patrick Walton
a7840f02b0 Use "friendly" type names when reporting a "mismatched type-params" error 2010-10-21 11:14:38 -07:00
Dave Herman
852c0d6631 oops, removed bits.test() from main 2010-10-21 08:06:44 -07:00
Dave Herman
da8b6795c7 tests and bugfixes: fns take aliases, fixed binary arithmetic in create, eliminated wasted bit per uint 2010-10-21 07:36:13 -07:00
Dave Herman
ce3224652f simpler computation of uint_bits(), plus whitespace police 2010-10-20 22:04:19 -07:00
Patrick Walton
9a539a5dd1 Move the "friendly" type printer to semant 2010-10-20 17:58:55 -07:00
Dave Herman
8f71dad2c9 created a first draft of the bit-set library needed for typestate 2010-10-20 17:04:15 -07:00
Patrick Walton
11deb2f5f1 Eliminate <tag#> stuff from the "friendly" type errors 2010-10-20 15:36:30 -07:00
Patrick Walton
4bb675ba42 Print better error messages when the number of type params is wrong 2010-10-20 11:22:44 -07:00
Patrick Walton
28d43678b6 Add a virtual destructor to rust_thread in sync.h, to quiet the compiler 2010-10-20 10:32:36 -07:00
Graydon Hoare
368943998d Translate lazy && and || operators in rustc. 2010-10-19 17:24:15 -07:00
Graydon Hoare
71b1f1d117 Parse and translate assignments. 2010-10-19 16:33:11 -07:00
Graydon Hoare
b8cca0971f Teach trans to allocate, initialize and load from local variables. 2010-10-19 14:54:10 -07:00
Patrick Walton
10d628dbd0 Add a type slot to the AST 2010-10-19 13:28:43 -07:00
Patrick Walton
e497fe981b Partial work on adding types to the AST 2010-10-19 13:10:39 -07:00
Graydon Hoare
4a3edb320d Store items and decls in vecs to preserve input order, index externally. Implement block-local name lookup. 2010-10-18 18:19:16 -07:00
Graydon Hoare
865bbae685 More work on resolving names in rustc. Basic expr_name lookup working on items and args. 2010-10-18 16:15:25 -07:00
Graydon Hoare
23a00fd092 Disable use of parametric tail call in map.rs, they don't presently work. 2010-10-18 16:04:47 -07:00
Graydon Hoare
f747101b7c Rewrite session formatting to use #fmt extension. 2010-10-18 16:03:22 -07:00
Graydon Hoare
68321b0de8 Make list.find return an option of different type than the list element. 2010-10-18 16:02:59 -07:00
Graydon Hoare
67d4427345 Begin sketching name lookup in rustc. 2010-10-18 14:37:30 -07:00
Graydon Hoare
05e7374e29 Expand rustc's fold to update env on block boundaries. 2010-10-18 14:36:40 -07:00
Graydon Hoare
7801ba9dfe Make type errors in rustboot report the friendly type of both expected and actual. 2010-10-18 14:36:17 -07:00
Graydon Hoare
783be711f5 Flesh out the std.list module a touch. 2010-10-18 14:35:44 -07:00
Patrick Walton
1c3e95e0a5 Roll back the expr->lval change. We're now LL(1) again. 2010-10-18 11:31:31 -07:00
Graydon Hoare
57c7e94c8f Encode and decode tag types in dwarf properly. Add list module to std. Shift rustc to use std.util.option. Fix various dependent bugs. Closes #73. 2010-10-15 22:09:09 -07:00
Graydon Hoare
fc2d4828e7 Finish the fold drivers in fold.rs. 2010-10-14 18:14:09 -07:00
Patrick Walton
5826a2e3de rustc: Parse field and vector indexing expressions 2010-10-14 17:42:06 -07:00
Graydon Hoare
ff4e9f9141 Enable resolve pass in rustc. Doesn't do much yet aside from an incomplete identity fold, but no longer crashes. 2010-10-14 15:53:28 -07:00
Graydon Hoare
6993346e7d Stop using bound refs (don't work; leak) and work around auto-deref vec-append bug. 2010-10-14 15:52:42 -07:00
Graydon Hoare
5a51716790 Fix mem += mem bug in vec-append. 2010-10-14 15:51:54 -07:00
Graydon Hoare
09b12d167f Fix typos in Type.friendly_stringify. 2010-10-14 15:27:50 -07:00
Patrick Walton
699ef987d7 rustc: Start work on lvals 2010-10-14 15:20:27 -07:00
Patrick Walton
c7ab80f743 Typecheck tags in "alt" patterns 2010-10-14 15:08:19 -07:00
Graydon Hoare
f234750d80 Fix crasher in rustc. 2010-10-14 12:41:48 -07:00
Graydon Hoare
668f3a90a8 Move the friendly-names table to semant, reuse it in the name mangler. 2010-10-13 17:15:25 -07:00
Graydon Hoare
52c2a1549c Fetch typarams from the outermost item frame, when inside an iter-block. One less crash in rustc. 2010-10-13 15:53:38 -07:00
Patrick Walton
1e19fc969e Use "friendly" types throughout the typechecker 2010-10-13 15:34:18 -07:00
Patrick Walton
45a61b5191 Don't run tidy inside etc/. Should put out the burning tinderbox. 2010-10-13 15:21:42 -07:00
Patrick Walton
e129a9b4ce Use the user-defined type aliases when reporting type errors 2010-10-13 15:14:04 -07:00
Patrick Walton
5c622b6ecb rustc: Lex identifiers that have numbers in them too 2010-10-13 11:02:56 -07:00
Patrick Walton
d50d481529 rustc: Parse vector types 2010-10-13 10:55:20 -07:00
Patrick Walton
b7e6d9895e First stab at a Vim syntax highlighter for Rust 2010-10-13 10:43:19 -07:00
Graydon Hoare
69ae63d4b0 Fix horribly embarassing signedness bug in backend, plus related regressions. 2010-10-12 16:51:27 -07:00