File: opcodes.h

package info (click to toggle)
asymptote 3.02%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 33,400 kB
  • sloc: cpp: 172,516; ansic: 69,728; python: 14,967; sh: 5,599; javascript: 4,866; lisp: 1,507; perl: 1,417; makefile: 1,028; yacc: 610; lex: 449; xml: 182; asm: 8
file content (46 lines) | stat: -rw-r--r-- 916 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*****
 * opcodes.h
 * Andy Hammerlindl 2010/10/24
 *
 * A list of the virtual machine opcodes, defined by the macro OPCODE.
 *****/

/* The first parameter is the name of the opcode.  The second parameter is a
 * character indicating what additional information (if any) is encoded with
 * the opcode:
 *   x - nothing
 *   n - integer
 *   t - item
 *   b - builtin
 *   l - lambda pointer
 *   o - instruction offset
 */

OPCODE(nop, 'x')
OPCODE(pop,'x')
OPCODE(intpush,'n')
OPCODE(constpush,'t')
OPCODE(varpush,'n')
OPCODE(varsave,'n')
OPCODE(fieldpush,'n')
OPCODE(fieldsave,'n')
OPCODE(builtin,'b')
OPCODE(jmp,'o')
OPCODE(cjmp,'o')
OPCODE(njmp,'o')
OPCODE(popcall,'x')
OPCODE(pushclosure,'x')
OPCODE(makefunc,'l')
OPCODE(ret,'x')
OPCODE(pushframe,'n')
OPCODE(popframe,'x')

OPCODE(push_default,'x')
OPCODE(jump_if_not_default,'o')

#ifdef COMBO
OPCODE(varpop,'n')
OPCODE(fieldpop,'n')

OPCODE(gejmp,'o')
#endif