* \param add_span_data add_span_data passed into bc_calc_len()
* \param bc bytecode containing span
* \param id non-zero identifier for span; may be any non-zero value
+ * if <0, expand is called for any change;
+ * if >0, expand is only called when exceeds threshold
* \param value dependent value for bytecode expansion
* \param neg_thres negative threshold for long/short decision
* \param pos_thres positive threshold for long/short decision
span->items[i].data.intn = yasm_intnum_create_int(0);
/* Check for circular references */
- if (span->id == 0 &&
+ if (span->id <= 0 &&
((span->bc->bc_index > span->terms[i].precbc->bc_index &&
span->bc->bc_index <= span->terms[i].precbc2->bc_index) ||
(span->bc->bc_index > span->terms[i].precbc2->bc_index &&
if (span->new_val == LONG_MAX)
span->active = 0;
- /* If id=0, flag update on any change */
- if (span->id == 0)
+ /* If id<=0, flag update on any change */
+ if (span->id <= 0)
return (span->new_val != span->cur_val);
return (span->new_val < span->neg_thres
int bt_size = 0, dep_bt_size = 0;
/* Only check for cycles in id=0 spans */
- if (depspan->id != 0)
+ if (depspan->id > 0)
return;
/* Check for a circular reference by looking to see if this dependent
return; /* didn't exceed thresholds, we're done */
/* Exceeded thresholds, need to add to Q for expansion */
- if (span->id == 0)
+ if (span->id <= 0)
STAILQ_INSERT_TAIL(&optd->QA, span, linkq);
else
STAILQ_INSERT_TAIL(&optd->QB, span, linkq);
/* Look for cycles in times expansion (span.id==0) */
TAILQ_FOREACH(span, &optd.spans, link) {
- if (span->id != 0)
+ if (span->id > 0)
continue;
optd.span = span;
IT_enumerate(optd.itree, (long)span->bc->bc_index,