| 75 | return rv |
| 76 | |
| 77 | def store(self, name): |
| 78 | self.stores.add(name) |
| 79 | |
| 80 | # If we have not see the name referenced yet, we need to figure |
| 81 | # out what to set it to. |
| 82 | if name not in self.refs: |
| 83 | # If there is a parent scope we check if the name has a |
| 84 | # reference there. If it does it means we might have to alias |
| 85 | # to a variable there. |
| 86 | if self.parent is not None: |
| 87 | outer_ref = self.parent.find_ref(name) |
| 88 | if outer_ref is not None: |
| 89 | self._define_ref(name, load=(VAR_LOAD_ALIAS, outer_ref)) |
| 90 | return |
| 91 | |
| 92 | # Otherwise we can just set it to undefined. |
| 93 | self._define_ref(name, load=(VAR_LOAD_UNDEFINED, None)) |
| 94 | |
| 95 | def declare_parameter(self, name): |
| 96 | self.stores.add(name) |