about summary refs log tree commit diff
path: root/src/comp/middle/debuginfo.rs
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2012-02-17 13:17:40 +0100
committerMarijn Haverbeke <marijnh@gmail.com>2012-02-17 23:03:12 +0100
commitff429645461c83dca048d8a7088c04ee15cc96c8 (patch)
treeb0e7f4ff8ff8becd67aa3f90fcdbf7b5cb029a18 /src/comp/middle/debuginfo.rs
parent1c1261bcb86841cc5fdedd9db0f0ced8a178cb4d (diff)
Clean up some of trans using block combinators
`with_scope` and `with_cond` can be used to wrap a piece of code in a
scope block, or conditionalize it on a value, without doing all the
context-creation and jumping by hand.

Also renames @block_ctxt to block to reduce noise.
Diffstat (limited to 'src/comp/middle/debuginfo.rs')
-rw-r--r--src/comp/middle/debuginfo.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/comp/middle/debuginfo.rs b/src/comp/middle/debuginfo.rs
index 1349a43e7e0..efd9203911c 100644
--- a/src/comp/middle/debuginfo.rs
+++ b/src/comp/middle/debuginfo.rs
@@ -224,7 +224,7 @@ fn line_from_span(cm: codemap::codemap, sp: span) -> uint {
     codemap::lookup_char_pos(cm, sp.lo).line
 }
 
-fn create_block(cx: @block_ctxt) -> @metadata<block_md> {
+fn create_block(cx: block) -> @metadata<block_md> {
     let cache = get_cache(bcx_ccx(cx));
     let cx = cx;
     while option::is_none(cx.block_span) {
@@ -677,7 +677,7 @@ fn create_var(type_tag: int, context: ValueRef, name: str, file: ValueRef,
     ret llmdnode(lldata);
 }
 
-fn create_local_var(bcx: @block_ctxt, local: @ast::local)
+fn create_local_var(bcx: block, local: @ast::local)
     -> @metadata<local_var_md> unsafe {
     let cx = bcx_ccx(bcx);
     let cache = get_cache(cx);
@@ -728,7 +728,7 @@ fn create_local_var(bcx: @block_ctxt, local: @ast::local)
     ret mdval;
 }
 
-fn create_arg(bcx: @block_ctxt, arg: ast::arg, sp: span)
+fn create_arg(bcx: block, arg: ast::arg, sp: span)
     -> @metadata<argument_md> unsafe {
     let fcx = bcx_fcx(bcx);
     let cx = fcx_ccx(fcx);
@@ -763,7 +763,7 @@ fn create_arg(bcx: @block_ctxt, arg: ast::arg, sp: span)
     ret mdval;
 }
 
-fn update_source_pos(cx: @block_ctxt, s: span) {
+fn update_source_pos(cx: block, s: span) {
     if !bcx_ccx(cx).sess.opts.debuginfo {
         ret;
     }