Commit Graph

306 Commits

Author SHA1 Message Date
Brian Anderson 2cebef095e stdlib: Make io failures recoverable by returning a result 2011-10-29 01:25:11 -07:00
Brian Anderson 83219269d5 rustc: Remove broken --depend flag 2011-10-28 12:58:10 -07:00
Brian Anderson 2a2945e5de rustc: -h cleanup 2011-10-28 12:51:46 -07:00
Brian Anderson d106a336cc rustc: Change --OptLevel to --opt-level 2011-10-28 12:49:19 -07:00
Brian Anderson bab2b37fd0 rustc: Use consistent error handling in main 2011-10-28 11:57:01 -07:00
Brian Anderson f2a3270b9c Reorder statements in rustc main to avoid bounds check 2011-10-28 11:17:07 -07:00
Haitao Li a81fdf0a5a rustc: Lift output file name handling out of main 2011-10-28 11:12:10 -07:00
Haitao Li 7bb9a54c73 Produce dyn libraries with proper names
Issue #744
2011-10-28 11:05:43 -07:00
Marijn Haverbeke cfdf193c46 Update our code to new type parameter kind syntax
Closes #1067
2011-10-25 15:56:55 +02:00
Brian Anderson 29ad3bdb10 Make fn denote a bare function. Convert fn to fn@ as needed 2011-10-20 18:23:48 -07:00
Brian Anderson 89466ffd74 Rename rustc::middle::unsafeck to fn_usage
I'm going to add further checks unrelated to unsafe.

Issue #1038
2011-10-13 12:25:57 -07:00
Niko Matsakis e8a0e592da reimplement some of the unsafe stuff which got lost
- blocks inherit unsafety
  - remove the --check-unsafe flag
  - add unsafe annotations where needed to get things to compile
2011-10-12 16:33:07 -07:00
Niko Matsakis 9f9deff7af make a good error msg if you try to use an unsafe fn for a test 2011-10-12 16:33:07 -07:00
Niko Matsakis 81533ff737 add pass to check that unsafe fns cannot be used as values 2011-10-12 16:33:06 -07:00
Niko Matsakis b9a9559c91 correct lines over 78 chars 2011-10-12 14:39:34 -07:00
Niko Matsakis f3c68e7238 enable unsafe checking but only with a flag --check-unsafe 2011-10-12 14:39:34 -07:00
David Rajchenbach-Teller 8c9dd54ded [Renaming] str_to_float is now float::from_str, float_to_str is now float::to_str 2011-10-12 10:56:05 +02:00
David Rajchenbach-Teller 2ec85135e2 [Move] Moved str_to_float, float_to_str from compiler to lib 2011-10-11 16:41:34 +02:00
Marijn Haverbeke 33167f7dec Adjust function signatures to allow for vecs being immediate
Some code was relying on vectors being implicitly by-reference (as
non-immediate value). This adds the necessary &&-sigils.

