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
I think, we can also mangle the name in the ASR itself.
So, say we have an ExternalSymbol: hypot, we can change that to math@hypot or __math_hypo__ or something similar
We already have that possibility in ASR, so let's do that on ASR level. I think just changing this a bit get_mangled_name should be fine, with no major changes. I'll try that ASR first.
Activity
Smit-create commentedon Jul 3, 2023
That's because of the re-declaration errors. We define
hypotinruntime/math.pywhich is given by:One thing, we can do is to internally change those names during code-gen to let's say
__module__name + __func_name__to avoid such name conflicts.Thirumalai-Shaktivel commentedon Jul 3, 2023
I think, we can also mangle the name in the ASR itself.
So, say we have an ExternalSymbol:
hypot, we can change that tomath@hypotor__math_hypo__or something similarThirumalai-Shaktivel commentedon Jul 3, 2023
@Smit-create let me know would be better? Handle this in ASR or backend?
Smit-create commentedon Jul 3, 2023
We already have that possibility in ASR, so let's do that on ASR level. I think just changing this a bit
get_mangled_nameshould be fine, with no major changes. I'll try that ASR first.certik commentedon Jul 3, 2023
I think every function in a module should be prefixed with the module name in ASR, like we do in LFortran.