[Webkit-unassigned] [Bug 60950] New: Port the SmallStrings cache to Weak<T>

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 17 03:54:39 PDT 2011


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

           Summary: Port the SmallStrings cache to Weak<T>
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: xan.lopez at gmail.com
                CC: ggaren at apple.com, oliver at apple.com,
                    barraclough at apple.com


A FIXME in Heap.cpp suggests that the SmallStrings cache could/should be ported to use Weak<T> instead of its own ad-hoc marking logic. I've done a rough patch that does this, here are some doubts/comments:

- This seems straightforward enough save for one bit: the cache exposes a singleCharacterStrings() method that gives the JIT direct access to the JSString array where the one character strings are stored. Arguably this is done for performance reasons.

- As a test to see if I could make it actually work I ported everything to Weak<T> and made the JIT try to get the JSString from inside the Weak<T> now exposed in the API. This seems to work (in some cases), but I'm not sure if it makes any sense. In particular, I understand that the data behind a Weak<T> can change at any moment as a side effect of GC, so perhaps it just does not make any sense to generate code that does this.

- If that's the case, I wonder what kind of API the cache should expose. None? If it's not, would it be acceptable to do what I have tried?

Comments welcome!

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