Ignore:
Timestamp:
Nov 14, 2018, 10:49:22 AM (7 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling in CodeCache in r237254
https://bugs.webkit.org/show_bug.cgi?id=190340

Land the CodeCache part without adding an additional hash value.

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::fromGlobalCode):

  • bytecode/UnlinkedFunctionExecutable.h:
  • parser/SourceCodeKey.h:

(JSC::SourceCodeKey::SourceCodeKey):
(JSC::SourceCodeKey::operator== const):

  • runtime/CodeCache.cpp:

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

  • runtime/CodeCache.h:
  • runtime/FunctionConstructor.cpp:

(JSC::constructFunctionSkippingEvalEnabledCheck):

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::fromGlobalCode):

  • runtime/FunctionExecutable.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/SourceCodeKey.h

    r238109 r238185  
    7979        const UnlinkedSourceCode& sourceCode, const String& name, SourceCodeType codeType, JSParserStrictMode strictMode,
    8080        JSParserScriptMode scriptMode, DerivedContextType derivedContextType, EvalContextType evalContextType, bool isArrowFunctionContext,
    81         DebuggerMode debuggerMode, TypeProfilerEnabled typeProfilerEnabled, ControlFlowProfilerEnabled controlFlowProfilerEnabled)
     81        DebuggerMode debuggerMode, TypeProfilerEnabled typeProfilerEnabled, ControlFlowProfilerEnabled controlFlowProfilerEnabled, std::optional<int> functionConstructorParametersEndPosition)
    8282            : m_sourceCode(sourceCode)
    8383            , m_name(name)
    8484            , m_flags(codeType, strictMode, scriptMode, derivedContextType, evalContextType, isArrowFunctionContext, debuggerMode, typeProfilerEnabled, controlFlowProfilerEnabled)
     85            , m_functionConstructorParametersEndPosition(functionConstructorParametersEndPosition.value_or(-1))
    8586            , m_hash(sourceCode.hash() ^ m_flags.bits())
    8687    {
     
    109110            && length() == other.length()
    110111            && m_flags == other.m_flags
     112            && m_functionConstructorParametersEndPosition == other.m_functionConstructorParametersEndPosition
    111113            && m_name == other.m_name
    112114            && string() == other.string();
     
    128130    String m_name;
    129131    SourceCodeFlags m_flags;
     132    int m_functionConstructorParametersEndPosition;
    130133    unsigned m_hash;
    131134};
Note: See TracChangeset for help on using the changeset viewer.