fun->interpreted = JS_FALSE; fun->nregexps = 0;
js_NewFunction(JSContext *cx, JSObject *funobj, JSNative native, uintN nargs,               uintN flags, JSObject *parent, JSAtom *atom){    JSFunction *fun;    /* Allocate a function struct. */    fun = (JSFunction *) JS_malloc(cx, sizeof *fun);    if (!fun)        return NULL;    /* If funobj is null, allocate an object for it. */    if (funobj) {        OBJ_SET_PARENT(cx, funobj, parent);    } else {        funobj = js_NewObject(cx, &js_FunctionClass, NULL, parent);        if (!funobj) {            JS_free(cx, fun);            return NULL;        }    }    /* Initialize all function members. */    fun->nrefs = 0;    fun->object = NULL;    fun->native = native;    fun->script = NULL;    fun->nargs = nargs;    fun->extra = 0;    fun->nvars = 0;    fun->flags = flags & JSFUN_FLAGS_MASK;    fun->spare = 0;    fun->atom = atom;    fun->clasp = NULL;    /* Link fun to funobj and vice versa. */    if (!js_LinkFunctionObject(cx, fun, funobj)) {        cx->newborn[GCX_OBJECT] = NULL;        JS_free(cx, fun);        return NULL;    }    return fun;}