remove old loop break/cont stuff

This commit is contained in:
Brian 2007-02-07 16:19:19 -07:00
parent b35b4566c2
commit 2c75ef62ea
2 changed files with 4 additions and 16 deletions

View file

@ -2295,25 +2295,15 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper)
case slang_oper_while: case slang_oper_while:
return _slang_gen_while(A, oper); return _slang_gen_while(A, oper);
case slang_oper_break: case slang_oper_break:
if (!A->CurLoop && !A->CurLoopBreak) { if (!A->CurLoop) {
RETURN_ERROR("'break' not in loop", 0); RETURN_ERROR("'break' not in loop", 0);
} }
if (UseHighLevelInstructions) { return new_break(A->CurLoop);
return new_break(A->CurLoop);
}
else {
return new_jump(A->CurLoopBreak);
}
case slang_oper_continue: case slang_oper_continue:
if (!A->CurLoop && !A->CurLoopCont) { if (!A->CurLoop) {
RETURN_ERROR("'continue' not in loop", 0); RETURN_ERROR("'continue' not in loop", 0);
} }
if (UseHighLevelInstructions) { return new_cont(A->CurLoop);
return new_cont(A->CurLoop);
}
else {
return new_jump(A->CurLoopCont);
}
case slang_oper_discard: case slang_oper_discard:
return new_node0(IR_KILL); return new_node0(IR_KILL);

View file

@ -61,8 +61,6 @@ typedef struct slang_assemble_ctx_
struct gl_program *program; struct gl_program *program;
slang_var_table *vartable; slang_var_table *vartable;
struct slang_function_ *CurFunction; struct slang_function_ *CurFunction;
slang_atom CurLoopBreak;
slang_atom CurLoopCont;
struct slang_ir_node_ *CurLoop; struct slang_ir_node_ *CurLoop;
} slang_assemble_ctx; } slang_assemble_ctx;