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

CSEC: Use method descriptors after overloading #66

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mattcce
Copy link

@mattcce mattcce commented Feb 14, 2025

This PR targets an improvement to the CSEC machine. It replaces closures with human-readable method descriptors after method overloading to better reflect Java's native behaviour.

The current method descriptor format used for each kind of method is:

  • Instance methods (non-constructors): <return type> <identifier>(<parameter types>)
  • Static methods: <return type> <class>::<identifier>(<parameter types>)
  • Constructors: <class>(<parameter types>)

This implements another type of stash item MethodDescriptor that holds information necessary for overriding, including the return type, identifier, parameter types, and also a human-readable method descriptor that can be displayed.

  • Method descriptors for instance and class methods
  • Method descriptors for constructors
  • Remove closure storage in MethodDescriptor: need to modify resOverride to pull the relevant items directly from the MethodDescriptor.

Copy link

github-actions bot commented Feb 14, 2025

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
73.96% (+0.01% 🔼)
7182/9711
🟡 Branches
60.47% (+0.07% 🔼)
2363/3908
🟡 Functions
69.45% (-0% 🔻)
1289/1856
🟡 Lines
74.94% (+0.01% 🔼)
6771/9035
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / interpreter.ts
98.75% (-0.29% 🔻)
92.59% (+0.7% 🔼)
96.49% (-1.66% 🔻)
98.98% (-0.32% 🔻)
🟢
... / utils.ts
96.79% (-0.01% 🔻)
94.87% 94.44%
97% (-0.01% 🔻)

Test suite run success

1120 tests passing in 63 suites.

Report generated by 🧪jest coverage report action from eca9558

@martin-henz martin-henz changed the title Use method descriptors after overloading CSEC: Use method descriptors after overloading Feb 18, 2025
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.

1 participant