summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 833752b)
raw | patch | inline | side by side (parent: 833752b)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 21 Aug 2017 11:53:10 +0000 (14:53 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 21 Aug 2017 11:53:10 +0000 (14:53 +0300) |
rtl/java/SYSTEM.java | patch | blob | history | |
src/backends/jvm/generator-jvm-asm.c | patch | blob | history | |
src/backends/jvm/generator-jvm.c | patch | blob | history | |
src/oberon.c | patch | blob | history |
diff --git a/rtl/java/SYSTEM.java b/rtl/java/SYSTEM.java
index 20cbe60f2115f1167d1076d32f81b2f7a3040386..bc824fa381d4b8068acb8543192b0311f4fabd36 100644 (file)
--- a/rtl/java/SYSTEM.java
+++ b/rtl/java/SYSTEM.java
{
throw new RuntimeException("NOT IMPLEMENTED");
}
+ else if(n == -4)
+ {
+ throw new RuntimeException("RETURN TRAP");
+ }
else
{
throw new RuntimeException("TRAP CODE " + n);
index bd1812c00d0d74309faee20c12301a3102675f42..4d0e471bf5abc0ad7027da13c4c5d8c4f35819f1 100644 (file)
{
jvm_generate(p, 0, 1, "fconst_0");
}
- if(f == 1.0)
+ else if(f == 1.0)
{
jvm_generate(p, 0, 1, "fconst_1");
}
- if(f == 2.0)
+ else if(f == 2.0)
{
jvm_generate(p, 0, 1, "fconst_2");
}
{
jvm_generate(p, 0, 2, "dconst_0");
}
- if(f == 1.0)
+ else if(f == 1.0)
{
jvm_generate(p, 0, 2, "dconst_1");
}
index c389ebce731e08fd36d13c36fceff9083f2308b9..cb8eeef564ba2925b7eb5701002253f79cdd47d4 100644 (file)
#include <gc.h>
#include "../../oberon-internals.h"
+#include "../../generator.h"
#include "generator-jvm.h"
#include "generator-jvm-abi.h"
#include "generator-jvm-asm.h"
m = ctx -> mod -> gen_mod;
p = m -> class -> p;
+ oberon_generate_trap(ctx, -4);
jvm_generate_function_end(p);
}
diff --git a/src/oberon.c b/src/oberon.c
index 72bf1c68b5a1f774c8284b4cab65a17c6adfc788..437e7694205489c681c5da3757bdc7e58a42ad39 100644 (file)
--- a/src/oberon.c
+++ b/src/oberon.c
oberon_error(ctx, "procedure name not matched");
}
- if(proc -> type -> base -> class == OBERON_TYPE_NOTYPE
- && proc -> has_return == 0)
+ if(proc -> type -> base -> class == OBERON_TYPE_NOTYPE)
{
oberon_make_return(ctx, NULL);
}