Skip to content

Commit

Permalink
Merge branch 'add-functions' into split-stack
Browse files Browse the repository at this point in the history
  • Loading branch information
parrt committed Apr 14, 2015
2 parents f641409 + 8a8b169 commit c1b1d29
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/vm/Bytecode.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ public Instruction(String name, int nargs) {
public static final short GSTORE = 13; // store in global memory
public static final short PRINT = 14; // print stack top
public static final short POP = 15; // throw away top of stack
public static final short HALT = 16;
public static final short CALL = 17;
public static final short RET = 18; // return with/without value
public static final short CALL = 16;
public static final short RET = 17; // return with/without value


public static final short HALT = 19;

public static Instruction[] instructions = new Instruction[] {
null, // <INVALID>
Expand All @@ -48,8 +50,8 @@ public Instruction(String name, int nargs) {
new Instruction("gstore", 1),
new Instruction("print"),
new Instruction("pop"),
new Instruction("halt"),
new Instruction("call", 2), // call addr, nargs
new Instruction("ret")
new Instruction("ret"),
new Instruction("halt")
};
}

0 comments on commit c1b1d29

Please sign in to comment.