Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4runtime_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | namespace QV4 { | - | ||||||
7 | enum TypeHint { | - | ||||||
8 | PREFERREDTYPE_HINT, | - | ||||||
9 | NUMBER_HINT, | - | ||||||
10 | STRING_HINT | - | ||||||
11 | }; | - | ||||||
12 | - | |||||||
13 | struct __attribute__((visibility("default"))) RuntimeHelpers { | - | ||||||
14 | static ReturnedValue objectDefaultValue(const Object *object, int typeHint); | - | ||||||
15 | static ReturnedValue toPrimitive(const Value &value, TypeHint typeHint); | - | ||||||
16 | static ReturnedValue ordinaryToPrimitive(ExecutionEngine *engine, const Object *object, String *typeHint); | - | ||||||
17 | - | |||||||
18 | static double stringToNumber(const QString &s); | - | ||||||
19 | static Heap::String *stringFromNumber(ExecutionEngine *engine, double number); | - | ||||||
20 | static double toNumber(const Value &value); | - | ||||||
21 | static void numberToString(QString *result, double num, int radix = 10); | - | ||||||
22 | - | |||||||
23 | static Heap::String *convertToString(ExecutionEngine *engine, Value value, TypeHint = STRING_HINT); | - | ||||||
24 | static Heap::Object *convertToObject(ExecutionEngine *engine, const Value &value); | - | ||||||
25 | - | |||||||
26 | static Bool equalHelper(const Value &x, const Value &y); | - | ||||||
27 | static Bool strictEqual(const Value &x, const Value &y); | - | ||||||
28 | - | |||||||
29 | static ReturnedValue addHelper(ExecutionEngine *engine, const Value &left, const Value &right); | - | ||||||
30 | }; | - | ||||||
31 | - | |||||||
32 | - | |||||||
33 | - | |||||||
34 | - | |||||||
35 | inline ReturnedValue RuntimeHelpers::toPrimitive(const Value &value, TypeHint typeHint) | - | ||||||
36 | { | - | ||||||
37 | if (!value.isObject()
| 4344-115460802 | ||||||
38 | return executed 115604110 times by 37 tests: value.asReturnedValue();return value.asReturnedValue(); Executed by:
executed 115604110 times by 37 tests: return value.asReturnedValue(); Executed by:
| 115604110 | ||||||
39 | return executed 4346 times by 5 tests: RuntimeHelpers::objectDefaultValue(&reinterpret_cast<const Object &>(value), typeHint);return RuntimeHelpers::objectDefaultValue(&reinterpret_cast<const Object &>(value), typeHint); Executed by:
executed 4346 times by 5 tests: return RuntimeHelpers::objectDefaultValue(&reinterpret_cast<const Object &>(value), typeHint); Executed by:
| 4346 | ||||||
40 | } | - | ||||||
41 | - | |||||||
42 | - | |||||||
43 | inline double RuntimeHelpers::toNumber(const Value &value) | - | ||||||
44 | { | - | ||||||
45 | return executed 76255 times by 14 tests: value.toNumber();return value.toNumber(); Executed by:
executed 76255 times by 14 tests: return value.toNumber(); Executed by:
| 76255 | ||||||
46 | } | - | ||||||
47 | } | - | ||||||
48 | - | |||||||
49 | - | |||||||
Switch to Source code | Preprocessed file |