You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we've modified intptr_union to be the following definition:
typedefstruct {
int i;
void *p;
std::shared_ptr<char> s;
} intptr_union;
before that change, it was:
typedefunion {
int i;
void* p;
} intptr_union;
This change was made to help fix some memory leaks within the parser.
We ideally want to wrap all 3 different types in a std::variant since that behaves exactly like union but allows for objects to be constructed/destructed, but currently, there some Spim test files that are causing the parser to panic due to a mismatch of type assert. If we can, we should add type checking before we unwrap the std::variant and handle accordingly if it is a different value.
To see what it was like when we first tried to use std::variant see acdfc84.
Note that commit 155e9ab reverted these changes.
The text was updated successfully, but these errors were encountered:
Currently, we've modified
intptr_union
to be the following definition:before that change, it was:
This change was made to help fix some memory leaks within the parser.
We ideally want to wrap all 3 different types in a
std::variant
since that behaves exactly likeunion
but allows for objects to be constructed/destructed, but currently, there some Spim test files that are causing the parser to panic due to a mismatch of type assert. If we can, we should add type checking before we unwrap thestd::variant
and handle accordingly if it is a different value.To see what it was like when we first tried to use
std::variant
seeacdfc84
.Note that commit
155e9ab
reverted these changes.The text was updated successfully, but these errors were encountered: