src/codegen.c
static bool
needsOwnInstruction(Expr *exp) {
  switch (exp->type) {
    case EXP_INT:
    case EXP_VAR:
    case EXP_BOOL:
    case EXP_CHAR:
      return false;
    case EXP_BINOP:
    case EXP_FUNCALL:
    case EXP_RECORDLIT:
    case EXP_ADDROF:
    case EXP_DEREF:
    case EXP_INDEX:
    case EXP_ARRAY:
      return true;
    default:
      assert(false);
      exit(1);
  }
}
/* Returns true if the given expression needs its own instruction in the IR,
 * or false if the given instruction can be placed inline. The needsCopy
 * parameter should be used to determine if a copy instruction is needed */
Returns true if the given expression needs its own instruction in the IR,
or false if the given instruction can be placed inline. The needsCopy
parameter should be used to determine if a copy instruction is needed
Returns true if the given expression needs its own instruction in the IR or false if the given instruction can be placed inline . The needsCopy parameter should be used to determine if a copy instruction is needed
static bool
needsOwnInstruction(Expr *exp) {
  switch (exp->type) {
    case EXP_INT:
    case EXP_VAR:
    case EXP_BOOL:
    case EXP_CHAR:
      return false;
    case EXP_BINOP:
    case EXP_FUNCALL:
    case EXP_RECORDLIT:
    case EXP_ADDROF:
    case EXP_DEREF:
    case EXP_INDEX:
    case EXP_ARRAY:
      return true;
    default:
      assert(false);
      exit(1);
  }
}
static bool needsOwnInstruction ( Expr * exp ) { switch ( exp -> type ) { case EXP_INT : case EXP_VAR : case EXP_BOOL : case EXP_CHAR : return false ; case EXP_BINOP : case EXP_FUNCALL : case EXP_RECORDLIT : case EXP_ADDROF : case EXP_DEREF : case EXP_INDEX : case EXP_ARRAY : return true ; default : assert ( false ) ; exit ( 1 ) ; } }
Returns true if the given expression needs its own instruction in the IR,
 or false if the given instruction can be placed inline.
Returns true if the given expression needs its own instruction in the IR or false if the given instruction can be placed inline .