Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | namespace JSC { | - | ||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | - | |||||||
8 | - | |||||||
9 | class FunctionPtr { | - | ||||||
10 | public: | - | ||||||
11 | FunctionPtr() | - | ||||||
12 | : m_value(0) | - | ||||||
13 | { | - | ||||||
14 | } never executed: end of block | 0 | ||||||
15 | - | |||||||
16 | template<typename returnType> | - | ||||||
17 | FunctionPtr(returnType(*value)()) | - | ||||||
18 | : m_value((void*)value) | - | ||||||
19 | { | - | ||||||
20 | (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 99, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
21 | } never executed: end of block | 0 | ||||||
22 | - | |||||||
23 | template<typename returnType, typename argType1> | - | ||||||
24 | FunctionPtr(returnType(*value)(argType1)) | - | ||||||
25 | : m_value((void*)value) | - | ||||||
26 | { | - | ||||||
27 | (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 106, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
28 | } never executed: end of block | 0 | ||||||
29 | - | |||||||
30 | template<typename returnType, typename argType1, typename argType2> | - | ||||||
31 | FunctionPtr(returnType(*value)(argType1, argType2)) | - | ||||||
32 | : m_value((void*)value) | - | ||||||
33 | { | - | ||||||
34 | (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 113, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
35 | } never executed: end of block | 0 | ||||||
36 | - | |||||||
37 | template<typename returnType, typename argType1, typename argType2, typename argType3> | - | ||||||
38 | FunctionPtr(returnType(*value)(argType1, argType2, argType3)) | - | ||||||
39 | : m_value((void*)value) | - | ||||||
40 | { | - | ||||||
41 | (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 120, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
42 | } never executed: end of block | 0 | ||||||
43 | - | |||||||
44 | template<typename returnType, typename argType1, typename argType2, typename argType3, typename argType4> | - | ||||||
45 | FunctionPtr(returnType(*value)(argType1, argType2, argType3, argType4)) | - | ||||||
46 | : m_value((void*)value) | - | ||||||
47 | { | - | ||||||
48 | (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 127, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
49 | } never executed: end of block | 0 | ||||||
50 | - | |||||||
51 | template<typename returnType, typename argType1, typename argType2, typename argType3, typename argType4, typename argType5> | - | ||||||
52 | FunctionPtr(returnType(*value)(argType1, argType2, argType3, argType4, argType5)) | - | ||||||
53 | : m_value((void*)value) | - | ||||||
54 | { | - | ||||||
55 | (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 134, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
56 | } never executed: end of block | 0 | ||||||
57 | - | |||||||
58 | template<typename returnType, typename argType1, typename argType2, typename argType3, typename argType4, typename argType5, typename argType6> | - | ||||||
59 | FunctionPtr(returnType(*value)(argType1, argType2, argType3, argType4, argType5, argType6)) | - | ||||||
60 | : m_value((void*)value) | - | ||||||
61 | { | - | ||||||
62 | (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 141, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
63 | } never executed: end of block | 0 | ||||||
64 | template<typename FunctionType> | - | ||||||
65 | explicit FunctionPtr(FunctionType* value) | - | ||||||
66 | - | |||||||
67 | - | |||||||
68 | - | |||||||
69 | : m_value((void*)value) | - | ||||||
70 | { | - | ||||||
71 | (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 229, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
72 | } never executed: end of block | 0 | ||||||
73 | - | |||||||
74 | void* value() const { return never executed: m_value;return m_value; never executed: }return m_value; | 0 | ||||||
75 | void* executableAddress() const { return never executed: m_value;return m_value; never executed: }return m_value; | 0 | ||||||
76 | - | |||||||
77 | - | |||||||
78 | private: | - | ||||||
79 | void* m_value; | - | ||||||
80 | }; | - | ||||||
81 | - | |||||||
82 | - | |||||||
83 | - | |||||||
84 | - | |||||||
85 | - | |||||||
86 | - | |||||||
87 | - | |||||||
88 | class ReturnAddressPtr { | - | ||||||
89 | public: | - | ||||||
90 | ReturnAddressPtr() | - | ||||||
91 | : m_value(0) | - | ||||||
92 | { | - | ||||||
93 | } never executed: end of block | 0 | ||||||
94 | - | |||||||
95 | explicit ReturnAddressPtr(void* value) | - | ||||||
96 | : m_value(value) | - | ||||||
97 | { | - | ||||||
98 | (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 256, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
99 | } never executed: end of block | 0 | ||||||
100 | - | |||||||
101 | explicit ReturnAddressPtr(FunctionPtr function) | - | ||||||
102 | : m_value(function.value()) | - | ||||||
103 | { | - | ||||||
104 | (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 262, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
105 | } never executed: end of block | 0 | ||||||
106 | - | |||||||
107 | void* value() const { return never executed: m_value;return m_value; never executed: }return m_value; | 0 | ||||||
108 | - | |||||||
109 | private: | - | ||||||
110 | void* m_value; | - | ||||||
111 | }; | - | ||||||
112 | - | |||||||
113 | - | |||||||
114 | - | |||||||
115 | - | |||||||
116 | class MacroAssemblerCodePtr { | - | ||||||
117 | public: | - | ||||||
118 | MacroAssemblerCodePtr() | - | ||||||
119 | : m_value(0) | - | ||||||
120 | { | - | ||||||
121 | } executed 4614471 times by 153 tests: end of block Executed by:
| 4614471 | ||||||
122 | - | |||||||
123 | explicit MacroAssemblerCodePtr(void* value) | - | ||||||
124 | - | |||||||
125 | - | |||||||
126 | - | |||||||
127 | - | |||||||
128 | : m_value(value) | - | ||||||
129 | - | |||||||
130 | { | - | ||||||
131 | (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 289, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
132 | } executed 1165202 times by 153 tests: end of block Executed by:
| 1165202 | ||||||
133 | - | |||||||
134 | static MacroAssemblerCodePtr createFromExecutableAddress(void* value) | - | ||||||
135 | { | - | ||||||
136 | (!(value) ? (qmlWTFReportAssertionFailure(__FILE__, 294, __PRETTY_FUNCTION__, "value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
137 | MacroAssemblerCodePtr result; | - | ||||||
138 | result.m_value = value; | - | ||||||
139 | return never executed: result;return result; never executed: return result; | 0 | ||||||
140 | } | - | ||||||
141 | explicit MacroAssemblerCodePtr(ReturnAddressPtr ra) | - | ||||||
142 | : m_value(ra.value()) | - | ||||||
143 | { | - | ||||||
144 | (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 310, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
145 | } never executed: end of block | 0 | ||||||
146 | - | |||||||
147 | void* executableAddress() const { return executed 25023 times by 65 tests: m_value;return m_value; Executed by:
executed 25023 times by 65 tests: }return m_value; Executed by:
| 25023 | ||||||
148 | - | |||||||
149 | - | |||||||
150 | - | |||||||
151 | - | |||||||
152 | void* dataLocation() const { (!(m_value) ? (qmlWTFReportAssertionFailure(__FILE__, 318, __PRETTY_FUNCTION__, "m_value"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); return never executed: m_value;return m_value; never executed: }return m_value; | 0 | ||||||
153 | - | |||||||
154 | - | |||||||
155 | bool operator!() const | - | ||||||
156 | { | - | ||||||
157 | return executed 1164588 times by 153 tests: !m_value;return !m_value; Executed by:
executed 1164588 times by 153 tests: return !m_value; Executed by:
| 1164588 | ||||||
158 | } | - | ||||||
159 | - | |||||||
160 | private: | - | ||||||
161 | void* m_value; | - | ||||||
162 | }; | - | ||||||
163 | - | |||||||
164 | - | |||||||
165 | - | |||||||
166 | - | |||||||
167 | - | |||||||
168 | - | |||||||
169 | class MacroAssemblerCodeRef { | - | ||||||
170 | private: | - | ||||||
171 | - | |||||||
172 | - | |||||||
173 | explicit MacroAssemblerCodeRef(MacroAssemblerCodePtr codePtr) | - | ||||||
174 | : m_codePtr(codePtr) | - | ||||||
175 | { | - | ||||||
176 | (!(m_codePtr) ? (qmlWTFReportAssertionFailure(__FILE__, 342, __PRETTY_FUNCTION__, "m_codePtr"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
177 | } never executed: end of block | 0 | ||||||
178 | - | |||||||
179 | public: | - | ||||||
180 | MacroAssemblerCodeRef() | - | ||||||
181 | { | - | ||||||
182 | } | - | ||||||
183 | - | |||||||
184 | MacroAssemblerCodeRef(PassRefPtr<ExecutableMemoryHandle> executableMemory) | - | ||||||
185 | : m_codePtr(executableMemory->start()) | - | ||||||
186 | , m_executableMemory(executableMemory) | - | ||||||
187 | { | - | ||||||
188 | (!(m_executableMemory->isManaged()) ? (qmlWTFReportAssertionFailure(__FILE__, 354, __PRETTY_FUNCTION__, "m_executableMemory->isManaged()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
189 | (!(m_executableMemory->start()) ? (qmlWTFReportAssertionFailure(__FILE__, 355, __PRETTY_FUNCTION__, "m_executableMemory->start()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
190 | (!(m_codePtr) ? (qmlWTFReportAssertionFailure(__FILE__, 356, __PRETTY_FUNCTION__, "m_codePtr"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - | ||||||
191 | } executed 1164589 times by 153 tests: end of block Executed by:
| 1164589 | ||||||
192 | - | |||||||
193 | - | |||||||
194 | - | |||||||
195 | - | |||||||
196 | static MacroAssemblerCodeRef createSelfManagedCodeRef(MacroAssemblerCodePtr codePtr) | - | ||||||
197 | { | - | ||||||
198 | return never executed: MacroAssemblerCodeRef(codePtr);return MacroAssemblerCodeRef(codePtr); never executed: return MacroAssemblerCodeRef(codePtr); | 0 | ||||||
199 | } | - | ||||||
200 | ExecutableMemoryHandle* executableMemory() const | - | ||||||
201 | { | - | ||||||
202 | return never executed: m_executableMemory.get();return m_executableMemory.get(); never executed: return m_executableMemory.get(); | 0 | ||||||
203 | } | - | ||||||
204 | - | |||||||
205 | MacroAssemblerCodePtr code() const | - | ||||||
206 | { | - | ||||||
207 | return executed 24410 times by 65 tests: m_codePtr;return m_codePtr; Executed by:
executed 24410 times by 65 tests: return m_codePtr; Executed by:
| 24410 | ||||||
208 | } | - | ||||||
209 | - | |||||||
210 | size_t size() const | - | ||||||
211 | { | - | ||||||
212 | if (!m_executableMemory
| 0-1173854 | ||||||
213 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||
214 | return executed 1173855 times by 153 tests: m_executableMemory->sizeInBytes();return m_executableMemory->sizeInBytes(); Executed by:
executed 1173855 times by 153 tests: return m_executableMemory->sizeInBytes(); Executed by:
| 1173855 | ||||||
215 | } | - | ||||||
216 | - | |||||||
217 | bool tryToDisassemble(const char* prefix) const | - | ||||||
218 | { | - | ||||||
219 | return never executed: JSC::tryToDisassemble(m_codePtr, size(), prefix, WTF::dataFile());return JSC::tryToDisassemble(m_codePtr, size(), prefix, WTF::dataFile()); never executed: return JSC::tryToDisassemble(m_codePtr, size(), prefix, WTF::dataFile()); | 0 | ||||||
220 | } | - | ||||||
221 | - | |||||||
222 | bool operator!() const { return never executed: !m_codePtr;return !m_codePtr; never executed: }return !m_codePtr; | 0 | ||||||
223 | - | |||||||
224 | private: | - | ||||||
225 | MacroAssemblerCodePtr m_codePtr; | - | ||||||
226 | RefPtr<ExecutableMemoryHandle> m_executableMemory; | - | ||||||
227 | }; | - | ||||||
228 | - | |||||||
229 | } | - | ||||||
Switch to Source code | Preprocessed file |