mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-27 00:38:02 +00:00
Merge branch 'main' into testsuites
This commit is contained in:
commit
de9365d5c9
@ -9,7 +9,7 @@
|
||||
|
||||
## Erbrachte Leistungen
|
||||
- Laura Schleicher: Grammatik entwickeln, Records, Statements als Liste zurückgeben, Generator, Syntactic Sugar auflösen
|
||||
- Julian Kraus: Grammatik entwickeln, Generator, Syntactic Sugar auflösen
|
||||
- Julian Kraus: Grammatik entwickeln, Generator, Syntactic Sugar auflösen, custom Exceptions im Parser
|
||||
- Ahmad Juha: Typcheck
|
||||
- Simon Wittmann: Codegen und Tool für ASM
|
||||
- Jonathan Fleischmann:
|
||||
|
@ -90,7 +90,7 @@ public class Compiler {
|
||||
options.addOption("d", "debug", false, "Enable debug logging");
|
||||
|
||||
CommandLineParser parser = new DefaultParser();
|
||||
CommandLine cmd = null;
|
||||
CommandLine cmd;
|
||||
try {
|
||||
cmd = parser.parse(options, args);
|
||||
} catch (ParseException e) {
|
||||
|
@ -28,8 +28,7 @@ public class MethodContext {
|
||||
private final Deque<Label> continueLabels = new ArrayDeque<>();
|
||||
|
||||
public MethodContext(ClassContext classContext, MethodVisitor mv, Type returnType) {
|
||||
// if DEBUG env variable is set, log all method calls
|
||||
if (System.getenv("DEBUG") != null) {
|
||||
if (Objects.equals(System.getenv("DEBUG"), "true")) {
|
||||
this.mv = new LoggingMethodVisitor(mv);
|
||||
} else {
|
||||
this.mv = mv;
|
||||
@ -85,7 +84,6 @@ public class MethodContext {
|
||||
}
|
||||
|
||||
public void wrapUp() {
|
||||
//if return type is void, add return instruction
|
||||
if (returnType.getKind() == Type.Kind.VOID) {
|
||||
mv.visitInsn(Opcodes.RETURN);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user