-
I'm implementing code generation for the new exception handling proposal and found it curious that the catch clause cannot target its own try block: The catch clauses are validated without the try block's label being added to the context. I'm just curious, is there is a practical reason for this that I can't see? On my side, the code I'm generating can never fall through the end of the try block anyway, so targeting the try block would save me from adding an additional labeled block because. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This has been asked before. It's because the label that the |
Beta Was this translation helpful? Give feedback.
This has been asked before. It's because the label that the
try_table
declares isn't valid until after the immediates have been all parsed. I think it makes the most conceptual sense to think of parsing an instruction and its immediates as an atomic operation that pushes a new label.