public ILStatement GenerateStatement(ILValue value, IList <ILCase> cases, ILStatement else_statement, int min_index, int max_index, int index) { int less_index = (index + min_index) / 2; int greater_index = (index + max_index) / 2; if (index == min_index || index == max_index) { return(new ILIf( value.GetILEqualTo(label), statement, else_statement )); } return(new ILIf( value.GetILLessThan(label), cases[less_index].GenerateStatement(value, cases, else_statement, min_index, index, less_index), cases[greater_index].GenerateStatement(value, cases, else_statement, index, max_index, greater_index) )); }
static public ILValue GetILIsNull(this ILValue item) { return(item.GetILEqualTo(ILNull.INSTANCE)); }