@@ -45,32 +45,33 @@ pub struct config {
4545 float_type : float_ty
4646}
4747
48- pub static verbose: uint = 1 << 0 ;
49- pub static time_passes: uint = 1 << 1 ;
50- pub static count_llvm_insns: uint = 1 << 2 ;
51- pub static time_llvm_passes: uint = 1 << 3 ;
52- pub static trans_stats: uint = 1 << 4 ;
53- pub static asm_comments: uint = 1 << 5 ;
54- pub static no_verify: uint = 1 << 6 ;
55- pub static trace: uint = 1 << 7 ;
56- pub static coherence: uint = 1 << 8 ;
57- pub static borrowck_stats: uint = 1 << 9 ;
58- pub static borrowck_note_pure: uint = 1 << 10 ;
59- pub static borrowck_note_loan: uint = 1 << 11 ;
60- pub static no_landing_pads: uint = 1 << 12 ;
61- pub static debug_llvm: uint = 1 << 13 ;
62- pub static count_type_sizes: uint = 1 << 14 ;
63- pub static meta_stats: uint = 1 << 15 ;
64- pub static no_opt: uint = 1 << 16 ;
48+ pub static verbose: uint = 1 << 0 ;
49+ pub static time_passes: uint = 1 << 1 ;
50+ pub static count_llvm_insns: uint = 1 << 2 ;
51+ pub static time_llvm_passes: uint = 1 << 3 ;
52+ pub static trans_stats: uint = 1 << 4 ;
53+ pub static asm_comments: uint = 1 << 5 ;
54+ pub static no_verify: uint = 1 << 6 ;
55+ pub static trace: uint = 1 << 7 ;
56+ pub static coherence: uint = 1 << 8 ;
57+ pub static borrowck_stats: uint = 1 << 9 ;
58+ pub static borrowck_note_pure: uint = 1 << 10 ;
59+ pub static borrowck_note_loan: uint = 1 << 11 ;
60+ pub static no_landing_pads: uint = 1 << 12 ;
61+ pub static debug_llvm: uint = 1 << 13 ;
62+ pub static count_type_sizes: uint = 1 << 14 ;
63+ pub static meta_stats: uint = 1 << 15 ;
64+ pub static no_opt: uint = 1 << 16 ;
6565pub static no_monomorphic_collapse: uint = 1 << 17 ;
66- pub static gc: uint = 1 << 18 ;
67- pub static jit: uint = 1 << 19 ;
68- pub static debug_info: uint = 1 << 20 ;
69- pub static extra_debug_info: uint = 1 << 21 ;
70- pub static statik: uint = 1 << 22 ;
71- pub static print_link_args: uint = 1 << 23 ;
72- pub static no_debug_borrows: uint = 1 << 24 ;
73- pub static lint_llvm : uint = 1 << 25 ;
66+ pub static gc: uint = 1 << 18 ;
67+ pub static jit: uint = 1 << 19 ;
68+ pub static debug_info: uint = 1 << 20 ;
69+ pub static extra_debug_info: uint = 1 << 21 ;
70+ pub static statik: uint = 1 << 22 ;
71+ pub static print_link_args: uint = 1 << 23 ;
72+ pub static no_debug_borrows: uint = 1 << 24 ;
73+ pub static lint_llvm: uint = 1 << 25 ;
74+ pub static once_fns: uint = 1 << 26 ;
7475
7576pub fn debugging_opts_map ( ) -> ~[ ( ~str , ~str , uint ) ] {
7677 ~[ ( ~"verbose", ~"in general, enable more debug printouts", verbose) ,
@@ -112,6 +113,9 @@ pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] {
112113 ( ~"lint-llvm",
113114 ~"Run the LLVM lint pass on the pre-optimization IR ",
114115 lint_llvm) ,
116+ ( ~"once-fns",
117+ ~"Allow ' once fn' closures to deinitialize captured variables",
118+ once_fns) ,
115119 ]
116120}
117121
@@ -293,6 +297,7 @@ impl Session_ {
293297 pub fn debug_borrows ( @self ) -> bool {
294298 self . opts . optimize == No && !self . debugging_opt ( no_debug_borrows)
295299 }
300+ pub fn once_fns ( @self ) -> bool { self . debugging_opt ( once_fns) }
296301
297302 // pointless function, now...
298303 pub fn str_of ( @self , id : ast:: ident ) -> @str {
0 commit comments