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
Right now some things like function and tag literals store a name. The Literal for a RefFunc stores the name of the function, for example. That means we may refer to the wrong thing if the value is used in another module with different internal names.
To fix this, we could add direct references from the Literal for a function to the Function it refers to. Maybe a good way to do that is to give it a shared_ptr<Function>, in which case we'd want to make Modules store their functions as a vector of such shared pointers and not unique_ptrs etc.
This may not be urgent as it is a long-standing issue. If we ever start to do testing of cross-module calls in our interpreter then we'd need to fix it.
Right now some things like function and tag literals store a name. The Literal for a RefFunc stores the name of the function, for example. That means we may refer to the wrong thing if the value is used in another module with different internal names.
To fix this, we could add direct references from the Literal for a function to the Function it refers to. Maybe a good way to do that is to give it a
shared_ptr<Function>
, in which case we'd want to makeModule
s store their functions as a vector of such shared pointers and notunique_ptrs
etc.This may not be urgent as it is a long-standing issue. If we ever start to do testing of cross-module calls in our interpreter then we'd need to fix it.
Noticed here: #6814 (comment)
The text was updated successfully, but these errors were encountered: