Skip to content
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

More optimal merging of list semantic values #158

Open
paulgazz opened this issue Sep 10, 2021 · 0 comments
Open

More optimal merging of list semantic values #158

paulgazz opened this issue Sep 10, 2021 · 0 comments
Assignees

Comments

@paulgazz
Copy link
Member

Per @kaarthikalagappan 's observation, try merging list semantic values by joining their lists of children, instead of wrapping the lists under separate static conditionals.

        } else if (/* the semantic value is a list */ false) {
          /*
            check whether it's a list using, with the caveat that
            using a name change annotation will prevent this from
            working properly.  (we could add a check to prohibit name
            changes for list nodes.)

            SemanticValues.ValueType valueType = semanticValues.getValueType(nodeName);  // really should take grammar symbol

            assert(this.value.nodename == other.value.nodename)
            assert(not null, children not null)


            if valueType == SemanticValues.ValueType.LIST

            this.value.node.addAll(other.value.children);  // take one semantic, this.value, and all the elements from the other.value to it
           */

Add this to case 3 of the stackframe merge function.

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

No branches or pull requests

2 participants