diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-09-19 15:30:58 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-09-19 15:32:56 -0700 |
| commit | b1bf9ef5aef81eec4a1b0e00fc179e7a0e1766b6 (patch) | |
| tree | 5ebb7ff6e9943883ebd10cde9e4fb24bd5a39619 /src/comp/syntax/ext | |
| parent | 939a9dd738e2766eea7d3e012350c0484cda5fbb (diff) | |
Break fold's circular reference during unwinding
This converts the AST fold into a resource that breaks it's own circular reference (just a temporary workaround until GC), so that failure during fold will unwind correctly. Issue #936
Diffstat (limited to 'src/comp/syntax/ext')
| -rw-r--r-- | src/comp/syntax/ext/expand.rs | 1 | ||||
| -rw-r--r-- | src/comp/syntax/ext/simplext.rs | 2 |
2 files changed, 0 insertions, 3 deletions
diff --git a/src/comp/syntax/ext/expand.rs b/src/comp/syntax/ext/expand.rs index 5fd2b1692da..53b06824320 100644 --- a/src/comp/syntax/ext/expand.rs +++ b/src/comp/syntax/ext/expand.rs @@ -56,7 +56,6 @@ fn expand_crate(sess: session::session, c: @crate) -> @crate { with *afp}; let f = make_fold(f_pre); let res = @f.fold_crate(*c); - dummy_out(f); //temporary: kill circular reference ret res; } diff --git a/src/comp/syntax/ext/simplext.rs b/src/comp/syntax/ext/simplext.rs index f81e101c17b..c6b6056bbc4 100644 --- a/src/comp/syntax/ext/simplext.rs +++ b/src/comp/syntax/ext/simplext.rs @@ -206,7 +206,6 @@ fn transcribe(cx: ext_ctxt, b: bindings, body: @expr) -> @expr { new_span: bind new_span(cx, _) with *afp}; let f = make_fold(f_pre); let result = f.fold_expr(body); - dummy_out(f); //temporary: kill circular reference ret result; } @@ -258,7 +257,6 @@ iter free_vars(b: bindings, e: @expr) -> ident { with *default_ast_fold()}; let f = make_fold(f_pre); f.fold_expr(e); // ignore result - dummy_out(f); for each id: ident in idents.keys() { put id; } } |
