| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Rakudo
Revision: 30772
Author: chromatic
Date: 05 Sep 2008 02:16:09
Changes:[Rakudo] Improved caller lookup algorithm in !OUTER; it's slightly more clear
this way. It also appears to clean up RT #58578 (reported by Moritz Lenz).
Neither Patrick nor I trust it completely though.
| ... | ...@@ -88,18 +88,18 @@ | |
| 88 | 88 | .local int depth |
| 89 | 89 | depth = min + 1 |
| 90 | 90 | .local pmc lexpad, value |
| 91 | $P0 = getinterp | |
| 91 | 92 | push_eh outer_err |
| 92 | 93 | null value |
| 93 | 94 | loop: |
| 94 | unless max >= min goto done | |
| 95 | $P0 = getinterp | |
| 96 | 95 | lexpad = $P0['outer', depth] |
| 97 | 96 | unless lexpad goto next |
| 98 | 97 | value = lexpad[name] |
| 99 | 98 | unless null value goto done |
| 100 | 99 | next: |
| 100 | # depth goes from min + 1 to max + 1 | |
| 101 | if depth > max goto done | |
| 101 | 102 | inc depth |
| 102 | dec max | |
| 103 | 103 | goto loop |
| 104 | 104 | done: |
| 105 | 105 | pop_eh |