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

refactor: Remove unused and misleading Tree superclass #11873

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Yuhta
Copy link
Contributor

@Yuhta Yuhta commented Dec 16, 2024

Summary: The Tree superclass is misleading (size() only counts direct children and iterator only iterates direct children; usually for such interface we would expect to iterate the whole tree) and not really used anywhere. Remove it to make the code base cleaner.

Differential Revision: D67241802

Summary: The `Tree` superclass is misleading (`size()` only counts direct children and iterator only iterates direct children; usually for such interface we would expect to iterate the whole tree) and not really used anywhere.  Remove it to make the code base cleaner.

Differential Revision: D67241802
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 16, 2024
Copy link

netlify bot commented Dec 16, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit c2ba621
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/676059c85304730009fba4fc

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67241802

@@ -64,8 +64,8 @@ namespace {

int countNodes(const TypePtr& type) {
int count = 1;
for (auto& child : *type) {
count += countNodes(child);
for (uint32_t end = type->size(), i = 0; i < end; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

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

for (uint32_t end = type->size(), i = 0; i < end; ++i) should have the same performance as for (uint32_t i = 0; i < type->size(); ++i), where end stores in a register, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants