diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/JumpInstruction.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/JumpInstruction.java index 1597df013264..d7656807066e 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/JumpInstruction.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/JumpInstruction.java @@ -1,4 +1,4 @@ -// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.code; public class JumpInstruction extends Instruction { diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/SwitchInstruction.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/SwitchInstruction.java index 6379ccadaf4d..cc6545d89c54 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/SwitchInstruction.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/SwitchInstruction.java @@ -1,4 +1,4 @@ -// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.code; public class SwitchInstruction extends Instruction { diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/cfg/BasicBlock.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/cfg/BasicBlock.java index 9eb4fbab0ede..0187962a5c45 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/cfg/BasicBlock.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/code/cfg/BasicBlock.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.code.cfg; import org.jetbrains.java.decompiler.code.Instruction; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/main/collectors/BytecodeMappingTracer.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/main/collectors/BytecodeMappingTracer.java index 32ca965883f2..9cef4be5316e 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/main/collectors/BytecodeMappingTracer.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/main/collectors/BytecodeMappingTracer.java @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.main.collectors; import org.jetbrains.java.decompiler.struct.attr.StructLineNumberTableAttribute; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/ConcatenationHelper.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/ConcatenationHelper.java index 5d47c847133c..907745f83111 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/ConcatenationHelper.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/ConcatenationHelper.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler; import org.jetbrains.java.decompiler.ClassNameConstants; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java index a3f47f047b9c..5f54ad6b96cc 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java @@ -346,7 +346,7 @@ public class ExprProcessor { if (offsets != null) { //TODO: Figure out why this nulls in some cases offsets.set(offset, offset + instr.length); } - VarExprent left = new VarExprent(varIndex, varTypes[instr.opcode - CodeConstants.opc_istore], varProcessor, offsets); + VarExprent left = new VarExprent(varIndex, varTypes[instr.opcode - CodeConstants.opc_istore], varProcessor, offsets, true); exprList.add(new AssignmentExprent(left, value, offsets)); break; } diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/MergeHelper.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/MergeHelper.java index bbd7bd0cb420..6426b91e8a0f 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/MergeHelper.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/MergeHelper.java @@ -1,4 +1,4 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler; import org.jetbrains.java.decompiler.code.cfg.BasicBlock; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/SimplifyExprentsHelper.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/SimplifyExprentsHelper.java index eb96762fa217..b7ce173eee93 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/SimplifyExprentsHelper.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/SimplifyExprentsHelper.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler; import org.jetbrains.java.decompiler.code.CodeConstants; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/StackVarsProcessor.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/StackVarsProcessor.java index b9381a824ff3..7df9ba8b0c64 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/StackVarsProcessor.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/StackVarsProcessor.java @@ -1,4 +1,4 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler; import org.jetbrains.java.decompiler.code.CodeConstants; @@ -18,6 +18,8 @@ import org.jetbrains.java.decompiler.modules.decompiler.vars.VarVersionPair; import org.jetbrains.java.decompiler.modules.decompiler.vars.VarVersionsGraph; import org.jetbrains.java.decompiler.struct.StructClass; import org.jetbrains.java.decompiler.struct.StructMethod; +import org.jetbrains.java.decompiler.struct.attr.StructGeneralAttribute; +import org.jetbrains.java.decompiler.struct.attr.StructLocalVariableTableAttribute; import org.jetbrains.java.decompiler.util.FastSparseSetFactory.FastSparseSet; import org.jetbrains.java.decompiler.util.SFormsFastMapDirect; @@ -365,7 +367,6 @@ public class StackVarsProcessor { } } - /* This workaround isn't needed with Forge's cleanups. //workaround to preserve variable names AssignmentExprent assignmentExprent = (AssignmentExprent)exprent; if (assignmentExprent.getRight() instanceof VarExprent && assignmentExprent.getLeft() instanceof VarExprent leftExp) { @@ -379,7 +380,6 @@ public class StackVarsProcessor { } } } - */ if (isSelfReference && vernotreplaced) { return new int[]{-1, changed}; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/deobfuscator/ExceptionDeobfuscator.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/deobfuscator/ExceptionDeobfuscator.java index 35ca6e19054a..31f40f838bb6 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/deobfuscator/ExceptionDeobfuscator.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/deobfuscator/ExceptionDeobfuscator.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.deobfuscator; import org.jetbrains.annotations.NotNull; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AnnotationExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AnnotationExprent.java index 4beaf1ee874d..b4c5c7cc7400 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AnnotationExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AnnotationExprent.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.java.decompiler.main.DecompilerContext; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ArrayExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ArrayExprent.java index 406848324e42..21799c11dba9 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ArrayExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ArrayExprent.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.java.decompiler.main.collectors.BytecodeMappingTracer; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssertExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssertExprent.java index 9d89b15a8f42..992f9a27068f 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssertExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssertExprent.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - */ +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.java.decompiler.main.collectors.BytecodeMappingTracer; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssignmentExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssignmentExprent.java index 06567749310f..5abad26d084f 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssignmentExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssignmentExprent.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.java.decompiler.code.CodeConstants; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java index 54f6a306cd28..fb33a9c2fab2 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.java.decompiler.code.CodeConstants; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/FieldExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/FieldExprent.java index 532a6fddef38..550ca49f4419 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/FieldExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/FieldExprent.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.java.decompiler.code.CodeConstants; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/FunctionExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/FunctionExprent.java index ff1a0ebe60cf..45c6d0136521 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/FunctionExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/FunctionExprent.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.java.decompiler.code.CodeConstants; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/IfExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/IfExprent.java index 7c9ee0a57cd2..673355e3e2c6 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/IfExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/IfExprent.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - */ +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.java.decompiler.main.collectors.BytecodeMappingTracer; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java index 241ca64cae72..e982488e89af 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.annotations.NotNull; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/MonitorExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/MonitorExprent.java index cd465813bc3e..bca52113b492 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/MonitorExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/MonitorExprent.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - */ +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.java.decompiler.main.collectors.BytecodeMappingTracer; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/NewExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/NewExprent.java index c47ae33d7d62..c2a2376fc392 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/NewExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/NewExprent.java @@ -1,4 +1,4 @@ -// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.java.decompiler.code.CodeConstants; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/SwitchExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/SwitchExprent.java index e9c1db3545b7..6efd2442e83d 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/SwitchExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/SwitchExprent.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - */ +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.java.decompiler.main.collectors.BytecodeMappingTracer; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/VarExprent.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/VarExprent.java index 6700cfac09ad..7be615952da0 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/VarExprent.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/exps/VarExprent.java @@ -1,4 +1,4 @@ -// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.exps; import org.jetbrains.annotations.NotNull; @@ -38,17 +38,23 @@ public class VarExprent extends Exprent { private int version = 0; private boolean classDef = false; private boolean stack = false; + private final boolean isFromStore; public VarExprent(int index, VarType varType, VarProcessor processor) { this(index, varType, processor, null); } public VarExprent(int index, VarType varType, VarProcessor processor, BitSet bytecode) { + this(index, varType, processor, bytecode, false); + } + + public VarExprent(int index, VarType varType, VarProcessor processor, BitSet bytecode, boolean fromStore) { super(EXPRENT_VAR); this.index = index; this.varType = varType; this.processor = processor; this.addBytecodeOffsets(bytecode); + this.isFromStore = fromStore; } @Override @@ -68,7 +74,7 @@ public class VarExprent extends Exprent { @Override public Exprent copy() { - VarExprent var = new VarExprent(index, getVarType(), processor, bytecode); + VarExprent var = new VarExprent(index, getVarType(), processor, bytecode, isFromStore); var.setDefinition(definition); var.setVersion(version); var.setClassDef(classDef); @@ -126,7 +132,11 @@ public class VarExprent extends Exprent { if (attr != null && processor != null) { Integer origIndex = processor.getVarOriginalIndex(index); if (origIndex != null) { - String name = attr.getName(origIndex, bytecode == null ? -1 : bytecode.nextSetBit(0)); + int offset = bytecode == null ? -1 : bytecode.nextSetBit(0); + if (bytecode != null && isFromStore) { + offset = bytecode.previousSetBit(bytecode.size()) + 1; + } + String name = attr.getName(origIndex, offset); if (name != null && TextUtil.isValidIdentifier(name, method.getBytecodeVersion())) { return name; } diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/BasicBlockStatement.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/BasicBlockStatement.java index 3a2535a6be06..40e51f2f4c06 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/BasicBlockStatement.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/BasicBlockStatement.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.stats; import org.jetbrains.java.decompiler.code.CodeConstants; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/DummyExitStatement.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/DummyExitStatement.java index b1c9165f9a4a..56dde0094b4e 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/DummyExitStatement.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/DummyExitStatement.java @@ -1,4 +1,4 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.stats; import java.util.BitSet; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/IfStatement.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/IfStatement.java index 789e008f2a1b..7b2312542dae 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/IfStatement.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/IfStatement.java @@ -1,4 +1,4 @@ -// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.stats; import org.jetbrains.java.decompiler.main.collectors.BytecodeMappingTracer; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/RootStatement.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/RootStatement.java index 1a8fa437c6c4..8807d0ebe66e 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/RootStatement.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/RootStatement.java @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.modules.decompiler.stats; import org.jetbrains.java.decompiler.main.collectors.BytecodeMappingTracer; diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/Statement.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/Statement.java index 763a75326bb6..c52093eaa7d7 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/Statement.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/stats/Statement.java @@ -830,8 +830,6 @@ public abstract class Statement implements IMatchable { ((Statement)obj).getOffset(values); } else if (obj instanceof Exprent) { ((Exprent)obj).getBytecodeRange(values); - } else { - System.out.println("WTF?" + obj.getClass()); } } } diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/struct/StructMethod.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/struct/StructMethod.java index 470965603db2..46bb5fae1b3e 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/struct/StructMethod.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/struct/StructMethod.java @@ -93,7 +93,6 @@ public class StructMethod extends StructMember { } } - @SuppressWarnings("AssignmentToForLoopParameter") private InstructionSequence parseBytecode(DataInputFullStream in, int length, ConstantPool pool) throws IOException { VBStyleCollection instructions = new VBStyleCollection<>(); diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/util/StartEndPair.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/util/StartEndPair.java index ded36aadd722..2ce9c9de0ae2 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/util/StartEndPair.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/util/StartEndPair.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package org.jetbrains.java.decompiler.util; public class StartEndPair { @@ -25,6 +11,7 @@ public class StartEndPair { @Override public boolean equals(Object obj) { + if(!(obj instanceof StartEndPair)) return false; return ((StartEndPair)obj).start == start && ((StartEndPair)obj).end == end; } diff --git a/plugins/java-decompiler/engine/testData/results/Integer.dec b/plugins/java-decompiler/engine/testData/results/Integer.dec index d9ef3d766c80..13824db7bc7c 100644 --- a/plugins/java-decompiler/engine/testData/results/Integer.dec +++ b/plugins/java-decompiler/engine/testData/results/Integer.dec @@ -37,8 +37,8 @@ public final class Integer extends Number implements Comparable { var2[var4] = digits[-var0];// 151 if (var3) {// 153 - --var4;// 154 - var2[var4] = '-'; + --var4; + var2[var4] = '-';// 154 } return new String(var2, var4, 33 - var4);// 157 @@ -75,8 +75,8 @@ public final class Integer extends Number implements Comparable { int var7 = var6 - 1;// 333 do { - --var5;// 335 - var2[var3 + var5] = digits[var0 & var7]; + --var5; + var2[var3 + var5] = digits[var0 & var7];// 335 var0 >>>= var1;// 336 } while(var0 != 0 && var5 > 0);// 337 @@ -112,17 +112,17 @@ public final class Integer extends Number implements Comparable { var3 = var0 / 100;// 445 var4 = var0 - ((var3 << 6) + (var3 << 5) + (var3 << 2));// 447 var0 = var3;// 448 - --var5;// 449 - var2[var5] = DigitOnes[var4]; - --var5;// 450 - var2[var5] = DigitTens[var4]; + --var5; + var2[var5] = DigitOnes[var4];// 449 + --var5; + var2[var5] = DigitTens[var4];// 450 } do { var3 = var0 * '쳍' >>> 19;// 456 var4 = var0 - ((var3 << 3) + (var3 << 1));// 457 - --var5;// 458 - var2[var5] = digits[var4]; + --var5; + var2[var5] = digits[var4];// 458 var0 = var3;// 459 } while(var3 != 0);// 460 @@ -237,7 +237,7 @@ public final class Integer extends Number implements Comparable { } public static Integer valueOf(int var0) { - return var0 >= -128 && var0 <= Integer.IntegerCache.high ? Integer.IntegerCache.cache[var0 + 128] : new Integer(var0);// 830 831 + return var0 >= -128 && var0 <= Integer.IntegerCache.high ? Integer.IntegerCache.cache[var0 + 128] : new Integer(var0);// 830 831 832 } public Integer(int var1) { @@ -421,9 +421,9 @@ public final class Integer extends Number implements Comparable { var0 <<= 4; } - if (var0 >>> 30 == 0) { + if (var0 >>> 30 == 0) {// 1403 var1 += 2; - var0 <<= 2;// 1403 + var0 <<= 2; } var1 -= var0 >>> 31;// 1404 @@ -454,9 +454,9 @@ public final class Integer extends Number implements Comparable { var0 = var1; } - var1 = var0 << 2; + var1 = var0 << 2;// 1430 if (var1 != 0) { - var2 -= 2;// 1430 + var2 -= 2; var0 = var1; } @@ -543,187 +543,373 @@ public final class Integer extends Number implements Comparable { class 'java/lang/Integer' { method 'toString (II)Ljava/lang/String;' { + 0 18 1 18 2 18 + 5 18 6 18 + 7 18 8 18 b 19 + c 19 d 19 + e 22 f 22 + 10 22 11 22 + 14 23 15 23 + 16 23 + 17 23 18 23 19 25 + 1a 25 1d 25 + 1e 26 1f 26 27 26 28 27 + 29 27 2a 27 + 2b 27 + 2c 28 2d 28 + 30 29 31 29 32 29 + 33 32 + 34 32 35 32 36 32 + 39 33 3c 33 + 3d 33 + 3e 33 3f 33 + 40 33 + 41 33 + 42 33 + 43 33 44 33 45 33 46 33 47 33 + 49 34 4b 34 + 4f 37 + 50 37 + 51 37 52 37 + 53 37 + 54 37 + 55 37 56 37 57 37 58 37 + 59 38 5a 38 + 5d 40 5e 39 + 5f 39 + 60 39 + 61 40 + 62 40 63 40 + 64 40 65 40 + 6a 43 + 6b 43 + 6c 43 6d 43 + 6e 43 + 6f 43 + 70 43 71 43 75 43 } method 'toUnsignedString (II)Ljava/lang/String;' { + 0 48 1 48 + 2 48 + 3 48 + 4 48 5 48 + 6 48 + 7 48 8 48 } method 'toHexString (I)Ljava/lang/String;' { + 0 52 1 52 2 52 + 3 52 + 4 52 5 52 } method 'toOctalString (I)Ljava/lang/String;' { + 0 56 1 56 2 56 + 3 56 + 4 56 5 56 } method 'toBinaryString (I)Ljava/lang/String;' { + 0 60 1 60 2 60 + 3 60 + 4 60 5 60 } method 'toUnsignedString0 (II)Ljava/lang/String;' { 0 64 + 1 64 + 2 64 3 64 + 4 64 + 5 64 6 64 7 64 + 8 65 + 9 65 a 65 b 65 c 65 + d 65 e 65 f 65 10 65 + 11 65 + 12 65 13 65 + 14 66 17 66 + 18 66 + 19 67 + 1a 67 + 1b 67 + 1c 67 1d 67 + 1e 67 1f 67 + 20 67 + 21 67 + 27 68 + 28 68 29 68 2d 68 } method 'formatUnsignedInt (II[CII)I' { + 0 72 + 1 72 2 72 + 3 72 4 73 + 5 73 6 73 7 73 + 8 73 + 9 74 + a 74 b 74 c 74 d 74 + e 74 + f 78 + 10 78 11 77 + 12 77 + 13 77 + 14 78 + 15 78 16 78 17 78 + 18 78 + 19 78 + 1a 78 + 1b 78 + 1c 78 1d 78 1e 78 1f 78 + 21 79 23 79 + 24 80 25 80 + 28 80 + 29 80 2a 80 + 2d 82 + 2e 82 2f 82 } method 'toString (I)Ljava/lang/String;' { + 0 86 1 86 + 2 86 3 86 6 87 + 7 87 8 87 + 9 89 a 89 + d 89 e 89 f 89 + 10 89 + 11 89 12 89 13 89 + 17 89 18 89 1b 89 + 1c 90 1f 90 + 20 91 + 21 91 + 22 91 23 91 + 24 91 + 25 91 + 2a 92 2b 92 2f 92 } method 'toUnsignedString (I)Ljava/lang/String;' { + 0 97 1 97 + 2 97 + 3 97 4 97 + 5 97 + 6 97 7 97 } method 'getChars (II[C)V' { + 0 101 1 101 + 2 101 3 102 4 102 + 5 102 + 6 103 7 103 a 104 + b 104 c 104 + d 104 + e 105 f 105 10 105 + 11 110 12 110 + 13 110 14 110 + 17 111 18 111 + 19 111 1a 111 1b 111 + 1c 112 + 1d 112 1e 112 + 1f 112 20 112 + 21 112 22 112 23 112 24 112 + 25 112 26 112 27 112 28 112 29 112 2a 112 + 2b 112 + 2c 113 2d 113 + 2e 115 2f 114 + 30 114 + 31 114 + 32 115 + 33 115 34 115 + 35 115 + 36 115 + 37 115 + 38 115 39 115 3a 115 + 3b 117 3c 116 + 3d 116 + 3e 116 + 3f 117 + 40 117 41 117 + 42 117 + 43 117 + 44 117 + 45 117 46 117 47 117 + 4b 121 4c 121 + 4d 121 4e 121 4f 121 + 50 121 51 121 52 121 + 53 122 + 54 122 55 122 56 122 + 57 122 58 122 59 122 5a 122 5b 122 5c 122 + 5d 122 + 5e 124 5f 123 + 60 123 + 61 123 + 62 124 + 63 124 64 124 + 65 124 + 66 124 + 67 124 + 68 124 69 124 6a 124 + 6b 125 6c 125 6e 126 + 74 128 + 75 128 76 128 + 79 130 7a 129 + 7b 129 + 7c 129 + 7d 130 + 7e 130 + 7f 130 + 80 130 81 130 82 133 } @@ -731,30 +917,52 @@ class 'java/lang/Integer' { method 'stringSize (I)I' { 0 137 1 137 + 2 137 3 137 + 4 137 + 5 137 + 6 137 7 137 8 137 + b 140 c 140 d 140 e 140 f 137 + 10 137 + 11 137 } method 'parseInt (Ljava/lang/String;I)I' { + 0 144 1 144 8 145 + 9 145 d 145 + e 146 f 146 10 146 1e 147 + 1f 147 + 23 147 27 147 + 28 147 2c 147 + 2d 147 + 2e 147 32 147 + 33 148 34 148 + 35 148 36 148 44 149 + 45 149 + 49 149 4d 149 + 4e 149 52 149 + 53 149 + 54 149 58 149 59 151 5a 151 @@ -762,201 +970,402 @@ class 'java/lang/Integer' { 5c 152 5d 153 5e 153 + 5f 153 + 60 154 61 154 + 62 154 + 63 154 64 154 + 65 154 66 155 + 67 155 68 155 + 69 155 + 6a 156 + 6b 156 6c 156 + 6f 157 70 157 71 157 + 72 157 + 73 157 74 157 + 75 157 + 76 158 + 77 158 78 158 + 79 158 7a 158 + 7d 159 + 7e 159 7f 159 + 80 159 81 159 84 160 85 160 86 161 + 87 161 88 161 + 89 161 + 8d 162 + 8e 162 8f 162 + 90 162 91 162 + 94 163 95 163 + 96 163 + 97 163 98 163 + 99 166 + 9a 166 9b 166 9c 166 + 9f 167 a0 167 + a1 167 + a2 167 a3 167 a4 170 + a7 174 + a8 174 + a9 174 aa 174 ab 174 + ac 174 + ad 174 + ae 174 + af 174 + b0 174 b1 174 + b4 175 b7 175 + b8 175 + b9 175 ba 175 + bb 175 + bc 175 + bd 175 be 175 + bf 175 + c0 175 c1 175 + c2 175 + c3 176 + c4 176 c5 176 + c8 177 c9 177 + ca 177 + cb 177 cc 177 + cd 180 + ce 180 + cf 180 d0 180 + d3 181 d4 181 + d5 181 + d6 181 d7 181 + d9 184 db 184 + dc 185 + dd 185 + de 185 + df 185 + e0 185 e1 185 e2 185 + e5 186 e6 186 + e7 186 + e8 186 e9 186 + eb 174 + ec 174 ee 174 + f5 192 f6 192 + f7 192 + f8 192 f9 192 + fa 190 fb 190 + fe 190 + 102 190 103 190 104 190 } method 'parseInt (Ljava/lang/String;)I' { + 0 198 1 198 + 2 198 3 198 + 4 198 + 5 198 6 198 } method 'parseUnsignedInt (Ljava/lang/String;I)I' { + 0 202 1 202 8 203 + 9 203 d 203 + e 205 f 205 + 10 205 + 11 205 12 205 + 13 206 14 206 + 17 207 18 207 19 207 + 1a 207 + 1b 207 1c 207 + 1d 208 1e 208 + 1f 208 20 208 27 209 + 28 209 + 2f 209 31 209 + 32 209 + 33 209 37 209 + 38 210 39 210 3a 210 + 3d 210 3e 210 + 3f 210 40 210 + 43 210 44 210 + 45 210 46 210 + 49 218 + 4a 218 4b 218 + 4c 218 + 4d 218 4e 218 + 4f 211 + 50 211 51 211 + 52 211 + 53 211 54 211 + 55 211 + 56 212 + 57 212 58 212 + 59 212 + 5a 212 5b 212 5c 212 5d 212 5e 212 + 61 213 + 62 213 63 213 64 213 69 215 + 6a 215 + 71 215 73 215 + 74 215 + 75 215 79 215 + 7a 221 7b 221 + 7c 221 + 7d 221 7e 221 } method 'parseUnsignedInt (Ljava/lang/String;)I' { + 0 227 1 227 + 2 227 3 227 + 4 227 + 5 227 6 227 } method 'valueOf (Ljava/lang/String;I)Ljava/lang/Integer;' { + 0 231 + 1 231 2 231 + 3 231 + 4 231 5 231 + 6 231 + 7 231 8 231 } method 'valueOf (Ljava/lang/String;)Ljava/lang/Integer;' { + 0 235 1 235 + 2 235 3 235 + 4 235 + 5 235 6 235 + 7 235 + 8 235 9 235 } method 'valueOf (I)Ljava/lang/Integer;' { + 0 239 1 239 + 2 239 3 239 + 6 239 7 239 + 8 239 + 9 239 a 239 d 239 + e 239 + f 239 + 10 239 11 239 + 12 239 + 13 239 14 239 15 239 + 1b 239 } method ' (I)V' { + 4 243 + 5 243 6 243 + 7 243 + 8 243 9 244 } method ' (Ljava/lang/String;)V' { + 4 247 + 5 247 6 247 + 7 247 8 247 + 9 247 + a 247 b 247 + c 247 + d 247 e 248 } method 'byteValue ()B' { + 0 251 1 251 + 2 251 + 3 251 4 251 5 251 } method 'shortValue ()S' { + 0 255 1 255 + 2 255 + 3 255 4 255 5 255 } method 'intValue ()I' { + 0 259 1 259 + 2 259 + 3 259 4 259 } method 'longValue ()J' { + 0 263 1 263 + 2 263 + 3 263 4 263 5 263 } method 'floatValue ()F' { + 0 267 1 267 + 2 267 + 3 267 4 267 5 267 } method 'doubleValue ()D' { + 0 271 1 271 + 2 271 + 3 271 4 271 5 271 } method 'toString ()Ljava/lang/String;' { + 0 275 1 275 + 2 275 + 3 275 4 275 + 5 275 + 6 275 7 275 } method 'hashCode ()I' { + 0 279 1 279 + 2 279 + 3 279 4 279 + 5 279 + 6 279 7 279 } method 'hashCode (I)I' { + 0 283 1 283 } method 'equals (Ljava/lang/Object;)Z' { + 0 287 1 287 + 2 287 + 3 287 4 287 + 7 288 8 288 + 9 288 + a 288 + b 288 c 288 + d 288 + e 288 f 288 + 10 288 + 11 288 12 288 1a 288 1b 290 @@ -964,117 +1373,245 @@ class 'java/lang/Integer' { } method 'getInteger (Ljava/lang/String;)Ljava/lang/Integer;' { + 0 295 1 295 2 295 + 3 295 + 4 295 5 295 } method 'getInteger (Ljava/lang/String;I)Ljava/lang/Integer;' { + 0 299 1 299 2 299 + 3 299 + 4 299 5 299 + 6 300 7 300 + a 300 b 300 + c 300 + d 300 + 11 300 12 300 } method 'getInteger (Ljava/lang/String;Ljava/lang/Integer;)Ljava/lang/Integer;' { 0 304 1 304 + 2 307 3 307 + 4 307 + 5 307 6 307 a 308 + b 311 c 311 + f 313 10 313 + 11 313 + 12 313 13 313 14 314 + 15 318 16 318 } method 'decode (Ljava/lang/String;)Ljava/lang/Integer;' { 0 322 + 1 322 2 322 3 323 4 323 5 324 6 324 + 7 325 8 325 + 9 325 + a 325 b 325 12 326 + 13 326 17 326 + 18 328 19 328 1a 328 + 1b 328 + 1c 328 1d 328 + 1e 328 + 1f 329 + 20 329 21 329 + 22 329 23 329 26 330 27 330 28 331 + 29 331 + 2a 331 + 2e 332 + 2f 332 30 332 + 31 332 32 332 35 333 + 38 336 39 336 + 3a 336 + 3b 336 3c 336 + 3d 336 + 3e 336 3f 336 + 42 336 43 336 + 44 336 + 45 336 46 336 + 47 336 + 48 336 49 336 4c 345 + 4d 345 + 4e 345 4f 346 + 50 346 51 346 + 55 337 56 337 + 57 337 + 58 337 59 337 + 5a 337 + 5b 337 5c 337 5f 338 + 60 338 + 61 338 62 339 + 63 339 64 339 + 68 340 69 340 + 6a 340 + 6b 340 6c 340 + 6d 340 + 6e 340 6f 340 + 72 340 73 340 + 74 340 + 75 340 76 340 + 77 340 78 340 79 340 7c 341 + 7d 341 + 7e 341 7f 342 + 80 342 81 342 + 82 349 83 349 + 84 349 + 85 349 86 349 + 87 349 + 88 349 89 349 + 8c 349 8d 349 + 8e 349 + 8f 349 90 349 + 91 349 + 92 349 93 349 9a 361 + 9b 361 9f 361 + a0 352 + a1 352 a2 352 + a3 352 + a4 352 + a5 352 a6 352 + a7 352 + a8 352 a9 352 + aa 352 + ab 353 ac 353 + af 353 + b0 353 b1 353 + b2 353 + b3 353 b4 353 b5 353 + b6 353 + b7 353 + bb 353 bd 353 + be 353 + c4 355 c5 355 cf 355 + d0 355 + d4 355 + d5 355 d6 355 + d7 355 + d8 355 dc 355 + dd 355 + de 355 + e2 355 + e3 355 e4 355 e7 354 + e8 355 + e9 356 + ea 356 + eb 356 ec 356 + ed 356 + ee 356 ef 356 + f0 356 + f1 359 + f2 359 f3 359 } method 'compareTo (Ljava/lang/Integer;)I' { + 0 367 1 367 + 2 367 + 3 367 + 4 367 5 367 + 6 367 + 7 367 8 367 + 9 367 + a 367 b 367 } method 'compare (II)I' { + 0 371 + 1 371 2 371 5 371 + 9 371 + a 371 b 371 e 371 12 371 @@ -1082,53 +1619,83 @@ class 'java/lang/Integer' { } method 'compareUnsigned (II)I' { + 0 375 1 375 + 2 375 3 375 + 4 375 5 375 + 6 375 7 375 8 375 + 9 375 + a 375 b 375 } method 'toUnsignedLong (I)J' { + 0 379 1 379 2 379 + 3 379 + 4 379 5 379 6 379 } method 'divideUnsigned (II)I' { + 0 383 1 383 + 2 383 + 3 383 + 4 383 5 383 + 6 383 + 7 383 8 383 9 383 a 383 } method 'remainderUnsigned (II)I' { + 0 387 1 387 + 2 387 + 3 387 + 4 387 5 387 + 6 387 + 7 387 8 387 9 387 a 387 } method 'highestOneBit (I)I' { + 1 391 2 391 3 391 5 391 + 7 392 8 392 9 392 b 392 + d 393 e 393 f 393 11 393 + 13 394 14 394 + 15 394 16 394 18 394 + 1a 395 1b 395 + 1c 395 1d 395 1f 395 + 20 396 + 21 396 22 396 23 396 24 396 @@ -1136,122 +1703,188 @@ class 'java/lang/Integer' { } method 'lowestOneBit (I)I' { + 0 400 + 1 400 2 400 3 400 4 400 } method 'numberOfLeadingZeros (I)I' { + 0 404 1 404 4 405 + 5 405 6 405 7 407 8 407 + 9 408 a 408 + b 408 c 408 d 408 10 409 + 11 409 + 12 409 14 410 + 15 410 17 410 + 18 413 19 413 + 1a 413 1b 413 1c 413 1f 414 + 20 414 + 21 414 23 415 + 24 415 26 415 + 27 418 28 418 + 29 418 2a 418 2b 418 2e 419 + 2f 419 + 30 419 32 420 34 420 + 35 423 36 423 + 37 423 38 423 39 423 3c 424 + 3d 424 + 3e 424 40 425 42 425 + 44 428 45 428 + 46 428 47 428 49 428 + 4a 429 4b 429 } method 'numberOfTrailingZeros (I)I' { + 0 434 1 434 4 435 + 5 435 6 435 7 437 + 8 437 9 437 + a 438 b 438 + c 438 d 438 e 438 + f 439 10 439 14 440 + 15 440 17 440 + 18 441 19 441 + 1a 444 1b 444 + 1c 444 1d 444 1e 444 + 1f 445 20 445 24 446 + 25 446 27 446 + 28 447 29 447 + 2a 450 2b 450 2c 450 2d 450 + 2e 451 2f 451 33 452 35 452 + 36 453 37 453 + 38 456 39 456 3a 456 3b 456 + 3c 457 3d 457 41 458 43 458 + 44 459 45 459 + 46 462 + 47 462 48 462 49 462 4a 462 + 4b 462 4c 462 4d 462 4e 462 } method 'bitCount (I)I' { + 1 467 2 467 3 467 4 467 + 5 467 6 467 8 467 + 9 468 a 468 + b 468 c 468 + d 468 e 468 f 468 10 468 + 11 468 12 468 13 468 14 468 + 15 469 + 16 469 17 469 18 469 19 469 1a 469 + 1b 469 1c 469 1d 469 + 1f 470 20 470 + 21 470 22 470 24 470 + 26 471 27 471 + 28 471 29 471 2b 471 + 2c 472 2d 472 + 2e 472 2f 472 30 472 } method 'rotateLeft (II)I' { + 0 476 + 1 476 2 476 + 3 476 + 4 476 5 476 6 476 7 476 @@ -1259,7 +1892,11 @@ class 'java/lang/Integer' { } method 'rotateRight (II)I' { + 0 480 + 1 480 2 480 + 3 480 + 4 480 5 480 6 480 7 480 @@ -1267,96 +1904,143 @@ class 'java/lang/Integer' { } method 'reverse (I)I' { + 0 484 1 484 + 2 484 3 484 4 484 5 484 + 6 484 7 484 8 484 9 484 + a 484 b 484 c 484 d 484 + e 485 f 485 + 10 485 11 485 12 485 13 485 + 14 485 15 485 16 485 17 485 + 18 485 19 485 1a 485 1b 485 + 1c 486 1d 486 + 1e 486 1f 486 20 486 21 486 + 22 486 23 486 24 486 25 486 + 26 486 27 486 28 486 29 486 + 2a 487 2b 487 + 2c 487 2d 487 + 2e 487 2f 487 + 30 487 31 487 32 487 + 33 487 34 487 35 487 + 36 487 37 487 + 38 487 39 487 3a 487 + 3b 487 3c 487 3d 487 + 3e 487 3f 487 + 40 487 41 487 42 487 43 487 + 44 488 45 488 } method 'signum (I)I' { + 0 492 1 492 + 2 492 3 492 + 4 492 5 492 6 492 + 7 492 8 492 9 492 a 492 } method 'reverseBytes (I)I' { + 0 496 1 496 + 2 496 3 496 + 4 496 5 496 + 6 496 7 496 8 496 + 9 496 a 496 b 496 + c 496 d 496 + e 496 f 496 10 496 + 11 496 12 496 13 496 + 14 496 15 496 + 16 496 17 496 18 496 19 496 } method 'sum (II)I' { + 0 500 + 1 500 2 500 3 500 } method 'max (II)I' { + 0 504 + 1 504 2 504 + 3 504 + 4 504 5 504 } method 'min (II)I' { + 0 508 + 1 508 2 508 + 3 508 + 4 508 5 508 } } @@ -1364,40 +2048,78 @@ class 'java/lang/Integer' { class 'java/lang/Integer$IntegerCache' { method ' ()V' { 10 517 + 11 517 12 517 13 518 + 14 518 15 518 + 16 518 + 17 518 18 518 + 19 520 1a 520 + 1d 522 1e 522 + 1f 522 + 20 522 21 522 + 22 523 23 523 + 24 523 25 523 + 26 523 + 27 523 28 523 + 29 524 2a 524 + 2b 524 2c 524 + 2d 524 + 2e 524 2f 524 33 525 + 34 529 35 529 + 36 529 + 37 529 38 530 + 39 530 + 3a 530 3b 530 + 3c 530 3d 530 3e 530 3f 530 43 530 + 44 530 + 45 530 46 531 + 47 531 48 531 49 533 4a 533 + 4b 533 4c 533 + 4d 533 + 4e 533 4f 533 50 533 53 534 + 54 534 + 55 534 + 56 534 5c 534 + 5d 534 + 5e 534 62 534 63 533 + 64 533 + 65 533 6f 537 + 70 537 + 71 537 72 537 + 73 537 74 537 7f 539 } @@ -1418,7 +2140,7 @@ Lines mapping: 149 <-> 35 151 <-> 38 153 <-> 39 -154 <-> 40 +154 <-> 41 157 <-> 44 187 <-> 49 233 <-> 53 @@ -1432,7 +2154,7 @@ Lines mapping: 331 <-> 73 332 <-> 74 333 <-> 75 -335 <-> 78 +335 <-> 79 336 <-> 80 337 <-> 81 339 <-> 83 @@ -1452,11 +2174,11 @@ Lines mapping: 445 <-> 112 447 <-> 113 448 <-> 114 -449 <-> 115 -450 <-> 117 +449 <-> 116 +450 <-> 118 456 <-> 122 457 <-> 123 -458 <-> 124 +458 <-> 125 459 <-> 126 460 <-> 127 462 <-> 129 @@ -1536,6 +2258,7 @@ Lines mapping: 809 <-> 540 830 <-> 240 831 <-> 240 +832 <-> 240 850 <-> 244 851 <-> 245 867 <-> 248 @@ -1609,7 +2332,7 @@ Lines mapping: 1400 <-> 409 1401 <-> 414 1402 <-> 419 -1403 <-> 426 +1403 <-> 424 1404 <-> 429 1405 <-> 430 1425 <-> 435 @@ -1617,7 +2340,7 @@ Lines mapping: 1427 <-> 439 1428 <-> 445 1429 <-> 451 -1430 <-> 459 +1430 <-> 457 1431 <-> 463 1446 <-> 468 1447 <-> 469 @@ -1641,7 +2364,6 @@ Not mapped: 591 780 798 -832 849 866 1103 diff --git a/plugins/java-decompiler/engine/testData/results/MemberDeclarationTypeAnnotations.dec b/plugins/java-decompiler/engine/testData/results/MemberDeclarationTypeAnnotations.dec index 52775661383d..c0f1b457bdef 100644 --- a/plugins/java-decompiler/engine/testData/results/MemberDeclarationTypeAnnotations.dec +++ b/plugins/java-decompiler/engine/testData/results/MemberDeclarationTypeAnnotations.dec @@ -35,13 +35,23 @@ public class MemberDeclarationTypeAnnotations<@A P extends @B Number & @F Serial class 'typeAnnotations/MemberDeclarationTypeAnnotations' { method 'lambda$new$0 (Ljava/lang/String;)V' { 0 10 + 1 10 + 2 10 + 3 10 4 10 + 5 10 + 6 10 7 11 } method 'lambda$new$1 (Ljava/lang/String;Ljava/lang/String;)V' { 0 13 + 1 13 + 2 13 + 3 13 4 13 + 5 13 + 6 13 7 14 } @@ -52,12 +62,16 @@ class 'typeAnnotations/MemberDeclarationTypeAnnotations' { method 'foo ([Ljava/lang/Number;)Ljava/lang/Number;' { 0 22 1 22 + 2 22 + 3 22 4 22 } method 'bar ([Ljava/lang/Object;)Ljava/lang/Number;' { 0 27 1 27 + 2 27 + 3 27 4 27 } diff --git a/plugins/java-decompiler/engine/testData/results/NestedType.dec b/plugins/java-decompiler/engine/testData/results/NestedType.dec index 26ba7f196e38..360ea78e4cad 100644 --- a/plugins/java-decompiler/engine/testData/results/NestedType.dec +++ b/plugins/java-decompiler/engine/testData/results/NestedType.dec @@ -40,11 +40,26 @@ class 'pkg/NestedType' { 7 4 f 5 10 6 + 11 6 + 12 6 + 13 6 14 6 + 15 6 + 16 6 17 7 + 18 7 + 19 7 + 1a 7 1b 7 + 1c 7 + 1d 7 26 9 + 27 9 + 28 9 + 29 9 2a 9 + 2b 9 + 2c 9 2d 10 } } @@ -54,9 +69,19 @@ class 'pkg/NestedType$Foo' { 7 14 f 15 10 16 + 11 16 + 12 16 + 13 16 14 16 + 15 16 + 16 16 17 17 + 18 17 + 19 17 + 1a 17 1b 17 + 1c 17 + 1d 17 1e 18 } } @@ -66,9 +91,19 @@ class 'pkg/NestedType$FooBar' { 7 26 f 27 10 28 + 11 28 + 12 28 + 13 28 14 28 + 15 28 + 16 28 17 29 + 18 29 + 19 29 + 1a 29 1b 29 + 1c 29 + 1d 29 1e 30 } } diff --git a/plugins/java-decompiler/engine/testData/results/PreserveAssignmentToRecord.dec b/plugins/java-decompiler/engine/testData/results/PreserveAssignmentToRecord.dec index 88d0ae8ab684..41f99b50c586 100644 --- a/plugins/java-decompiler/engine/testData/results/PreserveAssignmentToRecord.dec +++ b/plugins/java-decompiler/engine/testData/results/PreserveAssignmentToRecord.dec @@ -17,20 +17,34 @@ public record PreserveAssignmentToRecord(int x, int y) { class 'org/example/PreserveAssignmentToRecord' { method ' (II)V' { + 4 4 5 4 + 6 4 7 4 + 8 4 + 9 4 + a 5 b 5 + c 5 d 5 + e 5 + f 5 10 6 } method 'x ()I' { + 0 9 1 9 + 2 9 + 3 9 4 9 } method 'y ()I' { + 0 13 1 13 + 2 13 + 3 13 4 13 } } diff --git a/plugins/java-decompiler/engine/testData/results/PreserveAssignmentToRecord2.dec b/plugins/java-decompiler/engine/testData/results/PreserveAssignmentToRecord2.dec index d95df8b320b6..e76c8781ba40 100644 --- a/plugins/java-decompiler/engine/testData/results/PreserveAssignmentToRecord2.dec +++ b/plugins/java-decompiler/engine/testData/results/PreserveAssignmentToRecord2.dec @@ -15,16 +15,27 @@ public record PreserveAssignmentToRecord2(int x) { class 'org/example/PreserveAssignmentToRecord2' { method ' (I)V' { + 4 6 5 6 6 6 + 7 6 + 8 6 9 7 + a 7 + b 7 c 7 + d 7 e 7 + f 7 + 10 7 11 8 } method 'x ()I' { + 0 11 1 11 + 2 11 + 3 11 4 11 } } diff --git a/plugins/java-decompiler/engine/testData/results/PrivateClasses.dec b/plugins/java-decompiler/engine/testData/results/PrivateClasses.dec index f0faa9d4d302..3e9349fc4bf5 100644 --- a/plugins/java-decompiler/engine/testData/results/PrivateClasses.dec +++ b/plugins/java-decompiler/engine/testData/results/PrivateClasses.dec @@ -32,16 +32,16 @@ class PrivateClasses { } (new CapturingLocalR1(42)).toString();// 40 - Callable c1 = new Callable() { + Callable c1 = new Callable() {// 42 public String call() { return null;// 45 } - };// 42 - Callable c2 = new Callable() { + }; + Callable c2 = new Callable() {// 49 public String call() { return s;// 52 } - };// 49 + }; ((String)c1.call() + (String)c2.call()).length();// 56 }// 57 }; @@ -76,16 +76,16 @@ class PrivateClasses { } (new CapturingLocalR1(42)).toString();// 92 - Callable c1 = new Callable() { + Callable c1 = new Callable() {// 94 public String call() { return null;// 97 } - };// 94 - Callable c2 = new Callable() { + }; + Callable c2 = new Callable() {// 101 public String call() { return s;// 104 } - };// 101 + }; ((String)c1.call() + (String)c2.call()).length();// 108 }// 109 }; @@ -118,16 +118,16 @@ class PrivateClasses { } (new CapturingLocalM1(42)).toString();// 140 - Callable c1 = new Callable() { + Callable c1 = new Callable() {// 142 public String call() { return null;// 145 } - };// 142 - Callable c2 = new Callable() { + }; + Callable c2 = new Callable() {// 149 public String call() { return s;// 152 } - };// 149 + }; ((String)c1.call() + (String)c2.call()).length();// 156 }// 157 @@ -159,16 +159,16 @@ class PrivateClasses { } (new CapturingLocalM2(42)).toString();// 187 - Callable c1 = new Callable() { + Callable c1 = new Callable() {// 189 public String call() { return null;// 192 } - };// 189 - Callable c2 = new Callable() { + }; + Callable c2 = new Callable() {// 196 public String call() { return s;// 199 } - };// 196 + }; ((String)c1.call() + (String)c2.call()).length();// 203 }// 204 @@ -179,26 +179,46 @@ class PrivateClasses { class 'pkg/PrivateClasses$1$1NonCapturingLocalR1' { method ' (Lpkg/PrivateClasses$1;Ljava/lang/String;)V' { + 9 11 + a 11 b 11 + c 11 + d 11 e 12 } method 'toString ()Ljava/lang/String;' { + 0 15 1 15 + 2 15 + 3 15 4 15 } } class 'pkg/PrivateClasses$1$1CapturingLocalR1' { method ' (Lpkg/PrivateClasses$1;ILjava/lang/String;)V' { + e 25 + f 25 10 25 + 11 25 + 12 25 13 26 } method 'toString ()Ljava/lang/String;' { + 8 29 + 9 29 + a 29 e 29 + f 29 + 13 29 14 29 + 15 29 + 16 29 1a 29 + 1b 29 + 1c 29 1d 29 } } @@ -212,6 +232,9 @@ class 'pkg/PrivateClasses$1$1' { class 'pkg/PrivateClasses$1$2' { method 'call ()Ljava/lang/String;' { + 1 41 + 2 41 + 3 41 4 41 } } @@ -219,44 +242,89 @@ class 'pkg/PrivateClasses$1$2' { class 'pkg/PrivateClasses$1' { method 'run ()V' { 0 5 + 1 5 2 5 + 8 19 c 19 + d 19 + e 19 15 33 + 16 33 1b 33 - 27 38 - 31 43 + 1c 33 + 1d 33 + 27 34 + 31 39 + 39 44 3a 44 + 3b 44 + 3c 44 + 3d 44 + 3e 44 3f 44 + 40 44 + 41 44 + 45 44 46 44 + 47 44 + 48 44 + 49 44 + 4a 44 4b 44 + 4c 44 + 4d 44 51 44 + 52 44 + 53 44 54 44 + 55 44 + 56 44 58 45 } } class 'pkg/PrivateClasses$2$1NonCapturingLocalR2' { method ' (Lpkg/PrivateClasses$2;Ljava/lang/String;)V' { + 9 55 + a 55 b 55 + c 55 + d 55 e 56 } method 'toString ()Ljava/lang/String;' { + 0 59 1 59 + 2 59 + 3 59 4 59 } } class 'pkg/PrivateClasses$2$1CapturingLocalR1' { method ' (Lpkg/PrivateClasses$2;ILjava/lang/String;)V' { + e 69 + f 69 10 69 + 11 69 + 12 69 13 70 } method 'toString ()Ljava/lang/String;' { + 8 73 + 9 73 + a 73 e 73 + f 73 + 13 73 14 73 + 15 73 + 16 73 1a 73 + 1b 73 + 1c 73 1d 73 } } @@ -270,6 +338,9 @@ class 'pkg/PrivateClasses$2$1' { class 'pkg/PrivateClasses$2$2' { method 'call ()Ljava/lang/String;' { + 1 85 + 2 85 + 3 85 4 85 } } @@ -277,44 +348,89 @@ class 'pkg/PrivateClasses$2$2' { class 'pkg/PrivateClasses$2' { method 'run ()V' { 0 49 + 1 49 2 49 + 8 63 c 63 + d 63 + e 63 15 77 + 16 77 1b 77 - 27 82 - 31 87 + 1c 77 + 1d 77 + 27 78 + 31 83 + 39 88 3a 88 + 3b 88 + 3c 88 + 3d 88 + 3e 88 3f 88 + 40 88 + 41 88 + 45 88 46 88 + 47 88 + 48 88 + 49 88 + 4a 88 4b 88 + 4c 88 + 4d 88 51 88 + 52 88 + 53 88 54 88 + 55 88 + 56 88 58 89 } } class 'pkg/PrivateClasses$1NonCapturingLocalM1' { method ' (Ljava/lang/String;)V' { + 4 97 + 5 97 6 97 + 7 97 + 8 97 9 98 } method 'toString ()Ljava/lang/String;' { + 0 101 1 101 + 2 101 + 3 101 4 101 } } class 'pkg/PrivateClasses$1CapturingLocalM1' { method ' (ILjava/lang/String;)V' { + 9 111 + a 111 b 111 + c 111 + d 111 e 112 } method 'toString ()Ljava/lang/String;' { + 8 115 + 9 115 + a 115 e 115 + f 115 + 13 115 14 115 + 15 115 + 16 115 1a 115 + 1b 115 + 1c 115 1d 115 } } @@ -328,64 +444,135 @@ class 'pkg/PrivateClasses$3' { class 'pkg/PrivateClasses$4' { method 'call ()Ljava/lang/String;' { + 1 127 + 2 127 + 3 127 4 127 } } class 'pkg/PrivateClasses' { method 'm1 (Ljava/lang/String;)V' { + 4 105 8 105 + 9 105 + a 105 10 119 + 11 119 16 119 - 21 124 - 2a 129 + 17 119 + 18 119 + 21 120 + 2a 125 + 32 130 33 130 + 34 130 + 35 130 + 36 130 + 37 130 38 130 + 39 130 + 3a 130 + 3e 130 3f 130 + 40 130 + 41 130 + 42 130 + 43 130 44 130 + 45 130 + 46 130 4a 130 + 4b 130 + 4c 130 4d 130 + 4e 130 + 4f 130 51 131 } method 'm2 (Ljava/lang/String;)V' { + 5 146 9 146 + a 146 + b 146 12 160 + 13 160 18 160 - 24 165 - 2e 170 + 19 160 + 1a 160 + 24 161 + 2e 166 + 36 171 37 171 + 38 171 + 39 171 + 3a 171 + 3b 171 3c 171 + 3d 171 + 3e 171 + 42 171 43 171 + 44 171 + 45 171 + 46 171 + 47 171 48 171 + 49 171 + 4a 171 4e 171 + 4f 171 + 50 171 51 171 + 52 171 + 53 171 55 172 } } class 'pkg/PrivateClasses$1NonCapturingLocalM2' { method ' (Lpkg/PrivateClasses;Ljava/lang/String;)V' { + 9 138 + a 138 b 138 + c 138 + d 138 e 139 } method 'toString ()Ljava/lang/String;' { + 0 142 1 142 + 2 142 + 3 142 4 142 } } class 'pkg/PrivateClasses$1CapturingLocalM2' { method ' (Lpkg/PrivateClasses;ILjava/lang/String;)V' { + e 152 + f 152 10 152 + 11 152 + 12 152 13 153 } method 'toString ()Ljava/lang/String;' { + 8 156 + 9 156 + a 156 e 156 + f 156 + 13 156 14 156 + 15 156 + 16 156 1a 156 + 1b 156 + 1c 156 1d 156 } } @@ -399,6 +586,9 @@ class 'pkg/PrivateClasses$5' { class 'pkg/PrivateClasses$6' { method 'call ()Ljava/lang/String;' { + 1 168 + 2 168 + 3 168 4 168 } } @@ -413,9 +603,9 @@ Lines mapping: 35 <-> 30 39 <-> 20 40 <-> 34 -42 <-> 39 +42 <-> 35 45 <-> 37 -49 <-> 44 +49 <-> 40 52 <-> 42 56 <-> 45 57 <-> 46 @@ -428,9 +618,9 @@ Lines mapping: 87 <-> 74 91 <-> 64 92 <-> 78 -94 <-> 83 +94 <-> 79 97 <-> 81 -101 <-> 88 +101 <-> 84 104 <-> 86 108 <-> 89 109 <-> 90 @@ -442,9 +632,9 @@ Lines mapping: 135 <-> 116 139 <-> 106 140 <-> 120 -142 <-> 125 +142 <-> 121 145 <-> 123 -149 <-> 130 +149 <-> 126 152 <-> 128 156 <-> 131 157 <-> 132 @@ -456,9 +646,9 @@ Lines mapping: 182 <-> 157 186 <-> 147 187 <-> 161 -189 <-> 166 +189 <-> 162 192 <-> 164 -196 <-> 171 +196 <-> 167 199 <-> 169 203 <-> 172 204 <-> 173 diff --git a/plugins/java-decompiler/engine/testData/results/SwitchOnStatic.dec b/plugins/java-decompiler/engine/testData/results/SwitchOnStatic.dec index 7080faa9a128..bec8cc53ba59 100644 --- a/plugins/java-decompiler/engine/testData/results/SwitchOnStatic.dec +++ b/plugins/java-decompiler/engine/testData/results/SwitchOnStatic.dec @@ -42,36 +42,63 @@ public class SwitchOnStatic { class 'SwitchOnStatic' { method 'main ([Ljava/lang/String;)V' { 0 2 + 1 2 + 2 2 3 3 + 4 3 + 5 3 6 4 + 7 4 + 8 4 9 5 } method 'staticStringSelector ()V' { 0 8 + 1 8 + 2 8 3e 8 58 9 + 59 9 + 5a 9 5b 9 + 5c 9 5d 9 + 5e 9 + 5f 9 63 10 + 64 10 + 65 10 66 10 + 67 10 68 10 6b 13 } method 'getStaticStringSelector ()Ljava/lang/String;' { 0 16 + 1 16 2 16 } method 'staticIntSelector ()V' { 0 20 + 1 20 + 2 20 3 20 1c 21 + 1d 21 + 1e 21 1f 21 + 20 21 21 21 + 22 21 + 23 21 27 22 + 28 22 + 29 22 2a 22 + 2b 22 2c 22 2f 25 } @@ -83,13 +110,24 @@ class 'SwitchOnStatic' { method 'staticIntSelectorNotInlined ()V' { 0 32 + 1 32 + 2 32 3 32 + 4 33 5 33 20 34 + 21 34 + 22 34 23 34 + 24 34 25 34 + 26 34 + 27 34 2b 35 + 2c 35 + 2d 35 2e 35 + 2f 35 30 35 33 38 } diff --git a/plugins/java-decompiler/engine/testData/results/TestAccessReplace.dec b/plugins/java-decompiler/engine/testData/results/TestAccessReplace.dec index 83d1eb2fac33..e4ce2cf83091 100644 --- a/plugins/java-decompiler/engine/testData/results/TestAccessReplace.dec +++ b/plugins/java-decompiler/engine/testData/results/TestAccessReplace.dec @@ -15,7 +15,7 @@ public class TestAccessReplace { public class Inner { public Inner(String b) { - TestAccessReplace.fooS();// 25 + TestAccessReplace.fooS();// 26 TestAccessReplace.this.foo();// 27 TestAccessReplace.fooSParams(1L, 2L);// 28 TestAccessReplace.this.fooParams(1L, 2L);// 29 @@ -43,22 +43,28 @@ class 'pkg/TestAccessReplace' { class 'pkg/TestAccessReplace$Inner' { method ' (Lpkg/TestAccessReplace;Ljava/lang/String;)V' { - 0 17 - 1 17 - 2 17 - 3 18 - 4 19 - 5 20 + 9 17 + a 17 + b 17 c 18 + d 18 + e 18 + f 18 10 19 11 19 12 19 13 19 + 14 19 + 15 19 + 16 19 17 20 18 20 19 20 1a 20 1b 20 + 1c 20 + 1d 20 + 1e 20 1f 21 } } @@ -68,10 +74,10 @@ Lines mapping: 20 <-> 8 21 <-> 11 22 <-> 14 -25 <-> 18 +26 <-> 18 27 <-> 19 28 <-> 20 29 <-> 21 30 <-> 22 Not mapped: -26 +25 diff --git a/plugins/java-decompiler/engine/testData/results/TestAnonymousClass.dec b/plugins/java-decompiler/engine/testData/results/TestAnonymousClass.dec index 044b1f23b702..642cd8a7ea46 100644 --- a/plugins/java-decompiler/engine/testData/results/TestAnonymousClass.dec +++ b/plugins/java-decompiler/engine/testData/results/TestAnonymousClass.dec @@ -67,10 +67,6 @@ public abstract class TestAnonymousClass { boolean var1 = true;// 39 }// 40 - interface I { - void foo() throws Exception; - } - private static class Inner { private static Runnable R_I = new Runnable() { public void run() { @@ -81,15 +77,19 @@ public abstract class TestAnonymousClass { } static class InnerRecursive { - TestAnonymousClass.InnerRecursive r; + InnerRecursive r; - public InnerRecursive(TestAnonymousClass.InnerRecursive var1) { + public InnerRecursive(InnerRecursive var1) { this.r = var1;// 105 }// 106 void foo() { }// 110 } + + interface I { + void foo() throws Exception; + } } class 'pkg/TestAnonymousClass$2' { @@ -190,26 +190,26 @@ class 'pkg/TestAnonymousClass' { class 'pkg/TestAnonymousClass$Inner$1' { method 'run ()V' { - 0 76 - 1 76 - 2 77 - 3 77 - 4 78 + 0 72 + 1 72 + 2 73 + 3 73 + 4 74 } } class 'pkg/TestAnonymousClass$InnerRecursive' { method ' (Lpkg/TestAnonymousClass$InnerRecursive;)V' { - 4 86 - 5 86 - 6 86 - 7 86 - 8 86 - 9 87 + 4 82 + 5 82 + 6 82 + 7 82 + 8 82 + 9 83 } method 'foo ()V' { - 0 90 + 0 86 } } @@ -235,9 +235,9 @@ Lines mapping: 53 <-> 18 54 <-> 19 55 <-> 20 -66 <-> 77 -67 <-> 78 -68 <-> 79 +66 <-> 73 +67 <-> 74 +68 <-> 75 75 <-> 24 76 <-> 25 77 <-> 26 @@ -246,9 +246,9 @@ Lines mapping: 91 <-> 37 92 <-> 38 93 <-> 39 -105 <-> 87 -106 <-> 88 -110 <-> 91 +105 <-> 83 +106 <-> 84 +110 <-> 87 Not mapped: 18 104 diff --git a/plugins/java-decompiler/engine/testData/results/TestAnonymousClassConstructor.dec b/plugins/java-decompiler/engine/testData/results/TestAnonymousClassConstructor.dec index 08e25fc143aa..09af6e5b9956 100644 --- a/plugins/java-decompiler/engine/testData/results/TestAnonymousClassConstructor.dec +++ b/plugins/java-decompiler/engine/testData/results/TestAnonymousClassConstructor.dec @@ -65,34 +65,16 @@ class TestAnonymousClassConstructor { System.out.println("n(): " + s);// 53 }// 54 - class InnerPrivate { - private InnerPrivate(long a, int b) { - TestAnonymousClassConstructor.n(a + "+" + b);// 64 - }// 65 - } - class InnerPrivateString { private InnerPrivateString(String s) { TestAnonymousClassConstructor.n(s);// 58 }// 59 } - class InnerPublic { - public InnerPublic(long a, int b) { - TestAnonymousClassConstructor.n(a + "+" + b);// 88 - }// 89 - } - - class InnerPublicString { - public InnerPublicString(String s) { - TestAnonymousClassConstructor.n(s);// 82 - }// 83 - } - - static class InnerStaticPrivate { - private InnerStaticPrivate(long a, int b) { - TestAnonymousClassConstructor.n(a + "+" + b);// 76 - }// 77 + class InnerPrivate { + private InnerPrivate(long a, int b) { + TestAnonymousClassConstructor.n(a + "+" + b);// 64 + }// 65 } static class InnerStaticPrivateString { @@ -101,10 +83,22 @@ class TestAnonymousClassConstructor { }// 71 } - static class InnerStaticPublic { - public InnerStaticPublic(long a, int b) { - TestAnonymousClassConstructor.n(a + "+" + b);// 100 - }// 101 + static class InnerStaticPrivate { + private InnerStaticPrivate(long a, int b) { + TestAnonymousClassConstructor.n(a + "+" + b);// 76 + }// 77 + } + + class InnerPublicString { + public InnerPublicString(String s) { + TestAnonymousClassConstructor.n(s);// 82 + }// 83 + } + + class InnerPublic { + public InnerPublic(long a, int b) { + TestAnonymousClassConstructor.n(a + "+" + b);// 88 + }// 89 } static class InnerStaticPublicString { @@ -112,6 +106,12 @@ class TestAnonymousClassConstructor { TestAnonymousClassConstructor.n(s);// 94 }// 95 } + + static class InnerStaticPublic { + public InnerStaticPublic(long a, int b) { + TestAnonymousClassConstructor.n(a + "+" + b);// 100 + }// 101 + } } class 'pkg/TestAnonymousClassConstructor' { @@ -216,109 +216,109 @@ class 'pkg/TestAnonymousClassConstructor' { } } -class 'pkg/TestAnonymousClassConstructor$InnerPrivate' { - method ' (Lpkg/TestAnonymousClassConstructor;JI)V' { - 10 69 - 14 69 - 15 69 - 19 69 - 1a 69 - 1e 69 - 1f 69 - 20 69 - 21 69 - 22 69 - 23 69 - 24 70 - } -} - class 'pkg/TestAnonymousClassConstructor$InnerPrivateString' { method ' (Lpkg/TestAnonymousClassConstructor;Ljava/lang/String;)V' { - 9 75 - a 75 - b 75 - c 75 - d 76 + 9 69 + a 69 + b 69 + c 69 + d 70 } } -class 'pkg/TestAnonymousClassConstructor$InnerPublic' { +class 'pkg/TestAnonymousClassConstructor$InnerPrivate' { method ' (Lpkg/TestAnonymousClassConstructor;JI)V' { - 10 81 - 14 81 - 15 81 - 19 81 - 1a 81 - 1e 81 - 1f 81 - 20 81 - 21 81 - 22 81 - 23 81 - 24 82 - } -} - -class 'pkg/TestAnonymousClassConstructor$InnerPublicString' { - method ' (Lpkg/TestAnonymousClassConstructor;Ljava/lang/String;)V' { - 9 87 - a 87 - b 87 - c 87 - d 88 - } -} - -class 'pkg/TestAnonymousClassConstructor$InnerStaticPrivate' { - method ' (JI)V' { - b 93 - f 93 - 10 93 - 14 93 - 18 93 - 19 93 - 1a 93 - 1b 93 - 1c 93 - 1d 93 - 1e 94 + 10 75 + 14 75 + 15 75 + 19 75 + 1a 75 + 1e 75 + 1f 75 + 20 75 + 21 75 + 22 75 + 23 75 + 24 76 } } class 'pkg/TestAnonymousClassConstructor$InnerStaticPrivateString' { method ' (Ljava/lang/String;)V' { - 4 99 - 5 99 - 6 99 - 7 99 - 8 100 + 4 81 + 5 81 + 6 81 + 7 81 + 8 82 } } -class 'pkg/TestAnonymousClassConstructor$InnerStaticPublic' { +class 'pkg/TestAnonymousClassConstructor$InnerStaticPrivate' { method ' (JI)V' { - b 105 - f 105 - 10 105 - 14 105 - 18 105 - 19 105 - 1a 105 - 1b 105 - 1c 105 - 1d 105 - 1e 106 + b 87 + f 87 + 10 87 + 14 87 + 18 87 + 19 87 + 1a 87 + 1b 87 + 1c 87 + 1d 87 + 1e 88 + } +} + +class 'pkg/TestAnonymousClassConstructor$InnerPublicString' { + method ' (Lpkg/TestAnonymousClassConstructor;Ljava/lang/String;)V' { + 9 93 + a 93 + b 93 + c 93 + d 94 + } +} + +class 'pkg/TestAnonymousClassConstructor$InnerPublic' { + method ' (Lpkg/TestAnonymousClassConstructor;JI)V' { + 10 99 + 14 99 + 15 99 + 19 99 + 1a 99 + 1e 99 + 1f 99 + 20 99 + 21 99 + 22 99 + 23 99 + 24 100 } } class 'pkg/TestAnonymousClassConstructor$InnerStaticPublicString' { method ' (Ljava/lang/String;)V' { - 4 111 - 5 111 - 6 111 - 7 111 - 8 112 + 4 105 + 5 105 + 6 105 + 7 105 + 8 106 + } +} + +class 'pkg/TestAnonymousClassConstructor$InnerStaticPublic' { + method ' (JI)V' { + b 111 + f 111 + 10 111 + 14 111 + 18 111 + 19 111 + 1a 111 + 1b 111 + 1c 111 + 1d 111 + 1e 112 } } @@ -349,22 +349,22 @@ Lines mapping: 50 <-> 62 53 <-> 65 54 <-> 66 -58 <-> 76 -59 <-> 77 -64 <-> 70 -65 <-> 71 -70 <-> 100 -71 <-> 101 -76 <-> 94 -77 <-> 95 -82 <-> 88 -83 <-> 89 -88 <-> 82 -89 <-> 83 -94 <-> 112 -95 <-> 113 -100 <-> 106 -101 <-> 107 +58 <-> 70 +59 <-> 71 +64 <-> 76 +65 <-> 77 +70 <-> 82 +71 <-> 83 +76 <-> 88 +77 <-> 89 +82 <-> 94 +83 <-> 95 +88 <-> 100 +89 <-> 101 +94 <-> 106 +95 <-> 107 +100 <-> 112 +101 <-> 113 Not mapped: 57 63 diff --git a/plugins/java-decompiler/engine/testData/results/TestClashName.dec b/plugins/java-decompiler/engine/testData/results/TestClashName.dec index 9adf65e9646d..d1c01d402191 100644 --- a/plugins/java-decompiler/engine/testData/results/TestClashName.dec +++ b/plugins/java-decompiler/engine/testData/results/TestClashName.dec @@ -43,59 +43,95 @@ public class TestClashName extends ext.TestClashNameParent implements TestClashN class 'pkg/TestClashName' { method ' ()V' { + 1d 19 1e 19 + 1f 19 + 20 19 21 19 + 22 19 + 23 19 + 24 20 25 20 + 26 20 + 27 20 28 20 + 29 20 + 2a 20 + 2b 21 2c 21 + 2d 21 + 2e 21 2f 21 + 30 21 + 31 21 + 32 22 33 22 + 34 22 + 35 22 36 22 + 37 22 + 38 22 + 39 23 3a 23 + 3b 23 + 3c 23 3d 23 + 3e 23 + 3f 23 + 40 24 41 24 + 42 24 + 43 24 44 24 + 45 24 + 46 24 + 47 25 48 25 49 25 + 4a 25 + 4b 25 + 4c 26 4d 26 4e 26 + 4f 26 + 50 26 51 27 } method 'm ()I' { - 0 20 - 1 20 - 2 20 - 3 20 - 4 20 - 5 21 - 6 21 - 7 21 - 8 21 - 9 21 - a 21 - b 21 - c 22 - d 22 - e 22 - f 22 - 10 23 - 11 23 - 12 23 - 13 23 - 14 23 - 15 23 - 16 23 - 17 24 - 18 24 - 19 24 - 1a 24 - 1b 25 - 1c 25 - 1d 25 - 1e 25 - 1f 25 - 20 25 + 0 31 + 1 31 + 2 31 + 3 31 + 4 31 + 5 32 + 6 32 + 7 32 + 8 32 + 9 32 + a 32 + b 32 + c 33 + d 33 + e 33 + f 33 + 10 34 + 11 34 + 12 34 + 13 34 + 14 34 + 15 34 + 16 34 + 17 35 + 18 35 + 19 35 + 1a 35 + 1b 36 + 1c 36 + 1d 36 + 1e 36 + 1f 36 + 20 36 } method 'f ()V' { diff --git a/plugins/java-decompiler/engine/testData/results/TestClassFields.dec b/plugins/java-decompiler/engine/testData/results/TestClassFields.dec index 4c37124913d7..41d2350c5806 100644 --- a/plugins/java-decompiler/engine/testData/results/TestClassFields.dec +++ b/plugins/java-decompiler/engine/testData/results/TestClassFields.dec @@ -25,7 +25,16 @@ class 'pkg/TestClassFields' { 17 8 18 8 19 8 - 20 9 + 1b 9 + 1c 9 + 1d 9 + 1f 10 + 20 10 + 21 10 + 22 10 + 23 10 + 24 10 + 25 11 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestClassLambda.dec b/plugins/java-decompiler/engine/testData/results/TestClassLambda.dec index 9bb7d48e1531..19555f2da2ad 100644 --- a/plugins/java-decompiler/engine/testData/results/TestClassLambda.dec +++ b/plugins/java-decompiler/engine/testData/results/TestClassLambda.dec @@ -87,84 +87,92 @@ public class TestClassLambda { class 'pkg/TestClassLambda' { method 'lambda$testLambda$0 (ILjava/lang/Integer;)V' { - 0 20 - 1 20 - 2 20 - 3 20 - 4 20 - 5 20 - 6 20 - 7 21 - 8 21 - 9 21 - a 21 - b 21 - c 21 - d 21 - e 21 - f 21 - 10 21 - 11 21 - 12 21 - 13 21 - 14 21 - 15 22 + 0 17 + 1 17 + 2 17 + 3 17 + 4 17 + 5 17 + 6 17 + 7 18 + 8 18 + 9 18 + a 18 + b 18 + c 18 + d 18 + e 18 + f 18 + 10 18 + 11 18 + 12 18 + 13 18 + 14 18 + 15 19 } method 'testLambda ()V' { - 7 17 - 8 17 - 9 17 - a 17 - e 17 - f 17 - 10 17 - 11 17 - 15 17 - 16 17 - 17 17 - 18 17 - 1c 17 - 1d 17 - 1e 17 - 1f 17 - 23 17 - 24 17 - 25 17 - 26 17 - 2a 17 - 2b 17 - 2c 17 - 2d 17 - 2e 17 - 33 17 - 34 17 - 35 17 - 36 17 - 37 17 - 39 17 - 3a 17 - 3b 17 - 3c 17 - 3d 18 - 3e 18 - 3f 18 - 40 18 - 41 18 - 42 19 - 4a 19 - 4b 19 - 4c 19 - 4d 19 - 4e 19 - 4f 23 + 7 14 + 8 14 + 9 14 + a 14 + e 14 + f 14 + 10 14 + 11 14 + 15 14 + 16 14 + 17 14 + 18 14 + 1c 14 + 1d 14 + 1e 14 + 1f 14 + 23 14 + 24 14 + 25 14 + 26 14 + 2a 14 + 2b 14 + 2c 14 + 2d 14 + 2e 14 + 33 14 + 34 14 + 35 14 + 36 14 + 37 14 + 39 14 + 3a 14 + 3b 14 + 3c 14 + 3d 15 + 3e 15 + 3f 15 + 40 15 + 41 15 + 42 16 + 4a 16 + 4b 16 + 4c 16 + 4d 16 + 4e 16 + 4f 20 } method 'lambda$testLambda1$1 (I)V' { 0 25 + 1 25 + 2 25 a 25 + b 25 + f 25 13 25 + 14 25 + 15 25 16 25 + 17 25 + 18 25 19 26 } @@ -184,129 +192,113 @@ class 'pkg/TestClassLambda' { 19 29 } - method 'lambda$testLambda1$2 (I)V' { - 0 31 - 1 31 - 2 31 - a 31 - b 31 - f 31 - 13 31 - 14 31 - 15 31 - 16 31 - 17 31 - 18 31 - 19 32 - } - method 'testLambda1 ()V' { - 0 26 - 1 26 - 2 26 - 3 26 - 4 26 - b 27 - 12 30 - 13 33 + 0 23 + 1 23 + 2 23 + 3 23 + 4 23 + b 24 + 12 27 + 13 30 } method 'lambda$testLambda2$3 (II)I' { - 0 37 - 1 37 - 2 37 - 3 37 - 4 37 - 5 37 + 0 34 + 1 34 + 2 34 + 3 34 + 4 34 + 5 34 } method 'testLambda2 ()V' { - 5 36 - 6 36 - 7 36 - 9 39 + 5 33 + 6 33 + 7 33 + 9 36 } method 'testLambda3 ()V' { - 5 42 - 6 42 - 7 42 - 9 43 + 5 39 + 6 39 + 7 39 + 9 40 } method 'testLambda4 ()V' { - 5 46 - 6 46 - 7 46 - 9 47 + 5 43 + 6 43 + 7 43 + 9 44 } method 'testLambda5 ()V' { - 0 50 - 1 50 - 2 50 - e 51 - f 51 - 10 51 - 12 52 + 0 47 + 1 47 + 2 47 + e 48 + f 48 + 10 48 + 12 49 } method 'lambda$testLambda6$4 (IILjava/lang/String;)Z' { - 0 59 - 1 59 - 2 59 - 3 59 - 4 59 - 5 59 - 8 59 - 9 59 - a 59 - b 59 - c 59 - d 59 - 15 59 - } - - method 'testLambda6 ()V' { - 7 55 + 0 56 + 1 56 + 2 56 + 3 56 + 4 56 + 5 56 8 56 9 56 a 56 b 56 c 56 d 56 - e 56 - f 56 - 10 56 - 11 57 - 12 57 - 13 57 - 14 57 - 15 57 - 16 57 - 17 57 - 18 57 - 19 57 - 1a 58 - 22 58 - 23 58 - 24 58 - 25 58 - 26 58 - 28 61 + 15 56 + } + + method 'testLambda6 ()V' { + 7 52 + 8 53 + 9 53 + a 53 + b 53 + c 53 + d 53 + e 53 + f 53 + 10 53 + 11 54 + 12 54 + 13 54 + 14 54 + 15 54 + 16 54 + 17 54 + 18 54 + 19 54 + 1a 55 + 22 55 + 23 55 + 24 55 + 25 55 + 26 55 + 28 58 } method 'testLambda7 ([Ljava/lang/annotation/Annotation;)V' { - 0 64 - 1 64 - 2 64 - 3 64 - 9 64 - a 64 - b 64 - c 64 - d 64 - f 65 + 0 61 + 1 61 + 2 61 + 3 61 + 9 61 + a 61 + b 61 + c 61 + d 61 + f 62 } method 'reduce (Ljava/util/function/IntBinaryOperator;)Ljava/util/OptionalInt;' { @@ -315,16 +307,16 @@ class 'pkg/TestClassLambda' { } method 'function (Ljava/util/function/Supplier;)Ljava/lang/String;' { - 0 72 - 1 72 - 2 72 - 3 72 - 4 72 - 5 72 - 6 72 - 7 72 - 8 72 - 9 72 + 0 69 + 1 69 + 2 69 + 3 69 + 4 69 + 5 69 + 6 69 + 7 69 + 8 69 + 9 69 } method 'localMax (II)I' { @@ -333,80 +325,80 @@ class 'pkg/TestClassLambda' { } method 'lambda$null$5 (I)V' { - 0 83 - 1 83 - 2 83 - a 83 - b 83 - f 83 - 13 83 - 14 83 - 15 83 - 16 83 - 17 83 - 18 83 - 19 84 + 0 80 + 1 80 + 2 80 + a 80 + b 80 + f 80 + 13 80 + 14 80 + 15 80 + 16 80 + 17 80 + 18 80 + 19 81 } method 'lambda$nestedLambdas$6 (I)V' { - 6 82 - 7 85 - 8 85 - 9 85 - 11 85 - 12 85 - 16 85 - 1a 85 - 1b 85 - 1c 85 - 1d 85 - 1e 85 - 1f 85 - 20 86 + 6 79 + 7 82 + 8 82 + 9 82 + 11 82 + 12 82 + 16 82 + 1a 82 + 1b 82 + 1c 82 + 1d 82 + 1e 82 + 1f 82 + 20 83 } method 'nestedLambdas ()V' { - 0 80 - 1 80 - 8 81 - 9 87 + 0 77 + 1 77 + 8 78 + 9 84 } } Lines mapping: -29 <-> 18 -30 <-> 19 -32 <-> 20 -33 <-> 21 -34 <-> 22 -35 <-> 23 -36 <-> 24 -39 <-> 27 -40 <-> 28 -41 <-> 31 -42 <-> 34 -45 <-> 37 -46 <-> 40 -49 <-> 43 -50 <-> 44 -53 <-> 47 -54 <-> 48 -57 <-> 51 -58 <-> 52 -59 <-> 53 -62 <-> 56 -63 <-> 57 -64 <-> 58 -65 <-> 59 -66 <-> 62 -69 <-> 65 -70 <-> 66 -73 <-> 69 -77 <-> 73 -81 <-> 77 -85 <-> 81 -86 <-> 82 -87 <-> 83 -88 <-> 86 -89 <-> 87 -90 <-> 88 +29 <-> 15 +30 <-> 16 +32 <-> 17 +33 <-> 18 +34 <-> 19 +35 <-> 20 +36 <-> 21 +39 <-> 24 +40 <-> 25 +41 <-> 28 +42 <-> 31 +45 <-> 34 +46 <-> 37 +49 <-> 40 +50 <-> 41 +53 <-> 44 +54 <-> 45 +57 <-> 48 +58 <-> 49 +59 <-> 50 +62 <-> 53 +63 <-> 54 +64 <-> 55 +65 <-> 56 +66 <-> 59 +69 <-> 62 +70 <-> 63 +73 <-> 66 +77 <-> 70 +81 <-> 74 +85 <-> 78 +86 <-> 79 +87 <-> 80 +88 <-> 83 +89 <-> 84 +90 <-> 85 diff --git a/plugins/java-decompiler/engine/testData/results/TestClassVar.dec b/plugins/java-decompiler/engine/testData/results/TestClassVar.dec index 6de2af6b7b05..88e414ecfe39 100644 --- a/plugins/java-decompiler/engine/testData/results/TestClassVar.dec +++ b/plugins/java-decompiler/engine/testData/results/TestClassVar.dec @@ -91,14 +91,14 @@ class 'pkg/TestClassVar' { 14 29 15 29 16 29 - 1a 33 - 1b 33 - 1c 33 - 1f 34 - 20 34 - 21 34 - 22 34 - 28 38 + 1a 32 + 1b 32 + 1c 32 + 1f 33 + 20 33 + 21 33 + 22 33 + 28 37 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestComplexInstanceOfRecordPatternJavac.dec b/plugins/java-decompiler/engine/testData/results/TestComplexInstanceOfRecordPatternJavac.dec index 3e3dbed3cef0..c8bda78545f4 100644 --- a/plugins/java-decompiler/engine/testData/results/TestComplexInstanceOfRecordPatternJavac.dec +++ b/plugins/java-decompiler/engine/testData/results/TestComplexInstanceOfRecordPatternJavac.dec @@ -5,43 +5,43 @@ public class TestComplexInstanceOfRecordPatternJavac { }// 6 public static void instanceOfTest1(Object o) { - if (o instanceof R(R(Object s1))) {// 9 + if (o instanceof R(R(Object s1))) { System.out.println(s1);// 10 System.out.println(s1);// 11 } System.out.println("1");// 13 - } + }// 9 public static void instanceOfTest2(Object o) { - if (o instanceof R(R(String s1))) {// 17 + if (o instanceof R(R(String s1))) { System.out.println(s1);// 18 System.out.println(s1);// 19 } System.out.println("4");// 21 - } + }// 17 public static void instanceOfTest3(Object o) { - if (o instanceof R2(String s1, Object var8)) {// 25 + if (o instanceof R2(String s1, Object var8)) { System.out.println(s1);// 26 System.out.println(s1);// 27 } System.out.println("12");// 29 - } + }// 25 public static void instanceOfTest3_2(Object o) { - if (o instanceof R2(Object var8, String s1)) {// 33 + if (o instanceof R2(Object var8, String s1)) { System.out.println(s1);// 34 System.out.println(s1);// 35 } System.out.println("3");// 37 - } + }// 33 public static void instanceOfTest4(Object o) { - if (o instanceof R2(String s1, R(String s))) {// 41 + if (o instanceof R2(String s1, R(String s))) { System.out.println(s1);// 42 System.out.println(s);// 43 if (o instanceof R2(String s2, R(String s3))) {// 45 @@ -51,7 +51,7 @@ public class TestComplexInstanceOfRecordPatternJavac { } System.out.println("1");// 50 - } + }// 41 static record R(Object o) { R(Object o) { @@ -85,126 +85,323 @@ class 'pkg/TestComplexInstanceOfRecordPatternJavac' { } method 'instanceOfTest1 (Ljava/lang/Object;)V' { + 0 7 1 7 + 2 7 + 3 7 4 7 29 8 + 2a 8 + 2b 8 + 2c 8 2d 8 + 2e 8 + 2f 8 30 9 + 31 9 + 32 9 + 33 9 34 9 37 12 + 38 12 + 39 12 3a 12 + 3b 12 3c 12 + 3d 12 + 3e 12 3f 13 + 40 13 + 41 13 + 42 13 + 43 13 + 44 13 + 45 13 + 46 13 + 47 13 + 48 13 + 49 13 + 4a 13 + 4b 13 + 4c 13 + 4d 13 + 4e 13 + 4f 13 } method 'instanceOfTest2 (Ljava/lang/Object;)V' { + 0 16 1 16 + 2 16 + 3 16 4 16 34 17 + 35 17 + 36 17 + 37 17 38 17 + 39 17 + 3a 17 3b 18 + 3c 18 + 3d 18 + 3e 18 3f 18 42 21 + 43 21 + 44 21 45 21 + 46 21 47 21 + 48 21 + 49 21 4a 22 + 4b 22 + 4c 22 + 4d 22 + 4e 22 + 4f 22 + 50 22 + 51 22 + 52 22 + 53 22 + 54 22 + 55 22 + 56 22 + 57 22 + 58 22 + 59 22 + 5a 22 } method 'instanceOfTest3 (Ljava/lang/Object;)V' { + 0 25 1 25 + 2 25 + 3 25 4 25 29 26 + 2a 26 + 2b 26 + 2c 26 2d 26 + 2e 26 + 2f 26 30 27 + 31 27 + 32 27 + 33 27 34 27 37 30 + 38 30 + 39 30 3a 30 + 3b 30 3c 30 + 3d 30 + 3e 30 3f 31 + 40 31 + 41 31 + 42 31 + 43 31 + 44 31 + 45 31 + 46 31 + 47 31 + 48 31 + 49 31 + 4a 31 + 4b 31 + 4c 31 + 4d 31 + 4e 31 + 4f 31 } method 'instanceOfTest3_2 (Ljava/lang/Object;)V' { + 0 34 1 34 + 2 34 + 3 34 4 34 29 35 + 2a 35 + 2b 35 + 2c 35 2d 35 + 2e 35 + 2f 35 30 36 + 31 36 + 32 36 + 33 36 34 36 37 39 + 38 39 + 39 39 3a 39 + 3b 39 3c 39 + 3d 39 + 3e 39 3f 40 + 40 40 + 41 40 + 42 40 + 43 40 + 44 40 + 45 40 + 46 40 + 47 40 + 48 40 + 49 40 + 4a 40 + 4b 40 + 4c 40 + 4d 40 + 4e 40 + 4f 40 } method 'instanceOfTest4 (Ljava/lang/Object;)V' { + 0 43 1 43 + 2 43 + 3 43 4 43 49 44 + 4a 44 + 4b 44 + 4c 44 4d 44 + 4e 44 + 4f 44 50 45 + 51 45 + 52 45 + 53 45 + 54 45 55 45 + 56 45 + 57 45 + 58 46 59 46 + 5a 46 + 5b 46 5c 46 a7 47 + a8 47 + a9 47 + aa 47 + ab 47 ac 47 + ad 47 + ae 47 af 48 + b0 48 + b1 48 + b2 48 + b3 48 b4 48 b7 52 + b8 52 + b9 52 ba 52 + bb 52 bc 52 + bd 52 + be 52 bf 53 + c0 53 + c1 53 + c2 53 + c3 53 + c4 53 + c5 53 + c6 53 + c7 53 + c8 53 + c9 53 + ca 53 + cb 53 + cc 53 + cd 53 + ce 53 + cf 53 } } class 'pkg/TestComplexInstanceOfRecordPatternJavac$R' { method ' (Ljava/lang/Object;)V' { + 4 57 + 5 57 6 57 + 7 57 + 8 57 9 58 } method 'o ()Ljava/lang/Object;' { + 0 61 1 61 + 2 61 + 3 61 4 61 } } class 'pkg/TestComplexInstanceOfRecordPatternJavac$R2' { method ' (Ljava/lang/Object;Ljava/lang/Object;)V' { + 4 67 + 5 67 6 67 + 7 67 + 8 67 + 9 68 + a 68 b 68 + c 68 + d 68 e 69 } method 'o1 ()Ljava/lang/Object;' { + 0 72 1 72 + 2 72 + 3 72 4 72 } method 'o2 ()Ljava/lang/Object;' { + 0 76 1 76 + 2 76 + 3 76 4 76 } } Lines mapping: 6 <-> 5 -9 <-> 8 +9 <-> 14 10 <-> 9 11 <-> 10 13 <-> 13 -17 <-> 17 +17 <-> 23 18 <-> 18 19 <-> 19 21 <-> 22 -25 <-> 26 +25 <-> 32 26 <-> 27 27 <-> 28 29 <-> 31 -33 <-> 35 +33 <-> 41 34 <-> 36 35 <-> 37 37 <-> 40 -41 <-> 44 +41 <-> 54 42 <-> 45 43 <-> 46 45 <-> 47 diff --git a/plugins/java-decompiler/engine/testData/results/TestConstType.dec b/plugins/java-decompiler/engine/testData/results/TestConstType.dec index 88a4792a1fe9..e628eb42f268 100644 --- a/plugins/java-decompiler/engine/testData/results/TestConstType.dec +++ b/plugins/java-decompiler/engine/testData/results/TestConstType.dec @@ -100,173 +100,374 @@ public class TestConstType { class 'pkg/TestConstType' { method 'setLineBreak (C)V' { + 0 7 1 7 + 1c 9 1d 9 + 1e 9 1f 9 + 20 9 + 21 9 22 10 + 25 12 26 12 + 27 12 28 12 2b 15 } method 'init ()V' { + 0 18 1 18 + 2 18 3 18 + 4 18 + 5 18 6 19 } method 'convertIndentation (Ljava/lang/String;)Ljava/lang/String;' { + 0 22 1 22 2 22 + 3 22 + 4 22 5 22 + 6 22 7 22 + a 23 b 23 + c 23 d 23 + e 23 f 23 + 10 23 + 11 23 12 23 + 13 26 14 26 } method 'printalot ()V' { 0 30 + 1 30 + 2 30 3 30 + 4 30 5 30 + 6 30 + 7 30 8 31 + 9 31 + a 31 b 31 + c 31 d 31 + e 31 + f 31 10 32 + 11 32 + 12 32 13 32 14 32 + 15 32 + 16 32 17 33 + 18 33 + 19 33 1a 33 + 1b 33 1c 33 + 1d 33 + 1e 33 1f 34 + 20 34 + 21 34 22 34 + 23 34 24 34 + 25 34 + 26 34 27 35 + 28 35 + 29 35 2a 35 + 2b 35 + 2c 35 2d 35 + 2e 35 + 2f 35 30 36 + 31 36 + 32 36 33 36 + 34 36 + 35 36 36 36 + 37 36 + 38 36 39 37 + 3a 37 + 3b 37 3c 37 + 3d 37 3e 37 + 3f 37 + 40 37 41 38 + 42 38 + 43 38 44 38 + 45 38 46 38 + 47 38 + 48 38 49 39 + 4a 39 + 4b 39 4c 39 + 4d 39 4e 39 + 4f 39 + 50 39 51 40 + 52 40 + 53 40 54 40 + 55 40 56 40 + 57 40 + 58 40 59 41 + 5a 41 + 5b 41 5c 41 + 5d 41 5e 41 + 5f 41 + 60 41 61 42 + 62 42 + 63 42 64 42 + 65 42 66 42 + 67 42 + 68 42 69 43 + 6a 43 + 6b 43 6c 43 + 6d 43 6e 43 + 6f 43 + 70 43 71 44 + 72 44 + 73 44 74 44 + 75 44 76 44 + 77 44 + 78 44 79 45 + 7a 45 + 7b 45 7c 45 + 7d 45 7e 45 + 7f 45 + 80 45 81 46 + 82 46 + 83 46 84 46 + 85 46 86 46 + 87 46 + 88 46 89 47 + 8a 47 + 8b 47 8c 47 + 8d 47 8e 47 + 8f 47 + 90 47 91 48 + 92 48 + 93 48 94 48 + 95 48 96 48 + 97 48 + 98 48 99 49 + 9a 49 + 9b 49 9c 49 + 9d 49 9e 49 + 9f 49 + a0 49 a1 50 + a2 50 + a3 50 a4 50 + a5 50 a6 50 + a7 50 + a8 50 a9 51 + aa 51 + ab 51 ac 51 + ad 51 ae 51 + af 51 + b0 51 b1 52 + b2 52 + b3 52 b4 52 + b5 52 b6 52 + b7 52 + b8 52 b9 53 + ba 53 + bb 53 bc 53 + bd 53 be 53 + bf 53 + c0 53 c1 54 + c2 54 + c3 54 c4 54 + c5 54 c6 54 + c7 54 + c8 54 c9 55 + ca 55 + cb 55 cc 55 + cd 55 ce 55 + cf 55 + d0 55 d1 56 + d2 56 + d3 56 d4 56 + d5 56 d6 56 + d7 56 + d8 56 d9 57 + da 57 + db 57 dc 57 + dd 57 de 57 + df 57 + e0 57 e1 58 } method 'guessType (I)C' { 0 61 + 1 61 2 61 + 5 61 6 61 + 7 61 8 61 b 62 + c 62 d 62 e 63 + f 63 + 10 63 11 63 + 14 63 15 63 + 16 63 17 63 1a 64 + 1b 64 1c 64 1d 65 + 1e 65 + 1f 65 + 20 65 21 65 + 24 65 25 65 + 26 65 + 27 65 28 65 2b 66 + 2c 66 2d 66 2e 67 + 2f 67 + 30 67 + 31 67 32 67 + 35 67 36 67 + 37 67 + 38 67 39 67 3c 68 + 3d 68 3e 68 3f 70 + 40 70 + 41 70 42 70 + 45 70 46 70 + 47 70 48 70 4b 70 + 4c 70 4e 70 + 4f 70 } method 'getTypeMaxValue (C)I' { + 0 76 1 76 34 87 + 35 87 + 36 87 37 87 38 88 3b 78 + 3c 78 3d 78 3e 79 41 90 + 42 90 43 90 44 91 47 84 + 48 84 + 49 84 4a 84 4b 85 4e 81 + 4f 81 50 81 51 82 54 93 + 55 93 56 93 + 57 96 58 96 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestDebugSymbols.dec b/plugins/java-decompiler/engine/testData/results/TestDebugSymbols.dec index a405885e6b5a..bea3fdede88c 100644 --- a/plugins/java-decompiler/engine/testData/results/TestDebugSymbols.dec +++ b/plugins/java-decompiler/engine/testData/results/TestDebugSymbols.dec @@ -70,8 +70,12 @@ class 'pkg/TestDebugSymbols' { 2 13 3 13 6 16 + 7 16 + 8 16 a 16 + b 17 c 17 + d 17 e 17 11 19 } diff --git a/plugins/java-decompiler/engine/testData/results/TestDynamicConstantPoolEntry.dec b/plugins/java-decompiler/engine/testData/results/TestDynamicConstantPoolEntry.dec index e5e8e93ec9b7..3ed63647d66c 100644 --- a/plugins/java-decompiler/engine/testData/results/TestDynamicConstantPoolEntry.dec +++ b/plugins/java-decompiler/engine/testData/results/TestDynamicConstantPoolEntry.dec @@ -9,8 +9,13 @@ public class TestDynamicConstantPoolEntry { class 'java11/TestDynamicConstantPoolEntry' { method 'main ([Ljava/lang/String;)V' { 0 4 + 1 4 + 2 4 3 4 + 4 4 5 4 + 6 4 + 7 4 8 5 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestEmptyBlocks.dec b/plugins/java-decompiler/engine/testData/results/TestEmptyBlocks.dec index 72a39b6a7b6a..546b36cd32e2 100644 --- a/plugins/java-decompiler/engine/testData/results/TestEmptyBlocks.dec +++ b/plugins/java-decompiler/engine/testData/results/TestEmptyBlocks.dec @@ -26,11 +26,18 @@ class 'TestEmptyBlocks' { 5 6 6 9 7 9 + 8 9 9 9 a 9 d 9 + e 9 + f 9 1a 12 + 1b 12 + 1c 12 2a 15 + 2b 15 + 2c 15 2d 15 30 18 } diff --git a/plugins/java-decompiler/engine/testData/results/TestFieldSingleAccess.dec b/plugins/java-decompiler/engine/testData/results/TestFieldSingleAccess.dec index 268c86635cd6..812d0c9e08fd 100644 --- a/plugins/java-decompiler/engine/testData/results/TestFieldSingleAccess.dec +++ b/plugins/java-decompiler/engine/testData/results/TestFieldSingleAccess.dec @@ -20,19 +20,32 @@ public final class TestFieldSingleAccess { class 'pkg/TestFieldSingleAccess' { method 'test ()V' { + 0 6 1 6 + 2 6 + 3 6 5 7 8 8 + 9 8 + a 8 c 8 f 11 } method 'test1 ()V' { + 0 14 1 14 + 2 14 + 3 14 6 14 7 15 + 8 15 + 9 15 a 15 + b 15 c 15 + d 15 + e 15 19 17 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestGroovyClass.dec b/plugins/java-decompiler/engine/testData/results/TestGroovyClass.dec index 3cf360c1a702..c5504fdab20c 100644 --- a/plugins/java-decompiler/engine/testData/results/TestGroovyClass.dec +++ b/plugins/java-decompiler/engine/testData/results/TestGroovyClass.dec @@ -18,9 +18,9 @@ public class TestGroovyClass implements GroovyObject { CallSite[] var1 = $getCallSiteArray(); Object var2 = var1[0].callConstructor(Nested.class);// 9 this.n = (Nested)ScriptBytecodeAdapter.castToType(var2, Nested.class); - Object var3 = var1[1].callConstructor(Inner.class, this); + Object var3 = var1[1].callConstructor(Inner.class, this);// 10 this.i = (Inner)ScriptBytecodeAdapter.castToType(var3, Inner.class); - _closure1 var4 = new _closure1(this, this);// 10 + _closure1 var4 = new _closure1(this, this); this.r = var4; _closure2 var5 = new _closure2(this, this); this.c = var5; @@ -99,52 +99,124 @@ public class TestGroovyClass implements GroovyObject { class 'pkg/TestGroovyClass' { method ' ()V' { 4 17 + 5 17 + 6 17 7 17 + 8 18 9 18 + a 18 b 18 c 18 + d 18 e 18 + f 18 + 10 18 + 11 18 + 12 18 13 18 + 14 19 15 19 + 16 19 17 19 + 18 19 + 19 19 1a 19 + 1b 19 + 1c 19 + 1d 19 1f 19 + 20 19 + 21 19 + 24 20 25 20 + 26 20 27 20 28 20 + 29 20 + 2a 20 2b 20 + 2c 20 + 2d 20 + 2e 20 + 2f 20 30 20 + 31 21 32 21 + 33 21 34 21 + 35 21 + 36 21 37 21 + 38 21 + 39 21 + 3a 21 3c 21 + 3d 21 + 3e 21 + 45 22 + 46 22 4a 22 + 4b 22 + 4c 23 + 4d 23 + 4e 23 50 23 + 51 23 + 52 23 + 5a 24 + 5b 24 5f 24 + 60 24 + 61 25 + 62 25 + 63 25 65 25 + 66 25 + 67 25 + 6b 26 6c 26 + 6d 26 + 6e 26 6f 26 + 70 26 + 71 27 + 72 27 + 73 27 75 27 + 76 27 + 77 27 7b 28 } method 'getN ()Lpkg/TestGroovyClass$Nested;' { + 0 31 1 31 + 2 31 + 3 31 4 31 } method 'getI ()Lpkg/TestGroovyClass$Inner;' { + 0 35 1 35 + 2 35 + 3 35 4 35 } method 'getR ()Ljava/lang/Runnable;' { + 0 39 1 39 + 2 39 + 3 39 4 39 } method 'getC ()Ljava/util/concurrent/Callable;' { + 0 43 1 43 + 2 43 + 3 43 4 43 } } @@ -152,26 +224,47 @@ class 'pkg/TestGroovyClass' { class 'pkg/TestGroovyClass$_closure1' { method ' (Ljava/lang/Object;Ljava/lang/Object;)V' { 0 48 + 1 48 + 2 48 3 48 + 5 49 + 6 49 7 49 + 8 49 + 9 49 a 50 } method 'doCall (Ljava/lang/Object;)Ljava/lang/Object;' { 0 53 + 1 53 + 2 53 3 53 + 4 54 5 54 + 6 54 7 54 + 8 54 9 54 + a 54 b 54 + c 54 + d 54 + e 54 + f 54 10 54 } method 'doCall ()Ljava/lang/Object;' { 0 58 + 1 58 + 2 58 3 58 + 4 59 5 59 6 59 + 7 59 + 8 59 9 59 } } @@ -179,23 +272,37 @@ class 'pkg/TestGroovyClass$_closure1' { class 'pkg/TestGroovyClass$_closure2' { method ' (Ljava/lang/Object;Ljava/lang/Object;)V' { 0 65 + 1 65 + 2 65 3 65 + 5 66 + 6 66 7 66 + 8 66 + 9 66 a 67 } method 'doCall (Ljava/lang/Object;)Ljava/lang/Object;' { 0 70 + 1 70 + 2 70 3 70 4 71 + 5 71 6 71 } method 'doCall ()Ljava/lang/Object;' { 0 75 + 1 75 + 2 75 3 75 + 4 76 5 76 6 76 + 7 76 + 8 76 9 76 } } @@ -203,11 +310,24 @@ class 'pkg/TestGroovyClass$_closure2' { class 'pkg/TestGroovyClass$Inner' { method ' (Lpkg/TestGroovyClass;)V' { 0 82 + 1 82 + 2 82 3 82 f 83 + 10 83 + 11 83 + 12 84 13 84 + 14 84 + 15 84 16 84 + 17 84 + 18 85 + 19 85 + 1a 85 1c 85 + 1d 85 + 1e 85 22 86 } } @@ -215,16 +335,25 @@ class 'pkg/TestGroovyClass$Inner' { class 'pkg/TestGroovyClass$Nested' { method ' ()V' { 4 91 + 5 91 + 6 91 7 91 + 8 92 9 92 + a 92 + b 92 c 92 + d 93 + e 93 10 93 + 11 93 + 12 93 15 94 } } Lines mapping: 9 <-> 19 -10 <-> 23 +10 <-> 21 11 <-> 55 12 <-> 72 diff --git a/plugins/java-decompiler/engine/testData/results/TestInheritanceChainCycle.dec b/plugins/java-decompiler/engine/testData/results/TestInheritanceChainCycle.dec index f2490afcba31..59ecb30b564c 100644 --- a/plugins/java-decompiler/engine/testData/results/TestInheritanceChainCycle.dec +++ b/plugins/java-decompiler/engine/testData/results/TestInheritanceChainCycle.dec @@ -9,8 +9,13 @@ public class TestInheritanceChainCycle extends TestInheritanceChainCycle { class 'pkg/TestInheritanceChainCycle' { method 'printMessage ()V' { 0 4 + 1 4 + 2 4 3 4 + 4 4 5 4 + 6 4 + 7 4 8 5 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestInnerClassConstructor.dec b/plugins/java-decompiler/engine/testData/results/TestInnerClassConstructor.dec index 99ab820bb84e..c77368aa0fd2 100644 --- a/plugins/java-decompiler/engine/testData/results/TestInnerClassConstructor.dec +++ b/plugins/java-decompiler/engine/testData/results/TestInnerClassConstructor.dec @@ -13,17 +13,17 @@ class TestInnerClassConstructor { System.out.println("n(): " + var1);// 13 }// 14 - private class Another { - private Another(int var2, int var3) { - TestInnerClassConstructor.this.n(var2 + "+" + var3);// 24 - }// 25 - } - final class Inner { private Inner(String var2) { TestInnerClassConstructor.this.n(var2);// 18 }// 19 } + + private class Another { + private Another(int var2, int var3) { + TestInnerClassConstructor.this.n(var2 + "+" + var3);// 24 + }// 25 + } } class 'pkg/TestInnerClassConstructor' { @@ -56,31 +56,31 @@ class 'pkg/TestInnerClassConstructor' { } } -class 'pkg/TestInnerClassConstructor$Another' { - method ' (Lpkg/TestInnerClassConstructor;II)V' { +class 'pkg/TestInnerClassConstructor$Inner' { + method ' (Lpkg/TestInnerClassConstructor;Ljava/lang/String;)V' { 9 17 - 11 17 - 15 17 - 16 17 - 1a 17 - 1e 17 - 1f 17 - 20 17 - 21 17 - 22 17 - 23 17 - 24 18 + a 17 + b 17 + c 17 + d 17 + e 18 } } -class 'pkg/TestInnerClassConstructor$Inner' { - method ' (Lpkg/TestInnerClassConstructor;Ljava/lang/String;)V' { +class 'pkg/TestInnerClassConstructor$Another' { + method ' (Lpkg/TestInnerClassConstructor;II)V' { 9 23 - a 23 - b 23 - c 23 - d 23 - e 24 + 11 23 + 15 23 + 16 23 + 1a 23 + 1e 23 + 1f 23 + 20 23 + 21 23 + 22 23 + 23 23 + 24 24 } } @@ -91,10 +91,10 @@ Lines mapping: 10 <-> 10 13 <-> 13 14 <-> 14 -18 <-> 24 -19 <-> 25 -24 <-> 18 -25 <-> 19 +18 <-> 18 +19 <-> 19 +24 <-> 24 +25 <-> 25 Not mapped: 17 23 diff --git a/plugins/java-decompiler/engine/testData/results/TestInnerLocal.dec b/plugins/java-decompiler/engine/testData/results/TestInnerLocal.dec index cf53952d8286..3f79657795df 100644 --- a/plugins/java-decompiler/engine/testData/results/TestInnerLocal.dec +++ b/plugins/java-decompiler/engine/testData/results/TestInnerLocal.dec @@ -33,9 +33,9 @@ public class TestInnerLocal { class Inner1 { final String x; - public Inner1(String var2) { - this.x = var2;// 46 - }// 47 + public Inner1(@Deprecated String x) { + this.x = x;// 32 + }// 33 } static class Inner1Static { @@ -57,103 +57,103 @@ public class TestInnerLocal { class 'pkg/TestInnerLocal$1Inner' { method ' (Ljava/lang/String;)V' { - 4 6 - 5 6 - 6 6 - 7 6 - 8 6 - 9 7 + 4 8 + 5 8 + 6 8 + 7 8 + 8 8 + 9 9 } } class 'pkg/TestInnerLocal' { method 'testStaticMethod ()V' { - 4 10 - 5 10 - e 11 - f 11 - 18 12 - 19 12 - 1e 13 + 4 12 + 5 12 + e 13 + f 13 + 18 14 + 19 14 + 1e 15 } method 'testMethod ()V' { - 5 24 - 6 24 - f 25 - 10 25 - 1a 26 - 1b 26 - 24 27 - 25 27 - 2a 28 + 5 26 + 6 26 + f 27 + 10 27 + 1a 28 + 1b 28 + 24 29 + 25 29 + 2a 30 } } -class 'TestInnerLocal$2Inner' { - method ' (LTestInnerLocal;Ljava/lang/String;)V' { - 9 20 - a 20 - b 20 - c 20 - d 20 - e 21 +class 'pkg/TestInnerLocal$2Inner' { + method ' (Lpkg/TestInnerLocal;Ljava/lang/String;)V' { + 9 22 + a 22 + b 22 + c 22 + d 22 + e 23 } } -class 'TestInnerLocal$Inner1' { - method ' (LTestInnerLocal;Ljava/lang/String;)V' { - 9 34 - a 34 - b 34 - c 34 - d 34 - e 35 +class 'pkg/TestInnerLocal$Inner1' { + method ' (Lpkg/TestInnerLocal;Ljava/lang/String;)V' { + 9 36 + a 36 + b 36 + c 36 + d 36 + e 37 } } -class 'TestInnerLocal$Inner1Static' { +class 'pkg/TestInnerLocal$Inner1Static' { method ' (Ljava/lang/String;)V' { - 4 42 - 5 42 - 6 42 - 7 42 - 8 42 - 9 43 + 4 44 + 5 44 + 6 44 + 7 44 + 8 44 + 9 45 } } class 'pkg/TestInnerLocal$Inner1Static$Inner2Static' { method ' (Ljava/lang/String;)V' { - 4 49 - 5 49 - 6 49 - 7 49 - 8 49 - 9 50 + 4 51 + 5 51 + 6 51 + 7 51 + 8 51 + 9 52 } } Lines mapping: -22 <-> 7 -23 <-> 8 -25 <-> 11 -26 <-> 12 -27 <-> 13 -28 <-> 14 -34 <-> 21 -35 <-> 22 -37 <-> 25 -38 <-> 26 -39 <-> 27 -40 <-> 28 -41 <-> 29 -46 <-> 35 -47 <-> 36 -53 <-> 43 -54 <-> 44 -59 <-> 50 -60 <-> 51 +8 <-> 9 +9 <-> 10 +11 <-> 13 +12 <-> 14 +13 <-> 15 +14 <-> 16 +20 <-> 23 +21 <-> 24 +23 <-> 27 +24 <-> 28 +25 <-> 29 +26 <-> 30 +27 <-> 31 +32 <-> 37 +33 <-> 38 +39 <-> 45 +40 <-> 46 +45 <-> 52 +46 <-> 53 Not mapped: 7 19 diff --git a/plugins/java-decompiler/engine/testData/results/TestInnerSignature.dec b/plugins/java-decompiler/engine/testData/results/TestInnerSignature.dec index 37b216917552..dd7a5f464d3a 100644 --- a/plugins/java-decompiler/engine/testData/results/TestInnerSignature.dec +++ b/plugins/java-decompiler/engine/testData/results/TestInnerSignature.dec @@ -28,91 +28,91 @@ public class TestInnerSignature { B b; C c; - public InnerStatic(A var1, B var2, C var3) { - this.a = var1;// 46 - this.b = var2;// 47 - this.c = var3;// 48 - }// 49 + public InnerStatic(A a, @Deprecated B b, C c) { + this.a = a;// 32 + this.b = b;// 33 + this.c = c;// 34 + }// 35 } } class 'pkg/TestInnerSignature' { method ' (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V' { - 4 6 - 5 6 - 6 6 - 7 6 - 8 6 - 9 7 - a 7 - b 7 - c 7 - d 7 - e 8 - f 8 - 10 8 - 11 8 - 12 8 - 13 9 + 4 8 + 5 8 + 6 8 + 7 8 + 8 8 + 9 9 + a 9 + b 9 + c 9 + d 9 + e 10 + f 10 + 10 10 + 11 10 + 12 10 + 13 11 } } -class 'TestInnerSignature$Inner' { - method ' (LTestInnerSignature;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V' { - 9 17 - a 17 - b 17 - c 17 - d 17 - e 18 - f 18 - 10 18 - 11 18 - 12 18 - 13 19 - 14 19 - 15 19 - 16 19 - 17 19 - 18 19 - 19 20 +class 'pkg/TestInnerSignature$Inner' { + method ' (Lpkg/TestInnerSignature;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V' { + 9 19 + a 19 + b 19 + c 19 + d 19 + e 20 + f 20 + 10 20 + 11 20 + 12 20 + 13 21 + 14 21 + 15 21 + 16 21 + 17 21 + 18 21 + 19 22 } } -class 'TestInnerSignature$InnerStatic' { +class 'pkg/TestInnerSignature$InnerStatic' { method ' (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V' { - 4 29 - 5 29 - 6 29 - 7 29 - 8 29 - 9 30 - a 30 - b 30 - c 30 - d 30 - e 31 - f 31 - 10 31 - 11 31 - 12 31 - 13 32 + 4 31 + 5 31 + 6 31 + 7 31 + 8 31 + 9 32 + a 32 + b 32 + c 32 + d 32 + e 33 + f 33 + 10 33 + 11 33 + 12 33 + 13 34 } } Lines mapping: -23 <-> 7 -24 <-> 8 -25 <-> 9 -26 <-> 10 -34 <-> 18 -35 <-> 19 -36 <-> 20 -37 <-> 21 -46 <-> 30 -47 <-> 31 -48 <-> 32 -49 <-> 33 +9 <-> 9 +10 <-> 10 +11 <-> 11 +12 <-> 12 +20 <-> 20 +21 <-> 21 +22 <-> 22 +23 <-> 23 +32 <-> 32 +33 <-> 33 +34 <-> 34 +35 <-> 35 Not mapped: 8 19 diff --git a/plugins/java-decompiler/engine/testData/results/TestInstanceofPatternNotSupported.dec b/plugins/java-decompiler/engine/testData/results/TestInstanceofPatternNotSupported.dec index caed57462964..44f737678917 100644 --- a/plugins/java-decompiler/engine/testData/results/TestInstanceofPatternNotSupported.dec +++ b/plugins/java-decompiler/engine/testData/results/TestInstanceofPatternNotSupported.dec @@ -18,24 +18,54 @@ public class TestInstanceofPatternNotSupported { class 'decompiler/TestInstanceofPatternNotSupported' { method 'typePattern (Ljava/lang/Object;)V' { + 0 4 1 4 + 2 4 + 3 4 4 4 7 5 + 8 5 + 9 5 a 5 + b 5 c 5 + d 5 + e 5 f 15 + 10 7 11 7 + 12 7 + 13 7 14 7 + 15 8 16 8 + 17 8 + 18 8 19 8 1a 8 1d 9 + 1e 9 + 1f 9 + 20 9 21 9 + 22 9 + 23 9 + 27 10 28 10 + 29 10 2a 10 + 2b 10 + 2c 10 2d 10 30 11 + 31 11 + 32 11 + 33 11 34 11 + 35 11 + 36 11 + 37 11 + 38 11 39 11 3c 15 } diff --git a/plugins/java-decompiler/engine/testData/results/TestInstanceofWithPattern.dec b/plugins/java-decompiler/engine/testData/results/TestInstanceofWithPattern.dec index 48e1811b617e..eb3511e4b9c9 100644 --- a/plugins/java-decompiler/engine/testData/results/TestInstanceofWithPattern.dec +++ b/plugins/java-decompiler/engine/testData/results/TestInstanceofWithPattern.dec @@ -14,7 +14,7 @@ public class TestInstanceofWithPattern { }// 14 void typePattern2(Object str) { - if (!(str instanceof String s)) {// 17 + if (!(str instanceof String s)) {// 17 21 System.out.println("no");// 18 } else { if (s.length() > 3) {// 22 @@ -89,102 +89,255 @@ public class TestInstanceofWithPattern { class 'decompiler/TestInstanceofWithPattern' { method 'typePattern1 (Ljava/lang/Object;)V' { + 0 7 3 7 + 4 7 + 5 7 6 7 + d 7 e 8 + f 8 + 10 8 + 11 8 12 8 + 13 8 + 14 8 18 10 + 19 10 + 1a 10 1b 10 + 1c 10 1d 10 20 13 } method 'typePattern2 (Ljava/lang/Object;)V' { + 0 16 1 16 + 2 16 + 3 16 4 16 7 17 + 8 17 + 9 17 a 17 + b 17 c 17 + d 17 + e 17 f 26 + 14 16 + 15 19 16 19 + 17 19 + 18 19 19 19 1a 19 1d 20 + 1e 20 + 1f 20 + 20 20 21 20 + 22 20 + 23 20 + 27 21 28 21 + 29 21 2a 21 + 2b 21 + 2c 21 2d 21 30 22 + 31 22 + 32 22 + 33 22 34 22 + 35 22 + 36 22 + 37 22 + 38 22 39 22 3c 26 } method 'typePatternInBinaryExpr (Ljava/lang/Object;)V' { + 0 29 3 29 + 4 29 + 5 29 6 29 + d 29 + e 30 f 30 + 10 30 + 11 30 12 30 13 30 + 16 30 17 30 + 18 30 19 30 + 1a 30 + 1b 30 1c 30 1f 31 + 20 31 + 21 31 + 22 31 23 31 + 24 31 + 25 31 29 36 + 2a 36 + 2b 36 2c 36 + 2d 36 2e 36 31 32 } method 'returnInstanceof (Ljava/lang/Object;)Ljava/lang/String;' { + 0 40 3 40 + 4 40 + 5 40 6 40 + d 40 + e 41 f 41 + 10 41 + 11 41 12 41 + 13 41 14 41 + 17 42 18 42 19 42 + 1a 42 1b 42 + 1c 42 + 1d 42 1e 42 + 1f 42 + 20 42 + 21 42 + 22 42 23 42 + 24 46 27 46 + 28 46 + 29 46 2a 46 + 31 46 + 32 47 33 47 + 34 47 + 35 47 + 36 47 + 37 47 38 47 + 39 48 3c 48 + 3d 48 + 3e 48 3f 48 + 46 48 + 47 49 48 49 + 49 49 + 4a 49 + 4b 49 + 4c 49 4d 49 + 4e 49 + 4f 49 + 50 49 + 51 49 52 49 + 53 51 54 51 + 55 51 + 56 51 57 51 } method 'complex (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/String;' { + 0 58 5 58 + 6 58 + 7 58 8 58 + 10 58 + 11 58 + 12 59 + 13 59 14 59 + 15 59 16 59 + 17 59 + 18 59 19 59 + 1c 62 + 1d 62 1e 62 + 1f 65 24 65 + 25 65 + 26 65 27 65 + 2f 65 + 30 66 31 66 + 32 66 + 33 66 34 66 38 68 + 39 69 3e 69 + 3f 69 + 40 69 41 69 + 49 69 + 4a 69 + 4b 70 + 4c 70 4d 70 + 4e 70 4f 70 + 50 70 + 51 70 52 70 + 55 73 + 56 73 57 73 + 58 73 + 59 73 + 5a 73 + 5b 73 5c 73 + 5d 76 62 76 + 63 76 + 64 76 65 76 + 6d 76 + 6e 76 + 6f 77 70 77 + 71 77 + 72 77 + 73 78 + 74 78 75 78 + 76 78 + 77 78 + 78 78 + 79 78 7a 78 + 7b 78 + 7c 78 + 7d 78 + 7e 78 7f 78 } @@ -202,6 +355,7 @@ Lines mapping: 17 <-> 17 18 <-> 18 19 <-> 27 +21 <-> 17 22 <-> 20 23 <-> 21 24 <-> 22 @@ -231,5 +385,4 @@ Lines mapping: 70 <-> 78 77 <-> 86 Not mapped: -21 72 diff --git a/plugins/java-decompiler/engine/testData/results/TestIntVarMerge.dec b/plugins/java-decompiler/engine/testData/results/TestIntVarMerge.dec index 63ceef3d5269..3a5ffcfa52e5 100644 --- a/plugins/java-decompiler/engine/testData/results/TestIntVarMerge.dec +++ b/plugins/java-decompiler/engine/testData/results/TestIntVarMerge.dec @@ -21,12 +21,17 @@ public class TestIntVarMerge { class 'pkg/TestIntVarMerge' { method 'test1 ()I' { 0 4 + 1 4 2 4 3 5 + 4 5 + 5 5 6 5 7 5 9 6 + a 6 c 6 + d 7 e 7 } @@ -34,13 +39,32 @@ class 'pkg/TestIntVarMerge' { 0 11 1 11 2 12 + 3 12 + 4 12 + 5 12 6 12 + 7 12 + 8 12 9 13 + a 13 + b 13 c 14 + d 14 + e 14 + f 14 10 14 + 11 14 + 12 14 13 15 + 14 15 + 15 15 16 16 + 17 16 + 18 16 + 19 16 1a 16 + 1b 16 + 1c 16 1d 17 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestInterfaceSuper.dec b/plugins/java-decompiler/engine/testData/results/TestInterfaceSuper.dec index a5567e2e8127..d5fdf4239aa8 100644 --- a/plugins/java-decompiler/engine/testData/results/TestInterfaceSuper.dec +++ b/plugins/java-decompiler/engine/testData/results/TestInterfaceSuper.dec @@ -20,6 +20,8 @@ class 'pkg/TestInterfaceSuper' { class 'pkg/TestInterfaceSuper$Impl' { method 'defaultMethod ()V' { 1 8 + 2 8 + 3 8 4 9 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestInvertedFloatComparison.dec b/plugins/java-decompiler/engine/testData/results/TestInvertedFloatComparison.dec index e252925a2ccf..03d684aaf4c8 100644 --- a/plugins/java-decompiler/engine/testData/results/TestInvertedFloatComparison.dec +++ b/plugins/java-decompiler/engine/testData/results/TestInvertedFloatComparison.dec @@ -68,81 +68,113 @@ public class TestInvertedFloatComparison { class 'pkg/TestInvertedFloatComparison' { method 'less (DD)Z' { + 0 4 + 1 4 2 4 b 4 } method 'less (II)Z' { + 0 8 + 1 8 2 8 a 8 } method 'notLess (DD)Z' { + 0 12 + 1 12 2 12 b 12 } method 'notLess (II)Z' { + 0 16 + 1 16 2 16 a 16 } method 'greater (DD)Z' { + 0 20 + 1 20 2 20 b 20 } method 'greater (II)Z' { + 0 24 + 1 24 2 24 a 24 } method 'notGreater (DD)Z' { + 0 28 + 1 28 2 28 b 28 } method 'notGreater (II)Z' { + 0 32 + 1 32 2 32 a 32 } method 'lessEqual (DD)Z' { + 0 36 + 1 36 2 36 b 36 } method 'lessEqual (II)Z' { + 0 40 + 1 40 2 40 a 40 } method 'notLessEqual (DD)Z' { + 0 44 + 1 44 2 44 b 44 } method 'notLessEqual (II)Z' { + 0 48 + 1 48 2 48 a 48 } method 'greaterEqual (DD)Z' { + 0 52 + 1 52 2 52 b 52 } method 'greaterEqual (II)Z' { + 0 56 + 1 56 2 56 a 56 } method 'notGreaterEqual (DD)Z' { + 0 60 + 1 60 2 60 b 60 } method 'notGreaterEqual (II)Z' { + 0 64 + 1 64 2 64 a 64 } diff --git a/plugins/java-decompiler/engine/testData/results/TestJava11StringConcat.dec b/plugins/java-decompiler/engine/testData/results/TestJava11StringConcat.dec index 68ab9c2d173d..a1d16d17ad29 100644 --- a/plugins/java-decompiler/engine/testData/results/TestJava11StringConcat.dec +++ b/plugins/java-decompiler/engine/testData/results/TestJava11StringConcat.dec @@ -12,12 +12,25 @@ public class TestJava11StringConcat { class 'java11/TestJava11StringConcat' { method 'test1 (Ljava/lang/String;I)Ljava/lang/String;' { + 0 4 + 1 4 2 4 + 3 4 + 4 4 + 5 4 + 6 4 7 4 } method 'test2 (Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String;' { + 0 8 + 1 8 + 2 8 3 8 + 4 8 + 5 8 + 6 8 + 7 8 8 8 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestJava11StringConcatEmptyAffix.dec b/plugins/java-decompiler/engine/testData/results/TestJava11StringConcatEmptyAffix.dec index 6f9349f9123c..10a147800c76 100644 --- a/plugins/java-decompiler/engine/testData/results/TestJava11StringConcatEmptyAffix.dec +++ b/plugins/java-decompiler/engine/testData/results/TestJava11StringConcatEmptyAffix.dec @@ -52,62 +52,126 @@ public class TestJava11StringConcatEmptyAffix { class 'java11/TestJava11StringConcatEmptyAffix' { method 'testEmptyPrefixInt (I)Ljava/lang/String;' { + 0 4 1 4 + 2 4 + 3 4 + 4 4 + 5 4 6 4 } method 'testEmptyPrefixString (Ljava/lang/String;)Ljava/lang/String;' { + 0 8 1 8 + 2 8 + 3 8 + 4 8 + 5 8 6 8 } method 'testPrefixInt (I)Ljava/lang/String;' { + 0 12 1 12 + 2 12 + 3 12 + 4 12 + 5 12 6 12 } method 'testPrefixString (Ljava/lang/String;)Ljava/lang/String;' { + 0 16 1 16 + 2 16 + 3 16 + 4 16 + 5 16 6 16 } method 'testIntEmptySuffix (I)Ljava/lang/String;' { + 0 20 1 20 + 2 20 + 3 20 + 4 20 + 5 20 6 20 } method 'testStringEmptySuffix (Ljava/lang/String;)Ljava/lang/String;' { + 0 24 1 24 + 2 24 + 3 24 + 4 24 + 5 24 6 24 } method 'testIntSuffix (I)Ljava/lang/String;' { + 0 28 1 28 + 2 28 + 3 28 + 4 28 + 5 28 6 28 } method 'testStringSuffix (Ljava/lang/String;)Ljava/lang/String;' { + 0 32 1 32 + 2 32 + 3 32 + 4 32 + 5 32 6 32 } method 'testIntInt (II)Ljava/lang/String;' { + 0 36 + 1 36 2 36 + 3 36 + 4 36 + 5 36 + 6 36 7 36 } method 'testIntIntSuffix (II)Ljava/lang/String;' { + 0 40 + 1 40 2 40 + 3 40 + 4 40 + 5 40 + 6 40 7 40 } method 'testIntString (ILjava/lang/String;)Ljava/lang/String;' { + 0 44 + 1 44 2 44 + 3 44 + 4 44 + 5 44 + 6 44 7 44 } method 'testStringInt (ILjava/lang/String;)Ljava/lang/String;' { + 0 48 + 1 48 2 48 + 3 48 + 4 48 + 5 48 + 6 48 7 48 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestJava11StringConcatSpecialChars.dec b/plugins/java-decompiler/engine/testData/results/TestJava11StringConcatSpecialChars.dec index 2b594dd16191..75e7a8be2e47 100644 --- a/plugins/java-decompiler/engine/testData/results/TestJava11StringConcatSpecialChars.dec +++ b/plugins/java-decompiler/engine/testData/results/TestJava11StringConcatSpecialChars.dec @@ -12,12 +12,26 @@ public class TestJava11StringConcatSpecialChars { class 'java11/TestJava11StringConcatSpecialChars' { method 'testOrdinaryInfix (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;' { + 0 4 + 1 4 + 2 4 3 4 + 4 4 + 5 4 + 6 4 + 7 4 8 4 } method 'testSpecialCharsInfix (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;' { + 0 8 + 1 8 + 2 8 3 8 + 4 8 + 5 8 + 6 8 + 7 8 8 8 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestLambdaParams.dec b/plugins/java-decompiler/engine/testData/results/TestLambdaParams.dec index 0048941a3cb5..873078adca64 100644 --- a/plugins/java-decompiler/engine/testData/results/TestLambdaParams.dec +++ b/plugins/java-decompiler/engine/testData/results/TestLambdaParams.dec @@ -5,44 +5,48 @@ import java.util.function.Function; public class TestLambdaParams { public static void toCollection(Object var0) { Object var1 = null;// 23 - Function var2 = (var1x) -> { + Function var2 = (var1x) -> {// 24 return var0; - };// 24 - Function var3 = (var1x) -> { + }; + Function var3 = (var1x) -> {// 25 return var1; - };// 25 - Function var4 = (var0x) -> { + }; + Function var4 = (var0x) -> {// 26 return var0x; - };// 26 + }; }// 27 } class 'pkg/TestLambdaParams' { method 'lambda$toCollection$0 (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;' { + 0 8 1 8 } method 'lambda$toCollection$1 (Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object;' { + 0 11 1 11 } method 'lambda$toCollection$2 (Ljava/lang/Object;)Ljava/lang/Object;' { + 0 14 1 14 } method 'toCollection (Ljava/lang/Object;)V' { 0 6 1 6 - 8 9 - f 12 - 15 15 + 8 7 + f 10 + 15 13 + 16 13 17 16 } } Lines mapping: 23 <-> 7 -24 <-> 10 -25 <-> 13 -26 <-> 16 +24 <-> 8 +25 <-> 11 +26 <-> 14 27 <-> 17 diff --git a/plugins/java-decompiler/engine/testData/results/TestLocalClass.dec b/plugins/java-decompiler/engine/testData/results/TestLocalClass.dec index a14a51a5e1e8..0a648e59a3e4 100644 --- a/plugins/java-decompiler/engine/testData/results/TestLocalClass.dec +++ b/plugins/java-decompiler/engine/testData/results/TestLocalClass.dec @@ -39,7 +39,10 @@ class 'pkg/TestLocalClass' { 0 4 1 4 a 13 + b 14 c 14 + d 14 + e 14 f 15 } diff --git a/plugins/java-decompiler/engine/testData/results/TestMethodParametersAttr.dec b/plugins/java-decompiler/engine/testData/results/TestMethodParametersAttr.dec index 2d31481e920b..c4964e965aec 100644 --- a/plugins/java-decompiler/engine/testData/results/TestMethodParametersAttr.dec +++ b/plugins/java-decompiler/engine/testData/results/TestMethodParametersAttr.dec @@ -78,19 +78,34 @@ public class TestMethodParametersAttr { class 'pkg/TestMethodParametersAttr' { method ' (I)V' { 4 4 + 5 4 + 6 4 + 7 4 8 4 + 9 4 + a 4 b 5 } method 'm1 (I)V' { 0 8 + 1 8 + 2 8 + 3 8 4 8 + 5 8 + 6 8 7 9 } method 'm2 (I)V' { 0 12 + 1 12 + 2 12 + 3 12 4 12 + 5 12 + 6 12 7 13 } @@ -102,13 +117,23 @@ class 'pkg/TestMethodParametersAttr' { class 'pkg/TestMethodParametersAttr$1Local' { method ' (Lpkg/TestMethodParametersAttr;I)V' { 9 18 + a 18 + b 18 + c 18 d 18 + e 18 + f 18 10 19 } method 'm (I)V' { 0 22 + 1 22 + 2 22 + 3 22 4 22 + 5 22 + 6 22 7 23 } } @@ -116,13 +141,23 @@ class 'pkg/TestMethodParametersAttr$1Local' { class 'pkg/TestMethodParametersAttr$C1' { method ' (Lpkg/TestMethodParametersAttr;I)V' { 9 30 + a 30 + b 30 + c 30 d 30 + e 30 + f 30 10 31 } method 'm (I)V' { 0 34 + 1 34 + 2 34 + 3 34 4 34 + 5 34 + 6 34 7 35 } } @@ -130,19 +165,34 @@ class 'pkg/TestMethodParametersAttr$C1' { class 'pkg/TestMethodParametersAttr$C2' { method ' (I)V' { 4 40 + 5 40 + 6 40 + 7 40 8 40 + 9 40 + a 40 b 41 } method 'm1 (I)V' { 0 44 + 1 44 + 2 44 + 3 44 4 44 + 5 44 + 6 44 7 45 } method 'm2 (I)V' { 0 48 + 1 48 + 2 48 + 3 48 4 48 + 5 48 + 6 48 7 49 } } @@ -150,7 +200,12 @@ class 'pkg/TestMethodParametersAttr$C2' { class 'pkg/TestMethodParametersAttr$E1' { method ' (Ljava/lang/String;II)V' { 6 66 + 7 66 + 8 66 + 9 66 a 66 + b 66 + c 66 d 67 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestMethodReferenceSameName.dec b/plugins/java-decompiler/engine/testData/results/TestMethodReferenceSameName.dec index 22e9d9213fbd..afd244e5182d 100644 --- a/plugins/java-decompiler/engine/testData/results/TestMethodReferenceSameName.dec +++ b/plugins/java-decompiler/engine/testData/results/TestMethodReferenceSameName.dec @@ -18,15 +18,12 @@ class 'TestMethodReferenceSameName' { 1 4 2 4 3 4 - 5 5 - 6 5 - 7 5 - e 6 - f 6 - 10 6 - 11 6 - 12 6 - 13 7 + e 5 + f 5 + 10 5 + 11 5 + 12 5 + 13 6 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestMissingConstructorCallBad.dec b/plugins/java-decompiler/engine/testData/results/TestMissingConstructorCallBad.dec index c4bec2b88c2a..3db7ac5323af 100644 --- a/plugins/java-decompiler/engine/testData/results/TestMissingConstructorCallBad.dec +++ b/plugins/java-decompiler/engine/testData/results/TestMissingConstructorCallBad.dec @@ -18,10 +18,17 @@ public class TestMissingConstructorCallBad { class 'pkg/TestMissingConstructorCallBad' { method ' ()V' { 0 4 + 1 4 + 2 4 3 4 + 4 4 5 4 + 6 4 + 7 4 9 5 a 5 + b 5 + c 5 d 6 } diff --git a/plugins/java-decompiler/engine/testData/results/TestMissingConstructorCallGood.dec b/plugins/java-decompiler/engine/testData/results/TestMissingConstructorCallGood.dec index 2173f97157d0..8ba579bc9e23 100644 --- a/plugins/java-decompiler/engine/testData/results/TestMissingConstructorCallGood.dec +++ b/plugins/java-decompiler/engine/testData/results/TestMissingConstructorCallGood.dec @@ -25,10 +25,17 @@ class 'pkg/TestMissingConstructorCallGood' { method ' ()V' { 0 7 + 1 7 + 2 7 3 7 + 4 7 5 7 + 6 7 + 7 7 9 8 a 8 + b 8 + c 8 d 9 } diff --git a/plugins/java-decompiler/engine/testData/results/TestNamedSuspendFun2Kt.dec b/plugins/java-decompiler/engine/testData/results/TestNamedSuspendFun2Kt.dec index 7f7ffe572b0b..62fa5c51dcc4 100644 --- a/plugins/java-decompiler/engine/testData/results/TestNamedSuspendFun2Kt.dec +++ b/plugins/java-decompiler/engine/testData/results/TestNamedSuspendFun2Kt.dec @@ -63,7 +63,7 @@ public final class TestNamedSuspendFun2Kt { int x; label452: { Object var2 = var3.data; - var4 = IntrinsicsKt.getCOROUTINE_SUSPENDED();// 2 + var4 = IntrinsicsKt.getCOROUTINE_SUSPENDED(); Object var22; boolean var10001; switch (var3.label) { @@ -107,7 +107,7 @@ public final class TestNamedSuspendFun2Kt { throw ((SuccessOrFailure.Failure)var2).exception; } - return 1;// 11 + return 1;// 2 3 8 9 11 case 3: if (var2 instanceof SuccessOrFailure.Failure) { throw ((SuccessOrFailure.Failure)var2).exception; @@ -119,15 +119,15 @@ public final class TestNamedSuspendFun2Kt { throw ((SuccessOrFailure.Failure)var2).exception; } - throw var1;// 9 + throw var1; default: throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } while(true) { try { - var3.label = 1;// 5 - var22 = bar(var3); + var3.label = 1; + var22 = bar(var3);// 5 } catch (Throwable var17) { var10000 = var17; var10001 = false; @@ -168,7 +168,7 @@ public final class TestNamedSuspendFun2Kt { var1 = var10000; var3.L$0 = var1; var3.label = 4; - if (bar(var3) == var4) {// 8 + if (bar(var3) == var4) { return var4; } else { throw var1; @@ -183,121 +183,288 @@ public final class TestNamedSuspendFun2Kt { class 'TestNamedSuspendFun2Kt$foo2$1' { method 'invokeSuspend (Ljava/lang/Object;)Ljava/lang/Object;' { + 0 36 + 1 36 2 36 + 3 36 + 4 36 + 5 37 a 37 + b 37 d 37 + e 37 + f 37 + 10 38 11 38 + 12 38 + 13 38 14 38 } method ' (Lkotlin/coroutines/Continuation;)V' { + 1 42 2 42 + 3 42 + 4 42 5 43 } } class 'TestNamedSuspendFun2Kt' { method 'foo2 (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;' { + 0 47 1 47 + 2 47 + 3 47 4 47 + 7 48 8 48 + 9 48 + a 48 b 48 + c 49 d 49 + e 49 + f 49 10 49 + 11 49 12 49 13 49 + 16 50 18 50 + 19 50 + 1a 50 1b 50 + 1c 50 1d 50 1e 50 + 1f 50 + 20 50 21 51 + 28 55 2c 55 + 2d 64 2e 64 + 2f 64 + 30 64 31 64 32 65 + 33 65 + 34 65 35 65 + 36 65 + 37 68 38 68 + 39 68 + 3a 68 3b 68 + 5c 70 5e 70 + 5f 70 + 60 70 61 70 64 71 + 65 71 + 66 71 67 71 + 68 71 + 69 71 6a 71 + 6d 129 + 6e 128 6f 128 70 128 + 71 128 + 72 128 73 129 + 77 136 + 78 136 79 136 + 7c 137 + 7d 137 7e 137 + 7f 76 81 76 + 82 76 + 83 76 84 76 87 77 + 88 77 + 89 77 8a 77 + 8b 77 + 8c 77 8d 77 + 8f 80 90 88 + 91 88 + 92 88 93 88 + 94 88 + 95 88 96 88 + 97 89 98 89 + 9b 160 + 9c 158 + 9d 158 9e 158 + 9f 158 + a0 158 + a1 159 a2 159 a3 159 + a4 159 + a5 159 a6 160 + a7 160 + a8 160 + aa 160 + ab 160 ac 160 + af 161 + b0 161 b1 161 + b2 104 b3 104 + b4 104 + b5 104 b6 104 + b7 105 b9 105 + ba 105 + bb 105 bc 105 bf 106 + c0 106 + c1 106 c2 106 + c3 106 + c4 106 c5 106 c9 109 + ca 109 + cb 109 + cc 99 + cd 98 ce 98 cf 98 + d0 98 + d1 98 d2 99 + d3 99 + d4 99 + d5 109 + d6 99 + d7 99 d8 99 + d9 109 + da 109 + db 100 + dc 100 dd 100 - e0 111 - e3 111 - e6 112 - e9 112 - ec 112 - f3 167 - f7 168 - fb 169 - fc 169 - ff 170 - 105 170 - 10a 171 - 10c 116 - 10f 116 - 112 116 - 115 117 - 118 117 - 11b 118 - 11e 118 - 121 118 - 126 121 + de 109 + df 109 + e0 109 + e1 109 + e2 109 + e3 109 + e4 109 + e5 109 + e6 109 + e7 109 + e8 109 + e9 109 + ea 109 + eb 109 + ec 109 + ed 109 + ee 109 + ef 109 + f0 109 + f1 109 + f2 109 + f3 109 + f4 109 + f5 109 + f6 109 + f7 109 + f8 109 + f9 109 + fa 109 + fb 109 + fc 109 + fd 109 + fe 109 + ff 109 + 100 109 + 101 109 + 102 109 + 103 109 + 104 109 + 105 109 + 106 109 + 107 109 + 108 109 + 109 109 + 10a 109 + 10b 109 + 10c 109 + 10d 109 + 10e 109 + 10f 109 + 110 109 + 111 109 + 112 109 + 113 109 + 114 109 + 115 109 + 116 109 + 117 109 + 118 109 + 119 109 + 11a 109 + 11b 109 + 11c 109 + 11d 109 + 11e 109 + 11f 109 + 120 109 + 121 109 + 122 109 + 123 109 + 124 109 + 125 109 + 126 109 + 127 109 + 128 109 + 129 109 12a 109 12b 109 + 12c 109 + 12d 109 133 123 + 134 123 138 123 } method 'bar (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;' { 0 179 1 179 + 2 179 + 3 179 4 179 } } Lines mapping: -2 <-> 66 -5 <-> 129 +2 <-> 110 +3 <-> 110 +5 <-> 130 6 <-> 89 -8 <-> 171 -9 <-> 122 +8 <-> 110 +9 <-> 110 11 <-> 110 14 <-> 180 Not mapped: -3 4 diff --git a/plugins/java-decompiler/engine/testData/results/TestPop2OneDoublePop2.dec b/plugins/java-decompiler/engine/testData/results/TestPop2OneDoublePop2.dec index 87a53ddc2b54..1c90684abc7f 100644 --- a/plugins/java-decompiler/engine/testData/results/TestPop2OneDoublePop2.dec +++ b/plugins/java-decompiler/engine/testData/results/TestPop2OneDoublePop2.dec @@ -10,9 +10,16 @@ public class TestPop2OneDoublePop2 { class 'pkg/TestPop2OneDoublePop2' { method 'main ([Ljava/lang/String;)V' { 0 5 + 1 5 + 2 5 3 5 + 4 5 5 4 + 6 4 + 7 4 9 5 + a 5 + b 5 c 6 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestPop2OneLongPop2.dec b/plugins/java-decompiler/engine/testData/results/TestPop2OneLongPop2.dec index 2d7813313ff3..92f0c4aab712 100644 --- a/plugins/java-decompiler/engine/testData/results/TestPop2OneLongPop2.dec +++ b/plugins/java-decompiler/engine/testData/results/TestPop2OneLongPop2.dec @@ -10,9 +10,16 @@ public class TestPop2OneLongPop2 { class 'pkg/TestPop2OneLongPop2' { method 'main ([Ljava/lang/String;)V' { 0 5 + 1 5 + 2 5 3 5 + 4 5 5 4 + 6 4 + 7 4 9 5 + a 5 + b 5 c 6 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestPop2TwoIntPop2.dec b/plugins/java-decompiler/engine/testData/results/TestPop2TwoIntPop2.dec index 9d1583c06409..63f734e128c1 100644 --- a/plugins/java-decompiler/engine/testData/results/TestPop2TwoIntPop2.dec +++ b/plugins/java-decompiler/engine/testData/results/TestPop2TwoIntPop2.dec @@ -11,10 +11,17 @@ public class TestPop2TwoIntPop2 { class 'pkg/TestPop2TwoIntPop2' { method 'main ([Ljava/lang/String;)V' { 0 6 + 1 6 + 2 6 3 6 + 4 6 5 4 + 6 4 7 5 + 8 5 a 6 + b 6 + c 6 d 7 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestPop2TwoIntTwoPop.dec b/plugins/java-decompiler/engine/testData/results/TestPop2TwoIntTwoPop.dec index aaa360b22867..7401eef0a714 100644 --- a/plugins/java-decompiler/engine/testData/results/TestPop2TwoIntTwoPop.dec +++ b/plugins/java-decompiler/engine/testData/results/TestPop2TwoIntTwoPop.dec @@ -11,10 +11,17 @@ public class TestPop2TwoIntTwoPop { class 'pkg/TestPop2TwoIntTwoPop' { method 'main ([Ljava/lang/String;)V' { 0 6 + 1 6 + 2 6 3 6 + 4 6 5 4 + 6 4 7 5 + 8 5 b 6 + c 6 + d 6 e 7 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestPrimitiveNarrowing.dec b/plugins/java-decompiler/engine/testData/results/TestPrimitiveNarrowing.dec index 1e5d30cecbf8..1a3f11aee668 100644 --- a/plugins/java-decompiler/engine/testData/results/TestPrimitiveNarrowing.dec +++ b/plugins/java-decompiler/engine/testData/results/TestPrimitiveNarrowing.dec @@ -29,10 +29,16 @@ class 'pkg/TestPrimitiveNarrowing' { method 'invocations ()V' { 0 7 1 7 + 2 7 + 3 7 4 8 5 8 + 6 8 + 7 8 8 9 9 9 + a 9 + b 9 10 10 15 11 } diff --git a/plugins/java-decompiler/engine/testData/results/TestPrimitives.dec b/plugins/java-decompiler/engine/testData/results/TestPrimitives.dec index dcbf031b69cc..d493bc9e887d 100644 --- a/plugins/java-decompiler/engine/testData/results/TestPrimitives.dec +++ b/plugins/java-decompiler/engine/testData/results/TestPrimitives.dec @@ -172,319 +172,703 @@ public class TestPrimitives { class 'pkg/TestPrimitives' { method 'printAll ()V' { - 0 4 - 1 4 - 2 4 - 3 4 - 4 4 - 5 5 - 6 5 - 7 5 - 8 5 - 9 5 - a 5 - b 6 - c 6 - d 6 - e 6 - f 6 - 10 6 - 11 6 - 12 7 - 13 7 - 14 7 - 15 7 - 16 7 - 17 7 - 18 8 - 19 8 - 1a 8 - 1b 8 - 1c 8 - 1d 8 - 1e 8 - 1f 9 - 20 9 - 21 9 - 22 9 - 23 9 - 24 9 - 25 10 - 26 10 - 27 10 - 28 10 - 29 10 - 2a 10 - 2b 10 - 2c 11 - 2d 11 - 2e 11 - 2f 11 - 30 11 - 31 11 - 32 12 - 33 12 - 37 12 - 3b 13 - 40 13 - 44 14 - 4a 14 - 4e 15 - 52 15 - 56 16 - 5b 16 - 5f 17 - 65 17 - 69 18 - 6e 18 - 72 19 - 78 19 - 7c 20 - 81 20 - 85 21 - 87 21 - 8a 21 - 8d 21 - 91 22 - 93 22 - 96 22 - 99 22 - 9d 23 - 9f 23 - a2 23 - a5 23 - a9 24 - ab 24 - ae 24 - b1 24 - b5 25 - b7 25 - ba 25 - bd 25 - c1 26 - c3 26 - c6 26 - c9 26 - cd 27 - cf 27 - d2 27 - d5 27 - dd 28 - e2 28 - e5 28 - ea 29 - ed 29 - f0 29 - f5 30 - f8 30 - fb 30 - fe 31 - 101 31 - 10a 31 - 10b 31 - 111 31 - 112 31 - 118 31 - 11b 31 - 121 31 - 123 31 - 129 31 - 12b 31 - 131 31 - 134 31 - 138 31 - 13c 32 - 13f 32 - 148 32 - 14b 32 - 152 32 - 155 32 - 15c 32 - 15f 32 - 166 32 - 169 32 - 16d 32 - 175 33 - 176 33 - 178 33 - 17b 33 - 17d 33 - 180 33 - 182 33 - 185 33 - 18f 34 - 194 34 - 19a 34 - 19f 34 - 1a5 34 - 1aa 34 - 1b0 34 - 1b5 34 - 1c1 35 - 1c3 35 - 1c6 35 - 1c9 35 - 1cb 35 - 1ce 35 - 1d1 35 - 1d3 35 - 1d6 35 - 1d9 35 - 1db 35 - 1de 35 - 1e1 35 - 1e3 35 - 1e6 35 - 1e9 35 - 1eb 35 - 1ee 35 - 1f1 35 - 1f3 35 - 1f6 35 - 1fd 35 - 202 35 - 209 36 + 0 6 + 1 6 + 2 6 + 3 6 + 4 6 + 5 7 + 6 7 + 7 7 + 8 7 + 9 7 + a 7 + b 8 + c 8 + d 8 + e 8 + f 8 + 10 8 + 11 8 + 12 9 + 13 9 + 14 9 + 15 9 + 16 9 + 17 9 + 18 10 + 19 10 + 1a 10 + 1b 10 + 1c 10 + 1d 10 + 1e 10 + 1f 11 + 20 11 + 21 11 + 22 11 + 23 11 + 24 11 + 25 12 + 26 12 + 27 12 + 28 12 + 29 12 + 2a 12 + 2b 12 + 2c 13 + 2d 13 + 2e 13 + 2f 13 + 30 13 + 31 13 + 32 14 + 33 14 + 37 14 + 38 14 + 39 14 + 3a 15 + 3b 15 + 3c 15 + 40 15 + 41 15 + 42 15 + 43 16 + 44 16 + 45 16 + 46 16 + 4a 16 + 4b 16 + 4c 16 + 4d 17 + 4e 17 + 52 17 + 53 17 + 54 17 + 55 18 + 56 18 + 57 18 + 5b 18 + 5c 18 + 5d 18 + 5e 19 + 5f 19 + 60 19 + 61 19 + 65 19 + 66 19 + 67 19 + 68 20 + 69 20 + 6a 20 + 6e 20 + 6f 20 + 70 20 + 71 21 + 72 21 + 73 21 + 74 21 + 78 21 + 79 21 + 7a 21 + 7b 22 + 7c 22 + 7d 22 + 81 22 + 82 22 + 83 22 + 84 23 + 85 23 + 86 23 + 87 23 + 88 23 + 89 23 + 8a 23 + 8b 23 + 8c 23 + 8d 23 + 8e 23 + 8f 23 + 90 24 + 91 24 + 92 24 + 93 24 + 94 24 + 95 24 + 96 24 + 97 24 + 98 24 + 99 24 + 9a 24 + 9b 24 + 9c 25 + 9d 25 + 9e 25 + 9f 25 + a0 25 + a1 25 + a2 25 + a3 25 + a4 25 + a5 25 + a6 25 + a7 25 + a8 26 + a9 26 + aa 26 + ab 26 + ac 26 + ad 26 + ae 26 + af 26 + b0 26 + b1 26 + b2 26 + b3 26 + b4 27 + b5 27 + b6 27 + b7 27 + b8 27 + b9 27 + ba 27 + bb 27 + bc 27 + bd 27 + be 27 + bf 27 + c0 28 + c1 28 + c2 28 + c3 28 + c4 28 + c5 28 + c6 28 + c7 28 + c8 28 + c9 28 + ca 28 + cb 28 + cc 29 + cd 29 + ce 29 + cf 29 + d0 29 + d1 29 + d2 29 + d3 29 + d4 29 + d5 29 + d6 29 + d7 29 + d8 30 + dd 30 + de 30 + e2 30 + e3 30 + e4 30 + e5 30 + e6 30 + e7 30 + e8 31 + e9 31 + ea 31 + eb 31 + ec 31 + ed 31 + ee 31 + ef 31 + f0 31 + f1 31 + f2 31 + f3 32 + f4 32 + f5 32 + f6 32 + f7 32 + f8 32 + f9 32 + fa 32 + fb 32 + fc 32 + fd 32 + fe 33 + ff 33 + 100 33 + 101 33 + 102 33 + 10a 33 + 10b 33 + 10c 33 + 10d 33 + 111 33 + 112 33 + 113 33 + 114 33 + 118 33 + 119 33 + 11a 33 + 11b 33 + 11c 33 + 11d 33 + 121 33 + 122 33 + 123 33 + 124 33 + 125 33 + 129 33 + 12a 33 + 12b 33 + 12c 33 + 12d 33 + 131 33 + 132 33 + 133 33 + 134 33 + 135 33 + 136 33 + 138 33 + 139 33 + 13a 33 + 13c 34 + 13d 34 + 13e 34 + 13f 34 + 140 34 + 147 34 + 148 34 + 149 34 + 14a 34 + 14b 34 + 14c 34 + 14d 34 + 151 34 + 152 34 + 153 34 + 154 34 + 155 34 + 156 34 + 157 34 + 15b 34 + 15c 34 + 15d 34 + 15e 34 + 15f 34 + 160 34 + 161 34 + 165 34 + 166 34 + 167 34 + 168 34 + 169 34 + 16a 34 + 16b 34 + 16d 34 + 16e 34 + 16f 34 + 175 35 + 176 35 + 177 35 + 178 35 + 179 35 + 17a 35 + 17b 35 + 17c 35 + 17d 35 + 17e 35 + 17f 35 + 180 35 + 181 35 + 182 35 + 183 35 + 184 35 + 185 35 + 186 35 + 18f 36 + 190 36 + 194 36 + 195 36 + 196 36 + 19a 36 + 19b 36 + 19f 36 + 1a0 36 + 1a1 36 + 1a5 36 + 1a6 36 + 1aa 36 + 1ab 36 + 1ac 36 + 1b0 36 + 1b1 36 + 1b5 36 + 1c1 37 + 1c2 37 + 1c3 37 + 1c4 37 + 1c5 37 + 1c6 37 + 1c7 37 + 1c8 37 + 1c9 37 + 1ca 37 + 1cb 37 + 1cc 37 + 1cd 37 + 1ce 37 + 1cf 37 + 1d0 37 + 1d1 37 + 1d2 37 + 1d3 37 + 1d4 37 + 1d5 37 + 1d6 37 + 1d7 37 + 1d8 37 + 1d9 37 + 1da 37 + 1db 37 + 1dc 37 + 1dd 37 + 1de 37 + 1df 37 + 1e0 37 + 1e1 37 + 1e2 37 + 1e3 37 + 1e4 37 + 1e5 37 + 1e6 37 + 1e7 37 + 1e8 37 + 1e9 37 + 1ea 37 + 1eb 37 + 1ec 37 + 1ed 37 + 1ee 37 + 1ef 37 + 1f0 37 + 1f1 37 + 1f2 37 + 1f3 37 + 1f4 37 + 1f5 37 + 1f6 37 + 1f7 37 + 1f8 37 + 1fd 37 + 1fe 37 + 202 37 + 203 37 + 204 37 + 209 38 } method ' (ZBSIJFDC)V' { 4 41 + 5 41 + 6 41 7 41 + 8 41 + 10 41 11 41 + 12 41 + 13 41 + 17 41 18 41 + 19 41 + 1a 41 + 1e 41 1f 41 + 20 41 + 21 41 + 25 41 + 26 41 27 41 + 28 41 + 29 41 + 2d 41 + 2e 41 2f 41 + 30 41 + 31 41 + 35 41 + 36 41 37 41 + 38 41 + 39 41 + 3e 41 + 3f 41 40 41 + 41 41 + 42 41 + 47 41 + 48 41 49 41 + 4a 41 + 4b 41 4d 41 + 4e 41 + 4f 41 51 42 } method ' (Ljava/lang/Character;Ljava/lang/Double;Ljava/lang/Float;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Short;Ljava/lang/Byte;Ljava/lang/Boolean;)V' { 4 45 + 5 45 + 6 45 7 45 + 8 45 + 10 45 + 11 45 + 15 45 + 16 45 + 1a 45 + 1b 45 + 1f 45 + 20 45 + 24 45 + 25 45 + 29 45 + 2e 45 + 33 45 35 45 + 36 45 + 37 45 39 46 } method 'printBoolean (Z)V' { 0 49 + 1 49 + 2 49 3 49 + 4 49 + b 49 c 49 + d 49 + e 49 10 49 + 11 49 + 12 49 14 50 } method 'printByte (B)V' { 0 53 + 1 53 + 2 53 3 53 + 4 53 + b 53 c 53 + d 53 + e 53 10 53 + 11 53 + 12 53 14 54 } method 'printShort (S)V' { 0 57 + 1 57 + 2 57 3 57 + 4 57 + b 57 c 57 + d 57 + e 57 10 57 + 11 57 + 12 57 14 58 } method 'printInt (I)V' { 0 61 + 1 61 + 2 61 3 61 + 4 61 + b 61 c 61 + d 61 + e 61 10 61 + 11 61 + 12 61 14 62 } method 'printLong (J)V' { 0 65 + 1 65 + 2 65 3 65 + 4 65 + b 65 c 65 + d 65 + e 65 10 65 + 11 65 + 12 65 14 66 } method 'printFloat (F)V' { 0 69 + 1 69 + 2 69 3 69 + 4 69 + b 69 c 69 + d 69 + e 69 10 69 + 11 69 + 12 69 14 70 } method 'printDouble (D)V' { 0 73 + 1 73 + 2 73 3 73 + 4 73 + b 73 c 73 + d 73 + e 73 10 73 + 11 73 + 12 73 14 74 } method 'printChar (C)V' { 0 77 + 1 77 + 2 77 3 77 + 4 77 + b 77 c 77 + d 77 + e 77 10 77 + 11 77 + 12 77 14 78 } method 'printBooleanBoxed (Ljava/lang/Boolean;)V' { 0 81 + 1 81 + 2 81 3 81 + 4 81 + b 81 d 81 + e 81 + f 81 11 82 } method 'printByteBoxed (Ljava/lang/Byte;)V' { 0 85 + 1 85 + 2 85 3 85 + 4 85 + b 85 d 85 + e 85 + f 85 11 86 } method 'printShortBoxed (Ljava/lang/Short;)V' { 0 89 + 1 89 + 2 89 3 89 + 4 89 + b 89 d 89 + e 89 + f 89 11 90 } method 'printIntBoxed (Ljava/lang/Integer;)V' { 0 93 + 1 93 + 2 93 3 93 + 4 93 + b 93 d 93 + e 93 + f 93 11 94 } method 'printLongBoxed (Ljava/lang/Long;)V' { 0 97 + 1 97 + 2 97 3 97 + 4 97 + b 97 d 97 + e 97 + f 97 11 98 } method 'printFloatBoxed (Ljava/lang/Float;)V' { 0 101 + 1 101 + 2 101 3 101 + 4 101 + b 101 d 101 + e 101 + f 101 11 102 } method 'printDoubleBoxed (Ljava/lang/Double;)V' { 0 105 + 1 105 + 2 105 3 105 + 4 105 + b 105 d 105 + e 105 + f 105 11 106 } method 'printCharBoxed (Ljava/lang/Character;)V' { 0 109 + 1 109 + 2 109 3 109 + 4 109 + b 109 d 109 + e 109 + f 109 11 110 } @@ -495,38 +879,60 @@ class 'pkg/TestPrimitives' { method 'getByte ()B' { 0 117 + 1 117 2 117 } method 'getShort ()S' { 0 121 + 1 121 + 2 121 3 121 } method 'getInt ()I' { 0 125 + 1 125 2 125 } method 'getInteger ()Ljava/lang/Integer;' { 0 129 + 1 129 2 129 + 3 129 + 4 129 5 129 } method 'getCharacter ()Ljava/lang/Character;' { 0 133 + 1 133 2 133 + 3 133 + 4 133 5 133 } method 'printNarrowed ()V' { + 0 137 + 1 137 2 137 + 3 137 + 4 137 5 137 6 137 + 7 137 + 8 137 + 9 138 + a 138 b 138 + c 138 + d 138 e 138 f 138 + 10 138 + 11 138 12 139 } @@ -536,58 +942,92 @@ class 'pkg/TestPrimitives' { } method 'compare (C)Z' { + 0 146 1 146 2 146 a 146 + b 147 c 147 14 147 + 15 148 16 148 17 148 1f 148 + 20 149 21 149 + 22 149 23 149 2b 149 + 2c 150 2d 150 + 2e 150 2f 150 37 150 + 38 151 39 151 + 3a 151 3b 151 43 151 + 44 152 45 152 + 46 152 47 152 4f 152 + 50 153 51 153 + 52 153 53 153 5b 153 + 5c 154 5d 154 + 5e 154 5f 154 67 154 + 68 155 69 155 + 6a 155 6b 155 73 155 + 74 156 75 156 + 76 156 77 156 7f 156 + 80 157 81 157 + 82 157 83 157 8b 157 + 8c 158 8d 158 + 8e 158 + 8f 158 90 158 98 158 + 99 159 9a 159 } method 'testAutoBoxingCallRequired (Z)V' { + 0 163 1 163 + 2 163 + 3 163 4 163 + 5 163 + 6 163 8 164 } method 'testCastRequired ()V' { 7 167 + 8 168 9 168 + a 168 b 168 f 168 + 10 168 + 11 168 13 169 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestPrivateEmptyConstructor.dec b/plugins/java-decompiler/engine/testData/results/TestPrivateEmptyConstructor.dec index 3f866b176310..1fe45197f7ab 100644 --- a/plugins/java-decompiler/engine/testData/results/TestPrivateEmptyConstructor.dec +++ b/plugins/java-decompiler/engine/testData/results/TestPrivateEmptyConstructor.dec @@ -16,8 +16,13 @@ class 'pkg/TestPrivateEmptyConstructor' { method 'test ()V' { 0 7 + 1 7 + 2 7 3 7 + 4 7 5 7 + 6 7 + 7 7 8 8 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestRecordAnno.dec b/plugins/java-decompiler/engine/testData/results/TestRecordAnno.dec index d5cab364d6e7..b3f8f73b13fe 100644 --- a/plugins/java-decompiler/engine/testData/results/TestRecordAnno.dec +++ b/plugins/java-decompiler/engine/testData/results/TestRecordAnno.dec @@ -18,18 +18,32 @@ public record TestRecordAnno(@RC @TA int x, int y) { class 'records/TestRecordAnno' { method ' (II)V' { + 4 4 + 5 4 6 4 + 7 4 + 8 4 + 9 5 + a 5 b 5 + c 5 + d 5 e 6 } method 'x ()I' { + 0 9 1 9 + 2 9 + 3 9 4 9 } method 'y ()I' { + 0 14 1 14 + 2 14 + 3 14 4 14 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestRecordGenericVararg.dec b/plugins/java-decompiler/engine/testData/results/TestRecordGenericVararg.dec index 1d417b46e775..54f9c5b05d82 100644 --- a/plugins/java-decompiler/engine/testData/results/TestRecordGenericVararg.dec +++ b/plugins/java-decompiler/engine/testData/results/TestRecordGenericVararg.dec @@ -18,18 +18,32 @@ public record TestRecordGenericVararg(T first, T... other) { class 'records/TestRecordGenericVararg' { method ' (Ljava/lang/Object;[Ljava/lang/Object;)V' { + 4 5 + 5 5 6 5 + 7 5 + 8 5 + 9 6 + a 6 b 6 + c 6 + d 6 e 7 } method 'first ()Ljava/lang/Object;' { + 0 10 1 10 + 2 10 + 3 10 4 10 } method 'other ()[Ljava/lang/Object;' { + 0 14 1 14 + 2 14 + 3 14 4 14 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestRecordSimple.dec b/plugins/java-decompiler/engine/testData/results/TestRecordSimple.dec index 222805f4a5e7..62e718067bcc 100644 --- a/plugins/java-decompiler/engine/testData/results/TestRecordSimple.dec +++ b/plugins/java-decompiler/engine/testData/results/TestRecordSimple.dec @@ -17,18 +17,32 @@ public record TestRecordSimple(int x, int y) { class 'records/TestRecordSimple' { method ' (II)V' { + 4 4 + 5 4 6 4 + 7 4 + 8 4 + 9 5 + a 5 b 5 + c 5 + d 5 e 6 } method 'x ()I' { + 0 9 1 9 + 2 9 + 3 9 4 9 } method 'y ()I' { + 0 13 1 13 + 2 13 + 3 13 4 13 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestRecordVararg.dec b/plugins/java-decompiler/engine/testData/results/TestRecordVararg.dec index 850ed3843326..d099f81f8836 100644 --- a/plugins/java-decompiler/engine/testData/results/TestRecordVararg.dec +++ b/plugins/java-decompiler/engine/testData/results/TestRecordVararg.dec @@ -17,18 +17,32 @@ public record TestRecordVararg(int x, int[]... y) { class 'records/TestRecordVararg' { method ' (I[[I)V' { + 4 4 + 5 4 6 4 + 7 4 + 8 4 + 9 5 + a 5 b 5 + c 5 + d 5 e 6 } method 'x ()I' { + 0 9 1 9 + 2 9 + 3 9 4 9 } method 'y ()[[I' { + 0 13 1 13 + 2 13 + 3 13 4 13 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestSimpleInstanceOfRecordPatternJavac.dec b/plugins/java-decompiler/engine/testData/results/TestSimpleInstanceOfRecordPatternJavac.dec index 0fc383b23305..d6f49984c4f3 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSimpleInstanceOfRecordPatternJavac.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSimpleInstanceOfRecordPatternJavac.dec @@ -5,12 +5,12 @@ public class TestSimpleInstanceOfRecordPatternJavac { }// 6 public static void instanceOfTest1(Object o) { - if (o instanceof R(Object s1)) {// 9 + if (o instanceof R(Object s1)) { System.out.println(s1);// 10 } System.out.println("1");// 12 - } + }// 9 public static void tryInstanceOfTest1(Object o) { int a = 1;// 16 @@ -29,16 +29,16 @@ public class TestSimpleInstanceOfRecordPatternJavac { public static void negativeInstanceOfTest1(Object o) { if (o instanceof R(Object s1)) {// 29 - if (s1.hashCode() == 1) {// 31 + if (s1.hashCode() == 1) {// 30 31 System.out.println(s1);// 32 System.out.println("1");// 33 } } - }// 30 35 + }// 35 public static void instanceOfTest2(Object o) { - if (o instanceof R(String s1)) {// 38 + if (o instanceof R(String s1)) { System.out.println(s1);// 39 if (s1.hashCode() == 1) {// 40 System.out.println("1");// 41 @@ -46,10 +46,10 @@ public class TestSimpleInstanceOfRecordPatternJavac { } System.out.println("5");// 44 - } + }// 38 public static void instanceOfTest3(Object o) { - if (o instanceof R(String s1)) {// 48 + if (o instanceof R(String s1)) { if (s1.isEmpty()) {// 49 System.out.println("111");// 50 System.out.println("111");// 51 @@ -60,10 +60,10 @@ public class TestSimpleInstanceOfRecordPatternJavac { System.out.println("s222222222222");// 56 System.out.println("s222222222222");// 57 - } + }// 48 public static void instanceOfTest4(Object o) { - if (o.hashCode() == 1 && o instanceof R(String s1)) {// 61 62 + if (o.hashCode() == 1 && o instanceof R(String s1)) {// 61 if (o instanceof R(String var4)) {// 63 if (s1.isEmpty()) {// 64 System.out.println("111");// 65 @@ -76,43 +76,43 @@ public class TestSimpleInstanceOfRecordPatternJavac { System.out.println("s222222222222");// 73 System.out.println("s222222222222");// 74 - } + }// 62 public static void instanceOfTestDouble1(Object o, Object o2) { if (o instanceof R(Object r)) {// 78 System.out.println(r);// 79 } - if (o2 instanceof R(Object r)) {// 82 + if (o2 instanceof R(Object r)) { System.out.println(r);// 83 } System.out.println("s2222222");// 85 - } + }// 82 public static void instanceOfTestDouble2(Object o, Object o2) { if (o instanceof R(Object s1)) {// 89 System.out.println(s1);// 90 } - if (o2 instanceof R(String r)) {// 93 + if (o2 instanceof R(String r)) { System.out.println(r);// 94 } System.out.println("2222222");// 96 - } + }// 93 public static void instanceOfTestDoubleNegate2(Object o, Object o2) { if (o instanceof R(Object s1)) {// 100 - System.out.println(s1);// 103 + System.out.println(s1);// 101 103 if (o2 instanceof R(String r)) {// 105 - System.out.println(r);// 108 + System.out.println(r);// 106 108 System.out.println("2222222");// 110 return; } } - }// 101 106 + } static record R(Object o) { R(Object o) { @@ -131,181 +131,469 @@ class 'pkg/TestSimpleInstanceOfRecordPatternJavac' { } method 'instanceOfTest1 (Ljava/lang/Object;)V' { + 0 7 1 7 + 2 7 + 3 7 4 7 13 8 + 14 8 + 15 8 + 16 8 17 8 1a 11 + 1b 11 + 1c 11 1d 11 + 1e 11 1f 11 + 20 11 + 21 11 22 12 + 23 12 + 24 12 + 25 12 + 26 12 + 27 12 + 28 12 + 29 12 + 2a 12 + 2b 12 + 2c 12 + 2d 12 + 2e 12 + 2f 12 + 30 12 + 31 12 + 32 12 } method 'tryInstanceOfTest1 (Ljava/lang/Object;)V' { 0 15 1 15 + 2 18 3 18 + 4 18 + 5 18 6 18 22 19 39 21 + 3a 22 3b 22 + 3c 22 + 3d 22 3e 22 5b 23 6f 27 } method 'negativeInstanceOfTest1 (Ljava/lang/Object;)V' { + 0 30 1 30 + 2 30 + 3 30 4 30 - 16 37 + 13 31 + 14 31 + 15 31 + 16 31 17 31 18 31 + 19 31 + 1a 31 1b 31 1f 32 + 20 32 + 21 32 + 22 32 23 32 + 24 32 + 25 32 26 33 + 27 33 + 28 33 29 33 + 2a 33 2b 33 3f 37 } method 'instanceOfTest2 (Ljava/lang/Object;)V' { + 0 40 1 40 + 2 40 + 3 40 4 40 1d 41 + 1e 41 + 1f 41 + 20 41 21 41 + 22 41 + 23 41 + 24 42 25 42 + 26 42 + 27 42 28 42 29 42 2c 43 + 2d 43 + 2e 43 2f 43 + 30 43 31 43 34 47 + 35 47 + 36 47 37 47 + 38 47 39 47 + 3a 47 + 3b 47 3c 48 + 3d 48 + 3e 48 + 3f 48 + 40 48 + 41 48 + 42 48 + 43 48 + 44 48 + 45 48 + 46 48 + 47 48 + 48 48 + 49 48 + 4a 48 + 4b 48 + 4c 48 } method 'instanceOfTest3 (Ljava/lang/Object;)V' { + 0 51 1 51 + 2 51 + 3 51 4 51 + 1d 52 1e 52 + 1f 52 + 20 52 21 52 24 53 + 25 53 + 26 53 27 53 + 28 53 29 53 + 2a 53 + 2b 53 2c 54 + 2d 54 + 2e 54 2f 54 + 30 54 31 54 + 32 54 + 33 54 34 55 + 35 55 + 36 55 37 55 + 38 55 39 55 + 3a 55 + 3b 55 3c 56 + 3d 56 + 3e 56 3f 56 + 40 56 41 56 44 60 + 45 60 + 46 60 47 60 + 48 60 49 60 + 4a 60 + 4b 60 4c 61 + 4d 61 + 4e 61 4f 61 + 50 61 51 61 + 52 61 + 53 61 54 62 + 55 62 + 56 62 + 57 62 + 58 62 + 59 62 + 5a 62 + 5b 62 + 5c 62 + 5d 62 + 5e 62 + 5f 62 + 60 62 + 61 62 + 62 62 + 63 62 + 64 62 } method 'instanceOfTest4 (Ljava/lang/Object;)V' { + 0 65 1 65 + 2 65 + 3 65 4 65 5 65 + 8 65 9 65 + a 65 + b 65 c 65 + 25 66 26 66 + 27 66 + 28 66 29 66 + 46 67 47 67 + 48 67 + 49 67 4a 67 4d 68 + 4e 68 + 4f 68 50 68 + 51 68 52 68 + 53 68 + 54 68 55 69 + 56 69 + 57 69 58 69 + 59 69 5a 69 + 5b 69 + 5c 69 5d 70 + 5e 70 + 5f 70 60 70 + 61 70 62 70 + 63 70 + 64 70 65 71 + 66 71 + 67 71 68 71 + 69 71 6a 71 6d 76 + 6e 76 + 6f 76 70 76 + 71 76 72 76 + 73 76 + 74 76 75 77 + 76 77 + 77 77 78 77 + 79 77 7a 77 + 7b 77 + 7c 77 7d 78 + 7e 78 + 7f 78 + 80 78 + 81 78 + 82 78 + 83 78 + 84 78 + 85 78 + 86 78 + 87 78 + 88 78 + 89 78 + 8a 78 + 8b 78 + 8c 78 + 8d 78 } method 'instanceOfTestDouble1 (Ljava/lang/Object;Ljava/lang/Object;)V' { + 0 81 1 81 + 2 81 + 3 81 4 81 15 82 + 16 82 + 17 82 + 18 82 19 82 + 1c 85 1d 85 + 1e 85 + 1f 85 20 85 31 86 + 32 86 + 33 86 + 34 86 35 86 38 89 + 39 89 + 3a 89 3b 89 + 3c 89 3d 89 + 3e 89 + 3f 89 40 90 + 41 90 + 42 90 + 43 90 + 44 90 + 45 90 + 46 90 + 47 90 + 48 90 + 49 90 + 4a 90 + 4b 90 + 4c 90 + 4d 90 + 4e 90 + 4f 90 + 50 90 } method 'instanceOfTestDouble2 (Ljava/lang/Object;Ljava/lang/Object;)V' { + 0 93 1 93 + 2 93 + 3 93 4 93 15 94 + 16 94 + 17 94 + 18 94 19 94 + 1c 97 1d 97 + 1e 97 + 1f 97 20 97 3c 98 + 3d 98 + 3e 98 + 3f 98 40 98 43 101 + 44 101 + 45 101 46 101 + 47 101 48 101 + 49 101 + 4a 101 4b 102 + 4c 102 + 4d 102 + 4e 102 + 4f 102 + 50 102 + 51 102 + 52 102 + 53 102 + 54 102 + 55 102 + 56 102 + 57 102 + 58 102 + 59 102 + 5a 102 + 5b 102 } method 'instanceOfTestDoubleNegate2 (Ljava/lang/Object;Ljava/lang/Object;)V' { + 0 105 1 105 + 2 105 + 3 105 4 105 15 106 - 18 114 + 16 106 + 17 106 + 18 106 + 19 106 + 1a 106 + 1b 106 1c 106 + 1d 107 + 1e 107 + 1f 107 20 107 21 107 + 22 107 + 23 107 42 108 - 45 114 + 43 108 + 44 108 + 45 108 + 46 108 + 47 108 + 48 108 49 108 4a 109 + 4b 109 + 4c 109 4d 109 + 4e 109 + 4f 109 50 109 + 51 109 52 110 + 53 110 + 54 110 } } class 'pkg/TestSimpleInstanceOfRecordPatternJavac$R' { method ' (Ljava/lang/Object;)V' { + 4 118 + 5 118 6 118 + 7 118 + 8 118 9 119 } method 'o ()Ljava/lang/Object;' { + 0 122 1 122 + 2 122 + 3 122 4 122 } } Lines mapping: 6 <-> 5 -9 <-> 8 +9 <-> 13 10 <-> 9 12 <-> 12 16 <-> 16 @@ -316,17 +604,17 @@ Lines mapping: 23 <-> 24 26 <-> 28 29 <-> 31 -30 <-> 38 +30 <-> 32 31 <-> 32 32 <-> 33 33 <-> 34 35 <-> 38 -38 <-> 41 +38 <-> 49 39 <-> 42 40 <-> 43 41 <-> 44 44 <-> 48 -48 <-> 52 +48 <-> 63 49 <-> 53 50 <-> 54 51 <-> 55 @@ -335,7 +623,7 @@ Lines mapping: 56 <-> 61 57 <-> 62 61 <-> 66 -62 <-> 66 +62 <-> 79 63 <-> 67 64 <-> 68 65 <-> 69 @@ -346,19 +634,19 @@ Lines mapping: 74 <-> 78 78 <-> 82 79 <-> 83 -82 <-> 86 +82 <-> 91 83 <-> 87 85 <-> 90 89 <-> 94 90 <-> 95 -93 <-> 98 +93 <-> 103 94 <-> 99 96 <-> 102 100 <-> 106 -101 <-> 115 +101 <-> 107 103 <-> 107 105 <-> 108 -106 <-> 115 +106 <-> 109 108 <-> 109 110 <-> 110 113 <-> 123 diff --git a/plugins/java-decompiler/engine/testData/results/TestSuspendLambdaKt.dec b/plugins/java-decompiler/engine/testData/results/TestSuspendLambdaKt.dec index 07278333b7dd..7117d073bc29 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSuspendLambdaKt.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSuspendLambdaKt.dec @@ -88,13 +88,19 @@ public final class TestSuspendLambdaKt { class 'pkg/TestSuspendLambdaKt' { method 'getSl1 ()Lkotlin/jvm/functions/Function1;' { 0 27 + 1 27 + 2 27 3 27 } method ' ()V' { 4 83 8 83 + 9 83 + a 83 b 83 + c 83 + d 83 e 84 } } @@ -102,43 +108,85 @@ class 'pkg/TestSuspendLambdaKt' { class 'pkg/TestSuspendLambdaKt$sl1$1' { method 'invokeSuspend (Ljava/lang/Object;)Ljava/lang/Object;' { 0 52 + 1 52 + 2 52 3 52 + 4 53 5 53 + 6 53 + 7 53 8 53 + 1c 55 1e 55 + 1f 55 + 20 55 21 55 24 56 + 25 56 + 26 56 27 56 + 28 56 + 29 56 2a 56 2c 59 + 2d 59 2e 59 2f 60 + 30 60 + 31 60 + 32 60 33 60 + 34 60 + 35 60 36 61 + 37 61 + 38 61 39 61 3e 63 + 3f 63 43 63 } method ' (Lkotlin/coroutines/Continuation;)V' { 1 68 + 2 68 3 68 + 4 68 + 5 68 6 69 } method 'create (Lkotlin/coroutines/Continuation;)Lkotlin/coroutines/Continuation;' { + 0 73 1 73 + 2 73 3 73 + 4 73 + 5 73 + a 74 e 74 + f 75 10 75 } method 'invoke (Ljava/lang/Object;)Ljava/lang/Object;' { + 0 79 + 1 79 2 79 + 3 79 + 4 79 5 79 + 6 79 + 7 79 8 79 + 9 79 + a 79 b 79 + c 79 + d 79 e 79 + f 79 + 10 79 11 79 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesEcj.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesEcj.dec index ccfead937b71..faa1b7ab9cac 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesEcj.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesEcj.dec @@ -42,61 +42,137 @@ public class TestSwitchClassReferencesEcj { class 'pkg/TestSwitchClassReferencesEcj' { method 'testObject (Ljava/lang/Object;)V' { + 0 4 10 4 + 30 5 31 5 + 32 5 + 33 5 34 5 + 35 5 36 5 + 37 5 + 38 5 + 40 6 + 41 6 42 6 + 43 6 + 44 6 45 6 + 46 6 47 6 + 48 6 + 49 6 50 7 + 51 7 + 52 7 54 7 57 10 } method 'testObject2 (Ljava/lang/Object;)V' { + 0 13 b 13 + 2c 15 2d 15 + 2e 15 + 2f 15 30 15 + 31 15 32 15 + 33 15 + 34 15 + 3c 16 + 3d 16 3e 16 + 3f 16 + 40 16 41 16 + 42 16 43 16 + 44 16 + 45 16 4c 17 + 4d 17 + 4e 17 50 17 + 51 17 + 52 17 56 14 + 57 14 + 58 14 59 14 + 5a 14 5b 14 5e 20 } method 'testObject3 (Ljava/lang/Object;)V' { + 0 23 b 23 + 28 25 29 25 + 2a 25 + 2b 25 2c 25 + 2d 25 2e 25 + 2f 25 + 30 25 + 38 26 + 39 26 3a 26 + 3b 26 + 3c 26 3d 26 + 3e 26 3f 26 + 40 26 + 41 26 45 24 + 46 24 + 47 24 48 24 + 49 24 4a 24 + 4b 24 + 4c 24 50 27 + 51 27 + 52 27 53 27 + 54 27 55 27 58 30 } method 'testObject4 (Ljava/lang/Object;)V' { + 0 33 10 33 + 2c 34 2d 34 + 2e 34 + 2f 34 30 34 + 31 34 32 34 + 33 34 + 34 34 + 3c 35 + 3d 35 3e 35 + 3f 35 + 40 35 41 35 + 42 35 43 35 + 44 35 + 45 35 49 36 + 4a 36 + 4b 36 4c 36 + 4d 36 4e 36 51 39 } diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesFastExitEcj.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesFastExitEcj.dec index d15abac2e67f..51a1f0a4047e 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesFastExitEcj.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesFastExitEcj.dec @@ -8,17 +8,17 @@ public class TestSwitchClassReferencesFastExitEcj { while(i < o.hashCode()) { switch (o) {// 8 - case String var4: + case String var4:// 9 System.out.println("s");// 10 System.exit(0);// 11 - ++i;// 12 + ++i;// 12 13 14 15 16 17 18 break;// 7 case Integer var5: - System.out.println("ii");// 14 - continue label16;// 15 + System.out.println("ii"); + continue label16; default: - System.out.println("s");// 17 - return;// 18 + System.out.println("s"); + return;// 6 } } } @@ -31,17 +31,17 @@ public class TestSwitchClassReferencesFastExitEcj { while(i < o.hashCode()) { switch (o) {// 28 - case String var4: + case String var4:// 29 System.out.println("s");// 30 System.exit(0);// 31 - ++i;// 32 + ++i;// 32 34 35 36 38 39 40 break;// 27 case Integer var5: - System.out.println("ii");// 35 - continue label16;// 36 + System.out.println("ii"); + continue label16; default: - System.out.println("s");// 39 - return;// 40 + System.out.println("s"); + return;// 26 } } } @@ -52,77 +52,169 @@ class 'pkg/TestSwitchClassReferencesFastExitEcj' { method 'testObject (Ljava/lang/Object;)V' { 0 6 1 6 + 5 9 15 9 + 34 10 + 35 10 36 11 + 37 11 + 38 11 39 11 + 3a 11 3b 11 + 3c 11 + 3d 11 3e 12 3f 12 + 40 12 + 41 12 42 13 - 4b 16 - 4e 16 - 50 16 - 53 17 - 59 19 - 5c 19 - 5e 19 - 61 20 + 43 13 + 44 13 + 45 13 + 46 13 + 47 13 + 48 13 + 49 13 + 4a 13 + 4b 13 + 4c 13 + 4d 13 + 4e 13 + 4f 13 + 50 13 + 51 13 + 52 13 + 53 13 + 54 13 + 55 13 + 56 13 + 57 13 + 58 13 + 59 13 + 5a 13 + 5b 13 + 5c 13 + 5d 13 + 5e 13 + 5f 13 + 60 13 + 61 13 + 62 13 + 63 13 64 14 + 65 20 + 66 20 + 67 8 + 68 8 69 8 + 6a 8 + 6b 8 6c 8 + 6d 20 + 6e 20 + 6f 20 + 70 20 + 71 20 } method 'testObject2 (Ljava/lang/Object;)V' { 0 29 1 29 + 5 32 15 32 + 34 33 + 35 33 36 34 + 37 34 + 38 34 39 34 + 3a 34 3b 34 + 3c 34 + 3d 34 3e 35 3f 35 + 40 35 + 41 35 42 36 - 4b 39 - 4e 39 - 50 39 - 53 40 - 59 42 - 5c 42 - 5e 42 - 61 43 + 43 36 + 44 36 + 45 36 + 46 36 + 47 36 + 48 36 + 49 36 + 4a 36 + 4b 36 + 4c 36 + 4d 36 + 4e 36 + 4f 36 + 50 36 + 51 36 + 52 36 + 53 36 + 54 36 + 55 36 + 56 36 + 57 36 + 58 36 + 59 36 + 5a 36 + 5b 36 + 5c 36 + 5d 36 + 5e 36 + 5f 36 + 60 36 + 61 36 + 62 36 + 63 36 64 37 + 65 43 + 66 43 + 67 31 + 68 31 69 31 + 6a 31 + 6b 31 6c 31 + 6d 43 + 6e 43 + 6f 43 + 70 43 + 71 43 } } Lines mapping: +6 <-> 21 7 <-> 15 8 <-> 10 +9 <-> 11 10 <-> 12 11 <-> 13 12 <-> 14 -14 <-> 17 -15 <-> 18 -17 <-> 20 -18 <-> 21 +13 <-> 14 +14 <-> 14 +15 <-> 14 +16 <-> 14 +17 <-> 14 +18 <-> 14 +26 <-> 44 27 <-> 38 28 <-> 33 +29 <-> 34 30 <-> 35 31 <-> 36 32 <-> 37 -35 <-> 40 -36 <-> 41 -39 <-> 43 -40 <-> 44 +34 <-> 37 +35 <-> 37 +36 <-> 37 +38 <-> 37 +39 <-> 37 +40 <-> 37 Not mapped: -6 -9 -13 -16 22 -26 -29 -34 -38 45 diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesFastExitJavac.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesFastExitJavac.dec index 492593cbbc81..2886515a6eb6 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesFastExitJavac.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesFastExitJavac.dec @@ -4,21 +4,21 @@ public class TestSwitchClassReferencesFastExitJavac { public static void testObject(Object o) { label15: while(true) { - int i = 0;// 8 + int i = 0; while(i < o.hashCode()) { switch (o) {// 9 - case String var4: + case String var4:// 10 System.out.println("s");// 11 System.exit(0);// 12 - ++i;// 13 + ++i;// 13 14 15 16 17 18 19 break; case Integer var5: - System.out.println("ii");// 15 - continue label15;// 16 + System.out.println("ii"); + continue label15; default: - System.out.println("s");// 18 - return;// 19 + System.out.println("s"); + return;// 8 } } } @@ -27,21 +27,21 @@ public class TestSwitchClassReferencesFastExitJavac { public static void testObject2(Object o) { label15: while(true) { - int i = 0;// 28 + int i = 0; while(i < o.hashCode()) { switch (o) {// 29 - case String var4: + case String var4:// 30 System.out.println("s");// 31 System.exit(0);// 32 - ++i;// 33 + ++i;// 33 35 36 37 39 40 41 break; case Integer var5: - System.out.println("ii");// 36 - continue label15;// 37 + System.out.println("ii"); + continue label15; default: - System.out.println("s");// 40 - return;// 41 + System.out.println("s"); + return;// 28 } } } @@ -52,75 +52,169 @@ class 'pkg/TestSwitchClassReferencesFastExitJavac' { method 'testObject (Ljava/lang/Object;)V' { 0 6 1 6 + 2 8 + 3 8 4 8 + 5 8 + 6 8 7 8 + a 9 1a 9 + 38 10 + 39 10 3a 11 + 3b 11 + 3c 11 3d 11 + 3e 11 3f 11 + 40 11 + 41 11 42 12 43 12 + 44 12 + 45 12 46 13 - 4f 16 - 52 16 - 54 16 - 57 17 - 5d 19 - 60 19 - 62 19 - 65 20 + 47 13 + 48 13 + 49 13 + 4a 13 + 4b 13 + 4c 13 + 4d 13 + 4e 13 + 4f 13 + 50 13 + 51 13 + 52 13 + 53 13 + 54 13 + 55 13 + 56 13 + 57 13 + 58 13 + 59 13 + 5a 13 + 5b 13 + 5c 13 + 5d 13 + 5e 13 + 5f 13 + 60 13 + 61 13 + 62 13 + 63 13 + 64 13 + 65 13 + 66 13 + 67 13 + 68 20 + 69 20 + 6a 20 6b 14 + 6c 20 + 6d 20 + 6e 20 + 6f 20 + 70 20 } method 'testObject2 (Ljava/lang/Object;)V' { 0 29 1 29 + 2 31 + 3 31 4 31 + 5 31 + 6 31 7 31 + a 32 1a 32 + 38 33 + 39 33 3a 34 + 3b 34 + 3c 34 3d 34 + 3e 34 3f 34 + 40 34 + 41 34 42 35 43 35 + 44 35 + 45 35 46 36 - 4f 39 - 52 39 - 54 39 - 57 40 - 5d 42 - 60 42 - 62 42 - 65 43 + 47 36 + 48 36 + 49 36 + 4a 36 + 4b 36 + 4c 36 + 4d 36 + 4e 36 + 4f 36 + 50 36 + 51 36 + 52 36 + 53 36 + 54 36 + 55 36 + 56 36 + 57 36 + 58 36 + 59 36 + 5a 36 + 5b 36 + 5c 36 + 5d 36 + 5e 36 + 5f 36 + 60 36 + 61 36 + 62 36 + 63 36 + 64 36 + 65 36 + 66 36 + 67 36 + 68 43 + 69 43 + 6a 43 6b 37 + 6c 43 + 6d 43 + 6e 43 + 6f 43 + 70 43 } } Lines mapping: -8 <-> 7 +8 <-> 21 9 <-> 10 +10 <-> 11 11 <-> 12 12 <-> 13 13 <-> 14 -15 <-> 17 -16 <-> 18 -18 <-> 20 -19 <-> 21 -28 <-> 30 +14 <-> 14 +15 <-> 14 +16 <-> 14 +17 <-> 14 +18 <-> 14 +19 <-> 14 +28 <-> 44 29 <-> 33 +30 <-> 34 31 <-> 35 32 <-> 36 33 <-> 37 -36 <-> 40 -37 <-> 41 -40 <-> 43 -41 <-> 44 +35 <-> 37 +36 <-> 37 +37 <-> 37 +39 <-> 37 +40 <-> 37 +41 <-> 37 Not mapped: -10 -14 -17 23 -30 -35 -39 46 diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesJavac.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesJavac.dec index fa515acf045f..015a09dcdd09 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesJavac.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchClassReferencesJavac.dec @@ -42,61 +42,137 @@ public class TestSwitchClassReferencesJavac { class 'pkg/TestSwitchClassReferencesJavac' { method 'testObject (Ljava/lang/Object;)V' { + 0 4 10 4 + 30 5 31 5 + 32 5 + 33 5 34 5 + 35 5 36 5 + 37 5 + 38 5 + 40 6 + 41 6 42 6 + 43 6 + 44 6 45 6 + 46 6 47 6 + 48 6 + 49 6 50 7 + 51 7 + 52 7 54 7 57 10 } method 'testObject2 (Ljava/lang/Object;)V' { + 0 13 b 13 + 36 15 37 15 + 38 15 + 39 15 3a 15 + 3b 15 3c 15 + 3d 15 + 3e 15 + 46 16 + 47 16 48 16 + 49 16 + 4a 16 4b 16 + 4c 16 4d 16 + 4e 16 + 4f 16 56 17 + 57 17 + 58 17 5a 17 + 5b 17 + 5c 17 60 14 + 61 14 + 62 14 63 14 + 64 14 65 14 68 20 } method 'testObject3 (Ljava/lang/Object;)V' { + 0 23 b 23 + 28 25 29 25 + 2a 25 + 2b 25 2c 25 + 2d 25 2e 25 + 2f 25 + 30 25 + 38 26 + 39 26 3a 26 + 3b 26 + 3c 26 3d 26 + 3e 26 3f 26 + 40 26 + 41 26 45 24 + 46 24 + 47 24 48 24 + 49 24 4a 24 + 4b 24 + 4c 24 50 27 + 51 27 + 52 27 53 27 + 54 27 55 27 58 30 } method 'testObject4 (Ljava/lang/Object;)V' { + 0 33 10 33 + 30 34 31 34 + 32 34 + 33 34 34 34 + 35 34 36 34 + 37 34 + 38 34 + 40 35 + 41 35 42 35 + 43 35 + 44 35 45 35 + 46 35 47 35 + 48 35 + 49 35 4d 36 + 4e 36 + 4f 36 50 36 + 51 36 52 36 55 39 } diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchGuarded2Javac.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchGuarded2Javac.dec index 17e83a351767..ce786a6e1611 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchGuarded2Javac.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchGuarded2Javac.dec @@ -81,7 +81,7 @@ public class TestSwitchGuarded2Javac { public static void testObject2(Object o) { switch (o) {// 72 - case Integer n: + case Integer n:// 73 if (n == 1) {// 74 System.out.println("2");// 75 } @@ -95,7 +95,7 @@ public class TestSwitchGuarded2Javac { System.out.println("2");// 82 switch (o) {// 83 - case Integer n: + case Integer n:// 84 if (n == 1) {// 85 System.out.println("1");// 86 } @@ -143,209 +143,469 @@ class 'pkg/TestSwitchGuarded2Javac' { method 'main ([Ljava/lang/String;)V' { 0 4 4 4 + 5 4 + 6 4 7 5 } method 'testObject0 (Ljava/lang/Object;)V' { 0 9 + 1 9 + 2 9 3 9 + 4 9 5 9 + 6 9 + 7 9 + 8 11 18 11 + 30 12 + 31 12 32 12 + 33 12 + 34 12 35 12 36 12 3e 13 + 3f 13 + 40 13 41 13 + 42 13 43 13 + 44 13 + 45 13 4d 14 51 16 + 52 16 + 53 16 + 54 16 55 16 + 56 16 + 57 16 58 17 + 59 17 + 5a 17 5b 17 + 5c 17 + 5d 17 5e 17 + 5f 17 6e 20 6f 21 + 70 21 + 71 21 72 21 + 73 21 74 21 82 23 + 83 23 84 23 + 85 23 + 86 23 87 23 + 88 23 8f 18 } method 'testObject1 (Ljava/lang/Object;)V' { 0 29 + 1 29 + 2 29 3 29 + 4 29 5 29 + 6 29 + 7 29 + 8 31 18 31 + 38 32 + 39 32 3a 32 + 3b 32 + 3c 32 3d 32 3e 32 + 46 33 47 33 + 48 33 + 49 33 4a 33 4b 33 4e 34 + 4f 34 + 50 34 51 34 + 52 34 53 34 56 37 + 57 37 + 58 37 59 37 5a 37 + 5b 37 + 5c 37 5d 38 + 5e 38 + 5f 38 60 38 61 38 + 62 38 + 63 38 64 39 + 6b 40 + 6c 40 + 6d 40 + 6e 40 6f 40 + 70 40 + 71 40 72 40 73 40 + 7b 41 + 7c 41 7d 41 + 7e 41 + 7f 41 80 41 81 41 84 42 + 85 42 + 86 42 87 42 + 88 42 89 42 + 8a 42 + 8b 42 + 93 45 + 94 45 + 95 45 + 96 45 97 45 + 98 45 + 99 45 9a 45 9b 45 a3 46 + a4 46 + a5 46 a6 46 + a7 46 a8 46 + a9 46 + aa 46 ab 47 b1 49 + b2 49 + b3 49 + b4 49 b5 49 + b6 49 + b7 49 b8 50 bb 53 + bc 53 + bd 53 be 53 + bf 53 c0 53 + c1 53 + c2 53 c3 54 + c4 54 + c5 54 c6 54 + c7 54 c8 54 + c9 54 + ca 54 + cb 56 db 56 + f8 57 + f9 57 fa 57 + fb 57 + fc 57 fd 57 fe 57 + 106 58 107 58 + 108 58 + 109 58 10a 58 10b 58 10e 59 + 10f 59 + 110 59 111 59 + 112 59 113 59 116 62 + 117 62 + 118 62 119 62 11a 62 + 11b 62 + 11c 62 11d 63 + 11e 63 + 11f 63 120 63 121 63 + 122 63 + 123 63 124 64 + 12b 65 + 12c 65 + 12d 65 + 12e 65 12f 65 + 130 65 + 131 65 132 65 133 65 + 13b 66 + 13c 66 13d 66 + 13e 66 + 13f 66 140 66 141 66 144 67 + 145 67 + 146 67 147 67 + 148 67 149 67 + 14a 67 + 14b 67 + 153 70 + 154 70 + 155 70 + 156 70 157 70 + 158 70 + 159 70 15a 70 15b 70 163 71 + 164 71 + 165 71 166 71 + 167 71 168 71 + 169 71 + 16a 71 16b 72 171 74 + 172 74 + 173 74 + 174 74 175 74 + 176 74 + 177 74 178 75 17b 78 + 17c 78 + 17d 78 17e 78 + 17f 78 180 78 + 181 78 + 182 78 183 79 } method 'testObject2 (Ljava/lang/Object;)V' { + 0 82 10 82 + 28 83 + 29 84 2a 84 + 2b 84 + 2c 84 2d 84 2e 84 31 85 + 32 85 + 33 85 34 85 + 35 85 36 85 39 88 + 3a 88 + 3b 88 3c 88 3d 88 + 3e 88 + 3f 88 40 89 + 41 89 + 42 89 43 89 44 89 + 45 89 + 46 89 47 90 4d 92 + 4e 92 + 4f 92 51 92 54 95 + 55 95 + 56 95 57 95 + 58 95 59 95 + 5a 95 + 5b 95 + 5c 96 6c 96 + 84 97 + 85 98 86 98 + 87 98 + 88 98 89 98 8a 98 8d 99 + 8e 99 + 8f 99 90 99 + 91 99 92 99 95 102 + 96 102 + 97 102 98 102 99 102 + 9a 102 + 9b 102 9c 103 + 9d 103 + 9e 103 9f 103 a0 103 + a1 103 + a2 103 a3 104 a9 106 + aa 106 + ab 106 ad 106 b0 109 + b1 109 + b2 109 b3 109 + b4 109 b5 109 + b6 109 + b7 109 b8 110 } method 'testObject3 (Ljava/lang/Object;)V' { 0 113 + 1 113 + 2 113 3 113 + 4 113 5 113 + 6 113 + 7 113 + 8 115 18 115 + 38 116 + 39 116 3a 116 + 3b 116 + 3c 116 3d 116 3e 116 + 46 117 47 117 + 48 117 + 49 117 4a 117 4b 117 4e 118 + 4f 118 + 50 118 51 118 + 52 118 53 118 56 121 + 57 121 + 58 121 59 121 5a 121 + 5b 121 + 5c 121 5d 122 + 5e 122 + 5f 122 60 122 61 122 + 62 122 + 63 122 64 123 + 6b 124 + 6c 124 + 6d 124 + 6e 124 6f 124 + 70 124 + 71 124 72 124 73 124 + 7b 125 + 7c 125 7d 125 + 7e 125 + 7f 125 80 125 81 125 84 126 + 85 126 + 86 126 87 126 + 88 126 89 126 + 8a 126 + 8b 126 + 93 129 + 94 129 + 95 129 + 96 129 97 129 + 98 129 + 99 129 9a 129 9b 129 a3 130 + a4 130 + a5 130 a6 130 + a7 130 a8 130 + a9 130 + aa 130 ab 131 b1 133 + b2 133 + b3 133 + b4 133 b5 133 + b6 133 + b7 133 b8 134 bb 137 + bc 137 + bd 137 be 137 + bf 137 c0 137 + c1 137 + c2 137 c3 138 } } @@ -398,6 +658,7 @@ Lines mapping: 67 <-> 79 68 <-> 80 72 <-> 83 +73 <-> 84 74 <-> 85 75 <-> 86 77 <-> 89 @@ -406,6 +667,7 @@ Lines mapping: 80 <-> 93 82 <-> 96 83 <-> 97 +84 <-> 98 85 <-> 99 86 <-> 100 88 <-> 103 @@ -433,5 +695,3 @@ Lines mapping: 117 <-> 139 Not mapped: 24 -73 -84 diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchGuardedEcj.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchGuardedEcj.dec index 3733e730152f..fb3827d14202 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchGuardedEcj.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchGuardedEcj.dec @@ -20,11 +20,11 @@ public class TestSwitchGuardedEcj { case String var3 when var3.isEmpty() && var3.getBytes().length == 2:// 21 System.out.println("empty s"); return;// 26 - case String var4: - System.out.println("s");// 22 + case String var4:// 22 + System.out.println("s"); return; - case Integer var5: - System.out.println("ii");// 23 + case Integer var5:// 23 + System.out.println("ii"); return; default: System.out.println(o);// 24 @@ -40,10 +40,10 @@ public class TestSwitchGuardedEcj { case String var3 when var3.isEmpty() && var3.getBytes().length == 2:// 32 System.out.println("empty s");// 33 break;// 34 - case String var4: + case String var4:// 35 System.out.println("s");// 36 continue label33;// 37 - case Integer var5: + case Integer var5:// 38 System.out.println("i");// 39 break;// 40 default: @@ -64,78 +64,183 @@ class 'pkg/TestSwitchGuardedEcj' { } method 'testObject (Ljava/lang/Object;)V' { + 0 7 10 7 + 34 8 + 35 8 36 8 + 37 8 + 38 8 + 3c 8 3d 8 + 3e 8 + 3f 8 40 8 41 8 42 8 4a 8 + 4b 8 + 4c 8 4d 8 + 4e 8 4f 8 + 50 8 + 51 8 + 59 9 + 5a 9 5b 9 + 5c 9 + 5d 9 5e 9 + 5f 9 60 9 + 61 9 + 62 9 + 6a 10 + 6b 10 6c 10 + 6d 10 + 6e 10 6f 10 + 70 10 71 10 + 72 10 + 73 10 7a 11 + 7b 11 + 7c 11 + 7d 11 7e 11 81 14 + 82 14 + 83 14 84 14 + 85 14 86 14 + 87 14 + 88 14 89 15 } method 'testObject2 (Ljava/lang/Object;)V' { + 0 18 10 18 + 34 19 + 35 19 36 19 + 37 19 + 38 19 + 3c 19 3d 19 + 3e 19 + 3f 19 40 19 41 19 42 19 4a 20 + 4b 20 + 4c 20 4d 20 + 4e 20 4f 20 + 50 20 + 51 20 + 59 22 + 5a 22 5b 23 + 5c 23 + 5d 23 5e 23 + 5f 23 60 23 + 61 23 + 62 23 + 6a 25 + 6b 25 6c 26 + 6d 26 + 6e 26 6f 26 + 70 26 71 26 + 72 26 + 73 26 7a 29 + 7b 29 + 7c 29 + 7d 29 7e 29 81 21 } method 'testObject3 (Ljava/lang/Object;)V' { + 3 38 13 38 + 34 39 + 35 39 36 39 + 37 39 + 38 39 + 3c 39 3d 39 + 3e 39 + 3f 39 40 39 41 39 42 39 4a 40 + 4b 40 + 4c 40 4d 40 + 4e 40 4f 40 + 50 40 + 51 40 52 41 + 59 42 + 5a 42 5b 43 + 5c 43 + 5d 43 5e 43 + 5f 43 60 43 + 61 43 + 62 43 63 44 + 6a 45 + 6b 45 6c 46 + 6d 46 + 6e 46 6f 46 + 70 46 71 46 + 72 46 + 73 46 74 47 7a 49 + 7b 49 + 7c 49 + 7d 49 7e 49 + 7f 49 + 80 49 81 50 + 84 37 85 37 + 86 37 + 87 37 88 37 89 37 8c 54 + 8d 54 + 8e 54 8f 54 + 90 54 91 54 + 92 54 + 93 54 94 55 } } @@ -151,8 +256,8 @@ Lines mapping: 17 <-> 16 20 <-> 19 21 <-> 20 -22 <-> 24 -23 <-> 27 +22 <-> 23 +23 <-> 26 24 <-> 30 26 <-> 22 30 <-> 38 @@ -160,8 +265,10 @@ Lines mapping: 32 <-> 40 33 <-> 41 34 <-> 42 +35 <-> 43 36 <-> 44 37 <-> 45 +38 <-> 46 39 <-> 47 40 <-> 48 42 <-> 50 @@ -169,6 +276,4 @@ Lines mapping: 47 <-> 55 48 <-> 56 Not mapped: -35 -38 41 diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchGuardedJavac.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchGuardedJavac.dec index 253d2ecefe74..1c15dcc448c3 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchGuardedJavac.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchGuardedJavac.dec @@ -17,14 +17,14 @@ public class TestSwitchGuardedJavac { public static void testObject2(Object o) { switch (o) {// 20 - case String var3 when var3.isEmpty() && var3.getBytes().length == 2: - System.out.println("empty s");// 21 + case String var3 when var3.isEmpty() && var3.getBytes().length == 2:// 21 + System.out.println("empty s"); return;// 26 - case String var4: - System.out.println("s");// 22 + case String var4:// 22 + System.out.println("s"); return; - case Integer var5: - System.out.println("ii");// 23 + case Integer var5:// 23 + System.out.println("ii"); return; default: System.out.println(o);// 24 @@ -40,10 +40,10 @@ public class TestSwitchGuardedJavac { case String var3 when var3.isEmpty() && var3.getBytes().length == 2:// 32 System.out.println("empty s");// 33 break;// 34 - case String var4: + case String var4:// 35 System.out.println("s");// 36 continue label33;// 37 - case Integer var5: + case Integer var5:// 38 System.out.println("i");// 39 break;// 40 default: @@ -64,78 +64,187 @@ class 'pkg/TestSwitchGuardedJavac' { } method 'testObject (Ljava/lang/Object;)V' { + 0 7 10 7 + 30 8 + 31 8 32 8 + 33 8 + 34 8 + 38 8 39 8 + 3a 8 + 3b 8 3c 8 3d 8 3e 8 46 8 + 47 8 + 48 8 49 8 + 4a 8 4b 8 + 4c 8 + 4d 8 + 55 9 + 56 9 57 9 + 58 9 + 59 9 5a 9 + 5b 9 5c 9 + 5d 9 + 5e 9 + 66 10 + 67 10 68 10 + 69 10 + 6a 10 6b 10 + 6c 10 6d 10 + 6e 10 + 6f 10 76 11 + 77 11 + 78 11 + 79 11 7a 11 + 7b 11 + 7c 11 80 14 + 81 14 + 82 14 83 14 + 84 14 85 14 + 86 14 + 87 14 88 15 } method 'testObject2 (Ljava/lang/Object;)V' { + 0 18 10 18 + 30 19 + 31 19 32 19 + 33 19 + 34 19 + 38 19 39 19 + 3a 19 + 3b 19 3c 19 3d 19 3e 19 46 20 + 47 20 + 48 20 49 20 + 4a 20 4b 20 + 4c 20 + 4d 20 + 55 22 + 56 22 57 23 + 58 23 + 59 23 5a 23 + 5b 23 5c 23 + 5d 23 + 5e 23 + 66 25 + 67 25 68 26 + 69 26 + 6a 26 6b 26 + 6c 26 6d 26 + 6e 26 + 6f 26 76 29 + 77 29 + 78 29 + 79 29 7a 29 + 7b 29 + 7c 29 80 21 } method 'testObject3 (Ljava/lang/Object;)V' { + 0 37 1 37 + 2 37 + 3 37 4 37 5 37 + 8 38 18 38 + 38 39 + 39 39 3a 39 + 3b 39 + 3c 39 + 40 39 41 39 + 42 39 + 43 39 44 39 45 39 46 39 4e 40 + 4f 40 + 50 40 51 40 + 52 40 53 40 + 54 40 + 55 40 56 41 + 5d 42 + 5e 42 5f 43 + 60 43 + 61 43 62 43 + 63 43 64 43 + 65 43 + 66 43 67 44 + 6e 45 + 6f 45 70 46 + 71 46 + 72 46 73 46 + 74 46 75 46 + 76 46 + 77 46 78 47 7e 49 + 7f 49 + 80 49 + 81 49 82 49 + 83 49 + 84 49 85 50 8b 54 + 8c 54 + 8d 54 8e 54 + 8f 54 90 54 + 91 54 + 92 54 93 55 } } @@ -150,9 +259,9 @@ Lines mapping: 16 <-> 15 17 <-> 16 20 <-> 19 -21 <-> 21 -22 <-> 24 -23 <-> 27 +21 <-> 20 +22 <-> 23 +23 <-> 26 24 <-> 30 26 <-> 22 30 <-> 38 @@ -160,8 +269,10 @@ Lines mapping: 32 <-> 40 33 <-> 41 34 <-> 42 +35 <-> 43 36 <-> 44 37 <-> 45 +38 <-> 46 39 <-> 47 40 <-> 48 42 <-> 50 @@ -169,7 +280,5 @@ Lines mapping: 47 <-> 55 48 <-> 56 Not mapped: -35 -38 41 45 diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchNestedDeconstructionsJavac.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchNestedDeconstructionsJavac.dec index 0cad429fb6ba..9fdad5d25b5a 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchNestedDeconstructionsJavac.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchNestedDeconstructionsJavac.dec @@ -55,7 +55,7 @@ public class TestSwitchNestedDeconstructionsJavac { } System.out.println("1");// 53 - } + }// 46 public static void testNestedLevel2(Object o) { switch (o) {// 57 @@ -107,11 +107,11 @@ public class TestSwitchNestedDeconstructionsJavac { switch (o) {// 94 case R1(R1(String var5)) when var5.hashCode() == 5 -> System.out.println("123456789");// 95 96 case R1(String var6) when var6.hashCode() == 3 -> System.out.println("3");// 98 99 - default -> System.out.println("3");// 101 + default -> System.out.println("3"); } System.out.println("1");// 103 - } + }// 101 public static void testDoubleLongCase(Object o) { switch (o) {// 107 @@ -141,8 +141,8 @@ public class TestSwitchNestedDeconstructionsJavac { } break; default: - System.out.println(o); - break;// 133 + System.out.println(o);// 133 + break; } switch (o) {// 136 @@ -191,10 +191,10 @@ public class TestSwitchNestedDeconstructionsJavac { System.out.println("10");// 171 172 return;// 180 case R2(String var8, Number var9): - System.out.println(o);// 174 175 + System.out.println(o);// 174 175 177 return; default: - System.out.println(o);// 177 + System.out.println(o); return; } } @@ -233,271 +233,700 @@ class 'pkg/TestSwitchNestedDeconstructionsJavac' { } method 'testNestedSwitches (Ljava/lang/Object;)V' { + 0 7 10 7 + 9b 8 + 9c 8 9d 8 + 9e 8 + 9f 8 a0 8 + a1 8 a2 8 + ab 9 + ac 9 ad 9 + ae 9 + af 9 b0 9 b1 9 b4 10 + b5 10 + b6 10 + b7 10 b8 10 + b9 10 + ba 10 + c5 14 + c6 14 c7 14 + c8 14 + c9 14 ca 14 cb 14 + d4 15 + d5 15 d6 15 + d7 15 + d8 15 d9 15 da 15 dd 16 + de 16 + df 16 + e0 16 e1 16 + e2 16 + e3 16 + eb 20 + ec 20 ed 20 + ee 20 + ef 20 f0 20 + f1 20 f2 20 + fb 21 + fc 21 fd 21 + fe 21 + ff 21 100 21 101 21 104 22 + 105 22 + 106 22 + 107 22 108 22 + 109 22 + 10a 22 + 122 26 + 123 26 124 26 + 125 26 + 126 26 127 26 + 128 26 129 26 + 132 27 + 133 27 134 27 + 135 27 + 136 27 137 27 138 27 13b 28 + 13c 28 + 13d 28 + 13e 28 13f 28 + 140 28 + 141 28 + 166 33 + 167 33 168 33 + 169 33 + 16a 33 16b 33 16c 33 16f 34 + 170 34 + 171 34 + 172 34 173 34 + 174 34 + 175 34 17c 39 + 17d 39 + 17e 39 + 17f 39 180 39 + 181 39 + 182 39 197 13 } method 'testStringString (Ljava/lang/Object;)V' { + 0 45 10 45 + 53 47 + 54 47 + 55 47 + 56 47 + 57 47 + 58 47 + 59 47 + 5a 47 5b 47 + 5c 47 5d 47 + 5e 47 + 5f 47 63 48 + 64 48 + 65 48 66 48 + 67 48 68 48 + 69 48 + 6a 48 6e 52 + 6f 52 + 70 52 71 52 + 72 52 73 52 + 74 52 + 75 52 76 53 79 56 + 7a 56 + 7b 56 7c 56 + 7d 56 7e 56 + 7f 56 + 80 56 81 57 + 82 57 + 83 57 + 84 57 + 85 57 + 86 57 + 87 57 + 88 57 + 89 57 + 8a 57 + 8b 57 + 8c 57 + 8d 57 + 8e 57 + 8f 57 + 90 57 + 91 57 } method 'testNestedLevel2 (Ljava/lang/Object;)V' { + 0 60 10 60 + 70 61 + 71 61 72 61 + 73 61 + 74 61 75 61 + 76 61 77 61 + 80 62 + 81 62 82 62 + 83 62 + 84 62 85 62 + 86 62 87 62 8a 63 + 8b 63 + 8c 63 + 8d 63 8e 63 + 8f 63 + 90 63 + c3 67 + c4 67 c5 67 + c6 67 + c7 67 c8 67 + c9 67 ca 67 + d3 68 + d4 68 d5 68 + d6 68 + d7 68 d8 68 d9 68 dc 69 + dd 69 + de 69 + df 69 e0 69 + e1 69 + e2 69 ee 74 + ef 74 + f0 74 + f1 74 f2 74 + f3 74 + f4 74 109 66 } method 'testNumberString (Ljava/lang/Object;)V' { + 0 80 10 80 + 74 81 + 75 81 76 81 + 77 81 + 78 81 79 81 + 7a 81 7b 81 + 84 82 + 85 82 86 82 + 87 82 + 88 82 89 82 + 8a 82 8b 82 8e 83 + 8f 83 + 90 83 + 91 83 92 83 + 93 83 + 94 83 + b4 87 + b5 87 b6 87 + b7 87 + b8 87 b9 87 + ba 87 bb 87 + c4 88 + c5 88 c6 88 + c7 88 + c8 88 c9 88 + ca 88 cb 88 ce 89 + cf 89 + d0 89 + d1 89 d2 89 + d3 89 + d4 89 + e9 93 + ea 93 eb 93 + ec 93 + ed 93 ee 93 + ef 93 f0 93 + f9 94 + fa 94 fb 94 + fc 94 + fd 94 fe 94 ff 94 102 95 + 103 95 + 104 95 + 105 95 106 95 + 107 95 + 108 95 114 100 + 115 100 + 116 100 + 117 100 118 100 + 119 100 + 11a 100 12f 86 } method 'test2DeepDeconstruction (Ljava/lang/Object;)V' { + 0 106 10 106 + 71 107 + 72 107 73 107 + 74 107 + 75 107 76 107 77 107 80 107 + 81 107 + 82 107 83 107 + 84 107 85 107 + 86 107 + 87 107 + 92 108 + 93 108 94 108 + 95 108 + 96 108 97 108 98 108 a1 108 + a2 108 + a3 108 a4 108 + a5 108 a6 108 + a7 108 + a8 108 b1 109 + b2 109 + b3 109 b4 109 + b5 109 b6 109 + b7 109 + b8 109 bc 112 + bd 112 + be 112 bf 112 + c0 112 c1 112 + c2 112 + c3 112 c4 113 + c5 113 + c6 113 + c7 113 + c8 113 + c9 113 + ca 113 + cb 113 + cc 113 + cd 113 + ce 113 + cf 113 + d0 113 + d1 113 + d2 113 + d3 113 + d4 113 } method 'testDoubleLongCase (Ljava/lang/Object;)V' { + 0 116 10 116 + 9b 117 + 9c 117 9d 117 + 9e 117 + 9f 117 a0 117 a1 117 + aa 118 + ab 118 ac 118 + ad 118 + ae 118 af 118 b0 118 b3 119 + b4 119 + b5 119 + b6 119 b7 119 + b8 119 + b9 119 + c4 122 + c5 122 c6 122 + c7 122 + c8 122 c9 122 ca 122 + d3 123 + d4 123 d5 123 + d6 123 + d7 123 d8 123 d9 123 dc 124 + dd 124 + de 124 + df 124 e0 124 + e1 124 + e2 124 + ea 127 + eb 127 ec 127 + ed 127 + ee 127 ef 127 f0 127 + f9 128 + fa 128 fb 128 + fc 128 + fd 128 fe 128 ff 128 102 129 + 103 129 + 104 129 + 105 129 106 129 + 107 129 + 108 129 + 120 132 + 121 132 122 132 + 123 132 + 124 132 125 132 126 132 + 12f 133 + 130 133 131 133 + 132 133 + 133 133 134 133 135 133 138 134 + 139 134 + 13a 134 + 13b 134 13c 134 + 13d 134 + 13e 134 + 163 138 + 164 138 165 138 + 166 138 + 167 138 168 138 169 138 16c 139 + 16d 139 + 16e 139 + 16f 139 170 139 + 171 139 + 172 139 179 143 + 17a 143 + 17b 143 + 17c 143 17d 143 + 17e 143 + 17f 143 180 144 + 183 147 193 147 + 21b 148 + 21c 148 21d 148 + 21e 148 + 21f 148 220 148 221 148 + 22a 149 + 22b 149 22c 149 + 22d 149 + 22e 149 22f 149 230 149 233 150 + 234 150 + 235 150 + 236 150 237 150 + 238 150 + 239 150 + 244 154 + 245 154 246 154 + 247 154 + 248 154 249 154 24a 154 + 253 155 + 254 155 255 155 + 256 155 + 257 155 258 155 259 155 25c 156 + 25d 156 + 25e 156 + 25f 156 260 156 + 261 156 + 262 156 + 26a 160 + 26b 160 26c 160 + 26d 160 + 26e 160 26f 160 270 160 + 279 161 + 27a 161 27b 161 + 27c 161 + 27d 161 27e 161 27f 161 282 162 + 283 162 + 284 162 + 285 162 286 162 + 287 162 + 288 162 + 2a0 166 + 2a1 166 2a2 166 + 2a3 166 + 2a4 166 2a5 166 2a6 166 + 2af 167 + 2b0 167 2b1 167 + 2b2 167 + 2b3 167 2b4 167 2b5 167 2b8 168 + 2b9 168 + 2ba 168 + 2bb 168 2bc 168 + 2bd 168 + 2be 168 + 2e3 173 + 2e4 173 2e5 173 + 2e6 173 + 2e7 173 2e8 173 2e9 173 2ec 174 + 2ed 174 + 2ee 174 + 2ef 174 2f0 174 + 2f1 174 + 2f2 174 2f9 179 + 2fa 179 + 2fb 179 + 2fc 179 2fd 179 + 2fe 179 + 2ff 179 314 153 } method 'testTryWithDoubleDo (Ljava/lang/Object;Ljava/lang/Object;)V' { 0 186 + 1 186 + 2 186 3 186 + 4 186 5 186 b 187 + c 188 1e 188 81 190 + 82 190 + 83 190 + 84 190 + 85 190 + 86 190 + 87 190 + 88 190 + 89 190 8a 190 + 8b 190 + 8c 190 8d 190 + 8e 190 b2 193 + b3 193 + b4 193 + b5 193 + b6 193 + b7 193 + b8 193 + b9 193 + ba 193 + bb 193 + bc 193 + bd 193 be 193 ce 196 + cf 196 + d0 196 + d1 196 d2 196 + d3 196 + d4 196 e9 191 } } class 'pkg/TestSwitchNestedDeconstructionsJavac$R1' { method ' (Ljava/lang/Object;)V' { + 4 205 + 5 205 6 205 + 7 205 + 8 205 9 206 } method 'o ()Ljava/lang/Object;' { + 0 209 1 209 + 2 209 + 3 209 4 209 } } class 'pkg/TestSwitchNestedDeconstructionsJavac$R2' { method ' (Ljava/lang/Object;Ljava/lang/Object;)V' { + 4 215 + 5 215 6 215 + 7 215 + 8 215 + 9 216 + a 216 b 216 + c 216 + d 216 e 217 } method 'o ()Ljava/lang/Object;' { + 0 220 1 220 + 2 220 + 3 220 4 220 } method 'o2 ()Ljava/lang/Object;' { + 0 224 1 224 + 2 224 + 3 224 4 224 } } @@ -523,6 +952,7 @@ Lines mapping: 40 <-> 40 42 <-> 14 45 <-> 46 +46 <-> 58 47 <-> 48 48 <-> 49 51 <-> 53 @@ -553,7 +983,7 @@ Lines mapping: 96 <-> 108 98 <-> 109 99 <-> 109 -101 <-> 110 +101 <-> 114 103 <-> 113 107 <-> 117 108 <-> 118 @@ -570,7 +1000,7 @@ Lines mapping: 125 <-> 135 129 <-> 139 130 <-> 140 -133 <-> 145 +133 <-> 144 136 <-> 148 137 <-> 149 138 <-> 150 @@ -595,12 +1025,11 @@ Lines mapping: 172 <-> 191 174 <-> 194 175 <-> 194 -177 <-> 197 +177 <-> 194 180 <-> 192 183 <-> 225 Not mapped: 35 -46 54 97 100 diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchOnEnum.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchOnEnum.dec index 43c9a50f4312..06e7e1a2ca01 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchOnEnum.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchOnEnum.dec @@ -63,21 +63,39 @@ class 'pkg/TestSwitchOnEnum' { class 'pkg/TestSwitchOnEnum$Example' { method 'test (Lpkg/TestSwitchOnEnum$Example$A;Lpkg/TestSwitchOnEnum$Example$B;)V' { + 3 20 8 20 24 22 + 25 22 + 26 22 27 22 + 28 22 29 22 + 2a 22 + 2b 22 2c 23 2f 25 + 30 25 + 31 25 32 25 + 33 25 34 25 + 3a 28 3f 28 58 30 + 59 30 + 5a 30 5b 30 + 5c 30 5d 30 + 5e 30 + 5f 30 60 31 63 33 + 64 33 + 65 33 66 33 + 67 33 68 33 6b 36 } diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchOnEnumEclipse.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchOnEnumEclipse.dec index 04b5a27c6592..0729506010e7 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchOnEnumEclipse.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchOnEnumEclipse.dec @@ -51,6 +51,7 @@ public class TestSwitchOnEnumEclipse { class 'pkg/TestSwitchOnEnumEclipse' { method 'testSOE (Ljava/util/concurrent/TimeUnit;)I' { + 3 8 8 8 24 10 25 10 @@ -63,21 +64,39 @@ class 'pkg/TestSwitchOnEnumEclipse' { class 'pkg/TestSwitchOnEnumEclipse$Example' { method 'test (Lpkg/TestSwitchOnEnumEclipse$Example$A;Lpkg/TestSwitchOnEnumEclipse$Example$B;)V' { + 3 21 8 21 20 23 + 21 23 + 22 23 23 23 + 24 23 25 23 + 26 23 + 27 23 28 24 2b 26 + 2c 26 + 2d 26 2e 26 + 2f 26 30 26 + 36 29 3b 29 50 31 + 51 31 + 52 31 53 31 + 54 31 55 31 + 56 31 + 57 31 58 32 5b 34 + 5c 34 + 5d 34 5e 34 + 5f 34 60 34 63 37 } diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchOnStringsEcj.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchOnStringsEcj.dec index e14ee4510dad..7dbd3601ad44 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchOnStringsEcj.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchOnStringsEcj.dec @@ -106,135 +106,250 @@ public class TestSwitchOnStringsEcj { class 'pkg/TestSwitchOnStringsEcj' { method 'noCase ()V' { + 0 7 1 7 + 2 7 + 3 7 6 7 + 7 7 + 8 7 a 8 } method 'oneCase (Ljava/lang/String;)V' { 0 11 + 1 11 + 2 11 3 11 4 11 + 5 11 + 6 11 + 7 12 d 12 2c 14 + 2d 14 + 2e 14 2f 14 30 14 33 16 + 34 16 + 35 16 36 16 37 16 + 38 16 + 39 16 3a 18 } method 'oneCaseWithDefault ()V' { 0 21 + 1 21 + 2 21 3 21 4 21 + 5 21 + 6 21 + 7 22 8 22 + 9 22 + a 22 10 22 30 24 + 31 24 + 32 24 33 24 34 24 + 35 24 + 36 24 37 25 3a 27 + 3b 27 + 3c 27 3d 27 3e 27 41 30 + 42 30 + 43 30 44 30 45 30 + 46 30 + 47 30 48 31 } method 'multipleCases1 ()V' { 0 34 + 1 34 + 2 34 3 34 4 34 + 5 34 + 6 34 7 35 + 8 35 e 35 40 37 + 41 37 + 42 37 43 37 44 37 + 45 37 + 46 37 4a 40 + 4b 40 + 4c 40 4d 40 4e 40 51 43 + 52 43 + 53 43 54 43 55 43 + 56 43 + 57 43 58 44 } method 'multipleCasesWithDefault1 ()V' { 0 48 + 1 48 + 2 48 3 48 4 48 + 5 48 + 6 48 + 7 49 8 49 + 9 49 + a 49 10 49 44 51 + 45 51 + 46 51 47 51 48 51 + 49 51 + 4a 51 4b 52 4e 54 + 4f 54 + 50 54 51 54 52 54 + 53 54 + 54 54 55 55 58 58 + 59 58 + 5a 58 5b 58 5c 58 5f 61 + 60 61 + 61 61 62 61 63 61 + 64 61 + 65 61 66 62 } method 'multipleCases2 ()V' { 0 65 + 1 65 + 2 65 3 65 4 65 + 5 65 + 6 65 7 66 + 8 66 e 66 54 68 + 55 68 + 56 68 57 68 58 68 + 59 68 + 5a 68 5e 71 + 5f 71 + 60 71 61 71 62 71 + 63 71 + 64 71 68 74 + 69 74 + 6a 74 6b 74 6c 74 6f 77 + 70 77 + 71 77 72 77 73 77 + 74 77 + 75 77 76 78 } method 'multipleCasesWithDefault2 ()V' { 0 82 + 1 82 + 2 82 3 82 4 82 + 5 82 + 6 82 + 7 83 8 83 + 9 83 + a 83 10 83 58 85 + 59 85 + 5a 85 5b 85 5c 85 + 5d 85 + 5e 85 5f 86 62 88 + 63 88 + 64 88 65 88 66 88 + 67 88 + 68 88 69 89 6c 91 + 6d 91 + 6e 91 6f 91 70 91 + 71 91 + 72 91 73 92 76 95 + 77 95 + 78 95 79 95 7a 95 7d 98 + 7e 98 + 7f 98 80 98 + 81 98 82 98 + 83 98 + 84 98 85 99 } method 'getStr ()Ljava/lang/String;' { 0 102 + 1 102 2 102 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchOnStringsJavac.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchOnStringsJavac.dec index 712bea053bc0..2891e55dbf72 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchOnStringsJavac.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchOnStringsJavac.dec @@ -146,207 +146,426 @@ public class TestSwitchOnStringsJavac { class 'pkg/TestSwitchOnStringsJavac' { method 'noCase ()V' { + 0 9 1 9 + 2 9 + 3 9 5 9 + 6 9 + 7 9 a 10 } method 'oneCase (Ljava/lang/String;)V' { 0 13 + 1 13 + 2 13 3 13 4 13 + 5 13 + 6 13 + 7 14 2c 14 40 16 + 41 16 + 42 16 43 16 44 16 47 18 + 48 18 + 49 18 4a 18 4b 18 + 4c 18 + 4d 18 4e 20 } method 'oneCaseWithDefault ()V' { 0 23 + 1 23 + 2 23 3 23 4 23 + 5 23 + 6 23 + 7 24 8 24 + 9 24 + a 24 30 24 44 25 + 45 25 + 46 25 47 25 48 25 + 49 25 + 4a 25 4e 26 + 4f 26 + 50 26 51 26 52 26 55 29 + 56 29 + 57 29 58 29 59 29 + 5a 29 + 5b 29 5c 30 } method 'multipleCases1 ()V' { 0 33 + 1 33 + 2 33 3 33 4 33 + 5 33 + 6 33 7 34 + 8 34 46 34 60 35 + 61 35 + 62 35 63 35 64 35 + 65 35 + 66 35 6a 36 + 6b 36 + 6c 36 6d 36 6e 36 71 39 + 72 39 + 73 39 74 39 75 39 + 76 39 + 77 39 78 40 } method 'multipleCasesWithDefault1 ()V' { 0 43 + 1 43 + 2 43 3 43 4 43 + 5 43 + 6 43 + 7 44 8 44 + 9 44 + a 44 46 44 60 45 + 61 45 + 62 45 63 45 64 45 + 65 45 + 66 45 6a 46 + 6b 46 + 6c 46 6d 46 6e 46 + 6f 46 + 70 46 74 47 + 75 47 + 76 47 77 47 78 47 7b 50 + 7c 50 + 7d 50 7e 50 7f 50 + 80 50 + 81 50 82 51 } method 'multipleCases2 ()V' { 0 54 + 1 54 + 2 54 3 54 4 54 + 5 54 + 6 54 7 55 + 8 55 5c 55 78 56 + 79 56 + 7a 56 7b 56 7c 56 + 7d 56 + 7e 56 82 57 + 83 57 + 84 57 85 57 86 57 + 87 57 + 88 57 8c 58 + 8d 58 + 8e 58 8f 58 90 58 93 61 + 94 61 + 95 61 96 61 97 61 + 98 61 + 99 61 9a 62 } method 'multipleCasesWithDefault2 ()V' { 0 65 + 1 65 + 2 65 3 65 4 65 + 5 65 + 6 65 + 7 66 8 66 + 9 66 + a 66 5c 66 78 67 + 79 67 + 7a 67 7b 67 7c 67 + 7d 67 + 7e 67 82 68 + 83 68 + 84 68 85 68 86 68 + 87 68 + 88 68 8c 69 + 8d 69 + 8e 69 8f 69 90 69 + 91 69 + 92 69 96 70 + 97 70 + 98 70 99 70 9a 70 9d 73 + 9e 73 + 9f 73 a0 73 + a1 73 a2 73 + a3 73 + a4 73 a5 74 } method 'combined ()V' { 0 77 + 1 77 + 2 77 3 77 + 4 77 5 77 + 6 77 + 7 77 + 8 78 9 78 + a 78 + b 78 c 78 + d 78 + e 78 f 78 12 79 + 13 79 + 14 79 15 79 + 16 79 + 17 79 + 18 80 19 80 + 1a 80 + 1b 80 7e 80 9c 81 + 9d 81 + 9e 81 9f 81 a0 81 + a1 81 + a2 81 a6 82 + a7 82 + a8 82 a9 82 aa 82 + ab 82 + ac 82 b0 83 + b1 83 + b2 83 b3 83 b4 83 + b5 83 + b6 83 ba 84 + bb 84 + bc 84 bd 84 be 84 + bf 84 + c0 84 c4 85 + c5 85 + c6 85 c7 85 + c8 85 + c9 85 ca 85 cd 88 + ce 88 + cf 88 + d0 88 d1 88 + d2 88 + d3 88 d4 88 + d5 88 + d6 88 + d7 89 d8 89 + d9 89 + da 89 + de 93 df 93 + e0 93 + e1 93 142 93 + 160 97 161 97 + 162 97 + 163 97 164 97 + 167 103 168 103 + 169 103 + 16a 103 16b 103 + 16c 103 + 16d 103 16e 103 16f 103 172 104 + 173 104 + 174 104 + 175 104 176 104 + 177 104 + 178 104 179 104 17f 106 180 107 + 181 107 + 182 107 184 107 + 185 107 + 186 107 187 107 + 188 107 + 189 107 18d 98 + 18e 98 + 18f 98 190 98 191 98 194 118 + 195 118 + 196 118 197 118 + 198 118 199 118 + 19a 118 + 19b 118 19c 119 19d 114 + 19e 114 + 19f 114 1a0 114 + 1a1 114 1a2 114 1a8 121 1a9 123 1aa 123 + 1ab 125 1ac 125 + 1ad 125 1ae 125 + 1b1 126 1b2 126 + 1b3 126 + 1b4 126 1de 126 1f0 127 + 1f1 127 + 1f2 127 1f3 127 + 1f4 127 1f5 127 + 1f6 127 + 1f7 127 1fb 128 + 1fc 128 + 1fd 128 + 1fe 128 1ff 128 + 200 128 + 201 128 202 128 205 131 + 206 131 + 207 131 20b 134 + 20c 134 + 20d 134 20e 134 + 20f 134 210 134 213 138 + 214 138 + 215 138 216 138 + 217 138 218 138 + 219 138 + 21a 138 21b 139 } method 'getStr ()Ljava/lang/String;' { 0 142 + 1 142 2 142 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchPatternWithExpression.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchPatternWithExpression.dec index c0be1c86c35d..7cc62602c049 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchPatternWithExpression.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchPatternWithExpression.dec @@ -7,10 +7,10 @@ public class TestSwitchPatternWithExpression { String var11; switch (i) { case A(String a): - var11 = a; - break;// 20 + var11 = a;// 20 + break; case B(String a): - var11 = a; + var11 = a;// 21 break; } @@ -33,7 +33,7 @@ public class TestSwitchPatternWithExpression { var16 = a; break;// 38 case AA(B(String a)): - var16 = a; + var16 = a;// 39 } return var16;// 37 @@ -43,29 +43,29 @@ public class TestSwitchPatternWithExpression { String var17; switch (i) {// 44 case AA(A(String a)): - var17 = a; - break;// 45 + var17 = a;// 45 + break; case AA(B(String a)): var17 = a; } - String aa = var17;// 46 + String aa = var17; System.out.println(aa + "1");// 48 - return; + return;// 46 } private static String getX4(I i) { String var12; switch (i) {// 52 case A(String a): - var12 = a; - break;// 53 + var12 = a;// 53 + break; case B(String a): - var12 = a; + var12 = a;// 54 break; } - String string = var12;// 54 + String string = var12; return string;// 56 } @@ -73,16 +73,16 @@ public class TestSwitchPatternWithExpression { String var12; switch (i) {// 60 case A(String a): - var12 = a; - break;// 61 + var12 = a;// 61 + break; case B(String a): var12 = a; break; } - String string = var12;// 62 + String string = var12; System.out.println(string + "2");// 64 - } + }// 62 private static String getX5(I i) { String var12; @@ -91,11 +91,11 @@ public class TestSwitchPatternWithExpression { var12 = a + "1";// 69 break; case B(String a): - var12 = a; + var12 = a;// 70 break; } - String string = var12;// 70 + String string = var12; return string;// 72 } @@ -110,20 +110,20 @@ public class TestSwitchPatternWithExpression { break; } - String string = var12;// 78 + String string = var12; System.out.println(string + "2");// 80 - } + }// 78 private static String getX3(I i) { String var11; switch (i) { case A(String a): System.out.println(a);// 86 - var11 = a; - break;// 87 + var11 = a;// 87 + break; case B(String a): System.out.println(a);// 90 - var11 = a; + var11 = a;// 91 break; } @@ -135,8 +135,8 @@ public class TestSwitchPatternWithExpression { switch (i) { case A(String a): System.out.println(a);// 100 - var11 = a; - break;// 101 + var11 = a;// 101 + break; case B(String a): System.out.println(a);// 104 var11 = a + "1";// 105 @@ -153,8 +153,8 @@ public class TestSwitchPatternWithExpression { System.out.println(a);// 113 System.out.println(a);// 114 System.out.println(a + "1");// 115 - var11 = a; - break;// 116 + var11 = a;// 116 + break; case B(String a): System.out.println(a);// 119 var11 = a + "1";// 120 @@ -212,113 +212,305 @@ public class TestSwitchPatternWithExpression { class 'TestSwitchPatternWithExpression' { method 'main ([Ljava/lang/String;)V' { 4 2 + 5 2 a 3 } method 'getX (LTestSwitchPatternWithExpression$I;)Ljava/lang/String;' { + 0 7 10 7 + 45 9 + 46 9 47 10 + 5b 12 5d 16 } method 'getX8 (LTestSwitchPatternWithExpression$I;)Ljava/lang/String;' { + 0 20 10 20 + 45 22 + 46 22 47 22 + 59 24 + 5a 24 5b 24 } method 'getX0 (LTestSwitchPatternWithExpression$AA;)Ljava/lang/String;' { + 0 30 10 30 + 6e 32 + 6f 32 70 33 + 85 35 + 86 35 8f 38 } method 'getX11 (LTestSwitchPatternWithExpression$AA;)V' { + 0 43 10 43 + 72 45 + 73 45 74 46 + 89 48 + 8a 48 93 51 94 52 + 95 52 + 96 52 + 97 52 98 52 + 99 52 + 9a 52 + 9b 52 + 9c 52 9d 52 + 9e 52 + 9f 52 a0 53 + a1 53 + a2 53 + a3 53 + a4 53 + a5 53 + a6 53 + a7 53 + a8 53 + a9 53 + aa 53 + ab 53 + ac 53 + ad 53 + ae 53 + af 53 + b0 53 } method 'getX4 (LTestSwitchPatternWithExpression$I;)Ljava/lang/String;' { + 0 58 10 58 + 47 60 + 48 60 49 61 + 5d 63 5f 67 + 60 68 61 68 } method 'getX10 (LTestSwitchPatternWithExpression$I;)V' { + 0 73 10 73 + 47 75 + 48 75 49 76 + 5d 78 5f 82 60 83 + 61 83 + 62 83 + 63 83 64 83 + 65 83 + 66 83 + 67 83 + 68 83 69 83 + 6a 83 + 6b 83 6c 84 + 6d 84 + 6e 84 + 6f 84 + 70 84 + 71 84 + 72 84 + 73 84 + 74 84 + 75 84 + 76 84 + 77 84 + 78 84 + 79 84 + 7a 84 + 7b 84 + 7c 84 } method 'getX5 (LTestSwitchPatternWithExpression$I;)Ljava/lang/String;' { + 0 88 10 88 + 47 90 + 48 90 49 90 + 4a 90 + 4b 90 + 4c 90 + 4d 90 4e 91 + 62 93 64 97 + 65 98 66 98 } method 'getX9 (LTestSwitchPatternWithExpression$I;)V' { + 0 103 10 103 + 47 105 + 48 105 49 105 + 4a 105 + 4b 105 + 4c 105 + 4d 105 4e 106 + 62 108 64 112 65 113 + 66 113 + 67 113 + 68 113 69 113 + 6a 113 + 6b 113 + 6c 113 + 6d 113 6e 113 + 6f 113 + 70 113 71 114 + 72 114 + 73 114 + 74 114 + 75 114 + 76 114 + 77 114 + 78 114 + 79 114 + 7a 114 + 7b 114 + 7c 114 + 7d 114 + 7e 114 + 7f 114 + 80 114 + 81 114 } method 'getX3 (LTestSwitchPatternWithExpression$I;)Ljava/lang/String;' { + 0 118 10 118 45 120 + 46 120 + 47 120 + 48 120 + 49 120 4a 120 + 4b 120 + 4c 120 + 4d 121 + 4e 121 4f 122 63 124 + 64 124 + 65 124 + 66 124 + 67 124 68 124 + 69 124 + 6a 124 + 6b 125 6d 129 } method 'getX6 (LTestSwitchPatternWithExpression$I;)Ljava/lang/String;' { + 0 134 10 134 45 136 + 46 136 + 47 136 + 48 136 + 49 136 4a 136 + 4b 136 + 4c 136 + 4d 137 + 4e 137 4f 138 63 140 + 64 140 + 65 140 + 66 140 + 67 140 68 140 + 69 140 + 6a 140 + 6b 141 + 6c 141 6d 141 72 145 } method 'getX7 (LTestSwitchPatternWithExpression$I;)Ljava/lang/String;' { + 0 150 10 150 45 152 + 46 152 + 47 152 + 48 152 + 49 152 4a 152 + 4b 152 + 4c 152 4d 153 + 4e 153 + 4f 153 + 50 153 + 51 153 52 153 + 53 153 + 54 153 55 154 + 56 154 + 57 154 + 58 154 + 59 154 5a 154 + 5b 154 + 5c 154 + 5d 154 + 5e 154 5f 154 + 60 154 + 61 154 + 62 155 + 63 155 64 156 78 158 + 79 158 + 7a 158 + 7b 158 + 7c 158 7d 158 + 7e 158 + 7f 158 + 80 159 + 81 159 82 159 87 163 } method 'getX2 (LTestSwitchPatternWithExpression$I;)Ljava/lang/String;' { + 0 167 10 167 + 3b 169 + 3c 169 3d 169 + 4f 171 + 50 171 51 171 59 173 } @@ -326,36 +518,57 @@ class 'TestSwitchPatternWithExpression' { class 'TestSwitchPatternWithExpression$A' { method ' (Ljava/lang/String;)V' { + 4 179 + 5 179 6 179 + 7 179 + 8 179 9 180 } method 'a ()Ljava/lang/String;' { + 0 183 1 183 + 2 183 + 3 183 4 183 } } class 'TestSwitchPatternWithExpression$B' { method ' (Ljava/lang/String;)V' { + 4 189 + 5 189 6 189 + 7 189 + 8 189 9 190 } method 'a ()Ljava/lang/String;' { + 0 193 1 193 + 2 193 + 3 193 4 193 } } class 'TestSwitchPatternWithExpression$AA' { method ' (LTestSwitchPatternWithExpression$I;)V' { + 4 199 + 5 199 6 199 + 7 199 + 8 199 9 200 } method 'i ()LTestSwitchPatternWithExpression$I;' { + 0 203 1 203 + 2 203 + 3 203 4 203 } } @@ -367,46 +580,49 @@ Lines mapping: 15 <-> 3 16 <-> 4 19 <-> 17 -20 <-> 11 +20 <-> 10 +21 <-> 13 26 <-> 21 28 <-> 23 31 <-> 25 37 <-> 39 38 <-> 34 +39 <-> 36 44 <-> 44 -45 <-> 47 -46 <-> 52 +45 <-> 46 +46 <-> 54 48 <-> 53 52 <-> 59 -53 <-> 62 -54 <-> 68 +53 <-> 61 +54 <-> 64 56 <-> 69 60 <-> 74 -61 <-> 77 -62 <-> 83 +61 <-> 76 +62 <-> 85 64 <-> 84 68 <-> 89 69 <-> 91 -70 <-> 98 +70 <-> 94 72 <-> 99 76 <-> 104 77 <-> 106 -78 <-> 113 +78 <-> 115 80 <-> 114 84 <-> 130 86 <-> 121 -87 <-> 123 +87 <-> 122 90 <-> 125 +91 <-> 126 98 <-> 146 100 <-> 137 -101 <-> 139 +101 <-> 138 104 <-> 141 105 <-> 142 111 <-> 164 113 <-> 153 114 <-> 154 115 <-> 155 -116 <-> 157 +116 <-> 156 119 <-> 159 120 <-> 160 126 <-> 168 @@ -414,16 +630,13 @@ Lines mapping: 130 <-> 172 132 <-> 174 Not mapped: -21 27 30 -39 49 65 81 85 89 -91 99 103 112 diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchRules.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchRules.dec index 1eeb09a39628..a168ccaad501 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchRules.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchRules.dec @@ -41,47 +41,88 @@ public class TestSwitchRules { class 'pkg/TestSwitchRules' { method 'main ([Ljava/lang/String;)V' { 0 4 + 1 4 2 4 + 3 4 + 4 4 5 5 + 6 5 7 5 + 8 5 + 9 5 a 6 + b 6 c 6 + d 6 + e 6 f 7 } method 'test1 (Ljava/lang/String;)V' { + 0 10 3e 10 58 11 + 59 11 + 5a 11 5b 11 + 5c 11 5d 11 + 5e 11 + 5f 11 63 12 + 64 12 + 65 12 66 12 + 67 12 68 12 + 69 12 + 6a 12 6e 13 + 6f 13 + 70 13 71 13 + 72 13 73 13 76 16 } method 'test2 (Ljava/lang/String;)V' { + 0 19 3e 19 5b 22 + 5c 22 + 5d 22 5e 22 + 5f 22 60 22 + 61 22 + 62 22 66 21 + 67 21 + 68 21 69 21 + 6a 21 6b 21 6e 25 } method 'test3 (Ljava/lang/String;)V' { + 0 28 3e 28 58 31 + 59 31 + 5a 31 5b 31 + 5c 31 5d 31 + 5e 31 + 5f 31 60 32 63 34 + 64 34 + 65 34 66 34 + 67 34 68 34 6b 37 } diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchSimpleReferencesJavac.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchSimpleReferencesJavac.dec index 785b496225ea..529a4b89c33f 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchSimpleReferencesJavac.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchSimpleReferencesJavac.dec @@ -22,7 +22,7 @@ public class TestSwitchSimpleReferencesJavac { switch (r2) {// 21 case "first" -> System.out.println("1");// 23 case "second" -> System.out.println("2");// 26 - case String s -> System.out.println(s);// 29 + case String s -> System.out.println(s);// 28 29 } }// 31 @@ -32,7 +32,7 @@ public class TestSwitchSimpleReferencesJavac { case null -> System.out.println("null");// 42 case "first" -> System.out.println("1");// 36 case "second" -> System.out.println("2");// 39 - case String s -> System.out.println(s);// 45 + case String s -> System.out.println(s);// 44 45 } }// 47 @@ -88,21 +88,21 @@ public class TestSwitchSimpleReferencesJavac { }// 99 private static void testEnum(Numbers r2) { - switch (r2) { + switch (r2) {// 106 case null -> System.out.println("null");// 113 case FIRST -> { } case SECOND -> System.out.println("2");// 110 - default -> throw new MatchException((String)null, (Throwable)null);// 106 + default -> throw new MatchException((String)null, (Throwable)null); } }// 115 private static void testEnum2(Numbers r2) { - switch (r2) { + switch (r2) {// 118 case null -> System.out.println("null");// 125 case FIRST -> { } case SECOND -> System.out.println("2");// 122 - default -> throw new MatchException((String)null, (Throwable)null);// 118 + default -> throw new MatchException((String)null, (Throwable)null); } }// 127 @@ -112,7 +112,7 @@ public class TestSwitchSimpleReferencesJavac { case null -> System.out.println("null");// 137 case FIRST -> { } case SECOND -> System.out.println("2");// 134 - case Numbers n -> System.out.println(n);// 140 + case Numbers n -> System.out.println(n);// 139 140 } }// 142 @@ -146,162 +146,305 @@ public class TestSwitchSimpleReferencesJavac { class 'pkg/TestSwitchSimpleReferencesJavac' { method 'testString (Ljava/lang/String;)V' { + 0 4 b 4 28 6 + 29 6 + 2a 6 2b 6 + 2c 6 2d 6 + 2e 6 + 2f 6 30 7 33 9 + 34 9 + 35 9 36 9 + 37 9 38 9 3b 11 + 3c 11 + 3d 11 3e 11 + 3f 11 40 11 + 41 11 + 42 11 43 12 46 15 + 47 15 + 48 15 49 15 + 4a 15 4b 15 4e 18 } method 'testString2 (Ljava/lang/String;)V' { + 0 21 10 21 2c 22 + 2d 22 + 2e 22 2f 22 + 30 22 31 22 + 32 22 + 33 22 37 23 + 38 23 + 39 23 3a 23 + 3b 23 3c 23 + 3d 23 + 3e 23 + 43 24 44 24 + 45 24 + 46 24 + 47 24 48 24 4b 27 } method 'testString3 (Ljava/lang/String;)V' { + 0 30 b 30 24 32 + 25 32 + 26 32 27 32 + 28 32 29 32 + 2a 32 + 2b 32 2f 33 + 30 33 + 31 33 32 33 + 33 33 34 33 + 35 33 + 36 33 3a 31 + 3b 31 + 3c 31 3d 31 + 3e 31 3f 31 + 40 31 + 41 31 + 46 34 47 34 + 48 34 + 49 34 + 4a 34 4b 34 4e 37 } method 'testByte (Ljava/lang/Byte;)V' { + 0 40 b 40 27 44 + 28 44 + 29 44 2a 44 + 2b 44 2c 44 + 2d 44 + 2e 44 2f 45 32 48 + 33 48 + 34 48 35 48 + 36 48 37 48 3a 51 } method 'testChar (Ljava/lang/Character;)V' { + 0 54 b 54 24 57 + 25 57 + 26 57 27 57 + 28 57 29 57 + 2a 57 + 2b 57 2c 58 2f 61 + 30 61 + 31 61 32 61 + 33 61 34 61 37 64 } method 'testInt (Ljava/lang/Integer;)V' { + 0 67 b 67 27 71 + 28 71 + 29 71 2a 71 + 2b 71 2c 71 + 2d 71 + 2e 71 2f 72 32 75 + 33 75 + 34 75 35 75 + 36 75 37 75 3a 78 } method 'testInt2 (Ljava/lang/Integer;)V' { + 0 81 1 81 + 2 81 + 3 81 4 81 23 83 + 24 83 + 25 83 26 83 + 27 83 28 83 + 29 83 + 2a 83 2e 84 + 2f 84 + 30 84 31 84 + 32 84 33 84 36 87 } method 'testEnum (Lpkg/TestSwitchSimpleReferencesJavac$Numbers;)V' { + 0 90 b 90 28 94 29 94 2d 94 31 93 + 32 93 + 33 93 34 93 + 35 93 36 93 + 37 93 + 38 93 3c 91 + 3d 91 + 3e 91 3f 91 + 40 91 41 91 44 97 } method 'testEnum2 (Lpkg/TestSwitchSimpleReferencesJavac$Numbers;)V' { + 0 100 b 100 28 104 29 104 2d 104 31 103 + 32 103 + 33 103 34 103 + 35 103 36 103 + 37 103 + 38 103 3c 101 + 3d 101 + 3e 101 3f 101 + 40 101 41 101 44 107 } method 'testEnum3 (Lpkg/TestSwitchSimpleReferencesJavac$Numbers;)V' { + 0 110 b 110 27 113 + 28 113 + 29 113 2a 113 + 2b 113 2c 113 + 2d 113 + 2e 113 32 111 + 33 111 + 34 111 35 111 + 36 111 37 111 + 38 111 + 39 111 + 3e 114 3f 114 + 40 114 + 41 114 + 42 114 43 114 46 117 } method 'testEnum4 (Lpkg/TestSwitchSimpleReferencesJavac$Numbers;)V' { + 0 120 1 120 + 2 120 + 3 120 4 120 23 122 + 24 122 + 25 122 26 122 + 27 122 28 122 + 29 122 + 2a 122 2e 123 + 2f 123 + 30 123 31 123 + 32 123 33 123 36 126 } method 'testEnum5 (Lpkg/TestSwitchSimpleReferencesJavac$Numbers;)V' { + 0 129 b 129 24 131 + 25 131 + 26 131 27 131 + 28 131 29 131 + 2a 131 + 2b 131 2c 132 2f 135 + 30 135 + 31 135 32 135 + 33 135 34 135 37 138 } @@ -319,12 +462,14 @@ Lines mapping: 21 <-> 22 23 <-> 23 26 <-> 24 +28 <-> 25 29 <-> 25 31 <-> 28 34 <-> 31 36 <-> 33 39 <-> 34 42 <-> 32 +44 <-> 35 45 <-> 35 47 <-> 38 51 <-> 41 @@ -346,17 +491,18 @@ Lines mapping: 94 <-> 84 97 <-> 85 99 <-> 88 -106 <-> 95 +106 <-> 91 110 <-> 94 113 <-> 92 115 <-> 98 -118 <-> 105 +118 <-> 101 122 <-> 104 125 <-> 102 127 <-> 108 130 <-> 111 134 <-> 114 137 <-> 112 +139 <-> 115 140 <-> 115 142 <-> 118 145 <-> 121 @@ -371,11 +517,9 @@ Lines mapping: Not mapped: 24 27 -28 37 40 43 -44 53 79 92 @@ -387,6 +531,5 @@ Not mapped: 132 135 138 -139 147 150 diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchWithDeconstructionsWithoutNestedJavac.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchWithDeconstructionsWithoutNestedJavac.dec index c549388722ac..48055e19eb4d 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchWithDeconstructionsWithoutNestedJavac.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchWithDeconstructionsWithoutNestedJavac.dec @@ -17,11 +17,11 @@ public class TestSwitchWithDeconstructionsWithoutNestedJavac { } System.out.println("1");// 21 - } + }// 14 public static void testStringObjectWhen(Object o) { switch (o) {// 25 - case R1(String s1, Object var10) when s1.hashCode() == 3:// 26 + case R1(String s1, Object var10) when s1.hashCode() == 3: if (s1.hashCode() == 1) {// 27 System.out.println("2");// 28 System.out.println("2");// 29 @@ -34,7 +34,7 @@ public class TestSwitchWithDeconstructionsWithoutNestedJavac { } System.out.println("1");// 35 - } + }// 26 public static void testStringObject(Object o) { label34: @@ -47,7 +47,7 @@ public class TestSwitchWithDeconstructionsWithoutNestedJavac { } System.out.println("1");// 47 - } + }// 40 public static void testObjectString(Object o) { switch (o) {// 51 @@ -62,7 +62,7 @@ public class TestSwitchWithDeconstructionsWithoutNestedJavac { } System.out.println("1");// 59 - } + }// 52 public static void testObjectObject(Object o) { switch (o) {// 63 @@ -76,7 +76,7 @@ public class TestSwitchWithDeconstructionsWithoutNestedJavac { } System.out.println("1");// 71 - } + }// 64 static record R1(Object o, Object o2) { R1(Object o, Object o2) { @@ -100,115 +100,340 @@ class 'pkg/TestSwitchWithDeconstructionsWithoutNestedJavac' { } method 'testStringString (Ljava/lang/Object;)V' { + 0 7 10 7 + 53 9 + 54 9 + 55 9 + 56 9 + 57 9 + 58 9 + 59 9 + 5a 9 5b 9 + 5c 9 5d 9 + 5e 9 + 5f 9 63 10 + 64 10 + 65 10 66 10 + 67 10 68 10 + 69 10 + 6a 10 6e 14 + 6f 14 + 70 14 71 14 + 72 14 73 14 + 74 14 + 75 14 76 15 79 18 + 7a 18 + 7b 18 7c 18 + 7d 18 7e 18 + 7f 18 + 80 18 81 19 + 82 19 + 83 19 + 84 19 + 85 19 + 86 19 + 87 19 + 88 19 + 89 19 + 8a 19 + 8b 19 + 8c 19 + 8d 19 + 8e 19 + 8f 19 + 90 19 + 91 19 } method 'testStringObjectWhen (Ljava/lang/Object;)V' { + 0 22 10 22 + 48 23 + 49 23 4a 23 + 4b 23 + 4c 23 4d 23 4e 23 + 56 24 + 57 24 58 24 + 59 24 + 5a 24 5b 24 5c 24 5f 25 + 60 25 + 61 25 62 25 + 63 25 64 25 + 65 25 + 66 25 67 26 + 68 26 + 69 26 6a 26 + 6b 26 6c 26 + 6d 26 + 6e 26 6f 27 + 70 27 + 71 27 72 27 + 73 27 74 27 + 75 27 + 76 27 7a 31 + 7b 31 + 7c 31 7d 31 + 7e 31 7f 31 + 80 31 + 81 31 82 32 85 35 + 86 35 + 87 35 88 35 + 89 35 8a 35 + 8b 35 + 8c 35 8d 36 + 8e 36 + 8f 36 + 90 36 + 91 36 + 92 36 + 93 36 + 94 36 + 95 36 + 96 36 + 97 36 + 98 36 + 99 36 + 9a 36 + 9b 36 + 9c 36 + 9d 36 } method 'testStringObject (Ljava/lang/Object;)V' { + 0 40 10 40 + 48 41 + 49 41 + 4a 41 + 4b 41 + 4c 41 + 4d 41 + 4e 41 + 4f 41 50 41 + 51 41 58 42 + 59 42 + 5a 42 5b 42 + 5c 42 5d 42 + 5e 42 + 5f 42 63 44 + 64 44 + 65 44 66 44 + 67 44 68 44 + 69 44 + 6a 44 6b 45 6e 48 + 6f 48 + 70 48 71 48 + 72 48 73 48 + 74 48 + 75 48 76 49 + 77 49 + 78 49 + 79 49 + 7a 49 + 7b 49 + 7c 49 + 7d 49 + 7e 49 + 7f 49 + 80 49 + 81 49 + 82 49 + 83 49 + 84 49 + 85 49 + 86 49 } method 'testObjectString (Ljava/lang/Object;)V' { + 0 52 10 52 + 48 54 + 49 54 + 4a 54 + 4b 54 + 4c 54 + 4d 54 + 4e 54 + 4f 54 50 54 + 51 54 52 54 + 53 54 + 54 54 55 54 59 55 + 5a 55 + 5b 55 5c 55 + 5d 55 5e 55 + 5f 55 + 60 55 64 59 + 65 59 + 66 59 67 59 + 68 59 69 59 + 6a 59 + 6b 59 6c 60 6f 63 + 70 63 + 71 63 72 63 + 73 63 74 63 + 75 63 + 76 63 77 64 + 78 64 + 79 64 + 7a 64 + 7b 64 + 7c 64 + 7d 64 + 7e 64 + 7f 64 + 80 64 + 81 64 + 82 64 + 83 64 + 84 64 + 85 64 + 86 64 + 87 64 } method 'testObjectObject (Ljava/lang/Object;)V' { + 0 67 10 67 + 3d 69 + 3e 69 3f 69 + 40 69 + 41 69 42 69 43 69 46 70 + 47 70 + 48 70 49 70 + 4a 70 4b 70 + 4c 70 + 4d 70 51 74 + 52 74 + 53 74 54 74 + 55 74 56 74 59 77 + 5a 77 + 5b 77 5c 77 + 5d 77 5e 77 + 5f 77 + 60 77 61 78 + 62 78 + 63 78 + 64 78 + 65 78 + 66 78 + 67 78 + 68 78 + 69 78 + 6a 78 + 6b 78 + 6c 78 + 6d 78 + 6e 78 + 6f 78 + 70 78 + 71 78 } } class 'pkg/TestSwitchWithDeconstructionsWithoutNestedJavac$R1' { method ' (Ljava/lang/Object;Ljava/lang/Object;)V' { + 4 82 + 5 82 6 82 + 7 82 + 8 82 + 9 83 + a 83 b 83 + c 83 + d 83 e 84 } method 'o ()Ljava/lang/Object;' { + 0 87 1 87 + 2 87 + 3 87 4 87 } method 'o2 ()Ljava/lang/Object;' { + 0 91 1 91 + 2 91 + 3 91 4 91 } } @@ -217,12 +442,13 @@ Lines mapping: 6 <-> 5 8 <-> 92 13 <-> 8 +14 <-> 20 15 <-> 10 16 <-> 11 19 <-> 15 21 <-> 19 25 <-> 23 -26 <-> 24 +26 <-> 37 27 <-> 25 28 <-> 26 29 <-> 27 @@ -230,27 +456,26 @@ Lines mapping: 33 <-> 32 35 <-> 36 39 <-> 41 +40 <-> 50 41 <-> 42 42 <-> 43 45 <-> 45 47 <-> 49 51 <-> 53 +52 <-> 65 53 <-> 55 54 <-> 56 57 <-> 60 59 <-> 64 63 <-> 68 +64 <-> 79 65 <-> 70 66 <-> 71 69 <-> 75 71 <-> 78 Not mapped: -14 22 36 -40 48 -52 60 -64 72 diff --git a/plugins/java-decompiler/engine/testData/results/TestSwitchWrapReturnJavac.dec b/plugins/java-decompiler/engine/testData/results/TestSwitchWrapReturnJavac.dec index e6031c1acd4c..9ad464bdee1a 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSwitchWrapReturnJavac.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSwitchWrapReturnJavac.dec @@ -5,13 +5,13 @@ class TestSwitchWrapReturnJavac { private static int test(S a) { switch (a) {// 18 - case S.A var3 -> {// 20 + case S.A var3 -> {// 19 20 return 1; } - case S.B var4 -> {// 23 + case S.B var4 -> {// 22 23 return 2; } - case S.C var5 -> {// 26 + case S.C var5 -> {// 25 26 return 3; } } @@ -32,17 +32,29 @@ class TestSwitchWrapReturnJavac { class 'TestSwitchWrapReturnJavac' { method 'main ([Ljava/lang/String;)V' { 0 2 + 1 2 + 2 2 a 2 + b 2 + c 2 d 2 + e 2 + f 2 10 3 } method 'test (LTestSwitchWrapReturnJavac$S;)I' { + 0 6 10 6 + 3a 7 3b 7 3c 7 + 41 10 + 42 10 43 10 44 10 + 49 13 + 4a 13 4b 13 4c 13 } @@ -52,10 +64,9 @@ Lines mapping: 14 <-> 3 15 <-> 4 18 <-> 7 +19 <-> 8 20 <-> 8 +22 <-> 11 23 <-> 11 +25 <-> 14 26 <-> 14 -Not mapped: -19 -22 -25 diff --git a/plugins/java-decompiler/engine/testData/results/TestSynchronizedUnprotected.dec b/plugins/java-decompiler/engine/testData/results/TestSynchronizedUnprotected.dec index d6405e80d437..4fd9b49a8cef 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSynchronizedUnprotected.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSynchronizedUnprotected.dec @@ -23,14 +23,30 @@ public final class TestSynchronizedUnprotected { class 'pkg/TestSynchronizedUnprotected' { method 'test ()V' { + 0 15 3 15 5 16 + 6 16 7 16 8 17 + 9 17 + a 17 + b 17 c 17 + d 17 + e 17 f 18 + 10 18 + 11 18 12 18 15 20 + 16 20 + 17 20 + 18 20 + 19 20 + 1a 20 + 1b 20 + 1c 20 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestSyntheticAccess.dec b/plugins/java-decompiler/engine/testData/results/TestSyntheticAccess.dec index 290e7a3cd313..f918dbc85240 100644 --- a/plugins/java-decompiler/engine/testData/results/TestSyntheticAccess.dec +++ b/plugins/java-decompiler/engine/testData/results/TestSyntheticAccess.dec @@ -4,16 +4,6 @@ class TestSyntheticAccess { private static int s; private int i; - private class Assigner { - void assignI(int var1) { - TestSyntheticAccess.this.i = var1;// 32 - }// 33 - - void assignS(int var1) { - TestSyntheticAccess.s = var1;// 36 - }// 37 - } - private class Incrementer { void orI() { TestSyntheticAccess.this.i = TestSyntheticAccess.this.i | 1;// 10 @@ -35,86 +25,102 @@ class TestSyntheticAccess { TestSyntheticAccess.s--;// 26 }// 27 } -} -class 'pkg/TestSyntheticAccess$Assigner' { - method 'assignI (I)V' { - 1 8 - 2 8 - 3 8 - 4 8 - 5 8 - 9 9 - } + private class Assigner { + void assignI(int var1) { + TestSyntheticAccess.this.i = var1;// 32 + }// 33 - method 'assignS (I)V' { - 0 12 - 2 12 - 3 12 - 4 12 - 5 13 + void assignS(int var1) { + TestSyntheticAccess.s = var1;// 36 + }// 37 } } class 'pkg/TestSyntheticAccess$Incrementer' { method 'orI ()V' { - 1 18 - 2 18 - 3 18 - 4 18 - 5 18 - 6 18 - 7 18 - b 18 - d 18 - 11 19 + 1 8 + 2 8 + 3 8 + 5 8 + 6 8 + 7 8 + 8 8 + 9 8 + a 8 + b 8 + d 8 + e 8 + f 8 + 11 9 } method 'incrementI ()V' { - 1 22 - 2 22 - 3 22 - 4 22 - 7 22 - 8 23 + 1 12 + 2 12 + 3 12 + 4 12 + 5 12 + 6 12 + 8 13 } method 'decrementI ()V' { - 1 26 - 2 26 - 3 26 - 4 26 - 6 26 - 8 27 + 1 16 + 2 16 + 3 16 + 4 16 + 5 16 + 6 16 + 8 17 } method 'incrementS ()V' { - 0 30 - 1 30 - 2 30 - 4 30 + 0 20 + 1 20 + 2 20 + 4 21 } method 'decrementS ()V' { - 0 34 + 0 24 + 1 24 + 2 24 + 4 25 + } +} + +class 'pkg/TestSyntheticAccess$Assigner' { + method 'assignI (I)V' { + 1 30 + 2 30 + 3 30 + 5 30 + 6 30 + 7 30 + 9 31 + } + + method 'assignS (I)V' { 1 34 2 34 - 4 35 + 3 34 + 5 35 } } Lines mapping: -10 <-> 19 -11 <-> 20 -14 <-> 23 -15 <-> 24 -18 <-> 27 -19 <-> 28 -22 <-> 31 -23 <-> 32 -26 <-> 35 -27 <-> 36 -32 <-> 9 -33 <-> 10 -36 <-> 13 -37 <-> 14 +10 <-> 9 +11 <-> 10 +14 <-> 13 +15 <-> 14 +18 <-> 17 +19 <-> 18 +22 <-> 21 +23 <-> 22 +26 <-> 25 +27 <-> 26 +32 <-> 31 +33 <-> 32 +36 <-> 35 +37 <-> 36 diff --git a/plugins/java-decompiler/engine/testData/results/TestTryCatchFinally.dec b/plugins/java-decompiler/engine/testData/results/TestTryCatchFinally.dec index 20e9afb72b2d..fc7405c28693 100644 --- a/plugins/java-decompiler/engine/testData/results/TestTryCatchFinally.dec +++ b/plugins/java-decompiler/engine/testData/results/TestTryCatchFinally.dec @@ -54,62 +54,62 @@ class 'pkg/TestTryCatchFinally' { 18 8 19 8 1f 9 - 2b 13 - 2c 13 - 2d 13 - 2e 13 - 2f 13 - 30 13 - 31 13 - 38 16 + 2b 12 + 2c 12 + 2d 12 + 2e 12 + 2f 12 + 30 12 + 31 12 + 38 15 } method 'foo (I)I' { - 0 19 - 1 19 - 2 19 - c 20 - d 21 - e 21 - f 21 - 12 22 - 13 22 - 1b 24 + 0 18 + 1 18 + 2 18 + c 19 + d 20 + e 20 + f 20 + 12 21 + 13 21 + 1b 23 } method 'test (Ljava/lang/String;)I' { - 0 30 - 1 30 - 2 30 - 3 30 - 4 30 - d 31 - e 31 - f 32 - 10 33 - 11 33 - 12 33 - 1a 33 - 1b 33 - 23 33 - 24 33 - 25 33 - 26 33 - 31 38 - 32 38 - 33 38 - 34 35 - 35 35 - 36 35 - 37 35 - 38 35 - 39 35 - 3a 38 - 3b 38 - 3c 38 - 3d 38 - 3e 38 - 3f 38 + 0 29 + 1 29 + 2 29 + 3 29 + 4 29 + d 30 + e 30 + f 31 + 10 32 + 11 32 + 12 32 + 1a 32 + 1b 32 + 23 32 + 24 32 + 25 32 + 26 32 + 31 37 + 32 37 + 33 37 + 34 34 + 35 34 + 36 34 + 37 34 + 38 34 + 39 34 + 3a 37 + 3b 37 + 3c 37 + 3d 37 + 3e 37 + 3f 37 } } diff --git a/plugins/java-decompiler/engine/testData/results/TestTryCatchFinallyJsrRet.dec b/plugins/java-decompiler/engine/testData/results/TestTryCatchFinallyJsrRet.dec index 6be2ad11131f..0cfcad56023e 100644 --- a/plugins/java-decompiler/engine/testData/results/TestTryCatchFinallyJsrRet.dec +++ b/plugins/java-decompiler/engine/testData/results/TestTryCatchFinallyJsrRet.dec @@ -42,40 +42,73 @@ public class TestTryCatchFinallyJsrRet { class 'pkg/TestTryCatchFinallyJsrRet' { method 'test1 (Ljava/lang/String;)V' { 0 5 + 1 5 + 2 5 3 5 + 4 5 5 5 f 8 + 10 8 + 11 8 12 8 + 13 8 14 8 1a 9 21 12 + 22 12 23 12 + 24 12 + 25 12 + 26 12 + 27 12 + 28 12 29 12 + 2a 12 35 15 } method 'foo (I)I' { + 0 18 1 18 2 18 c 19 + d 20 e 20 f 20 + 12 21 13 21 1b 23 } method 'test (Ljava/lang/String;)I' { + 0 29 1 29 + 2 29 + 3 29 4 29 a 31 b 32 + c 32 + d 32 15 32 + 16 32 1e 32 + 1f 32 + 20 32 21 32 + 22 32 + 23 32 2a 34 2b 34 + 2c 34 + 2d 34 + 2e 34 + 2f 34 30 34 - 37 37 + 31 34 + 37 30 + 38 30 + 39 30 3a 30 } } diff --git a/plugins/java-decompiler/engine/testData/results/TryToPreserveCast.dec b/plugins/java-decompiler/engine/testData/results/TryToPreserveCast.dec index 53901a74c70c..467a4f47394f 100644 --- a/plugins/java-decompiler/engine/testData/results/TryToPreserveCast.dec +++ b/plugins/java-decompiler/engine/testData/results/TryToPreserveCast.dec @@ -17,10 +17,16 @@ class 'TryToPreserveCast' { } method 'test (Ljava/nio/ByteBuffer;)V' { + 0 8 1 8 2 8 + 3 8 + 4 8 + 6 9 7 9 8 9 + 9 9 + a 9 c 10 } }