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

[WIP] Refactor node weave #2557

Closed
wants to merge 7 commits into from
Closed

Conversation

mgreter
Copy link
Contributor

@mgreter mgreter commented Feb 6, 2018

This is a early WIP branch trying to fix the very old ast<->node implementation nobody understands. Subweave is already pretty much working ok, but still some more work to do. One can see that the initial architecture for complex_selectors is not very optimal, since we need to copy/clone the whole linked list chain (tails) once we want to change connections. For that I have introduced Selector_Groups for now. Putting this here since it was laying around for quite some time in my local repo.

@mgreter mgreter added the LibSass 3.6 Somewhere between Sass 3.5 and 4.0 label Mar 17, 2018
@glebm
Copy link
Contributor

glebm commented Nov 27, 2018

The unify_with implementation here should be updated to incorporate the changes from #2737.

@glebm
Copy link
Contributor

glebm commented Nov 29, 2018

@mgreter I have a branch (#2775) where I've rewritten selector unification to match Dart Sass. This fixes a ton of bugs but unfortunately breaks Complex_Selector unification.

Perhaps you can make a PR that just implements subweave for AST nodes, then I can try updating Complex_Selector unification impl to also match Dart Sass.

@glebm
Copy link
Contributor

glebm commented Dec 10, 2018

Update: My unification rewrite has been merged, it's all good.

}

template <class T>
bool SetContains(const T& lhs, const T& rhs) {
Copy link
Contributor

@glebm glebm Dec 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using hash maps/sets throughout (std::unordered_map)? They are faster and easier to get right

glebm added a commit to glebm/libsass that referenced this pull request Apr 14, 2019
@mgreter, I've ported your WIP code from sass#2557 to the modern version of
the codebase.

Hopefully it will much easier for you to finish the work on it now.

This PR is not for submission.
glebm added a commit to glebm/libsass that referenced this pull request Apr 14, 2019
@mgreter, I've ported your WIP code from sass#2557 to the modern version of
the codebase.

Hopefully it will much easier for you to finish the work on it now.

This PR is not for submission.
@mgreter mgreter closed this Jun 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev - Internal LibSass 3.6 Somewhere between Sass 3.5 and 4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants