if (argc > 1) { length = (jsuint) argc; vector = argv; } else if (!JSVAL_IS_NUMBER(argv[0])) { length = 1; vector = argv; } else if (ValueIsLength(cx, argv[0], &length)) { vector = NULL; } else { return JS_FALSE; }
if (!ValueIsLength(cx, argv[0], &length)) return JS_FALSE; vector = NULL;
Array(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){    jsuint length;    jsval *vector;    /* If called without new, replace obj with a new Array object. */    if (!(cx->fp->flags & JSFRAME_CONSTRUCTING)) {	obj = js_NewObject(cx, &js_ArrayClass, NULL, NULL);	if (!obj)	    return JS_FALSE;	*rval = OBJECT_TO_JSVAL(obj);    }    if (argc == 0) {	length = 0;	vector = NULL;    } else if (cx->version == JSVERSION_1_2) {	length = (jsuint) argc;	vector = argv;    } else {        if (argc > 1) {	    length = (jsuint) argc;	    vector = argv;        } else if (!JSVAL_IS_NUMBER(argv[0])) {	    length = 1;	    vector = argv;        } else if (ValueIsLength(cx, argv[0], &length)) {	    vector = NULL;	} else {	    return JS_FALSE;	}    }    return InitArrayObject(cx, obj, length, vector);}