Skip to content

Conversation

@cirras
Copy link
Collaborator

@cirras cirras commented Nov 12, 2024

This PR makes the return types for the Length, High, and Low intrinsics more accurate.

The new rules are:

  • all array types are always size Integer on 32-bit on all compiler versions
  • dynamic array types are size NativeInt on 64-bit on all compiler versions
  • open array types are size Integer on 64-bit on all compiler versions prior to 36.0
  • open array types are size NativeInt on 64-bit on all compiler versions from 36.0

Fixes #296.

@cirras cirras requested a review from fourls November 12, 2024 03:46
Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

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

Looks good! Just one note.

Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

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

Oops, pressed the wrong button.

@cirras cirras requested a review from fourls November 12, 2024 04:31
Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

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

Looks good!

@fourls fourls merged commit 0208bc9 into master Nov 12, 2024
2 checks passed
@fourls fourls deleted the array_size_types branch November 12, 2024 04:37
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.

Incorrect intrinsic return type for System.Length on dynamic arrays

3 participants