Browse Source

Removed debug .class file dumps

kindlich 5 years ago
parent
commit
9bd9528c43
No known key found for this signature in database

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

@@ -21,8 +21,6 @@ import org.openzen.zenscript.javabytecode.JavaLocalVariableInfo;
21 21
 import org.openzen.zenscript.javabytecode.compiler.JavaModificationExpressionVisitor.PushOption;
22 22
 import org.openzen.zenscript.javashared.*;
23 23
 
24
-import java.io.FileOutputStream;
25
-import java.io.IOException;
26 24
 import java.lang.reflect.Method;
27 25
 import java.lang.reflect.Modifier;
28 26
 import java.util.Arrays;
@@ -2086,12 +2084,6 @@ public class JavaExpressionVisitor implements ExpressionVisitor<Void>, JavaNativ
2086 2084
 
2087 2085
 		context.register(className, lambdaCW.toByteArray());
2088 2086
 
2089
-		try (FileOutputStream out = new FileOutputStream(className + ".class")) {
2090
-			out.write(lambdaCW.toByteArray());
2091
-		} catch (IOException e) {
2092
-			e.printStackTrace();
2093
-		}
2094
-
2095 2087
 		return null;
2096 2088
 	}
2097 2089
 
@@ -4119,15 +4111,6 @@ public class JavaExpressionVisitor implements ExpressionVisitor<Void>, JavaNativ
4119 4111
 		javaWriter.dupX1();
4120 4112
 		javaWriter.swap();
4121 4113
 		javaWriter.invokeSpecial(className, "<init>", constructorDesc);
4122
-
4123
-		//Debug-only, remove later
4124
-		if(true) {
4125
-			try (FileOutputStream out = new FileOutputStream(className + ".class")) {
4126
-				out.write(lambdaCW.toByteArray());
4127
-			} catch (IOException e) {
4128
-				e.printStackTrace();
4129
-			}
4130
-		}
4131 4114
 	}
4132 4115
 
4133 4116
 	@Override

+ 1
- 18
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/definitions/JavaDefinitionVisitor.java View File

@@ -28,8 +28,6 @@ import org.openzen.zenscript.javashared.JavaModifiers;
28 28
 import org.openzen.zenscript.javashared.JavaTypeGenericVisitor;
29 29
 import org.openzen.zenscript.javashared.JavaVariantOption;
30 30
 
31
-import java.io.FileOutputStream;
32
-import java.io.IOException;
33 31
 import java.util.ArrayList;
34 32
 import java.util.List;
35 33
 
@@ -186,15 +184,7 @@ public class JavaDefinitionVisitor implements DefinitionVisitor<byte[]> {
186 184
 		writer.visitEnd();
187 185
 
188 186
 
189
-		final byte[] classBytes = writer.toByteArray();
190
-
191
-		try (FileOutputStream out = new FileOutputStream("ttt.class")) {
192
-			out.write(classBytes);
193
-		} catch (IOException e) {
194
-			e.printStackTrace();
195
-		}
196
-
197
-		return classBytes;
187
+		return writer.toByteArray();
198 188
 	}
199 189
 
200 190
 	@Override
@@ -303,13 +293,6 @@ public class JavaDefinitionVisitor implements DefinitionVisitor<byte[]> {
303 293
 			optionWriter.visitEnd();
304 294
 			final byte[] byteArray = optionWriter.toByteArray();
305 295
 			context.register(optionTag.variantOptionClass.internalName, byteArray);
306
-
307
-			//Print the option files, won't be in production
308
-			try (FileOutputStream out = new FileOutputStream(optionTag.variantOptionClass.internalName.replace('/', '_') + ".class")) {
309
-				out.write(byteArray);
310
-			} catch (IOException e) {
311
-				e.printStackTrace();
312
-			}
313 296
 		}
314 297
 
315 298
 

Loading…
Cancel
Save