Skip to content

Commit 1010fbf

Browse files
committed
more revisions
1 parent 75188df commit 1010fbf

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed

FernFlower-Patches/0050-Make-classpath-loading-lazy.patch

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,18 @@ index 464e41a3cd428e1883230bda55fa64172697d1c2..ac3997dc7910f7844b583699c532edfa
204204
}
205205
}
206206
diff --git a/src/org/jetbrains/java/decompiler/main/decompiler/BaseDecompiler.java b/src/org/jetbrains/java/decompiler/main/decompiler/BaseDecompiler.java
207-
index 7837939efab2b1caf023dc2f5b0a52659ce032bd..eb837996028dd156e8e79435118aa9dd018d644b 100644
207+
index 7837939efab2b1caf023dc2f5b0a52659ce032bd..879d6aa53be80974d6b432a6bdbb58526388362d 100644
208208
--- a/src/org/jetbrains/java/decompiler/main/decompiler/BaseDecompiler.java
209209
+++ b/src/org/jetbrains/java/decompiler/main/decompiler/BaseDecompiler.java
210-
@@ -13,10 +13,15 @@ import java.util.Map;
210+
@@ -3,6 +3,7 @@ package org.jetbrains.java.decompiler.main.decompiler;
211+
212+
import org.jetbrains.java.decompiler.main.Fernflower;
213+
import org.jetbrains.java.decompiler.main.extern.IBytecodeProvider;
214+
+import org.jetbrains.java.decompiler.main.extern.IContextSource;
215+
import org.jetbrains.java.decompiler.main.extern.IFernflowerLogger;
216+
import org.jetbrains.java.decompiler.main.extern.IResultSaver;
217+
218+
@@ -13,14 +14,27 @@ import java.util.Map;
211219
public class BaseDecompiler {
212220
private final Fernflower engine;
213221

@@ -219,10 +227,22 @@ index 7837939efab2b1caf023dc2f5b0a52659ce032bd..eb837996028dd156e8e79435118aa9dd
219227
+ public BaseDecompiler(IResultSaver saver, Map<String, Object> options, IFernflowerLogger logger) {
220228
+ engine = new Fernflower(saver, options, logger);
221229
+ }
230+
+
231+
+ public void addSource(IContextSource source) {
232+
+ engine.addSource(source);
233+
+ }
222234
+
223235
public void addSource(File source) {
224236
engine.addSource(source);
225237
}
238+
239+
+ public void addLibrary(IContextSource library) {
240+
+ engine.addLibrary(library);
241+
+ }
242+
+
243+
public void addLibrary(File library) {
244+
engine.addLibrary(library);
245+
}
226246
diff --git a/src/org/jetbrains/java/decompiler/main/decompiler/ConsoleDecompiler.java b/src/org/jetbrains/java/decompiler/main/decompiler/ConsoleDecompiler.java
227247
index 3e939e4e5a39fce84d694a02e2e53ec486e50ba5..056ca56d6e598c97c07e19ea5a4038738328f284 100644
228248
--- a/src/org/jetbrains/java/decompiler/main/decompiler/ConsoleDecompiler.java
@@ -637,7 +657,7 @@ index ba09aa17789940419bb4bf45bd1aaddda9189ca5..b72485100b9b25b1fe27966cc7b8b553
637657
stack.add(clParent);
638658
stackSubNodes.add(node);
639659
diff --git a/src/org/jetbrains/java/decompiler/struct/ContextUnit.java b/src/org/jetbrains/java/decompiler/struct/ContextUnit.java
640-
index 5e119e5030efab2bccc1bd96601075c081056339..1c6cf593d737a37c498a0ee40920a8c7e287a800 100644
660+
index 5e119e5030efab2bccc1bd96601075c081056339..0816efb081b72dc7ce704ea92a2503b83012854a 100644
641661
--- a/src/org/jetbrains/java/decompiler/struct/ContextUnit.java
642662
+++ b/src/org/jetbrains/java/decompiler/struct/ContextUnit.java
643663
@@ -2,15 +2,13 @@
@@ -659,7 +679,7 @@ index 5e119e5030efab2bccc1bd96601075c081056339..1c6cf593d737a37c498a0ee40920a8c7
659679
import java.nio.charset.StandardCharsets;
660680
import java.util.ArrayList;
661681
import java.util.List;
662-
@@ -18,221 +16,187 @@ import java.util.concurrent.ExecutionException;
682+
@@ -18,220 +16,186 @@ import java.util.concurrent.ExecutionException;
663683
import java.util.concurrent.ExecutorService;
664684
import java.util.concurrent.Executors;
665685
import java.util.concurrent.Future;
@@ -1016,13 +1036,11 @@ index 5e119e5030efab2bccc1bd96601075c081056339..1c6cf593d737a37c498a0ee40920a8c7
10161036
- resultSaver.closeArchive(archivePath, filename);
10171037
+ }
10181038
}
1019-
- }
10201039
+
10211040
+ sink.close();
1022-
+}
1041+
}
10231042

10241043
private static void waitForAll(List<Future<?>> futures) {
1025-
for (Future<?> future : futures) {
10261044
@@ -244,16 +208,19 @@ public class ContextUnit {
10271045
}
10281046
}

FernFlower-Patches/0051-Add-jrt-option-to-load-classes-from-a-specific-JVM.patch

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ index 23ed017fc66747daf2f7b603df7d123835145570..a72ad0aba0523cd803b4832b9e95d7f6
6969
defaults.put(EXPLICIT_GENERIC_ARGUMENTS, "0");
7070
defaults.put(INLINE_SIMPLE_LAMBDAS, "1");
7171
diff --git a/src/org/jetbrains/java/decompiler/struct/attr/StructModuleAttribute.java b/src/org/jetbrains/java/decompiler/struct/attr/StructModuleAttribute.java
72-
index 9fd6f89ddb90e1b348078a0615f3808007cc5aa4..efcb793b82388f3730f130ed0f02e0571fdb3da0 100644
72+
index 9fd6f89ddb90e1b348078a0615f3808007cc5aa4..fd1cf8a82a419524143e95d147c33e5f9773dca7 100644
7373
--- a/src/org/jetbrains/java/decompiler/struct/attr/StructModuleAttribute.java
7474
+++ b/src/org/jetbrains/java/decompiler/struct/attr/StructModuleAttribute.java
75-
@@ -1,13 +1,18 @@
75+
@@ -1,13 +1,17 @@
7676
// Copyright 2000-2021 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.
7777
package org.jetbrains.java.decompiler.struct.attr;
7878

@@ -82,7 +82,6 @@ index 9fd6f89ddb90e1b348078a0615f3808007cc5aa4..efcb793b82388f3730f130ed0f02e057
8282

8383
import java.io.IOException;
8484
+import java.lang.module.ModuleDescriptor;
85-
+import java.lang.module.ModuleDescriptor.Version;
8685
import java.util.ArrayList;
8786
import java.util.Collections;
8887
+import java.util.EnumSet;
@@ -91,7 +90,7 @@ index 9fd6f89ddb90e1b348078a0615f3808007cc5aa4..efcb793b82388f3730f130ed0f02e057
9190

9291
public class StructModuleAttribute extends StructGeneralAttribute {
9392
public String moduleName;
94-
@@ -38,6 +43,65 @@ public class StructModuleAttribute extends StructGeneralAttribute {
93+
@@ -38,6 +42,65 @@ public class StructModuleAttribute extends StructGeneralAttribute {
9594
this.provides = readProvides(data, pool);
9695
}
9796

@@ -111,7 +110,7 @@ index 9fd6f89ddb90e1b348078a0615f3808007cc5aa4..efcb793b82388f3730f130ed0f02e057
111110
+ if ((requires.flags & CodeConstants.ACC_SYNTHETIC) != 0) rMods.add(ModuleDescriptor.Requires.Modifier.SYNTHETIC);
112111
+ if ((requires.flags & CodeConstants.ACC_MANDATED) != 0) rMods.add(ModuleDescriptor.Requires.Modifier.MANDATED);
113112
+ if (requires.moduleVersion != null) {
114-
+ builder.requires(rMods, requires.moduleName, Version.parse(requires.moduleVersion));
113+
+ builder.requires(rMods, requires.moduleName, ModuleDescriptor.Version.parse(requires.moduleVersion));
115114
+ } else {
116115
+ builder.requires(rMods, requires.moduleName);
117116
+ }

0 commit comments

Comments
 (0)