Skip to content

Conversation

@mattcce
Copy link
Contributor

@mattcce mattcce commented Feb 14, 2025

PR is on hold pending a redesign of the handling of method invocations in the CSEC machine. Below is the previous PR draft version.


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.

@github-actions
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.

2 participants