You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have some issues with variables defined in the module code(which are global). If they are constants they are never written as such with a AstGlobalWrite instruction but if they are used in a function of the same module, a constant var is used with the correct value.
If they are not constants they do not have a corresponding AstGlobalWrite instruction unless that variable is used on a function defined in the same module.
example:
Hello,
I have some issues with variables defined in the module code(which are global). If they are constants they are never written as such with a AstGlobalWrite instruction but if they are used in a function of the same module, a constant var is used with the correct value.
If they are not constants they do not have a corresponding AstGlobalWrite instruction unless that variable is used on a function defined in the same module.
example:
Produces:
while:
Produces:
They should always have an AstGlobalWrite instruction because they can be imported by other modules that import the one they are declared in.
An interesting thing I found is that if I alter the source code, changing the order of the functions, the IR produced is different:
The IR it produces changes to:
What is the reason the IR is different in this case?
Thanks in advance,
Sifis.
Edit: Another issue of the IR visible in these examples is the fact that print statements do not produce a method invocation.
The text was updated successfully, but these errors were encountered: