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

Perform WHNF when pattern matching and invoke #1326

Merged
merged 9 commits into from
Feb 16, 2025
Merged

Perform WHNF when pattern matching and invoke #1326

merged 9 commits into from
Feb 16, 2025

Conversation

HoshinoTented
Copy link
Contributor

@HoshinoTented HoshinoTented commented Feb 15, 2025

Currently, our PatternSerializer missing the part of whnf the argument, which may stuck in certain situations. Also, TermExperialize is responsible for doing some Normalizer work, such as normalizing the argument before invoke.

This PR:

  • Add a UnaryOperator argument (can be Normalizer) to JitFn#invoke, JitMatchy#invoke, and JitCon#isAvailable
  • Use InvokeSignatureHelper to handle the change above.

@HoshinoTented HoshinoTented added this to the v0.38 milestone Feb 15, 2025
Copy link

codecov bot commented Feb 16, 2025

Codecov Report

Attention: Patch coverage is 94.81481% with 7 lines in your changes missing coverage. Please review.

Project coverage is 83.66%. Comparing base (0c00ffa) to head (6417e2e).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
.../org/aya/compiler/serializers/TermExprializer.java 88.46% 1 Missing and 2 partials ⚠️
...rg/aya/compiler/serializers/SerializerContext.java 75.00% 1 Missing and 1 partial ⚠️
...se/src/main/java/org/aya/normalize/Normalizer.java 50.00% 1 Missing ⚠️
...ya/compiler/serializers/InvokeSignatureHelper.java 88.88% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1326      +/-   ##
============================================
+ Coverage     83.62%   83.66%   +0.03%     
- Complexity     4168     4190      +22     
============================================
  Files           375      377       +2     
  Lines         12056    12116      +60     
  Branches       1425     1428       +3     
============================================
+ Hits          10082    10137      +55     
- Misses         1217     1220       +3     
- Partials        757      759       +2     

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

Copy link
Member

@ice1000 ice1000 left a comment

Choose a reason for hiding this comment

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

Lgtm

@ice1000 ice1000 marked this pull request as ready for review February 16, 2025 13:45
@ice1000 ice1000 merged commit 34b5786 into main Feb 16, 2025
6 checks passed
@ice1000 ice1000 deleted the jit-whnf branch February 16, 2025 13:45
ice1000 added a commit that referenced this pull request Feb 17, 2025
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