-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Sync libasr
from LPython
#3713
Sync libasr
from LPython
#3713
Conversation
static inline ASR::asr_t* create_ObjectType(Allocator& al, const Location& loc, | ||
Vec<ASR::expr_t*>& args, diag::Diagnostics& diag) { | ||
if (args.size() != 1) { | ||
append_error(diag, "type() takes exactly 1 argument `object` for now", loc); | ||
} | ||
ASR::expr_t *m_value = nullptr; | ||
Vec<ASR::expr_t *> arg_values; | ||
|
||
|
||
m_value = eval_ObjectType(al, loc, expr_type(args[0]), arg_values, diag); | ||
|
||
|
||
return ASR::make_IntrinsicElementalFunction_t(al, loc, | ||
static_cast<int64_t>(IntrinsicElementalFunctions::ObjectType), | ||
args.p, args.n, 0, ASRUtils::expr_type(m_value), m_value); | ||
} |
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.
TODO: this can be shifted to python script. Can be done after sync, this is fine.
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.
opened issue #3714
(ArrayConstant | ||
(ArrayConstructor | ||
[] | ||
(Array | ||
(Integer 4) | ||
[((IntegerConstant 1 (Integer 4)) | ||
(IntegerConstant 0 (Integer 4)))] | ||
FixedSizeArray | ||
) | ||
() | ||
ColMajor | ||
) |
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.
Why is this an ArrayConstructor
? It should be ArrayConstant
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.
Let's fix it after the sync. I am not worried too much about it. The sync is already very heavy.
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 agree with you.
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.
Opened at #3715
@@ -168,14 +168,15 @@ | |||
)] | |||
[(Assignment | |||
(Var 3 strings) | |||
(ArrayConstant | |||
(ArrayConstructor |
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.
same comment here
__libasr__created__var__0__array_constant_: | ||
__libasr__created__var__0__array_constructor_: |
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.
This should be __libasr__created__var__0__array_constant_
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.
Left a few comments above, I suspect something is off for ArrayConstant
/ ArrayConstructor
handling in this PR, rest all is good.
No description provided.