mirror of https://github.com/m-labs/artiq.git
compiler/ir_values: support bool operation on VBool
This commit is contained in:
parent
3e4cbba018
commit
d41d06835c
|
@ -115,6 +115,12 @@ class VBool(VInt):
|
||||||
def create_constant(self, b):
|
def create_constant(self, b):
|
||||||
VInt.create_constant(self, int(b))
|
VInt.create_constant(self, int(b))
|
||||||
|
|
||||||
|
def o_bool(self, builder):
|
||||||
|
if builder is None:
|
||||||
|
return VBool()
|
||||||
|
else:
|
||||||
|
return self
|
||||||
|
|
||||||
# Operators
|
# Operators
|
||||||
|
|
||||||
def _make_unary_operator(op_name):
|
def _make_unary_operator(op_name):
|
||||||
|
|
Loading…
Reference in New Issue