potion  0.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
opcodes.h
Go to the documentation of this file.
1 
6 #ifndef POTION_OPCODES_H
7 #define POTION_OPCODES_H
8 
9 enum PN_OPCODE {
55  OP_TAILCALL, /* TODO */
57  OP_PROTO, /* define a method */
60 };
61 
62 #if defined(__GNUC__)
63 #pragma pack(1)
64 #else
65 #pragma pack(push, 1)
66 #endif
67 
70 typedef struct {
71  enum PN_OPCODE code:8;
72  int a:12;
73  int b:12;
74 } PN_OP;
75 
76 #if defined(__GNUC__)
77 #pragma pack()
78 #else
79 #pragma pack(pop)
80 #endif
81 
82 #define PN_OP_AT(asmb, n) ((PN_OP *)((PNFlex *)asmb)->ptr)[n]
83 #define PN_OP_LEN(asmb) (PN_FLEX_SIZE(asmb) / sizeof(PN_OP))
84 
85 #endif
Definition: opcodes.h:32
Definition: opcodes.h:36
Definition: opcodes.h:34
Definition: opcodes.h:48
Definition: opcodes.h:37
Definition: opcodes.h:31
#define PN_OP(T, A, B)
Warning: This might conflict with the typedef struct PN_OP.
Definition: ast.h:28
Definition: opcodes.h:38
Definition: opcodes.h:41
Definition: opcodes.h:45
PN_OPCODE
Definition: opcodes.h:9
Definition: opcodes.h:28
Definition: opcodes.h:29
Definition: opcodes.h:40
Definition: opcodes.h:35
Definition: opcodes.h:47
Definition: opcodes.h:33
Definition: opcodes.h:39