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

Roundhouse Cleanup 02 #2768

Merged
merged 4 commits into from
Nov 29, 2018
Merged

Roundhouse Cleanup 02 #2768

merged 4 commits into from
Nov 29, 2018

Conversation

mgreter
Copy link
Contributor

@mgreter mgreter commented Nov 28, 2018

Rebased some cleanup refactorings I had laying around for over half a year now.
Should not change any functionality. Splitting AST into different compile units should
reduce RAM pressure when compiling (e.g. some people reported issues when compiling
libsass on memory restricted environments). @glebm it might be possible that I regressed
some clang warning you've fixed, I'll keep an eye on it once CI results come back.

Further PRs will follow shortly ...

Also adds missing expression type
@mgreter mgreter self-assigned this Nov 28, 2018
@mgreter
Copy link
Contributor Author

mgreter commented Nov 29, 2018

Note: we may should keep an eye out for performance regressions due to missing inline opportunities for the compiler. But I think we should not pre-optimize and have everything implemented in the header files. Only once we can prove that certain implementations really profit from being in the headers. This split should also slightly improve compile time since the compiler does not have to parse the heavy headers for every compile unit and we could still provide a "unified compile unit" (where all sources/headers are included in one big compile unit, IMO there was some discussion a few years ago about this...).

@mgreter
Copy link
Contributor Author

mgreter commented Nov 29, 2018

OK, seems this does produce quite a few clang warnings ... time to fire up my linux VM 😔

@mgreter mgreter force-pushed the roundhouse-cleanup-02 branch 3 times, most recently from 639596e to c91fffd Compare November 29, 2018 00:48
@mgreter
Copy link
Contributor Author

mgreter commented Nov 29, 2018

Hopefully clang and MSVC are happy now ... waiting for CI ...

return ns() < rhs.ns();
}

bool Compound_Selector::operator== (const Compound_Selector& rhs) const
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this reverted 2a4935c

I wonder if there are others

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It might be possible that due to the rebase it will come in a later PR (I remember that I manually re-added this change to some commit). But thx for checking, I will check myself again

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those previous changes should be part of this PR now too!

@glebm
Copy link
Contributor

glebm commented Nov 29, 2018

Does make test_probe return the same result as before?

@mgreter
Copy link
Contributor Author

mgreter commented Nov 29, 2018

Does make test_probe return the same result as before?

Wasn't this spec test already merged/activated!?

@glebm
Copy link
Contributor

glebm commented Nov 29, 2018

Well, make test_probe returns a list of over a dozen specs that used to fail but now pass on master. We should make sure it's the same list.

@mgreter
Copy link
Contributor Author

mgreter commented Nov 29, 2018

Well, make test_probe returns a list of over a dozen specs that used to fail but now pass on master

sass/sass-spec#1312 ??

@glebm
Copy link
Contributor

glebm commented Nov 29, 2018

Ah, I haven't pulled from there for a while!
Perhaps sassc, sass-spec, and plugins should be git submodules, then I think they will get updated automatically on git pull? CI could still always pull the latest version.

@glebm
Copy link
Contributor

glebm commented Nov 29, 2018

There is one test:

$ cd sassc; msbuild .\win\sassc.sln /p:Platform=Win32 /p:Configuration=Debug /m:4; cd ..
$ ruby sass-spec/sass-spec.rb -V 3.5 --probe-todo --impl libsass -c sassc\bin\sassc.exe sass-spec/spec
...
The following tests pass but were marked as TODO for libsass:
sass-spec/spec/core_functions/color/hsla/error/one_arg

@mgreter
Copy link
Contributor Author

mgreter commented Nov 29, 2018

Did this also show up on CI? Btw. once you pointed out the missing change from you, I saw how I can reuse OrderNodes for std::includes: std::includes(rset.begin(), rset.end(), lset.begin(), lset.end(), OrderNodes());, sometimes C++ just doesn't feel natural to me :) Adjusting the commit now.

@mgreter
Copy link
Contributor Author

mgreter commented Nov 29, 2018

Rebased and amended once more to include the lost changes from @glebm again and also found out how to reuse struct OrderNodes::operator() for std::includes. @glebm care to take a look again?

@mgreter
Copy link
Contributor Author

mgreter commented Nov 29, 2018

@xzyfer any objections to move this forward?

@xzyfer
Copy link
Contributor

xzyfer commented Nov 29, 2018

It's too big of a change for me to comment on without context. Feel free to proceed when you and @glebm are confident. 👍

@mgreter mgreter merged commit 7141c01 into sass:master Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants