Remove deep scope traversal in revoke_clean

It is not needed anymore.
This commit is contained in:
Marijn Haverbeke 2011-11-23 10:32:24 +01:00
parent a8dd52ed36
commit acbc4aa9f8
1 changed files with 2 additions and 8 deletions

View File

@ -297,14 +297,8 @@ fn revoke_clean(cx: @block_ctxt, val: ValueRef) {
}
i += 1;
}
// The value does not have a cleanup associated with it. Continue to next
// scope.
if found == -1 {
alt sc_cx.parent {
parent_some(parent) { revoke_clean(parent, val); } _ {}
}
ret;
}
// The value does not have a cleanup associated with it.
if found == -1 { ret; }
// We found the cleanup and remove it
sc_cx.cleanups =
std::vec::slice(sc_cx.cleanups, 0u, found as uint) +