class WEIGH_CODE
****


Flattened version is here



Public


Readable Attributes
attr badstmt:$AM_STMT;
**** The unacceptable statement.
attr enclosing_if:AM_IF_STMT;
attr level:INT;
**** Current level of nesting.
attr max_weight:INT;
**** Maximum weight of an inlined routine.
attr true_branch:BOOL;
attr weight:INT;
**** "Weight" of the code encountered so far.

Constants
const assign_weight:INT:=1;
const if_weight:INT:=1;
const iter_call_weight:INT:=4;
const rout_call_weight:INT:=2;

Features
calc_expr_weight (expr:$AM_EXPR)
calc_stmt_list_weight (code:$AM_STMT)
calc_stmt_weight (stmt:$AM_STMT)
clear_badstmt
create (threshold:INT):SAME
uplevel
****


Private

attr badstmt:$AM_STMT;
**** The unacceptable statement.
attr enclosing_if:AM_IF_STMT;
attr level:INT;
**** Current level of nesting.
attr max_weight:INT;
**** Maximum weight of an inlined routine.
attr true_branch:BOOL;
attr weight:INT;
**** "Weight" of the code encountered so far.