Ignore:
Timestamp:
Jun 12, 2009, 5:41:03 PM (16 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2009-06-12 David Levin <[email protected]>

Reviewed by Darin Adler.

UString shouldn't create sharedBuffer for SmallStrings.
https://bugs.webkit.org/show_bug.cgi?id=26360

The methods changed are not used by JSC, so there is no JS perf impact. However,
there is a potential DOM perf impact, so I re-ran several of the tests that
I ran previously and ensured that the perf stay the same which caused me to
adjust the minLengthToShare.

  • JavaScriptCore.exp:
  • runtime/UString.cpp: (JSC::UString::Rep::sharedBuffer):

Determines if the buffer being shared is big enough before doing so.
Previously, BaseString::sharedBuffer was called but it would only know
the length of the base string (BaseString::len) which may not be the same
as the string being shared (Rep::len).

(JSC::UString::BaseString::sharedBuffer):

This is now only be used by Rep::sharedBuffer. which does the length check.

  • runtime/UString.h:

WebCore:

2009-06-12 David Levin <[email protected]>

Reviewed by Darin Adler.

UString shouldn't create sharedBuffer for SmallStrings.
https://bugs.webkit.org/show_bug.cgi?id=26347

Change the call to use the method UString::Rep::sharedBuffer due
to changes in UString.

No noticable change in behavior, so no test.

  • platform/text/StringImpl.cpp: (WebCore::StringImpl::create):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r44508 r44641  
    218218__ZN3JSC7Profile7excludeEPKNS_11ProfileNodeE
    219219__ZN3JSC7Profile7forEachEMNS_11ProfileNodeEFvvE
    220 __ZN3JSC7UString10BaseString12sharedBufferEv
     220__ZN3JSC7UString3Rep12sharedBufferEv
    221221__ZN3JSC7UString3Rep11computeHashEPKci
    222222__ZN3JSC7UString3Rep11computeHashEPKti
Note: See TracChangeset for help on using the changeset viewer.