* Reorganized typestate into several modules.
* Made typestate check that any function with a non-nil return type
returns a value. For now, the check is a warning and not an error
(see next item).
* Added a "bot" type (prettyprinted as _|_), for constructs like be, ret, break, cont, and
fail that don't locally return a value that can be inspected. "bot"
is distinct from "nil". There is no concrete syntax for _|_, while
the concrete syntax for the nil type is ().
* Added support to the parser for a ! annotation on functions whose
result type is _|_. Such a function is required to have either a
fail or a call to another ! function that is reached in all control
flow paths. The point of this annotation is to mark functions like
unimpl() and span_err(), so that an alt with a call to err() in one
case isn't a false positive for the return-value checker. I haven't
actually annotated anything with it yet.
* Random bugfixes:
* * Fixed bug in trans::trans_binary that was throwing away the
cleanups for nested subexpressions of an and or or
(tests: box-inside-if and box-inside-if2).
** In typeck, unify the expected type arguments of a tag with the
actual specified arguments.
102 lines
1.7 KiB
Rust
102 lines
1.7 KiB
Rust
|
|
// -*- rust -*-
|
|
|
|
meta (name = "rustc",
|
|
desc = "The Rust compiler",
|
|
uuid = "0ce89b41-2f92-459e-bbc1-8f5fe32f16cf",
|
|
url = "http://rust-lang.org/src/rustc",
|
|
ver = "0.0.1");
|
|
|
|
use std;
|
|
|
|
mod middle {
|
|
mod type_glue;
|
|
mod trans;
|
|
mod ty;
|
|
mod fold;
|
|
mod walk;
|
|
mod metadata;
|
|
mod resolve;
|
|
mod typeck;
|
|
|
|
mod tstate {
|
|
mod ck;
|
|
mod annotate;
|
|
mod aux;
|
|
mod bitvectors;
|
|
mod collect_locals;
|
|
mod pre_post_conditions;
|
|
mod states;
|
|
mod ann;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
mod pretty {
|
|
mod pprust;
|
|
mod pp;
|
|
}
|
|
|
|
mod front {
|
|
mod ast;
|
|
mod creader;
|
|
mod extfmt;
|
|
mod extenv;
|
|
mod codemap;
|
|
mod lexer;
|
|
mod parser;
|
|
mod token;
|
|
mod eval;
|
|
}
|
|
|
|
mod back {
|
|
mod link;
|
|
mod abi;
|
|
mod upcall;
|
|
mod x86;
|
|
}
|
|
|
|
mod driver {
|
|
mod rustc;
|
|
mod session;
|
|
}
|
|
|
|
mod util {
|
|
mod common;
|
|
mod interner;
|
|
}
|
|
|
|
auth front::creader::load_crate = unsafe;
|
|
auth front::creader::get_metadata_section = unsafe;
|
|
auth middle::metadata = unsafe;
|
|
auth middle::trans = unsafe;
|
|
auth lib::llvm = unsafe;
|
|
|
|
mod lib {
|
|
alt (target_os) {
|
|
case ("win32") {
|
|
let (llvm_lib = "rustllvm.dll") {
|
|
mod llvm;
|
|
}
|
|
}
|
|
case ("macos") {
|
|
let (llvm_lib = "librustllvm.dylib") {
|
|
mod llvm;
|
|
}
|
|
}
|
|
case (_) {
|
|
let (llvm_lib = "librustllvm.so") {
|
|
mod llvm;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Local Variables:
|
|
// fill-column: 78;
|
|
// indent-tabs-mode: nil
|
|
// c-basic-offset: 4
|
|
// buffer-file-coding-system: utf-8-unix
|
|
// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
|
|
// End:
|