bool is_loop() const;
bool is_in_loop() const;
bool is_conditional() const;
- bool is_conditional_in_loop() const;
bool break_is_for_switchcase() const;
bool contains_range_of(const prog_scope& other) const;
- const st_src_reg *switch_register() const;
void set_end(int end);
void set_loop_break_line(int line);
int scope_end;
int break_loop_line;
prog_scope *parent_scope;
- const st_src_reg *switch_reg;
};
/* Some storage class to encapsulate the prog_scope (de-)allocations */
scope_begin(scope_begin),
scope_end(-1),
break_loop_line(numeric_limits<int>::max()),
- parent_scope(parent),
- switch_reg(nullptr)
+ parent_scope(parent)
{
}
return false;
}
-bool prog_scope::is_conditional_in_loop() const
-{
- return is_conditional() && is_in_loop();
-}
-
const prog_scope *prog_scope::innermost_loop() const
{
if (scope_type == loop_body)
return nullptr;
}
-const st_src_reg *prog_scope::switch_register() const
-{
- return switch_reg;
-}
-
const prog_scope *prog_scope::in_switchcase_scope() const
{
if (scope_type == switch_case_branch ||