Changeset 209725 in webkit for trunk/Source/JavaScriptCore/jit/JITCode.cpp
- Timestamp:
- Dec 12, 2016, 1:46:45 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITCode.cpp
r209678 r209725 76 76 if (!function || !protoCallFrame->needArityCheck()) { 77 77 ASSERT(!protoCallFrame->needArityCheck()); 78 entryAddress = executableAddress();78 entryAddress = addressForCall(StackArgsArityCheckNotRequired).executableAddress(); 79 79 } else 80 entryAddress = addressForCall( MustCheckArity).executableAddress();80 entryAddress = addressForCall(StackArgsMustCheckArity).executableAddress(); 81 81 JSValue result = JSValue::decode(vmEntryToJavaScript(entryAddress, vm, protoCallFrame)); 82 82 return scope.exception() ? jsNull() : result; … … 163 163 } 164 164 165 DirectJITCode::DirectJITCode(JIT Code::CodeRef ref, JITCode::CodePtr withArityCheck, JITType jitType)166 : JITCodeWithCodeRef( ref, jitType)167 , m_ withArityCheck(withArityCheck)165 DirectJITCode::DirectJITCode(JITEntryPointsWithRef entries, JITType jitType) 166 : JITCodeWithCodeRef(entries.codeRef(), jitType) 167 , m_entryPoints(entries) 168 168 { 169 169 } … … 173 173 } 174 174 175 void DirectJITCode::initialize CodeRef(JITCode::CodeRef ref, JITCode::CodePtr withArityCheck)175 void DirectJITCode::initializeEntryPoints(JITEntryPointsWithRef entries) 176 176 { 177 177 RELEASE_ASSERT(!m_ref); 178 m_ref = ref; 179 m_withArityCheck = withArityCheck; 180 } 181 182 JITCode::CodePtr DirectJITCode::addressForCall(ArityCheckMode arity) 183 { 184 switch (arity) { 185 case ArityCheckNotRequired: 186 RELEASE_ASSERT(m_ref); 187 return m_ref.code(); 188 case MustCheckArity: 189 RELEASE_ASSERT(m_withArityCheck); 190 return m_withArityCheck; 191 } 192 RELEASE_ASSERT_NOT_REACHED(); 193 return CodePtr(); 178 m_ref = entries.codeRef(); 179 m_entryPoints = entries; 180 } 181 182 JITCode::CodePtr DirectJITCode::addressForCall(EntryPointType type) 183 { 184 return m_entryPoints.entryFor(type); 194 185 } 195 186 … … 214 205 } 215 206 216 JITCode::CodePtr NativeJITCode::addressForCall( ArityCheckMode)207 JITCode::CodePtr NativeJITCode::addressForCall(EntryPointType) 217 208 { 218 209 RELEASE_ASSERT(!!m_ref);
Note:
See TracChangeset
for help on using the changeset viewer.