Remove deep scope traversal in revoke_clean
It is not needed anymore.
This commit is contained in:
parent
a8dd52ed36
commit
acbc4aa9f8
1 changed files with 2 additions and 8 deletions
|
@ -297,14 +297,8 @@ fn revoke_clean(cx: @block_ctxt, val: ValueRef) {
|
||||||
}
|
}
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
// The value does not have a cleanup associated with it. Continue to next
|
// The value does not have a cleanup associated with it.
|
||||||
// scope.
|
if found == -1 { ret; }
|
||||||
if found == -1 {
|
|
||||||
alt sc_cx.parent {
|
|
||||||
parent_some(parent) { revoke_clean(parent, val); } _ {}
|
|
||||||
}
|
|
||||||
ret;
|
|
||||||
}
|
|
||||||
// We found the cleanup and remove it
|
// We found the cleanup and remove it
|
||||||
sc_cx.cleanups =
|
sc_cx.cleanups =
|
||||||
std::vec::slice(sc_cx.cleanups, 0u, found as uint) +
|
std::vec::slice(sc_cx.cleanups, 0u, found as uint) +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue