Changeset 226928 in webkit for trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp
- Timestamp:
- Jan 12, 2018, 4:36:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp
r222827 r226928 1 1 /* 2 * Copyright (C) 2012-201 5Apple Inc. All rights reserved.2 * Copyright (C) 2012-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 66 66 67 67 #if ENABLE(DFG_JIT) 68 bool GetByIdStatus::hasExitSite(const ConcurrentJSLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex) 69 { 70 return profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache)) 71 || profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadConstantCache)); 68 bool GetByIdStatus::hasExitSite(CodeBlock* profiledBlock, unsigned bytecodeIndex) 69 { 70 UnlinkedCodeBlock* unlinkedCodeBlock = profiledBlock->unlinkedCodeBlock(); 71 ConcurrentJSLocker locker(unlinkedCodeBlock->m_lock); 72 return unlinkedCodeBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache)) 73 || unlinkedCodeBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadConstantCache)); 72 74 } 73 75 #endif … … 120 122 result = computeForStubInfoWithoutExitSiteFeedback( 121 123 locker, profiledBlock, map.get(CodeOrigin(bytecodeIndex)), uid, 122 CallLinkStatus::computeExitSiteData( locker,profiledBlock, bytecodeIndex));124 CallLinkStatus::computeExitSiteData(profiledBlock, bytecodeIndex)); 123 125 124 126 if (!result.takesSlowPath() 125 && hasExitSite( locker,profiledBlock, bytecodeIndex))127 && hasExitSite(profiledBlock, bytecodeIndex)) 126 128 return GetByIdStatus(result.makesCalls() ? MakesCalls : TakesSlowPath, true); 127 129 #else … … 140 142 GetByIdStatus result = GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback( 141 143 locker, profiledBlock, stubInfo, uid, 142 CallLinkStatus::computeExitSiteData( locker,profiledBlock, codeOrigin.bytecodeIndex));143 144 if (!result.takesSlowPath() && GetByIdStatus::hasExitSite( locker,profiledBlock, codeOrigin.bytecodeIndex))144 CallLinkStatus::computeExitSiteData(profiledBlock, codeOrigin.bytecodeIndex)); 145 146 if (!result.takesSlowPath() && GetByIdStatus::hasExitSite(profiledBlock, codeOrigin.bytecodeIndex)) 145 147 return GetByIdStatus(result.makesCalls() ? GetByIdStatus::MakesCalls : GetByIdStatus::TakesSlowPath, true); 146 148 return result; … … 329 331 ConcurrentJSLocker locker(profiledBlock->m_lock); 330 332 exitSiteData = CallLinkStatus::computeExitSiteData( 331 locker,profiledBlock, codeOrigin.bytecodeIndex);333 profiledBlock, codeOrigin.bytecodeIndex); 332 334 } 333 335 … … 342 344 return result; 343 345 344 { 345 ConcurrentJSLocker locker(profiledBlock->m_lock); 346 if (hasExitSite(locker, profiledBlock, codeOrigin.bytecodeIndex)) 347 return GetByIdStatus(TakesSlowPath, true); 348 } 346 if (hasExitSite(profiledBlock, codeOrigin.bytecodeIndex)) 347 return GetByIdStatus(TakesSlowPath, true); 349 348 350 349 if (result.isSet())
Note:
See TracChangeset
for help on using the changeset viewer.