OpenCoverage

qv4runtime_p.h #2

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4runtime_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6namespace QV4 {-
7enum TypeHint {-
8 PREFERREDTYPE_HINT,-
9 NUMBER_HINT,-
10 STRING_HINT-
11};-
12-
13struct __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-
35inline ReturnedValue RuntimeHelpers::toPrimitive(const Value &value, TypeHint typeHint)-
36{-
37 if (!value.isObject()
!value.isObject()Description
TRUEevaluated 115460802 times by 37 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
FALSEevaluated 4344 times by 5 tests
Evaluated by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickdraghandler
  • tst_qquickimage
)
4344-115460802
38 return
executed 115604110 times by 37 tests: return value.asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
value.asReturnedValue();
executed 115604110 times by 37 tests: return value.asReturnedValue();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_qjsengine
  • tst_qmlcachegen
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmlproperty
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickaccessible
  • tst_qquickanimationcontroller
  • tst_qquickbehaviors
  • tst_qquickdraghandler
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklayouts
  • ...
115604110
39 return
executed 4346 times by 5 tests: return RuntimeHelpers::objectDefaultValue(&reinterpret_cast<const Object &>(value), typeHint);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickdraghandler
  • tst_qquickimage
RuntimeHelpers::objectDefaultValue(&reinterpret_cast<const Object &>(value), typeHint);
executed 4346 times by 5 tests: return RuntimeHelpers::objectDefaultValue(&reinterpret_cast<const Object &>(value), typeHint);
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlecmascript
  • tst_qquickdraghandler
  • tst_qquickimage
4346
40}-
41-
42-
43inline double RuntimeHelpers::toNumber(const Value &value)-
44{-
45 return
executed 76255 times by 14 tests: return value.toNumber();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_scenegraph
value.toNumber();
executed 76255 times by 14 tests: return value.toNumber();
Executed by:
  • tst_ecmascripttests
  • tst_examples
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsvalue
  • tst_qqmlecmascript
  • tst_qqmllocale
  • tst_qqmlqt
  • tst_qqmlvaluetypes
  • tst_qqmlxmlhttprequest
  • tst_qquickgridview
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_scenegraph
76255
46}-
47}-
48-
49-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0