Changeset 241645 in webkit


Ignore:
Timestamp:
Feb 16, 2019 12:58:36 AM (5 years ago)
Author:
ysuzuki@apple.com
Message:

[JSC] Shrink UnlinkedFunctionExecutable
https://bugs.webkit.org/show_bug.cgi?id=194733

Reviewed by Mark Lam.

UnlinkedFunctionExecutable has sourceURLDirective and sourceMappingURLDirective. These
directives can be found in the comment of non typical function's source code (Program,
Eval code, and Global function from function constructor etc.), and tricky thing is that
SourceProvider's directives are updated by Parser. The reason why we have these fields in
UnlinkedFunctionExecutable is that we need to update the SourceProvider's directives even
if we skip parsing by using CodeCache. These fields are effective only if (1)
UnlinkedFunctionExecutable is for non typical function things, and (2) it has sourceURLDirective
or sourceMappingURLDirective. This is rare enough to purge them to a separated
UnlinkedFunctionExecutable::RareData to make UnlinkedFunctionExecutable small.
sizeof(UnlinkedFunctionExecutable) is very important since it is super frequently allocated
cell. Furthermore, the current JSC allocates two MarkedBlocks for UnlinkedFunctionExecutable
in JSGlobalObject initialization, but the usage of the second MarkedBlock is quite low (8%).
If we can reduce the size of UnlinkedFunctionExecutable, we can make them one MarkedBlock.
Since UnlinkedFunctionExecutable is allocated from IsoSubspace, we do not need to fit it to
one of size class.

This patch adds RareData to UnlinkedFunctionExecutable and move some rare datas into RareData.
And kill one MarkedBlock allocation in JSC initialization phase.

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::ensureRareDataSlow):

  • bytecode/UnlinkedFunctionExecutable.h:
  • debugger/DebuggerLocation.cpp:

(JSC::DebuggerLocation::DebuggerLocation):

  • inspector/ScriptDebugServer.cpp:

(Inspector::ScriptDebugServer::dispatchDidParseSource):

  • parser/Lexer.h:

(JSC::Lexer::sourceURLDirective const):
(JSC::Lexer::sourceMappingURLDirective const):
(JSC::Lexer::sourceURL const): Deleted.
(JSC::Lexer::sourceMappingURL const): Deleted.

  • parser/Parser.h:

(JSC::Parser<LexerType>::parse):

  • parser/SourceProvider.h:

(JSC::SourceProvider::sourceURLDirective const):
(JSC::SourceProvider::sourceMappingURLDirective const):
(JSC::SourceProvider::setSourceURLDirective):
(JSC::SourceProvider::setSourceMappingURLDirective):
(JSC::SourceProvider::sourceURL const): Deleted. We rename it from sourceURL to sourceURLDirective
since it is the correct name.
(JSC::SourceProvider::sourceMappingURL const): Deleted. We rename it from sourceMappingURL to
sourceMappingURLDirective since it is the correct name.

  • runtime/CachedTypes.cpp:

(JSC::CachedSourceProviderShape::encode):
(JSC::CachedFunctionExecutableRareData::encode):
(JSC::CachedFunctionExecutableRareData::decode const): CachedFunctionExecutable did not have
sourceMappingURL to sourceMappingURLDirective. So this patch keeps the same logic.
(JSC::CachedFunctionExecutable::rareData const):
(JSC::CachedFunctionExecutable::encode):
(JSC::CachedFunctionExecutable::decode const):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getUnlinkedGlobalCodeBlock):
(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):

  • runtime/CodeCache.h:

(JSC::generateUnlinkedCodeBlockImpl):

  • runtime/FunctionExecutable.h:
  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::StackFrame::url):

