mirror of https://github.com/m-labs/artiq.git
Commit missing parts of 8aa34ee9
.
This commit is contained in:
parent
79d020dd3a
commit
ff0ab736e9
|
@ -1445,8 +1445,10 @@ class ARTIQIRGenerator(algorithm.Visitor):
|
||||||
|
|
||||||
# Keep this function with builtins.TException.attributes.
|
# Keep this function with builtins.TException.attributes.
|
||||||
def alloc_exn(self, typ, message=None, param0=None, param1=None, param2=None):
|
def alloc_exn(self, typ, message=None, param0=None, param1=None, param2=None):
|
||||||
|
typ = typ.find()
|
||||||
attributes = [
|
attributes = [
|
||||||
ir.Constant(typ.find().name, ir.TExceptionTypeInfo()), # typeinfo
|
ir.Constant("{}:{}".format(typ.id, typ.name),
|
||||||
|
ir.TExceptionTypeInfo()), # typeinfo
|
||||||
ir.Constant("<not thrown>", builtins.TStr()), # file
|
ir.Constant("<not thrown>", builtins.TStr()), # file
|
||||||
ir.Constant(0, builtins.TInt32()), # line
|
ir.Constant(0, builtins.TInt32()), # line
|
||||||
ir.Constant(0, builtins.TInt32()), # column
|
ir.Constant(0, builtins.TInt32()), # column
|
||||||
|
@ -1454,7 +1456,7 @@ class ARTIQIRGenerator(algorithm.Visitor):
|
||||||
]
|
]
|
||||||
|
|
||||||
if message is None:
|
if message is None:
|
||||||
attributes.append(ir.Constant(typ.find().name, builtins.TStr()))
|
attributes.append(ir.Constant(typ.name, builtins.TStr()))
|
||||||
else:
|
else:
|
||||||
attributes.append(message) # message
|
attributes.append(message) # message
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue