int maxlocal;
int maxstack;
int maxscope;
+ int flags;
} currentstats_t;
static int stack_minus(code_t*c)
stats->maxstack = stack;
if(scope > stats->maxscope)
stats->maxscope = scope;
+
+ if(op->flags & OP_SET_DXNS)
+ stats->flags |= FLAGS_SET_DXNS;
+ if(op->flags & OP_NEED_ACTIVATION)
+ stats->flags |= FLAGS_ACTIVATION;
if(op->flags & OP_REGISTER) {
char*p = op->params;
current->maxstack = 0;
current->maxscope = 0;
current->num = num;
+ current->flags = 0;
//#define DEBUG_BYTES
#ifdef DEBUG_BYTES
currentstats_t*current = code_get_stats(code, exceptions);
if(!current)
return 0;
- codestats_t*stats = malloc(sizeof(codestats_t));
+ codestats_t*stats = rfx_calloc(sizeof(codestats_t));
stats->local_count = current->maxlocal;
stats->max_stack = current->maxstack;
stats->init_scope_depth = 0;
stats->max_scope_depth = current->maxscope;
+ stats->flags = current->flags;
stats_free(current);current=0;
return stats;