Allow extension builins to override standard builtins.

This commit is contained in:
Bill Currie 2012-06-28 15:07:03 +09:00
parent 3626f34c9a
commit 64bfde7320

View file

@ -71,12 +71,19 @@ static unsigned
bi_map (progs_t *pr, unsigned binum) bi_map (progs_t *pr, unsigned binum)
{ {
unsigned range; unsigned range;
unsigned base = sv_range << PR_RANGE_SHIFT;
if (sv_range != PR_RANGE_NONE) { if (sv_range != PR_RANGE_NONE) {
range = (binum & PR_RANGE_MASK) >> PR_RANGE_SHIFT; range = (binum & PR_RANGE_MASK) >> PR_RANGE_SHIFT;
if (!range && binum > PR_RANGE_ID_MAX) if (!range) {
binum |= sv_range << PR_RANGE_SHIFT; if (binum > PR_RANGE_ID_MAX) {
binum |= base;
} else {
if (PR_FindBuiltinNum (pr, binum | base))
binum |= base;
}
}
} }
return binum; return binum;
} }