Conversation
|
Also confirmed I can observe on TG without things being horribly broken. |
| private DMExpression BuildIdentifier(DMASTIdentifier identifier, DreamPath? inferredPath = null) { | ||
| var name = identifier.Identifier; | ||
| if (scopeMode == Normal) { | ||
| if (scopeMode == Normal || scopeMode == Static) { |
There was a problem hiding this comment.
This is not valid even in BYOND, local vars/args aren't available to static vars. Making this change will cause the global init proc to attempt to use one of its own locals, which is incorrect.
I think what BYOND is doing here is a first check that the var exists when the expression is created (that is ignoring the static context), and a second check when the bytecode is generated that is being skipped because of constant folding. As far as I can tell, the first step ignoring the static context is a bug. I'm not sure of the best way to replicate this with the way OD is structured.
There was a problem hiding this comment.
I do not know how to fix this.
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |


Nukes
DMASTFolder. It's deprecated and removing it shaves a consistent 6 seconds off my third-run TG compile time (45s -> 39s).This uncovered an OD bug in the following preprocessed TG code:
DMASTFolderwas returning just the LHS as a constant string, which hid the fact that OD couldn't resolve the deref in the RHS. I think I got it working, butBuildIdentifier()is such a mess I'm not 100% sure this is the proper fix.