Skip to content

Commit

Permalink
Added opcodes 0x9 and 0xA
Browse files Browse the repository at this point in the history
  • Loading branch information
texel-sensei committed Aug 15, 2017
1 parent 4565c81 commit 340a51c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Jasm/op_desc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
std::vector<op_sig> signatures = {
{}, // 0
{OP_ENDPROGRAM ,{par_type::ignored , par_type::ignored , par_type::ignored }, par_type::ignored },
{ OP_JUMP_DEPRECATED,{par_type::ignored , par_type::ignored , par_type::ignored }, par_type::jmp_dest },
{OP_JUMP_DEPRECATED,{par_type::ignored , par_type::ignored , par_type::ignored }, par_type::jmp_dest },
{OP_FUNCTION ,{par_type::ignored , par_type::ignored , par_type::type }, par_type::function },
{OP_ENDFUNCTION ,{par_type::ignored , par_type::ignored , par_type::ignored }, par_type::ignored },
{OP_LOCAL ,{par_type::ignored , par_type::ignored , par_type::type }, par_type::variable },
{OP_GLOBAL ,{par_type::ignored , par_type::ignored , par_type::type }, par_type::variable },
{OP_CONSTANT ,{par_type::ignored , par_type::ignored , par_type::type }, par_type::variable },
{OP_POPFUNCARG ,{par_type::ignored , par_type::integer , par_type::type }, par_type::variable },
{}, // 9
{}, // A
{OP_EXTENDS ,{par_type::ignored , par_type::ignored , par_type::ignored }, par_type::variable },
{OP_TYPE ,{par_type::ignored , par_type::ignored , par_type::ignored }, par_type::variable },
{OP_CLEANSTACK ,{par_type::ignored , par_type::ignored , par_type::integer }, par_type::ignored },
{OP_LITERAL ,{par_type::ignored , par_type::type , par_type::reg }, par_type::integer },
{OP_MOV ,{par_type::ignored , par_type::reg , par_type::reg }, par_type::ignored },
Expand Down
4 changes: 2 additions & 2 deletions Jasm/op_names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
0x6 global
0x7 const
0x8 poparg
0x9 type
0xa extends
0x9 extends
0xa type
0xb cleanstack
0xc literal
0xd mov
Expand Down
4 changes: 2 additions & 2 deletions Jasm/opcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const char* op_names[46] =
"global",
"const",
"poparg",
"type",
op_unknown, // 10
"extend",
"type", // 10
"cleanstack",
"literal",
"mov",
Expand Down
5 changes: 3 additions & 2 deletions Jasm/opcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ enum OPCODES : unsigned char
OP_POPFUNCARG = 0x8, //Create a local var and assign a value to it directly from the caller's
//stack. Arg1 = Type, Arg2 = #FuncArg, Data = Variable Name

OP_TYPE = 0x9,
OP_EXTENDS = 0xA, //Used only by parser, ignored by VM
OP_EXTENDS = 0x9, //Used only by parser, ignored by VM
OP_TYPE = 0xA,


OP_CLEANSTACK = 0xB, //Pops <Arg1> values from the stack. Used after calling Jass functions,
//not needed when calling natives.
Expand Down

0 comments on commit 340a51c

Please sign in to comment.