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

Typecode cleanup #1917

Merged
merged 1 commit into from
Feb 23, 2025
Merged

Typecode cleanup #1917

merged 1 commit into from
Feb 23, 2025

Conversation

BCSharp
Copy link
Member

@BCSharp BCSharp commented Feb 22, 2025

This PR is mostly just reorganizing the code handling typecodes across modules into a consistent ordering. Having a consistent ordering helps comparing implementations and spot irregularities (which may indicate a bug, and indeed, there were a few minor ones related to casting).

The ordering I adopted is based on what was used by TypecodeOps and array (although even there there were some inconsistencies), grouping by typecode klass:

  • Boolean
  • character
  • integer
  • floating point
  • object
  • pointer

Within one klass, the ordering is by size, within the same size, signed then unsigned, or regular then exotic.

This change is meant to be innocent, primarily code reordering, which is already difficult to review looking at the diffs. The more challenging typecode issues, like handling of l/L (are currently incorrect on non-Windows platforms), e (is incomplete), or n/N (don't know what to do with that yet) are left for dedicated PRs.

@BCSharp BCSharp merged commit 2d2f943 into IronLanguages:main Feb 23, 2025
8 checks passed
@BCSharp BCSharp deleted the typecode_cleanup branch February 23, 2025 00:06
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.

2 participants