2010-06-23 23:03:09 -05:00
|
|
|
// -*- rust -*-
|
|
|
|
|
2011-06-30 00:35:49 -05:00
|
|
|
#[link(name = "rustc",
|
2012-03-22 17:25:02 -05:00
|
|
|
vers = "0.2",
|
2011-06-30 00:35:49 -05:00
|
|
|
uuid = "0ce89b41-2f92-459e-bbc1-8f5fe32f16cf",
|
2012-03-28 15:42:17 -05:00
|
|
|
url = "https://github.com/mozilla/rust/tree/master/src/rustc")];
|
2011-06-30 00:35:49 -05:00
|
|
|
|
2012-01-23 18:25:15 -06:00
|
|
|
#[comment = "The Rust compiler"];
|
2012-01-08 18:21:43 -06:00
|
|
|
#[license = "MIT"];
|
2012-01-17 16:40:59 -06:00
|
|
|
#[crate_type = "lib"];
|
2011-05-05 21:44:00 -05:00
|
|
|
|
2012-04-05 19:30:26 -05:00
|
|
|
#[no_core];
|
2010-06-23 23:03:09 -05:00
|
|
|
|
2012-06-04 20:34:24 -05:00
|
|
|
#[warn(no_vecs_not_implicitly_copyable)];
|
|
|
|
|
2012-04-05 19:30:26 -05:00
|
|
|
use core(vers = "0.2");
|
|
|
|
use std(vers = "0.2");
|
2012-05-29 23:35:12 -05:00
|
|
|
use syntax(vers = "0.2");
|
2012-04-05 19:30:26 -05:00
|
|
|
|
|
|
|
import core::*;
|
2012-03-22 17:27:35 -05:00
|
|
|
|
2012-05-13 17:56:45 -05:00
|
|
|
/*
|
|
|
|
Alternate names for some modules.
|
|
|
|
|
|
|
|
I am using this to help extract metadata into its own crate. In metadata.rs
|
|
|
|
it redefines all these modules in order to gate access from metadata to the
|
|
|
|
rest of the compiler, then uses these to access the original implementation.
|
|
|
|
*/
|
|
|
|
import util_ = util;
|
|
|
|
import lib_ = lib;
|
|
|
|
import driver_ = driver;
|
|
|
|
import middle_ = middle;
|
2012-05-13 19:01:52 -05:00
|
|
|
import back_ = back;
|
2012-05-13 17:56:45 -05:00
|
|
|
|
2011-04-19 18:40:46 -05:00
|
|
|
mod middle {
|
2012-01-27 06:17:06 -06:00
|
|
|
mod trans {
|
|
|
|
mod common;
|
2012-02-21 08:22:55 -06:00
|
|
|
mod type_of;
|
2012-01-27 06:17:06 -06:00
|
|
|
mod build;
|
|
|
|
mod base;
|
|
|
|
mod alt;
|
|
|
|
mod uniq;
|
|
|
|
mod closure;
|
|
|
|
mod tvec;
|
|
|
|
mod impl;
|
2012-06-26 18:18:37 -05:00
|
|
|
mod foreign;
|
2012-05-14 19:57:39 -05:00
|
|
|
mod reflect;
|
2012-02-14 22:12:47 -06:00
|
|
|
mod shape;
|
2012-02-17 15:51:19 -06:00
|
|
|
mod debuginfo;
|
2012-03-12 10:31:22 -05:00
|
|
|
mod type_use;
|
2012-03-20 06:28:46 -05:00
|
|
|
mod reachable;
|
2012-01-27 06:17:06 -06:00
|
|
|
}
|
2011-04-19 18:40:46 -05:00
|
|
|
mod ty;
|
|
|
|
mod resolve;
|
2012-05-15 10:29:22 -05:00
|
|
|
mod typeck {
|
2012-05-16 08:38:43 -05:00
|
|
|
mod check {
|
|
|
|
mod alt;
|
2012-05-16 10:01:41 -05:00
|
|
|
mod vtable;
|
|
|
|
mod writeback;
|
2012-05-16 10:51:16 -05:00
|
|
|
mod regionmanip;
|
2012-05-16 10:01:41 -05:00
|
|
|
mod regionck;
|
|
|
|
mod demand;
|
2012-05-16 10:51:16 -05:00
|
|
|
mod method;
|
2012-05-16 08:38:43 -05:00
|
|
|
}
|
2012-05-18 15:49:33 -05:00
|
|
|
mod rscope;
|
2012-05-15 10:29:22 -05:00
|
|
|
mod astconv;
|
2012-05-16 10:01:41 -05:00
|
|
|
mod infer;
|
2012-05-15 10:29:22 -05:00
|
|
|
mod collect;
|
|
|
|
}
|
2012-03-26 05:39:20 -05:00
|
|
|
mod check_loop;
|
2011-07-25 06:45:09 -05:00
|
|
|
mod check_alt;
|
2011-11-08 20:26:02 -06:00
|
|
|
mod check_const;
|
2012-01-19 02:50:51 -06:00
|
|
|
mod lint;
|
2012-06-01 12:46:17 -05:00
|
|
|
mod borrowck {
|
|
|
|
mod check_loans;
|
|
|
|
mod gather_loans;
|
|
|
|
mod categorization;
|
|
|
|
mod loan;
|
|
|
|
mod preserve;
|
|
|
|
}
|
2012-05-19 07:52:01 -05:00
|
|
|
mod liveness;
|
2011-11-21 03:56:00 -06:00
|
|
|
mod block_use;
|
2011-07-27 19:49:00 -05:00
|
|
|
mod kind;
|
2011-07-18 19:26:37 -05:00
|
|
|
mod freevars;
|
2011-12-19 14:50:31 -06:00
|
|
|
mod capture;
|
2012-01-14 18:05:07 -06:00
|
|
|
mod pat_util;
|
2012-03-09 18:39:54 -06:00
|
|
|
mod region;
|
2012-03-22 16:56:56 -05:00
|
|
|
mod const_eval;
|
2012-05-14 18:15:11 -05:00
|
|
|
mod astencode;
|
2011-05-16 21:21:29 -05:00
|
|
|
|
2011-05-14 21:02:30 -05:00
|
|
|
mod tstate {
|
|
|
|
mod ck;
|
|
|
|
mod annotate;
|
2011-11-21 22:31:09 -06:00
|
|
|
#[path = "auxiliary.rs"]
|
|
|
|
mod aux;
|
2011-05-14 21:02:30 -05:00
|
|
|
mod bitvectors;
|
|
|
|
mod collect_locals;
|
|
|
|
mod pre_post_conditions;
|
|
|
|
mod states;
|
|
|
|
mod ann;
|
Compute typestate properly for move
typestate now drops constraints correctly in the post-state of
a move expression or a declaration whose op is a move. It doesn't
yet drop constraints mentioning variables that get updated.
To do this, I had to change typestate to use trit-vectors instead
of bit-vectors, because for every constraint, there are three
possible values: known-to-be-false (e.g. after x <- y, init(y) is
known-to-be-false), known-to-be-true, and unknown. Before, we
conflated known-to-be-false with unknown. But move requires them
to be treated differently. Consider:
(program a)
(a1) x = 1;
(a2) y <- x;
(a3) log x;
(program b)
(b1) x = 1;
(b2) y <- z;
(b3) log x;
With only two values, the postcondition of statement a2 for
constraint init(x) is the same as that of b2: 0. But in (a2)'s
postcondition, init(x) *must* be false, but in (b2)'s condition,
it's just whatever it was in the postcondition of the preceding statement.
2011-06-22 23:26:34 -05:00
|
|
|
mod tritv;
|
2011-05-14 21:02:30 -05:00
|
|
|
}
|
2011-04-19 18:40:46 -05:00
|
|
|
}
|
|
|
|
|
2010-09-23 17:46:31 -05:00
|
|
|
mod front {
|
2011-06-30 00:32:08 -05:00
|
|
|
mod config;
|
2011-07-06 16:29:50 -05:00
|
|
|
mod test;
|
2012-01-26 17:20:29 -06:00
|
|
|
mod core_inject;
|
2012-05-10 19:18:04 -05:00
|
|
|
mod intrinsic_inject;
|
2010-06-23 23:03:09 -05:00
|
|
|
}
|
|
|
|
|
2010-09-23 17:46:31 -05:00
|
|
|
mod back {
|
2011-05-13 15:47:37 -05:00
|
|
|
mod link;
|
2010-09-23 17:46:31 -05:00
|
|
|
mod abi;
|
2011-05-09 17:32:12 -05:00
|
|
|
mod upcall;
|
2010-09-23 17:46:31 -05:00
|
|
|
mod x86;
|
2011-10-13 14:23:50 -05:00
|
|
|
mod x86_64;
|
2011-10-04 17:23:32 -05:00
|
|
|
mod rpath;
|
2011-10-12 14:29:08 -05:00
|
|
|
mod target_strs;
|
2010-09-23 17:46:31 -05:00
|
|
|
}
|
|
|
|
|
2011-06-27 16:18:32 -05:00
|
|
|
mod metadata {
|
2011-06-27 18:38:57 -05:00
|
|
|
export encoder;
|
|
|
|
export creader;
|
2011-07-07 20:00:16 -05:00
|
|
|
export cstore;
|
2011-07-08 00:18:38 -05:00
|
|
|
export csearch;
|
2012-05-14 18:15:11 -05:00
|
|
|
export common;
|
|
|
|
export decoder;
|
|
|
|
export tyencode;
|
|
|
|
export tydecode;
|
2012-05-15 22:23:06 -05:00
|
|
|
export loader;
|
2012-05-29 22:38:46 -05:00
|
|
|
export filesearch;
|
2011-06-27 18:38:57 -05:00
|
|
|
|
2011-07-07 14:22:39 -05:00
|
|
|
mod common;
|
2011-06-27 16:37:02 -05:00
|
|
|
mod tyencode;
|
2011-06-27 17:30:17 -05:00
|
|
|
mod tydecode;
|
2011-06-27 17:20:17 -05:00
|
|
|
mod encoder;
|
2011-06-27 17:53:27 -05:00
|
|
|
mod decoder;
|
2011-06-27 16:18:32 -05:00
|
|
|
mod creader;
|
2011-07-07 20:00:16 -05:00
|
|
|
mod cstore;
|
2011-07-08 00:18:38 -05:00
|
|
|
mod csearch;
|
2012-05-15 22:23:06 -05:00
|
|
|
mod loader;
|
2012-05-29 22:38:46 -05:00
|
|
|
mod filesearch;
|
2011-06-27 16:18:32 -05:00
|
|
|
}
|
|
|
|
|
2010-06-23 23:03:09 -05:00
|
|
|
mod driver {
|
2011-12-20 04:17:13 -06:00
|
|
|
mod driver;
|
2010-09-01 15:24:14 -05:00
|
|
|
mod session;
|
2010-06-23 23:03:09 -05:00
|
|
|
}
|
|
|
|
|
2010-08-18 13:34:47 -05:00
|
|
|
mod util {
|
|
|
|
mod common;
|
2011-07-05 04:48:19 -05:00
|
|
|
mod ppaux;
|
2010-08-18 13:34:47 -05:00
|
|
|
}
|
|
|
|
|
2010-07-12 19:47:40 -05:00
|
|
|
mod lib {
|
2011-06-20 16:59:45 -05:00
|
|
|
mod llvm;
|
2010-07-12 19:47:40 -05:00
|
|
|
}
|
|
|
|
|
2010-06-23 23:03:09 -05:00
|
|
|
// Local Variables:
|
|
|
|
// fill-column: 78;
|
|
|
|
// indent-tabs-mode: nil
|
2010-08-18 13:34:22 -05:00
|
|
|
// c-basic-offset: 4
|
2010-06-23 23:03:09 -05:00
|
|
|
// buffer-file-coding-system: utf-8-unix
|
|
|
|
// End:
|