/* Used for table comparisons. Can't do fully general comparisons because regular * tables are used for interning the symbols needed for message sending. */ XR sym_num_eq(XR a, XR b) { if (xrIsNum(a)) { if (xrIsNum(b)) { return (a == b) ? VAL_TRUE : VAL_FALSE; } return symbol_eq(0, a, b); } else return symbol_eq(0, b, a); }
int find_var(XR locals, XR var) { int found = -1; xrListEach(locals, index, item, { if (symbol_eq(0, item, var) == VAL_TRUE) { found = index; } });