Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/3rdparty/masm/stubs/WTFStubs.cpp |
Source code | Switch to Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | /**************************************************************************** | - | ||||||
2 | ** | - | ||||||
3 | ** Copyright (C) 2016 The Qt Company Ltd. | - | ||||||
4 | ** Contact: https://www.qt.io/licensing/ | - | ||||||
5 | ** | - | ||||||
6 | ** This file is part of the QtQml module of the Qt Toolkit. | - | ||||||
7 | ** | - | ||||||
8 | ** $QT_BEGIN_LICENSE:LGPL$ | - | ||||||
9 | ** Commercial License Usage | - | ||||||
10 | ** Licensees holding valid commercial Qt licenses may use this file in | - | ||||||
11 | ** accordance with the commercial license agreement provided with the | - | ||||||
12 | ** Software or, alternatively, in accordance with the terms contained in | - | ||||||
13 | ** a written agreement between you and The Qt Company. For licensing terms | - | ||||||
14 | ** and conditions see https://www.qt.io/terms-conditions. For further | - | ||||||
15 | ** information use the contact form at https://www.qt.io/contact-us. | - | ||||||
16 | ** | - | ||||||
17 | ** GNU Lesser General Public License Usage | - | ||||||
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - | ||||||
19 | ** General Public License version 3 as published by the Free Software | - | ||||||
20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | - | ||||||
21 | ** packaging of this file. Please review the following information to | - | ||||||
22 | ** ensure the GNU Lesser General Public License version 3 requirements | - | ||||||
23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | - | ||||||
24 | ** | - | ||||||
25 | ** GNU General Public License Usage | - | ||||||
26 | ** Alternatively, this file may be used under the terms of the GNU | - | ||||||
27 | ** General Public License version 2.0 or (at your option) the GNU General | - | ||||||
28 | ** Public license version 3 or any later version approved by the KDE Free | - | ||||||
29 | ** Qt Foundation. The licenses are as published by the Free Software | - | ||||||
30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | - | ||||||
31 | ** included in the packaging of this file. Please review the following | - | ||||||
32 | ** information to ensure the GNU General Public License requirements will | - | ||||||
33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | - | ||||||
34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | - | ||||||
35 | ** | - | ||||||
36 | ** $QT_END_LICENSE$ | - | ||||||
37 | ** | - | ||||||
38 | ****************************************************************************/ | - | ||||||
39 | #include <config.h> | - | ||||||
40 | #include <stdlib.h> | - | ||||||
41 | #include <stdio.h> | - | ||||||
42 | #include <stdarg.h> | - | ||||||
43 | #include <qdebug.h> | - | ||||||
44 | #include <qbytearray.h> // qvsnprintf | - | ||||||
45 | #include <FilePrintStream.h> | - | ||||||
46 | - | |||||||
47 | namespace WTF { | - | ||||||
48 | - | |||||||
49 | void* fastMalloc(size_t size) | - | ||||||
50 | { | - | ||||||
51 | return malloc(size); never executed: return malloc(size); | 0 | ||||||
52 | } | - | ||||||
53 | - | |||||||
54 | void* fastRealloc(void* ptr, size_t size) | - | ||||||
55 | { | - | ||||||
56 | return realloc(ptr, size); never executed: return realloc(ptr, size); | 0 | ||||||
57 | } | - | ||||||
58 | - | |||||||
59 | void fastFree(void* ptr) | - | ||||||
60 | { | - | ||||||
61 | free(ptr); | - | ||||||
62 | } never executed: end of block | 0 | ||||||
63 | - | |||||||
64 | uint32_t cryptographicallyRandomNumber() | - | ||||||
65 | { | - | ||||||
66 | return 0; executed 1161586 times by 153 tests: return 0; Executed by:
| 1161586 | ||||||
67 | } | - | ||||||
68 | - | |||||||
69 | static FilePrintStream* s_dataFile; | - | ||||||
70 | - | |||||||
71 | void setDataFile(FilePrintStream *ps) | - | ||||||
72 | { | - | ||||||
73 | delete s_dataFile; | - | ||||||
74 | s_dataFile = ps; | - | ||||||
75 | } never executed: end of block | 0 | ||||||
76 | - | |||||||
77 | void setDataFile(FILE* f) | - | ||||||
78 | { | - | ||||||
79 | delete s_dataFile; | - | ||||||
80 | s_dataFile = new FilePrintStream(f, FilePrintStream::Borrow); | - | ||||||
81 | } never executed: end of block | 0 | ||||||
82 | - | |||||||
83 | FilePrintStream& dataFile() | - | ||||||
84 | { | - | ||||||
85 | if (!s_dataFile)
| 0 | ||||||
86 | s_dataFile = new FilePrintStream(stderr, FilePrintStream::Borrow); never executed: s_dataFile = new FilePrintStream( stderr , FilePrintStream::Borrow); | 0 | ||||||
87 | return *s_dataFile; never executed: return *s_dataFile; | 0 | ||||||
88 | } | - | ||||||
89 | - | |||||||
90 | void dataLogFV(const char* format, va_list args) | - | ||||||
91 | { | - | ||||||
92 | char buffer[1024]; | - | ||||||
93 | qvsnprintf(buffer, sizeof(buffer), format, args); | - | ||||||
94 | qDebug("%s", buffer); | - | ||||||
95 | } never executed: end of block | 0 | ||||||
96 | - | |||||||
97 | void dataLogF(const char* format, ...) | - | ||||||
98 | { | - | ||||||
99 | char buffer[1024]; | - | ||||||
100 | va_list args; | - | ||||||
101 | va_start(args, format); | - | ||||||
102 | qvsnprintf(buffer, sizeof(buffer), format, args); | - | ||||||
103 | va_end(args); | - | ||||||
104 | qDebug("%s", buffer); | - | ||||||
105 | } never executed: end of block | 0 | ||||||
106 | - | |||||||
107 | void dataLogFString(const char* str) | - | ||||||
108 | { | - | ||||||
109 | qDebug("%s", str); | - | ||||||
110 | } never executed: end of block | 0 | ||||||
111 | - | |||||||
112 | } | - | ||||||
113 | - | |||||||
114 | extern "C" { | - | ||||||
115 | // When adding a new stub here do not forget to add | - | ||||||
116 | // DEFINES += StubFunctionName=qmlStubFunctionName | - | ||||||
117 | // for example: | - | ||||||
118 | // DEFINES += WTFReportAssertionFailureWithMessage=qmlWTFReportAssertionFailureWithMessage | - | ||||||
119 | // to prevent "duplicate symbol" error during static library linking. See bugs QTBUG-35041 and QTBUG-63050 | - | ||||||
120 | - | |||||||
121 | void WTFReportAssertionFailure(const char* file, int line, const char* function, const char*assertion) | - | ||||||
122 | { | - | ||||||
123 | fprintf(stderr, "WTF failing assertion in %s, line %d, function %s: %s\n", file, line, function, assertion); | - | ||||||
124 | } never executed: end of block | 0 | ||||||
125 | - | |||||||
126 | void WTFReportAssertionFailureWithMessage(const char* file, int line, const char* function, const char* assertion, const char* format, ...) | - | ||||||
127 | { | - | ||||||
128 | // TODO: show the message, or remove this function completely. (The latter would probably be best.) | - | ||||||
129 | Q_UNUSED(format); | - | ||||||
130 | fprintf(stderr, "WTF failing assertion in %s, line %d, function %s: %s\n", file, line, function, assertion); | - | ||||||
131 | } never executed: end of block | 0 | ||||||
132 | - | |||||||
133 | void WTFReportBacktrace() | - | ||||||
134 | { | - | ||||||
135 | } | - | ||||||
136 | - | |||||||
137 | void WTFInvokeCrashHook() | - | ||||||
138 | { | - | ||||||
139 | } | - | ||||||
140 | - | |||||||
141 | } | - | ||||||
142 | - | |||||||
143 | - | |||||||
144 | #if ENABLE(ASSEMBLER) && CPU(X86) && !OS(MAC_OS_X) | - | ||||||
145 | #include <MacroAssemblerX86Common.h> | - | ||||||
146 | - | |||||||
147 | JSC::MacroAssemblerX86Common::SSE2CheckState JSC::MacroAssemblerX86Common::s_sse2CheckState = JSC::MacroAssemblerX86Common::NotCheckedSSE2; | - | ||||||
148 | #endif | - | ||||||
149 | - | |||||||
Source code | Switch to Preprocessed file |