Changeset 237478 in webkit
- Timestamp:
- Oct 26, 2018, 12:33:55 PM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 13 edited
-
ChangeLog (modified) (1 diff)
-
bytecode/UnlinkedFunctionExecutable.cpp (modified) (2 diffs)
-
bytecode/UnlinkedFunctionExecutable.h (modified) (1 diff)
-
parser/Parser.cpp (modified) (9 diffs)
-
parser/Parser.h (modified) (10 diffs)
-
parser/ParserModes.h (modified) (1 diff)
-
parser/ParserTokens.h (modified) (2 diffs)
-
parser/SourceCodeKey.h (modified) (4 diffs)
-
runtime/CodeCache.cpp (modified) (3 diffs)
-
runtime/CodeCache.h (modified) (1 diff)
-
runtime/FunctionConstructor.cpp (modified) (1 diff)
-
runtime/FunctionExecutable.cpp (modified) (1 diff)
-
runtime/FunctionExecutable.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r237469 r237478 1 2018-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 1 15 2018-10-26 Mark Lam <mark.lam@apple.com> 2 16 -
trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp
r237445 r237478 175 175 UnlinkedFunctionExecutable* UnlinkedFunctionExecutable::fromGlobalCode( 176 176 const Identifier& name, ExecState& exec, const SourceCode& source, 177 JSObject*& exception, int overrideLineNumber , std::optional<int> functionConstructorParametersEndPosition)177 JSObject*& exception, int overrideLineNumber) 178 178 { 179 179 ParserError error; … … 182 182 CodeCache* codeCache = vm.codeCache(); 183 183 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); 185 185 186 186 if (globalObject.hasDebugger()) -
trunk/Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h
r237445 r237478 108 108 static UnlinkedFunctionExecutable* fromGlobalCode( 109 109 const Identifier&, ExecState&, const SourceCode&, JSObject*& exception, 110 int overrideLineNumber , std::optional<int> functionConstructorParametersEndPosition);110 int overrideLineNumber); 111 111 112 112 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 195 195 196 196 template <typename LexerType> 197 String Parser<LexerType>::parseInner(const Identifier& calleeName, SourceParseMode parseMode , ParsingContext parsingContext, std::optional<int> functionConstructorParametersEndPosition)197 String Parser<LexerType>::parseInner(const Identifier& calleeName, SourceParseMode parseMode) 198 198 { 199 199 String parseError = String(); … … 239 239 else if (isAsyncGeneratorWrapperParseMode(parseMode)) 240 240 sourceElements = parseAsyncGeneratorFunctionSourceElements(context, parseMode, isArrowFunctionBodyExpression, CheckForStrictMode); 241 else if (parsingContext == ParsingContext::FunctionConstructor)242 sourceElements = parseSingleFunction(context, functionConstructorParametersEndPosition);243 241 else 244 242 sourceElements = parseSourceElements(context, CheckForStrictMode); … … 613 611 return sourceElements; 614 612 } 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 647 613 648 614 template <typename LexerType> … … 2298 2264 2299 2265 template <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)2266 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) 2301 2267 { 2302 2268 RELEASE_ASSERT(isFunctionParseMode(mode)); … … 2494 2460 2495 2461 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");2500 2462 2501 2463 // BytecodeGenerator emits code to throw TypeError when a class constructor is "call"ed. … … 2632 2594 2633 2595 template <typename LexerType> 2634 template <class TreeBuilder> TreeStatement Parser<LexerType>::parseFunctionDeclaration(TreeBuilder& context, ExportType exportType, DeclarationDefaultContext declarationDefaultContext , std::optional<int> functionConstructorParametersEndPosition)2596 template <class TreeBuilder> TreeStatement Parser<LexerType>::parseFunctionDeclaration(TreeBuilder& context, ExportType exportType, DeclarationDefaultContext declarationDefaultContext) 2635 2597 { 2636 2598 ASSERT(match(FUNCTION)); … … 2669 2631 } 2670 2632 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"); 2672 2634 ASSERT(functionInfo.name); 2673 2635 … … 2690 2652 2691 2653 template <typename LexerType> 2692 template <class TreeBuilder> TreeStatement Parser<LexerType>::parseAsyncFunctionDeclaration(TreeBuilder& context, ExportType exportType, DeclarationDefaultContext declarationDefaultContext , std::optional<int> functionConstructorParametersEndPosition)2654 template <class TreeBuilder> TreeStatement Parser<LexerType>::parseAsyncFunctionDeclaration(TreeBuilder& context, ExportType exportType, DeclarationDefaultContext declarationDefaultContext) 2693 2655 { 2694 2656 ASSERT(match(FUNCTION)); … … 2727 2689 } 2728 2690 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"); 2730 2692 failIfFalse(functionInfo.name, "Async function statements must have a name"); 2731 2693 -
trunk/Source/JavaScriptCore/parser/Parser.h
r237445 r237478 860 860 }; 861 861 862 enum class ArgumentType { Normal, Spread }; 863 enum class ParsingContext { Program, FunctionConstructor, Eval }; 862 enum class ArgumentType { 863 Normal, 864 Spread 865 }; 864 866 865 867 template <typename LexerType> … … 873 875 874 876 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); 876 878 877 879 JSTextPosition positionBeforeLastNewline() const { return m_lexer->positionBeforeLastNewline(); } … … 1311 1313 1312 1314 Parser(); 1313 1314 String parseInner(const Identifier&, SourceParseMode, ParsingContext, std::optional<int> functionConstructorParametersEndPosition = std::nullopt); 1315 String parseInner(const Identifier&, SourceParseMode); 1315 1316 1316 1317 void didFinishParsing(SourceElements*, DeclarationStacks::FunctionStack&&, VariableEnvironment&, UniquedStringImplPtrSet&&, CodeFeatures, int); … … 1524 1525 template <class TreeBuilder> TreeSourceElements parseAsyncFunctionSourceElements(TreeBuilder&, SourceParseMode, bool isArrowFunctionBodyExpression, SourceElementsMode); 1525 1526 template <class TreeBuilder> TreeSourceElements parseAsyncGeneratorFunctionSourceElements(TreeBuilder&, SourceParseMode, bool isArrowFunctionBodyExpression, SourceElementsMode); 1526 template <class TreeBuilder> TreeSourceElements parseSingleFunction(TreeBuilder&, std::optional<int> functionConstructorParametersEndPosition);1527 1527 template <class TreeBuilder> TreeStatement parseStatementListItem(TreeBuilder&, const Identifier*& directive, unsigned* directiveLiteralLength); 1528 1528 template <class TreeBuilder> TreeStatement parseStatement(TreeBuilder&, const Identifier*& directive, unsigned* directiveLiteralLength = 0); 1529 1529 enum class ExportType { Exported, NotExported }; 1530 1530 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); 1532 1532 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); 1534 1534 template <class TreeBuilder> NEVER_INLINE bool maybeParseAsyncFunctionDeclarationStatement(TreeBuilder& context, TreeStatement& result, bool parentAllowsFunctionDeclarationAsStatement); 1535 1535 template <class TreeBuilder> TreeStatement parseVariableDeclaration(TreeBuilder&, DeclarationType, ExportType = ExportType::NotExported); … … 1600 1600 1601 1601 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); 1603 1603 1604 1604 ALWAYS_INLINE bool isArrowFunctionParameters(); … … 1848 1848 template <typename LexerType> 1849 1849 template <class ParsedNode> 1850 std::unique_ptr<ParsedNode> Parser<LexerType>::parse(ParserError& error, const Identifier& calleeName, SourceParseMode parseMode , ParsingContext parsingContext, std::optional<int> functionConstructorParametersEndPosition)1850 std::unique_ptr<ParsedNode> Parser<LexerType>::parse(ParserError& error, const Identifier& calleeName, SourceParseMode parseMode) 1851 1851 { 1852 1852 int errLine; … … 1865 1865 unsigned startColumn = m_source->startColumn().zeroBasedInt(); 1866 1866 1867 String parseError = parseInner(calleeName, parseMode , parsingContext, functionConstructorParametersEndPosition);1867 String parseError = parseInner(calleeName, parseMode); 1868 1868 1869 1869 int lineNumber = m_lexer->lineNumber(); … … 1960 1960 if (source.provider()->source().is8Bit()) { 1961 1961 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); 1963 1963 if (positionBeforeLastNewline) 1964 1964 *positionBeforeLastNewline = parser.positionBeforeLastNewline(); … … 1973 1973 ASSERT_WITH_MESSAGE(defaultConstructorKind == ConstructorKind::None, "BuiltinExecutables::createDefaultConstructor should always use a 8-bit string"); 1974 1974 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); 1976 1976 if (positionBeforeLastNewline) 1977 1977 *positionBeforeLastNewline = parser.positionBeforeLastNewline(); … … 1987 1987 } 1988 1988 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 2022 1989 } // namespace -
trunk/Source/JavaScriptCore/parser/ParserModes.h
r237445 r237478 34 34 enum class JSParserBuiltinMode { NotBuiltin, Builtin }; 35 35 enum class JSParserScriptMode { Classic, Module }; 36 enum class JSParserCodeType { Program, Function, Module }; 36 37 37 38 enum class ConstructorKind { None, Base, Extends }; -
trunk/Source/JavaScriptCore/parser/ParserTokens.h
r237445 r237478 194 194 JSTextPosition() = default; 195 195 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) { } 196 197 197 198 JSTextPosition operator+(int adjustment) const { return JSTextPosition(line, offset + adjustment, lineStartOffset); } … … 246 247 struct JSTokenLocation { 247 248 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 } 248 256 249 257 int line { 0 }; -
trunk/Source/JavaScriptCore/parser/SourceCodeKey.h
r237445 r237478 30 30 #include "UnlinkedSourceCode.h" 31 31 #include <wtf/HashTraits.h> 32 #include <wtf/Hasher.h>33 32 34 33 namespace JSC { … … 73 72 class SourceCodeKey { 74 73 public: 75 SourceCodeKey() = default; 74 SourceCodeKey() 75 { 76 } 76 77 77 78 SourceCodeKey( 78 79 const UnlinkedSourceCode& sourceCode, const String& name, SourceCodeType codeType, JSParserStrictMode strictMode, 79 80 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) 81 82 : m_sourceCode(sourceCode) 82 83 , m_name(name) 83 84 , 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()) 86 86 { 87 87 } … … 109 109 && length() == other.length() 110 110 && m_flags == other.m_flags 111 && m_functionConstructorParametersEndPosition == other.m_functionConstructorParametersEndPosition112 111 && m_name == other.m_name 113 112 && string() == other.string(); … … 129 128 String m_name; 130 129 SourceCodeFlags m_flags; 131 int m_functionConstructorParametersEndPosition { -1 }; 132 unsigned m_hash { 0 }; 130 unsigned m_hash; 133 131 }; 134 132 -
trunk/Source/JavaScriptCore/runtime/CodeCache.cpp
r237445 r237478 58 58 derivedContextType, evalContextType, isArrowFunctionContext, debuggerMode, 59 59 vm.typeProfiler() ? TypeProfilerEnabled::Yes : TypeProfilerEnabled::No, 60 vm.controlFlowProfiler() ? ControlFlowProfilerEnabled::Yes : ControlFlowProfilerEnabled::No, 61 std::nullopt); 60 vm.controlFlowProfiler() ? ControlFlowProfilerEnabled::Yes : ControlFlowProfilerEnabled::No); 62 61 SourceCodeValue* cache = m_sourceCode.findCacheAndUpdateAge(key); 63 62 if (cache && Options::useCodeCache()) { … … 97 96 } 98 97 99 UnlinkedFunctionExecutable* CodeCache::getUnlinkedGlobalFunctionExecutable(VM& vm, const Identifier& name, const SourceCode& source, DebuggerMode debuggerMode, std::optional<int> functionConstructorParametersEndPosition,ParserError& error)98 UnlinkedFunctionExecutable* CodeCache::getUnlinkedGlobalFunctionExecutable(VM& vm, const Identifier& name, const SourceCode& source, DebuggerMode debuggerMode, ParserError& error) 100 99 { 101 100 bool isArrowFunctionContext = false; … … 109 108 debuggerMode, 110 109 vm.typeProfiler() ? TypeProfilerEnabled::Yes : TypeProfilerEnabled::No, 111 vm.controlFlowProfiler() ? ControlFlowProfilerEnabled::Yes : ControlFlowProfilerEnabled::No, 112 functionConstructorParametersEndPosition); 110 vm.controlFlowProfiler() ? ControlFlowProfilerEnabled::Yes : ControlFlowProfilerEnabled::No); 113 111 SourceCodeValue* cache = m_sourceCode.findCacheAndUpdateAge(key); 114 112 if (cache && Options::useCodeCache()) { -
trunk/Source/JavaScriptCore/runtime/CodeCache.h
r237445 r237478 195 195 UnlinkedEvalCodeBlock* getUnlinkedEvalCodeBlock(VM&, IndirectEvalExecutable*, const SourceCode&, JSParserStrictMode, DebuggerMode, ParserError&, EvalContextType); 196 196 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&); 198 198 199 199 void clear() { m_sourceCode.clear(); } -
trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp
r237445 r237478 170 170 SourceCode source = makeSource(program, sourceOrigin, sourceURL, position); 171 171 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); 173 173 if (!function) { 174 174 ASSERT(exception); -
trunk/Source/JavaScriptCore/runtime/FunctionExecutable.cpp
r237445 r237478 95 95 FunctionExecutable* FunctionExecutable::fromGlobalCode( 96 96 const Identifier& name, ExecState& exec, const SourceCode& source, 97 JSObject*& exception, int overrideLineNumber , std::optional<int> functionConstructorParametersEndPosition)97 JSObject*& exception, int overrideLineNumber) 98 98 { 99 99 UnlinkedFunctionExecutable* unlinkedExecutable = 100 100 UnlinkedFunctionExecutable::fromGlobalCode( 101 name, exec, source, exception, overrideLineNumber , functionConstructorParametersEndPosition);101 name, exec, source, exception, overrideLineNumber); 102 102 if (!unlinkedExecutable) 103 103 return nullptr; -
trunk/Source/JavaScriptCore/runtime/FunctionExecutable.h
r237445 r237478 56 56 static FunctionExecutable* fromGlobalCode( 57 57 const Identifier& name, ExecState&, const SourceCode&, 58 JSObject*& exception, int overrideLineNumber , std::optional<int> functionConstructorParametersEndPosition);58 JSObject*& exception, int overrideLineNumber); 59 59 60 60 static void destroy(JSCell*);
Note:
See TracChangeset
for help on using the changeset viewer.