for (sprop = scope->props; ; sprop = sprop->next) {
for (sprop = scope->lastProp; ; sprop = sprop->parent) {
js_MarkGCThing(JSContext *cx, void *thing, void *arg){    uint8 flags, *flagp;    JSRuntime *rt;    JSObject *obj;    uint32 nslots;    jsval v, *vp, *end;    JSString *str;#ifdef GC_MARK_DEBUG    JSScope *scope;    JSScopeProperty *sprop;#endif    if (!thing)	return;    flagp = js_GetGCThingFlags(thing);    flags = *flagp;    JS_ASSERT(flags != GCF_FINAL);#ifdef GC_MARK_DEBUG    if (js_LiveThingToFind == thing)        gc_dump_thing(thing, flags, arg, stderr);#endif    if (flags & GCF_MARK)	return;    *flagp |= GCF_MARK;    rt = cx->runtime;    METER(if (++rt->gcStats.depth > rt->gcStats.maxdepth)	      rt->gcStats.maxdepth = rt->gcStats.depth);#ifdef GC_MARK_DEBUG    if (js_DumpGCHeap)        gc_dump_thing(thing, flags, arg, js_DumpGCHeap);#endif    switch (flags & GCF_TYPEMASK) {      case GCX_OBJECT:	obj = (JSObject *) thing;	vp = obj->slots;        if (!vp) {            /* If obj->slots is null, obj must be a newborn. */            JS_ASSERT(!obj->map);            goto out;        }        nslots = (obj->map->ops->mark)                 ? obj->map->ops->mark(cx, obj, arg)                 : JS_MIN(obj->map->freeslot, obj->map->nslots);#ifdef GC_MARK_DEBUG        scope = OBJ_IS_NATIVE(obj) ? OBJ_SCOPE(obj) : NULL;#endif        for (end = vp + nslots; vp < end; vp++) {            v = *vp;            if (JSVAL_IS_GCTHING(v)) {#ifdef GC_MARK_DEBUG                char name[32];                if (scope) {                    uint32 slot;                    jsval nval;                    slot = vp - obj->slots;                    for (sprop = scope->props; ; sprop = sprop->next) {                        if (!sprop) {                            switch (slot) {                              case JSSLOT_PROTO:                                strcpy(name, "__proto__");                                break;                              case JSSLOT_PARENT:                                strcpy(name, "__parent__");                                break;                              case JSSLOT_PRIVATE:                                strcpy(name, "__private__");                                break;                              default:                                JS_snprintf(name, sizeof name,                                            "**UNKNOWN SLOT %ld**",                                            (long)slot);                                break;                            }                            break;                        }                        if (sprop->slot == slot) {                            nval = ID_TO_VALUE(sprop->id);                            if (JSVAL_IS_INT(nval)) {                                JS_snprintf(name, sizeof name, "%ld",                                            (long)JSVAL_TO_INT(nval));                            } else if (JSVAL_IS_STRING(nval)) {                                JS_snprintf(name, sizeof name, "%s",                                  JS_GetStringBytes(JSVAL_TO_STRING(nval)));                            } else {                                strcpy(name, "**FINALIZED ATOM KEY**");                            }                            break;                        }                    }                } else {                    strcpy(name, "**UNKNOWN OBJECT MAP ENTRY**");                }#endif                GC_MARK(cx, JSVAL_TO_GCTHING(v), name, arg);            }        }        break;#ifdef DEBUG      case GCX_STRING:        str = (JSString *)thing;        JS_ASSERT(!JSSTRING_IS_DEPENDENT(str));        break;#endif      case GCX_MUTABLE_STRING:        str = (JSString *)thing;        if (JSSTRING_IS_DEPENDENT(str))            GC_MARK(cx, JSSTRDEP_BASE(str), "base", arg);        break;    }out:    METER(rt->gcStats.depth--);}