Changeset 211316 in webkit for trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h
- Timestamp:
- Jan 27, 2017, 5:04:06 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h
r206525 r211316 81 81 ExecutableBase* executable { nullptr }; 82 82 JSObject* callee { nullptr }; 83 // These attempt to be expression-level line and column number. 84 unsigned lineNumber { std::numeric_limits<unsigned>::max() }; 85 unsigned columnNumber { std::numeric_limits<unsigned>::max() }; 86 unsigned bytecodeIndex { std::numeric_limits<unsigned>::max() }; 87 CodeBlockHash codeBlockHash; 88 JITCode::JITType jitType { JITCode::None }; 89 90 bool hasExpressionInfo() const 83 84 struct CodeLocation { 85 bool hasCodeBlockHash() const 86 { 87 return codeBlockHash.isSet(); 88 } 89 90 bool hasBytecodeIndex() const 91 { 92 return bytecodeIndex != std::numeric_limits<unsigned>::max(); 93 } 94 95 bool hasExpressionInfo() const 96 { 97 return lineNumber != std::numeric_limits<unsigned>::max() 98 && columnNumber != std::numeric_limits<unsigned>::max(); 99 } 100 101 // These attempt to be expression-level line and column number. 102 unsigned lineNumber { std::numeric_limits<unsigned>::max() }; 103 unsigned columnNumber { std::numeric_limits<unsigned>::max() }; 104 unsigned bytecodeIndex { std::numeric_limits<unsigned>::max() }; 105 CodeBlockHash codeBlockHash; 106 JITCode::JITType jitType { JITCode::None }; 107 }; 108 109 CodeLocation semanticLocation; 110 std::optional<std::pair<CodeLocation, Strong<CodeBlock>>> machineLocation; // This is non-null if we were inlined. It represents the machine frame we were inlined into. 111 112 bool hasExpressionInfo() const { return semanticLocation.hasExpressionInfo(); } 113 unsigned lineNumber() const 91 114 { 92 return lineNumber != std::numeric_limits<unsigned>::max()93 && columnNumber != std::numeric_limits<unsigned>::max();115 ASSERT(hasExpressionInfo()); 116 return semanticLocation.lineNumber; 94 117 } 95 96 bool hasBytecodeIndex() const 118 unsigned columnNumber() const 97 119 { 98 return bytecodeIndex != std::numeric_limits<unsigned>::max(); 99 } 100 101 bool hasCodeBlockHash() const 102 { 103 return codeBlockHash.isSet(); 120 ASSERT(hasExpressionInfo()); 121 return semanticLocation.columnNumber; 104 122 } 105 123
Note:
See TracChangeset
for help on using the changeset viewer.