⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 291755 in webkit


Ignore:
Timestamp:
Mar 23, 2022, 11:37:21 AM (5 years ago)
Author:
Chris Dumez
Message:

Avoid unnecessary String constructor under FunctionExecutable::toStringSlow()
​https://bugs.webkit.org/show_bug.cgi?id=238263

Reviewed by Darin Adler.

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::toStringSlow):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r291752 r291755  
     12022-03-23  Chris Dumez  <cdumez@apple.com>
     2
     3        Avoid unnecessary String constructor under FunctionExecutable::toStringSlow()
     4        https://bugs.webkit.org/show_bug.cgi?id=238263
     5
     6        Reviewed by Darin Adler.
     7
     8        * runtime/FunctionExecutable.cpp:
     9        (JSC::FunctionExecutable::toStringSlow):
     10
    1112022-03-23  Yusuke Suzuki  <ysuzuki@apple.com>
    212
  • trunk/Source/JavaScriptCore/runtime/FunctionExecutable.cpp

    r291731 r291755  
    142142        return cache(jsString(vm, classSource().view().toString()));
    143143
    144     String functionHeader;
     144    ASCIILiteral functionHeader = ""_s;
    145145    switch (parseMode()) {
    146146    case SourceParseMode::GeneratorWrapperFunctionMode:
    … …  
    165165    case SourceParseMode::ArrowFunctionMode:
    166166    case SourceParseMode::ClassFieldInitializerMode:
    167         functionHeader = "";
    168167        break;
    169168
Note: See TracChangeset for help on using the changeset viewer.