nac3artiq: type check host int bound instead of panic when codegen #262

Merged
sb10q merged 1 commits from host_int_bound into master 2022-04-18 14:44:58 +08:00
Collaborator

This is an attempt to fix #203 by checking the integer bound at type check phase.

error msg now instead of panic:

nac3artiq.CompileError: type error inside object launching kernel: error when getting type of field `phaser0` (error when getting type of field `channel` (type error (error when getting type of field `trf_mmap` (type error (2425360398 is not in the range of int32) at element #5 of the list)) at element #0 of the list))

The nested bracket seems to be a bit complicated indeed.. but this does provide a useful trace to the user of where things are wrong, so this should be fine?

Or we could somehow format the nested error messages in a different manner (indented lines or something?)

This is an attempt to fix #203 by checking the integer bound at type check phase. error msg now instead of panic: ``` nac3artiq.CompileError: type error inside object launching kernel: error when getting type of field `phaser0` (error when getting type of field `channel` (type error (error when getting type of field `trf_mmap` (type error (2425360398 is not in the range of int32) at element #5 of the list)) at element #0 of the list)) ``` The nested bracket seems to be a bit complicated indeed.. but this does provide a useful trace to the user of where things are wrong, so this should be fine? Or we could somehow format the nested error messages in a different manner (indented lines or something?)
ychenfo force-pushed host_int_bound from a9a701c993 to 21c570cdfa 2022-04-13 12:32:41 +08:00 Compare
ychenfo force-pushed host_int_bound from 21c570cdfa to 1314568449 2022-04-14 00:52:40 +08:00 Compare
ychenfo force-pushed host_int_bound from 1314568449 to f14b32be67 2022-04-16 03:01:43 +08:00 Compare
sb10q merged commit f14b32be67 into master 2022-04-18 14:44:58 +08:00
sb10q deleted branch host_int_bound 2022-04-18 14:45:00 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#262
No description provided.