Lines Matching refs:guards

80         # meaning that the given literal is referenced under the given guards at
90 for guards in guard_stack:
91 guard_set.update(guards)
117 # meaning that all the listed guards (conditionals) have to hold for the
129 guards = guard_stack[-1]
130 guards[-1] = '!(%s)' % guards[-1]
131 guards.append(process_guard(elif_match.group(1)))
133 guards = guard_stack[-1]
134 guards[-1] = '!(%s)' % guards[-1]
170 # referenced under various guards, keep the one that is more generic.
175 guards = [set(guard_tuple) for guard_tuple in uses[str_ref].keys()]
176 for i, guard_i in enumerate(guards):
179 for j, guard_j in enumerate(guards):
183 guards[j] = None
184 guards = {tuple(sorted(guard)) for guard in guards if guard is not None}
186 extended_defs.append((str_ref, str_value, guards))
189 print('debug: magic string definitions (with guards): {dump}'
195 def guards_to_str(guards):
197 for guard in sorted(guards))
225 for str_ref, str_value, guards in defs:
226 if last_guards != guards:
229 if () not in guards:
230 print('#if {guards}'.format(guards=guards_to_str(guards)), file=gen_file)
235 last_guards = guards
247 for str_ref, str_value, guards in defs:
249 if () not in guards and () in last_guards:
250 print('#if {guards}'.format(guards=guards_to_str(guards)), file=gen_file)
251 elif () not in guards and () not in last_guards:
252 if guards == last_guards:
254 print('#elif {guards}'.format(guards=guards_to_str(guards)), file=gen_file)
255 elif () in guards and () not in last_guards:
261 if () in guards:
264 last_guards = guards