00001
00002
00003
00004
00005
00006
00007
00008 #ifndef DOCODE_H
00009 #define DOCODE_H
00010
00011 #define DO_LVALUE 1
00012 #define DO_NOT_COPY 2
00013 #define DO_POP 4
00014 #define DO_INDIRECT 8
00015 #define DO_LVALUE_IF_POSSIBLE 16
00016 #define DO_NOT_COPY_TOPLEVEL 32
00017
00018 #define WANT_LVALUE (DO_LVALUE | DO_INDIRECT)
00019
00020 #define emit0(X) insert_opcode0((X),lex.current_line, lex.current_file)
00021 #define emit1(X,Y) insert_opcode1((X),(Y),lex.current_line, lex.current_file)
00022 #define emit2(X,Y,Z) insert_opcode2((X),(Y),(Z),lex.current_line, lex.current_file)
00023
00024
00025 void upd_int(int offset, INT32 tmp);
00026 INT32 read_int(int offset);
00027 void push_address(void);
00028 void push_explicit(INT32 address);
00029 INT32 pop_address(void);
00030 int alloc_label(void);
00031 int do_jump(int token,INT32 lbl);
00032 void do_pop(int x);
00033 int do_docode(node *n, int flags);
00034 void do_cond_jump(node *n, int label, int iftrue, int flags);
00035 INT32 do_code_block(node *n);
00036 INT32 docode(node *n);
00037
00038
00039 #endif