Skip to content

Commit a22a1e5

Browse files
committed
---
yaml --- r: 147607 b: refs/heads/try2 c: a74138e h: refs/heads/master i: 147605: 20788e2 147603: 12021e9 147599: 80f7b4b v: v3
1 parent 79392a0 commit a22a1e5

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: b80a111e19d9ac8e1847ea406c099f42a8ff7310
8+
refs/heads/try2: a74138ed2253b792760f1fa6ab88d6b3d28a07e9
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/trans/debuginfo.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ impl FunctionDebugContext {
250250
struct FunctionDebugContextData {
251251
scope_map: RefCell<HashMap<ast::NodeId, DIScope>>,
252252
fn_metadata: DISubprogram,
253-
argument_counter: uint,
253+
argument_counter: Cell<uint>,
254254
source_locations_enabled: bool,
255255
}
256256

@@ -460,8 +460,8 @@ pub fn create_self_argument_metadata(bcx: @Block,
460460

461461
let argument_index = {
462462
let counter = &mut bcx.fcx.debug_context.get_mut_ref(bcx.ccx(), span).argument_counter;
463-
let argument_index = *counter;
464-
*counter += 1;
463+
let argument_index = counter.get();
464+
counter.set(argument_index + 1);
465465
argument_index
466466
};
467467

@@ -538,9 +538,9 @@ pub fn create_argument_metadata(bcx: @Block,
538538
let argument_ident = ast_util::path_to_ident(path_ref);
539539

540540
let argument_index = {
541-
let counter = &mut fcx.debug_context.get_mut_ref(cx, span).argument_counter;
542-
let argument_index = *counter;
543-
*counter += 1;
541+
let counter = &fcx.debug_context.get_mut_ref(cx, span).argument_counter;
542+
let argument_index = counter.get();
543+
counter.set(argument_index + 1);
544544
argument_index
545545
};
546546

@@ -761,10 +761,10 @@ pub fn create_function_debug_context(cx: &CrateContext,
761761
});
762762

763763
// Initialize fn debug context (including scope map and namespace map)
764-
let mut fn_debug_context = ~FunctionDebugContextData {
764+
let fn_debug_context = ~FunctionDebugContextData {
765765
scope_map: RefCell::new(HashMap::new()),
766766
fn_metadata: fn_metadata,
767-
argument_counter: 1,
767+
argument_counter: Cell::new(1),
768768
source_locations_enabled: false,
769769
};
770770

0 commit comments

Comments
 (0)