Changeset 238109 in webkit for trunk/Source/JavaScriptCore/parser/SourceCodeKey.h
- Timestamp:
- Nov 12, 2018, 2:10:38 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/SourceCodeKey.h
r238026 r238109 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() ^ DefaultHash<unsigned>::Hash::hash(m_flags.bits()) ^ DefaultHash<int>::Hash::hash(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
Note:
See TracChangeset
for help on using the changeset viewer.