equal
deleted
inserted
replaced
6 Instructions of the JVM |
6 Instructions of the JVM |
7 *) |
7 *) |
8 |
8 |
9 JVMInstructions = JVMState + |
9 JVMInstructions = JVMState + |
10 |
10 |
|
11 |
11 datatype |
12 datatype |
12 instr = Load nat (* load from local variable *) |
13 instr = Load nat (* load from local variable *) |
13 | Store nat (* store into local variable *) |
14 | Store nat (* store into local variable *) |
14 | Bipush int (* push int *) |
15 | Bipush int (* push int *) |
15 | Aconst_null (* push null *) |
16 | Aconst_null (* push null *) |
16 | New cname (* create object *) |
17 | New cname (* create object *) |
17 | Getfield vname cname (* Fetch field from object *) |
18 | Getfield vname cname (* Fetch field from object *) |
18 | Putfield vname cname (* Set field in object *) |
19 | Putfield vname cname (* Set field in object *) |
19 | Checkcast cname (* Check whether object is of given type *) |
20 | Checkcast cname (* Check whether object is of given type *) |
20 | Invoke mname "(ty list)" (* inv. instance meth of an object *) |
21 | Invoke cname mname "(ty list)" (* inv. instance meth of an object *) |
21 | Return |
22 | Return |
22 | Pop |
23 | Pop |
23 | Dup |
24 | Dup |
24 | Dup_x1 |
25 | Dup_x1 |
25 | Dup_x2 |
26 | Dup_x2 |