-
Notifications
You must be signed in to change notification settings - Fork 32
Scriptcomp optimizations refactor #149
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -51,16 +51,19 @@ class CScriptCompilerIdentifierHashTableEntry; | |||||||||||
|
|
||||||||||||
| // Removes any functions that cannot possibly be called by any codepath | ||||||||||||
| #define CSCRIPTCOMPILER_OPTIMIZE_DEAD_FUNCTIONS 0x00000001 | ||||||||||||
| // Merges constant expressions into a single constant where possible. | ||||||||||||
| // Note: Only affects runtime expressions, assignments to const variables are always folded. | ||||||||||||
| #define CSCRIPTCOMPILER_OPTIMIZE_FOLD_CONSTANTS 0x00000002 | ||||||||||||
| // Post processes generated instructions to merge sequences into shorter equivalents | ||||||||||||
|
||||||||||||
| // Post processes generated instructions to merge sequences into shorter equivalents | |
| // Post processes generated instructions to merge sequences into shorter equivalents | |
| // Note: The bit flag value 0x00000002 was previously used for FOLD_CONSTANTS. | |
| // After removing FOLD_CONSTANTS, this value is now reused for MELD_INSTRUCTIONS. | |
| // Ensure this does not break binary compatibility with existing code or data. |
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.
No ABI requirements, can reuse these freely.
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.
The enum value for MeldInstructions has changed from 0x4 to 0x2. This could cause issues if the enum values are persisted or used in binary interfaces. Ensure this change is intentional and documented.