Skip to content
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

Add list comparison #2025

Merged
merged 6 commits into from
Jul 9, 2023
Merged

Add list comparison #2025

merged 6 commits into from
Jul 9, 2023

Conversation

kabra1110
Copy link
Collaborator

@kabra1110 kabra1110 commented Jun 25, 2023

WIP.
Fixes #1832.
This PR implements only less than operation.

{
llvm::Value* i = LLVM::CreateLoad(*builder, idx);
// llvm::Value* t1i = llvm_utils->tuple_api->read_item(t1, i, LLVM::is_llvm_struct(
// tuple_type->m_type[i]));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we index tuple_type->m_type with run time value i?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't. :-). Tuples should only be indexed with fixed indices available at compile time so that type of the indexed item can be figured out at compile time itself. Its the pattern as C++ std::tuple.

@kabra1110 kabra1110 marked this pull request as ready for review July 3, 2023 07:56
Copy link
Collaborator

@czgdp1807 czgdp1807 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@czgdp1807 czgdp1807 enabled auto-merge (squash) July 9, 2023 15:05
@czgdp1807 czgdp1807 merged commit f2500fa into lcompilers:main Jul 9, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support List Compare like String Compare (index by index)
2 participants