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

fix subcalls relation #321

Merged
merged 3 commits into from
Jul 25, 2024
Merged

fix subcalls relation #321

merged 3 commits into from
Jul 25, 2024

Conversation

tmcgroul
Copy link
Contributor

No description provided.

@tmcgroul tmcgroul requested a review from belopash July 23, 2024 16:23
@@ -405,6 +405,10 @@ export function setUpItems(block: Block): void {
rec.parentCall = prev
populateSubcalls(prev, rec)
}
if (prev.parentCall && isSubcall(prev.parentCall, rec)) {
Copy link
Contributor

@belopash belopash Jul 23, 2024

Choose a reason for hiding this comment

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

nested calls are handled incorrectly.

[1, 1, 1], [1, 1], [1] -> the first will be subcall of the second, the second will be subcall of the third

[1, 1, 1], [1] -> the first will be subcall of the second

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, i also expect that it works like that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but i don't see the problem...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok if we talk about [1, 1, 1], [1] then there will be wrong parent assignment...
the parent will have the child as a subcall but i believe [1] shouldn't be in .parentCall

Copy link
Contributor

Choose a reason for hiding this comment

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

idk that should be the correct behavior here, but isSubcall assumes that [1, 1, 1] is a subcall of [1]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@belopash belopash Jul 24, 2024

Choose a reason for hiding this comment

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

it is expected according to subcalls query

Not sure, I guess it only says "request all subcalls and thier children", but nothing about how they should be grouped

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, another way is to put only direct "children" into subcalls array. i guess both options are fine...
@eldargab how subcalls are supposed to work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i got confirmation that subcalls represent all children

@tmcgroul tmcgroul merged commit 53077b3 into master Jul 25, 2024
1 check passed
@tmcgroul tmcgroul deleted the fix-subcalls branch July 25, 2024 11:17
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

Successfully merging this pull request may close these issues.

2 participants