Brian Anderson
9fe22a4ab7
Mark -g as experimental ( #2767 )
2012-07-02 17:22:49 -07:00
Brian Anderson
569467eb0d
Merge remote-tracking branch 'Dretch/prettydocs'
...
Conflicts:
src/compiletest/errors.rs
src/libsyntax/parse/attr.rs
src/libsyntax/parse/comments.rs
src/test/compile-fail/ambig_impl_unify.rs
src/test/compile-fail/assign-super.rs
src/test/compile-fail/bad-for-loop.rs
src/test/compile-fail/bad-var-env-capture-in-block-arg.rs
src/test/compile-fail/block-arg-as-stmt-with-value.rs
src/test/compile-fail/borrowck-assign-comp-idx.rs
src/test/compile-fail/borrowck-lend-flow.rs
src/test/compile-fail/borrowck-loan-blocks-move-cc.rs
src/test/compile-fail/borrowck-loan-blocks-mut-uniq.rs
src/test/compile-fail/borrowck-loan-rcvr.rs
src/test/compile-fail/borrowck-loan-vec-content.rs
src/test/compile-fail/borrowck-mut-vec-as-imm-slice-bad.rs
src/test/compile-fail/cap-clause-with-stack-closure.rs
src/test/compile-fail/do1.rs
src/test/compile-fail/do2.rs
src/test/compile-fail/empty-vec-trailing-comma.rs
src/test/compile-fail/evec-subtyping.rs
src/test/compile-fail/issue-1896.rs
src/test/compile-fail/issue-2149.rs
src/test/compile-fail/issue-2150.rs
src/test/compile-fail/issue-2487-b.rs
src/test/compile-fail/kindck-implicit-close-over-mut-var.rs
src/test/compile-fail/liveness-issue-2163.rs
src/test/compile-fail/liveness-use-in-index-lvalue.rs
src/test/compile-fail/no-reuse-move-arc.rs
src/test/compile-fail/no-send-res-ports.rs
src/test/compile-fail/non-const.rs
src/test/compile-fail/pure-higher-order.rs
src/test/compile-fail/pure-loop-body.rs
src/test/compile-fail/regions-addr-of-upvar-self.rs
src/test/compile-fail/regions-escape-loop-via-vec.rs
src/test/compile-fail/regions-scoping.rs
src/test/compile-fail/seq-args.rs
src/test/compile-fail/tstate-unsat-in-called-fn-expr.rs
src/test/compile-fail/tstate-unsat-in-fn-expr.rs
src/test/compile-fail/vec-add.rs
src/test/compile-fail/vec-concat-bug.rs
src/test/compile-fail/vector-no-ann.rs
2012-07-02 15:23:41 -07:00
Brian Anderson
d1fc2b5995
Convert to new closure syntax
2012-07-01 19:19:32 -07:00
Brian Anderson
a3382b6f26
Eliminate usages of old sugared call syntax
2012-06-30 16:01:49 -07:00
Gareth Daniel Smith
0b653ab953
initial draft of fix for issue #2498 :
...
1. make /// ... and //! ... and /** ... */ and /*! ... */ into sugar for #[doc = ...] attributes.
2. add a script in etc/ to help converting doc-attributes to doc-comments
3. add some functions to core::str to help with (1)
2012-06-30 11:54:54 +01:00
Michael Sullivan
98e161f00e
Switch the compiler over to using ~[] notation instead of []/~. Closes #2759 .
2012-06-29 17:41:45 -07:00
Eric Holk
c9e8b7de82
Merge branch 'master' of github.com:mozilla/rust into incoming
2012-06-28 17:30:36 -07:00
Michael Sullivan
d91e310982
Don't use literal info from the original source when pretty printing expanded ASTs.
2012-06-28 15:33:15 -07:00
Eric Holk
87eaf91be3
Replaced almost all vector+ in rustc ( #2719 )
...
Didn't update shape because the changes were causing segfaults.
2012-06-28 15:11:09 -07:00
Michael Sullivan
329eca6044
Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725 .
2012-06-25 20:00:46 -07:00
Tim Chevalier
21399dca12
Change resources to classes in libstd and rustc
2012-06-22 11:53:25 -07:00
Graydon Hoare
312faf31df
Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.
2012-06-21 16:44:10 -07:00
Brian Anderson
4dcf84e4f4
Remove bind. Issue #2189
2012-06-20 17:27:28 -07:00
Brian Anderson
636a849bf2
rustc: Add a temporary option to not link to the runtime
2012-06-19 12:36:59 -07:00
Niko Matsakis
982e1166b2
Issue #2633 : remove last_use entries that are subject to a loan
2012-06-17 16:17:40 -07:00
Paul Stansifer
1e36d216be
Add the interner to parse_sess.
2012-06-15 12:41:41 -07:00
Tim Chevalier
1642df8efa
Remove a workaround
2012-06-14 12:40:49 -07:00
Brian Anderson
ce750a7dbc
Box AST idents
2012-06-13 11:30:45 -07:00
Niko Matsakis
013fc92423
remove alias analysis and replace with borrowck
...
This reverts commit 7ef825bb60
.
2012-06-08 20:39:11 -07:00
Brian Anderson
7ef825bb60
Revert "remove alias analysis and replace with borrowck"
...
18s perf regression compiling rustc with opts
This reverts commit 7f6ee0ce0d
.
2012-06-07 19:42:27 -07:00
Niko Matsakis
7f6ee0ce0d
remove alias analysis and replace with borrowck
...
cc #2540
2012-06-07 16:46:57 -07:00
Brian Anderson
469ff08e64
rustc: Enable #[cfg(windows)] and #[cfg(unix)]
2012-06-06 23:39:09 -07:00
Brian Anderson
eed3a36511
rustc: Add 'target_family' to default configuration
2012-06-06 23:39:09 -07:00
Tim Chevalier
a6c92f0a17
Revert "Revert "Merge pull request #2516 from mozilla/incoming" due to failures"
...
This reverts commit 9fae95860de510f6874810cf43efb83f101246ef.
2012-06-06 15:08:24 -07:00
Michael Sullivan
6396e2c3c3
Make vecs implicitly copyable for all of our projects.
2012-06-04 19:53:30 -07:00
Michael Sullivan
5a4e53487f
Heavily rework lint infrastructure. Split it into two passes: one that builds the table and one that does the checks. Build the table early and make session know about it fo reasy use.
2012-06-04 16:08:07 -07:00
Michael Sullivan
7213274e57
Make how lint handles unknown warn directives configurable by lint (default to warn). Closes #2480 .
2012-06-04 09:54:03 -07:00
Michael Sullivan
e47962f6a9
Have lint build up a table of the warning settings on a per item basis for later use.
2012-05-31 19:07:24 -07:00
Michael Sullivan
d1a65da835
Time lint in the driver like every other pass, instead of in lint.
2012-05-31 19:07:24 -07:00
Kevin Cantu
7dcbaedd32
Rename librustsyntax to libsyntax
...
Per issue #2418 .
2012-05-31 11:15:00 -07:00
Brian Anderson
736ff34e8a
rustc: Move filesearch into metadata mod
...
It's not that related to metadata, but metadata needs it and it will
probably be useful for doing dynamic loading.
2012-05-29 20:38:49 -07:00
Michael Sullivan
8668d06400
Get rid of many implicit copies as a preliminary to Issue #2448 .
2012-05-25 16:39:35 -07:00
Niko Matsakis
9e6a068034
replace last_use with liveness info
2012-05-25 14:37:30 -07:00
Niko Matsakis
ccd8d5573e
remove dead assignments
2012-05-24 13:35:57 -07:00
Niko Matsakis
30b47649ea
new liveness pass to supercede last_use / initedness
2012-05-24 09:52:03 -07:00
Niko Matsakis
a3be0b1054
fix classes and parameterized ifaces; remove needless self check
...
ref #1726 , #2434
2012-05-24 06:49:40 -07:00
Brian Anderson
c0a36b71be
rustc: Eliminate metadata's dependency on session
2012-05-22 18:07:36 -07:00
Brian Anderson
98b93b6c86
rustc: Eliminate some session deps from metadata::loader
2012-05-22 18:07:36 -07:00
Brian Anderson
99c1b2953d
syntax: Add diagnostic::expect
2012-05-22 18:07:36 -07:00
Brian Anderson
9aa18c2852
rustc: Move ast_map to the syntax crate
2012-05-21 23:39:27 -07:00
Brian Anderson
df532e7f1b
rustc: Remove ast_map's session dependency
2012-05-21 23:22:06 -07:00
Niko Matsakis
253979236e
print ids of patterns when doing --pretty identified
2012-05-18 19:07:20 -07:00
Niko Matsakis
f1a46914c4
add a new debugging aid--tracing
2012-05-18 19:07:19 -07:00
Niko Matsakis
5be8bf1de7
use -Z to distinguish internal debugging options
2012-05-18 10:38:18 -07:00
Tim Chevalier
55c008874d
Comments only: annotate FIXMEs in back-end and driver
2012-05-17 11:20:14 -07:00
Brian Anderson
0e21a05e6c
rustc: Extract loader mod from creader mod
...
loader is a utility for locating crates and loading their metadata.
creader is a compiler pass that loads metadata for all used libraries.
2012-05-15 21:36:16 -07:00
Niko Matsakis
ab735320b4
move regionck into typeck, in the process fixing a bug or two
2012-05-15 19:05:03 -07:00
Niko Matsakis
adb61e3e99
get preservation of boxes working, at least in simple cases
2012-05-15 13:38:16 -07:00
Niko Matsakis
be48cd87dc
make poison-on-free work, disable copying if borrowck is enabled
2012-05-15 11:49:08 -07:00
Tim Chevalier
89cd2f6bd0
Enforce that self doesn't escape from a class
...
Closes #2294
2012-05-14 14:26:10 -07:00
Brian Anderson
1f52652a06
rustc: Eliminate some indirection to the syntax crate
2012-05-13 17:33:29 -07:00
Niko Matsakis
b4d1f1b2c1
replace mutbl pass with borrowck
2012-05-10 21:14:43 -07:00
Graydon Hoare
c23d6a50d7
Preliminary groundwork for intrinsic module, reflection interface.
2012-05-10 17:18:04 -07:00
Brian Anderson
fa6c18e014
rustc: Refactor driver to better understand string sources
2012-05-09 23:40:50 -07:00
Niko Matsakis
50a3dd40ae
implement new borrow ck (disabled by default)
2012-05-09 17:00:19 -07:00
Brian Anderson
d41af13334
rustc: Extract session::basic_options from rustdoc
2012-05-08 22:33:45 -07:00
Tim Chevalier
85fbfa25d7
Revert "Eliminate a copy in syntax::parse::new_parser_from_file"
...
This reverts commit 2bb3b63ec4
.
(I was confused.)
2012-04-30 11:52:07 -07:00
Tim Chevalier
2bb3b63ec4
Eliminate a copy in syntax::parse::new_parser_from_file
...
Fixing a FIXME turned out to be pretty involved. I added an io function
that returns a unique boxed string (for the contents of a file) rather than
a string, and went from there. Also made the src field of codemap a unique
boxed string. This doesn't seem to make that much difference in amount of
allocation according to valgrind (disappointingly), but I also had to introduce
a copy somewhere else pending a new snapshot, so maybe that's it.
2012-04-30 10:44:31 -07:00
Brian Anderson
dc117fecde
rustc: Use a slightly more consistent style for unexpected errors
2012-04-28 16:38:06 -07:00
Graydon Hoare
61575582ba
Describe warnings on command line if user says -W help.
2012-04-26 14:43:43 -07:00
Marijn Haverbeke
9f99c3263b
Rewrite exhaustiveness checker
...
Issue #2111
2012-04-25 09:15:17 +02:00
Brian Anderson
9a8a04629e
syntax: Put the main parser interface in mod parse
2012-04-18 10:50:50 -07:00
Niko Matsakis
4c26d70a0a
new debug flag, new test
2012-04-17 12:02:36 -07:00
Brian Anderson
4f576275be
syntax: Cleanup attr module. Closes #1545
2012-04-15 01:43:38 -07:00
Niko Matsakis
d2482fd763
use find not echo; this also brings fuzzer under the iron fist of tidy.py!
2012-04-13 11:59:17 -07:00
Graydon Hoare
8a7fd4a04f
Support general warnings and errors in lint pass via flags and attrs. Close #1543 .
2012-04-12 17:31:49 -07:00
Marijn Haverbeke
c902eafa14
Convert old-style for loops to new-style
...
Most could use the each method, but because of the hack used to
disambiguate old- and new-style loops, some had to use vec::each.
(This hack will go away soon.)
Issue #1619
2012-04-06 20:38:23 +02:00
Brian Anderson
d13c0c77a2
Explicitly use version 0.2 of crates
2012-04-05 20:29:42 -07:00
Brian Anderson
9aa7241f05
rustc: Don't allow recursive constants
2012-04-04 16:12:57 -07:00
Brian Anderson
38ed2ea096
rustc: Allow consts to refer to other consts
2012-04-04 15:03:39 -07:00
Brian Anderson
0e87039348
rustc: Remove the rustsyntax::attr wrapper in front
2012-03-29 14:42:31 -07:00
Brian Anderson
cb2840bcaf
rustc: Add an accessor to get the diagnostic handler from the session
2012-03-29 14:42:30 -07:00
Brian Anderson
8f809f89d9
rustc: Move diagnostic to rustsyntax
2012-03-29 14:42:30 -07:00
Brian Anderson
ba3292d3be
rust: Remove extensions' dependency on the session
2012-03-27 14:16:46 -07:00
Marijn Haverbeke
f6e3738b9c
Support an alternate for syntax that calls a higher-order function
...
The last argument of the call must be a block, and the type of this
argument must a function returning bool. `break` and `cont` are
supported in the body of the block, and return `false` or `true` from
the function. When the end of the function is reached, `true` is
implicitly returned.
for vec::all([1, 2, 3]) {|elt|
if elt == 2 { break; }
log(error, elt);
}
Issue #1619
2012-03-27 09:27:31 +02:00
Graydon Hoare
6e6798c4e1
Bulk-edit mutable -> mut.
2012-03-26 18:35:18 -07:00
Marijn Haverbeke
87e097a853
Disallow ret inside of block functions
...
Also adds proper checking for cont/break being inside a loop.
Closes #1854
Issue #1619
2012-03-26 12:45:47 +02:00
Marijn Haverbeke
84019aa0dc
Keep an explicit map of things that have to be spilled
...
This prevents us from spilling locals more than once.
Closes #2040
2012-03-23 16:08:01 +01:00
Graydon Hoare
b224bcf6e1
Add an LLVM-instruction-counting mode to trans.
...
Pipe to xdu to see a trans call graph of generated insns.
2012-03-22 13:44:20 -07:00
Niko Matsakis
dc07280b08
make --enforce-mut-vars always on, add mut annotations to remaining files
2012-03-22 09:58:19 -07:00
Niko Matsakis
b653a18416
add mut decls to rustc and make them mandatory
2012-03-21 21:04:14 -07:00
Josh Matthews
8142438938
Avoid mangling names differently in debug builds to work around a build error. Fix up file name and path debug information, and build one compilation unit for a crate instead of one per source file.
2012-03-21 18:56:36 -04:00
Tim Chevalier
b06dc884e5
Class methods WIP
...
In particular, use the ast::method type to represent a class method,
and try to reuse as much iface code as possible. (This makes sense now
since I'll be allowing polymorphic class methods.)
2012-03-20 17:07:07 -07:00
Marijn Haverbeke
7a34ac5890
Revert order of arguments to option::maybe and from_maybe
...
Closes #2019
2012-03-20 14:55:07 +01:00
Damien Grassart
38ac87f0ff
rustc: Fix typo in error message
2012-03-18 04:45:03 +01:00
Marijn Haverbeke
83c9f58534
Rename dict to vtable throughout the compiler
...
The difference went away.
2012-03-15 09:28:50 +01:00
Marijn Haverbeke
0e5da379dd
Turn on monomorphization by default
2012-03-15 08:59:29 +01:00
Marijn Haverbeke
de79caa97e
Add crude support for casts in constant expressions
...
Only casts to integral and float types are supported
Closes #1975
2012-03-14 18:05:28 +01:00
Niko Matsakis
d91742294f
first (functional) version of the auto_serialize syntax ext
2012-03-13 21:30:07 -04:00
Graydon Hoare
6f5853f5a1
Libc/os/run/rand/io reorganization. Close #1373 . Close #1638 .
...
- Move io, run and rand to core.
- Remove incorrect ctypes module (use libc).
- Remove os-specific modules for os and fs.
- Split fs between core::path and core::os.
2012-03-12 20:08:29 -07:00
Patrick Walton
e968672ac7
rustc: Map local variables to their containing blocks so we know their regions
2012-03-11 12:05:17 -07:00
Patrick Walton
e8c7b5347d
rustc: Add a region checking pass
...
Errors aren't reported yet, because the regions aren't properly inferred from the & operator at the moment and that would break the tests.
2012-03-09 17:39:32 -08:00
Patrick Walton
4ffcb95974
rustc: Perform region inference
2012-03-09 16:40:37 -08:00
Marijn Haverbeke
fd465f91a8
Drop collect_items pass, create decls on demand
...
This solves a problem with inlined functions that have inner functions.
2012-03-08 21:17:32 +01:00
Niko Matsakis
712dd23541
make inline enabled by default
2012-03-06 09:01:40 -08:00
Marijn Haverbeke
19508c7d53
Make trans pass responsible for pulling in inlined functions
...
This makes the logic for finding the inlinable items much easier --
they are simply pulled in lazily when encountered.
2012-03-06 14:00:21 +01:00
Brian Anderson
602015f902
rustc: Use consistent casing for names of timed passes
2012-03-05 17:44:11 -08:00
Brian Anderson
0ee96de4ee
rustc: Lower case error messages
2012-03-05 17:05:20 -08:00
Erick Tryzelaar
3cb2cd1f71
comp/fuzzer: rewrite to use io::with_str_reader.
2012-03-02 19:15:35 -08:00
Erick Tryzelaar
f630ebdb6a
comp/std: rename io::string_reader to io::str_reader.
2012-03-02 19:15:35 -08:00