Obliterate the callee_id hack
Exprs that could be applications of overloaded operators (expr_unary, expr_binary, expr_index) relied on the previous node ID being "reserved" to carry extra typechecking info. This was incredibly error-prone. Fixed it; now all exprs have two node IDs (which will be wasted in some cases; future work could make this an option instead if the extra int field ends up being a performance problem). Closes #2804
This commit is contained in:
parent
fec8059ed5
commit
78ec6fe30c
21 changed files with 148 additions and 57 deletions
|
|
@ -288,7 +288,8 @@ enum blk_check_mode { default_blk, unchecked_blk, unsafe_blk, }
|
|||
enum expr_check_mode { claimed_expr, checked_expr, }
|
||||
|
||||
#[auto_serialize]
|
||||
type expr = {id: node_id, node: expr_, span: span};
|
||||
type expr = {id: node_id, callee_id: node_id, node: expr_, span: span};
|
||||
// Extra node ID is only used for index, assign_op, unary, binary
|
||||
|
||||
#[auto_serialize]
|
||||
enum alt_mode { alt_check, alt_exhaustive, }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue