|
Lines 35-46
Source/JavaScriptCore/bytecode/PutByIdStatus.cpp_sec1
|
| 35 |
|
35 |
|
| 36 |
namespace JSC { |
36 |
namespace JSC { |
| 37 |
|
37 |
|
| 38 |
bool PutByIdStatus::hasExitSite(const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex) |
38 |
bool PutByIdStatus::hasExitSite(const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, unsigned bytecodeIndex, ExitingJITType exitType) |
| 39 |
{ |
39 |
{ |
| 40 |
return profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache)) |
40 |
return profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCache, exitType)) |
| 41 |
|| profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCacheWatchpoint)) |
41 |
|| profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadCacheWatchpoint, exitType)) |
| 42 |
|| profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadWeakConstantCache)) |
42 |
|| profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadWeakConstantCache, exitType)) |
| 43 |
|| profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadWeakConstantCacheWatchpoint)); |
43 |
|| profiledBlock->hasExitSite(locker, DFG::FrequentExitSite(bytecodeIndex, BadWeakConstantCacheWatchpoint, exitType)); |
| 44 |
} |
44 |
} |
| 45 |
|
45 |
|
| 46 |
PutByIdStatus PutByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, StringImpl* uid) |
46 |
PutByIdStatus PutByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, StringImpl* uid) |
|
Lines 102-110
PutByIdStatus PutByIdStatus::computeFor(
Source/JavaScriptCore/bytecode/PutByIdStatus.cpp_sec2
|
| 102 |
return PutByIdStatus(TakesSlowPath, 0, 0, 0, invalidOffset); |
102 |
return PutByIdStatus(TakesSlowPath, 0, 0, 0, invalidOffset); |
| 103 |
|
103 |
|
| 104 |
StructureStubInfo* stubInfo = map.get(CodeOrigin(bytecodeIndex)); |
104 |
StructureStubInfo* stubInfo = map.get(CodeOrigin(bytecodeIndex)); |
| 105 |
if (!stubInfo || !stubInfo->seen) |
105 |
PutByIdStatus result = computeForStubInfo(locker, profiledBlock, stubInfo, uid); |
|
|
106 |
if (!result) |
| 106 |
return computeFromLLInt(profiledBlock, bytecodeIndex, uid); |
107 |
return computeFromLLInt(profiledBlock, bytecodeIndex, uid); |
| 107 |
|
108 |
|
|
|
109 |
return result; |
| 110 |
#else // ENABLE(JIT) |
| 111 |
UNUSED_PARAM(map); |
| 112 |
return PutByIdStatus(NoInformation, 0, 0, 0, invalidOffset); |
| 113 |
#endif // ENABLE(JIT) |
| 114 |
} |
| 115 |
|
| 116 |
PutByIdStatus PutByIdStatus::computeForStubInfo(const ConcurrentJITLocker&, CodeBlock* profiledBlock, StructureStubInfo* stubInfo, StringImpl* uid) |
| 117 |
{ |
| 118 |
if (!stubInfo || !stubInfo->seen) |
| 119 |
return PutByIdStatus(); |
| 120 |
|
| 108 |
if (stubInfo->resetByGC) |
121 |
if (stubInfo->resetByGC) |
| 109 |
return PutByIdStatus(TakesSlowPath, 0, 0, 0, invalidOffset); |
122 |
return PutByIdStatus(TakesSlowPath, 0, 0, 0, invalidOffset); |
| 110 |
|
123 |
|
|
Lines 151-160
PutByIdStatus PutByIdStatus::computeFor(
Source/JavaScriptCore/bytecode/PutByIdStatus.cpp_sec3
|
| 151 |
// we could do about it. |
164 |
// we could do about it. |
| 152 |
return PutByIdStatus(TakesSlowPath, 0, 0, 0, invalidOffset); |
165 |
return PutByIdStatus(TakesSlowPath, 0, 0, 0, invalidOffset); |
| 153 |
} |
166 |
} |
| 154 |
#else // ENABLE(JIT) |
167 |
} |
| 155 |
UNUSED_PARAM(map); |
168 |
|
| 156 |
return PutByIdStatus(NoInformation, 0, 0, 0, invalidOffset); |
169 |
PutByIdStatus PutByIdStatus::computeFor(CodeBlock* baselineBlock, CodeBlock* dfgBlock, StubInfoMap& baselineMap, StubInfoMap& dfgMap, CodeOrigin codeOrigin, StringImpl* uid) |
| 157 |
#endif // ENABLE(JIT) |
170 |
{ |
|
|
171 |
if (dfgBlock) { |
| 172 |
{ |
| 173 |
ConcurrentJITLocker locker(baselineBlock->m_lock); |
| 174 |
if (hasExitSite(locker, baselineBlock, codeOrigin.bytecodeIndex, ExitFromFTL)) |
| 175 |
return PutByIdStatus(TakesSlowPath); |
| 176 |
} |
| 177 |
|
| 178 |
PutByIdStatus result; |
| 179 |
{ |
| 180 |
ConcurrentJITLocker locker(dfgBlock->m_lock); |
| 181 |
result = computeForStubInfo(locker, dfgBlock, dfgMap.get(codeOrigin), uid); |
| 182 |
} |
| 183 |
|
| 184 |
if (result.isSet()) |
| 185 |
return result; |
| 186 |
} |
| 187 |
|
| 188 |
return computeFor(baselineBlock, baselineMap, codeOrigin.bytecodeIndex, uid); |
| 158 |
} |
189 |
} |
| 159 |
|
190 |
|
| 160 |
PutByIdStatus PutByIdStatus::computeFor(VM& vm, JSGlobalObject* globalObject, Structure* structure, StringImpl* uid, bool isDirect) |
191 |
PutByIdStatus PutByIdStatus::computeFor(VM& vm, JSGlobalObject* globalObject, Structure* structure, StringImpl* uid, bool isDirect) |