src/bytecode/procs.c
//////////////////////////////////////////////////////
//
//      Traverse AST to emit IR.
//
//////////////////////////////////////////////////////
Traverse AST to emit IR.
Traverse AST to emit IR .
static void IR_operand_from_sym(IR_Operand* op, Symbol* sym)
{
    if (sym->kind == SYMBOL_VAR) {
        op->kind = IR_OPERAND_VAR;
        op->type = sym->type;
        op->sym = sym;
    }
    else if (sym->kind == SYMBOL_PROC) {
        op->kind = IR_OPERAND_PROC;
        op->type = sym->type;
        op->sym = sym;
    }
    else {
        assert(0);
    }
}
static void IR_operand_from_sym ( IR_Operand * op , Symbol * sym ) { if ( sym -> kind == SYMBOL_VAR ) { op -> kind = IR_OPERAND_VAR ; op -> type = sym -> type ; op -> sym = sym ; } else if ( sym -> kind == SYMBOL_PROC ) { op -> kind = IR_OPERAND_PROC ; op -> type = sym -> type ; op -> sym = sym ; } else { assert ( 0 ) ; } }
Traverse AST to emit IR.
Traverse AST to emit IR .