[Webkit-unassigned] [Bug 46960] New: Specify ALWAYS_INLINE at function declaration not function definition

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 30 22:48:34 PDT 2010


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

           Summary: Specify ALWAYS_INLINE at function declaration not
                    function definition
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: psolanki at apple.com


Take for example the following code in FastMalloc.cpp


template <bool crashOnFailure>
void* malloc(size_t);

void* fastMalloc(size_t size)
{
    return malloc<true>(size);
}


template <bool crashOnFailure>
ALWAYS_INLINE
void* malloc(size_t size) {
...
}

We need to have the ALWAYS_INLINE be on the declaration, otherwise the compiler may not inline the call to malloc<true>(size) in fastMalloc(). There are other instances of this in the code as well. Patch coming up.

-- 
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