-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add dominance algorithm implementation #326
Add dominance algorithm implementation #326
Conversation
Created using spr 1.3.5
Implements "A simple, fast dominance algorithm", to find the immediate dominators of all nodes in a graph. - https://www.cs.tufts.edu/comp/150FP/archive/keith-cooper/dom14.pdf This will be used for a new experimental bundler package to be added. This adds the empty package. Test Plan: Run `yarn test` to execute unit-tests for the implementation Pull Request: #326
|
||
import assert from 'assert'; | ||
import {ContentGraph} from '@atlaspack/graph'; | ||
import {simpleFastDominance} from '../../../src/DominatorBundler/findAssetDominators/simpleFastDominance'; |
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.
Any reason you're using a test folder instead of placing it with the source?
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.
What do you mean?
Do you mean using
- /src
- /test
?
That's just how the repository is setup. I'd rather colocate the tests.
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.
Yeah, colocation. Be the change...
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.
I think we could do that for the entire repository separately (?)
...s/bundler-experimental/test/DominatorBundler/findAssetDominators/simpleFastDominance.test.js
Outdated
Show resolved
Hide resolved
Created using spr 1.3.5
Implements "A simple, fast dominance algorithm", to find the immediate
dominators of all nodes in a graph.
This will be used for a new experimental bundler package to be added.
This adds the empty package.
Test Plan: Run
yarn test
to execute unit-tests for the implementation