@@ -45,32 +45,33 @@ pub struct config {
45
45
float_type : float_ty
46
46
}
47
47
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 ;
65
65
pub 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 ;
74
75
75
76
pub fn debugging_opts_map ( ) -> ~[ ( ~str , ~str , uint ) ] {
76
77
~[ ( ~"verbose", ~"in general, enable more debug printouts", verbose) ,
@@ -112,6 +113,9 @@ pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] {
112
113
( ~"lint-llvm",
113
114
~"Run the LLVM lint pass on the pre-optimization IR ",
114
115
lint_llvm) ,
116
+ ( ~"once-fns",
117
+ ~"Allow ' once fn' closures to deinitialize captured variables",
118
+ once_fns) ,
115
119
]
116
120
}
117
121
@@ -293,6 +297,7 @@ impl Session_ {
293
297
pub fn debug_borrows ( @self ) -> bool {
294
298
self . opts . optimize == No && !self . debugging_opt ( no_debug_borrows)
295
299
}
300
+ pub fn once_fns ( @self ) -> bool { self . debugging_opt ( once_fns) }
296
301
297
302
// pointless function, now...
298
303
pub fn str_of ( @self , id : ast:: ident ) -> @str {
0 commit comments