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

Changeset 237478 in webkit


Ignore:
Timestamp:
Oct 26, 2018, 12:33:55 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r237445.
​https://bugs.webkit.org/show_bug.cgi?id=190972

Cause performance regression on iOS devices (Requested by
yusukesuzuki on #webkit).

Reverted changeset:

"Unreviewed, partial rolling in r237254"
​https://bugs.webkit.org/show_bug.cgi?id=190340
​https://trac.webkit.org/changeset/237445

Location:
trunk/Source/JavaScriptCore
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r237469 r237478  
     12018-10-26  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r237445.
     4        https://bugs.webkit.org/show_bug.cgi?id=190972
     5
     6        Cause performance regression on iOS devices (Requested by
     7        yusukesuzuki on #webkit).
     8
     9        Reverted changeset:
     10
     11        "Unreviewed, partial rolling in r237254"
     12        https://bugs.webkit.org/show_bug.cgi?id=190340
     13        https://trac.webkit.org/changeset/237445
     14
    1152018-10-26  Mark Lam  <mark.lam@apple.com>
    216
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp

    r237445 r237478  
    175175UnlinkedFunctionExecutable* UnlinkedFunctionExecutable::fromGlobalCode(
    176176    const Identifier& name, ExecState& exec, const SourceCode& source,
    177     JSObject*& exception, int overrideLineNumber, std::optional<int> functionConstructorParametersEndPosition)
     177    JSObject*& exception, int overrideLineNumber)
    178178{
    179179    ParserError error;
    … …  
    182182    CodeCache* codeCache = vm.codeCache();
    183183    DebuggerMode debuggerMode = globalObject.hasInteractiveDebugger() ? DebuggerOn : DebuggerOff;
    184     UnlinkedFunctionExecutable* executable = codeCache->getUnlinkedGlobalFunctionExecutable(vm, name, source, debuggerMode, functionConstructorParametersEndPosition, error);
     184    UnlinkedFunctionExecutable* executable = codeCache->getUnlinkedGlobalFunctionExecutable(vm, name, source, debuggerMode, error);
    185185
    186186    if (globalObject.hasDebugger())
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h

    r237445 r237478  
    108108    static UnlinkedFunctionExecutable* fromGlobalCode(
    109109        const Identifier&, ExecState&, const SourceCode&, JSObject*& exception,
    110         int overrideLineNumber, std::optional<int> functionConstructorParametersEndPosition);
     110        int overrideLineNumber);
    111111
    112112    JS_EXPORT_PRIVATE FunctionExecutable* link(VM&, const SourceCode& parentSource, std::optional<int> overrideLineNumber = std::nullopt, Intrinsic = NoIntrinsic);
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r237445 r237478  
    195195
    196196template <typename LexerType>
    197 String Parser<LexerType>::parseInner(const Identifier& calleeName, SourceParseMode parseMode, ParsingContext parsingContext, std::optional<int> functionConstructorParametersEndPosition)
     197String Parser<LexerType>::parseInner(const Identifier& calleeName, SourceParseMode parseMode)
    198198{
    199199    String parseError = String();
    … …  
    239239        else if (isAsyncGeneratorWrapperParseMode(parseMode))
    240240            sourceElements = parseAsyncGeneratorFunctionSourceElements(context, parseMode, isArrowFunctionBodyExpression, CheckForStrictMode);
    241         else if (parsingContext == ParsingContext::FunctionConstructor)
    242             sourceElements = parseSingleFunction(context, functionConstructorParametersEndPosition);
    243241        else
    244242            sourceElements = parseSourceElements(context, CheckForStrictMode);
    … …  
    613611    return sourceElements;
    614612}
    615 
    616 template <typename LexerType>
    617 template <class TreeBuilder> TreeSourceElements Parser<LexerType>::parseSingleFunction(TreeBuilder& context, std::optional<int> functionConstructorParametersEndPosition)
    618 {
    619     TreeSourceElements sourceElements = context.createSourceElements();
    620     TreeStatement statement = 0;
    621     switch (m_token.m_type) {
    622     case FUNCTION:
    623         statement = parseFunctionDeclaration(context, ExportType::NotExported, DeclarationDefaultContext::Standard, functionConstructorParametersEndPosition);
    624         break;
    625     case IDENT:
    626         if (*m_token.m_data.ident == m_vm->propertyNames->async && !m_token.m_data.escaped) {
    627             next();
    628             failIfFalse(match(FUNCTION) && !m_lexer->prevTerminator(), "Cannot parse the async function");
    629             statement = parseAsyncFunctionDeclaration(context, ExportType::NotExported, DeclarationDefaultContext::Standard, functionConstructorParametersEndPosition);
    630             break;
    631         }
    632         FALLTHROUGH;
    633     default:
    634         failDueToUnexpectedToken();
    635         break;
    636     }
    637 
    638     if (statement) {
    639         context.setEndOffset(statement, m_lastTokenEndPosition.offset);
    640         context.appendStatement(sourceElements, statement);
    641     }
    642 
    643     propagateError();
    644     return sourceElements;
    645 }
    646 
    647613   
    648614template <typename LexerType>
    … …  
    22982264
    22992265template <typename LexerType>
    2300 template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuilder& context, FunctionNameRequirements requirements, SourceParseMode mode, bool nameIsInContainingScope, ConstructorKind constructorKind, SuperBinding expectedSuperBinding, int functionKeywordStart, ParserFunctionInfo<TreeBuilder>& functionInfo, FunctionDefinitionType functionDefinitionType, std::optional<int> functionConstructorParametersEndPosition)
     2266template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuilder& context, FunctionNameRequirements requirements, SourceParseMode mode, bool nameIsInContainingScope, ConstructorKind constructorKind, SuperBinding expectedSuperBinding, int functionKeywordStart, ParserFunctionInfo<TreeBuilder>& functionInfo, FunctionDefinitionType functionDefinitionType)
    23012267{
    23022268    RELEASE_ASSERT(isFunctionParseMode(mode));
    … …  
    24942460       
    24952461        matchOrFail(OPENBRACE, "Expected an opening '{' at the start of a ", stringForFunctionMode(mode), " body");
    2496 
    2497         // If the code is invoked from function constructor, we need to ensure that parameters are only composed by the string offered as parameters.
    2498         if (UNLIKELY(functionConstructorParametersEndPosition))
    2499             semanticFailIfFalse(lastTokenEndPosition().offset == *functionConstructorParametersEndPosition, "Parameters should match arguments offered as parameters in Function constructor");
    25002462       
    25012463        // BytecodeGenerator emits code to throw TypeError when a class constructor is "call"ed.
    … …  
    26322594
    26332595template <typename LexerType>
    2634 template <class TreeBuilder> TreeStatement Parser<LexerType>::parseFunctionDeclaration(TreeBuilder& context, ExportType exportType, DeclarationDefaultContext declarationDefaultContext, std::optional<int> functionConstructorParametersEndPosition)
     2596template <class TreeBuilder> TreeStatement Parser<LexerType>::parseFunctionDeclaration(TreeBuilder& context, ExportType exportType, DeclarationDefaultContext declarationDefaultContext)
    26352597{
    26362598    ASSERT(match(FUNCTION));
    … …  
    26692631    }
    26702632
    2671     failIfFalse((parseFunctionInfo(context, requirements, parseMode, true, ConstructorKind::None, SuperBinding::NotNeeded, functionKeywordStart, functionInfo, FunctionDefinitionType::Declaration, functionConstructorParametersEndPosition)), "Cannot parse this function");
     2633    failIfFalse((parseFunctionInfo(context, requirements, parseMode, true, ConstructorKind::None, SuperBinding::NotNeeded, functionKeywordStart, functionInfo, FunctionDefinitionType::Declaration)), "Cannot parse this function");
    26722634    ASSERT(functionInfo.name);
    26732635
    … …  
    26902652
    26912653template <typename LexerType>
    2692 template <class TreeBuilder> TreeStatement Parser<LexerType>::parseAsyncFunctionDeclaration(TreeBuilder& context, ExportType exportType, DeclarationDefaultContext declarationDefaultContext, std::optional<int> functionConstructorParametersEndPosition)
     2654template <class TreeBuilder> TreeStatement Parser<LexerType>::parseAsyncFunctionDeclaration(TreeBuilder& context, ExportType exportType, DeclarationDefaultContext declarationDefaultContext)
    26932655{
    26942656    ASSERT(match(FUNCTION));
    … …  
    27272689    }
    27282690
    2729     failIfFalse((parseFunctionInfo(context, requirements, parseMode, true, ConstructorKind::None, SuperBinding::NotNeeded, functionKeywordStart, functionInfo, FunctionDefinitionType::Declaration, functionConstructorParametersEndPosition)), "Cannot parse this async function");
     2691    failIfFalse((parseFunctionInfo(context, requirements, parseMode, true, ConstructorKind::None, SuperBinding::NotNeeded, functionKeywordStart, functionInfo, FunctionDefinitionType::Declaration)), "Cannot parse this async function");
    27302692    failIfFalse(functionInfo.name, "Async function statements must have a name");
    27312693
  • trunk/Source/JavaScriptCore/parser/Parser.h

    r237445 r237478  
    860860};
    861861
    862 enum class ArgumentType { Normal, Spread };
    863 enum class ParsingContext { Program, FunctionConstructor, Eval };
     862enum class ArgumentType {
     863    Normal,
     864    Spread
     865};
    864866
    865867template <typename LexerType>
    … …  
    873875
    874876    template <class ParsedNode>
    875     std::unique_ptr<ParsedNode> parse(ParserError&, const Identifier&, SourceParseMode, ParsingContext, std::optional<int> functionConstructorParametersEndPosition = std::nullopt);
     877    std::unique_ptr<ParsedNode> parse(ParserError&, const Identifier&, SourceParseMode);
    876878
    877879    JSTextPosition positionBeforeLastNewline() const { return m_lexer->positionBeforeLastNewline(); }
    … …  
    13111313
    13121314    Parser();
    1313 
    1314     String parseInner(const Identifier&, SourceParseMode, ParsingContext, std::optional<int> functionConstructorParametersEndPosition = std::nullopt);
     1315    String parseInner(const Identifier&, SourceParseMode);
    13151316
    13161317    void didFinishParsing(SourceElements*, DeclarationStacks::FunctionStack&&, VariableEnvironment&, UniquedStringImplPtrSet&&, CodeFeatures, int);
    … …  
    15241525    template <class TreeBuilder> TreeSourceElements parseAsyncFunctionSourceElements(TreeBuilder&, SourceParseMode, bool isArrowFunctionBodyExpression, SourceElementsMode);
    15251526    template <class TreeBuilder> TreeSourceElements parseAsyncGeneratorFunctionSourceElements(TreeBuilder&, SourceParseMode, bool isArrowFunctionBodyExpression, SourceElementsMode);
    1526     template <class TreeBuilder> TreeSourceElements parseSingleFunction(TreeBuilder&, std::optional<int> functionConstructorParametersEndPosition);
    15271527    template <class TreeBuilder> TreeStatement parseStatementListItem(TreeBuilder&, const Identifier*& directive, unsigned* directiveLiteralLength);
    15281528    template <class TreeBuilder> TreeStatement parseStatement(TreeBuilder&, const Identifier*& directive, unsigned* directiveLiteralLength = 0);
    15291529    enum class ExportType { Exported, NotExported };
    15301530    template <class TreeBuilder> TreeStatement parseClassDeclaration(TreeBuilder&, ExportType = ExportType::NotExported, DeclarationDefaultContext = DeclarationDefaultContext::Standard);
    1531     template <class TreeBuilder> TreeStatement parseFunctionDeclaration(TreeBuilder&, ExportType = ExportType::NotExported, DeclarationDefaultContext = DeclarationDefaultContext::Standard, std::optional<int> functionConstructorParametersEndPosition = std::nullopt);
     1531    template <class TreeBuilder> TreeStatement parseFunctionDeclaration(TreeBuilder&, ExportType = ExportType::NotExported, DeclarationDefaultContext = DeclarationDefaultContext::Standard);
    15321532    template <class TreeBuilder> TreeStatement parseFunctionDeclarationStatement(TreeBuilder&, bool isAsync, bool parentAllowsFunctionDeclarationAsStatement);
    1533     template <class TreeBuilder> TreeStatement parseAsyncFunctionDeclaration(TreeBuilder&, ExportType = ExportType::NotExported, DeclarationDefaultContext = DeclarationDefaultContext::Standard, std::optional<int> functionConstructorParametersEndPosition = std::nullopt);
     1533    template <class TreeBuilder> TreeStatement parseAsyncFunctionDeclaration(TreeBuilder&, ExportType = ExportType::NotExported, DeclarationDefaultContext = DeclarationDefaultContext::Standard);
    15341534    template <class TreeBuilder> NEVER_INLINE bool maybeParseAsyncFunctionDeclarationStatement(TreeBuilder& context, TreeStatement& result, bool parentAllowsFunctionDeclarationAsStatement);
    15351535    template <class TreeBuilder> TreeStatement parseVariableDeclaration(TreeBuilder&, DeclarationType, ExportType = ExportType::NotExported);
    … …  
    16001600
    16011601    enum class FunctionDefinitionType { Expression, Declaration, Method };
    1602     template <class TreeBuilder> NEVER_INLINE bool parseFunctionInfo(TreeBuilder&, FunctionNameRequirements, SourceParseMode, bool nameIsInContainingScope, ConstructorKind, SuperBinding, int functionKeywordStart, ParserFunctionInfo<TreeBuilder>&, FunctionDefinitionType, std::optional<int> functionConstructorParametersEndPosition = std::nullopt);
     1602    template <class TreeBuilder> NEVER_INLINE bool parseFunctionInfo(TreeBuilder&, FunctionNameRequirements, SourceParseMode, bool nameIsInContainingScope, ConstructorKind, SuperBinding, int functionKeywordStart, ParserFunctionInfo<TreeBuilder>&, FunctionDefinitionType);
    16031603   
    16041604    ALWAYS_INLINE bool isArrowFunctionParameters();
    … …  
    18481848template <typename LexerType>
    18491849template <class ParsedNode>
    1850 std::unique_ptr<ParsedNode> Parser<LexerType>::parse(ParserError& error, const Identifier& calleeName, SourceParseMode parseMode, ParsingContext parsingContext, std::optional<int> functionConstructorParametersEndPosition)
     1850std::unique_ptr<ParsedNode> Parser<LexerType>::parse(ParserError& error, const Identifier& calleeName, SourceParseMode parseMode)
    18511851{
    18521852    int errLine;
    … …  
    18651865    unsigned startColumn = m_source->startColumn().zeroBasedInt();
    18661866
    1867     String parseError = parseInner(calleeName, parseMode, parsingContext, functionConstructorParametersEndPosition);
     1867    String parseError = parseInner(calleeName, parseMode);
    18681868
    18691869    int lineNumber = m_lexer->lineNumber();
    … …  
    19601960    if (source.provider()->source().is8Bit()) {
    19611961        Parser<Lexer<LChar>> parser(vm, source, builtinMode, strictMode, scriptMode, parseMode, superBinding, defaultConstructorKind, derivedContextType, isEvalNode<ParsedNode>(), evalContextType, debuggerParseData);
    1962         result = parser.parse<ParsedNode>(error, name, parseMode, isEvalNode<ParsedNode>() ? ParsingContext::Eval : ParsingContext::Program);
     1962        result = parser.parse<ParsedNode>(error, name, parseMode);
    19631963        if (positionBeforeLastNewline)
    19641964            *positionBeforeLastNewline = parser.positionBeforeLastNewline();
    … …  
    19731973        ASSERT_WITH_MESSAGE(defaultConstructorKind == ConstructorKind::None, "BuiltinExecutables::createDefaultConstructor should always use a 8-bit string");
    19741974        Parser<Lexer<UChar>> parser(vm, source, builtinMode, strictMode, scriptMode, parseMode, superBinding, defaultConstructorKind, derivedContextType, isEvalNode<ParsedNode>(), evalContextType, debuggerParseData);
    1975         result = parser.parse<ParsedNode>(error, name, parseMode, isEvalNode<ParsedNode>() ? ParsingContext::Eval : ParsingContext::Program);
     1975        result = parser.parse<ParsedNode>(error, name, parseMode);
    19761976        if (positionBeforeLastNewline)
    19771977            *positionBeforeLastNewline = parser.positionBeforeLastNewline();
    … …  
    19871987}
    19881988
    1989 inline std::unique_ptr<ProgramNode> parseFunctionForFunctionConstructor(VM& vm, const SourceCode& source, ParserError& error, JSTextPosition* positionBeforeLastNewline, std::optional<int> functionConstructorParametersEndPosition)
    1990 {
    1991     ASSERT(!source.provider()->source().isNull());
    1992 
    1993     MonotonicTime before;
    1994     if (UNLIKELY(Options::reportParseTimes()))
    1995         before = MonotonicTime::now();
    1996 
    1997     Identifier name;
    1998     bool isEvalNode = false;
    1999     std::unique_ptr<ProgramNode> result;
    2000     if (source.provider()->source().is8Bit()) {
    2001         Parser<Lexer<LChar>> parser(&vm, source, JSParserBuiltinMode::NotBuiltin, JSParserStrictMode::NotStrict, JSParserScriptMode::Classic, SourceParseMode::ProgramMode, SuperBinding::NotNeeded, ConstructorKind::None, DerivedContextType::None, isEvalNode, EvalContextType::None, nullptr);
    2002         result = parser.parse<ProgramNode>(error, name, SourceParseMode::ProgramMode, ParsingContext::FunctionConstructor, functionConstructorParametersEndPosition);
    2003         if (positionBeforeLastNewline)
    2004             *positionBeforeLastNewline = parser.positionBeforeLastNewline();
    2005     } else {
    2006         Parser<Lexer<UChar>> parser(&vm, source, JSParserBuiltinMode::NotBuiltin, JSParserStrictMode::NotStrict, JSParserScriptMode::Classic, SourceParseMode::ProgramMode, SuperBinding::NotNeeded, ConstructorKind::None, DerivedContextType::None, isEvalNode, EvalContextType::None, nullptr);
    2007         result = parser.parse<ProgramNode>(error, name, SourceParseMode::ProgramMode, ParsingContext::FunctionConstructor, functionConstructorParametersEndPosition);
    2008         if (positionBeforeLastNewline)
    2009             *positionBeforeLastNewline = parser.positionBeforeLastNewline();
    2010     }
    2011 
    2012     if (UNLIKELY(Options::reportParseTimes())) {
    2013         MonotonicTime after = MonotonicTime::now();
    2014         ParseHash hash(source);
    2015         dataLogLn(result ? "Parsed #" : "Failed to parse #", hash.hashForCall(), "/#", hash.hashForConstruct(), " in ", (after - before).milliseconds(), " ms.");
    2016     }
    2017 
    2018     return result;
    2019 }
    2020 
    2021 
    20221989} // namespace
  • trunk/Source/JavaScriptCore/parser/ParserModes.h

    r237445 r237478  
    3434enum class JSParserBuiltinMode { NotBuiltin, Builtin };
    3535enum class JSParserScriptMode { Classic, Module };
     36enum class JSParserCodeType { Program, Function, Module };
    3637
    3738enum class ConstructorKind { None, Base, Extends };
  • trunk/Source/JavaScriptCore/parser/ParserTokens.h

    r237445 r237478  
    194194    JSTextPosition() = default;
    195195    JSTextPosition(int _line, int _offset, int _lineStartOffset) : line(_line), offset(_offset), lineStartOffset(_lineStartOffset) { }
     196    JSTextPosition(const JSTextPosition& other) : line(other.line), offset(other.offset), lineStartOffset(other.lineStartOffset) { }
    196197
    197198    JSTextPosition operator+(int adjustment) const { return JSTextPosition(line, offset + adjustment, lineStartOffset); }
    … …  
    246247struct JSTokenLocation {
    247248    JSTokenLocation() = default;
     249    JSTokenLocation(const JSTokenLocation& location)
     250    {
     251        line = location.line;
     252        lineStartOffset = location.lineStartOffset;
     253        startOffset = location.startOffset;
     254        endOffset = location.endOffset;
     255    }
    248256
    249257    int line { 0 };
  • trunk/Source/JavaScriptCore/parser/SourceCodeKey.h

    r237445 r237478  
    3030#include "UnlinkedSourceCode.h"
    3131#include <wtf/HashTraits.h>
    32 #include <wtf/Hasher.h>
    3332
    3433namespace JSC {
    … …  
    7372class SourceCodeKey {
    7473public:
    75     SourceCodeKey() = default;
     74    SourceCodeKey()
     75    {
     76    }
    7677
    7778    SourceCodeKey(
    7879        const UnlinkedSourceCode& sourceCode, const String& name, SourceCodeType codeType, JSParserStrictMode strictMode,
    7980        JSParserScriptMode scriptMode, DerivedContextType derivedContextType, EvalContextType evalContextType, bool isArrowFunctionContext,
    80         DebuggerMode debuggerMode, TypeProfilerEnabled typeProfilerEnabled, ControlFlowProfilerEnabled controlFlowProfilerEnabled, std::optional<int> functionConstructorParametersEndPosition)
     81        DebuggerMode debuggerMode, TypeProfilerEnabled typeProfilerEnabled, ControlFlowProfilerEnabled controlFlowProfilerEnabled)
    8182            : m_sourceCode(sourceCode)
    8283            , m_name(name)
    8384            , m_flags(codeType, strictMode, scriptMode, derivedContextType, evalContextType, isArrowFunctionContext, debuggerMode, typeProfilerEnabled, controlFlowProfilerEnabled)
    84             , m_functionConstructorParametersEndPosition(functionConstructorParametersEndPosition.value_or(-1))
    85             , m_hash(sourceCode.hash() ^ computeHash(m_flags.bits(), m_functionConstructorParametersEndPosition))
     85            , m_hash(sourceCode.hash() ^ m_flags.bits())
    8686    {
    8787    }
    … …  
    109109            && length() == other.length()
    110110            && m_flags == other.m_flags
    111             && m_functionConstructorParametersEndPosition == other.m_functionConstructorParametersEndPosition
    112111            && m_name == other.m_name
    113112            && string() == other.string();
    … …  
    129128    String m_name;
    130129    SourceCodeFlags m_flags;
    131     int m_functionConstructorParametersEndPosition { -1 };
    132     unsigned m_hash { 0 };
     130    unsigned m_hash;
    133131};
    134132
  • trunk/Source/JavaScriptCore/runtime/CodeCache.cpp

    r237445 r237478  
    5858        derivedContextType, evalContextType, isArrowFunctionContext, debuggerMode,
    5959        vm.typeProfiler() ? TypeProfilerEnabled::Yes : TypeProfilerEnabled::No,
    60         vm.controlFlowProfiler() ? ControlFlowProfilerEnabled::Yes : ControlFlowProfilerEnabled::No,
    61         std::nullopt);
     60        vm.controlFlowProfiler() ? ControlFlowProfilerEnabled::Yes : ControlFlowProfilerEnabled::No);
    6261    SourceCodeValue* cache = m_sourceCode.findCacheAndUpdateAge(key);
    6362    if (cache && Options::useCodeCache()) {
    … …  
    9796}
    9897
    99 UnlinkedFunctionExecutable* CodeCache::getUnlinkedGlobalFunctionExecutable(VM& vm, const Identifier& name, const SourceCode& source, DebuggerMode debuggerMode, std::optional<int> functionConstructorParametersEndPosition, ParserError& error)
     98UnlinkedFunctionExecutable* CodeCache::getUnlinkedGlobalFunctionExecutable(VM& vm, const Identifier& name, const SourceCode& source, DebuggerMode debuggerMode, ParserError& error)
    10099{
    101100    bool isArrowFunctionContext = false;
    … …  
    109108        debuggerMode,
    110109        vm.typeProfiler() ? TypeProfilerEnabled::Yes : TypeProfilerEnabled::No,
    111         vm.controlFlowProfiler() ? ControlFlowProfilerEnabled::Yes : ControlFlowProfilerEnabled::No,
    112         functionConstructorParametersEndPosition);
     110        vm.controlFlowProfiler() ? ControlFlowProfilerEnabled::Yes : ControlFlowProfilerEnabled::No);
    113111    SourceCodeValue* cache = m_sourceCode.findCacheAndUpdateAge(key);
    114112    if (cache && Options::useCodeCache()) {
  • trunk/Source/JavaScriptCore/runtime/CodeCache.h

    r237445 r237478  
    195195    UnlinkedEvalCodeBlock* getUnlinkedEvalCodeBlock(VM&, IndirectEvalExecutable*, const SourceCode&, JSParserStrictMode, DebuggerMode, ParserError&, EvalContextType);
    196196    UnlinkedModuleProgramCodeBlock* getUnlinkedModuleProgramCodeBlock(VM&, ModuleProgramExecutable*, const SourceCode&, DebuggerMode, ParserError&);
    197     UnlinkedFunctionExecutable* getUnlinkedGlobalFunctionExecutable(VM&, const Identifier&, const SourceCode&, DebuggerMode, std::optional<int> functionConstructorParametersEndPosition, ParserError&);
     197    UnlinkedFunctionExecutable* getUnlinkedGlobalFunctionExecutable(VM&, const Identifier&, const SourceCode&, DebuggerMode, ParserError&);
    198198
    199199    void clear() { m_sourceCode.clear(); }
  • trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp

    r237445 r237478  
    170170    SourceCode source = makeSource(program, sourceOrigin, sourceURL, position);
    171171    JSObject* exception = nullptr;
    172     FunctionExecutable* function = FunctionExecutable::fromGlobalCode(functionName, *exec, source, exception, overrideLineNumber, std::nullopt);
     172    FunctionExecutable* function = FunctionExecutable::fromGlobalCode(functionName, *exec, source, exception, overrideLineNumber);
    173173    if (!function) {
    174174        ASSERT(exception);
  • trunk/Source/JavaScriptCore/runtime/FunctionExecutable.cpp

    r237445 r237478  
    9595FunctionExecutable* FunctionExecutable::fromGlobalCode(
    9696    const Identifier& name, ExecState& exec, const SourceCode& source,
    97     JSObject*& exception, int overrideLineNumber, std::optional<int> functionConstructorParametersEndPosition)
     97    JSObject*& exception, int overrideLineNumber)
    9898{
    9999    UnlinkedFunctionExecutable* unlinkedExecutable =
    100100        UnlinkedFunctionExecutable::fromGlobalCode(
    101             name, exec, source, exception, overrideLineNumber, functionConstructorParametersEndPosition);
     101            name, exec, source, exception, overrideLineNumber);
    102102    if (!unlinkedExecutable)
    103103        return nullptr;
  • trunk/Source/JavaScriptCore/runtime/FunctionExecutable.h

    r237445 r237478  
    5656    static FunctionExecutable* fromGlobalCode(
    5757        const Identifier& name, ExecState&, const SourceCode&,
    58         JSObject*& exception, int overrideLineNumber, std::optional<int> functionConstructorParametersEndPosition);
     58        JSObject*& exception, int overrideLineNumber);
    5959
    6060    static void destroy(JSCell*);
Note: See TracChangeset for help on using the changeset viewer.