RuntimeException NewOpTypeError(string op, int idx) { var info = GetOperandNameAndScope(idx); return(NewRuntimeError("attempt to {0} {1} '{2}' (a {3} value) ", op, info.Item1, info.Item2, ValueUtils.GetTypeName(_stack[idx]))); }
void CheckCompareType(int b, int c, string op) { if (_stack[b] is double && _stack[c] is double) { } else { throw NewRuntimeError("attemp to compare({0}) {1} with {2}", op, ValueUtils.GetTypeName(_stack[b]), ValueUtils.GetTypeName(_stack[c])); } }