Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lang] Passing DebugInfo instead of std::string traceback (#8293)
Issue: # ### Brief Summary <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at 3304bee</samp> Refactor the IR code to use `DebugInfo` objects to store and pass source info. This simplifies the IR construction and debugging, and avoids duplication of the `tb` argument. Modify various files in `python/taichi/lang` and `taichi/ir` to use the new `DebugInfo` constructor and argument. ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at 3304bee</samp> * Unify the way source info is stored and passed in the IR by using `DebugInfo` objects instead of `Traceback` objects or raw strings. ([link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-2e623ee0b0eec1b200fead36c0627a3c54738f6d83d79757398dc67decc01da8L91-R91), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-3e22417ffade4af0564893b98dc5101d714b8ba6fd4423ab5bc5129e360fee8fL991-R991), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-3e22417ffade4af0564893b98dc5101d714b8ba6fd4423ab5bc5129e360fee8fL1000-R1000), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-99744c5ae5f6a754d6f68408fdc64fb0d6097216518a7f3d1ef43ffe12599577L253-R262), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-c48bb572255ef55d0c9fd89c9febab88b9668e10dfcfc1fac88feb1be7bd94caL600-R600), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-c48bb572255ef55d0c9fd89c9febab88b9668e10dfcfc1fac88feb1be7bd94caL615-R615), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-059028cb0798284bed05638becbc32d256736846de19746e196fe5f5ee7fd061L1361-R1361), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-aee943d584058490d7717d34c02a3783d3487694dc091653d42b202e45b1e097L69-R69), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-9d4212518d49c780c1b10ace5a5d873aed525373a2751e7d888f164ea51edd7fR44-R47), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L41-R44), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L281-R287), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L458-R459), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L465-R466), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L604-R609), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L625-R624), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L633-R635), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L709-R707), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L735-R733), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L743-R741), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L757-R761), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L792-R791), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L800-R801), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L807), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L948-R947), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L955-R954), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1075-R1075), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1110-R1111), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1128-R1127), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1144-R1150), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1413-R1408), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1419-R1414), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1431-R1427), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1591-R1589), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1600-R1595), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1614-R1609), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1786-R1781), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1792-R1787), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-a6e92dd2dd707d705dc44ef91463ddc0423575188e6e8e0555de9e439db88c35L1801-R1796), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-0bb8e07f3f606e45f4e4284c02b32f986d420388fdd71b115a7475aacb50a42cL143-R145), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-0bb8e07f3f606e45f4e4284c02b32f986d420388fdd71b115a7475aacb50a42cL642-R649), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-0bb8e07f3f606e45f4e4284c02b32f986d420388fdd71b115a7475aacb50a42cL996-R999), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-0bb8e07f3f606e45f4e4284c02b32f986d420388fdd71b115a7475aacb50a42cL1027-R1029), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-0bb8e07f3f606e45f4e4284c02b32f986d420388fdd71b115a7475aacb50a42cL1034-R1038), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-50be2dc708119a4c9b53e977807d2f05e4ff6ce98c3f51fa91d1fa9e229962f1R127-R130), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-61484fa2a50e309478017fb2a436198aa4b0afdf72a4039bf574fc4f2aedbe4eR393), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-05e2a2d0a9c9879a4fb5fde9baf5a43738c7601fc53e234a40ab9bc27d1512a5L9-R12), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-05e2a2d0a9c9879a4fb5fde9baf5a43738c7601fc53e234a40ab9bc27d1512a5L65-R70), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-05e2a2d0a9c9879a4fb5fde9baf5a43738c7601fc53e234a40ab9bc27d1512a5L101-R108), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-05e2a2d0a9c9879a4fb5fde9baf5a43738c7601fc53e234a40ab9bc27d1512a5L139-R145), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-05e2a2d0a9c9879a4fb5fde9baf5a43738c7601fc53e234a40ab9bc27d1512a5L317-R329), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-05e2a2d0a9c9879a4fb5fde9baf5a43738c7601fc53e234a40ab9bc27d1512a5L328-R344), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-917d9436dcaafa0f1e41ae9bad90273a303f036f00da94e417788a7fa1dc5260L21-R22), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-917d9436dcaafa0f1e41ae9bad90273a303f036f00da94e417788a7fa1dc5260L159-R162), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-917d9436dcaafa0f1e41ae9bad90273a303f036f00da94e417788a7fa1dc5260L203-R209), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-917d9436dcaafa0f1e41ae9bad90273a303f036f00da94e417788a7fa1dc5260L260-R268), [link](https://github.com/taichi-dev/taichi/pull/8293/files?diff=unified&w=0#diff-917d9436dcaafa0f1e41ae9bad90273a303f036f00da94e417788a7fa1dc5260L287-R299))
- Loading branch information