-
Notifications
You must be signed in to change notification settings - Fork 277
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
[OM] Add om.list_create
to create lists of objects
#5418
Conversation
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.
Thanks for adding this, I think we'll definitely need this. My only question is if it's possible to use ODS to specify the textual format. We'll start sorting out how to represent a list in the evaluator.
ListType:$result | ||
); | ||
|
||
let hasCustomAssemblyFormat = 1; |
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.
Would it be possible to use the result type in the textual form and use the assembly format in ODS? Eh on second thought this is how hw.array_create
works, so this seems fine. It would still be nice to use the assembly format string in ODS, if it's possible to extract the type of the first operand in ODS.
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 think we should keep this in sync with hw.array_create
. I don't know how to get ODS to specify the element type and check. I am pretty sure we can build a constraint to validate that arguments match the element type of an array, but then we'd have to specify the full list type for the list.
67b6733
to
e0f0949
Compare
e0f0949
to
f3990e9
Compare
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.
LGTM
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.
LGTM. @mikeurbach should give the final stamp of approval.
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.
Yeah, this looks great, and we can merge it whenever we want. It will not work in the evaluator, and we'll need to make some larger changes at that level. Those are changes we should probably get around to regardless, but we haven't prioritized that yet.
This PR adds the op to create lists of objects.
The Python bindings are not yet implemented as further discussion of the in-memory representation is required.