| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/3rdparty/masm/yarr/YarrJIT.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | namespace JSC { | - |
| 2 | - | |
| 3 | class JSGlobalData; | - |
| 4 | class ExecutablePool; | - |
| 5 | - | |
| 6 | namespace Yarr { | - |
| 7 | - | |
| 8 | class YarrCodeBlock { | - |
| 9 | - | |
| 10 | typedef MatchResult (*YarrJITCode8)(const LChar* input, unsigned start, unsigned length, int* output) ; | - |
| 11 | typedef MatchResult (*YarrJITCode16)(const UChar* input, unsigned start, unsigned length, int* output) ; | - |
| 12 | typedef MatchResult (*YarrJITCodeMatchOnly8)(const LChar* input, unsigned start, unsigned length) ; | - |
| 13 | typedef MatchResult (*YarrJITCodeMatchOnly16)(const UChar* input, unsigned start, unsigned length) ; | - |
| 14 | - | |
| 15 | - | |
| 16 | - | |
| 17 | - | |
| 18 | - | |
| 19 | - | |
| 20 | - | |
| 21 | public: | - |
| 22 | YarrCodeBlock() | - |
| 23 | : m_needFallBack(false) | - |
| 24 | { | - |
| 25 | } executed 1148940 times by 153 tests: end of blockExecuted by:
| 1148940 |
| 26 | - | |
| 27 | ~YarrCodeBlock() | - |
| 28 | { | - |
| 29 | } | - |
| 30 | - | |
| 31 | void setFallBack(bool fallback) { m_needFallBack = fallback; } executed 1151494 times by 153 tests: end of blockExecuted by:
| 1151494 |
| 32 | bool isFallBack() { return executed 1162883 times by 153 tests: m_needFallBack;return m_needFallBack;Executed by:
executed 1162883 times by 153 tests: }return m_needFallBack;Executed by:
| 1162883 |
| 33 | - | |
| 34 | bool has8BitCode() { return never executed: m_ref8.size();return m_ref8.size();never executed: }return m_ref8.size(); | 0 |
| 35 | bool has16BitCode() { return executed 1173862 times by 153 tests: m_ref16.size();return m_ref16.size();Executed by:
executed 1173862 times by 153 tests: }return m_ref16.size();Executed by:
| 1173862 |
| 36 | void set8BitCode(MacroAssemblerCodeRef ref) { m_ref8 = ref; } never executed: end of block | 0 |
| 37 | void set16BitCode(MacroAssemblerCodeRef ref) { m_ref16 = ref; } executed 1151341 times by 153 tests: end of blockExecuted by:
| 1151341 |
| 38 | - | |
| 39 | bool has8BitCodeMatchOnly() { return never executed: m_matchOnly8.size();return m_matchOnly8.size();never executed: }return m_matchOnly8.size(); | 0 |
| 40 | bool has16BitCodeMatchOnly() { return never executed: m_matchOnly16.size();return m_matchOnly16.size();never executed: }return m_matchOnly16.size(); | 0 |
| 41 | void set8BitCodeMatchOnly(MacroAssemblerCodeRef matchOnly) { m_matchOnly8 = matchOnly; } never executed: end of block | 0 |
| 42 | void set16BitCodeMatchOnly(MacroAssemblerCodeRef matchOnly) { m_matchOnly16 = matchOnly; } never executed: end of block | 0 |
| 43 | - | |
| 44 | MatchResult execute(const LChar* input, unsigned start, unsigned length, int* output) | - |
| 45 | { | - |
| 46 | (!(has8BitCode()) ? (qmlWTFReportAssertionFailure(__FILE__, 88, __PRETTY_FUNCTION__, "has8BitCode()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - |
| 47 | return never executed: MatchResult(reinterpret_cast<YarrJITCode8>(m_ref8.code().executableAddress())(input, start, length, output));return MatchResult(reinterpret_cast<YarrJITCode8>(m_ref8.code().executableAddress())(input, start, length, output));never executed: return MatchResult(reinterpret_cast<YarrJITCode8>(m_ref8.code().executableAddress())(input, start, length, output)); | 0 |
| 48 | } | - |
| 49 | - | |
| 50 | MatchResult execute(const UChar* input, unsigned start, unsigned length, int* output) | - |
| 51 | { | - |
| 52 | (!(has16BitCode()) ? (qmlWTFReportAssertionFailure(__FILE__, 94, __PRETTY_FUNCTION__, "has16BitCode()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - |
| 53 | return executed 11221 times by 3 tests: MatchResult(reinterpret_cast<YarrJITCode16>(m_ref16.code().executableAddress())(input, start, length, output));return MatchResult(reinterpret_cast<YarrJITCode16>(m_ref16.code().executableAddress())(input, start, length, output));Executed by:
executed 11221 times by 3 tests: return MatchResult(reinterpret_cast<YarrJITCode16>(m_ref16.code().executableAddress())(input, start, length, output));Executed by:
| 11221 |
| 54 | } | - |
| 55 | - | |
| 56 | MatchResult execute(const LChar* input, unsigned start, unsigned length) | - |
| 57 | { | - |
| 58 | (!(has8BitCodeMatchOnly()) ? (qmlWTFReportAssertionFailure(__FILE__, 100, __PRETTY_FUNCTION__, "has8BitCodeMatchOnly()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - |
| 59 | return never executed: MatchResult(reinterpret_cast<YarrJITCodeMatchOnly8>(m_matchOnly8.code().executableAddress())(input, start, length));return MatchResult(reinterpret_cast<YarrJITCodeMatchOnly8>(m_matchOnly8.code().executableAddress())(input, start, length));never executed: return MatchResult(reinterpret_cast<YarrJITCodeMatchOnly8>(m_matchOnly8.code().executableAddress())(input, start, length)); | 0 |
| 60 | } | - |
| 61 | - | |
| 62 | MatchResult execute(const UChar* input, unsigned start, unsigned length) | - |
| 63 | { | - |
| 64 | (!(has16BitCodeMatchOnly()) ? (qmlWTFReportAssertionFailure(__FILE__, 106, __PRETTY_FUNCTION__, "has16BitCodeMatchOnly()"), (qmlWTFReportBacktrace(), qmlWTFInvokeCrashHook(), (*(int *)(uintptr_t)0xbbadbeef = 0), __builtin_trap())) : (void)0); | - |
| 65 | return never executed: MatchResult(reinterpret_cast<YarrJITCodeMatchOnly16>(m_matchOnly16.code().executableAddress())(input, start, length));return MatchResult(reinterpret_cast<YarrJITCodeMatchOnly16>(m_matchOnly16.code().executableAddress())(input, start, length));never executed: return MatchResult(reinterpret_cast<YarrJITCodeMatchOnly16>(m_matchOnly16.code().executableAddress())(input, start, length)); | 0 |
| 66 | } | - |
| 67 | - | |
| 68 | - | |
| 69 | - | |
| 70 | - | |
| 71 | - | |
| 72 | void clear() | - |
| 73 | { | - |
| 74 | m_ref8 = MacroAssemblerCodeRef(); | - |
| 75 | m_ref16 = MacroAssemblerCodeRef(); | - |
| 76 | m_matchOnly8 = MacroAssemblerCodeRef(); | - |
| 77 | m_matchOnly16 = MacroAssemblerCodeRef(); | - |
| 78 | m_needFallBack = false; | - |
| 79 | } never executed: end of block | 0 |
| 80 | - | |
| 81 | private: | - |
| 82 | MacroAssemblerCodeRef m_ref8; | - |
| 83 | MacroAssemblerCodeRef m_ref16; | - |
| 84 | MacroAssemblerCodeRef m_matchOnly8; | - |
| 85 | MacroAssemblerCodeRef m_matchOnly16; | - |
| 86 | bool m_needFallBack; | - |
| 87 | }; | - |
| 88 | - | |
| 89 | enum YarrJITCompileMode { | - |
| 90 | MatchOnly, | - |
| 91 | IncludeSubpatterns | - |
| 92 | }; | - |
| 93 | void jitCompile(YarrPattern&, YarrCharSize, JSGlobalData*, YarrCodeBlock& jitObject, YarrJITCompileMode = IncludeSubpatterns); | - |
| 94 | - | |
| 95 | } } | - |
| Switch to Source code | Preprocessed file |