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
Graydon Hoare
87c14f1e3d
Move src/comp to src/rustc
2012-03-02 18:46:13 -08:00