Closes #1021
2011-10-10 16:01:51 +02:00
Marijn Haverbeke 9c037d2194 Revert "rustc: Add a workaround for a segfault with --time-passes (issue #1005)."
This reverts commit 100e0264b2.
2011-10-06 16:12:47 +02:00
Patrick Walton 100e0264b2 rustc: Add a workaround for a segfault with --time-passes (issue #1005). 2011-10-05 14:35:30 -07:00
Brian Anderson 1f2e999262 Use std::os::get_exe_path to determine sysroot 2011-10-04 21:35:06 -07:00
Brian Anderson 33ee73102d Remove some redundancy in metadata::creader 2011-10-04 21:35:06 -07:00
Brian Anderson d91b7b61ef Encapsulate current sysroot and lib path handling into util::filesearch 2011-10-04 21:35:06 -07:00
Patrick Walton e9287e55cc rustc: Stub a --stack-growth option; it's behind a flag for now because it requires patches to LLVM. 2011-09-30 18:21:39 -07:00
Brian Anderson 821dd6c02c Change the directory for target libs
This pushes them down from stageN/lib/rustc/$(target) to
stageN/lib/rustc/$(target)/lib in order to make room for a target bin dir
2011-09-30 17:19:24 -07:00
Brian Anderson 80829af872 Remove legacy library search paths 2011-09-29 23:12:31 -07:00
Brian Anderson ab8338fb5a Make rustc's host triple agree with the build system's 2011-09-29 22:58:33 -07:00
Brian Anderson 0148daa058 Reorganize structure of build directory
Each stage is organized more according to Unix standards and to
accommodate multiple target architectures.

stageN/
  bin - rustc lives here
  lib - libraries that rustc needs
  lib/rustc/$(target_triple/ - target libraries
2011-09-29 22:58:33 -07:00
Brian Anderson 15e34deba3 Eliminate glue.o. Closes #990 2011-09-28 15:35:21 -07:00
Graydon Hoare 18c6cc6371 More steps to arch-specific target libs (#474) 2011-09-23 10:50:16 -07:00
Graydon Hoare 68d50b5928 Add target_triple to session::options. Use host triple by default, accept --target on command line. 2011-09-21 08:46:44 -07:00
Brian Anderson de1b394c32 Move linker invocation from driver::rustc to back::link 2011-09-20 11:10:03 -07:00
Graydon Hoare a4815b6742 Factor imports mindlessly. 2011-09-12 16:13:28 -07:00
Marijn Haverbeke ca1df2b111 Pretty-print for new arg-mode syntax 2011-09-12 12:49:00 +02:00
Marijn Haverbeke fc6b7c8b38 Reformat for new mode syntax, step 1
Long lines were fixed in a very crude way, as I'll be following up
with another reformat in a bit.
2011-09-12 12:04:14 +02:00
Marijn Haverbeke 4be7e1e5cd Pass all arguments by reference, make immut alias mode equiv to value
Arguments that can't be safely referenced will be implicitly copied.

(Warnings for expensive copies will be forthcoming.)

This will allow us to get rid of most of the ampersands in function
signatures. See [1].

[1] https://mail.mozilla.org/pipermail/rust-dev/2011-September/000759.html
2011-09-12 11:06:54 +02:00
Brian Anderson 5c49e4f4e9 Reformat. Issue #855 2011-09-02 22:11:42 -07:00
Brian Anderson 418d09e547 Convert all uses of #ifmt to #fmt. Issue #855 2011-09-01 18:54:03 -07:00
Brian Anderson fc45eb785a Use #env to get the rustc version again. Issue #855 2011-09-01 17:49:39 -07:00
Brian Anderson ab6bb035e5 Rename std::istr to std::str. Issue #855 2011-09-01 17:27:58 -07:00
Brian Anderson e824775d53 Remove std::str. Issue #855 2011-09-01 16:09:15 -07:00
Brian Anderson ad3dcc0689 Remove the last use of istr::to_estr from rustc. Issue #855 2011-09-01 13:21:29 -07:00
Brian Anderson bb56a75343 Convert main functions to istrs. Issue #855 2011-09-01 12:14:35 -07:00
Marijn Haverbeke 6ba4eacddf Make resolve recognize upvars
Upvars are now marked with def_upvar throughout, not just when going
through freevars::lookup_def. This makes things less error-prone. One
thing to watch out for is that def_upvar is used in `for each` bodies
too, when they refer to a local outside the body.
2011-09-01 16:32:44 +02:00
Marijn Haverbeke 2d1dec78e7 Move mutability checking into its own pass.
Having it in the alias pass was slightly more efficient (finding
expression roots has to be done in both passes), but further muddled
up the already complex alias checker.

Also factors out some duplication in the mutability-checking code.
2011-09-01 16:32:38 +02:00
Brian Anderson 498e38b705 Convert uses of #fmt to #ifmt. Issue #855 2011-08-31 11:44:06 -07:00
Brian Anderson eb70267e5e Convert #env to istrs. Temporarily disable usage in rustc. Issue #855 2011-08-30 21:08:07 -07:00
Brian Anderson 5f57a508af Convert misc compiler bits to istrs. Issue #855 2011-08-27 18:05:59 -07:00
Brian Anderson cffd9b8044 Convert rustc driver to istrs. Issue #855 2011-08-27 17:47:06 -07:00