Skip to content

Conversation

@sschr15
Copy link
Member

@sschr15 sschr15 commented Mar 23, 2025

This introduces large improvements to the structure of Kotlin decompilation. It gets rid of most (all?) incorrectly formatted labels, breaks, and continues, and it provides some support for when statements (those which compile to tableswitch and lookupswitch instructions).

This does make a couple small changes to the main Vineflower source.
It adds an additional getter in SwitchHeadExprent:

public List<List<Exprent>> getCaseValues() {
return caseValues;
}

It also makes a visibility change in ExprProcessor (private to public):
public static void addDeletedGotoInstructionMapping(Statement stat, TextBuffer buffer) {

All other changes are Kotlin-specific.

sschr15 added 20 commits March 22, 2025 19:36
…"do" statements

# Conflicts:
#	plugins/kotlin/src/main/java/org/vineflower/kotlin/stat/KDoStatement.java
#	plugins/kotlin/testData/results/pkg/TestForRange.dec
#	plugins/kotlin/testData/results/pkg/TestFunVarargs.dec
#	plugins/kotlin/testData/results/pkg/TestNonInlineLambda.dec
I should look into this more and see why it's seemingly quite inconsistent
This existed prior to the rebase, but something went amiss and I'm not quite sure what
This also fixes a potential issue where `repeat` would be generated despite counting down
@github-actions
Copy link

Test Results

   18 files  ±0     18 suites  ±0   1m 5s ⏱️ +3s
1 939 tests ±0  1 939 ✅ ±0  0 💤 ±0  0 ❌ ±0 
2 574 runs  ±0  2 574 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit ed32cd2. ± Comparison against base commit adf9083.

@sschr15 sschr15 mentioned this pull request Aug 23, 2024
36 tasks
@sschr15 sschr15 requested a review from jaskarth March 23, 2025 05:27
Copy link
Member

@jaskarth jaskarth left a comment

Choose a reason for hiding this comment

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

Looks fine. Thanks a lot!

@jaskarth jaskarth added Type: Enhancement New feature or request Subsystem: Writing Anything concerning how expressions are written Priority: Medium Medium priority labels Aug 14, 2025
@jaskarth jaskarth merged commit b876b97 into develop/1.12.0 Aug 14, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Medium Medium priority Subsystem: Writing Anything concerning how expressions are written Type: Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants