Skip to content

Conversation

tamasvajk
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the Kotlin label Nov 8, 2024
@tamasvajk tamasvajk force-pushed the ke2-binary-op-compareTo branch from 91b05f0 to c55bad5 Compare November 12, 2024 11:31
@tamasvajk tamasvajk marked this pull request as ready for review November 12, 2024 11:32
@tamasvajk tamasvajk requested a review from a team as a code owner November 12, 2024 11:32
KtTokens.LTEQ -> extractRawBinaryExpression(builtinTypes.boolean, exprParent, tw::writeExprs_leexpr)
KtTokens.GTEQ -> extractRawBinaryExpression(builtinTypes.boolean, exprParent, tw::writeExprs_geexpr)
else -> TODO("error")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This could also be rewritten along the lines of

val writeExprs_kind = when (op) ...
extractRawBinaryExpression(builtinTypes.boolean, exprParent, writeExprs_kind)

to remove some duplication.

TODO()
}

// Extract lowered equivalent call, such as `a.compareTo(b) < 0`
Copy link
Contributor

Choose a reason for hiding this comment

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

I think a more detailed comment will be helpful in a few months, when we're looking at this having forgotten the context. Perhaps an example of a line of source code, what the AST looks like for it, and an explanation of what target points to, and what we need to fabricate.

@tamasvajk tamasvajk force-pushed the ke2-binary-op-compareTo branch from c55bad5 to 70658bc Compare November 12, 2024 14:58
@tamasvajk
Copy link
Contributor Author

@igfoo, I rebased this PR and pushed an extra commit to cover your findings.

@tamasvajk tamasvajk merged commit fcde605 into github:ke2 Nov 13, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants