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

Implicit Freezing and close() functions #50

Merged
merged 15 commits into from
Nov 12, 2024
Merged

Conversation

xFrednet
Copy link
Collaborator

@xFrednet xFrednet commented Nov 7, 2024

The number of changes sadly exploded a bit. Most of them are superficial and should hopefully be easy to review.

This PR also changes the stack representation from an std::vector<> to actual fields called _stack[n] on the frame object. It's not really efficient by any stretch of the imagination, but it allows the invalidation of stack values and works well with our Mermaid output.

@xFrednet xFrednet force-pushed the 49-implicit-snow-storm branch 3 times, most recently from 8f8199f to 941a510 Compare November 7, 2024 16:05
src/rt/rt.cc Outdated Show resolved Hide resolved
@@ -175,10 +175,8 @@ namespace rt::objects
collecting = true;

std::cout << "Starting collection" << std::endl;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think using the for here is wrong. The destruct call could modify to_collect, which will (silently) invalidate the iterator.

template<typename Pre, typename Post>
inline void visit(Region* start, Pre pre, Post post)
{
for (auto obj : start->objects)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could visit modify start->objects?

@xFrednet
Copy link
Collaborator Author

Good comments, shows that I'm still not used to C++ and why memory safe languages are a good idea... Anyhow, let's get this merged :D

@xFrednet xFrednet merged commit a698299 into main Nov 12, 2024
5 checks passed
@xFrednet xFrednet deleted the 49-implicit-snow-storm branch November 12, 2024 11:25
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