forked from M-Labs/artiq
1
0
Fork 0

Commit missing parts of 8aa34ee9.

This commit is contained in:
whitequark 2015-12-31 22:36:17 +08:00
parent 79d020dd3a
commit ff0ab736e9
1 changed files with 10 additions and 8 deletions

View File

@ -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