Browse Source

Minor change to debug output; generated classes are now written in the /classes directory.

Stan Hebben 6 years ago
parent
commit
fe3714e9ba

+ 1
- 1
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/JavaCompiler.java View File

50
 	}
50
 	}
51
 
51
 
52
 	public JavaCompiler(boolean debug, File jarFile) {
52
 	public JavaCompiler(boolean debug, File jarFile) {
53
-		target = new JavaModule();
53
+		target = new JavaModule(new File("classes"));
54
 		this.jarFile = jarFile;
54
 		this.jarFile = jarFile;
55
 		this.context = new JavaBytecodeContext(target);
55
 		this.context = new JavaBytecodeContext(target);
56
 		
56
 		

+ 1
- 0
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/JavaModule.java View File

27
 	
27
 	
28
 	public JavaModule(File debugOutput) {
28
 	public JavaModule(File debugOutput) {
29
 		this.debugOutput = debugOutput;
29
 		this.debugOutput = debugOutput;
30
+		debugOutput.mkdirs();
30
 	}
31
 	}
31
 	
32
 	
32
 	public void register(String classname, byte[] bytecode) {
33
 	public void register(String classname, byte[] bytecode) {

+ 0
- 4
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/JavaWriter.java View File

60
         this(visitor, true, method, forDefinition, signature, exceptions, annotations);
60
         this(visitor, true, method, forDefinition, signature, exceptions, annotations);
61
     }
61
     }
62
 
62
 
63
-    private static String internal(Class aClass) {
64
-        return Type.getInternalName(aClass);
65
-    }
66
-
67
     public void enableDebug() {
63
     public void enableDebug() {
68
         debug = true;
64
         debug = true;
69
     }
65
     }

+ 0
- 9
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/definitions/JavaOptionInfoTag.java View File

1
-package org.openzen.zenscript.javabytecode.compiler.definitions;
2
-
3
-public class JavaOptionInfoTag {
4
-	public final int number;
5
-
6
-	public JavaOptionInfoTag(int number) {
7
-		this.number = number;
8
-	}
9
-}

Loading…
Cancel
Save