// Operations on Primitives //////////////////////////////////////////////////////////////////////
static Object callMethodOnPrimitive(Object o, Object method, Object arg0, Object arg1, Object arg2, Object[] rest, int alength) throws JSExn {
+ if (method == null || !(method instanceof String) || "".equals(method))
+ throw new JSExn("attempt to call a non-existant method on a primitive");
+
if (o instanceof Number) {
//#switch(method)
case "toFixed": throw new JSExn("toFixed() not implemented");