Uh oh!
There was an error while loading. Please reload this page.
Implement str and bool runtime functions - #152
Conversation
namannimmo10
commented
Feb 20, 2022
We should do something about this line: lpython/src/libasr/codegen/asr_to_llvm.cpp Line 1518 in e1b2778 Nonetheless, the ASR looks good to me. |
certik
commented
Feb 21, 2022
Is this an intrinsic function? I don't see it here: https://docs.python.org/3/library/functions.html Also it's time to refactor this whole function into LFortran's style. Let's not put anymore functions here until we refactor, as it is unmaintainable longterm. Let me know if you know how to do the refactor. |
namannimmo10
commented
Feb 21, 2022
No. We will add a generic function, I have two ideas for doing that:
>>>defstr(val: i32|f64):
... # "isinstance" type guard
... ifisinstance(val, i32):
... # type of `val` is narrowed to `i32`
... returnstr_int(val)
... elifisinstance(val, f64):
... # else, type of `val` is narrowed to `f64`
... returnstr_float(val)
...
>>>You are talking about this file, right? |
namannimmo10
commented
Feb 24, 2022
Once we merge this, I will add the rest. |
certik
left a comment
There was a problem hiding this comment.
I think that this looks great!
bool runtime functionstr and bool runtime functions
Inspiration: #1 (comment)