Closed
Description
The DSL specification syntax definition of the inst
shows that the stack_effect
is optional,
including its parentheses:
definition:
"inst" "(" NAME ["," stack_effect] ")" "{" C-code "}"
...
stack_effect:
"(" [inputs] "--" [outputs] ")"
But if we defined a new instruction, let's say, MY_INSTRUCTION
as:
inst(MY_INSTRUCTION) {
/* implementation */
}
We will get the following error:
SyntaxError: Extra stuff at the end of ./Python/bytecodes.c
However, if we defined MY_INSTRUCTION
with an empty stack-effect
, it will work!
inst(MY_INSTRUCTION, ( -- )) {
/* implementation */
}
Linked PRs
Metadata
Metadata
Assignees
Projects
Status
Todo