OpenCoverage

YarrJIT.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/3rdparty/masm/yarr/YarrJIT.h
Switch to Source codePreprocessed file
LineSourceCount
1namespace JSC {-
2-
3class JSGlobalData;-
4class ExecutablePool;-
5-
6namespace Yarr {-
7-
8class 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-
21public:-
22 YarrCodeBlock()-
23 : m_needFallBack(false)-
24 {-
25 }
executed 1148940 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1148940
26-
27 ~YarrCodeBlock()-
28 {-
29 }-
30-
31 void setFallBack(bool fallback) { m_needFallBack = fallback; }
executed 1151494 times by 153 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1151494
32 bool isFallBack() { return
executed 1162883 times by 153 tests: return m_needFallBack;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
m_needFallBack;
executed 1162883 times by 153 tests: return m_needFallBack;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}
1162883
33-
34 bool has8BitCode() { return
never executed: return m_ref8.size();
m_ref8.size();
never executed: return m_ref8.size();
}
0
35 bool has16BitCode() { return
executed 1173862 times by 153 tests: return m_ref16.size();
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
m_ref16.size();
executed 1173862 times by 153 tests: return m_ref16.size();
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}
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 block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1151341
38-
39 bool has8BitCodeMatchOnly() { return
never executed: return m_matchOnly8.size();
m_matchOnly8.size();
never executed: return m_matchOnly8.size();
}
0
40 bool has16BitCodeMatchOnly() { return
never executed: return m_matchOnly16.size();
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: return MatchResult(reinterpret_cast<YarrJITCode8>(m_ref8.code().executableAddress())(input, start, length, output));
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: return MatchResult(reinterpret_cast<YarrJITCode16>(m_ref16.code().executableAddress())(input, start, length, output));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
MatchResult(reinterpret_cast<YarrJITCode16>(m_ref16.code().executableAddress())(input, start, length, output));
executed 11221 times by 3 tests: return MatchResult(reinterpret_cast<YarrJITCode16>(m_ref16.code().executableAddress())(input, start, length, output));
Executed by:
  • tst_ecmascripttests
  • tst_qjsengine
  • tst_qqmlxmlhttprequest
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: return MatchResult(reinterpret_cast<YarrJITCodeMatchOnly8>(m_matchOnly8.code().executableAddress())(input, start, length));
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: return MatchResult(reinterpret_cast<YarrJITCodeMatchOnly16>(m_matchOnly16.code().executableAddress())(input, start, length));
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-
81private:-
82 MacroAssemblerCodeRef m_ref8;-
83 MacroAssemblerCodeRef m_ref16;-
84 MacroAssemblerCodeRef m_matchOnly8;-
85 MacroAssemblerCodeRef m_matchOnly16;-
86 bool m_needFallBack;-
87};-
88-
89enum YarrJITCompileMode {-
90 MatchOnly,-
91 IncludeSubpatterns-
92};-
93void jitCompile(YarrPattern&, YarrCharSize, JSGlobalData*, YarrCodeBlock& jitObject, YarrJITCompileMode = IncludeSubpatterns);-
94-
95} }-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0