-
Notifications
You must be signed in to change notification settings - Fork 125
Nuke DMASTFolder #2390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Nuke DMASTFolder #2390
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.