Skip to content

Commit 0b81ed6

Browse files
author
Matthias Güdemann
committed
Add regression test for ?store
1 parent 953fb43 commit 0b81ed6

File tree

6 files changed

+53
-0
lines changed

6 files changed

+53
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This regression test is created from the .j file with the jasmin assembler.
2+
https://github.com/Sable/jasmin
3+
4+
On Ubuntu, it is available as jasmin-sable. To convert a .j file, it is
5+
sufficient to do
6+
7+
> jasmin $FILE.j
8+
9+
and it will create the corresponding $FILE.class file.
602 Bytes
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
public class stack_test {
2+
public static void main(String[] args) {
3+
stack_var10 s = new stack_var10();
4+
int n = s.f();
5+
assert(n==0);
6+
}
7+
}
223 Bytes
Binary file not shown.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.class public stack_var10
2+
.super java/lang/Object
3+
4+
.field private static n I
5+
6+
.method public <init>()V
7+
.limit stack 5
8+
aload_0
9+
invokenonvirtual java/lang/Object/<init>()V
10+
return
11+
.end method
12+
13+
.method public f()I
14+
.limit stack 8
15+
.limit locals 5
16+
17+
iconst_1
18+
istore_1
19+
iconst_0
20+
istore_2
21+
;; lvar1 is 1, lvar2 is 0
22+
iload_1
23+
iload_2
24+
;; on stack 1, 0
25+
istore_1
26+
;; store 0 into lvar1
27+
ireturn
28+
.end method
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
stack_test.class
3+
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^.*assertion at file stack_test.java line 5 function.*: FAILURE$
7+
^VERIFICATION FAILED$
8+
--
9+
^warning: ignoring

0 commit comments

Comments
 (0)