Skip to content

(closes #3325) Improving .datatype to return size intrinsics instead of DEFERRED#3336

Merged
sergisiso merged 22 commits intomasterfrom
3325_datatype_enhancement
Mar 5, 2026
Merged

(closes #3325) Improving .datatype to return size intrinsics instead of DEFERRED#3336
sergisiso merged 22 commits intomasterfrom
3325_datatype_enhancement

Conversation

@LonelyCat124
Copy link
Collaborator

Still in progress, this so far changes the arrayreference datatype to never give shapes with ArrayType.Extent in the result if we can resolve the shape.

I want to look at binaryoperation and how it chooses what result to use next, as I think we can do better than the current resul.

@LonelyCat124 LonelyCat124 marked this pull request as ready for review February 18, 2026 11:49
@LonelyCat124
Copy link
Collaborator Author

Waiting on coverage to come back, but if its ok this is ready for a first look.

I'm not totally convinced by the choice I make in BinaryOperation, so if the reviewer has a better strategy I'm happy to change it.

StructureReference already did output sizes better than ArrayReference, so from my experiment I didn't think that needed to be updated.

@sergisiso
Copy link
Collaborator

I am happy to review this, as I have been thinking what I need to redo WHEREs and it will be something similar. (I will wait for test/coverage to be reported before starting)

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (274faab) to head (dfb7589).
⚠️ Report is 23 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3336   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files         386      386           
  Lines       54175    54181    +6     
=======================================
+ Hits        54153    54159    +6     
  Misses         22       22           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@sergisiso sergisiso 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 @LonelyCat124 (although I am not convinced about the new special case - see inline)

I see this is a towards, is the goal of that issue to make "the datatype method should not propagate the DEFERRED attribute when constructing the datatype of an expression". Where are we on this?

@sergisiso
Copy link
Collaborator

Oh and I forgot about the Coverage indirect changes. It seems they are related to WHEREs, so I would address that comment first and see if they are still there.

@LonelyCat124
Copy link
Collaborator Author

@sergisiso Ready for another look now I've updated the array_mixin stuff.

Copy link
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

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

@LonelyCat124 I was almost ready to approve it but I don't understand one of the tests. Could you have a look?

Also, is there anything pending to close the associated issue?

@LonelyCat124
Copy link
Collaborator Author

@sergisiso Ready for another look, I'm going to set the CI going now.

Copy link
Collaborator

@sergisiso sergisiso left a comment

Choose a reason for hiding this comment

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

@LonelyCat124 All comments have been addressed. Nicely done simplifying in the frontend and letting more cases output literals instead of intrinsics.

I expect some conflicts with the PR that is marked as "Ready to be merged" but since this are partially my fault, I will mark this one as approved and resolve the conflicts myself.

@sergisiso sergisiso changed the title (Towards #3325) Improving .datatype to return size intrinsics instead of DEFERRED (closes #3325) Improving .datatype to return size intrinsics instead of DEFERRED Mar 5, 2026
@LonelyCat124
Copy link
Collaborator Author

Yeah I just want to make sure the latest changes didn't break anything in the CI that I didn't understand

@sergisiso sergisiso merged commit 4c68ca2 into master Mar 5, 2026
16 checks passed
@sergisiso sergisiso deleted the 3325_datatype_enhancement branch March 5, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants