Turn on monomorphization by default

This commit is contained in:
Marijn Haverbeke 2012-03-08 11:21:22 +01:00
parent c67679ea03
commit 0e5da379dd
4 changed files with 1 additions and 7 deletions

View File

@ -366,7 +366,6 @@ fn build_session_options(match: getopts::match,
if opt_present(match, "no-lint-ctypes") {
lint_opts += [(lint::ctypes, false)];
}
let monomorphize = opt_present(match, "monomorphize");
let output_type =
if parse_only || no_trans {
@ -445,7 +444,6 @@ fn build_session_options(match: getopts::match,
parse_only: parse_only,
no_trans: no_trans,
no_asm_comments: no_asm_comments,
monomorphize: monomorphize,
warn_unused_imports: warn_unused_imports,
enforce_mut_vars: enforce_mut_vars};
ret sopts;
@ -520,7 +518,6 @@ fn opts() -> [getopts::opt] {
optflag("time-passes"), optflag("time-llvm-passes"),
optflag("no-verify"),
optflag("no-lint-ctypes"),
optflag("monomorphize"),
optmulti("cfg"), optflag("test"),
optflag("lib"), optflag("bin"), optflag("static"), optflag("gc"),
optflag("no-asm-comments"),

View File

@ -45,7 +45,6 @@ type options =
parse_only: bool,
no_trans: bool,
no_asm_comments: bool,
monomorphize: bool,
warn_unused_imports: bool,
enforce_mut_vars: bool};

View File

@ -2229,8 +2229,7 @@ fn lval_static_fn(bcx: block, fn_id: ast::def_id, id: ast::node_id,
// The awkwardness below mostly stems from the fact that we're mixing
// monomorphized and non-monomorphized functions at the moment. If
// monomorphizing becomes the only approach, this'll be much simpler.
if ccx.sess.opts.monomorphize &&
(option::is_some(substs) || tys.len() > 0u) &&
if (option::is_some(substs) || tys.len() > 0u) &&
fn_id.crate == ast::local_crate &&
!vec::any(tys, {|t| ty::type_has_params(t)}) {
let mono = alt substs {

View File

@ -145,7 +145,6 @@ fn build_session() -> (session::session, @mutable bool) {
parse_only: false,
no_trans: false,
no_asm_comments: false,
monomorphize: false,
warn_unused_imports: false,
enforce_mut_vars: false
};