[Webkit-unassigned] [Bug 47839] JSC interpreter regressions after r69940

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 21 01:50:08 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=47839





--- Comment #3 from Csaba Osztrogonac <ossy at webkit.org>  2010-10-21 01:50:08 PST ---
(From update of attachment 71403)
View in context: https://bugs.webkit.org/attachment.cgi?id=71403&action=review

> JavaScriptCore/interpreter/Interpreter.cpp:292
> -    if (!result) {
> -        callFrame->r(dst) = result;
> -        ASSERT(callFrame->r(dst).jsValue());
> -    } else
> +    if (UNLIKELY(!result)) {
>          callFrame->globalData().exception = createErrorForInvalidGlobalAssignment(callFrame, ident.ustring());
> +        return;
> +    }
> +    callFrame->r(dst) = result;
> +    ASSERT(callFrame->r(dst).jsValue());
>  }

I don't think we need to change the order of cases. 
I prefer only fixing the conditon and add LIKELY 
hint to the compiler, like this:

if (LIKELY(result)) {
    callFrame->r(dst) = result;
    ASSERT(callFrame->r(dst).jsValue());
} else
    callFrame->globalData().exception = createErrorForInvalidGlobalAssignment(callFrame, ident.ustring());

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list