as = new Assertion(source, property, target, tv);
as = new Assertion(aSource, aProperty, aTarget, aTruthValue);
InMemoryDataSource::LockedAssert(nsIRDFResource* source,                                 nsIRDFResource* property,                                 nsIRDFNode* target,                                 PRBool tv){#ifdef PR_LOGGING    LogOperation("ASSERT", source, property, target, tv);#endif    Assertion* next = GetForwardArcs(source);    Assertion* prev = next;    Assertion* as = nsnull;    // Walk to the end of the linked list.    // XXX shouldn't we just keep a pointer to the end, or insert at the front???    while (next) {        if (property == next->mProperty) {            if (target == next->mTarget) {                // Wow, we already had the assertion. Make sure that the                // truth values are correct and bail.                next->mTruthValue = tv;                return NS_OK;            }        }        prev = next;        next = next->mNext;    }    as = new Assertion(source, property, target, tv);    if (! as)        return NS_ERROR_OUT_OF_MEMORY;    // Link it in to the "forward arcs" table    if (!prev) {        SetForwardArcs(source, as);    } else {        prev->mNext = as;    }        // Link it in to the "reverse arcs" table    // XXX Shouldn't we keep a pointer to the end of the list to make    // sure this is O(1)?    prev = nsnull;    next = GetReverseArcs(target);    while (next) {        prev = next;        next = next->mInvNext;    }    if (!prev) {        SetReverseArcs(target, as);    } else {        prev->mInvNext = as;    }    return NS_OK;}