-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
8f8199f
to
941a510
Compare
941a510
to
54aadbb
Compare
@@ -175,10 +175,8 @@ namespace rt::objects | |||
collecting = true; | |||
|
|||
std::cout << "Starting collection" << std::endl; |
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 using the for
here is wrong. The destruct
call could modify to_collect
, which will (silently) invalidate the iterator.
src/rt/objects/dyn_object.h
Outdated
template<typename Pre, typename Post> | ||
inline void visit(Region* start, Pre pre, Post post) | ||
{ | ||
for (auto obj : start->objects) |
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.
Could visit
modify start->objects
?
4aa0280
to
6fdd340
Compare
6fdd340
to
cfe6f9d
Compare
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 |
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.