Location:
trunk/Source/JavaScriptCore
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r241644 r241645  
     12019-02-16  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Shrink UnlinkedFunctionExecutable
     4        https://bugs.webkit.org/show_bug.cgi?id=194733
     5
     6        Reviewed by Mark Lam.
     7
     8        UnlinkedFunctionExecutable has sourceURLDirective and sourceMappingURLDirective. These
     9        directives can be found in the comment of non typical function's source code (Program,
     10        Eval code, and Global function from function constructor etc.), and tricky thing is that
     11        SourceProvider's directives are updated by Parser. The reason why we have these fields in
     12        UnlinkedFunctionExecutable is that we need to update the SourceProvider's directives even
     13        if we skip parsing by using CodeCache. These fields are effective only if (1)
     14        UnlinkedFunctionExecutable is for non typical function things, and (2) it has sourceURLDirective
     15        or sourceMappingURLDirective. This is rare enough to purge them to a separated
     16        UnlinkedFunctionExecutable::RareData to make UnlinkedFunctionExecutable small.
     17        sizeof(UnlinkedFunctionExecutable) is very important since it is super frequently allocated
     18        cell. Furthermore, the current JSC allocates two MarkedBlocks for UnlinkedFunctionExecutable
     19        in JSGlobalObject initialization, but the usage of the second MarkedBlock is quite low (8%).
     20        If we can reduce the size of UnlinkedFunctionExecutable, we can make them one MarkedBlock.
     21        Since UnlinkedFunctionExecutable is allocated from IsoSubspace, we do not need to fit it to
     22        one of size class.
     23
     24        This patch adds RareData to UnlinkedFunctionExecutable and move some rare datas into RareData.
     25        And kill one MarkedBlock allocation in JSC initialization phase.
     26
     27        * bytecode/UnlinkedFunctionExecutable.cpp:
     28        (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
     29        (JSC::UnlinkedFunctionExecutable::ensureRareDataSlow):
     30        * bytecode/UnlinkedFunctionExecutable.h:
     31        * debugger/DebuggerLocation.cpp:
     32        (JSC::DebuggerLocation::DebuggerLocation):
     33        * inspector/ScriptDebugServer.cpp:
     34        (Inspector::ScriptDebugServer::dispatchDidParseSource):
     35        * parser/Lexer.h:
     36        (JSC::Lexer::sourceURLDirective const):
     37        (JSC::Lexer::sourceMappingURLDirective const):
     38        (JSC::Lexer::sourceURL const): Deleted.
     39        (JSC::Lexer::sourceMappingURL const): Deleted.
     40        * parser/Parser.h:
     41        (JSC::Parser<LexerType>::parse):
     42        * parser/SourceProvider.h:
     43        (JSC::SourceProvider::sourceURLDirective const):
     44        (JSC::SourceProvider::sourceMappingURLDirective const):
     45        (JSC::SourceProvider::setSourceURLDirective):
     46        (JSC::SourceProvider::setSourceMappingURLDirective):
     47        (JSC::SourceProvider::sourceURL const): Deleted. We rename it from sourceURL to sourceURLDirective
     48        since it is the correct name.
     49        (JSC::SourceProvider::sourceMappingURL const): Deleted. We rename it from sourceMappingURL to
     50        sourceMappingURLDirective since it is the correct name.
     51        * runtime/CachedTypes.cpp:
     52        (JSC::CachedSourceProviderShape::encode):
     53        (JSC::CachedFunctionExecutableRareData::encode):
     54        (JSC::CachedFunctionExecutableRareData::decode const): CachedFunctionExecutable did not have
     55        sourceMappingURL to sourceMappingURLDirective. So this patch keeps the same logic.
     56        (JSC::CachedFunctionExecutable::rareData const):
     57        (JSC::CachedFunctionExecutable::encode):
     58        (JSC::CachedFunctionExecutable::decode const):
     59        (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
     60        * runtime/CodeCache.cpp:
     61        (JSC::CodeCache::getUnlinkedGlobalCodeBlock):
     62        (JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):
     63        * runtime/CodeCache.h:
     64        (JSC::generateUnlinkedCodeBlockImpl):
     65        * runtime/FunctionExecutable.h:
     66        * runtime/SamplingProfiler.cpp:
     67        (JSC::SamplingProfiler::StackFrame::url):
     68
    1692019-02-15  Yusuke Suzuki  <ysuzuki@apple.com>
    270
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp

    r241571 r241645  
    4343namespace JSC {
    4444
    45 static_assert(sizeof(UnlinkedFunctionExecutable) <= 160, "UnlinkedFunctionExecutable should fit in a 160-byte cell. If you increase the size of this class, consider making a size class that perfectly fits it.");
     45static_assert(sizeof(UnlinkedFunctionExecutable) <= 128, "UnlinkedFunctionExecutable should fit in a 128-byte cell to keep allocated blocks count to only one after initializing JSGlobalObject.");
    4646
    4747const ClassInfo UnlinkedFunctionExecutable::s_info = { "UnlinkedFunctionExecutable", nullptr, nullptr, nullptr, CREATE_METHOD_TABLE(UnlinkedFunctionExecutable) };
     
    107107    , m_ecmaName(node->ecmaName())
    108108    , m_inferredName(node->inferredName())
    109     , m_classSource(node->classSource())
    110109    , m_parentScopeTDZVariables(WTFMove(parentScopeTDZVariables))
    111110{
     
    118117    ASSERT(m_derivedContextType == static_cast<unsigned>(derivedContextType));
    119118    ASSERT(!(m_isBuiltinDefaultClassConstructor && constructorKind() == ConstructorKind::None));
     119    if (!node->classSource().isNull())
     120        setClassSource(node->classSource());
    120121}
    121122
     
    244245}
    245246
     247UnlinkedFunctionExecutable::RareData& UnlinkedFunctionExecutable::ensureRareDataSlow()
     248{
     249    ASSERT(!m_rareData);
     250    m_rareData = std::make_unique<RareData>();
     251    return *m_rareData;
     252}
     253
    246254void UnlinkedFunctionExecutable::setInvalidTypeProfilingOffsets()
    247255{
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h

    r241571 r241645  
    5757    friend class CodeCache;
    5858    friend class VM;
    59     friend CachedFunctionExecutable;
     59    friend class CachedFunctionExecutable;
    6060
    6161    typedef JSCell Base;
     
    8383    SourceParseMode parseMode() const { return static_cast<SourceParseMode>(m_sourceParseMode); };
    8484
    85     const SourceCode& classSource() const { return m_classSource; };
    86     void setClassSource(const SourceCode& source) { m_classSource = source; };
     85    SourceCode classSource() const
     86    {
     87        if (m_rareData)
     88            return m_rareData->m_classSource;
     89        return SourceCode();
     90    }
     91    void setClassSource(const SourceCode& source)
     92    {
     93        ensureRareData().m_classSource = source;
     94    }
    8795
    8896    bool isInStrictContext() const { return m_isInStrictContext; }
     
    141149    JSParserScriptMode scriptMode() const { return static_cast<JSParserScriptMode>(m_scriptMode); }
    142150    bool isClassConstructorFunction() const { return constructorKind() != ConstructorKind::None; }
     151    bool isClass() const
     152    {
     153        if (!m_rareData)
     154            return false;
     155        return !m_rareData->m_classSource.isNull();
     156    }
    143157    VariableEnvironment parentScopeTDZVariables() const { return m_parentScopeTDZVariables.environment().toVariableEnvironment(); }
    144158   
     
    147161    JSC::DerivedContextType derivedContextType() const {return static_cast<JSC::DerivedContextType>(m_derivedContextType); }
    148162
    149     const String& sourceURLDirective() const { return m_sourceURLDirective; }
    150     const String& sourceMappingURLDirective() const { return m_sourceMappingURLDirective; }
    151     void setSourceURLDirective(const String& sourceURL) { m_sourceURLDirective = sourceURL; }
    152     void setSourceMappingURLDirective(const String& sourceMappingURL) { m_sourceMappingURLDirective = sourceMappingURL; }
     163    String sourceURLDirective() const
     164    {
     165        if (m_rareData)
     166            return m_rareData->m_sourceURLDirective;
     167        return String();
     168    }
     169    String sourceMappingURLDirective() const
     170    {
     171        if (m_rareData)
     172            return m_rareData->m_sourceMappingURLDirective;
     173        return String();
     174    }
     175    void setSourceURLDirective(const String& sourceURL)
     176    {
     177        ensureRareData().m_sourceURLDirective = sourceURL;
     178    }
     179    void setSourceMappingURLDirective(const String& sourceMappingURL)
     180    {
     181        ensureRareData().m_sourceMappingURLDirective = sourceMappingURL;
     182    }
     183
     184    struct RareData {
     185        WTF_MAKE_STRUCT_FAST_ALLOCATED;
     186
     187        SourceCode m_classSource;
     188        String m_sourceURLDirective;
     189        String m_sourceMappingURLDirective;
     190    };
    153191
    154192private:
     
    186224    Identifier m_ecmaName;
    187225    Identifier m_inferredName;
    188     SourceCode m_classSource;
    189 
    190     String m_sourceURLDirective;
    191     String m_sourceMappingURLDirective;
     226
     227    RareData& ensureRareData()
     228    {
     229        if (LIKELY(m_rareData))
     230            return *m_rareData;
     231        return ensureRareDataSlow();
     232    }
     233    RareData& ensureRareDataSlow();
    192234
    193235    CompactVariableMap::Handle m_parentScopeTDZVariables;
     236    std::unique_ptr<RareData> m_rareData;
    194237
    195238protected:
  • trunk/Source/JavaScriptCore/debugger/DebuggerLocation.cpp

    r208063 r241645  
    4141    url = executable->sourceURL();
    4242    if (url.isEmpty())
    43         url = executable->source().provider()->sourceURL();
     43        url = executable->source().provider()->sourceURLDirective();
    4444}
    4545
  • trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp

    r228260 r241645  
    196196    script.startColumn = sourceProvider->startPosition().m_column.zeroBasedInt();
    197197    script.isContentScript = isContentScript;
    198     script.sourceURL = sourceProvider->sourceURL();
    199     script.sourceMappingURL = sourceProvider->sourceMappingURL();
     198    script.sourceURL = sourceProvider->sourceURLDirective();
     199    script.sourceMappingURL = sourceProvider->sourceMappingURLDirective();
    200200
    201201    int sourceLength = script.source.length();
  • trunk/Source/JavaScriptCore/parser/Lexer.h

    r239427 r241645  
    8888    String getErrorMessage() const { return m_lexErrorMessage; }
    8989    void setErrorMessage(const String& errorMessage) { m_lexErrorMessage = errorMessage; }
    90     String sourceURL() const { return m_sourceURLDirective; }
    91     String sourceMappingURL() const { return m_sourceMappingURLDirective; }
     90    String sourceURLDirective() const { return m_sourceURLDirective; }
     91    String sourceMappingURLDirective() const { return m_sourceMappingURLDirective; }
    9292    void clear();
    9393    void setOffset(int offset, int lineStartOffset)
  • trunk/Source/JavaScriptCore/parser/Parser.h

    r240686 r241645  
    19391939
    19401940        if (!isFunctionParseMode(parseMode)) {
    1941             m_source->provider()->setSourceURLDirective(m_lexer->sourceURL());
    1942             m_source->provider()->setSourceMappingURLDirective(m_lexer->sourceMappingURL());
     1941            m_source->provider()->setSourceURLDirective(m_lexer->sourceURLDirective());
     1942            m_source->provider()->setSourceMappingURLDirective(m_lexer->sourceMappingURLDirective());
    19431943        }
    19441944    } else {
  • trunk/Source/JavaScriptCore/parser/SourceProvider.h

    r241612 r241645  
    126126        const SourceOrigin& sourceOrigin() const { return m_sourceOrigin; }
    127127        const URL& url() const { return m_url; }
    128         const String& sourceURL() const { return m_sourceURLDirective; }
    129         const String& sourceMappingURL() const { return m_sourceMappingURLDirective; }
     128        const String& sourceURLDirective() const { return m_sourceURLDirective; }
     129        const String& sourceMappingURLDirective() const { return m_sourceMappingURLDirective; }
    130130
    131131        TextPosition startPosition() const { return m_startPosition; }
     
    139139        }
    140140
    141         void setSourceURLDirective(const String& sourceURL) { m_sourceURLDirective = sourceURL; }
    142         void setSourceMappingURLDirective(const String& sourceMappingURL) { m_sourceMappingURLDirective = sourceMappingURL; }
     141        void setSourceURLDirective(const String& sourceURLDirective) { m_sourceURLDirective = sourceURLDirective; }
     142        void setSourceMappingURLDirective(const String& sourceMappingURLDirective) { m_sourceMappingURLDirective = sourceMappingURLDirective; }
    143143
    144144    private:
  • trunk/Source/JavaScriptCore/runtime/CachedTypes.cpp

    r241550 r241645  
    12671267        m_sourceOrigin.encode(encoder, sourceProvider.sourceOrigin());
    12681268        m_url.encode(encoder, sourceProvider.url());
    1269         m_sourceURLDirective.encode(encoder, sourceProvider.sourceURL());
    1270         m_sourceMappingURLDirective.encode(encoder, sourceProvider.sourceMappingURL());
     1269        m_sourceURLDirective.encode(encoder, sourceProvider.sourceURLDirective());
     1270        m_sourceMappingURLDirective.encode(encoder, sourceProvider.sourceMappingURLDirective());
    12711271        m_startPosition.encode(encoder, sourceProvider.startPosition());
    12721272    }
     
    14301430};
    14311431
     1432class CachedFunctionExecutableRareData : public CachedObject<UnlinkedFunctionExecutable::RareData> {
     1433public:
     1434    void encode(Encoder& encoder, const UnlinkedFunctionExecutable::RareData& rareData)
     1435    {
     1436        m_classSource.encode(encoder, rareData.m_classSource);
     1437    }
     1438
     1439    UnlinkedFunctionExecutable::RareData* decode(Decoder& decoder) const
     1440    {
     1441        UnlinkedFunctionExecutable::RareData* rareData = new UnlinkedFunctionExecutable::RareData { };
     1442        m_classSource.decode(decoder, rareData->m_classSource);
     1443        return rareData;
     1444    }
     1445
     1446private:
     1447    CachedSourceCode m_classSource;
     1448};
     1449
    14321450class CachedFunctionExecutable : public CachedObject<UnlinkedFunctionExecutable> {
    14331451public:
     
    14641482    Identifier ecmaName(Decoder& decoder) const { return m_ecmaName.decode(decoder); }
    14651483    Identifier inferredName(Decoder& decoder) const { return m_inferredName.decode(decoder); }
     1484
     1485    UnlinkedFunctionExecutable::RareData* rareData(Decoder& decoder) const { return m_rareData.decodeAsPtr(decoder); }
    14661486
    14671487private:
     
    14901510    unsigned m_derivedContextType: 2;
    14911511
    1492     CachedSourceCode m_classSource;
     1512    CachedOptional<CachedFunctionExecutableRareData> m_rareData;
    14931513
    14941514    CachedIdentifier m_name;
     
    18251845    m_derivedContextType = executable.m_derivedContextType;
    18261846
    1827     m_classSource.encode(encoder, executable.m_classSource);
     1847    m_rareData.encode(encoder, executable.m_rareData);
    18281848
    18291849    m_name.encode(encoder, executable.name());
     
    18451865    executable->finishCreation(decoder.vm());
    18461866
    1847     m_classSource.decode(decoder, executable->m_classSource);
    18481867    m_unlinkedCodeBlockForCall.decode(decoder, executable->m_unlinkedCodeBlockForCall, executable);
    18491868    m_unlinkedCodeBlockForConstruct.decode(decoder, executable->m_unlinkedCodeBlockForConstruct, executable);
     
    18831902
    18841903    , m_parentScopeTDZVariables(decoder.vm().m_compactVariableMap->get(parentScopeTDZVariables))
     1904
     1905    , m_rareData(cachedExecutable.rareData(decoder))
    18851906{
    18861907}
  • trunk/Source/JavaScriptCore/runtime/CodeCache.cpp

    r241612 r241645  
    7171        unsigned endColumn = unlinkedCodeBlock->endColumn() + (endColumnIsOnStartLine ? startColumn : 1);
    7272        executable->recordParse(unlinkedCodeBlock->codeFeatures(), unlinkedCodeBlock->hasCapturedVariables(), source.firstLine().oneBasedInt() + lineCount, endColumn);
    73         source.provider()->setSourceURLDirective(unlinkedCodeBlock->sourceURLDirective());
    74         source.provider()->setSourceMappingURLDirective(unlinkedCodeBlock->sourceMappingURLDirective());
     73        if (!unlinkedCodeBlock->sourceURLDirective().isNull())
     74            source.provider()->setSourceURLDirective(unlinkedCodeBlock->sourceURLDirective());
     75        if (!unlinkedCodeBlock->sourceMappingURLDirective().isNull())
     76            source.provider()->setSourceMappingURLDirective(unlinkedCodeBlock->sourceMappingURLDirective());
    7577        return unlinkedCodeBlock;
    7678    }
     
    116118    UnlinkedFunctionExecutable* executable = m_sourceCode.findCacheAndUpdateAge<UnlinkedFunctionExecutable>(vm, key);
    117119    if (executable && Options::useCodeCache()) {
    118         source.provider()->setSourceURLDirective(executable->sourceURLDirective());
    119         source.provider()->setSourceMappingURLDirective(executable->sourceMappingURLDirective());
     120        if (!executable->sourceURLDirective().isNull())
     121            source.provider()->setSourceURLDirective(executable->sourceURLDirective());
     122        if (!executable->sourceMappingURLDirective().isNull())
     123            source.provider()->setSourceMappingURLDirective(executable->sourceMappingURLDirective());
    120124        return executable;
    121125    }
     
    150154    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, metadata, UnlinkedNormalFunction, constructAbility, JSParserScriptMode::Classic, vm.m_compactVariableMap->get(emptyTDZVariables), DerivedContextType::None);
    151155
    152     functionExecutable->setSourceURLDirective(source.provider()->sourceURL());
    153     functionExecutable->setSourceMappingURLDirective(source.provider()->sourceMappingURL());
     156    if (!source.provider()->sourceURLDirective().isNull())
     157        functionExecutable->setSourceURLDirective(source.provider()->sourceURLDirective());
     158    if (!source.provider()->sourceMappingURLDirective().isNull())
     159        functionExecutable->setSourceMappingURLDirective(source.provider()->sourceMappingURLDirective());
    154160
    155161    if (Options::useCodeCache())
  • trunk/Source/JavaScriptCore/runtime/CodeCache.h

    r241612 r241645  
    298298    UnlinkedCodeBlockType* unlinkedCodeBlock = UnlinkedCodeBlockType::create(&vm, executableInfo, debuggerMode);
    299299    unlinkedCodeBlock->recordParse(rootNode->features(), rootNode->hasCapturedVariables(), lineCount, unlinkedEndColumn);
    300     unlinkedCodeBlock->setSourceURLDirective(source.provider()->sourceURL());
    301     unlinkedCodeBlock->setSourceMappingURLDirective(source.provider()->sourceMappingURL());
     300    if (!source.provider()->sourceURLDirective().isNull())
     301        unlinkedCodeBlock->setSourceURLDirective(source.provider()->sourceURLDirective());
     302    if (!source.provider()->sourceMappingURLDirective().isNull())
     303        unlinkedCodeBlock->setSourceMappingURLDirective(source.provider()->sourceMappingURLDirective());
    302304
    303305    error = BytecodeGenerator::generate(vm, rootNode.get(), source, unlinkedCodeBlock, debuggerMode, variablesUnderTDZ);
  • trunk/Source/JavaScriptCore/runtime/FunctionExecutable.h

    r240965 r241645  
    133133    bool isBuiltinFunction() const { return m_unlinkedExecutable->isBuiltinFunction(); }
    134134    ConstructAbility constructAbility() const { return m_unlinkedExecutable->constructAbility(); }
    135     bool isClass() const { return !classSource().isNull(); }
     135    bool isClass() const { return m_unlinkedExecutable->isClass(); }
    136136    bool isArrowFunction() const { return parseMode() == SourceParseMode::ArrowFunctionMode; }
    137137    bool isGetter() const { return parseMode() == SourceParseMode::GetterMode; }
     
    166166    SourceParseMode parseMode() const { return m_unlinkedExecutable->parseMode(); }
    167167    JSParserScriptMode scriptMode() const { return m_unlinkedExecutable->scriptMode(); }
    168     const SourceCode& classSource() const { return m_unlinkedExecutable->classSource(); }
     168    SourceCode classSource() const { return m_unlinkedExecutable->classSource(); }
    169169
    170170    static void visitChildren(JSCell*, SlotVisitor&);
  • trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp

    r241615 r241645  
    864864    String url = static_cast<ScriptExecutable*>(executable)->sourceURL();
    865865    if (url.isEmpty())
    866         return static_cast<ScriptExecutable*>(executable)->source().provider()->sourceURL(); // Fall back to sourceURL directive.
     866        return static_cast<ScriptExecutable*>(executable)->source().provider()->sourceURLDirective(); // Fall back to sourceURL directive.
    867867    return url;
    868868}
Note: See TracChangeset for help on using the changeset viewer.