forked from M-Labs/artiq
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.
|
||||
def alloc_exn(self, typ, message=None, param0=None, param1=None, param2=None):
|
||||
typ = typ.find()
|
||||
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(0, builtins.TInt32()), # line
|
||||
ir.Constant(0, builtins.TInt32()), # column
|
||||
|
@ -1454,7 +1456,7 @@ class ARTIQIRGenerator(algorithm.Visitor):
|
|||
]
|
||||
|
||||
if message is None:
|
||||
attributes.append(ir.Constant(typ.find().name, builtins.TStr()))
|
||||
attributes.append(ir.Constant(typ.name, builtins.TStr()))
|
||||
else:
|
||||
attributes.append(message) # message
|
||||
|
||||
|
|
Loading…
Reference in New Issue