summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9ae75f9)
raw | patch | inline | side by side (parent: 9ae75f9)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 30 Aug 2017 15:00:05 +0000 (18:00 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 30 Aug 2017 15:00:05 +0000 (18:00 +0300) |
Test.obn | patch | blob | history | |
count.sh | patch | blob | history | |
obn-run-tests.sh | patch | blob | history | |
src/backends/jvm/generator-jvm-abi.c | patch | blob | history | |
tests/Test24.obn | [new file with mode: 0644] | patch | blob |
diff --git a/Test.obn b/Test.obn
index a704f0db4d56d3206461fc18065a9afa32220c0e..6fae5299c4ceb508ddf3708622d39e419e562a12 100644 (file)
--- a/Test.obn
+++ b/Test.obn
MODULE Test;
- TYPE
- CPinfo = RECORD
- tag : INTEGER;
- index : ARRAY 2 OF LONGINT;
- int : LONGINT;
- float : REAL;
- long : HUGEINT;
- double : LONGREAL;
- utf8 : POINTER TO ARRAY OF CHAR;
- END;
-
- CPool = POINTER TO ARRAY OF CPinfo;
-
- VAR
- i : HUGEINT;
- cpool : CPool;
-
-BEGIN
- i := 16;
- NEW(cpool, i);
END Test.
diff --git a/count.sh b/count.sh
index 1e5db9d4cb6161501395c42576d05f640f69d145..57fabcecb1a0d96b5998710264e7c82ae5d68de4 100755 (executable)
--- a/count.sh
+++ b/count.sh
#!/bin/sh
+CompilerSources()
+{
+ find src -name '*.c' -or -name '*.h'
+}
+
+RuntimeSources()
+{
+ find rtl -name '*.java' -or -name '*.obn'
+}
+
+TestsSources()
+{
+ find tests -name '*.obn'
+}
+
+OctaoxygenSources()
+{
+ find octaoxygen -name '*.obn' -or -name '*.Mod'
+}
+
echo Compiler Sources:
-wc -l $(find . -name '*.c' -or -name '*.h')
+wc -l $(CompilerSources)
echo
echo Runtime Library:
-wc -l $(find rtl -name '*.java' -or -name '*.obn')
+wc -l $(RuntimeSources)
echo
echo Tests:
-wc -l $(find tests -name '*.obn')
+wc -l $(TestsSources)
+
+echo
+echo Octaoxygen:
+wc -l $(OctaoxygenSources)
echo
echo Total:
-wc -l $(find . -name '*.c' -or -name '*.h' -or -name '*.java' -or -name '*.obn') | grep total
+wc -l $(CompilerSources) $(RuntimeSources) $(TestsSources) $(OctaoxygenSources) | grep total
diff --git a/obn-run-tests.sh b/obn-run-tests.sh
index 57756c3e9669ed1f9fb5a9a1355b419d3f7b3056..813e6e59970c97932769cd4d01c9cdeb3c4b46d4 100755 (executable)
--- a/obn-run-tests.sh
+++ b/obn-run-tests.sh
makecomp Test23A
makefail Test23B
+
+maketest Test24
index f277188bb6c54f48bff60ae3a1cbae8ca0b2bc81..353ce21e88af205130ec950698296c57b013323f 100644 (file)
p = proc -> gen_proc;
- jvm_generate_staticlinks_recursive(p, proc -> parent, p -> level);
+ jvm_generate_staticlinks_recursive(p, proc -> parent, p -> level - 1);
}
static void
size_t sz = sizeof(*p -> reg_frame) * max_frames;
p -> max_frames = max_frames;
p -> reg_frame = GC_MALLOC(sz);
- memset(p -> reg_frame, 0, sz);
+ memset(p -> reg_frame, 255, sz);
p -> level = max_frames - 1;
- jvm_create_staticlinks_recursive(p, proc -> parent, p -> level);
+
+ jvm_create_staticlinks_recursive(p, proc -> parent, p -> level - 1);
}
static void
diff --git a/tests/Test24.obn b/tests/Test24.obn
--- /dev/null
+++ b/tests/Test24.obn
@@ -0,0 +1,25 @@
+MODULE Test24;
+
+IMPORT Out;
+
+PROCEDURE W;
+ PROCEDURE Z;
+ PROCEDURE Y;
+ PROCEDURE X;
+ BEGIN (* X *)
+ X; Y; Z; W;
+ END X;
+ BEGIN (* Y *)
+ X; Y; Z; W;
+ END Y;
+ BEGIN (* Z *)
+ Y; Z; W;
+ END Z;
+BEGIN (* W *)
+ Z; W;
+END W;
+
+END Test24.
+
+Проверка вложенных процедур.
+Должно как компилироваться, так и проходить верификацию в рантайме.