Ruby 3.3.5p100 (2024-09-03 revision ef084cc8f4958c1b6e4ead99136631bef6d8ddba)
|
Currently, the ADD_INSN family of macros expects a NODE as the second parameter. More...
Data Fields | |
NODE | node |
int | lineno |
Currently, the ADD_INSN family of macros expects a NODE as the second parameter.
It uses this node to determine the line number and the node ID for the instruction.
Because prism does not use the NODE struct (or have node IDs for that matter) we need to generate a dummy node to pass to these macros. We also need to use the line number from the node to generate labels.
We use this struct to store the dummy node and the line number together so that we can use it while we're compiling code.
In the future, we'll need to eventually remove this dependency and figure out a more permanent solution. For the line numbers, this shouldn't be too much of a problem, we can redefine the ADD_INSN family of macros. For the node ID, we can probably replace it directly with the column information since we have that at the time that we're generating instructions. In theory this could make node ID unnecessary.
Definition at line 431 of file prism_compile.c.
int pm_line_node_t::lineno |
Definition at line 433 of file prism_compile.c.
NODE pm_line_node_t::node |
Definition at line 432 of file prism_compile.c.