Proper C scopes for if, try and case statements
even thought the setjmp implementation for try statement won't be used in C++, using properly scoped variables for them is beneficial, because we'll be able to establish a 1:1 relation between nimrod scopes and C scopes. Once we have that, we'll be able to keep the original names of local variables to greatly improve the debugging experience (i.e. watch expressions and hover tooltips will work).
This commit is contained in:
parent
d2b45dbe85
commit
caf7878009
3 changed files with 103 additions and 83 deletions
|
|
@ -65,6 +65,8 @@ type
|
|||
# before 'break'|'return'
|
||||
labels*: Natural # for generating unique labels in the C proc
|
||||
blocks*: seq[TBlock] # nested blocks
|
||||
breakIdx*: int # the block that will be exited
|
||||
# with a regular break
|
||||
options*: TOptions # options that should be used for code
|
||||
# generation; this is the same as prc.options
|
||||
# unless prc == nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue