mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
rustc: "import" -> "use"
This commit is contained in:
parent
8ff18acc82
commit
a26837c478
@ -1,21 +1,21 @@
|
||||
import libc::{c_int, c_uint, c_char};
|
||||
import driver::session;
|
||||
import session::session;
|
||||
import lib::llvm::llvm;
|
||||
import syntax::attr;
|
||||
import middle::ty;
|
||||
import metadata::{encoder, cstore};
|
||||
import middle::trans::common::crate_ctxt;
|
||||
import metadata::common::link_meta;
|
||||
import std::map::hashmap;
|
||||
import std::sha1::sha1;
|
||||
import syntax::ast;
|
||||
import syntax::print::pprust;
|
||||
import lib::llvm::{ModuleRef, mk_pass_manager, mk_target_data, True, False,
|
||||
use libc::{c_int, c_uint, c_char};
|
||||
use driver::session;
|
||||
use session::session;
|
||||
use lib::llvm::llvm;
|
||||
use syntax::attr;
|
||||
use middle::ty;
|
||||
use metadata::{encoder, cstore};
|
||||
use middle::trans::common::crate_ctxt;
|
||||
use metadata::common::link_meta;
|
||||
use std::map::hashmap;
|
||||
use std::sha1::sha1;
|
||||
use syntax::ast;
|
||||
use syntax::print::pprust;
|
||||
use lib::llvm::{ModuleRef, mk_pass_manager, mk_target_data, True, False,
|
||||
PassManagerRef, FileType};
|
||||
import metadata::filesearch;
|
||||
import syntax::ast_map::{path, path_mod, path_name};
|
||||
import io::{Writer, WriterUtil};
|
||||
use metadata::filesearch;
|
||||
use syntax::ast_map::{path, path_mod, path_name};
|
||||
use io::{Writer, WriterUtil};
|
||||
|
||||
enum output_type {
|
||||
output_type_none,
|
||||
|
@ -1,8 +1,8 @@
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import metadata::cstore;
|
||||
import driver::session;
|
||||
import metadata::filesearch;
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
use metadata::cstore;
|
||||
use driver::session;
|
||||
use metadata::filesearch;
|
||||
|
||||
export get_rpath_flags;
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
|
||||
import driver::session;
|
||||
import middle::trans::base;
|
||||
import middle::trans::common::{T_fn, T_i1, T_i8, T_i32,
|
||||
use driver::session;
|
||||
use middle::trans::base;
|
||||
use middle::trans::common::{T_fn, T_i1, T_i8, T_i32,
|
||||
T_int, T_nil,
|
||||
T_opaque_vec, T_ptr, T_unique_ptr,
|
||||
T_size_t, T_void, T_vec2};
|
||||
import lib::llvm::{type_names, ModuleRef, ValueRef, TypeRef};
|
||||
use lib::llvm::{type_names, ModuleRef, ValueRef, TypeRef};
|
||||
|
||||
type upcalls =
|
||||
{_fail: ValueRef,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import driver::session;
|
||||
import session::sess_os_to_meta_os;
|
||||
import metadata::loader::meta_section_name;
|
||||
use driver::session;
|
||||
use session::sess_os_to_meta_os;
|
||||
use metadata::loader::meta_section_name;
|
||||
|
||||
fn get_target_strs(target_os: session::os) -> target_strs::t {
|
||||
return {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import driver::session;
|
||||
import session::sess_os_to_meta_os;
|
||||
import metadata::loader::meta_section_name;
|
||||
use driver::session;
|
||||
use session::sess_os_to_meta_os;
|
||||
use metadata::loader::meta_section_name;
|
||||
|
||||
fn get_target_strs(target_os: session::os) -> target_strs::t {
|
||||
return {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import syntax::diagnostic;
|
||||
use syntax::diagnostic;
|
||||
export diagnostic;
|
||||
|
||||
export driver;
|
||||
|
@ -1,20 +1,20 @@
|
||||
// -*- rust -*-
|
||||
import metadata::{creader, cstore, filesearch};
|
||||
import session::{session, session_, OptLevel, No, Less, Default, Aggressive};
|
||||
import syntax::parse;
|
||||
import syntax::{ast, codemap};
|
||||
import syntax::attr;
|
||||
import middle::{trans, freevars, kind, ty, typeck, lint};
|
||||
import syntax::print::{pp, pprust};
|
||||
import util::ppaux;
|
||||
import back::link;
|
||||
import result::{Ok, Err};
|
||||
import std::getopts;
|
||||
import io::WriterUtil;
|
||||
import getopts::{optopt, optmulti, optflag, optflagopt, opt_present};
|
||||
import back::{x86, x86_64};
|
||||
import std::map::hashmap;
|
||||
import lib::llvm::llvm;
|
||||
use metadata::{creader, cstore, filesearch};
|
||||
use session::{session, session_, OptLevel, No, Less, Default, Aggressive};
|
||||
use syntax::parse;
|
||||
use syntax::{ast, codemap};
|
||||
use syntax::attr;
|
||||
use middle::{trans, freevars, kind, ty, typeck, lint};
|
||||
use syntax::print::{pp, pprust};
|
||||
use util::ppaux;
|
||||
use back::link;
|
||||
use result::{Ok, Err};
|
||||
use std::getopts;
|
||||
use io::WriterUtil;
|
||||
use getopts::{optopt, optmulti, optflag, optflagopt, opt_present};
|
||||
use back::{x86, x86_64};
|
||||
use std::map::hashmap;
|
||||
use lib::llvm::llvm;
|
||||
|
||||
enum pp_mode {ppm_normal, ppm_expanded, ppm_typed, ppm_identified,
|
||||
ppm_expanded_identified }
|
||||
|
@ -6,18 +6,18 @@ use std(vers = "0.4");
|
||||
use rustc(vers = "0.4");
|
||||
use syntax(vers = "0.4");
|
||||
|
||||
import core::*;
|
||||
use core::*;
|
||||
|
||||
// -*- rust -*-
|
||||
import result::{Ok, Err};
|
||||
import std::getopts;
|
||||
import std::map::hashmap;
|
||||
import getopts::{opt_present};
|
||||
import rustc::driver::driver::*;
|
||||
import syntax::codemap;
|
||||
import syntax::diagnostic;
|
||||
import rustc::driver::session;
|
||||
import rustc::middle::lint;
|
||||
use result::{Ok, Err};
|
||||
use std::getopts;
|
||||
use std::map::hashmap;
|
||||
use getopts::{opt_present};
|
||||
use rustc::driver::driver::*;
|
||||
use syntax::codemap;
|
||||
use syntax::diagnostic;
|
||||
use rustc::driver::session;
|
||||
use rustc::middle::lint;
|
||||
|
||||
fn version(argv0: ~str) {
|
||||
let mut vers = ~"unknown version";
|
||||
|
@ -1,13 +1,13 @@
|
||||
|
||||
import syntax::{ast, codemap};
|
||||
import syntax::ast::node_id;
|
||||
import codemap::span;
|
||||
import syntax::ast::{int_ty, uint_ty, float_ty};
|
||||
import syntax::parse::parse_sess;
|
||||
import metadata::filesearch;
|
||||
import back::target_strs;
|
||||
import back::link;
|
||||
import middle::lint;
|
||||
use syntax::{ast, codemap};
|
||||
use syntax::ast::node_id;
|
||||
use codemap::span;
|
||||
use syntax::ast::{int_ty, uint_ty, float_ty};
|
||||
use syntax::parse::parse_sess;
|
||||
use metadata::filesearch;
|
||||
use back::target_strs;
|
||||
use back::link;
|
||||
use middle::lint;
|
||||
|
||||
|
||||
enum os { os_win32, os_macos, os_linux, os_freebsd, }
|
||||
|
@ -1,4 +1,4 @@
|
||||
import syntax::{ast, fold, attr};
|
||||
use syntax::{ast, fold, attr};
|
||||
|
||||
export strip_unconfigured_items;
|
||||
export metas_in_cfg;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import driver::session::session;
|
||||
import syntax::codemap;
|
||||
import syntax::ast;
|
||||
import syntax::ast_util::*;
|
||||
import syntax::attr;
|
||||
use driver::session::session;
|
||||
use syntax::codemap;
|
||||
use syntax::ast;
|
||||
use syntax::ast_util::*;
|
||||
use syntax::attr;
|
||||
|
||||
export maybe_inject_libcore_ref;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import driver::session::session;
|
||||
import syntax::parse;
|
||||
import syntax::ast;
|
||||
use driver::session::session;
|
||||
use syntax::parse;
|
||||
use syntax::ast;
|
||||
|
||||
export inject_intrinsic;
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
// Code that generates a test runner to run all the tests in a crate
|
||||
|
||||
import syntax::{ast, ast_util};
|
||||
import syntax::ast_util::*;
|
||||
use syntax::{ast, ast_util};
|
||||
use syntax::ast_util::*;
|
||||
//import syntax::ast_util::dummy_sp;
|
||||
import syntax::fold;
|
||||
import syntax::print::pprust;
|
||||
import syntax::codemap::span;
|
||||
import driver::session;
|
||||
import session::session;
|
||||
import syntax::attr;
|
||||
import dvec::DVec;
|
||||
use syntax::fold;
|
||||
use syntax::print::pprust;
|
||||
use syntax::codemap::span;
|
||||
use driver::session;
|
||||
use session::session;
|
||||
use syntax::attr;
|
||||
use dvec::DVec;
|
||||
|
||||
export modify_for_testing;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import std::map::hashmap;
|
||||
use std::map::hashmap;
|
||||
|
||||
import libc::{c_char, c_int, c_uint, c_longlong, c_ulonglong};
|
||||
use libc::{c_char, c_int, c_uint, c_longlong, c_ulonglong};
|
||||
|
||||
type Opcode = u32;
|
||||
type Bool = c_uint;
|
||||
|
@ -1,16 +1,16 @@
|
||||
//! Validates all used crates and extern libraries and loads their metadata
|
||||
|
||||
import syntax::diagnostic::span_handler;
|
||||
import syntax::{ast, ast_util};
|
||||
import syntax::attr;
|
||||
import syntax::visit;
|
||||
import syntax::codemap::span;
|
||||
import std::map::{hashmap, int_hash};
|
||||
import syntax::print::pprust;
|
||||
import filesearch::filesearch;
|
||||
import common::*;
|
||||
import dvec::DVec;
|
||||
import syntax::parse::token::ident_interner;
|
||||
use syntax::diagnostic::span_handler;
|
||||
use syntax::{ast, ast_util};
|
||||
use syntax::attr;
|
||||
use syntax::visit;
|
||||
use syntax::codemap::span;
|
||||
use std::map::{hashmap, int_hash};
|
||||
use syntax::print::pprust;
|
||||
use filesearch::filesearch;
|
||||
use common::*;
|
||||
use dvec::DVec;
|
||||
use syntax::parse::token::ident_interner;
|
||||
|
||||
export read_crates;
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
// Searching for information from the cstore
|
||||
|
||||
import std::{ebml};
|
||||
import syntax::ast;
|
||||
import syntax::ast_util;
|
||||
import syntax::ast_map;
|
||||
import middle::ty;
|
||||
import option::{Some, None};
|
||||
import syntax::diagnostic::span_handler;
|
||||
import syntax::diagnostic::expect;
|
||||
import ast_util::dummy_sp;
|
||||
import common::*;
|
||||
import std::map::hashmap;
|
||||
import dvec::DVec;
|
||||
use std::{ebml};
|
||||
use syntax::ast;
|
||||
use syntax::ast_util;
|
||||
use syntax::ast_map;
|
||||
use middle::ty;
|
||||
use option::{Some, None};
|
||||
use syntax::diagnostic::span_handler;
|
||||
use syntax::diagnostic::expect;
|
||||
use ast_util::dummy_sp;
|
||||
use common::*;
|
||||
use std::map::hashmap;
|
||||
use dvec::DVec;
|
||||
|
||||
export class_dtor;
|
||||
export get_symbol;
|
||||
|
@ -1,11 +1,11 @@
|
||||
// The crate store - a central repo for information collected about external
|
||||
// crates and libraries
|
||||
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import syntax::{ast, attr};
|
||||
import syntax::ast_util::new_def_hash;
|
||||
import syntax::parse::token::ident_interner;
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
use syntax::{ast, attr};
|
||||
use syntax::ast_util::new_def_hash;
|
||||
use syntax::parse::token::ident_interner;
|
||||
|
||||
export cstore;
|
||||
export cnum_map;
|
||||
|
@ -1,21 +1,21 @@
|
||||
// Decoding metadata from a single crate's metadata
|
||||
|
||||
import std::{ebml, map};
|
||||
import std::map::{hashmap, str_hash};
|
||||
import io::WriterUtil;
|
||||
import dvec::DVec;
|
||||
import syntax::{ast, ast_util};
|
||||
import syntax::attr;
|
||||
import middle::ty;
|
||||
import syntax::ast_map;
|
||||
import tydecode::{parse_ty_data, parse_def_id, parse_bounds_data,
|
||||
use std::{ebml, map};
|
||||
use std::map::{hashmap, str_hash};
|
||||
use io::WriterUtil;
|
||||
use dvec::DVec;
|
||||
use syntax::{ast, ast_util};
|
||||
use syntax::attr;
|
||||
use middle::ty;
|
||||
use syntax::ast_map;
|
||||
use tydecode::{parse_ty_data, parse_def_id, parse_bounds_data,
|
||||
parse_ident};
|
||||
import syntax::print::pprust;
|
||||
import cmd=cstore::crate_metadata;
|
||||
import util::ppaux::ty_to_str;
|
||||
import syntax::diagnostic::span_handler;
|
||||
import common::*;
|
||||
import syntax::parse::token::ident_interner;
|
||||
use syntax::print::pprust;
|
||||
use cmd=cstore::crate_metadata;
|
||||
use util::ppaux::ty_to_str;
|
||||
use syntax::diagnostic::span_handler;
|
||||
use common::*;
|
||||
use syntax::parse::token::ident_interner;
|
||||
|
||||
|
||||
export class_dtor;
|
||||
|
@ -1,26 +1,26 @@
|
||||
// Metadata encoding
|
||||
|
||||
import util::ppaux::ty_to_str;
|
||||
use util::ppaux::ty_to_str;
|
||||
|
||||
import std::{ebml, map};
|
||||
import std::map::hashmap;
|
||||
import io::WriterUtil;
|
||||
import ebml::Writer;
|
||||
import syntax::ast::*;
|
||||
import syntax::print::pprust;
|
||||
import syntax::{ast_util, visit};
|
||||
import syntax::ast_util::*;
|
||||
import common::*;
|
||||
import middle::ty;
|
||||
import middle::ty::node_id_to_type;
|
||||
import middle::resolve;
|
||||
import syntax::ast_map;
|
||||
import syntax::attr;
|
||||
import std::serialization::serializer;
|
||||
import std::ebml::serializer;
|
||||
import str::to_bytes;
|
||||
import syntax::ast;
|
||||
import syntax::diagnostic::span_handler;
|
||||
use std::{ebml, map};
|
||||
use std::map::hashmap;
|
||||
use io::WriterUtil;
|
||||
use ebml::Writer;
|
||||
use syntax::ast::*;
|
||||
use syntax::print::pprust;
|
||||
use syntax::{ast_util, visit};
|
||||
use syntax::ast_util::*;
|
||||
use common::*;
|
||||
use middle::ty;
|
||||
use middle::ty::node_id_to_type;
|
||||
use middle::resolve;
|
||||
use syntax::ast_map;
|
||||
use syntax::attr;
|
||||
use std::serialization::serializer;
|
||||
use std::ebml::serializer;
|
||||
use str::to_bytes;
|
||||
use syntax::ast;
|
||||
use syntax::diagnostic::span_handler;
|
||||
|
||||
export encode_parms;
|
||||
export encode_metadata;
|
||||
|
@ -2,7 +2,7 @@
|
||||
// FIXME (#2658): I'm not happy how this module turned out. Should
|
||||
// probably just be folded into cstore.
|
||||
|
||||
import result::Result;
|
||||
use result::Result;
|
||||
export filesearch;
|
||||
export mk_filesearch;
|
||||
export pick;
|
||||
|
@ -1,13 +1,13 @@
|
||||
//! Finds crate binaries and loads their metadata
|
||||
|
||||
import syntax::diagnostic::span_handler;
|
||||
import syntax::{ast, attr};
|
||||
import syntax::print::pprust;
|
||||
import syntax::codemap::span;
|
||||
import lib::llvm::{False, llvm, mk_object_file, mk_section_iter};
|
||||
import filesearch::filesearch;
|
||||
import io::WriterUtil;
|
||||
import syntax::parse::token::ident_interner;
|
||||
use syntax::diagnostic::span_handler;
|
||||
use syntax::{ast, attr};
|
||||
use syntax::print::pprust;
|
||||
use syntax::codemap::span;
|
||||
use lib::llvm::{False, llvm, mk_object_file, mk_section_iter};
|
||||
use filesearch::filesearch;
|
||||
use io::WriterUtil;
|
||||
use syntax::parse::token::ident_interner;
|
||||
|
||||
export os;
|
||||
export os_macos, os_win32, os_linux, os_freebsd;
|
||||
|
@ -3,12 +3,12 @@
|
||||
// tjc note: Would be great to have a `match check` macro equivalent
|
||||
// for some of these
|
||||
|
||||
import syntax::ast;
|
||||
import syntax::ast::*;
|
||||
import syntax::ast_util;
|
||||
import syntax::ast_util::respan;
|
||||
import middle::ty;
|
||||
import std::map::hashmap;
|
||||
use syntax::ast;
|
||||
use syntax::ast::*;
|
||||
use syntax::ast_util;
|
||||
use syntax::ast_util::respan;
|
||||
use middle::ty;
|
||||
use std::map::hashmap;
|
||||
|
||||
export parse_ty_data, parse_def_id, parse_ident;
|
||||
export parse_bounds_data;
|
||||
|
@ -1,12 +1,12 @@
|
||||
// Type encoding
|
||||
|
||||
import io::WriterUtil;
|
||||
import std::map::hashmap;
|
||||
import syntax::ast::*;
|
||||
import syntax::diagnostic::span_handler;
|
||||
import middle::ty;
|
||||
import middle::ty::vid;
|
||||
import syntax::print::pprust::*;
|
||||
use io::WriterUtil;
|
||||
use std::map::hashmap;
|
||||
use syntax::ast::*;
|
||||
use syntax::diagnostic::span_handler;
|
||||
use middle::ty;
|
||||
use middle::ty::vid;
|
||||
use syntax::print::pprust::*;
|
||||
|
||||
export ctxt;
|
||||
export ty_abbrev;
|
||||
|
@ -1,45 +1,45 @@
|
||||
import util::ppaux::ty_to_str;
|
||||
use util::ppaux::ty_to_str;
|
||||
|
||||
import syntax::ast;
|
||||
import syntax::fold;
|
||||
import syntax::fold::*;
|
||||
import syntax::visit;
|
||||
import syntax::ast_map;
|
||||
import syntax::ast_util;
|
||||
import syntax::codemap::span;
|
||||
import std::ebml;
|
||||
import std::ebml::Writer;
|
||||
import std::ebml::get_doc;
|
||||
import std::map::hashmap;
|
||||
import std::serialization::serializer;
|
||||
import std::serialization::deserializer;
|
||||
import std::serialization::serializer_helpers;
|
||||
import std::serialization::deserializer_helpers;
|
||||
import std::prettyprint::serializer;
|
||||
import middle::{ty, typeck};
|
||||
import middle::typeck::{method_origin, method_map_entry,
|
||||
use syntax::ast;
|
||||
use syntax::fold;
|
||||
use syntax::fold::*;
|
||||
use syntax::visit;
|
||||
use syntax::ast_map;
|
||||
use syntax::ast_util;
|
||||
use syntax::codemap::span;
|
||||
use std::ebml;
|
||||
use std::ebml::Writer;
|
||||
use std::ebml::get_doc;
|
||||
use std::map::hashmap;
|
||||
use std::serialization::serializer;
|
||||
use std::serialization::deserializer;
|
||||
use std::serialization::serializer_helpers;
|
||||
use std::serialization::deserializer_helpers;
|
||||
use std::prettyprint::serializer;
|
||||
use middle::{ty, typeck};
|
||||
use middle::typeck::{method_origin, method_map_entry,
|
||||
serialize_method_map_entry,
|
||||
deserialize_method_map_entry,
|
||||
vtable_res,
|
||||
vtable_origin};
|
||||
import driver::session::session;
|
||||
import middle::freevars::{freevar_entry,
|
||||
use driver::session::session;
|
||||
use middle::freevars::{freevar_entry,
|
||||
serialize_freevar_entry,
|
||||
deserialize_freevar_entry};
|
||||
import c = metadata::common;
|
||||
import e = metadata::encoder;
|
||||
import cstore = metadata::cstore;
|
||||
import metadata::encoder;
|
||||
import metadata::decoder;
|
||||
import metadata::tyencode;
|
||||
import metadata::tydecode;
|
||||
use c = metadata::common;
|
||||
use e = metadata::encoder;
|
||||
use cstore = metadata::cstore;
|
||||
use metadata::encoder;
|
||||
use metadata::decoder;
|
||||
use metadata::tyencode;
|
||||
use metadata::tydecode;
|
||||
|
||||
|
||||
// used in testing:
|
||||
import syntax::diagnostic;
|
||||
import syntax::codemap;
|
||||
import syntax::parse;
|
||||
import syntax::print::pprust;
|
||||
use syntax::diagnostic;
|
||||
use syntax::codemap;
|
||||
use syntax::parse;
|
||||
use syntax::print::pprust;
|
||||
|
||||
export maps;
|
||||
export encode_inlined_item;
|
||||
|
@ -214,23 +214,23 @@ Borrowck results in two maps.
|
||||
given a memory location and not used as immediates.
|
||||
*/
|
||||
|
||||
import syntax::ast;
|
||||
import syntax::ast::{mutability, m_mutbl, m_imm, m_const};
|
||||
import syntax::visit;
|
||||
import syntax::ast_util;
|
||||
import syntax::ast_map;
|
||||
import syntax::codemap::span;
|
||||
import util::ppaux::{ty_to_str, region_to_str, explain_region};
|
||||
import std::map::{int_hash, hashmap, set};
|
||||
import std::list;
|
||||
import std::list::{list, cons, nil};
|
||||
import result::{Result, Ok, Err};
|
||||
import syntax::print::pprust;
|
||||
import util::common::indenter;
|
||||
import ty::to_str;
|
||||
import driver::session::session;
|
||||
import dvec::DVec;
|
||||
import mem_categorization::*;
|
||||
use syntax::ast;
|
||||
use syntax::ast::{mutability, m_mutbl, m_imm, m_const};
|
||||
use syntax::visit;
|
||||
use syntax::ast_util;
|
||||
use syntax::ast_map;
|
||||
use syntax::codemap::span;
|
||||
use util::ppaux::{ty_to_str, region_to_str, explain_region};
|
||||
use std::map::{int_hash, hashmap, set};
|
||||
use std::list;
|
||||
use std::list::{list, cons, nil};
|
||||
use result::{Result, Ok, Err};
|
||||
use syntax::print::pprust;
|
||||
use util::common::indenter;
|
||||
use ty::to_str;
|
||||
use driver::session::session;
|
||||
use dvec::DVec;
|
||||
use mem_categorization::*;
|
||||
|
||||
export check_crate, root_map, mutbl_map;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
// 3. assignments do not affect things loaned out as immutable
|
||||
// 4. moves to dnot affect things loaned out in any way
|
||||
|
||||
import dvec::DVec;
|
||||
use dvec::DVec;
|
||||
|
||||
export check_loans;
|
||||
|
||||
|
@ -6,9 +6,9 @@
|
||||
// their associated scopes. In phase two, checking loans, we will then make
|
||||
// sure that all of these loans are honored.
|
||||
|
||||
import mem_categorization::{opt_deref_kind};
|
||||
import preserve::{preserve_condition, pc_ok, pc_if_pure};
|
||||
import ty::ty_region;
|
||||
use mem_categorization::{opt_deref_kind};
|
||||
use preserve::{preserve_condition, pc_ok, pc_if_pure};
|
||||
use ty::ty_region;
|
||||
|
||||
export gather_loans;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
// of the scope S, presuming that the returned set of loans `Ls` are honored.
|
||||
|
||||
export public_methods;
|
||||
import result::{Result, Ok, Err};
|
||||
use result::{Result, Ok, Err};
|
||||
|
||||
impl borrowck_ctxt {
|
||||
fn loan(cmt: cmt,
|
||||
|
@ -1,8 +1,8 @@
|
||||
import syntax::{ast, ast_util};
|
||||
import driver::session::session;
|
||||
import syntax::codemap::span;
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
use syntax::{ast, ast_util};
|
||||
use driver::session::session;
|
||||
use syntax::codemap::span;
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
|
||||
export capture_mode;
|
||||
export capture_var;
|
||||
|
@ -1,16 +1,16 @@
|
||||
import syntax::ast::*;
|
||||
import syntax::ast_util::{variant_def_ids, dummy_sp, unguarded_pat};
|
||||
import const_eval::{eval_const_expr, const_val, const_int, const_bool,
|
||||
use syntax::ast::*;
|
||||
use syntax::ast_util::{variant_def_ids, dummy_sp, unguarded_pat};
|
||||
use const_eval::{eval_const_expr, const_val, const_int, const_bool,
|
||||
compare_const_vals};
|
||||
import syntax::codemap::span;
|
||||
import syntax::print::pprust::pat_to_str;
|
||||
import util::ppaux::ty_to_str;
|
||||
import pat_util::*;
|
||||
import syntax::visit;
|
||||
import driver::session::session;
|
||||
import middle::ty;
|
||||
import middle::ty::*;
|
||||
import std::map::hashmap;
|
||||
use syntax::codemap::span;
|
||||
use syntax::print::pprust::pat_to_str;
|
||||
use util::ppaux::ty_to_str;
|
||||
use pat_util::*;
|
||||
use syntax::visit;
|
||||
use driver::session::session;
|
||||
use middle::ty;
|
||||
use middle::ty::*;
|
||||
use std::map::hashmap;
|
||||
|
||||
fn check_crate(tcx: ty::ctxt, crate: @crate) {
|
||||
visit::visit_crate(*crate, (), visit::mk_vt(@{
|
||||
|
@ -1,8 +1,8 @@
|
||||
import syntax::ast::*;
|
||||
import syntax::{visit, ast_util, ast_map};
|
||||
import driver::session::session;
|
||||
import std::map::hashmap;
|
||||
import dvec::DVec;
|
||||
use syntax::ast::*;
|
||||
use syntax::{visit, ast_util, ast_map};
|
||||
use driver::session::session;
|
||||
use std::map::hashmap;
|
||||
use dvec::DVec;
|
||||
|
||||
fn check_crate(sess: session, crate: @crate, ast_map: ast_map::map,
|
||||
def_map: resolve::DefMap,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import syntax::ast::*;
|
||||
import syntax::visit;
|
||||
import driver::session::session;
|
||||
use syntax::ast::*;
|
||||
use syntax::visit;
|
||||
use driver::session::session;
|
||||
|
||||
type ctx = {in_loop: bool, can_ret: bool};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import syntax::{ast,ast_util,visit};
|
||||
import ast::*;
|
||||
use syntax::{ast,ast_util,visit};
|
||||
use ast::*;
|
||||
|
||||
//
|
||||
// This pass classifies expressions by their constant-ness.
|
||||
|
@ -1,12 +1,12 @@
|
||||
// A pass that annotates for each loops and functions with the free
|
||||
// variables that they contain.
|
||||
|
||||
import syntax::print::pprust::path_to_str;
|
||||
import std::map::*;
|
||||
import option::*;
|
||||
import syntax::{ast, ast_util, visit};
|
||||
import syntax::ast::{serialize_span, deserialize_span};
|
||||
import syntax::codemap::span;
|
||||
use syntax::print::pprust::path_to_str;
|
||||
use std::map::*;
|
||||
use option::*;
|
||||
use syntax::{ast, ast_util, visit};
|
||||
use syntax::ast::{serialize_span, deserialize_span};
|
||||
use syntax::codemap::span;
|
||||
|
||||
export annotate_freevars;
|
||||
export freevar_map;
|
||||
|
@ -1,13 +1,13 @@
|
||||
import syntax::{visit, ast_util};
|
||||
import syntax::ast::*;
|
||||
import syntax::codemap::span;
|
||||
import ty::{kind, kind_copyable, kind_noncopyable, kind_const};
|
||||
import driver::session::session;
|
||||
import std::map::hashmap;
|
||||
import util::ppaux::{ty_to_str, tys_to_str};
|
||||
import syntax::print::pprust::expr_to_str;
|
||||
import freevars::freevar_entry;
|
||||
import lint::{non_implicitly_copyable_typarams,implicit_copies};
|
||||
use syntax::{visit, ast_util};
|
||||
use syntax::ast::*;
|
||||
use syntax::codemap::span;
|
||||
use ty::{kind, kind_copyable, kind_noncopyable, kind_const};
|
||||
use driver::session::session;
|
||||
use std::map::hashmap;
|
||||
use util::ppaux::{ty_to_str, tys_to_str};
|
||||
use syntax::print::pprust::expr_to_str;
|
||||
use freevars::freevar_entry;
|
||||
use lint::{non_implicitly_copyable_typarams,implicit_copies};
|
||||
|
||||
// Kind analysis pass.
|
||||
//
|
||||
|
@ -9,18 +9,18 @@
|
||||
//
|
||||
// * Functions called by the compiler itself.
|
||||
|
||||
import driver::session::session;
|
||||
import metadata::csearch::{each_path, get_item_attrs};
|
||||
import metadata::cstore::{iter_crate_data};
|
||||
import metadata::decoder::{dl_def, dl_field, dl_impl};
|
||||
import syntax::ast::{crate, def_id, def_ty, lit_str, meta_item, meta_list};
|
||||
import syntax::ast::{meta_name_value, meta_word};
|
||||
import syntax::ast_util::{local_def};
|
||||
import syntax::visit::{default_simple_visitor, mk_simple_visitor};
|
||||
import syntax::visit::{visit_crate, visit_item};
|
||||
use driver::session::session;
|
||||
use metadata::csearch::{each_path, get_item_attrs};
|
||||
use metadata::cstore::{iter_crate_data};
|
||||
use metadata::decoder::{dl_def, dl_field, dl_impl};
|
||||
use syntax::ast::{crate, def_id, def_ty, lit_str, meta_item, meta_list};
|
||||
use syntax::ast::{meta_name_value, meta_word};
|
||||
use syntax::ast_util::{local_def};
|
||||
use syntax::visit::{default_simple_visitor, mk_simple_visitor};
|
||||
use syntax::visit::{visit_crate, visit_item};
|
||||
|
||||
import std::map::{hashmap, str_hash};
|
||||
import str_eq = str::eq;
|
||||
use std::map::{hashmap, str_hash};
|
||||
use str_eq = str::eq;
|
||||
|
||||
struct LanguageItems {
|
||||
mut const_trait: Option<def_id>;
|
||||
|
@ -1,16 +1,16 @@
|
||||
import driver::session;
|
||||
import driver::session::session;
|
||||
import middle::ty;
|
||||
import syntax::{ast, ast_util, visit};
|
||||
import syntax::attr;
|
||||
import syntax::codemap::span;
|
||||
import std::map::{map,hashmap,int_hash,hash_from_strs};
|
||||
import std::smallintmap::{map,smallintmap};
|
||||
import io::WriterUtil;
|
||||
import util::ppaux::{ty_to_str};
|
||||
import middle::pat_util::{pat_bindings};
|
||||
import syntax::ast_util::{path_to_ident};
|
||||
import syntax::print::pprust::{expr_to_str, mode_to_str, pat_to_str};
|
||||
use driver::session;
|
||||
use driver::session::session;
|
||||
use middle::ty;
|
||||
use syntax::{ast, ast_util, visit};
|
||||
use syntax::attr;
|
||||
use syntax::codemap::span;
|
||||
use std::map::{map,hashmap,int_hash,hash_from_strs};
|
||||
use std::smallintmap::{map,smallintmap};
|
||||
use io::WriterUtil;
|
||||
use util::ppaux::{ty_to_str};
|
||||
use middle::pat_util::{pat_bindings};
|
||||
use syntax::ast_util::{path_to_ident};
|
||||
use syntax::print::pprust::{expr_to_str, mode_to_str, pat_to_str};
|
||||
export lint, ctypes, unused_imports, while_true, path_statement, old_vecs;
|
||||
export unrecognized_lint, non_implicitly_copyable_typarams;
|
||||
export vecs_implicitly_copyable, implicit_copies;
|
||||
|
@ -100,16 +100,16 @@
|
||||
* - `self_var`: a variable representing 'self'
|
||||
*/
|
||||
|
||||
import dvec::DVec;
|
||||
import std::map::{hashmap, int_hash, str_hash, uint_hash};
|
||||
import syntax::{visit, ast_util};
|
||||
import syntax::print::pprust::{expr_to_str};
|
||||
import visit::vt;
|
||||
import syntax::codemap::span;
|
||||
import syntax::ast::*;
|
||||
import driver::session::session;
|
||||
import io::WriterUtil;
|
||||
import capture::{cap_move, cap_drop, cap_copy, cap_ref};
|
||||
use dvec::DVec;
|
||||
use std::map::{hashmap, int_hash, str_hash, uint_hash};
|
||||
use syntax::{visit, ast_util};
|
||||
use syntax::print::pprust::{expr_to_str};
|
||||
use visit::vt;
|
||||
use syntax::codemap::span;
|
||||
use syntax::ast::*;
|
||||
use driver::session::session;
|
||||
use io::WriterUtil;
|
||||
use capture::{cap_move, cap_drop, cap_copy, cap_ref};
|
||||
|
||||
export check_crate;
|
||||
export last_use_map;
|
||||
|
@ -36,12 +36,12 @@
|
||||
* then an index to jump forward to the relevant item.
|
||||
*/
|
||||
|
||||
import syntax::ast;
|
||||
import syntax::ast::{m_imm, m_const, m_mutbl};
|
||||
import syntax::codemap::span;
|
||||
import syntax::print::pprust;
|
||||
import util::ppaux::{ty_to_str, region_to_str};
|
||||
import util::common::indenter;
|
||||
use syntax::ast;
|
||||
use syntax::ast::{m_imm, m_const, m_mutbl};
|
||||
use syntax::codemap::span;
|
||||
use syntax::print::pprust;
|
||||
use util::ppaux::{ty_to_str, region_to_str};
|
||||
use util::common::indenter;
|
||||
|
||||
enum categorization {
|
||||
cat_rvalue, // result of eval'ing some misc expr
|
||||
|
@ -1,10 +1,10 @@
|
||||
import syntax::ast::*;
|
||||
import syntax::ast_util;
|
||||
import syntax::ast_util::{path_to_ident, respan, walk_pat};
|
||||
import syntax::fold;
|
||||
import syntax::fold::*;
|
||||
import syntax::codemap::span;
|
||||
import std::map::hashmap;
|
||||
use syntax::ast::*;
|
||||
use syntax::ast_util;
|
||||
use syntax::ast_util::{path_to_ident, respan, walk_pat};
|
||||
use syntax::fold;
|
||||
use syntax::fold::*;
|
||||
use syntax::codemap::span;
|
||||
use std::map::hashmap;
|
||||
|
||||
export pat_binding_ids, pat_bindings, pat_id_map;
|
||||
export pat_is_variant;
|
||||
|
@ -7,20 +7,20 @@ region parameterized.
|
||||
|
||||
*/
|
||||
|
||||
import driver::session::session;
|
||||
import middle::ty;
|
||||
import syntax::{ast, visit};
|
||||
import syntax::codemap::span;
|
||||
import syntax::print::pprust;
|
||||
import syntax::ast_util::new_def_hash;
|
||||
import syntax::ast_map;
|
||||
import dvec::DVec;
|
||||
import metadata::csearch;
|
||||
import ty::{region_variance, rv_covariant, rv_invariant, rv_contravariant};
|
||||
use driver::session::session;
|
||||
use middle::ty;
|
||||
use syntax::{ast, visit};
|
||||
use syntax::codemap::span;
|
||||
use syntax::print::pprust;
|
||||
use syntax::ast_util::new_def_hash;
|
||||
use syntax::ast_map;
|
||||
use dvec::DVec;
|
||||
use metadata::csearch;
|
||||
use ty::{region_variance, rv_covariant, rv_invariant, rv_contravariant};
|
||||
|
||||
import std::list;
|
||||
import std::list::list;
|
||||
import std::map::{hashmap, int_hash};
|
||||
use std::list;
|
||||
use std::list::list;
|
||||
use std::map::{hashmap, int_hash};
|
||||
|
||||
type parent = Option<ast::node_id>;
|
||||
|
||||
|
@ -1,67 +1,67 @@
|
||||
import driver::session::session;
|
||||
import metadata::csearch::{each_path, get_method_names_if_trait};
|
||||
import metadata::cstore::find_use_stmt_cnum;
|
||||
import metadata::decoder::{def_like, dl_def, dl_field, dl_impl};
|
||||
import middle::lang_items::LanguageItems;
|
||||
import middle::lint::{deny, allow, forbid, level, unused_imports, warn};
|
||||
import middle::pat_util::{pat_bindings};
|
||||
import syntax::ast::{_mod, add, arm};
|
||||
import syntax::ast::{bind_by_ref, bind_by_implicit_ref, bind_by_value};
|
||||
import syntax::ast::{bitand, bitor, bitxor};
|
||||
import syntax::ast::{blk, bound_const, bound_copy, bound_owned, bound_send};
|
||||
import syntax::ast::{bound_trait, binding_mode,
|
||||
use driver::session::session;
|
||||
use metadata::csearch::{each_path, get_method_names_if_trait};
|
||||
use metadata::cstore::find_use_stmt_cnum;
|
||||
use metadata::decoder::{def_like, dl_def, dl_field, dl_impl};
|
||||
use middle::lang_items::LanguageItems;
|
||||
use middle::lint::{deny, allow, forbid, level, unused_imports, warn};
|
||||
use middle::pat_util::{pat_bindings};
|
||||
use syntax::ast::{_mod, add, arm};
|
||||
use syntax::ast::{bind_by_ref, bind_by_implicit_ref, bind_by_value};
|
||||
use syntax::ast::{bitand, bitor, bitxor};
|
||||
use syntax::ast::{blk, bound_const, bound_copy, bound_owned, bound_send};
|
||||
use syntax::ast::{bound_trait, binding_mode,
|
||||
capture_clause, class_ctor, class_dtor};
|
||||
import syntax::ast::{crate, crate_num, decl_item};
|
||||
import syntax::ast::{def, def_arg, def_binding, def_class, def_const, def_fn};
|
||||
import syntax::ast::{def_foreign_mod, def_id, def_label, def_local, def_mod};
|
||||
import syntax::ast::{def_prim_ty, def_region, def_self, def_ty, def_ty_param};
|
||||
import syntax::ast::{def_typaram_binder, def_static_method};
|
||||
import syntax::ast::{def_upvar, def_use, def_variant, expr, expr_assign_op};
|
||||
import syntax::ast::{expr_binary, expr_cast, expr_field, expr_fn};
|
||||
import syntax::ast::{expr_fn_block, expr_index, expr_path};
|
||||
import syntax::ast::{def_prim_ty, def_region, def_self, def_ty, def_ty_param};
|
||||
import syntax::ast::{def_upvar, def_use, def_variant, div, eq};
|
||||
import syntax::ast::{enum_variant_kind, expr, expr_again, expr_assign_op};
|
||||
import syntax::ast::{expr_binary, expr_break, expr_cast, expr_field, expr_fn};
|
||||
import syntax::ast::{expr_fn_block, expr_index, expr_loop};
|
||||
import syntax::ast::{expr_path, expr_struct, expr_unary, fn_decl};
|
||||
import syntax::ast::{foreign_item, foreign_item_const, foreign_item_fn, ge};
|
||||
import syntax::ast::{gt, ident, impure_fn, inherited, item, item_class};
|
||||
import syntax::ast::{item_const, item_enum, item_fn, item_foreign_mod};
|
||||
import syntax::ast::{item_impl, item_mac, item_mod, item_trait, item_ty, le};
|
||||
import syntax::ast::{local, local_crate, lt, method, module_ns, mul, ne, neg};
|
||||
import syntax::ast::{node_id, pat, pat_enum, pat_ident, path, prim_ty};
|
||||
import syntax::ast::{pat_box, pat_lit, pat_range, pat_rec, pat_struct};
|
||||
import syntax::ast::{pat_tup, pat_uniq, pat_wild, private, provided, public};
|
||||
import syntax::ast::{required, rem, self_ty_, shl, shr, stmt_decl};
|
||||
import syntax::ast::{struct_field, struct_variant_kind, sty_static, subtract};
|
||||
import syntax::ast::{trait_ref, tuple_variant_kind, ty, ty_bool, ty_char};
|
||||
import syntax::ast::{ty_f, ty_f32, ty_f64, ty_float, ty_i, ty_i16, ty_i32};
|
||||
import syntax::ast::{ty_i64, ty_i8, ty_int, ty_param, ty_path, ty_str, ty_u};
|
||||
import syntax::ast::{ty_u16, ty_u32, ty_u64, ty_u8, ty_uint, type_value_ns};
|
||||
import syntax::ast::{variant, view_item, view_item_export, view_item_import};
|
||||
import syntax::ast::{view_item_use, view_path_glob, view_path_list};
|
||||
import syntax::ast::{view_path_simple, visibility, anonymous, named};
|
||||
import syntax::ast_util::{def_id_of_def, dummy_sp, local_def, new_def_hash};
|
||||
import syntax::ast_util::{path_to_ident, walk_pat, trait_method_to_ty_method};
|
||||
import syntax::attr::{attr_metas, contains_name};
|
||||
import syntax::print::pprust::{pat_to_str, path_to_str};
|
||||
import syntax::codemap::span;
|
||||
import syntax::visit::{default_visitor, fk_method, mk_vt, visit_block};
|
||||
import syntax::visit::{visit_crate, visit_expr, visit_expr_opt, visit_fn};
|
||||
import syntax::visit::{visit_foreign_item, visit_item, visit_method_helper};
|
||||
import syntax::visit::{visit_mod, visit_ty, vt};
|
||||
use syntax::ast::{crate, crate_num, decl_item};
|
||||
use syntax::ast::{def, def_arg, def_binding, def_class, def_const, def_fn};
|
||||
use syntax::ast::{def_foreign_mod, def_id, def_label, def_local, def_mod};
|
||||
use syntax::ast::{def_prim_ty, def_region, def_self, def_ty, def_ty_param};
|
||||
use syntax::ast::{def_typaram_binder, def_static_method};
|
||||
use syntax::ast::{def_upvar, def_use, def_variant, expr, expr_assign_op};
|
||||
use syntax::ast::{expr_binary, expr_cast, expr_field, expr_fn};
|
||||
use syntax::ast::{expr_fn_block, expr_index, expr_path};
|
||||
use syntax::ast::{def_prim_ty, def_region, def_self, def_ty, def_ty_param};
|
||||
use syntax::ast::{def_upvar, def_use, def_variant, div, eq};
|
||||
use syntax::ast::{enum_variant_kind, expr, expr_again, expr_assign_op};
|
||||
use syntax::ast::{expr_binary, expr_break, expr_cast, expr_field, expr_fn};
|
||||
use syntax::ast::{expr_fn_block, expr_index, expr_loop};
|
||||
use syntax::ast::{expr_path, expr_struct, expr_unary, fn_decl};
|
||||
use syntax::ast::{foreign_item, foreign_item_const, foreign_item_fn, ge};
|
||||
use syntax::ast::{gt, ident, impure_fn, inherited, item, item_class};
|
||||
use syntax::ast::{item_const, item_enum, item_fn, item_foreign_mod};
|
||||
use syntax::ast::{item_impl, item_mac, item_mod, item_trait, item_ty, le};
|
||||
use syntax::ast::{local, local_crate, lt, method, module_ns, mul, ne, neg};
|
||||
use syntax::ast::{node_id, pat, pat_enum, pat_ident, path, prim_ty};
|
||||
use syntax::ast::{pat_box, pat_lit, pat_range, pat_rec, pat_struct};
|
||||
use syntax::ast::{pat_tup, pat_uniq, pat_wild, private, provided, public};
|
||||
use syntax::ast::{required, rem, self_ty_, shl, shr, stmt_decl};
|
||||
use syntax::ast::{struct_field, struct_variant_kind, sty_static, subtract};
|
||||
use syntax::ast::{trait_ref, tuple_variant_kind, ty, ty_bool, ty_char};
|
||||
use syntax::ast::{ty_f, ty_f32, ty_f64, ty_float, ty_i, ty_i16, ty_i32};
|
||||
use syntax::ast::{ty_i64, ty_i8, ty_int, ty_param, ty_path, ty_str, ty_u};
|
||||
use syntax::ast::{ty_u16, ty_u32, ty_u64, ty_u8, ty_uint, type_value_ns};
|
||||
use syntax::ast::{variant, view_item, view_item_export, view_item_import};
|
||||
use syntax::ast::{view_item_use, view_path_glob, view_path_list};
|
||||
use syntax::ast::{view_path_simple, visibility, anonymous, named};
|
||||
use syntax::ast_util::{def_id_of_def, dummy_sp, local_def, new_def_hash};
|
||||
use syntax::ast_util::{path_to_ident, walk_pat, trait_method_to_ty_method};
|
||||
use syntax::attr::{attr_metas, contains_name};
|
||||
use syntax::print::pprust::{pat_to_str, path_to_str};
|
||||
use syntax::codemap::span;
|
||||
use syntax::visit::{default_visitor, fk_method, mk_vt, visit_block};
|
||||
use syntax::visit::{visit_crate, visit_expr, visit_expr_opt, visit_fn};
|
||||
use syntax::visit::{visit_foreign_item, visit_item, visit_method_helper};
|
||||
use syntax::visit::{visit_mod, visit_ty, vt};
|
||||
|
||||
import box::ptr_eq;
|
||||
import dvec::DVec;
|
||||
import option::{get, is_some};
|
||||
import str::{connect, split_str};
|
||||
import vec::pop;
|
||||
import syntax::parse::token::ident_interner;
|
||||
use box::ptr_eq;
|
||||
use dvec::DVec;
|
||||
use option::{get, is_some};
|
||||
use str::{connect, split_str};
|
||||
use vec::pop;
|
||||
use syntax::parse::token::ident_interner;
|
||||
|
||||
import std::list::{cons, list, nil};
|
||||
import std::map::{hashmap, int_hash, uint_hash};
|
||||
import str_eq = str::eq;
|
||||
use std::list::{cons, list, nil};
|
||||
use std::map::{hashmap, int_hash, uint_hash};
|
||||
use str_eq = str::eq;
|
||||
|
||||
// Definition mapping
|
||||
type DefMap = hashmap<node_id,def>;
|
||||
|
@ -1,21 +1,21 @@
|
||||
import driver::session::session;
|
||||
import lib::llvm::llvm;
|
||||
import lib::llvm::{ValueRef, BasicBlockRef};
|
||||
import pat_util::*;
|
||||
import build::*;
|
||||
import base::*;
|
||||
import syntax::ast;
|
||||
import syntax::ast_util;
|
||||
import syntax::ast_util::{dummy_sp, path_to_ident};
|
||||
import syntax::ast::def_id;
|
||||
import syntax::codemap::span;
|
||||
import syntax::print::pprust::pat_to_str;
|
||||
import middle::resolve::DefMap;
|
||||
import back::abi;
|
||||
import std::map::hashmap;
|
||||
import dvec::DVec;
|
||||
use driver::session::session;
|
||||
use lib::llvm::llvm;
|
||||
use lib::llvm::{ValueRef, BasicBlockRef};
|
||||
use pat_util::*;
|
||||
use build::*;
|
||||
use base::*;
|
||||
use syntax::ast;
|
||||
use syntax::ast_util;
|
||||
use syntax::ast_util::{dummy_sp, path_to_ident};
|
||||
use syntax::ast::def_id;
|
||||
use syntax::codemap::span;
|
||||
use syntax::print::pprust::pat_to_str;
|
||||
use middle::resolve::DefMap;
|
||||
use back::abi;
|
||||
use std::map::hashmap;
|
||||
use dvec::DVec;
|
||||
|
||||
import common::*;
|
||||
use common::*;
|
||||
|
||||
// An option identifying a branch (either a literal, a enum variant or a
|
||||
// range)
|
||||
|
@ -13,46 +13,46 @@
|
||||
// but many TypeRefs correspond to one ty::t; for instance, tup(int, int,
|
||||
// int) and rec(x=int, y=int, z=int) will have the same TypeRef.
|
||||
|
||||
import libc::{c_uint, c_ulonglong};
|
||||
import std::{map, time, list};
|
||||
import std::map::hashmap;
|
||||
import std::map::{int_hash, str_hash};
|
||||
import driver::session;
|
||||
import session::session;
|
||||
import syntax::attr;
|
||||
import back::{link, abi, upcall};
|
||||
import syntax::{ast, ast_util, codemap, ast_map};
|
||||
import ast_util::{local_def, path_to_ident};
|
||||
import syntax::visit;
|
||||
import syntax::codemap::span;
|
||||
import syntax::print::pprust::{expr_to_str, stmt_to_str, path_to_str};
|
||||
import pat_util::*;
|
||||
import visit::vt;
|
||||
import util::common::is_main_name;
|
||||
import lib::llvm::{llvm, mk_target_data, mk_type_names};
|
||||
import lib::llvm::{ModuleRef, ValueRef, TypeRef, BasicBlockRef};
|
||||
import lib::llvm::{True, False};
|
||||
import link::{mangle_internal_name_by_type_only,
|
||||
use libc::{c_uint, c_ulonglong};
|
||||
use std::{map, time, list};
|
||||
use std::map::hashmap;
|
||||
use std::map::{int_hash, str_hash};
|
||||
use driver::session;
|
||||
use session::session;
|
||||
use syntax::attr;
|
||||
use back::{link, abi, upcall};
|
||||
use syntax::{ast, ast_util, codemap, ast_map};
|
||||
use ast_util::{local_def, path_to_ident};
|
||||
use syntax::visit;
|
||||
use syntax::codemap::span;
|
||||
use syntax::print::pprust::{expr_to_str, stmt_to_str, path_to_str};
|
||||
use pat_util::*;
|
||||
use visit::vt;
|
||||
use util::common::is_main_name;
|
||||
use lib::llvm::{llvm, mk_target_data, mk_type_names};
|
||||
use lib::llvm::{ModuleRef, ValueRef, TypeRef, BasicBlockRef};
|
||||
use lib::llvm::{True, False};
|
||||
use link::{mangle_internal_name_by_type_only,
|
||||
mangle_internal_name_by_seq,
|
||||
mangle_internal_name_by_path,
|
||||
mangle_internal_name_by_path_and_seq,
|
||||
mangle_exported_name};
|
||||
import metadata::{csearch, cstore, decoder, encoder};
|
||||
import metadata::common::link_meta;
|
||||
import util::ppaux;
|
||||
import util::ppaux::{ty_to_str, ty_to_short_str};
|
||||
import syntax::diagnostic::expect;
|
||||
use metadata::{csearch, cstore, decoder, encoder};
|
||||
use metadata::common::link_meta;
|
||||
use util::ppaux;
|
||||
use util::ppaux::{ty_to_str, ty_to_short_str};
|
||||
use syntax::diagnostic::expect;
|
||||
|
||||
import build::*;
|
||||
import shape::*;
|
||||
import type_of::*;
|
||||
import common::*;
|
||||
import common::result;
|
||||
import syntax::ast_map::{path, path_mod, path_name};
|
||||
import syntax::parse::token::special_idents;
|
||||
use build::*;
|
||||
use shape::*;
|
||||
use type_of::*;
|
||||
use common::*;
|
||||
use common::result;
|
||||
use syntax::ast_map::{path, path_mod, path_name};
|
||||
use syntax::parse::token::special_idents;
|
||||
|
||||
import std::smallintmap;
|
||||
import option::{is_none, is_some};
|
||||
use std::smallintmap;
|
||||
use option::{is_none, is_some};
|
||||
|
||||
// Destinations
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
import std::map::{hashmap, str_hash};
|
||||
import libc::{c_uint, c_int};
|
||||
import lib::llvm::llvm;
|
||||
import syntax::codemap;
|
||||
import codemap::span;
|
||||
import lib::llvm::{ValueRef, TypeRef, BasicBlockRef, BuilderRef, ModuleRef};
|
||||
import lib::llvm::{Opcode, IntPredicate, RealPredicate, True, False,
|
||||
use std::map::{hashmap, str_hash};
|
||||
use libc::{c_uint, c_int};
|
||||
use lib::llvm::llvm;
|
||||
use syntax::codemap;
|
||||
use codemap::span;
|
||||
use lib::llvm::{ValueRef, TypeRef, BasicBlockRef, BuilderRef, ModuleRef};
|
||||
use lib::llvm::{Opcode, IntPredicate, RealPredicate, True, False,
|
||||
CallConv, TypeKind, AtomicBinOp, AtomicOrdering};
|
||||
import common::*;
|
||||
import driver::session::session;
|
||||
use common::*;
|
||||
use driver::session::session;
|
||||
|
||||
fn B(cx: block) -> BuilderRef {
|
||||
let b = cx.fcx.ccx.builder.B;
|
||||
|
@ -1,22 +1,22 @@
|
||||
import libc::c_uint;
|
||||
import syntax::ast;
|
||||
import syntax::ast_util;
|
||||
import lib::llvm::llvm;
|
||||
import lib::llvm::{ValueRef, TypeRef};
|
||||
import common::*;
|
||||
import build::*;
|
||||
import base::*;
|
||||
import type_of::*;
|
||||
import back::abi;
|
||||
import syntax::codemap::span;
|
||||
import syntax::print::pprust::expr_to_str;
|
||||
import back::link::{
|
||||
use libc::c_uint;
|
||||
use syntax::ast;
|
||||
use syntax::ast_util;
|
||||
use lib::llvm::llvm;
|
||||
use lib::llvm::{ValueRef, TypeRef};
|
||||
use common::*;
|
||||
use build::*;
|
||||
use base::*;
|
||||
use type_of::*;
|
||||
use back::abi;
|
||||
use syntax::codemap::span;
|
||||
use syntax::print::pprust::expr_to_str;
|
||||
use back::link::{
|
||||
mangle_internal_name_by_path,
|
||||
mangle_internal_name_by_path_and_seq};
|
||||
import util::ppaux::ty_to_str;
|
||||
import syntax::ast_map::{path, path_mod, path_name};
|
||||
import driver::session::session;
|
||||
import std::map::hashmap;
|
||||
use util::ppaux::ty_to_str;
|
||||
use syntax::ast_map::{path, path_mod, path_name};
|
||||
use driver::session::session;
|
||||
use std::map::hashmap;
|
||||
|
||||
// ___Good to know (tm)__________________________________________________
|
||||
//
|
||||
|
@ -3,25 +3,25 @@
|
||||
|
||||
*/
|
||||
|
||||
import libc::c_uint;
|
||||
import vec::unsafe::to_ptr;
|
||||
import std::map::{hashmap,set};
|
||||
import syntax::{ast, ast_map};
|
||||
import driver::session;
|
||||
import session::session;
|
||||
import middle::ty;
|
||||
import back::{link, abi, upcall};
|
||||
import syntax::codemap::span;
|
||||
import lib::llvm::{llvm, target_data, type_names, associate_type,
|
||||
use libc::c_uint;
|
||||
use vec::unsafe::to_ptr;
|
||||
use std::map::{hashmap,set};
|
||||
use syntax::{ast, ast_map};
|
||||
use driver::session;
|
||||
use session::session;
|
||||
use middle::ty;
|
||||
use back::{link, abi, upcall};
|
||||
use syntax::codemap::span;
|
||||
use lib::llvm::{llvm, target_data, type_names, associate_type,
|
||||
name_has_type};
|
||||
import lib::llvm::{ModuleRef, ValueRef, TypeRef, BasicBlockRef, BuilderRef};
|
||||
import lib::llvm::{True, False, Bool};
|
||||
import metadata::{csearch};
|
||||
import metadata::common::link_meta;
|
||||
import syntax::ast_map::path;
|
||||
import util::ppaux::ty_to_str;
|
||||
import syntax::parse::token::ident_interner;
|
||||
import syntax::ast::ident;
|
||||
use lib::llvm::{ModuleRef, ValueRef, TypeRef, BasicBlockRef, BuilderRef};
|
||||
use lib::llvm::{True, False, Bool};
|
||||
use metadata::{csearch};
|
||||
use metadata::common::link_meta;
|
||||
use syntax::ast_map::path;
|
||||
use util::ppaux::ty_to_str;
|
||||
use syntax::parse::token::ident_interner;
|
||||
use syntax::ast::ident;
|
||||
|
||||
type namegen = fn@(~str) -> ident;
|
||||
fn new_namegen(intr: ident_interner) -> namegen {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import common::*;
|
||||
import syntax::{ast, ast_util, codemap, ast_map};
|
||||
import base::get_insn_ctxt;
|
||||
use common::*;
|
||||
use syntax::{ast, ast_util, codemap, ast_map};
|
||||
use base::get_insn_ctxt;
|
||||
|
||||
fn const_lit(cx: @crate_ctxt, e: @ast::expr, lit: ast::lit)
|
||||
-> ValueRef {
|
||||
|
@ -1,18 +1,18 @@
|
||||
import std::map;
|
||||
import std::map::hashmap;
|
||||
import lib::llvm::llvm;
|
||||
import lib::llvm::ValueRef;
|
||||
import trans::common::*;
|
||||
import trans::base;
|
||||
import trans::build::B;
|
||||
import middle::ty;
|
||||
import syntax::{ast, codemap, ast_util, ast_map};
|
||||
import syntax::parse::token::ident_interner;
|
||||
import codemap::span;
|
||||
import ast::ty;
|
||||
import pat_util::*;
|
||||
import util::ppaux::ty_to_str;
|
||||
import driver::session::session;
|
||||
use std::map;
|
||||
use std::map::hashmap;
|
||||
use lib::llvm::llvm;
|
||||
use lib::llvm::ValueRef;
|
||||
use trans::common::*;
|
||||
use trans::base;
|
||||
use trans::build::B;
|
||||
use middle::ty;
|
||||
use syntax::{ast, codemap, ast_util, ast_map};
|
||||
use syntax::parse::token::ident_interner;
|
||||
use codemap::span;
|
||||
use ast::ty;
|
||||
use pat_util::*;
|
||||
use util::ppaux::ty_to_str;
|
||||
use driver::session::session;
|
||||
|
||||
export create_local_var;
|
||||
export create_function;
|
||||
|
@ -1,22 +1,22 @@
|
||||
// The classification code for the x86_64 ABI is taken from the clay language
|
||||
// https://github.com/jckarter/clay/blob/master/compiler/src/externals.cpp
|
||||
|
||||
import driver::session::{session, arch_x86_64};
|
||||
import syntax::codemap::span;
|
||||
import libc::c_uint;
|
||||
import syntax::{attr, ast_map};
|
||||
import lib::llvm::{ llvm, TypeRef, ValueRef, Integer, Pointer, Float, Double,
|
||||
use driver::session::{session, arch_x86_64};
|
||||
use syntax::codemap::span;
|
||||
use libc::c_uint;
|
||||
use syntax::{attr, ast_map};
|
||||
use lib::llvm::{ llvm, TypeRef, ValueRef, Integer, Pointer, Float, Double,
|
||||
Struct, Array, ModuleRef, CallConv, Attribute,
|
||||
StructRetAttribute, ByValAttribute,
|
||||
SequentiallyConsistent, Acquire, Release, Xchg };
|
||||
import syntax::{ast, ast_util};
|
||||
import back::{link, abi};
|
||||
import common::*;
|
||||
import build::*;
|
||||
import base::*;
|
||||
import type_of::*;
|
||||
import std::map::hashmap;
|
||||
import util::ppaux::ty_to_str;
|
||||
use syntax::{ast, ast_util};
|
||||
use back::{link, abi};
|
||||
use common::*;
|
||||
use build::*;
|
||||
use base::*;
|
||||
use type_of::*;
|
||||
use std::map::hashmap;
|
||||
use util::ppaux::ty_to_str;
|
||||
|
||||
export link_name, trans_foreign_mod, register_foreign_fn, trans_foreign_fn,
|
||||
trans_intrinsic;
|
||||
|
@ -1,22 +1,22 @@
|
||||
import libc::c_uint;
|
||||
import base::*;
|
||||
import common::*;
|
||||
import type_of::*;
|
||||
import build::*;
|
||||
import driver::session::session;
|
||||
import syntax::{ast, ast_map};
|
||||
import ast_map::{path, path_mod, path_name, node_id_to_str};
|
||||
import driver::session::expect;
|
||||
import syntax::ast_util::local_def;
|
||||
import metadata::csearch;
|
||||
import back::{link, abi};
|
||||
import lib::llvm::llvm;
|
||||
import lib::llvm::{ValueRef, TypeRef};
|
||||
import lib::llvm::llvm::LLVMGetParam;
|
||||
import std::map::hashmap;
|
||||
import util::ppaux::{ty_to_str, tys_to_str};
|
||||
use libc::c_uint;
|
||||
use base::*;
|
||||
use common::*;
|
||||
use type_of::*;
|
||||
use build::*;
|
||||
use driver::session::session;
|
||||
use syntax::{ast, ast_map};
|
||||
use ast_map::{path, path_mod, path_name, node_id_to_str};
|
||||
use driver::session::expect;
|
||||
use syntax::ast_util::local_def;
|
||||
use metadata::csearch;
|
||||
use back::{link, abi};
|
||||
use lib::llvm::llvm;
|
||||
use lib::llvm::{ValueRef, TypeRef};
|
||||
use lib::llvm::llvm::LLVMGetParam;
|
||||
use std::map::hashmap;
|
||||
use util::ppaux::{ty_to_str, tys_to_str};
|
||||
|
||||
import syntax::print::pprust::expr_to_str;
|
||||
use syntax::print::pprust::expr_to_str;
|
||||
|
||||
/**
|
||||
The main "translation" pass for methods. Generates code
|
||||
|
@ -5,13 +5,13 @@
|
||||
// makes all other generics or inline functions that it references
|
||||
// reachable as well.
|
||||
|
||||
import syntax::ast::*;
|
||||
import syntax::{visit, ast_util, ast_map};
|
||||
import syntax::ast_util::def_id_of_def;
|
||||
import syntax::attr;
|
||||
import syntax::print::pprust::expr_to_str;
|
||||
import std::map::hashmap;
|
||||
import driver::session::*;
|
||||
use syntax::ast::*;
|
||||
use syntax::{visit, ast_util, ast_map};
|
||||
use syntax::ast_util::def_id_of_def;
|
||||
use syntax::attr;
|
||||
use syntax::print::pprust::expr_to_str;
|
||||
use std::map::hashmap;
|
||||
use driver::session::*;
|
||||
|
||||
export map, find_reachable;
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
import std::map::{hashmap,str_hash};
|
||||
import driver::session::session;
|
||||
import lib::llvm::{TypeRef, ValueRef};
|
||||
import syntax::ast;
|
||||
import back::abi;
|
||||
import common::*;
|
||||
import build::*;
|
||||
import base::*;
|
||||
import type_of::*;
|
||||
import ast::def_id;
|
||||
import util::ppaux::ty_to_str;
|
||||
use std::map::{hashmap,str_hash};
|
||||
use driver::session::session;
|
||||
use lib::llvm::{TypeRef, ValueRef};
|
||||
use syntax::ast;
|
||||
use back::abi;
|
||||
use common::*;
|
||||
use build::*;
|
||||
use base::*;
|
||||
use type_of::*;
|
||||
use ast::def_id;
|
||||
use util::ppaux::ty_to_str;
|
||||
|
||||
enum reflector = {
|
||||
visitor_val: ValueRef,
|
||||
|
@ -1,26 +1,26 @@
|
||||
// A "shape" is a compact encoding of a type that is used by interpreted glue.
|
||||
// This substitutes for the runtime tags used by e.g. MLs.
|
||||
|
||||
import lib::llvm::llvm;
|
||||
import lib::llvm::{True, False, ModuleRef, TypeRef, ValueRef};
|
||||
import driver::session;
|
||||
import driver::session::session;
|
||||
import trans::base;
|
||||
import middle::trans::common::*;
|
||||
import back::abi;
|
||||
import middle::ty;
|
||||
import middle::ty::field;
|
||||
import syntax::ast;
|
||||
import syntax::ast_util::{dummy_sp, new_def_hash};
|
||||
import syntax::util::interner;
|
||||
import util::ppaux::ty_to_str;
|
||||
import syntax::codemap::span;
|
||||
import dvec::DVec;
|
||||
use lib::llvm::llvm;
|
||||
use lib::llvm::{True, False, ModuleRef, TypeRef, ValueRef};
|
||||
use driver::session;
|
||||
use driver::session::session;
|
||||
use trans::base;
|
||||
use middle::trans::common::*;
|
||||
use back::abi;
|
||||
use middle::ty;
|
||||
use middle::ty::field;
|
||||
use syntax::ast;
|
||||
use syntax::ast_util::{dummy_sp, new_def_hash};
|
||||
use syntax::util::interner;
|
||||
use util::ppaux::ty_to_str;
|
||||
use syntax::codemap::span;
|
||||
use dvec::DVec;
|
||||
|
||||
import std::map::hashmap;
|
||||
import option::is_some;
|
||||
use std::map::hashmap;
|
||||
use option::is_some;
|
||||
|
||||
import ty_ctxt = middle::ty::ctxt;
|
||||
use ty_ctxt = middle::ty::ctxt;
|
||||
|
||||
type nominal_id = @{did: ast::def_id, parent_id: Option<ast::def_id>,
|
||||
tps: ~[ty::t]};
|
||||
|
@ -1,16 +1,16 @@
|
||||
import syntax::ast;
|
||||
import driver::session::session;
|
||||
import lib::llvm::{ValueRef, TypeRef};
|
||||
import back::abi;
|
||||
import base::{call_memmove,
|
||||
use syntax::ast;
|
||||
use driver::session::session;
|
||||
use lib::llvm::{ValueRef, TypeRef};
|
||||
use back::abi;
|
||||
use base::{call_memmove,
|
||||
INIT, copy_val, load_if_immediate, get_tydesc,
|
||||
sub_block, do_spill_noroot,
|
||||
dest, non_gc_box_cast, move_val, lval_owned};
|
||||
import syntax::codemap::span;
|
||||
import shape::llsize_of;
|
||||
import build::*;
|
||||
import common::*;
|
||||
import util::ppaux::ty_to_str;
|
||||
use syntax::codemap::span;
|
||||
use shape::llsize_of;
|
||||
use build::*;
|
||||
use common::*;
|
||||
use util::ppaux::ty_to_str;
|
||||
|
||||
// Boxed vector types are in some sense currently a "shorthand" for a box
|
||||
// containing an unboxed vector. This expands a boxed vector type into such an
|
||||
|
@ -1,9 +1,9 @@
|
||||
import common::*;
|
||||
import lib::llvm::{TypeRef};
|
||||
import syntax::ast;
|
||||
import lib::llvm::llvm;
|
||||
import driver::session::session;
|
||||
import std::map::hashmap;
|
||||
use common::*;
|
||||
use lib::llvm::{TypeRef};
|
||||
use syntax::ast;
|
||||
use lib::llvm::llvm;
|
||||
use driver::session::session;
|
||||
use std::map::hashmap;
|
||||
|
||||
export type_of;
|
||||
export type_of_dtor;
|
||||
|
@ -17,14 +17,14 @@
|
||||
// much information, but have the disadvantage of being very
|
||||
// invasive.)
|
||||
|
||||
import std::map::hashmap;
|
||||
import std::list;
|
||||
import std::list::{list, cons, nil};
|
||||
import driver::session::session;
|
||||
import metadata::csearch;
|
||||
import syntax::ast::*, syntax::ast_util, syntax::visit;
|
||||
import syntax::ast_map;
|
||||
import common::*;
|
||||
use std::map::hashmap;
|
||||
use std::list;
|
||||
use std::list::{list, cons, nil};
|
||||
use driver::session::session;
|
||||
use metadata::csearch;
|
||||
use syntax::ast::*, syntax::ast_util, syntax::visit;
|
||||
use syntax::ast_map;
|
||||
use common::*;
|
||||
|
||||
type type_uses = uint; // Bitmask
|
||||
const use_repr: uint = 1u; // Dependency on size/alignment and take/drop glue
|
||||
|
@ -1,9 +1,9 @@
|
||||
import syntax::ast;
|
||||
import lib::llvm::ValueRef;
|
||||
import common::*;
|
||||
import build::*;
|
||||
import base::*;
|
||||
import shape::llsize_of;
|
||||
use syntax::ast;
|
||||
use lib::llvm::ValueRef;
|
||||
use common::*;
|
||||
use build::*;
|
||||
use base::*;
|
||||
use shape::llsize_of;
|
||||
|
||||
export make_free_glue, autoderef, duplicate;
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
|
||||
import syntax::ast::*;
|
||||
import syntax::visit;
|
||||
import syntax::codemap::span;
|
||||
import syntax::print::pprust::stmt_to_str;
|
||||
import aux::{num_constraints, get_fn_info, crate_ctxt, add_node};
|
||||
import ann::empty_ann;
|
||||
import pat_util::pat_binding_ids;
|
||||
use syntax::ast::*;
|
||||
use syntax::visit;
|
||||
use syntax::codemap::span;
|
||||
use syntax::print::pprust::stmt_to_str;
|
||||
use aux::{num_constraints, get_fn_info, crate_ctxt, add_node};
|
||||
use ann::empty_ann;
|
||||
use pat_util::pat_binding_ids;
|
||||
|
||||
fn collect_ids_expr(e: @expr, rs: @mut ~[node_id]) { vec::push(*rs, e.id); }
|
||||
|
||||
|
@ -1,23 +1,23 @@
|
||||
import option::*;
|
||||
import pat_util::*;
|
||||
import syntax::ast::*;
|
||||
import syntax::ast_util::*;
|
||||
import syntax::{visit, codemap};
|
||||
import codemap::span;
|
||||
import std::map::{hashmap, int_hash};
|
||||
import syntax::print::pprust::path_to_str;
|
||||
import tstate::ann::{pre_and_post, pre_and_post_state, empty_ann, prestate,
|
||||
use option::*;
|
||||
use pat_util::*;
|
||||
use syntax::ast::*;
|
||||
use syntax::ast_util::*;
|
||||
use syntax::{visit, codemap};
|
||||
use codemap::span;
|
||||
use std::map::{hashmap, int_hash};
|
||||
use syntax::print::pprust::path_to_str;
|
||||
use tstate::ann::{pre_and_post, pre_and_post_state, empty_ann, prestate,
|
||||
poststate, precond, postcond,
|
||||
set_prestate, set_poststate, set_in_poststate_,
|
||||
extend_prestate, extend_poststate, set_precondition,
|
||||
set_postcondition, ts_ann,
|
||||
clear_in_postcond,
|
||||
clear_in_poststate_};
|
||||
import driver::session::session;
|
||||
import dvec::{dvec, extensions};
|
||||
import tritv::{trit, tfalse, ttrue, dont_care, t};
|
||||
use driver::session::session;
|
||||
use dvec::{dvec, extensions};
|
||||
use tritv::{trit, tfalse, ttrue, dont_care, t};
|
||||
|
||||
import syntax::print::pprust::{constr_args_to_str, lit_to_str};
|
||||
use syntax::print::pprust::{constr_args_to_str, lit_to_str};
|
||||
|
||||
// Used to communicate which operands should be invalidated
|
||||
// to helper functions
|
||||
|
@ -1,22 +1,22 @@
|
||||
|
||||
import syntax::ast;
|
||||
import ast::{stmt, fn_ident, node_id, crate, return_val, noreturn, expr};
|
||||
import syntax::{visit, print};
|
||||
import syntax::codemap::span;
|
||||
import middle::ty;
|
||||
import tstate::ann::{precond, prestate,
|
||||
use syntax::ast;
|
||||
use ast::{stmt, fn_ident, node_id, crate, return_val, noreturn, expr};
|
||||
use syntax::{visit, print};
|
||||
use syntax::codemap::span;
|
||||
use middle::ty;
|
||||
use tstate::ann::{precond, prestate,
|
||||
implies, ann_precond, ann_prestate};
|
||||
import aux::*;
|
||||
use aux::*;
|
||||
|
||||
import util::ppaux::ty_to_str;
|
||||
import bitvectors::*;
|
||||
import annotate::annotate_crate;
|
||||
import collect_locals::mk_f_to_fn_info;
|
||||
import pre_post_conditions::fn_pre_post;
|
||||
import states::find_pre_post_state_fn;
|
||||
import syntax::print::pprust::expr_to_str;
|
||||
import driver::session::session;
|
||||
import std::map::hashmap;
|
||||
use util::ppaux::ty_to_str;
|
||||
use bitvectors::*;
|
||||
use annotate::annotate_crate;
|
||||
use collect_locals::mk_f_to_fn_info;
|
||||
use pre_post_conditions::fn_pre_post;
|
||||
use states::find_pre_post_state_fn;
|
||||
use syntax::print::pprust::expr_to_str;
|
||||
use driver::session::session;
|
||||
use std::map::hashmap;
|
||||
|
||||
fn check_states_expr(e: @expr, fcx: fn_ctxt, v: visit::vt<fn_ctxt>) {
|
||||
visit::visit_expr(e, fcx, v);
|
||||
|
@ -1,14 +1,14 @@
|
||||
import option::*;
|
||||
import pat_util::*;
|
||||
import syntax::ast::*;
|
||||
import syntax::ast_util::*;
|
||||
import syntax::visit;
|
||||
import syntax::codemap::span;
|
||||
import syntax::ast_util::respan;
|
||||
import driver::session::session;
|
||||
import aux::*;
|
||||
import std::map::hashmap;
|
||||
import dvec::{dvec, extensions};
|
||||
use option::*;
|
||||
use pat_util::*;
|
||||
use syntax::ast::*;
|
||||
use syntax::ast_util::*;
|
||||
use syntax::visit;
|
||||
use syntax::codemap::span;
|
||||
use syntax::ast_util::respan;
|
||||
use driver::session::session;
|
||||
use aux::*;
|
||||
use std::map::hashmap;
|
||||
use dvec::{dvec, extensions};
|
||||
|
||||
type ctxt = {cs: @mut ~[sp_constr], tcx: ty::ctxt};
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
import tstate::ann::*;
|
||||
import aux::*;
|
||||
import bitvectors::{bit_num, seq_preconds, seq_postconds,
|
||||
use tstate::ann::*;
|
||||
use aux::*;
|
||||
use bitvectors::{bit_num, seq_preconds, seq_postconds,
|
||||
intersect_states,
|
||||
relax_precond_block, gen};
|
||||
import tritv::*;
|
||||
use tritv::*;
|
||||
|
||||
import pat_util::*;
|
||||
import syntax::ast::*;
|
||||
import syntax::ast_util::*;
|
||||
import syntax::print::pprust::{expr_to_str, stmt_to_str};
|
||||
import syntax::visit;
|
||||
import util::common::{field_exprs, has_nonlocal_exits};
|
||||
import syntax::codemap::span;
|
||||
import driver::session::session;
|
||||
import std::map::hashmap;
|
||||
use pat_util::*;
|
||||
use syntax::ast::*;
|
||||
use syntax::ast_util::*;
|
||||
use syntax::print::pprust::{expr_to_str, stmt_to_str};
|
||||
use syntax::visit;
|
||||
use util::common::{field_exprs, has_nonlocal_exits};
|
||||
use syntax::codemap::span;
|
||||
use driver::session::session;
|
||||
use std::map::hashmap;
|
||||
|
||||
fn find_pre_post_mod(_m: _mod) -> _mod {
|
||||
debug!("implement find_pre_post_mod!");
|
||||
|
@ -1,18 +1,18 @@
|
||||
import ann::*;
|
||||
import aux::*;
|
||||
import tritv::*;
|
||||
use ann::*;
|
||||
use aux::*;
|
||||
use tritv::*;
|
||||
|
||||
import syntax::print::pprust::block_to_str;
|
||||
import bitvectors::*;
|
||||
import pat_util::*;
|
||||
import syntax::ast::*;
|
||||
import syntax::ast_util::*;
|
||||
import syntax::print::pprust::{expr_to_str, stmt_to_str};
|
||||
import syntax::codemap::span;
|
||||
import middle::ty::{expr_ty, type_is_bot};
|
||||
import util::common::{field_exprs, has_nonlocal_exits, may_break};
|
||||
import driver::session::session;
|
||||
import std::map::hashmap;
|
||||
use syntax::print::pprust::block_to_str;
|
||||
use bitvectors::*;
|
||||
use pat_util::*;
|
||||
use syntax::ast::*;
|
||||
use syntax::ast_util::*;
|
||||
use syntax::print::pprust::{expr_to_str, stmt_to_str};
|
||||
use syntax::codemap::span;
|
||||
use middle::ty::{expr_ty, type_is_bot};
|
||||
use util::common::{field_exprs, has_nonlocal_exits, may_break};
|
||||
use driver::session::session;
|
||||
use std::map::hashmap;
|
||||
|
||||
fn forbid_upvar(fcx: fn_ctxt, rhs_id: node_id, sp: span, t: oper_type) {
|
||||
match t {
|
||||
|
@ -1,23 +1,23 @@
|
||||
// #[warn(deprecated_mode)];
|
||||
#[warn(deprecated_pattern)];
|
||||
|
||||
import std::{map, smallintmap};
|
||||
import result::Result;
|
||||
import std::map::hashmap;
|
||||
import driver::session;
|
||||
import session::session;
|
||||
import syntax::{ast, ast_map};
|
||||
import syntax::ast_util;
|
||||
import syntax::ast_util::{is_local, local_def, new_def_hash};
|
||||
import syntax::codemap::span;
|
||||
import metadata::csearch;
|
||||
import util::ppaux::{region_to_str, explain_region, vstore_to_str};
|
||||
import middle::lint;
|
||||
import middle::lint::{get_lint_level, allow};
|
||||
import syntax::ast::*;
|
||||
import syntax::print::pprust::*;
|
||||
import util::ppaux::{ty_to_str, proto_ty_to_str, tys_to_str};
|
||||
import std::serialization::{serialize_Option,
|
||||
use std::{map, smallintmap};
|
||||
use result::Result;
|
||||
use std::map::hashmap;
|
||||
use driver::session;
|
||||
use session::session;
|
||||
use syntax::{ast, ast_map};
|
||||
use syntax::ast_util;
|
||||
use syntax::ast_util::{is_local, local_def, new_def_hash};
|
||||
use syntax::codemap::span;
|
||||
use metadata::csearch;
|
||||
use util::ppaux::{region_to_str, explain_region, vstore_to_str};
|
||||
use middle::lint;
|
||||
use middle::lint::{get_lint_level, allow};
|
||||
use syntax::ast::*;
|
||||
use syntax::print::pprust::*;
|
||||
use util::ppaux::{ty_to_str, proto_ty_to_str, tys_to_str};
|
||||
use std::serialization::{serialize_Option,
|
||||
deserialize_Option};
|
||||
|
||||
export tv_vid, tvi_vid, region_vid, vid;
|
||||
|
@ -38,33 +38,33 @@ independently:
|
||||
|
||||
*/
|
||||
|
||||
import result::Result;
|
||||
import syntax::{ast, ast_util, ast_map};
|
||||
import ast::spanned;
|
||||
import ast::{required, provided};
|
||||
import syntax::ast_map::node_id_to_str;
|
||||
import syntax::ast_util::{local_def, respan, split_trait_methods};
|
||||
import syntax::visit;
|
||||
import metadata::csearch;
|
||||
import driver::session::session;
|
||||
import util::common::may_break;
|
||||
import syntax::codemap::span;
|
||||
import pat_util::{pat_is_variant, pat_id_map};
|
||||
import middle::ty;
|
||||
import middle::ty::{arg, field, node_type_table, mk_nil,
|
||||
use result::Result;
|
||||
use syntax::{ast, ast_util, ast_map};
|
||||
use ast::spanned;
|
||||
use ast::{required, provided};
|
||||
use syntax::ast_map::node_id_to_str;
|
||||
use syntax::ast_util::{local_def, respan, split_trait_methods};
|
||||
use syntax::visit;
|
||||
use metadata::csearch;
|
||||
use driver::session::session;
|
||||
use util::common::may_break;
|
||||
use syntax::codemap::span;
|
||||
use pat_util::{pat_is_variant, pat_id_map};
|
||||
use middle::ty;
|
||||
use middle::ty::{arg, field, node_type_table, mk_nil,
|
||||
ty_param_bounds_and_ty, lookup_public_fields,
|
||||
vstore_uniq};
|
||||
import std::smallintmap;
|
||||
import std::map;
|
||||
import std::map::{hashmap, int_hash};
|
||||
import std::serialization::{serialize_uint, deserialize_uint};
|
||||
import vec::each;
|
||||
import syntax::print::pprust::*;
|
||||
import util::ppaux::{ty_to_str, tys_to_str, region_to_str,
|
||||
use std::smallintmap;
|
||||
use std::map;
|
||||
use std::map::{hashmap, int_hash};
|
||||
use std::serialization::{serialize_uint, deserialize_uint};
|
||||
use vec::each;
|
||||
use syntax::print::pprust::*;
|
||||
use util::ppaux::{ty_to_str, tys_to_str, region_to_str,
|
||||
bound_region_to_str, vstore_to_str};
|
||||
import util::common::{indent, indenter};
|
||||
import std::list;
|
||||
import list::{list, nil, cons};
|
||||
use util::common::{indent, indenter};
|
||||
use std::list;
|
||||
use list::{list, nil, cons};
|
||||
|
||||
export check_crate;
|
||||
export infer;
|
||||
|
@ -42,9 +42,9 @@
|
||||
* an rptr (`&r.T`) use the region `r` that appears in the rptr.
|
||||
*/
|
||||
|
||||
import check::fn_ctxt;
|
||||
import rscope::{anon_rscope, binding_rscope, empty_rscope, in_anon_rscope};
|
||||
import rscope::{in_binding_rscope, region_scope, type_rscope};
|
||||
use check::fn_ctxt;
|
||||
use rscope::{anon_rscope, binding_rscope, empty_rscope, in_anon_rscope};
|
||||
use rscope::{in_binding_rscope, region_scope, type_rscope};
|
||||
|
||||
trait ast_conv {
|
||||
fn tcx() -> ty::ctxt;
|
||||
|
@ -66,18 +66,18 @@ type parameter).
|
||||
|
||||
*/
|
||||
|
||||
import astconv::{ast_conv, ast_path_to_ty, ast_ty_to_ty};
|
||||
import astconv::{ast_region_to_region};
|
||||
import middle::ty::{tv_vid, vid};
|
||||
import regionmanip::{replace_bound_regions_in_fn_ty};
|
||||
import rscope::{anon_rscope, binding_rscope, empty_rscope, in_anon_rscope};
|
||||
import rscope::{in_binding_rscope, region_scope, type_rscope,
|
||||
use astconv::{ast_conv, ast_path_to_ty, ast_ty_to_ty};
|
||||
use astconv::{ast_region_to_region};
|
||||
use middle::ty::{tv_vid, vid};
|
||||
use regionmanip::{replace_bound_regions_in_fn_ty};
|
||||
use rscope::{anon_rscope, binding_rscope, empty_rscope, in_anon_rscope};
|
||||
use rscope::{in_binding_rscope, region_scope, type_rscope,
|
||||
bound_self_region};
|
||||
import syntax::ast::ty_i;
|
||||
import typeck::infer::{resolve_type, force_tvar};
|
||||
import result::{Result, Ok, Err};
|
||||
use syntax::ast::ty_i;
|
||||
use typeck::infer::{resolve_type, force_tvar};
|
||||
use result::{Result, Ok, Err};
|
||||
|
||||
import std::map::{str_hash, uint_hash};
|
||||
use std::map::{str_hash, uint_hash};
|
||||
|
||||
type self_info = {
|
||||
self_ty: ty::t,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import syntax::print::pprust;
|
||||
use syntax::print::pprust;
|
||||
|
||||
fn check_alt(fcx: @fn_ctxt,
|
||||
expr: @ast::expr,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import check::fn_ctxt;
|
||||
use check::fn_ctxt;
|
||||
|
||||
// Requires that the two types unify, and prints an error message if they
|
||||
// don't.
|
||||
|
@ -1,15 +1,15 @@
|
||||
/* Code to handle method lookups (which can be quite complex) */
|
||||
|
||||
import coherence::get_base_type_def_id;
|
||||
import middle::resolve::{Impl, MethodInfo};
|
||||
import middle::ty::{mk_box, mk_rptr, mk_uniq};
|
||||
import syntax::ast::{def_id,
|
||||
use coherence::get_base_type_def_id;
|
||||
use middle::resolve::{Impl, MethodInfo};
|
||||
use middle::ty::{mk_box, mk_rptr, mk_uniq};
|
||||
use syntax::ast::{def_id,
|
||||
sty_static, sty_box, sty_by_ref, sty_region, sty_uniq};
|
||||
import syntax::ast::{sty_value, by_ref, by_copy};
|
||||
import syntax::ast_map;
|
||||
import syntax::ast_map::node_id_to_str;
|
||||
import syntax::ast_util::{dummy_sp, new_def_hash};
|
||||
import dvec::DVec;
|
||||
use syntax::ast::{sty_value, by_ref, by_copy};
|
||||
use syntax::ast_map;
|
||||
use syntax::ast_map::node_id_to_str;
|
||||
use syntax::ast_util::{dummy_sp, new_def_hash};
|
||||
use dvec::DVec;
|
||||
|
||||
enum method_lookup_mode {
|
||||
subtyping_mode,
|
||||
|
@ -17,17 +17,17 @@ this point a bit better.
|
||||
|
||||
*/
|
||||
|
||||
import util::ppaux;
|
||||
import ppaux::{note_and_explain_region, ty_to_str};
|
||||
import syntax::print::pprust;
|
||||
import infer::{resolve_and_force_all_but_regions, fres};
|
||||
import syntax::ast::{def_arg, def_binding, def_local, def_self, def_upvar};
|
||||
import middle::freevars::get_freevars;
|
||||
import middle::kind::check_owned;
|
||||
import middle::pat_util::pat_bindings;
|
||||
import middle::ty::{encl_region, proto_bare, proto_vstore, re_scope};
|
||||
import middle::ty::{ty_fn_proto, vstore_box, vstore_fixed, vstore_slice};
|
||||
import middle::ty::{vstore_uniq};
|
||||
use util::ppaux;
|
||||
use ppaux::{note_and_explain_region, ty_to_str};
|
||||
use syntax::print::pprust;
|
||||
use infer::{resolve_and_force_all_but_regions, fres};
|
||||
use syntax::ast::{def_arg, def_binding, def_local, def_self, def_upvar};
|
||||
use middle::freevars::get_freevars;
|
||||
use middle::kind::check_owned;
|
||||
use middle::pat_util::pat_bindings;
|
||||
use middle::ty::{encl_region, proto_bare, proto_vstore, re_scope};
|
||||
use middle::ty::{ty_fn_proto, vstore_box, vstore_fixed, vstore_slice};
|
||||
use middle::ty::{vstore_uniq};
|
||||
|
||||
enum rcx { rcx_({fcx: @fn_ctxt, mut errors_reported: uint}) }
|
||||
type rvt = visit::vt<@rcx>;
|
||||
|
@ -1,7 +1,7 @@
|
||||
// #[warn(deprecated_mode)];
|
||||
// #[warn(deprecated_pattern)];
|
||||
|
||||
import syntax::print::pprust::{expr_to_str};
|
||||
use syntax::print::pprust::{expr_to_str};
|
||||
|
||||
// Helper functions related to manipulating region types.
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import check::{fn_ctxt, impl_self_ty};
|
||||
import infer::{resolve_type, resolve_and_force_all_but_regions,
|
||||
use check::{fn_ctxt, impl_self_ty};
|
||||
use infer::{resolve_type, resolve_and_force_all_but_regions,
|
||||
fixup_err_to_str};
|
||||
import ast_util::new_def_hash;
|
||||
import syntax::print::pprust;
|
||||
import result::{Result, Ok, Err};
|
||||
use ast_util::new_def_hash;
|
||||
use syntax::print::pprust;
|
||||
use result::{Result, Ok, Err};
|
||||
|
||||
// vtable resolution looks for places where trait bounds are
|
||||
// subsituted in and figures out which vtable is used. There is some
|
||||
|
@ -2,11 +2,11 @@
|
||||
// unresolved type variables and replaces "ty_var" types with their
|
||||
// substitutions.
|
||||
|
||||
import check::{fn_ctxt, lookup_local};
|
||||
import infer::{resolve_type, resolve_region, resolve_all, force_all};
|
||||
use check::{fn_ctxt, lookup_local};
|
||||
use infer::{resolve_type, resolve_region, resolve_all, force_all};
|
||||
export resolve_type_vars_in_fn;
|
||||
export resolve_type_vars_in_expr;
|
||||
import result::{Result, Ok, Err};
|
||||
use result::{Result, Ok, Err};
|
||||
|
||||
fn resolve_type_vars_in_type(fcx: @fn_ctxt, sp: span, typ: ty::t)
|
||||
-> Option<ty::t>
|
||||
|
@ -4,37 +4,37 @@
|
||||
// has at most one implementation for each type. Then we build a mapping from
|
||||
// each trait in the system to its implementations.
|
||||
|
||||
import metadata::csearch::{each_path, get_impl_traits, get_impls_for_mod};
|
||||
import metadata::cstore::{cstore, iter_crate_data};
|
||||
import metadata::decoder::{dl_def, dl_field, dl_impl};
|
||||
import middle::resolve::{Impl, MethodInfo};
|
||||
import middle::ty::{get, lookup_item_type, subst, t, ty_box};
|
||||
import middle::ty::{ty_uniq, ty_ptr, ty_rptr, ty_enum};
|
||||
import middle::ty::{ty_class, ty_nil, ty_bot, ty_bool, ty_int, ty_uint};
|
||||
import middle::ty::{ty_float, ty_estr, ty_evec, ty_rec};
|
||||
import middle::ty::{ty_fn, ty_trait, ty_tup, ty_var, ty_var_integral};
|
||||
import middle::ty::{ty_param, ty_self, ty_type, ty_opaque_box};
|
||||
import middle::ty::{ty_opaque_closure_ptr, ty_unboxed_vec, type_is_var};
|
||||
import middle::typeck::infer::{infer_ctxt, can_mk_subty};
|
||||
import middle::typeck::infer::{new_infer_ctxt, resolve_ivar, resolve_type};
|
||||
import syntax::ast::{crate, def_id, def_mod};
|
||||
import syntax::ast::{item, item_class, item_const, item_enum, item_fn};
|
||||
import syntax::ast::{item_foreign_mod, item_impl, item_mac, item_mod};
|
||||
import syntax::ast::{item_trait, item_ty, local_crate, method, node_id};
|
||||
import syntax::ast::{trait_ref};
|
||||
import syntax::ast_map::node_item;
|
||||
import syntax::ast_util::{def_id_of_def, dummy_sp, new_def_hash};
|
||||
import syntax::codemap::span;
|
||||
import syntax::visit::{default_simple_visitor, default_visitor};
|
||||
import syntax::visit::{mk_simple_visitor, mk_vt, visit_crate, visit_item};
|
||||
import syntax::visit::{visit_mod};
|
||||
import util::ppaux::ty_to_str;
|
||||
use metadata::csearch::{each_path, get_impl_traits, get_impls_for_mod};
|
||||
use metadata::cstore::{cstore, iter_crate_data};
|
||||
use metadata::decoder::{dl_def, dl_field, dl_impl};
|
||||
use middle::resolve::{Impl, MethodInfo};
|
||||
use middle::ty::{get, lookup_item_type, subst, t, ty_box};
|
||||
use middle::ty::{ty_uniq, ty_ptr, ty_rptr, ty_enum};
|
||||
use middle::ty::{ty_class, ty_nil, ty_bot, ty_bool, ty_int, ty_uint};
|
||||
use middle::ty::{ty_float, ty_estr, ty_evec, ty_rec};
|
||||
use middle::ty::{ty_fn, ty_trait, ty_tup, ty_var, ty_var_integral};
|
||||
use middle::ty::{ty_param, ty_self, ty_type, ty_opaque_box};
|
||||
use middle::ty::{ty_opaque_closure_ptr, ty_unboxed_vec, type_is_var};
|
||||
use middle::typeck::infer::{infer_ctxt, can_mk_subty};
|
||||
use middle::typeck::infer::{new_infer_ctxt, resolve_ivar, resolve_type};
|
||||
use syntax::ast::{crate, def_id, def_mod};
|
||||
use syntax::ast::{item, item_class, item_const, item_enum, item_fn};
|
||||
use syntax::ast::{item_foreign_mod, item_impl, item_mac, item_mod};
|
||||
use syntax::ast::{item_trait, item_ty, local_crate, method, node_id};
|
||||
use syntax::ast::{trait_ref};
|
||||
use syntax::ast_map::node_item;
|
||||
use syntax::ast_util::{def_id_of_def, dummy_sp, new_def_hash};
|
||||
use syntax::codemap::span;
|
||||
use syntax::visit::{default_simple_visitor, default_visitor};
|
||||
use syntax::visit::{mk_simple_visitor, mk_vt, visit_crate, visit_item};
|
||||
use syntax::visit::{visit_mod};
|
||||
use util::ppaux::ty_to_str;
|
||||
|
||||
import dvec::DVec;
|
||||
import result::Ok;
|
||||
import std::map::{hashmap, int_hash};
|
||||
import uint::range;
|
||||
import vec::{len, push};
|
||||
use dvec::DVec;
|
||||
use result::Ok;
|
||||
use std::map::{hashmap, int_hash};
|
||||
use uint::range;
|
||||
use vec::{len, push};
|
||||
|
||||
fn get_base_type(inference_context: infer_ctxt, span: span, original_type: t)
|
||||
-> Option<t> {
|
||||
|
@ -20,9 +20,9 @@ are represented as `ty_param()` instances.
|
||||
|
||||
*/
|
||||
|
||||
import astconv::{ast_conv, ty_of_fn_decl, ty_of_arg, ast_ty_to_ty};
|
||||
import ast_util::trait_method_to_ty_method;
|
||||
import rscope::*;
|
||||
use astconv::{ast_conv, ty_of_fn_decl, ty_of_arg, ast_ty_to_ty};
|
||||
use ast_util::trait_method_to_ty_method;
|
||||
use rscope::*;
|
||||
|
||||
fn collect_item_types(ccx: @crate_ctxt, crate: @ast::crate) {
|
||||
|
||||
|
@ -246,39 +246,39 @@ section on "Type Combining" below for details.
|
||||
#[warn(deprecated_mode)];
|
||||
#[warn(deprecated_pattern)];
|
||||
|
||||
import std::smallintmap;
|
||||
import std::smallintmap::smallintmap;
|
||||
import std::map::hashmap;
|
||||
import middle::ty;
|
||||
import middle::ty::{tv_vid, tvi_vid, region_vid, vid,
|
||||
use std::smallintmap;
|
||||
use std::smallintmap::smallintmap;
|
||||
use std::map::hashmap;
|
||||
use middle::ty;
|
||||
use middle::ty::{tv_vid, tvi_vid, region_vid, vid,
|
||||
ty_int, ty_uint, get, terr_fn};
|
||||
import syntax::{ast, ast_util};
|
||||
import syntax::ast::{ret_style, purity};
|
||||
import util::ppaux::{ty_to_str, mt_to_str};
|
||||
import result::{Result, Ok, Err, map_vec, map_vec2, iter_vec2};
|
||||
import ty::{mk_fn, type_is_bot};
|
||||
import check::regionmanip::{replace_bound_regions_in_fn_ty};
|
||||
import driver::session::session;
|
||||
import util::common::{indent, indenter};
|
||||
import ast::{unsafe_fn, impure_fn, pure_fn, extern_fn};
|
||||
import ast::{m_const, m_imm, m_mutbl};
|
||||
import dvec::DVec;
|
||||
import region_var_bindings::{RegionVarBindings};
|
||||
import ast_util::dummy_sp;
|
||||
import cmp::Eq;
|
||||
use syntax::{ast, ast_util};
|
||||
use syntax::ast::{ret_style, purity};
|
||||
use util::ppaux::{ty_to_str, mt_to_str};
|
||||
use result::{Result, Ok, Err, map_vec, map_vec2, iter_vec2};
|
||||
use ty::{mk_fn, type_is_bot};
|
||||
use check::regionmanip::{replace_bound_regions_in_fn_ty};
|
||||
use driver::session::session;
|
||||
use util::common::{indent, indenter};
|
||||
use ast::{unsafe_fn, impure_fn, pure_fn, extern_fn};
|
||||
use ast::{m_const, m_imm, m_mutbl};
|
||||
use dvec::DVec;
|
||||
use region_var_bindings::{RegionVarBindings};
|
||||
use ast_util::dummy_sp;
|
||||
use cmp::Eq;
|
||||
|
||||
// From submodules:
|
||||
import resolve::{resolve_nested_tvar, resolve_rvar, resolve_ivar, resolve_all,
|
||||
use resolve::{resolve_nested_tvar, resolve_rvar, resolve_ivar, resolve_all,
|
||||
force_tvar, force_rvar, force_ivar, force_all, not_regions,
|
||||
resolve_and_force_all_but_regions, resolver};
|
||||
import unify::{vals_and_bindings, root};
|
||||
import integral::{int_ty_set, int_ty_set_all};
|
||||
import combine::{combine_fields, eq_tys};
|
||||
import assignment::Assign;
|
||||
use unify::{vals_and_bindings, root};
|
||||
use integral::{int_ty_set, int_ty_set_all};
|
||||
use combine::{combine_fields, eq_tys};
|
||||
use assignment::Assign;
|
||||
|
||||
import sub::Sub;
|
||||
import lub::Lub;
|
||||
import glb::Glb;
|
||||
use sub::Sub;
|
||||
use lub::Lub;
|
||||
use glb::Glb;
|
||||
|
||||
export infer_ctxt;
|
||||
export new_infer_ctxt;
|
||||
|
@ -48,8 +48,8 @@
|
||||
// A. But this upper-bound might be stricter than what is truly
|
||||
// needed.
|
||||
|
||||
import to_str::to_str;
|
||||
import combine::combine_fields;
|
||||
use to_str::to_str;
|
||||
use combine::combine_fields;
|
||||
|
||||
fn to_ares(+c: cres<ty::t>) -> ares {
|
||||
match c {
|
||||
|
@ -44,7 +44,7 @@
|
||||
// terms of error reporting, although we do not do that properly right
|
||||
// now.
|
||||
|
||||
import to_str::to_str;
|
||||
use to_str::to_str;
|
||||
|
||||
trait combine {
|
||||
fn infcx() -> infer_ctxt;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import combine::*;
|
||||
import lattice::*;
|
||||
import to_str::to_str;
|
||||
use combine::*;
|
||||
use lattice::*;
|
||||
use to_str::to_str;
|
||||
|
||||
enum Glb = combine_fields; // "greatest lower bound" (common subtype)
|
||||
|
||||
|
@ -4,7 +4,7 @@ Code related to integral type inference.
|
||||
|
||||
*/
|
||||
|
||||
import to_str::to_str;
|
||||
use to_str::to_str;
|
||||
|
||||
// Bitvector to represent sets of integral types
|
||||
enum int_ty_set = uint;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import combine::*;
|
||||
import unify::*;
|
||||
import to_str::to_str;
|
||||
use combine::*;
|
||||
use unify::*;
|
||||
use to_str::to_str;
|
||||
|
||||
// ______________________________________________________________________
|
||||
// Lattice operations on variables
|
||||
|
@ -1,6 +1,6 @@
|
||||
import combine::*;
|
||||
import lattice::*;
|
||||
import to_str::to_str;
|
||||
use combine::*;
|
||||
use lattice::*;
|
||||
use to_str::to_str;
|
||||
|
||||
enum Lub = combine_fields; // "subtype", "subregion" etc
|
||||
|
||||
|
@ -305,18 +305,18 @@ because `&x` was created alone, but is relatable to `&A`.
|
||||
#[warn(deprecated_mode)];
|
||||
#[warn(deprecated_pattern)];
|
||||
|
||||
import dvec::DVec;
|
||||
import result::Result;
|
||||
import result::{Ok, Err};
|
||||
import std::map::{hashmap, uint_hash};
|
||||
import std::cell::{Cell, empty_cell};
|
||||
import std::list::{list, nil, cons};
|
||||
use dvec::DVec;
|
||||
use result::Result;
|
||||
use result::{Ok, Err};
|
||||
use std::map::{hashmap, uint_hash};
|
||||
use std::cell::{Cell, empty_cell};
|
||||
use std::list::{list, nil, cons};
|
||||
|
||||
import ty::{region, region_vid, hash_region};
|
||||
import region::is_subregion_of;
|
||||
import syntax::codemap;
|
||||
import to_str::to_str;
|
||||
import util::ppaux::note_and_explain_region;
|
||||
use ty::{region, region_vid, hash_region};
|
||||
use region::is_subregion_of;
|
||||
use syntax::codemap;
|
||||
use to_str::to_str;
|
||||
use util::ppaux::note_and_explain_region;
|
||||
|
||||
export RegionVarBindings;
|
||||
export make_subregion;
|
||||
|
@ -34,8 +34,8 @@
|
||||
// future). If you want to resolve everything but one type, you are
|
||||
// probably better off writing `resolve_all - resolve_ivar`.
|
||||
|
||||
import integral::*;
|
||||
import to_str::to_str;
|
||||
use integral::*;
|
||||
use to_str::to_str;
|
||||
|
||||
const resolve_nested_tvar: uint = 0b00000001;
|
||||
const resolve_rvar: uint = 0b00000010;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import combine::*;
|
||||
import unify::*;
|
||||
import to_str::to_str;
|
||||
use combine::*;
|
||||
use unify::*;
|
||||
use to_str::to_str;
|
||||
|
||||
enum Sub = combine_fields; // "subtype", "subregion" etc
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import integral::{int_ty_set};
|
||||
import unify::{var_value, redirect, root};
|
||||
use integral::{int_ty_set};
|
||||
use unify::{var_value, redirect, root};
|
||||
|
||||
trait to_str {
|
||||
fn to_str(cx: infer_ctxt) -> ~str;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import combine::combine;
|
||||
import integral::*;
|
||||
import to_str::to_str;
|
||||
use combine::combine;
|
||||
use integral::*;
|
||||
use to_str::to_str;
|
||||
|
||||
enum var_value<V:copy, T:copy> {
|
||||
redirect(V),
|
||||
|
@ -1,5 +1,5 @@
|
||||
import result::Result;
|
||||
import syntax::parse::token::special_idents;
|
||||
use result::Result;
|
||||
use syntax::parse::token::special_idents;
|
||||
|
||||
trait region_scope {
|
||||
fn anon_region(span: span) -> Result<ty::region, ~str>;
|
||||
|
@ -1,9 +1,9 @@
|
||||
import std::map::hashmap;
|
||||
import syntax::ast;
|
||||
import ast::{ty, pat};
|
||||
import syntax::codemap::{span};
|
||||
import syntax::visit;
|
||||
import syntax::print;
|
||||
use std::map::hashmap;
|
||||
use syntax::ast;
|
||||
use ast::{ty, pat};
|
||||
use syntax::codemap::{span};
|
||||
use syntax::visit;
|
||||
use syntax::print;
|
||||
|
||||
fn indent<R>(op: fn() -> R) -> R {
|
||||
// Use in conjunction with the log post-processor like `src/etc/indenter`
|
||||
|
@ -1,25 +1,25 @@
|
||||
import std::map::hashmap;
|
||||
import middle::ty;
|
||||
import middle::ty::{arg, canon_mode};
|
||||
import middle::ty::{bound_region, br_anon, br_named, br_self, br_cap_avoid};
|
||||
import middle::ty::{ck_block, ck_box, ck_uniq, ctxt, field, method};
|
||||
import middle::ty::{mt, t};
|
||||
import middle::ty::{re_bound, re_free, re_scope, re_var, re_static, region};
|
||||
import middle::ty::{ty_bool, ty_bot, ty_box, ty_class, ty_enum};
|
||||
import middle::ty::{ty_estr, ty_evec, ty_float, ty_fn, ty_trait, ty_int};
|
||||
import middle::ty::{ty_nil, ty_opaque_box, ty_opaque_closure_ptr, ty_param};
|
||||
import middle::ty::{ty_ptr, ty_rec, ty_rptr, ty_self, ty_tup};
|
||||
import middle::ty::{ty_type, ty_uniq, ty_uint, ty_var, ty_var_integral};
|
||||
import middle::ty::{ty_unboxed_vec, vid};
|
||||
import metadata::encoder;
|
||||
import syntax::codemap;
|
||||
import syntax::codemap::span;
|
||||
import syntax::print::pprust;
|
||||
import syntax::print::pprust::{path_to_str, proto_to_str,
|
||||
use std::map::hashmap;
|
||||
use middle::ty;
|
||||
use middle::ty::{arg, canon_mode};
|
||||
use middle::ty::{bound_region, br_anon, br_named, br_self, br_cap_avoid};
|
||||
use middle::ty::{ck_block, ck_box, ck_uniq, ctxt, field, method};
|
||||
use middle::ty::{mt, t};
|
||||
use middle::ty::{re_bound, re_free, re_scope, re_var, re_static, region};
|
||||
use middle::ty::{ty_bool, ty_bot, ty_box, ty_class, ty_enum};
|
||||
use middle::ty::{ty_estr, ty_evec, ty_float, ty_fn, ty_trait, ty_int};
|
||||
use middle::ty::{ty_nil, ty_opaque_box, ty_opaque_closure_ptr, ty_param};
|
||||
use middle::ty::{ty_ptr, ty_rec, ty_rptr, ty_self, ty_tup};
|
||||
use middle::ty::{ty_type, ty_uniq, ty_uint, ty_var, ty_var_integral};
|
||||
use middle::ty::{ty_unboxed_vec, vid};
|
||||
use metadata::encoder;
|
||||
use syntax::codemap;
|
||||
use syntax::codemap::span;
|
||||
use syntax::print::pprust;
|
||||
use syntax::print::pprust::{path_to_str, proto_to_str,
|
||||
mode_to_str, purity_to_str};
|
||||
import syntax::{ast, ast_util};
|
||||
import syntax::ast_map;
|
||||
import driver::session::session;
|
||||
use syntax::{ast, ast_util};
|
||||
use syntax::ast_map;
|
||||
use driver::session::session;
|
||||
|
||||
fn note_and_explain_region(cx: ctxt, prefix: ~str, region: ty::region) {
|
||||
match explain_region_and_span(cx, region) {
|
||||
|
Loading…
Reference in New Issue
Block a user