Home
last modified time | relevance | path

Searched refs:ifcond (Results 1 – 12 of 12) sorted by relevance

/openbmc/qemu/scripts/qapi/
H A Dcommon.py202 def gen_ifcond(ifcond: Optional[Union[str, Dict[str, Any]]],
206 def do_gen(ifcond: Union[str, Dict[str, Any]],
208 if isinstance(ifcond, str):
209 return cond_fmt % ifcond
210 assert isinstance(ifcond, dict) and len(ifcond) == 1
211 if 'not' in ifcond:
212 return not_fmt % do_gen(ifcond['not'], True)
213 if 'all' in ifcond:
214 gen = gen_infix(all_operator, ifcond['all'])
216 gen = gen_infix(any_operator, ifcond['any'])
[all …]
H A Dtypes.py56 ret += memb.ifcond.gen_if()
62 ret += memb.ifcond.gen_endif()
101 ret += memb.ifcond.gen_if()
106 ret += memb.ifcond.gen_endif()
146 ret += memb.ifcond.gen_if()
156 ret += memb.ifcond.gen_endif()
160 def gen_object(name: str, ifcond: QAPISchemaIfCond,
173 ret += gen_object(obj.name, obj.ifcond, obj.base,
179 ret += ifcond.gen_if()
213 ret += ifcond.gen_endif()
[all …]
H A Dintrospect.py90 def __init__(self, value: _ValueT, ifcond: QAPISchemaIfCond,
94 self.ifcond = ifcond
123 if obj.ifcond.is_present():
124 ret += obj.ifcond.gen_if()
126 if obj.ifcond.is_present():
127 ret += '\n' + obj.ifcond.gen_endif()
254 return [Annotated(f.name, f.ifcond) for f in features]
257 ifcond: QAPISchemaIfCond = QAPISchemaIfCond(),
281 self._trees.append(Annotated(obj, ifcond, comment))
290 return Annotated(obj, member.ifcond)
[all …]
H A Dvisit.py78 ret += memb.ifcond.gen_if()
84 ret += memb.ifcond.gen_endif()
96 ret += memb.ifcond.gen_if()
133 ret += memb.ifcond.gen_endif()
147 ret += var.ifcond.gen_if()
163 ret += var.ifcond.gen_endif()
250 ret += var.ifcond.gen_if()
276 ret += var.ifcond.gen_endif()
375 ifcond: QAPISchemaIfCond,
379 with ifcontext(ifcond, self._genh, self._genc):
[all …]
H A Dschema.py52 ifcond: Optional[Union[str, Dict[str, object]]] = None,
54 self.ifcond = ifcond
57 return cgen_ifcond(self.ifcond)
66 return docgen_ifcond(self.ifcond)
69 return bool(self.ifcond)
123 ifcond: Optional[QAPISchemaIfCond] = None,
131 self._ifcond = ifcond or QAPISchemaIfCond()
156 def ifcond(self) -> QAPISchemaIfCond: member in QAPISchemaDefinition
194 ifcond: QAPISchemaIfCond,
205 ifcond: QAPISchemaIfCond,
[all …]
H A Dgen.py95 def _wrap_ifcond(ifcond: QAPISchemaIfCond, before: str, after: str) -> str:
105 out += ifcond.gen_if()
107 out += ifcond.gen_endif()
123 assert not memb.ifcond.is_present()
140 def start_if(self, ifcond: QAPISchemaIfCond) -> None:
142 self._start_if = (ifcond, self._body, self._preamble)
207 def ifcontext(ifcond: QAPISchemaIfCond, *args: QAPIGenCCode) -> Iterator[None]:
228 arg.start_if(ifcond)
H A Dcommands.py69 assert not memb.ifcond.is_present()
376 ifcond: QAPISchemaIfCond,
395 with ifcontext(ret_type.ifcond,
398 with ifcontext(ifcond, self._genh, self._genc):
407 with ifcontext(ifcond, self._genh, self._genc):
H A Devents.py232 ifcond: QAPISchemaIfCond,
236 with ifcontext(ifcond, self._genh, self._genc):
H A Dexpr.py306 ifcond = expr.get('if')
307 if ifcond is None:
310 _check_if(ifcond)
/openbmc/qemu/tests/qapi-schema/
H A Dtest-qapi.py33 def visit_enum_type(self, name, info, ifcond, features, members, prefix): argument
39 self._print_if(m.ifcond, indent=8)
41 self._print_if(ifcond)
44 def visit_array_type(self, name, info, ifcond, element_type): argument
48 self._print_if(ifcond)
50 def visit_object_type(self, name, info, ifcond, features, argument
58 self._print_if(m.ifcond, 8)
61 self._print_if(ifcond)
64 def visit_alternate_type(self, name, info, ifcond, features, argument
68 self._print_if(ifcond)
[all …]
/openbmc/qemu/docs/sphinx/
H A Dqapidoc.py116 def _nodes_for_ifcond(self, ifcond, with_if=True): argument
123 doc = ifcond.docgen()
148 if member.ifcond.is_present():
149 term.extend(self._nodes_for_ifcond(member.ifcond))
163 if variant.ifcond.is_present():
164 term.extend(self._nodes_for_ifcond(variant.ifcond))
208 if section.member.ifcond.is_present():
209 termtext.extend(self._nodes_for_ifcond(section.member.ifcond))
285 def _nodes_for_if_section(self, ifcond): argument
288 if ifcond.is_present():
[all …]
/openbmc/qemu/hw/acpi/
H A Dnvdimm.c1155 Aml *whilectx, *ifcond, *ifctx, *elsectx, *fit; in nvdimm_build_fit() local
1188 ifcond = aml_equal(aml_int(NVDIMM_DSM_RET_STATUS_SUCCESS), in nvdimm_build_fit()
1190 ifctx = aml_if(aml_lnot(ifcond)); in nvdimm_build_fit()