Skip to content

Conversation

@AjayBrahmakshatriya
Copy link
Collaborator

The change fixes the annoying and previously known Extended Diamond Problem (we had tried to fix it earlier with #60 but that fix was hacky and caused issues with arrays.

The new change is better since it tries to solve the root of the problem - Different code can be generated after tags have merged due to different variables being live. We now solve this problem by extending static tags to also capture the set of live dyn_vars. Thus two tags will compare equal only if the set of live variables is same too.

To avoid the recursive tag matching complexity, tags are passed through a tag_factory to deduplicate tags into a tag_id before storing in the set. In the future we can also convert all tags into tag_id.

Sample 54 has been slightly modified to test this. Sample 23 had to be modified to avoid unnecessary code blowup.

@AjayBrahmakshatriya AjayBrahmakshatriya merged commit ff7edd6 into BuildIt-lang:master Nov 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant