Started work on mapping bytecode instructions to source code lines

This commit is contained in:
Stiver
2014-10-01 07:00:11 +02:00
parent 91c64c5a94
commit f735cbc7ea
33 changed files with 375 additions and 153 deletions

View File

@@ -15,6 +15,7 @@
*/
package org.jetbrains.java.decompiler.main;
import org.jetbrains.java.decompiler.main.collectors.BytecodeSourceMapper;
import org.jetbrains.java.decompiler.main.collectors.CounterContainer;
import org.jetbrains.java.decompiler.main.collectors.ImportCollector;
import org.jetbrains.java.decompiler.main.collectors.VarNamesCollector;
@@ -45,6 +46,7 @@ public class DecompilerContext {
private ClassesProcessor classProcessor;
private PoolInterceptor poolInterceptor;
private IFernflowerLogger logger;
private BytecodeSourceMapper bytecodeSourceMapper;
private DecompilerContext(Map<String, Object> properties) {
this.properties = properties;
@@ -126,6 +128,14 @@ public class DecompilerContext {
getCurrentContext().poolInterceptor = poolinterceptor;
}
public static BytecodeSourceMapper getBytecodeSourceMapper() {
return getCurrentContext().bytecodeSourceMapper;
}
public static void setBytecodeSourceMapper(BytecodeSourceMapper bytecodeSourceMapper) {
getCurrentContext().bytecodeSourceMapper = bytecodeSourceMapper;
}
public static IFernflowerLogger getLogger() {
return getCurrentContext().logger;
}