Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4runtime.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | - | |||||||||||||
6 | - | |||||||||||||
7 | - | |||||||||||||
8 | - | |||||||||||||
9 | - | |||||||||||||
10 | namespace QV4 { | - | ||||||||||||
11 | uint RuntimeHelpers::equalHelper(const Value &x, const Value &y) | - | ||||||||||||
12 | { | - | ||||||||||||
13 | ((x.type() != y.type() || (x.isManaged() && (x.isString() != y.isString()))) ? static_cast<void>(0) : qt_assert("x.type() != y.type() || (x.isManaged() && (x.isString() != y.isString()))", __FILE__, 899)); | - | ||||||||||||
14 | - | |||||||||||||
15 | if (x.isNumber()
| 0 | ||||||||||||
16 | return never executed: x.asDouble() == y.asDouble();return x.asDouble() == y.asDouble(); never executed: return x.asDouble() == y.asDouble(); | 0 | ||||||||||||
17 | if (x.isNull()
| 0 | ||||||||||||
18 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||
19 | } else if (x.isUndefined()
| 0 | ||||||||||||
20 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||
21 | } else if (x.isNumber()
| 0 | ||||||||||||
22 | double dy = RuntimeHelpers::toNumber(y); | - | ||||||||||||
23 | return never executed: x.asDouble() == dy;return x.asDouble() == dy; never executed: return x.asDouble() == dy; | 0 | ||||||||||||
24 | } else if (x.isString()
| 0 | ||||||||||||
25 | double dx = RuntimeHelpers::toNumber(x); | - | ||||||||||||
26 | return never executed: dx == y.asDouble();return dx == y.asDouble(); never executed: return dx == y.asDouble(); | 0 | ||||||||||||
27 | } else if (x.isBoolean()
| 0 | ||||||||||||
28 | return never executed: Runtime::method_compareEqual(Primitive::fromDouble((double) x.booleanValue()), y);return Runtime::method_compareEqual(Primitive::fromDouble((double) x.booleanValue()), y); never executed: return Runtime::method_compareEqual(Primitive::fromDouble((double) x.booleanValue()), y); | 0 | ||||||||||||
29 | } else if (y.isBoolean()
| 0 | ||||||||||||
30 | return never executed: Runtime::method_compareEqual(x, Primitive::fromDouble((double) y.booleanValue()));return Runtime::method_compareEqual(x, Primitive::fromDouble((double) y.booleanValue())); never executed: return Runtime::method_compareEqual(x, Primitive::fromDouble((double) y.booleanValue())); | 0 | ||||||||||||
31 | } else { | - | ||||||||||||
32 | - | |||||||||||||
33 | QMessageLogger(__FILE__, 919, __PRETTY_FUNCTION__).warning("Unimplemented code."); | - | ||||||||||||
34 | } never executed: end of block | 0 | ||||||||||||
35 | - | |||||||||||||
36 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||
37 | } | - | ||||||||||||
38 | - | |||||||||||||
39 | Bool RuntimeHelpers::strictEqual(const Value &x, const Value &y) | - | ||||||||||||
40 | { | - | ||||||||||||
41 | ; | - | ||||||||||||
42 | - | |||||||||||||
43 | if (x.rawValue() == y.rawValue()
| 16337-31668862 | ||||||||||||
44 | - | |||||||||||||
45 | return executed 16337 times by 10 tests: !x.isNaN();return !x.isNaN(); Executed by:
executed 16337 times by 10 tests: return !x.isNaN(); Executed by:
| 16337 | ||||||||||||
46 | - | |||||||||||||
47 | if (x.isNumber()
| 13114268-18551307 | ||||||||||||
48 | return executed 18551304 times by 15 tests: y.isNumber() && x.asDouble() == y.asDouble();return y.isNumber() && x.asDouble() == y.asDouble(); Executed by:
executed 18551304 times by 15 tests: return y.isNumber() && x.asDouble() == y.asDouble(); Executed by:
| 18551304 | ||||||||||||
49 | if (x.isManaged()
| 297603-12838325 | ||||||||||||
50 | return executed 12839433 times by 15 tests: y.isManaged() && x.cast<Managed>()->isEqualTo(y.cast<Managed>());return y.isManaged() && x.cast<Managed>()->isEqualTo(y.cast<Managed>()); Executed by:
executed 12839433 times by 15 tests: return y.isManaged() && x.cast<Managed>()->isEqualTo(y.cast<Managed>()); Executed by:
| 12839433 | ||||||||||||
51 | return executed 297615 times by 9 tests: false;return false; Executed by:
executed 297615 times by 9 tests: return false; Executed by:
| 297615 | ||||||||||||
52 | } | - | ||||||||||||
53 | - | |||||||||||||
54 | QV4::Bool Runtime::method_compareGreaterThan(const Value &l, const Value &r) | - | ||||||||||||
55 | { | - | ||||||||||||
56 | ; | - | ||||||||||||
57 | if (l.isInteger()
| 39-3684 | ||||||||||||
58 | return executed 38 times by 1 test: l.integerValue() > r.integerValue();return l.integerValue() > r.integerValue(); Executed by:
executed 38 times by 1 test: return l.integerValue() > r.integerValue(); Executed by:
| 38 | ||||||||||||
59 | if (l.isNumber()
| 87-2730 | ||||||||||||
60 | return executed 2642 times by 9 tests: l.asDouble() > r.asDouble();return l.asDouble() > r.asDouble(); Executed by:
executed 2642 times by 9 tests: return l.asDouble() > r.asDouble(); Executed by:
| 2642 | ||||||||||||
61 | String *sl = l.stringValue(); | - | ||||||||||||
62 | String *sr = r.stringValue(); | - | ||||||||||||
63 | if (sl
| 64-703 | ||||||||||||
64 | - | |||||||||||||
65 | QMessageLogger(__FILE__, 964, __PRETTY_FUNCTION__).warning("Unimplemented code."); | - | ||||||||||||
66 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||
67 | - | |||||||||||||
68 | - | |||||||||||||
69 | - | |||||||||||||
70 | } | - | ||||||||||||
71 | - | |||||||||||||
72 | Object *ro = r.objectValue(); | - | ||||||||||||
73 | Object *lo = l.objectValue(); | - | ||||||||||||
74 | if (ro
| 76-323 | ||||||||||||
75 | - | |||||||||||||
76 | QMessageLogger(__FILE__, 975, __PRETTY_FUNCTION__).warning("Unimplemented code."); | - | ||||||||||||
77 | - | |||||||||||||
78 | - | |||||||||||||
79 | - | |||||||||||||
80 | - | |||||||||||||
81 | - | |||||||||||||
82 | - | |||||||||||||
83 | - | |||||||||||||
84 | } never executed: end of block | 0 | ||||||||||||
85 | - | |||||||||||||
86 | double dl = RuntimeHelpers::toNumber(l); | - | ||||||||||||
87 | double dr = RuntimeHelpers::toNumber(r); | - | ||||||||||||
88 | return executed 248 times by 1 test: dl > dr;return dl > dr; Executed by:
executed 248 times by 1 test: return dl > dr; Executed by:
| 248 | ||||||||||||
89 | } | - | ||||||||||||
90 | - | |||||||||||||
91 | QV4::Bool Runtime::method_compareLessThan(const Value &l, const Value &r) | - | ||||||||||||
92 | { | - | ||||||||||||
93 | ; | - | ||||||||||||
94 | if (l.isInteger()
| 24-3229 | ||||||||||||
95 | return executed 24 times by 1 test: l.integerValue() < r.integerValue();return l.integerValue() < r.integerValue(); Executed by:
executed 24 times by 1 test: return l.integerValue() < r.integerValue(); Executed by:
| 24 | ||||||||||||
96 | if (l.isNumber()
| 88-3139 | ||||||||||||
97 | return executed 320 times by 6 tests: l.asDouble() < r.asDouble();return l.asDouble() < r.asDouble(); Executed by:
executed 320 times by 6 tests: return l.asDouble() < r.asDouble(); Executed by:
| 320 | ||||||||||||
98 | String *sl = l.stringValue(); | - | ||||||||||||
99 | String *sr = r.stringValue(); | - | ||||||||||||
100 | if (sl
| 216-2834 | ||||||||||||
101 | - | |||||||||||||
102 | QMessageLogger(__FILE__, 1001, __PRETTY_FUNCTION__).warning("Unimplemented code."); | - | ||||||||||||
103 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||
104 | - | |||||||||||||
105 | - | |||||||||||||
106 | - | |||||||||||||
107 | } | - | ||||||||||||
108 | - | |||||||||||||
109 | Object *ro = r.objectValue(); | - | ||||||||||||
110 | Object *lo = l.objectValue(); | - | ||||||||||||
111 | if (ro
| 80-472 | ||||||||||||
112 | - | |||||||||||||
113 | QMessageLogger(__FILE__, 1012, __PRETTY_FUNCTION__).warning("Unimplemented code."); | - | ||||||||||||
114 | - | |||||||||||||
115 | - | |||||||||||||
116 | - | |||||||||||||
117 | - | |||||||||||||
118 | - | |||||||||||||
119 | - | |||||||||||||
120 | - | |||||||||||||
121 | } never executed: end of block | 0 | ||||||||||||
122 | - | |||||||||||||
123 | double dl = RuntimeHelpers::toNumber(l); | - | ||||||||||||
124 | double dr = RuntimeHelpers::toNumber(r); | - | ||||||||||||
125 | return executed 392 times by 2 tests: dl < dr;return dl < dr; Executed by:
executed 392 times by 2 tests: return dl < dr; Executed by:
| 392 | ||||||||||||
126 | } | - | ||||||||||||
127 | - | |||||||||||||
128 | QV4::Bool Runtime::method_compareGreaterEqual(const Value &l, const Value &r) | - | ||||||||||||
129 | { | - | ||||||||||||
130 | ; | - | ||||||||||||
131 | if (l.isInteger()
| 24-891 | ||||||||||||
132 | return executed 24 times by 1 test: l.integerValue() >= r.integerValue();return l.integerValue() >= r.integerValue(); Executed by:
executed 24 times by 1 test: return l.integerValue() >= r.integerValue(); Executed by:
| 24 | ||||||||||||
133 | if (l.isNumber()
| 88-534 | ||||||||||||
134 | return executed 338 times by 4 tests: l.asDouble() >= r.asDouble();return l.asDouble() >= r.asDouble(); Executed by:
executed 338 times by 4 tests: return l.asDouble() >= r.asDouble(); Executed by:
| 338 | ||||||||||||
135 | String *sl = l.stringValue(); | - | ||||||||||||
136 | String *sr = r.stringValue(); | - | ||||||||||||
137 | if (sl
| 64-392 | ||||||||||||
138 | - | |||||||||||||
139 | QMessageLogger(__FILE__, 1038, __PRETTY_FUNCTION__).warning("Unimplemented code."); | - | ||||||||||||
140 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||
141 | - | |||||||||||||
142 | - | |||||||||||||
143 | - | |||||||||||||
144 | } | - | ||||||||||||
145 | - | |||||||||||||
146 | Object *ro = r.objectValue(); | - | ||||||||||||
147 | Object *lo = l.objectValue(); | - | ||||||||||||
148 | if (ro
| 75-324 | ||||||||||||
149 | - | |||||||||||||
150 | QMessageLogger(__FILE__, 1049, __PRETTY_FUNCTION__).warning("Unimplemented code."); | - | ||||||||||||
151 | - | |||||||||||||
152 | - | |||||||||||||
153 | - | |||||||||||||
154 | - | |||||||||||||
155 | - | |||||||||||||
156 | - | |||||||||||||
157 | - | |||||||||||||
158 | } never executed: end of block | 0 | ||||||||||||
159 | - | |||||||||||||
160 | double dl = RuntimeHelpers::toNumber(l); | - | ||||||||||||
161 | double dr = RuntimeHelpers::toNumber(r); | - | ||||||||||||
162 | return executed 247 times by 1 test: dl >= dr;return dl >= dr; Executed by:
executed 247 times by 1 test: return dl >= dr; Executed by:
| 247 | ||||||||||||
163 | } | - | ||||||||||||
164 | - | |||||||||||||
165 | QV4::Bool Runtime::method_compareLessEqual(const Value &l, const Value &r) | - | ||||||||||||
166 | { | - | ||||||||||||
167 | ; | - | ||||||||||||
168 | if (l.isInteger()
| 44-7457 | ||||||||||||
169 | return executed 44 times by 1 test: l.integerValue() <= r.integerValue();return l.integerValue() <= r.integerValue(); Executed by:
executed 44 times by 1 test: return l.integerValue() <= r.integerValue(); Executed by:
| 44 | ||||||||||||
170 | if (l.isNumber()
| 88-7234 | ||||||||||||
171 | return executed 202 times by 6 tests: l.asDouble() <= r.asDouble();return l.asDouble() <= r.asDouble(); Executed by:
executed 202 times by 6 tests: return l.asDouble() <= r.asDouble(); Executed by:
| 202 | ||||||||||||
172 | String *sl = l.stringValue(); | - | ||||||||||||
173 | String *sr = r.stringValue(); | - | ||||||||||||
174 | if (sl
| 64-6913 | ||||||||||||
175 | - | |||||||||||||
176 | QMessageLogger(__FILE__, 1075, __PRETTY_FUNCTION__).warning("Unimplemented code."); | - | ||||||||||||
177 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||
178 | - | |||||||||||||
179 | - | |||||||||||||
180 | - | |||||||||||||
181 | } | - | ||||||||||||
182 | - | |||||||||||||
183 | Object *ro = r.objectValue(); | - | ||||||||||||
184 | Object *lo = l.objectValue(); | - | ||||||||||||
185 | if (ro
| 76-324 | ||||||||||||
186 | - | |||||||||||||
187 | QMessageLogger(__FILE__, 1086, __PRETTY_FUNCTION__).warning("Unimplemented code."); | - | ||||||||||||
188 | - | |||||||||||||
189 | - | |||||||||||||
190 | - | |||||||||||||
191 | - | |||||||||||||
192 | - | |||||||||||||
193 | - | |||||||||||||
194 | - | |||||||||||||
195 | } never executed: end of block | 0 | ||||||||||||
196 | - | |||||||||||||
197 | double dl = RuntimeHelpers::toNumber(l); | - | ||||||||||||
198 | double dr = RuntimeHelpers::toNumber(r); | - | ||||||||||||
199 | return executed 245 times by 1 test: dl <= dr;return dl <= dr; Executed by:
executed 245 times by 1 test: return dl <= dr; Executed by:
| 245 | ||||||||||||
200 | } | - | ||||||||||||
201 | ReturnedValue Runtime::method_greaterThan(const Value &left, const Value &right) | - | ||||||||||||
202 | { | - | ||||||||||||
203 | ; | - | ||||||||||||
204 | - | |||||||||||||
205 | bool r = method_compareGreaterThan(left, right); | - | ||||||||||||
206 | return never executed: Encode(r);return Encode(r); never executed: return Encode(r); | 0 | ||||||||||||
207 | } | - | ||||||||||||
208 | - | |||||||||||||
209 | ReturnedValue Runtime::method_lessThan(const Value &left, const Value &right) | - | ||||||||||||
210 | { | - | ||||||||||||
211 | ; | - | ||||||||||||
212 | - | |||||||||||||
213 | bool r = method_compareLessThan(left, right); | - | ||||||||||||
214 | return never executed: Encode(r);return Encode(r); never executed: return Encode(r); | 0 | ||||||||||||
215 | } | - | ||||||||||||
216 | - | |||||||||||||
217 | ReturnedValue Runtime::method_greaterEqual(const Value &left, const Value &right) | - | ||||||||||||
218 | { | - | ||||||||||||
219 | ; | - | ||||||||||||
220 | - | |||||||||||||
221 | bool r = method_compareGreaterEqual(left, right); | - | ||||||||||||
222 | return never executed: Encode(r);return Encode(r); never executed: return Encode(r); | 0 | ||||||||||||
223 | } | - | ||||||||||||
224 | - | |||||||||||||
225 | ReturnedValue Runtime::method_lessEqual(const Value &left, const Value &right) | - | ||||||||||||
226 | { | - | ||||||||||||
227 | ; | - | ||||||||||||
228 | - | |||||||||||||
229 | bool r = method_compareLessEqual(left, right); | - | ||||||||||||
230 | return never executed: Encode(r);return Encode(r); never executed: return Encode(r); | 0 | ||||||||||||
231 | } | - | ||||||||||||
232 | - | |||||||||||||
233 | struct LazyScope | - | ||||||||||||
234 | { | - | ||||||||||||
235 | ExecutionEngine *engine = nullptr; | - | ||||||||||||
236 | Value *stackMark = nullptr; | - | ||||||||||||
237 | ~LazyScope() { | - | ||||||||||||
238 | if (engine
| 663-192641 | ||||||||||||
239 | engine->jsStackTop = stackMark; executed 663 times by 5 tests: engine->jsStackTop = stackMark; Executed by:
| 663 | ||||||||||||
240 | } executed 193304 times by 33 tests: end of block Executed by:
| 193304 | ||||||||||||
241 | template <typename T> | - | ||||||||||||
242 | void set(Value **scopedValue, T value, ExecutionEngine *e) { | - | ||||||||||||
243 | if (!engine
| 0-662 | ||||||||||||
244 | engine = e; | - | ||||||||||||
245 | stackMark = engine->jsStackTop; | - | ||||||||||||
246 | } executed 662 times by 5 tests: end of block Executed by:
| 662 | ||||||||||||
247 | if (!*scopedValue
| 0-661 | ||||||||||||
248 | * executed 662 times by 5 tests: scopedValue = e->jsAlloca(1);*scopedValue = e->jsAlloca(1); Executed by:
executed 662 times by 5 tests: *scopedValue = e->jsAlloca(1); Executed by:
| 662 | ||||||||||||
249 | **scopedValue = value; | - | ||||||||||||
250 | } executed 661 times by 5 tests: end of block Executed by:
| 661 | ||||||||||||
251 | }; | - | ||||||||||||
252 | - | |||||||||||||
253 | Bool Runtime::method_compareEqual(const Value &left, const Value &right) | - | ||||||||||||
254 | { | - | ||||||||||||
255 | ; | - | ||||||||||||
256 | - | |||||||||||||
257 | Value lhs = left; | - | ||||||||||||
258 | Value rhs = right; | - | ||||||||||||
259 | - | |||||||||||||
260 | - | |||||||||||||
261 | - | |||||||||||||
262 | - | |||||||||||||
263 | - | |||||||||||||
264 | - | |||||||||||||
265 | - | |||||||||||||
266 | redo: code before this statement executed 193302 times by 33 tests: redo: Executed by:
| 193302 | ||||||||||||
267 | if (lhs.asReturnedValue() == rhs.asReturnedValue()
| 2620-191347 | ||||||||||||
268 | return executed 2620 times by 17 tests: !lhs.isNaN();return !lhs.isNaN(); Executed by:
executed 2620 times by 17 tests: return !lhs.isNaN(); Executed by:
| 2620 | ||||||||||||
269 | - | |||||||||||||
270 | int lt = lhs.quickType(); | - | ||||||||||||
271 | int rt = rhs.quickType(); | - | ||||||||||||
272 | if (rt < lt
| 1040-190308 | ||||||||||||
273 | qSwap(lhs, rhs); | - | ||||||||||||
274 | qSwap(lt, rt); | - | ||||||||||||
275 | } executed 1040 times by 10 tests: end of block Executed by:
| 1040 | ||||||||||||
276 | - | |||||||||||||
277 | switch (lt) { | - | ||||||||||||
278 | case executed 188032 times by 29 tests: QV4::Value::QT_ManagedOrUndefined:case QV4::Value::QT_ManagedOrUndefined: Executed by:
executed 188032 times by 29 tests: case QV4::Value::QT_ManagedOrUndefined: Executed by:
| 188032 | ||||||||||||
279 | if (lhs.isUndefined()
| 164-187867 | ||||||||||||
280 | return executed 164 times by 4 tests: rhs.isNullOrUndefined();return rhs.isNullOrUndefined(); Executed by:
executed 164 times by 4 tests: return rhs.isNullOrUndefined(); Executed by:
| 164 | ||||||||||||
281 | (void)0; | - | ||||||||||||
282 | case never executed: case QV4::Value::QT_ManagedOrUndefined1: code before this statement executed 187867 times by 29 tests: case QV4::Value::QT_ManagedOrUndefined1: Executed by:
never executed: QV4::Value::QT_ManagedOrUndefined1:case QV4::Value::QT_ManagedOrUndefined1: code before this statement executed 187867 times by 29 tests: case QV4::Value::QT_ManagedOrUndefined1: Executed by:
never executed: case QV4::Value::QT_ManagedOrUndefined1: | 0-187867 | ||||||||||||
283 | case never executed: QV4::Value::QT_ManagedOrUndefined2:case QV4::Value::QT_ManagedOrUndefined2: never executed: case QV4::Value::QT_ManagedOrUndefined2: | 0 | ||||||||||||
284 | case never executed: QV4::Value::QT_ManagedOrUndefined3:case QV4::Value::QT_ManagedOrUndefined3: never executed: case QV4::Value::QT_ManagedOrUndefined3: | 0 | ||||||||||||
285 | - | |||||||||||||
286 | switch (rt) { | - | ||||||||||||
287 | case executed 187127 times by 29 tests: QV4::Value::QT_ManagedOrUndefined:case QV4::Value::QT_ManagedOrUndefined: Executed by:
executed 187127 times by 29 tests: case QV4::Value::QT_ManagedOrUndefined: Executed by:
| 187127 | ||||||||||||
288 | if (rhs.isUndefined()
| 70-187057 | ||||||||||||
289 | return executed 70 times by 7 tests: false;return false; Executed by:
executed 70 times by 7 tests: return false; Executed by:
| 70 | ||||||||||||
290 | (void)0; | - | ||||||||||||
291 | case never executed: case QV4::Value::QT_ManagedOrUndefined1: code before this statement executed 187058 times by 28 tests: case QV4::Value::QT_ManagedOrUndefined1: Executed by:
never executed: QV4::Value::QT_ManagedOrUndefined1:case QV4::Value::QT_ManagedOrUndefined1: code before this statement executed 187058 times by 28 tests: case QV4::Value::QT_ManagedOrUndefined1: Executed by:
never executed: case QV4::Value::QT_ManagedOrUndefined1: | 0-187058 | ||||||||||||
292 | case never executed: QV4::Value::QT_ManagedOrUndefined2:case QV4::Value::QT_ManagedOrUndefined2: never executed: case QV4::Value::QT_ManagedOrUndefined2: | 0 | ||||||||||||
293 | case never executed: QV4::Value::QT_ManagedOrUndefined3:case QV4::Value::QT_ManagedOrUndefined3: never executed: {case QV4::Value::QT_ManagedOrUndefined3: | 0 | ||||||||||||
294 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||
295 | } | - | ||||||||||||
296 | case never executed: QV4::Value::QT_Empty:case QV4::Value::QT_Empty: never executed: case QV4::Value::QT_Empty: | 0 | ||||||||||||
297 | do { ((false) ? static_cast<void>(0) : qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached", __FILE__, 1923)); __builtin_unreachable(); } while (false); | - | ||||||||||||
298 | case executed 40 times by 5 tests: case QV4::Value::QT_Null: Executed by:
code before this statement never executed: case QV4::Value::QT_Null: executed 40 times by 5 tests: QV4::Value::QT_Null:case QV4::Value::QT_Null: Executed by:
code before this statement never executed: case QV4::Value::QT_Null: executed 40 times by 5 tests: case QV4::Value::QT_Null: Executed by:
| 0-40 | ||||||||||||
299 | return executed 40 times by 5 tests: false;return false; Executed by:
executed 40 times by 5 tests: return false; Executed by:
| 40 | ||||||||||||
300 | case executed 188 times by 2 tests: QV4::Value::QT_Bool:case QV4::Value::QT_Bool: Executed by:
executed 188 times by 2 tests: case QV4::Value::QT_Bool: Executed by:
| 188 | ||||||||||||
301 | case executed 279 times by 4 tests: QV4::Value::QT_Int:case QV4::Value::QT_Int: Executed by:
executed 279 times by 4 tests: case QV4::Value::QT_Int: Executed by:
| 279 | ||||||||||||
302 | rhs = Primitive::fromDouble(rhs.int_32()); | - | ||||||||||||
303 | - | |||||||||||||
304 | default executed 701 times by 5 tests: :default: Executed by:
executed 701 times by 5 tests: default: Executed by:
code before this statement executed 467 times by 4 tests: default: Executed by:
| 467-701 | ||||||||||||
305 | QMessageLogger(__FILE__, 1939, __PRETTY_FUNCTION__).warning("Unimplemented code."); | - | ||||||||||||
306 | - | |||||||||||||
307 | } never executed: end of block | 0 | ||||||||||||
308 | goto executed 662 times by 5 tests: redo;goto redo; Executed by:
executed 662 times by 5 tests: goto redo; Executed by:
| 662 | ||||||||||||
309 | case never executed: QV4::Value::QT_Empty:case QV4::Value::QT_Empty: never executed: case QV4::Value::QT_Empty: | 0 | ||||||||||||
310 | do { ((false) ? static_cast<void>(0) : qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached", __FILE__, 1944)); __builtin_unreachable(); } while (false); | - | ||||||||||||
311 | case executed 44 times by 3 tests: case QV4::Value::QT_Null: Executed by:
code before this statement never executed: case QV4::Value::QT_Null: executed 44 times by 3 tests: QV4::Value::QT_Null:case QV4::Value::QT_Null: Executed by:
code before this statement never executed: case QV4::Value::QT_Null: executed 44 times by 3 tests: case QV4::Value::QT_Null: Executed by:
| 0-44 | ||||||||||||
312 | return executed 44 times by 3 tests: rhs.isNull();return rhs.isNull(); Executed by:
executed 44 times by 3 tests: return rhs.isNull(); Executed by:
| 44 | ||||||||||||
313 | case executed 2094 times by 10 tests: QV4::Value::QT_Bool:case QV4::Value::QT_Bool: Executed by:
executed 2094 times by 10 tests: case QV4::Value::QT_Bool: Executed by:
| 2094 | ||||||||||||
314 | case executed 1090 times by 7 tests: QV4::Value::QT_Int:case QV4::Value::QT_Int: Executed by:
executed 1090 times by 7 tests: case QV4::Value::QT_Int: Executed by:
| 1090 | ||||||||||||
315 | switch (rt) { | - | ||||||||||||
316 | case never executed: QV4::Value::QT_ManagedOrUndefined:case QV4::Value::QT_ManagedOrUndefined: never executed: case QV4::Value::QT_ManagedOrUndefined: | 0 | ||||||||||||
317 | case never executed: QV4::Value::QT_ManagedOrUndefined1:case QV4::Value::QT_ManagedOrUndefined1: never executed: case QV4::Value::QT_ManagedOrUndefined1: | 0 | ||||||||||||
318 | case never executed: QV4::Value::QT_ManagedOrUndefined2:case QV4::Value::QT_ManagedOrUndefined2: never executed: case QV4::Value::QT_ManagedOrUndefined2: | 0 | ||||||||||||
319 | case never executed: QV4::Value::QT_ManagedOrUndefined3:case QV4::Value::QT_ManagedOrUndefined3: never executed: case QV4::Value::QT_ManagedOrUndefined3: | 0 | ||||||||||||
320 | case never executed: QV4::Value::QT_Empty:case QV4::Value::QT_Empty: never executed: case QV4::Value::QT_Empty: | 0 | ||||||||||||
321 | case never executed: QV4::Value::QT_Null:case QV4::Value::QT_Null: never executed: case QV4::Value::QT_Null: | 0 | ||||||||||||
322 | do { ((false) ? static_cast<void>(0) : qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached", __FILE__, 1956)); __builtin_unreachable(); } while (false); | - | ||||||||||||
323 | case executed 1898 times by 10 tests: case QV4::Value::QT_Bool: Executed by:
code before this statement never executed: case QV4::Value::QT_Bool: executed 1898 times by 10 tests: QV4::Value::QT_Bool:case QV4::Value::QT_Bool: Executed by:
code before this statement never executed: case QV4::Value::QT_Bool: executed 1898 times by 10 tests: case QV4::Value::QT_Bool: Executed by:
| 0-1898 | ||||||||||||
324 | case executed 114 times by 2 tests: QV4::Value::QT_Int:case QV4::Value::QT_Int: Executed by:
executed 114 times by 2 tests: case QV4::Value::QT_Int: Executed by:
| 114 | ||||||||||||
325 | return executed 2011 times by 10 tests: lhs.int_32() == rhs.int_32();return lhs.int_32() == rhs.int_32(); Executed by:
executed 2011 times by 10 tests: return lhs.int_32() == rhs.int_32(); Executed by:
| 2011 | ||||||||||||
326 | default executed 1173 times by 7 tests: :default: Executed by:
executed 1173 times by 7 tests: default: Executed by:
| 1173 | ||||||||||||
327 | return executed 1173 times by 7 tests: lhs.int_32() == rhs.doubleValue();return lhs.int_32() == rhs.doubleValue(); Executed by:
executed 1173 times by 7 tests: return lhs.int_32() == rhs.doubleValue(); Executed by:
| 1173 | ||||||||||||
328 | } | - | ||||||||||||
329 | default executed 86 times by 5 tests: :default: Executed by:
executed 86 times by 5 tests: default: Executed by:
| 86 | ||||||||||||
330 | ((rhs.isDouble()) ? static_cast<void>(0) : qt_assert("rhs.isDouble()", __FILE__, 1964)); | - | ||||||||||||
331 | return executed 86 times by 5 tests: lhs.doubleValue() == rhs.doubleValue();return lhs.doubleValue() == rhs.doubleValue(); Executed by:
executed 86 times by 5 tests: return lhs.doubleValue() == rhs.doubleValue(); Executed by:
| 86 | ||||||||||||
332 | } | - | ||||||||||||
333 | } | - | ||||||||||||
334 | - | |||||||||||||
335 | ReturnedValue Runtime::method_equal(const Value &left, const Value &right) | - | ||||||||||||
336 | { | - | ||||||||||||
337 | ; | - | ||||||||||||
338 | - | |||||||||||||
339 | bool r = method_compareEqual(left, right); | - | ||||||||||||
340 | return executed 12 times by 2 tests: Encode(r);return Encode(r); Executed by:
executed 12 times by 2 tests: return Encode(r); Executed by:
| 12 | ||||||||||||
341 | } | - | ||||||||||||
342 | - | |||||||||||||
343 | ReturnedValue Runtime::method_notEqual(const Value &left, const Value &right) | - | ||||||||||||
344 | { | - | ||||||||||||
345 | ; | - | ||||||||||||
346 | - | |||||||||||||
347 | bool r = !method_compareEqual(left, right); | - | ||||||||||||
348 | return never executed: Encode(r);return Encode(r); never executed: return Encode(r); | 0 | ||||||||||||
349 | } | - | ||||||||||||
350 | - | |||||||||||||
351 | ReturnedValue Runtime::method_strictEqual(const Value &left, const Value &right) | - | ||||||||||||
352 | { | - | ||||||||||||
353 | ; | - | ||||||||||||
354 | - | |||||||||||||
355 | bool r = RuntimeHelpers::strictEqual(left, right); | - | ||||||||||||
356 | return executed 132 times by 1 test: Encode(r);return Encode(r); Executed by:
executed 132 times by 1 test: return Encode(r); Executed by:
| 132 | ||||||||||||
357 | } | - | ||||||||||||
358 | - | |||||||||||||
359 | ReturnedValue Runtime::method_strictNotEqual(const Value &left, const Value &right) | - | ||||||||||||
360 | { | - | ||||||||||||
361 | ; | - | ||||||||||||
362 | - | |||||||||||||
363 | bool r = ! RuntimeHelpers::strictEqual(left, right); | - | ||||||||||||
364 | return never executed: Encode(r);return Encode(r); never executed: return Encode(r); | 0 | ||||||||||||
365 | } | - | ||||||||||||
366 | - | |||||||||||||
367 | Bool Runtime::method_compareNotEqual(const Value &left, const Value &right) | - | ||||||||||||
368 | { | - | ||||||||||||
369 | ; | - | ||||||||||||
370 | - | |||||||||||||
371 | return executed 1520 times by 4 tests: !Runtime::method_compareEqual(left, right);return !Runtime::method_compareEqual(left, right); Executed by:
executed 1520 times by 4 tests: return !Runtime::method_compareEqual(left, right); Executed by:
| 1520 | ||||||||||||
372 | } | - | ||||||||||||
373 | - | |||||||||||||
374 | Bool Runtime::method_compareStrictEqual(const Value &left, const Value &right) | - | ||||||||||||
375 | { | - | ||||||||||||
376 | ; | - | ||||||||||||
377 | - | |||||||||||||
378 | return never executed: RuntimeHelpers::strictEqual(left, right);return RuntimeHelpers::strictEqual(left, right); never executed: return RuntimeHelpers::strictEqual(left, right); | 0 | ||||||||||||
379 | } | - | ||||||||||||
380 | - | |||||||||||||
381 | Bool Runtime::method_compareStrictNotEqual(const Value &left, const Value &right) | - | ||||||||||||
382 | { | - | ||||||||||||
383 | ; | - | ||||||||||||
384 | - | |||||||||||||
385 | return never executed: ! RuntimeHelpers::strictEqual(left, right);return ! RuntimeHelpers::strictEqual(left, right); never executed: return ! RuntimeHelpers::strictEqual(left, right); | 0 | ||||||||||||
386 | } | - | ||||||||||||
387 | - | |||||||||||||
388 | } | - | ||||||||||||
389 | - | |||||||||||||
390 | - | |||||||||||||
Switch to Source code | Preprocessed file |