/src/spicy/build/ci/fuzz/PNG_File_PNG.cc
Line | Count | Source |
1 | | // Begin of PNG (from "/src/spicy/spicy-png/analyzer/analyzer.spicy") |
2 | | // Compiled by HILTI version 1.15.0-dev.186 |
3 | | |
4 | | #include <hilti/rt/compiler-setup.h> |
5 | | |
6 | | #include <spicy/rt/libspicy.h> |
7 | | #include <hilti/rt/libhilti.h> |
8 | | |
9 | | extern uint64_t hlt_internal_PNG_File_hlto_scope; |
10 | | |
11 | | namespace hlt_internal_PNG_File::type_info { namespace { |
12 | | extern const ::hilti::rt::TypeInfo _ti_PNG__PLTE_ENTRY_namex2aPNG__PLTE_ENTRYx2b; |
13 | | extern const ::hilti::rt::TypeInfo _ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b; |
14 | | extern const ::hilti::rt::TypeInfo _ti_hilti__RecoverableFailure_namex2ahilti__RecoverableFailurex2b; |
15 | | extern const ::hilti::rt::TypeInfo _ti_PNG__PLTE_namex2aPNG__PLTEx2b; |
16 | | extern const ::hilti::rt::TypeInfo _ti_vector_value_ref_PLTE_ENTRY___vectorx2anamex2aPNG__PLTE_ENTRYx2bx2b; |
17 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_PLTE_ENTRY__value_refx2anamex2aPNG__PLTE_ENTRYx2bx2b; |
18 | | extern const ::hilti::rt::TypeInfo _ti_PNG__bKGD_namex2aPNG__bKGDx2b; |
19 | | extern const ::hilti::rt::TypeInfo _ti_PNG__cHRM_namex2aPNG__cHRMx2b; |
20 | | extern const ::hilti::rt::TypeInfo _ti_PNG__gAMA_namex2aPNG__gAMAx2b; |
21 | | extern const ::hilti::rt::TypeInfo _ti_PNG__iCCP_namex2aPNG__iCCPx2b; |
22 | | extern const ::hilti::rt::TypeInfo _ti_PNG__iTXt_namex2aPNG__iTXtx2b; |
23 | | extern const ::hilti::rt::TypeInfo _ti_PNG__pHYs_namex2aPNG__pHYsx2b; |
24 | | extern const ::hilti::rt::TypeInfo _ti_PNG__sBIT_namex2aPNG__sBITx2b; |
25 | | extern const ::hilti::rt::TypeInfo _ti_PNG__sRGB_namex2aPNG__sRGBx2b; |
26 | | extern const ::hilti::rt::TypeInfo _ti_PNG__tEXt_namex2aPNG__tEXtx2b; |
27 | | extern const ::hilti::rt::TypeInfo _ti_PNG__tIME_namex2aPNG__tIMEx2b; |
28 | | extern const ::hilti::rt::TypeInfo _ti_PNG__tRNS_namex2aPNG__tRNSx2b; |
29 | | extern const ::hilti::rt::TypeInfo _ti_vector_uint_8___vectorx2auint8x2b; |
30 | | extern const ::hilti::rt::TypeInfo _ti_PNG__zTXt_namex2aPNG__zTXtx2b; |
31 | | extern const ::hilti::rt::TypeInfo _ti_PNG__IHDR_namex2aPNG__IHDRx2b; |
32 | | extern const ::hilti::rt::TypeInfo _ti_PNG__File_namex2aPNG__Filex2b; |
33 | | extern const ::hilti::rt::TypeInfo _ti_vector_value_ref_Chunk___vectorx2anamex2aPNG__Chunkx2bx2b; |
34 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_Chunk__value_refx2anamex2aPNG__Chunkx2bx2b; |
35 | | extern const ::hilti::rt::TypeInfo _ti_PNG__Chunk_namex2aPNG__Chunkx2b; |
36 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_IHDR__value_refx2anamex2aPNG__IHDRx2bx2b; |
37 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_PLTE__value_refx2anamex2aPNG__PLTEx2bx2b; |
38 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_iCCP__value_refx2anamex2aPNG__iCCPx2bx2b; |
39 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_pHYs__value_refx2anamex2aPNG__pHYsx2bx2b; |
40 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_iTXt__value_refx2anamex2aPNG__iTXtx2bx2b; |
41 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_tEXt__value_refx2anamex2aPNG__tEXtx2bx2b; |
42 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_zTXt__value_refx2anamex2aPNG__zTXtx2bx2b; |
43 | | extern const ::hilti::rt::TypeInfo _ti_vector_uint_16___vectorx2auint16x2b; |
44 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_cHRM__value_refx2anamex2aPNG__cHRMx2bx2b; |
45 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_gAMA__value_refx2anamex2aPNG__gAMAx2bx2b; |
46 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_sRGB__value_refx2anamex2aPNG__sRGBx2bx2b; |
47 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_sBIT__value_refx2anamex2aPNG__sBITx2bx2b; |
48 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_bKGD__value_refx2anamex2aPNG__bKGDx2bx2b; |
49 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_tRNS__value_refx2anamex2aPNG__tRNSx2bx2b; |
50 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_tIME__value_refx2anamex2aPNG__tIMEx2bx2b; |
51 | | extern const ::hilti::rt::TypeInfo _ti_value_ref_PNG__File__value_refx2anamex2aPNG__Filex2bx2b; |
52 | | extern const ::hilti::rt::TypeInfo _ti_strong_ref_const_PNG__File__strong_refx2anamex2aPNG__Filex2bx2b; |
53 | | } } |
54 | | |
55 | | namespace hlt_internal_PNG_File::PNG { |
56 | | struct PLTE_ENTRY; |
57 | | struct PLTE; |
58 | | struct bKGD; |
59 | | struct cHRM; |
60 | | struct gAMA; |
61 | | struct iCCP; |
62 | | struct iTXt; |
63 | | struct pHYs; |
64 | | struct sBIT; |
65 | | struct sRGB; |
66 | | struct tEXt; |
67 | | struct tIME; |
68 | | struct tRNS; |
69 | | struct zTXt; |
70 | | struct IHDR; |
71 | | struct File; |
72 | | struct Chunk; |
73 | | struct PLTE_ENTRY : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<PLTE_ENTRY> { |
74 | 1.73M | auto _self() { return ::hilti::rt::ValueReference<PLTE_ENTRY>::self(this); } |
75 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> red{}; |
76 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> green{}; |
77 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> blue{}; |
78 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
79 | | auto _parse_PNG__PLTE_ENTRY_4_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
80 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
81 | | PLTE_ENTRY(); |
82 | 868k | PLTE_ENTRY(const PLTE_ENTRY&) = default; |
83 | 0 | PLTE_ENTRY(PLTE_ENTRY&&) = default; |
84 | 0 | PLTE_ENTRY& operator=(const PLTE_ENTRY&) = default; |
85 | 868k | PLTE_ENTRY& operator=(PLTE_ENTRY&&) = default; |
86 | | explicit PLTE_ENTRY(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> red, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> green, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> blue); |
87 | | |
88 | 0 | std::string __to_string() const { |
89 | 0 | return "["s + "$red=" + hilti::rt::to_string(red) + ", "s + "$green=" + hilti::rt::to_string(green) + ", "s + "$blue=" + hilti::rt::to_string(blue) + "]"; |
90 | 0 | } |
91 | | }; |
92 | | |
93 | | struct PLTE : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<PLTE> { |
94 | 17.2k | auto _self() { return ::hilti::rt::ValueReference<PLTE>::self(this); } |
95 | | ::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<PLTE_ENTRY>>> entries{}; |
96 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
97 | | auto _parse_entries_3_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error, ::hilti::rt::Vector<::hilti::rt::ValueReference<PLTE_ENTRY>>& _dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
98 | | auto _parse_PNG__PLTE_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
99 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
100 | | ::hilti::rt::integer::safe<uint32_t> _p_length{}; |
101 | | PLTE(); |
102 | 0 | PLTE(const PLTE&) = default; |
103 | 0 | PLTE(PLTE&&) = default; |
104 | 0 | PLTE& operator=(const PLTE&) = default; |
105 | 5.73k | PLTE& operator=(PLTE&&) = default; |
106 | | explicit PLTE(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<PLTE_ENTRY>>>> entries); |
107 | | explicit PLTE(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint32_t>& _p_length); |
108 | | |
109 | 0 | std::string __to_string() const { |
110 | 0 | return "["s + "$entries=" + hilti::rt::to_string(entries) + "]"; |
111 | 0 | } |
112 | | }; |
113 | | |
114 | | struct bKGD : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<bKGD> { |
115 | 12.3k | auto _self() { return ::hilti::rt::ValueReference<bKGD>::self(this); } |
116 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> greyscale{}; |
117 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> red{}; |
118 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> green{}; |
119 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> blue{}; |
120 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> palette_index{}; |
121 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
122 | | auto _parse_switch_10_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
123 | | auto _parse_PNG__bKGD_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
124 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
125 | | ::hilti::rt::integer::safe<uint8_t> _p_colour_type{}; |
126 | | bKGD(); |
127 | 0 | bKGD(const bKGD&) = default; |
128 | 0 | bKGD(bKGD&&) = default; |
129 | 0 | bKGD& operator=(const bKGD&) = default; |
130 | 4.13k | bKGD& operator=(bKGD&&) = default; |
131 | | explicit bKGD(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> greyscale, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> red, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> green, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> blue, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> palette_index); |
132 | | explicit bKGD(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint8_t>& _p_colour_type); |
133 | | |
134 | 0 | std::string __to_string() const { |
135 | 0 | return "["s + "$greyscale=" + hilti::rt::to_string(greyscale) + ", "s + "$red=" + hilti::rt::to_string(red) + ", "s + "$green=" + hilti::rt::to_string(green) + ", "s + "$blue=" + hilti::rt::to_string(blue) + ", "s + "$palette_index=" + hilti::rt::to_string(palette_index) + "]"; |
136 | 0 | } |
137 | | }; |
138 | | |
139 | | struct cHRM : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<cHRM> { |
140 | 5.26k | auto _self() { return ::hilti::rt::ValueReference<cHRM>::self(this); } |
141 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> white_point_x{}; |
142 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> white_point_y{}; |
143 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> red_x{}; |
144 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> red_y{}; |
145 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> green_x{}; |
146 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> green_y{}; |
147 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> blue_x{}; |
148 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> blue_y{}; |
149 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
150 | | auto _parse_PNG__cHRM_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
151 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
152 | | cHRM(); |
153 | 0 | cHRM(const cHRM&) = default; |
154 | 0 | cHRM(cHRM&&) = default; |
155 | 0 | cHRM& operator=(const cHRM&) = default; |
156 | 2.63k | cHRM& operator=(cHRM&&) = default; |
157 | | explicit cHRM(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> white_point_x, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> white_point_y, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> red_x, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> red_y, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> green_x, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> green_y, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> blue_x, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> blue_y); |
158 | | |
159 | 0 | std::string __to_string() const { |
160 | 0 | return "["s + "$white_point_x=" + hilti::rt::to_string(white_point_x) + ", "s + "$white_point_y=" + hilti::rt::to_string(white_point_y) + ", "s + "$red_x=" + hilti::rt::to_string(red_x) + ", "s + "$red_y=" + hilti::rt::to_string(red_y) + ", "s + "$green_x=" + hilti::rt::to_string(green_x) + ", "s + "$green_y=" + hilti::rt::to_string(green_y) + ", "s + "$blue_x=" + hilti::rt::to_string(blue_x) + ", "s + "$blue_y=" + hilti::rt::to_string(blue_y) + "]"; |
161 | 0 | } |
162 | | }; |
163 | | |
164 | | struct gAMA : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<gAMA> { |
165 | 4.59k | auto _self() { return ::hilti::rt::ValueReference<gAMA>::self(this); } |
166 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> gamma{}; |
167 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
168 | | auto _parse_PNG__gAMA_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
169 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
170 | | gAMA(); |
171 | 0 | gAMA(const gAMA&) = default; |
172 | 0 | gAMA(gAMA&&) = default; |
173 | 0 | gAMA& operator=(const gAMA&) = default; |
174 | 2.29k | gAMA& operator=(gAMA&&) = default; |
175 | | explicit gAMA(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> gamma); |
176 | | |
177 | 0 | std::string __to_string() const { |
178 | 0 | return "["s + "$gamma=" + hilti::rt::to_string(gamma) + "]"; |
179 | 0 | } |
180 | | }; |
181 | | |
182 | | struct iCCP : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<iCCP> { |
183 | 6.01k | auto _self() { return ::hilti::rt::ValueReference<iCCP>::self(this); } |
184 | | ::hilti::rt::Optional<::hilti::rt::Bytes> profile_name{}; |
185 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> compression_method{}; |
186 | | ::hilti::rt::Optional<::hilti::rt::Bytes> compressed_profile{}; |
187 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
188 | | auto _parse_PNG__iCCP_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
189 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
190 | | ::hilti::rt::integer::safe<uint32_t> _p_length{}; |
191 | | iCCP(); |
192 | 0 | iCCP(const iCCP&) = default; |
193 | 0 | iCCP(iCCP&&) = default; |
194 | 0 | iCCP& operator=(const iCCP&) = default; |
195 | 3.00k | iCCP& operator=(iCCP&&) = default; |
196 | | explicit iCCP(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> profile_name, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> compression_method, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> compressed_profile); |
197 | | explicit iCCP(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint32_t>& _p_length); |
198 | | |
199 | 0 | std::string __to_string() const { |
200 | 0 | return "["s + "$profile_name=" + hilti::rt::to_string(profile_name) + ", "s + "$compression_method=" + hilti::rt::to_string(compression_method) + ", "s + "$compressed_profile=" + hilti::rt::to_string(compressed_profile) + "]"; |
201 | 0 | } |
202 | | }; |
203 | | |
204 | | struct iTXt : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<iTXt> { |
205 | 20.3k | auto _self() { return ::hilti::rt::ValueReference<iTXt>::self(this); } |
206 | | ::hilti::rt::Optional<::hilti::rt::Bytes> keyword{}; |
207 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> compression_flag{}; |
208 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> compression_method{}; |
209 | | ::hilti::rt::Optional<::hilti::rt::Bytes> language_tag{}; |
210 | | ::hilti::rt::Optional<::hilti::rt::Bytes> translated_keyword{}; |
211 | | ::hilti::rt::Optional<::hilti::rt::Bytes> text{}; |
212 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
213 | | auto _parse_PNG__iTXt_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
214 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
215 | | ::hilti::rt::integer::safe<uint32_t> _p_length{}; |
216 | | iTXt(); |
217 | 0 | iTXt(const iTXt&) = default; |
218 | 0 | iTXt(iTXt&&) = default; |
219 | 0 | iTXt& operator=(const iTXt&) = default; |
220 | 10.1k | iTXt& operator=(iTXt&&) = default; |
221 | | explicit iTXt(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> keyword, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> compression_flag, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> compression_method, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> language_tag, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> translated_keyword, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> text); |
222 | | explicit iTXt(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint32_t>& _p_length); |
223 | | |
224 | 0 | std::string __to_string() const { |
225 | 0 | return "["s + "$keyword=" + hilti::rt::to_string(keyword) + ", "s + "$compression_flag=" + hilti::rt::to_string(compression_flag) + ", "s + "$compression_method=" + hilti::rt::to_string(compression_method) + ", "s + "$language_tag=" + hilti::rt::to_string(language_tag) + ", "s + "$translated_keyword=" + hilti::rt::to_string(translated_keyword) + ", "s + "$text=" + hilti::rt::to_string(text) + "]"; |
226 | 0 | } |
227 | | }; |
228 | | |
229 | | struct pHYs : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<pHYs> { |
230 | 3.31k | auto _self() { return ::hilti::rt::ValueReference<pHYs>::self(this); } |
231 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> ppux{}; |
232 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> ppuy{}; |
233 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> unit_specifier{}; |
234 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
235 | | auto _parse_PNG__pHYs_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
236 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
237 | | pHYs(); |
238 | 0 | pHYs(const pHYs&) = default; |
239 | 0 | pHYs(pHYs&&) = default; |
240 | 0 | pHYs& operator=(const pHYs&) = default; |
241 | 1.65k | pHYs& operator=(pHYs&&) = default; |
242 | | explicit pHYs(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> ppux, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> ppuy, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> unit_specifier); |
243 | | |
244 | 0 | std::string __to_string() const { |
245 | 0 | return "["s + "$ppux=" + hilti::rt::to_string(ppux) + ", "s + "$ppuy=" + hilti::rt::to_string(ppuy) + ", "s + "$unit_specifier=" + hilti::rt::to_string(unit_specifier) + "]"; |
246 | 0 | } |
247 | | }; |
248 | | |
249 | | struct sBIT : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<sBIT> { |
250 | 13.6k | auto _self() { return ::hilti::rt::ValueReference<sBIT>::self(this); } |
251 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> significant_greyscale_bits{}; |
252 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> significant_red_bits{}; |
253 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> significant_green_bits{}; |
254 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> significant_blue_bits{}; |
255 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> significant_alpha_bits{}; |
256 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
257 | | auto _parse_switch_9_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
258 | | auto _parse_PNG__sBIT_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
259 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
260 | | ::hilti::rt::integer::safe<uint8_t> _p_colour_type{}; |
261 | | sBIT(); |
262 | 0 | sBIT(const sBIT&) = default; |
263 | 0 | sBIT(sBIT&&) = default; |
264 | 0 | sBIT& operator=(const sBIT&) = default; |
265 | 4.56k | sBIT& operator=(sBIT&&) = default; |
266 | | explicit sBIT(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> significant_greyscale_bits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> significant_red_bits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> significant_green_bits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> significant_blue_bits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> significant_alpha_bits); |
267 | | explicit sBIT(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint8_t>& _p_colour_type); |
268 | | |
269 | 0 | std::string __to_string() const { |
270 | 0 | return "["s + "$significant_greyscale_bits=" + hilti::rt::to_string(significant_greyscale_bits) + ", "s + "$significant_red_bits=" + hilti::rt::to_string(significant_red_bits) + ", "s + "$significant_green_bits=" + hilti::rt::to_string(significant_green_bits) + ", "s + "$significant_blue_bits=" + hilti::rt::to_string(significant_blue_bits) + ", "s + "$significant_alpha_bits=" + hilti::rt::to_string(significant_alpha_bits) + "]"; |
271 | 0 | } |
272 | | }; |
273 | | |
274 | | struct sRGB : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<sRGB> { |
275 | 2.77k | auto _self() { return ::hilti::rt::ValueReference<sRGB>::self(this); } |
276 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> rendering_intent{}; |
277 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
278 | | auto _parse_PNG__sRGB_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
279 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
280 | | sRGB(); |
281 | 0 | sRGB(const sRGB&) = default; |
282 | 0 | sRGB(sRGB&&) = default; |
283 | 0 | sRGB& operator=(const sRGB&) = default; |
284 | 1.38k | sRGB& operator=(sRGB&&) = default; |
285 | | explicit sRGB(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> rendering_intent); |
286 | | |
287 | 0 | std::string __to_string() const { |
288 | 0 | return "["s + "$rendering_intent=" + hilti::rt::to_string(rendering_intent) + "]"; |
289 | 0 | } |
290 | | }; |
291 | | |
292 | | struct tEXt : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<tEXt> { |
293 | 5.45k | auto _self() { return ::hilti::rt::ValueReference<tEXt>::self(this); } |
294 | | ::hilti::rt::Optional<::hilti::rt::Bytes> keyword{}; |
295 | | ::hilti::rt::Optional<::hilti::rt::Bytes> text_string{}; |
296 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
297 | | auto _parse_PNG__tEXt_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
298 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
299 | | ::hilti::rt::integer::safe<uint32_t> _p_length{}; |
300 | | tEXt(); |
301 | 0 | tEXt(const tEXt&) = default; |
302 | 0 | tEXt(tEXt&&) = default; |
303 | 0 | tEXt& operator=(const tEXt&) = default; |
304 | 2.72k | tEXt& operator=(tEXt&&) = default; |
305 | | explicit tEXt(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> keyword, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> text_string); |
306 | | explicit tEXt(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint32_t>& _p_length); |
307 | | |
308 | 0 | std::string __to_string() const { |
309 | 0 | return "["s + "$keyword=" + hilti::rt::to_string(keyword) + ", "s + "$text_string=" + hilti::rt::to_string(text_string) + "]"; |
310 | 0 | } |
311 | | }; |
312 | | |
313 | | struct tIME : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<tIME> { |
314 | 3.39k | auto _self() { return ::hilti::rt::ValueReference<tIME>::self(this); } |
315 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> year{}; |
316 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> month{}; |
317 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> day{}; |
318 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> hour{}; |
319 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> minute{}; |
320 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> second{}; |
321 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
322 | | auto _parse_PNG__tIME_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
323 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
324 | | tIME(); |
325 | 0 | tIME(const tIME&) = default; |
326 | 0 | tIME(tIME&&) = default; |
327 | 0 | tIME& operator=(const tIME&) = default; |
328 | 1.69k | tIME& operator=(tIME&&) = default; |
329 | | explicit tIME(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> year, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> month, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> day, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> hour, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> minute, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> second); |
330 | | |
331 | 0 | std::string __to_string() const { |
332 | 0 | return "["s + "$year=" + hilti::rt::to_string(year) + ", "s + "$month=" + hilti::rt::to_string(month) + ", "s + "$day=" + hilti::rt::to_string(day) + ", "s + "$hour=" + hilti::rt::to_string(hour) + ", "s + "$minute=" + hilti::rt::to_string(minute) + ", "s + "$second=" + hilti::rt::to_string(second) + "]"; |
333 | 0 | } |
334 | | }; |
335 | | |
336 | | struct tRNS : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<tRNS> { |
337 | 30.7k | auto _self() { return ::hilti::rt::ValueReference<tRNS>::self(this); } |
338 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> grey_sample_value{}; |
339 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> red_sample_value{}; |
340 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> green_sample_value{}; |
341 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>> blue_sample_value{}; |
342 | | ::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::integer::safe<uint8_t>>> alpha{}; |
343 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
344 | | auto _parse_alpha_3_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error, ::hilti::rt::Vector<::hilti::rt::integer::safe<uint8_t>>& _dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
345 | | auto _parse_switch_11_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
346 | | auto _parse_PNG__tRNS_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
347 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
348 | | ::hilti::rt::integer::safe<uint8_t> _p_colour_type{}; |
349 | | ::hilti::rt::integer::safe<uint32_t> _p_length{}; |
350 | | tRNS(); |
351 | 0 | tRNS(const tRNS&) = default; |
352 | 0 | tRNS(tRNS&&) = default; |
353 | 0 | tRNS& operator=(const tRNS&) = default; |
354 | 8.13k | tRNS& operator=(tRNS&&) = default; |
355 | | explicit tRNS(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> grey_sample_value, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> red_sample_value, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> green_sample_value, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> blue_sample_value, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::integer::safe<uint8_t>>>> alpha); |
356 | | explicit tRNS(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint8_t>& _p_colour_type, const ::hilti::rt::integer::safe<uint32_t>& _p_length); |
357 | | |
358 | 0 | std::string __to_string() const { |
359 | 0 | return "["s + "$grey_sample_value=" + hilti::rt::to_string(grey_sample_value) + ", "s + "$red_sample_value=" + hilti::rt::to_string(red_sample_value) + ", "s + "$green_sample_value=" + hilti::rt::to_string(green_sample_value) + ", "s + "$blue_sample_value=" + hilti::rt::to_string(blue_sample_value) + ", "s + "$alpha=" + hilti::rt::to_string(alpha) + "]"; |
360 | 0 | } |
361 | | }; |
362 | | |
363 | | struct zTXt : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<zTXt> { |
364 | 7.10k | auto _self() { return ::hilti::rt::ValueReference<zTXt>::self(this); } |
365 | | ::hilti::rt::Optional<::hilti::rt::Bytes> keyword{}; |
366 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> compression_method{}; |
367 | | ::hilti::rt::Optional<::hilti::rt::Bytes> compressed_text{}; |
368 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
369 | | auto _parse_PNG__zTXt_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
370 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
371 | | ::hilti::rt::integer::safe<uint32_t> _p_length{}; |
372 | | zTXt(); |
373 | 0 | zTXt(const zTXt&) = default; |
374 | 0 | zTXt(zTXt&&) = default; |
375 | 0 | zTXt& operator=(const zTXt&) = default; |
376 | 3.55k | zTXt& operator=(zTXt&&) = default; |
377 | | explicit zTXt(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> keyword, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> compression_method, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> compressed_text); |
378 | | explicit zTXt(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint32_t>& _p_length); |
379 | | |
380 | 0 | std::string __to_string() const { |
381 | 0 | return "["s + "$keyword=" + hilti::rt::to_string(keyword) + ", "s + "$compression_method=" + hilti::rt::to_string(compression_method) + ", "s + "$compressed_text=" + hilti::rt::to_string(compressed_text) + "]"; |
382 | 0 | } |
383 | | }; |
384 | | |
385 | | struct IHDR : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<IHDR> { |
386 | 13.3k | auto _self() { return ::hilti::rt::ValueReference<IHDR>::self(this); } |
387 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> width{}; |
388 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> height{}; |
389 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> bit_depth{}; |
390 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> colour_type{}; |
391 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> compression_method{}; |
392 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> filter_method{}; |
393 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> interlace_method{}; |
394 | | void _on_0x25_done(); |
395 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
396 | | auto _parse_PNG__IHDR_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
397 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
398 | | ::hilti::rt::WeakReference<File> _p_top{}; |
399 | | IHDR(); |
400 | 0 | IHDR(const IHDR&) = default; |
401 | 0 | IHDR(IHDR&&) = default; |
402 | 0 | IHDR& operator=(const IHDR&) = default; |
403 | 4.49k | IHDR& operator=(IHDR&&) = default; |
404 | | explicit IHDR(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> width, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> height, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> bit_depth, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> colour_type, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> compression_method, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> filter_method, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> interlace_method); |
405 | | explicit IHDR(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<File>& _p_top); |
406 | | |
407 | 0 | std::string __to_string() const { |
408 | 0 | return "["s + "$width=" + hilti::rt::to_string(width) + ", "s + "$height=" + hilti::rt::to_string(height) + ", "s + "$bit_depth=" + hilti::rt::to_string(bit_depth) + ", "s + "$colour_type=" + hilti::rt::to_string(colour_type) + ", "s + "$compression_method=" + hilti::rt::to_string(compression_method) + ", "s + "$filter_method=" + hilti::rt::to_string(filter_method) + ", "s + "$interlace_method=" + hilti::rt::to_string(interlace_method) + "]"; |
409 | 0 | } |
410 | | }; |
411 | | |
412 | | struct File : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<File> { |
413 | 10.9k | auto _self() { return ::hilti::rt::ValueReference<File>::self(this); } |
414 | | ::hilti::rt::Optional<::hilti::rt::Bytes> signature{}; |
415 | | ::hilti::rt::integer::safe<uint8_t> colour_type{}; |
416 | | inline static ::spicy::rt::Parser _parser{}; |
417 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::stream::SafeConstIterator& _begin, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
418 | | static auto parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _context) -> ::hilti::rt::stream::View; |
419 | | static auto parse2(::hilti::rt::ValueReference<File>& _unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _context) -> ::hilti::rt::stream::View; |
420 | | static auto parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _context) -> ::hilti::rt::stream::View; |
421 | | auto _parse__anon_2_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::stream::SafeConstIterator& _begin, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error, ::hilti::rt::Vector<::hilti::rt::ValueReference<Chunk>>& _dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
422 | | auto _parse_PNG__File_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::stream::SafeConstIterator& _begin, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
423 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
424 | | File(); |
425 | | File(const File&) = default; |
426 | 7.34k | File(File&&) = default; |
427 | | File& operator=(const File&) = default; |
428 | | File& operator=(File&&) = default; |
429 | | explicit File(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> signature, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> colour_type); |
430 | | |
431 | 0 | std::string __to_string() const { |
432 | 0 | return "["s + "$signature=" + hilti::rt::to_string(signature) + ", "s + "$colour_type=" + hilti::rt::to_string(colour_type) + "]"; |
433 | 0 | } |
434 | | }; |
435 | | |
436 | | struct Chunk : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<Chunk> { |
437 | 830k | auto _self() { return ::hilti::rt::ValueReference<Chunk>::self(this); } |
438 | | ::hilti::rt::integer::safe<uint64_t> max_chunk_size{}; |
439 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>> length{}; |
440 | | ::hilti::rt::Optional<::hilti::rt::Bytes> chunk_type{}; |
441 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<IHDR>> ihdr{}; |
442 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<PLTE>> plte{}; |
443 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<iCCP>> iccp{}; |
444 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<pHYs>> phys{}; |
445 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<iTXt>> itxt{}; |
446 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<tEXt>> text{}; |
447 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<zTXt>> ztzt{}; |
448 | | ::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>> frequency{}; |
449 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<cHRM>> chrm{}; |
450 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<gAMA>> gama{}; |
451 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<sRGB>> srgb{}; |
452 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<sBIT>> sbit{}; |
453 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<bKGD>> bkgd{}; |
454 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<tRNS>> trns{}; |
455 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<tIME>> ttime{}; |
456 | | ::hilti::rt::Optional<::hilti::rt::Bytes> crc{}; |
457 | | auto _parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
458 | | auto _parse_frequency_2_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error, ::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>& _dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
459 | | auto _parse_switch_5_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
460 | | auto _parse_PNG__Chunk_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
461 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error{}; |
462 | | ::hilti::rt::WeakReference<File> _p_top{}; |
463 | | Chunk(); |
464 | | Chunk(const Chunk&) = default; |
465 | 0 | Chunk(Chunk&&) = default; |
466 | | Chunk& operator=(const Chunk&) = default; |
467 | 276k | Chunk& operator=(Chunk&&) = default; |
468 | | explicit Chunk(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> max_chunk_size, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> length, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> chunk_type, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<IHDR>>> ihdr, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<PLTE>>> plte, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<iCCP>>> iccp, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<pHYs>>> phys, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<iTXt>>> itxt, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<tEXt>>> text, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<zTXt>>> ztzt, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>>> frequency, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<cHRM>>> chrm, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<gAMA>>> gama, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<sRGB>>> srgb, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<sBIT>>> sbit, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<bKGD>>> bkgd, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<tRNS>>> trns, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<tIME>>> ttime, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> crc); |
469 | | explicit Chunk(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<File>& _p_top); |
470 | | |
471 | 0 | std::string __to_string() const { |
472 | 0 | return "["s + "$max_chunk_size=" + hilti::rt::to_string(max_chunk_size) + ", "s + "$length=" + hilti::rt::to_string(length) + ", "s + "$chunk_type=" + hilti::rt::to_string(chunk_type) + ", "s + "$ihdr=" + hilti::rt::to_string(ihdr) + ", "s + "$plte=" + hilti::rt::to_string(plte) + ", "s + "$iccp=" + hilti::rt::to_string(iccp) + ", "s + "$phys=" + hilti::rt::to_string(phys) + ", "s + "$itxt=" + hilti::rt::to_string(itxt) + ", "s + "$text=" + hilti::rt::to_string(text) + ", "s + "$ztzt=" + hilti::rt::to_string(ztzt) + ", "s + "$frequency=" + hilti::rt::to_string(frequency) + ", "s + "$chrm=" + hilti::rt::to_string(chrm) + ", "s + "$gama=" + hilti::rt::to_string(gama) + ", "s + "$srgb=" + hilti::rt::to_string(srgb) + ", "s + "$sbit=" + hilti::rt::to_string(sbit) + ", "s + "$bkgd=" + hilti::rt::to_string(bkgd) + ", "s + "$trns=" + hilti::rt::to_string(trns) + ", "s + "$ttime=" + hilti::rt::to_string(ttime) + ", "s + "$crc=" + hilti::rt::to_string(crc) + "]"; |
473 | 0 | } |
474 | | }; |
475 | | |
476 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40Chunk0x25is_filter = ::hilti::rt::Bool(false); |
477 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40Chunk0x25supports_filters = ::hilti::rt::Bool(false); |
478 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40Chunk0x25supports_sinks = ::hilti::rt::Bool(false); |
479 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40Chunk0x25synchronization = ::hilti::rt::Bool(false); |
480 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40Chunk0x25uses_offset = ::hilti::rt::Bool(false); |
481 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40Chunk0x25uses_random_access = ::hilti::rt::Bool(false); |
482 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40Chunk0x25uses_stream = ::hilti::rt::Bool(false); |
483 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40Chunk0x25uses_sync_advance = ::hilti::rt::Bool(false); |
484 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40File0x25is_filter = ::hilti::rt::Bool(false); |
485 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40File0x25supports_filters = ::hilti::rt::Bool(false); |
486 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40File0x25supports_sinks = ::hilti::rt::Bool(false); |
487 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40File0x25synchronization = ::hilti::rt::Bool(false); |
488 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40File0x25uses_offset = ::hilti::rt::Bool(false); |
489 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40File0x25uses_random_access = ::hilti::rt::Bool(false); |
490 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40File0x25uses_stream = ::hilti::rt::Bool(false); |
491 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40File0x25uses_sync_advance = ::hilti::rt::Bool(false); |
492 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40IHDR0x25is_filter = ::hilti::rt::Bool(false); |
493 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40IHDR0x25supports_filters = ::hilti::rt::Bool(false); |
494 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40IHDR0x25supports_sinks = ::hilti::rt::Bool(false); |
495 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40IHDR0x25synchronization = ::hilti::rt::Bool(false); |
496 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40IHDR0x25uses_offset = ::hilti::rt::Bool(false); |
497 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40IHDR0x25uses_random_access = ::hilti::rt::Bool(false); |
498 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40IHDR0x25uses_stream = ::hilti::rt::Bool(false); |
499 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40IHDR0x25uses_sync_advance = ::hilti::rt::Bool(false); |
500 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE0x25is_filter = ::hilti::rt::Bool(false); |
501 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE0x25supports_filters = ::hilti::rt::Bool(false); |
502 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE0x25supports_sinks = ::hilti::rt::Bool(false); |
503 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE0x25synchronization = ::hilti::rt::Bool(false); |
504 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE0x25uses_offset = ::hilti::rt::Bool(false); |
505 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE0x25uses_random_access = ::hilti::rt::Bool(false); |
506 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE0x25uses_stream = ::hilti::rt::Bool(false); |
507 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE0x25uses_sync_advance = ::hilti::rt::Bool(false); |
508 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE_ENTRY0x25is_filter = ::hilti::rt::Bool(false); |
509 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE_ENTRY0x25supports_filters = ::hilti::rt::Bool(false); |
510 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE_ENTRY0x25supports_sinks = ::hilti::rt::Bool(false); |
511 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE_ENTRY0x25synchronization = ::hilti::rt::Bool(false); |
512 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE_ENTRY0x25uses_offset = ::hilti::rt::Bool(false); |
513 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE_ENTRY0x25uses_random_access = ::hilti::rt::Bool(false); |
514 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE_ENTRY0x25uses_stream = ::hilti::rt::Bool(false); |
515 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40PLTE_ENTRY0x25uses_sync_advance = ::hilti::rt::Bool(false); |
516 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40bKGD0x25is_filter = ::hilti::rt::Bool(false); |
517 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40bKGD0x25supports_filters = ::hilti::rt::Bool(false); |
518 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40bKGD0x25supports_sinks = ::hilti::rt::Bool(false); |
519 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40bKGD0x25synchronization = ::hilti::rt::Bool(false); |
520 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40bKGD0x25uses_offset = ::hilti::rt::Bool(false); |
521 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40bKGD0x25uses_random_access = ::hilti::rt::Bool(false); |
522 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40bKGD0x25uses_stream = ::hilti::rt::Bool(false); |
523 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40bKGD0x25uses_sync_advance = ::hilti::rt::Bool(false); |
524 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40cHRM0x25is_filter = ::hilti::rt::Bool(false); |
525 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40cHRM0x25supports_filters = ::hilti::rt::Bool(false); |
526 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40cHRM0x25supports_sinks = ::hilti::rt::Bool(false); |
527 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40cHRM0x25synchronization = ::hilti::rt::Bool(false); |
528 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40cHRM0x25uses_offset = ::hilti::rt::Bool(false); |
529 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40cHRM0x25uses_random_access = ::hilti::rt::Bool(false); |
530 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40cHRM0x25uses_stream = ::hilti::rt::Bool(false); |
531 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40cHRM0x25uses_sync_advance = ::hilti::rt::Bool(false); |
532 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40gAMA0x25is_filter = ::hilti::rt::Bool(false); |
533 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40gAMA0x25supports_filters = ::hilti::rt::Bool(false); |
534 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40gAMA0x25supports_sinks = ::hilti::rt::Bool(false); |
535 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40gAMA0x25synchronization = ::hilti::rt::Bool(false); |
536 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40gAMA0x25uses_offset = ::hilti::rt::Bool(false); |
537 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40gAMA0x25uses_random_access = ::hilti::rt::Bool(false); |
538 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40gAMA0x25uses_stream = ::hilti::rt::Bool(false); |
539 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40gAMA0x25uses_sync_advance = ::hilti::rt::Bool(false); |
540 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iCCP0x25is_filter = ::hilti::rt::Bool(false); |
541 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iCCP0x25supports_filters = ::hilti::rt::Bool(false); |
542 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iCCP0x25supports_sinks = ::hilti::rt::Bool(false); |
543 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iCCP0x25synchronization = ::hilti::rt::Bool(false); |
544 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iCCP0x25uses_offset = ::hilti::rt::Bool(false); |
545 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iCCP0x25uses_random_access = ::hilti::rt::Bool(false); |
546 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iCCP0x25uses_stream = ::hilti::rt::Bool(false); |
547 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iCCP0x25uses_sync_advance = ::hilti::rt::Bool(false); |
548 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iTXt0x25is_filter = ::hilti::rt::Bool(false); |
549 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iTXt0x25supports_filters = ::hilti::rt::Bool(false); |
550 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iTXt0x25supports_sinks = ::hilti::rt::Bool(false); |
551 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iTXt0x25synchronization = ::hilti::rt::Bool(false); |
552 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iTXt0x25uses_offset = ::hilti::rt::Bool(false); |
553 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iTXt0x25uses_random_access = ::hilti::rt::Bool(false); |
554 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iTXt0x25uses_stream = ::hilti::rt::Bool(false); |
555 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40iTXt0x25uses_sync_advance = ::hilti::rt::Bool(false); |
556 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40pHYs0x25is_filter = ::hilti::rt::Bool(false); |
557 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40pHYs0x25supports_filters = ::hilti::rt::Bool(false); |
558 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40pHYs0x25supports_sinks = ::hilti::rt::Bool(false); |
559 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40pHYs0x25synchronization = ::hilti::rt::Bool(false); |
560 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40pHYs0x25uses_offset = ::hilti::rt::Bool(false); |
561 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40pHYs0x25uses_random_access = ::hilti::rt::Bool(false); |
562 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40pHYs0x25uses_stream = ::hilti::rt::Bool(false); |
563 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40pHYs0x25uses_sync_advance = ::hilti::rt::Bool(false); |
564 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sBIT0x25is_filter = ::hilti::rt::Bool(false); |
565 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sBIT0x25supports_filters = ::hilti::rt::Bool(false); |
566 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sBIT0x25supports_sinks = ::hilti::rt::Bool(false); |
567 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sBIT0x25synchronization = ::hilti::rt::Bool(false); |
568 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sBIT0x25uses_offset = ::hilti::rt::Bool(false); |
569 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sBIT0x25uses_random_access = ::hilti::rt::Bool(false); |
570 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sBIT0x25uses_stream = ::hilti::rt::Bool(false); |
571 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sBIT0x25uses_sync_advance = ::hilti::rt::Bool(false); |
572 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sRGB0x25is_filter = ::hilti::rt::Bool(false); |
573 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sRGB0x25supports_filters = ::hilti::rt::Bool(false); |
574 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sRGB0x25supports_sinks = ::hilti::rt::Bool(false); |
575 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sRGB0x25synchronization = ::hilti::rt::Bool(false); |
576 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sRGB0x25uses_offset = ::hilti::rt::Bool(false); |
577 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sRGB0x25uses_random_access = ::hilti::rt::Bool(false); |
578 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sRGB0x25uses_stream = ::hilti::rt::Bool(false); |
579 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40sRGB0x25uses_sync_advance = ::hilti::rt::Bool(false); |
580 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tEXt0x25is_filter = ::hilti::rt::Bool(false); |
581 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tEXt0x25supports_filters = ::hilti::rt::Bool(false); |
582 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tEXt0x25supports_sinks = ::hilti::rt::Bool(false); |
583 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tEXt0x25synchronization = ::hilti::rt::Bool(false); |
584 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tEXt0x25uses_offset = ::hilti::rt::Bool(false); |
585 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tEXt0x25uses_random_access = ::hilti::rt::Bool(false); |
586 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tEXt0x25uses_stream = ::hilti::rt::Bool(false); |
587 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tEXt0x25uses_sync_advance = ::hilti::rt::Bool(false); |
588 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tIME0x25is_filter = ::hilti::rt::Bool(false); |
589 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tIME0x25supports_filters = ::hilti::rt::Bool(false); |
590 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tIME0x25supports_sinks = ::hilti::rt::Bool(false); |
591 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tIME0x25synchronization = ::hilti::rt::Bool(false); |
592 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tIME0x25uses_offset = ::hilti::rt::Bool(false); |
593 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tIME0x25uses_random_access = ::hilti::rt::Bool(false); |
594 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tIME0x25uses_stream = ::hilti::rt::Bool(false); |
595 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tIME0x25uses_sync_advance = ::hilti::rt::Bool(false); |
596 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tRNS0x25is_filter = ::hilti::rt::Bool(false); |
597 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tRNS0x25supports_filters = ::hilti::rt::Bool(false); |
598 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tRNS0x25supports_sinks = ::hilti::rt::Bool(false); |
599 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tRNS0x25synchronization = ::hilti::rt::Bool(false); |
600 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tRNS0x25uses_offset = ::hilti::rt::Bool(false); |
601 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tRNS0x25uses_random_access = ::hilti::rt::Bool(false); |
602 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tRNS0x25uses_stream = ::hilti::rt::Bool(false); |
603 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40tRNS0x25uses_sync_advance = ::hilti::rt::Bool(false); |
604 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40zTXt0x25is_filter = ::hilti::rt::Bool(false); |
605 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40zTXt0x25supports_filters = ::hilti::rt::Bool(false); |
606 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40zTXt0x25supports_sinks = ::hilti::rt::Bool(false); |
607 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40zTXt0x25synchronization = ::hilti::rt::Bool(false); |
608 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40zTXt0x25uses_offset = ::hilti::rt::Bool(false); |
609 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40zTXt0x25uses_random_access = ::hilti::rt::Bool(false); |
610 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40zTXt0x25uses_stream = ::hilti::rt::Bool(false); |
611 | | const ::hilti::rt::Bool _feat0x25PNG0x400x40zTXt0x25uses_sync_advance = ::hilti::rt::Bool(false); |
612 | | } |
613 | | |
614 | | namespace hlt_PNG_File::PNG::File { |
615 | | using Type = hlt_internal_PNG_File::PNG::File; |
616 | | } |
617 | | |
618 | | namespace hlt_internal_PNG_File::PNG { |
619 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::PLTE_ENTRY& x) -> std::ostream&; |
620 | 1.73M | PLTE_ENTRY::PLTE_ENTRY() { |
621 | 1.73M | } |
622 | | |
623 | 0 | PLTE_ENTRY::PLTE_ENTRY(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> red, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> green, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> blue) : PLTE_ENTRY() { |
624 | 0 | if ( red ) this->red = std::move(*red); |
625 | 0 | if ( green ) this->green = std::move(*green); |
626 | 0 | if ( blue ) this->blue = std::move(*blue); |
627 | 0 | } |
628 | | |
629 | | |
630 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::PLTE& x) -> std::ostream&; |
631 | 5.73k | PLTE::PLTE() { |
632 | 5.73k | } |
633 | | |
634 | 5.73k | PLTE::PLTE(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint32_t>& _p_length) : _p_length(_p_length) { |
635 | 5.73k | } |
636 | | |
637 | 0 | PLTE::PLTE(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::PLTE_ENTRY>>>> entries) : PLTE() { |
638 | 0 | if ( entries ) this->entries = std::move(*entries); |
639 | 0 | } |
640 | | |
641 | | |
642 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::bKGD& x) -> std::ostream&; |
643 | 4.13k | bKGD::bKGD() { |
644 | 4.13k | } |
645 | | |
646 | 4.13k | bKGD::bKGD(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint8_t>& _p_colour_type) : _p_colour_type(_p_colour_type) { |
647 | 4.13k | } |
648 | | |
649 | 0 | bKGD::bKGD(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> greyscale, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> red, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> green, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> blue, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> palette_index) : bKGD() { |
650 | 0 | if ( greyscale ) this->greyscale = std::move(*greyscale); |
651 | 0 | if ( red ) this->red = std::move(*red); |
652 | 0 | if ( green ) this->green = std::move(*green); |
653 | 0 | if ( blue ) this->blue = std::move(*blue); |
654 | 0 | if ( palette_index ) this->palette_index = std::move(*palette_index); |
655 | 0 | } |
656 | | |
657 | | |
658 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::cHRM& x) -> std::ostream&; |
659 | 5.26k | cHRM::cHRM() { |
660 | 5.26k | } |
661 | | |
662 | 0 | cHRM::cHRM(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> white_point_x, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> white_point_y, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> red_x, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> red_y, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> green_x, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> green_y, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> blue_x, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> blue_y) : cHRM() { |
663 | 0 | if ( white_point_x ) this->white_point_x = std::move(*white_point_x); |
664 | 0 | if ( white_point_y ) this->white_point_y = std::move(*white_point_y); |
665 | 0 | if ( red_x ) this->red_x = std::move(*red_x); |
666 | 0 | if ( red_y ) this->red_y = std::move(*red_y); |
667 | 0 | if ( green_x ) this->green_x = std::move(*green_x); |
668 | 0 | if ( green_y ) this->green_y = std::move(*green_y); |
669 | 0 | if ( blue_x ) this->blue_x = std::move(*blue_x); |
670 | 0 | if ( blue_y ) this->blue_y = std::move(*blue_y); |
671 | 0 | } |
672 | | |
673 | | |
674 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::gAMA& x) -> std::ostream&; |
675 | 4.59k | gAMA::gAMA() { |
676 | 4.59k | } |
677 | | |
678 | 0 | gAMA::gAMA(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> gamma) : gAMA() { |
679 | 0 | if ( gamma ) this->gamma = std::move(*gamma); |
680 | 0 | } |
681 | | |
682 | | |
683 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::iCCP& x) -> std::ostream&; |
684 | 3.00k | iCCP::iCCP() { |
685 | 3.00k | } |
686 | | |
687 | 3.00k | iCCP::iCCP(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint32_t>& _p_length) : _p_length(_p_length) { |
688 | 3.00k | } |
689 | | |
690 | 0 | iCCP::iCCP(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> profile_name, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> compression_method, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> compressed_profile) : iCCP() { |
691 | 0 | if ( profile_name ) this->profile_name = std::move(*profile_name); |
692 | 0 | if ( compression_method ) this->compression_method = std::move(*compression_method); |
693 | 0 | if ( compressed_profile ) this->compressed_profile = std::move(*compressed_profile); |
694 | 0 | } |
695 | | |
696 | | |
697 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::iTXt& x) -> std::ostream&; |
698 | 10.1k | iTXt::iTXt() { |
699 | 10.1k | } |
700 | | |
701 | 10.1k | iTXt::iTXt(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint32_t>& _p_length) : _p_length(_p_length) { |
702 | 10.1k | } |
703 | | |
704 | 0 | iTXt::iTXt(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> keyword, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> compression_flag, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> compression_method, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> language_tag, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> translated_keyword, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> text) : iTXt() { |
705 | 0 | if ( keyword ) this->keyword = std::move(*keyword); |
706 | 0 | if ( compression_flag ) this->compression_flag = std::move(*compression_flag); |
707 | 0 | if ( compression_method ) this->compression_method = std::move(*compression_method); |
708 | 0 | if ( language_tag ) this->language_tag = std::move(*language_tag); |
709 | 0 | if ( translated_keyword ) this->translated_keyword = std::move(*translated_keyword); |
710 | 0 | if ( text ) this->text = std::move(*text); |
711 | 0 | } |
712 | | |
713 | | |
714 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::pHYs& x) -> std::ostream&; |
715 | 3.31k | pHYs::pHYs() { |
716 | 3.31k | } |
717 | | |
718 | 0 | pHYs::pHYs(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> ppux, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> ppuy, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> unit_specifier) : pHYs() { |
719 | 0 | if ( ppux ) this->ppux = std::move(*ppux); |
720 | 0 | if ( ppuy ) this->ppuy = std::move(*ppuy); |
721 | 0 | if ( unit_specifier ) this->unit_specifier = std::move(*unit_specifier); |
722 | 0 | } |
723 | | |
724 | | |
725 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::sBIT& x) -> std::ostream&; |
726 | 4.56k | sBIT::sBIT() { |
727 | 4.56k | } |
728 | | |
729 | 4.56k | sBIT::sBIT(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint8_t>& _p_colour_type) : _p_colour_type(_p_colour_type) { |
730 | 4.56k | } |
731 | | |
732 | 0 | sBIT::sBIT(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> significant_greyscale_bits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> significant_red_bits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> significant_green_bits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> significant_blue_bits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> significant_alpha_bits) : sBIT() { |
733 | 0 | if ( significant_greyscale_bits ) this->significant_greyscale_bits = std::move(*significant_greyscale_bits); |
734 | 0 | if ( significant_red_bits ) this->significant_red_bits = std::move(*significant_red_bits); |
735 | 0 | if ( significant_green_bits ) this->significant_green_bits = std::move(*significant_green_bits); |
736 | 0 | if ( significant_blue_bits ) this->significant_blue_bits = std::move(*significant_blue_bits); |
737 | 0 | if ( significant_alpha_bits ) this->significant_alpha_bits = std::move(*significant_alpha_bits); |
738 | 0 | } |
739 | | |
740 | | |
741 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::sRGB& x) -> std::ostream&; |
742 | 2.77k | sRGB::sRGB() { |
743 | 2.77k | } |
744 | | |
745 | 0 | sRGB::sRGB(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> rendering_intent) : sRGB() { |
746 | 0 | if ( rendering_intent ) this->rendering_intent = std::move(*rendering_intent); |
747 | 0 | } |
748 | | |
749 | | |
750 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::tEXt& x) -> std::ostream&; |
751 | 2.72k | tEXt::tEXt() { |
752 | 2.72k | } |
753 | | |
754 | 2.72k | tEXt::tEXt(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint32_t>& _p_length) : _p_length(_p_length) { |
755 | 2.72k | } |
756 | | |
757 | 0 | tEXt::tEXt(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> keyword, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> text_string) : tEXt() { |
758 | 0 | if ( keyword ) this->keyword = std::move(*keyword); |
759 | 0 | if ( text_string ) this->text_string = std::move(*text_string); |
760 | 0 | } |
761 | | |
762 | | |
763 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::tIME& x) -> std::ostream&; |
764 | 3.39k | tIME::tIME() { |
765 | 3.39k | } |
766 | | |
767 | 0 | tIME::tIME(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> year, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> month, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> day, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> hour, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> minute, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> second) : tIME() { |
768 | 0 | if ( year ) this->year = std::move(*year); |
769 | 0 | if ( month ) this->month = std::move(*month); |
770 | 0 | if ( day ) this->day = std::move(*day); |
771 | 0 | if ( hour ) this->hour = std::move(*hour); |
772 | 0 | if ( minute ) this->minute = std::move(*minute); |
773 | 0 | if ( second ) this->second = std::move(*second); |
774 | 0 | } |
775 | | |
776 | | |
777 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::tRNS& x) -> std::ostream&; |
778 | 8.13k | tRNS::tRNS() { |
779 | 8.13k | } |
780 | | |
781 | 8.13k | tRNS::tRNS(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint8_t>& _p_colour_type, const ::hilti::rt::integer::safe<uint32_t>& _p_length) : _p_colour_type(_p_colour_type), _p_length(_p_length) { |
782 | 8.13k | } |
783 | | |
784 | 0 | tRNS::tRNS(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> grey_sample_value, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> red_sample_value, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> green_sample_value, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint16_t>>> blue_sample_value, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::integer::safe<uint8_t>>>> alpha) : tRNS() { |
785 | 0 | if ( grey_sample_value ) this->grey_sample_value = std::move(*grey_sample_value); |
786 | 0 | if ( red_sample_value ) this->red_sample_value = std::move(*red_sample_value); |
787 | 0 | if ( green_sample_value ) this->green_sample_value = std::move(*green_sample_value); |
788 | 0 | if ( blue_sample_value ) this->blue_sample_value = std::move(*blue_sample_value); |
789 | 0 | if ( alpha ) this->alpha = std::move(*alpha); |
790 | 0 | } |
791 | | |
792 | | |
793 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::zTXt& x) -> std::ostream&; |
794 | 3.55k | zTXt::zTXt() { |
795 | 3.55k | } |
796 | | |
797 | 3.55k | zTXt::zTXt(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::integer::safe<uint32_t>& _p_length) : _p_length(_p_length) { |
798 | 3.55k | } |
799 | | |
800 | 0 | zTXt::zTXt(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> keyword, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> compression_method, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> compressed_text) : zTXt() { |
801 | 0 | if ( keyword ) this->keyword = std::move(*keyword); |
802 | 0 | if ( compression_method ) this->compression_method = std::move(*compression_method); |
803 | 0 | if ( compressed_text ) this->compressed_text = std::move(*compressed_text); |
804 | 0 | } |
805 | | |
806 | | |
807 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::IHDR& x) -> std::ostream&; |
808 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::File& x) -> std::ostream&; |
809 | | extern void _hook_IHDR__on_0x25_done(::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::IHDR>& _self); |
810 | 4.49k | IHDR::IHDR() { |
811 | 4.49k | } |
812 | | |
813 | 4.49k | IHDR::IHDR(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::File>& _p_top) : _p_top(_p_top) { |
814 | 4.49k | } |
815 | | |
816 | 0 | IHDR::IHDR(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> width, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> height, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> bit_depth, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> colour_type, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> compression_method, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> filter_method, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>>> interlace_method) : IHDR() { |
817 | 0 | if ( width ) this->width = std::move(*width); |
818 | 0 | if ( height ) this->height = std::move(*height); |
819 | 0 | if ( bit_depth ) this->bit_depth = std::move(*bit_depth); |
820 | 0 | if ( colour_type ) this->colour_type = std::move(*colour_type); |
821 | 0 | if ( compression_method ) this->compression_method = std::move(*compression_method); |
822 | 0 | if ( filter_method ) this->filter_method = std::move(*filter_method); |
823 | 0 | if ( interlace_method ) this->interlace_method = std::move(*interlace_method); |
824 | 0 | } |
825 | | |
826 | | |
827 | | extern auto operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::Chunk& x) -> std::ostream&; |
828 | 8.16k | File::File() { |
829 | 8.16k | colour_type = ::hilti::rt::integer::safe<std::uint8_t>{0U}; |
830 | 8.16k | } |
831 | | |
832 | 0 | File::File(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> signature, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint8_t>> colour_type) : File() { |
833 | 0 | if ( signature ) this->signature = std::move(*signature); |
834 | 0 | if ( colour_type ) this->colour_type = std::move(*colour_type); |
835 | 0 | } |
836 | | |
837 | | |
838 | 276k | Chunk::Chunk() { |
839 | 276k | } |
840 | | |
841 | 276k | Chunk::Chunk(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::File>& _p_top) : _p_top(_p_top) { |
842 | 276k | max_chunk_size = ::hilti::rt::pow(::hilti::rt::integer::safe<std::uint64_t>{2U}, ::hilti::rt::integer::safe<std::uint64_t>{31U}); |
843 | 276k | } |
844 | | |
845 | 0 | Chunk::Chunk(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> max_chunk_size, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint32_t>>> length, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> chunk_type, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::IHDR>>> ihdr, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::PLTE>>> plte, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::iCCP>>> iccp, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::pHYs>>> phys, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::iTXt>>> itxt, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::tEXt>>> text, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::zTXt>>> ztzt, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>>> frequency, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::cHRM>>> chrm, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::gAMA>>> gama, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::sRGB>>> srgb, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::sBIT>>> sbit, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::bKGD>>> bkgd, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::tRNS>>> trns, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::tIME>>> ttime, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> crc) : Chunk() { |
846 | 0 | if ( max_chunk_size ) this->max_chunk_size = std::move(*max_chunk_size); |
847 | 0 | if ( length ) this->length = std::move(*length); |
848 | 0 | if ( chunk_type ) this->chunk_type = std::move(*chunk_type); |
849 | 0 | if ( ihdr ) this->ihdr = std::move(*ihdr); |
850 | 0 | if ( plte ) this->plte = std::move(*plte); |
851 | 0 | if ( iccp ) this->iccp = std::move(*iccp); |
852 | 0 | if ( phys ) this->phys = std::move(*phys); |
853 | 0 | if ( itxt ) this->itxt = std::move(*itxt); |
854 | 0 | if ( text ) this->text = std::move(*text); |
855 | 0 | if ( ztzt ) this->ztzt = std::move(*ztzt); |
856 | 0 | if ( frequency ) this->frequency = std::move(*frequency); |
857 | 0 | if ( chrm ) this->chrm = std::move(*chrm); |
858 | 0 | if ( gama ) this->gama = std::move(*gama); |
859 | 0 | if ( srgb ) this->srgb = std::move(*srgb); |
860 | 0 | if ( sbit ) this->sbit = std::move(*sbit); |
861 | 0 | if ( bkgd ) this->bkgd = std::move(*bkgd); |
862 | 0 | if ( trns ) this->trns = std::move(*trns); |
863 | 0 | if ( ttime ) this->ttime = std::move(*ttime); |
864 | 0 | if ( crc ) this->crc = std::move(*crc); |
865 | 0 | } |
866 | | |
867 | | |
868 | | } |
869 | | |
870 | | namespace hlt_PNG_File::PNG::File { |
871 | | extern auto parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _context) -> ::hilti::rt::Resumable; |
872 | | extern auto parse2(::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::File>& _unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _context) -> ::hilti::rt::Resumable; |
873 | | extern auto parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _context) -> ::hilti::rt::Resumable; |
874 | | } |
875 | | |
876 | | namespace hlt_internal_PNG_File::PNG { |
877 | | extern void _hook_IHDR__on_0x25_done_bfc2(::hilti::rt::ValueReference<IHDR>& _self); |
878 | | extern void _hook_IHDR__on_0x25_done(::hilti::rt::ValueReference<IHDR>& _self); |
879 | | extern void _hook_IHDR__on_0x25_done_bfc2(::hilti::rt::ValueReference<IHDR>& _self); |
880 | | extern void _register_PNG_Chunk(); |
881 | | extern void _register_PNG_File(); |
882 | | extern void _register_PNG_IHDR(); |
883 | | extern void _register_PNG_PLTE(); |
884 | | extern void _register_PNG_PLTE_ENTRY(); |
885 | | extern void _register_PNG_bKGD(); |
886 | | extern void _register_PNG_cHRM(); |
887 | | extern void _register_PNG_gAMA(); |
888 | | extern void _register_PNG_iCCP(); |
889 | | extern void _register_PNG_iTXt(); |
890 | | extern void _register_PNG_pHYs(); |
891 | | extern void _register_PNG_sBIT(); |
892 | | extern void _register_PNG_sRGB(); |
893 | | extern void _register_PNG_tEXt(); |
894 | | extern void _register_PNG_tIME(); |
895 | | extern void _register_PNG_tRNS(); |
896 | | extern void _register_PNG_zTXt(); |
897 | | extern void _init_module(); |
898 | | extern void _register_module(); |
899 | | } |
900 | | |
901 | | namespace hlt_internal_PNG_File::type_info { namespace { |
902 | 0 | const ::hilti::rt::TypeInfo _ti_hilti__RecoverableFailure_namex2ahilti__RecoverableFailurex2b = { "hilti::RecoverableFailure", "hilti::RecoverableFailure", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::RecoverableFailure*>(self)); }, new ::hilti::rt::type_info::Exception() }; |
903 | 0 | const ::hilti::rt::TypeInfo _ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b = { {}, "optional<spicy::RecoverableFailure>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>*>(self)); }, new ::hilti::rt::type_info::Optional(&type_info::_ti_hilti__RecoverableFailure_namex2ahilti__RecoverableFailurex2b, ::hilti::rt::type_info::Optional::accessor<::hilti::rt::RecoverableFailure>()) }; |
904 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__PLTE_ENTRY_namex2aPNG__PLTE_ENTRYx2b = { "PNG::PLTE_ENTRY", "PNG::PLTE_ENTRY", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::PLTE_ENTRY*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "red", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::PLTE_ENTRY, red)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "green", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::PLTE_ENTRY, green)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "blue", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::PLTE_ENTRY, blue)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::PLTE_ENTRY, _error)), true, false, true }})) }; |
905 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_PLTE_ENTRY__value_refx2anamex2aPNG__PLTE_ENTRYx2bx2b = { {}, "value_ref<PLTE_ENTRY>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::PLTE_ENTRY>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__PLTE_ENTRY_namex2aPNG__PLTE_ENTRYx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::PLTE_ENTRY>()) }; |
906 | 0 | const ::hilti::rt::TypeInfo _ti_vector_value_ref_PLTE_ENTRY___vectorx2anamex2aPNG__PLTE_ENTRYx2bx2b = { {}, "vector<value_ref<PLTE_ENTRY>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::PLTE_ENTRY>>*>(self)); }, new ::hilti::rt::type_info::Vector(&type_info::_ti_value_ref_PLTE_ENTRY__value_refx2anamex2aPNG__PLTE_ENTRYx2bx2b, ::hilti::rt::type_info::Vector::accessor<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::PLTE_ENTRY>>()) }; |
907 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__PLTE_namex2aPNG__PLTEx2b = { "PNG::PLTE", "PNG::PLTE", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::PLTE*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "entries", &type_info::_ti_vector_value_ref_PLTE_ENTRY___vectorx2anamex2aPNG__PLTE_ENTRYx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::PLTE, entries)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::PLTE_ENTRY>>>() }, ::hilti::rt::type_info::struct_::Field{ "_anon_7", &type_info::_ti_value_ref_PLTE_ENTRY__value_refx2anamex2aPNG__PLTE_ENTRYx2bx2b, std::ptrdiff_t{-1}, false, true, false }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::PLTE, _error)), true, false, true }})) }; |
908 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__bKGD_namex2aPNG__bKGDx2b = { "PNG::bKGD", "PNG::bKGD", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::bKGD*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "greyscale", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PNG::bKGD, greyscale)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint16_t>>() }, ::hilti::rt::type_info::struct_::Field{ "red", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PNG::bKGD, red)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint16_t>>() }, ::hilti::rt::type_info::struct_::Field{ "green", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PNG::bKGD, green)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint16_t>>() }, ::hilti::rt::type_info::struct_::Field{ "blue", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PNG::bKGD, blue)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint16_t>>() }, ::hilti::rt::type_info::struct_::Field{ "palette_index", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::bKGD, palette_index)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::bKGD, _error)), true, false, true }})) }; |
909 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__cHRM_namex2aPNG__cHRMx2b = { "PNG::cHRM", "PNG::cHRM", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::cHRM*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "white_point_x", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::cHRM, white_point_x)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "white_point_y", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::cHRM, white_point_y)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "red_x", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::cHRM, red_x)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "red_y", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::cHRM, red_y)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "green_x", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::cHRM, green_x)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "green_y", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::cHRM, green_y)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "blue_x", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::cHRM, blue_x)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "blue_y", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::cHRM, blue_y)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::cHRM, _error)), true, false, true }})) }; |
910 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__gAMA_namex2aPNG__gAMAx2b = { "PNG::gAMA", "PNG::gAMA", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::gAMA*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "gamma", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::gAMA, gamma)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::gAMA, _error)), true, false, true }})) }; |
911 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__iCCP_namex2aPNG__iCCPx2b = { "PNG::iCCP", "PNG::iCCP", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::iCCP*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "profile_name", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::iCCP, profile_name)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "compression_method", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::iCCP, compression_method)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "compressed_profile", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::iCCP, compressed_profile)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::iCCP, _error)), true, false, true }})) }; |
912 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__iTXt_namex2aPNG__iTXtx2b = { "PNG::iTXt", "PNG::iTXt", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::iTXt*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "keyword", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::iTXt, keyword)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "compression_flag", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::iTXt, compression_flag)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "compression_method", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::iTXt, compression_method)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "language_tag", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::iTXt, language_tag)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "translated_keyword", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::iTXt, translated_keyword)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "text", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::iTXt, text)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::iTXt, _error)), true, false, true }})) }; |
913 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__pHYs_namex2aPNG__pHYsx2b = { "PNG::pHYs", "PNG::pHYs", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::pHYs*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "ppux", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::pHYs, ppux)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "ppuy", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::pHYs, ppuy)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "unit_specifier", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::pHYs, unit_specifier)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::pHYs, _error)), true, false, true }})) }; |
914 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__sBIT_namex2aPNG__sBITx2b = { "PNG::sBIT", "PNG::sBIT", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::sBIT*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "significant_greyscale_bits", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::sBIT, significant_greyscale_bits)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "significant_red_bits", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::sBIT, significant_red_bits)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "significant_green_bits", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::sBIT, significant_green_bits)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "significant_blue_bits", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::sBIT, significant_blue_bits)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "significant_alpha_bits", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::sBIT, significant_alpha_bits)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::sBIT, _error)), true, false, true }})) }; |
915 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__sRGB_namex2aPNG__sRGBx2b = { "PNG::sRGB", "PNG::sRGB", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::sRGB*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "rendering_intent", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::sRGB, rendering_intent)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::sRGB, _error)), true, false, true }})) }; |
916 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__tEXt_namex2aPNG__tEXtx2b = { "PNG::tEXt", "PNG::tEXt", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::tEXt*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "keyword", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::tEXt, keyword)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "text_string", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::tEXt, text_string)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::tEXt, _error)), true, false, true }})) }; |
917 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__tIME_namex2aPNG__tIMEx2b = { "PNG::tIME", "PNG::tIME", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::tIME*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "year", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PNG::tIME, year)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint16_t>>() }, ::hilti::rt::type_info::struct_::Field{ "month", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::tIME, month)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "day", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::tIME, day)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "hour", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::tIME, hour)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "minute", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::tIME, minute)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "second", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::tIME, second)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::tIME, _error)), true, false, true }})) }; |
918 | 0 | const ::hilti::rt::TypeInfo _ti_vector_uint_8___vectorx2auint8x2b = { {}, "vector<uint<8>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Vector<::hilti::rt::integer::safe<uint8_t>>*>(self)); }, new ::hilti::rt::type_info::Vector(&::hilti::rt::type_info::uint8, ::hilti::rt::type_info::Vector::accessor<::hilti::rt::integer::safe<uint8_t>>()) }; |
919 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__tRNS_namex2aPNG__tRNSx2b = { "PNG::tRNS", "PNG::tRNS", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::tRNS*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "grey_sample_value", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PNG::tRNS, grey_sample_value)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint16_t>>() }, ::hilti::rt::type_info::struct_::Field{ "red_sample_value", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PNG::tRNS, red_sample_value)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint16_t>>() }, ::hilti::rt::type_info::struct_::Field{ "green_sample_value", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PNG::tRNS, green_sample_value)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint16_t>>() }, ::hilti::rt::type_info::struct_::Field{ "blue_sample_value", &::hilti::rt::type_info::uint16, static_cast<std::ptrdiff_t>(offsetof(PNG::tRNS, blue_sample_value)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint16_t>>() }, ::hilti::rt::type_info::struct_::Field{ "alpha", &type_info::_ti_vector_uint_8___vectorx2auint8x2b, static_cast<std::ptrdiff_t>(offsetof(PNG::tRNS, alpha)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Vector<::hilti::rt::integer::safe<uint8_t>>>() }, ::hilti::rt::type_info::struct_::Field{ "_anon_8", &::hilti::rt::type_info::uint8, std::ptrdiff_t{-1}, false, true, false }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::tRNS, _error)), true, false, true }})) }; |
920 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__zTXt_namex2aPNG__zTXtx2b = { "PNG::zTXt", "PNG::zTXt", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::zTXt*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "keyword", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::zTXt, keyword)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "compression_method", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::zTXt, compression_method)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "compressed_text", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::zTXt, compressed_text)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::zTXt, _error)), true, false, true }})) }; |
921 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__IHDR_namex2aPNG__IHDRx2b = { "PNG::IHDR", "PNG::IHDR", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::IHDR*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "width", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::IHDR, width)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "height", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::IHDR, height)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "bit_depth", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::IHDR, bit_depth)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "colour_type", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::IHDR, colour_type)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "compression_method", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::IHDR, compression_method)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "filter_method", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::IHDR, filter_method)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "interlace_method", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::IHDR, interlace_method)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint8_t>>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::IHDR, _error)), true, false, true }})) }; |
922 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_IHDR__value_refx2anamex2aPNG__IHDRx2bx2b = { {}, "value_ref<IHDR>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::IHDR>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__IHDR_namex2aPNG__IHDRx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::IHDR>()) }; |
923 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_PLTE__value_refx2anamex2aPNG__PLTEx2bx2b = { {}, "value_ref<PLTE>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::PLTE>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__PLTE_namex2aPNG__PLTEx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::PLTE>()) }; |
924 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_iCCP__value_refx2anamex2aPNG__iCCPx2bx2b = { {}, "value_ref<iCCP>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::iCCP>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__iCCP_namex2aPNG__iCCPx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::iCCP>()) }; |
925 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_pHYs__value_refx2anamex2aPNG__pHYsx2bx2b = { {}, "value_ref<pHYs>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::pHYs>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__pHYs_namex2aPNG__pHYsx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::pHYs>()) }; |
926 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_iTXt__value_refx2anamex2aPNG__iTXtx2bx2b = { {}, "value_ref<iTXt>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::iTXt>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__iTXt_namex2aPNG__iTXtx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::iTXt>()) }; |
927 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_tEXt__value_refx2anamex2aPNG__tEXtx2bx2b = { {}, "value_ref<tEXt>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::tEXt>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__tEXt_namex2aPNG__tEXtx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::tEXt>()) }; |
928 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_zTXt__value_refx2anamex2aPNG__zTXtx2bx2b = { {}, "value_ref<zTXt>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::zTXt>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__zTXt_namex2aPNG__zTXtx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::zTXt>()) }; |
929 | 0 | const ::hilti::rt::TypeInfo _ti_vector_uint_16___vectorx2auint16x2b = { {}, "vector<uint<16>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>*>(self)); }, new ::hilti::rt::type_info::Vector(&::hilti::rt::type_info::uint16, ::hilti::rt::type_info::Vector::accessor<::hilti::rt::integer::safe<uint16_t>>()) }; |
930 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_cHRM__value_refx2anamex2aPNG__cHRMx2bx2b = { {}, "value_ref<cHRM>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::cHRM>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__cHRM_namex2aPNG__cHRMx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::cHRM>()) }; |
931 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_gAMA__value_refx2anamex2aPNG__gAMAx2bx2b = { {}, "value_ref<gAMA>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::gAMA>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__gAMA_namex2aPNG__gAMAx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::gAMA>()) }; |
932 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_sRGB__value_refx2anamex2aPNG__sRGBx2bx2b = { {}, "value_ref<sRGB>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::sRGB>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__sRGB_namex2aPNG__sRGBx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::sRGB>()) }; |
933 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_sBIT__value_refx2anamex2aPNG__sBITx2bx2b = { {}, "value_ref<sBIT>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::sBIT>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__sBIT_namex2aPNG__sBITx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::sBIT>()) }; |
934 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_bKGD__value_refx2anamex2aPNG__bKGDx2bx2b = { {}, "value_ref<bKGD>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::bKGD>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__bKGD_namex2aPNG__bKGDx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::bKGD>()) }; |
935 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_tRNS__value_refx2anamex2aPNG__tRNSx2bx2b = { {}, "value_ref<tRNS>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::tRNS>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__tRNS_namex2aPNG__tRNSx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::tRNS>()) }; |
936 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_tIME__value_refx2anamex2aPNG__tIMEx2bx2b = { {}, "value_ref<tIME>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::tIME>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__tIME_namex2aPNG__tIMEx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::tIME>()) }; |
937 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__Chunk_namex2aPNG__Chunkx2b = { "PNG::Chunk", "PNG::Chunk", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::Chunk*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "max_chunk_size", &::hilti::rt::type_info::uint64, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, max_chunk_size)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "length", &::hilti::rt::type_info::uint32, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, length)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint32_t>>() }, ::hilti::rt::type_info::struct_::Field{ "chunk_type", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, chunk_type)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "ihdr", &type_info::_ti_value_ref_IHDR__value_refx2anamex2aPNG__IHDRx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, ihdr)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::IHDR>>() }, ::hilti::rt::type_info::struct_::Field{ "plte", &type_info::_ti_value_ref_PLTE__value_refx2anamex2aPNG__PLTEx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, plte)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::PLTE>>() }, ::hilti::rt::type_info::struct_::Field{ "iccp", &type_info::_ti_value_ref_iCCP__value_refx2anamex2aPNG__iCCPx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, iccp)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::iCCP>>() }, ::hilti::rt::type_info::struct_::Field{ "phys", &type_info::_ti_value_ref_pHYs__value_refx2anamex2aPNG__pHYsx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, phys)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::pHYs>>() }, ::hilti::rt::type_info::struct_::Field{ "itxt", &type_info::_ti_value_ref_iTXt__value_refx2anamex2aPNG__iTXtx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, itxt)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::iTXt>>() }, ::hilti::rt::type_info::struct_::Field{ "text", &type_info::_ti_value_ref_tEXt__value_refx2anamex2aPNG__tEXtx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, text)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::tEXt>>() }, ::hilti::rt::type_info::struct_::Field{ "ztzt", &type_info::_ti_value_ref_zTXt__value_refx2anamex2aPNG__zTXtx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, ztzt)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::zTXt>>() }, ::hilti::rt::type_info::struct_::Field{ "_anon_3", &::hilti::rt::type_info::void_, std::ptrdiff_t{-1}, false, true, false }, ::hilti::rt::type_info::struct_::Field{ "_anon_4", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, true, false }, ::hilti::rt::type_info::struct_::Field{ "frequency", &type_info::_ti_vector_uint_16___vectorx2auint16x2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, frequency)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>>() }, ::hilti::rt::type_info::struct_::Field{ "_anon_5", &::hilti::rt::type_info::uint16, std::ptrdiff_t{-1}, false, true, false }, ::hilti::rt::type_info::struct_::Field{ "chrm", &type_info::_ti_value_ref_cHRM__value_refx2anamex2aPNG__cHRMx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, chrm)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::cHRM>>() }, ::hilti::rt::type_info::struct_::Field{ "gama", &type_info::_ti_value_ref_gAMA__value_refx2anamex2aPNG__gAMAx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, gama)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::gAMA>>() }, ::hilti::rt::type_info::struct_::Field{ "srgb", &type_info::_ti_value_ref_sRGB__value_refx2anamex2aPNG__sRGBx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, srgb)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::sRGB>>() }, ::hilti::rt::type_info::struct_::Field{ "sbit", &type_info::_ti_value_ref_sBIT__value_refx2anamex2aPNG__sBITx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, sbit)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::sBIT>>() }, ::hilti::rt::type_info::struct_::Field{ "bkgd", &type_info::_ti_value_ref_bKGD__value_refx2anamex2aPNG__bKGDx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, bkgd)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::bKGD>>() }, ::hilti::rt::type_info::struct_::Field{ "trns", &type_info::_ti_value_ref_tRNS__value_refx2anamex2aPNG__tRNSx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, trns)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::tRNS>>() }, ::hilti::rt::type_info::struct_::Field{ "ttime", &type_info::_ti_value_ref_tIME__value_refx2anamex2aPNG__tIMEx2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, ttime)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::tIME>>() }, ::hilti::rt::type_info::struct_::Field{ "_anon_6", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, true, false }, ::hilti::rt::type_info::struct_::Field{ "crc", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, crc)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::Chunk, _error)), true, false, true }})) }; |
938 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_Chunk__value_refx2anamex2aPNG__Chunkx2bx2b = { {}, "value_ref<Chunk>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::Chunk>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__Chunk_namex2aPNG__Chunkx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::Chunk>()) }; |
939 | 0 | const ::hilti::rt::TypeInfo _ti_vector_value_ref_Chunk___vectorx2anamex2aPNG__Chunkx2bx2b = { {}, "vector<value_ref<Chunk>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::Chunk>>*>(self)); }, new ::hilti::rt::type_info::Vector(&type_info::_ti_value_ref_Chunk__value_refx2anamex2aPNG__Chunkx2bx2b, ::hilti::rt::type_info::Vector::accessor<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::Chunk>>()) }; |
940 | 0 | const ::hilti::rt::TypeInfo _ti_PNG__File_namex2aPNG__Filex2b = { "PNG::File", "PNG::File", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_PNG_File::PNG::File*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "signature", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(PNG::File, signature)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "colour_type", &::hilti::rt::type_info::uint8, static_cast<std::ptrdiff_t>(offsetof(PNG::File, colour_type)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "_anon_2", &type_info::_ti_vector_value_ref_Chunk___vectorx2anamex2aPNG__Chunkx2bx2b, std::ptrdiff_t{-1}, false, true, false }, ::hilti::rt::type_info::struct_::Field{ "_anon", &type_info::_ti_value_ref_Chunk__value_refx2anamex2aPNG__Chunkx2bx2b, std::ptrdiff_t{-1}, false, true, false }, ::hilti::rt::type_info::struct_::Field{ "_error", &type_info::_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(PNG::File, _error)), true, false, true }})) }; |
941 | 0 | const ::hilti::rt::TypeInfo _ti_value_ref_PNG__File__value_refx2anamex2aPNG__Filex2bx2b = { {}, "value_ref<PNG::File>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::File>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_ti_PNG__File_namex2aPNG__Filex2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_PNG_File::PNG::File>()) }; |
942 | 0 | const ::hilti::rt::TypeInfo _ti_strong_ref_const_PNG__File__strong_refx2anamex2aPNG__Filex2bx2b = { {}, "strong_ref<const PNG::File>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::StrongReference<hlt_internal_PNG_File::PNG::File>*>(self)); }, new ::hilti::rt::type_info::StrongReference(&type_info::_ti_PNG__File_namex2aPNG__Filex2b, ::hilti::rt::type_info::StrongReference::accessor<hlt_internal_PNG_File::PNG::File>()) }; |
943 | | } } |
944 | | |
945 | | HILTI_PRE_INIT(hlt_internal_PNG_File::PNG::_register_module) |
946 | | |
947 | 3.67k | extern auto hlt_PNG_File::PNG::File::parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _context) -> ::hilti::rt::Resumable { |
948 | 3.67k | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_data), ::hilti::rt::resumable::detail::copyArg(_cur), ::hilti::rt::resumable::detail::copyArg(_context)); |
949 | 3.67k | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
950 | 3.67k | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
951 | 3.67k | return hlt_internal_PNG_File::PNG::File::parse1(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap)); |
952 | 3.67k | }; |
953 | | |
954 | 3.67k | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
955 | 3.67k | r->run(); |
956 | 3.67k | return std::move(*r); |
957 | 3.67k | } |
958 | | |
959 | 0 | extern auto hlt_PNG_File::PNG::File::parse2(::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::File>& _unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _context) -> ::hilti::rt::Resumable { |
960 | 0 | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_unit), ::hilti::rt::resumable::detail::copyArg(_data), ::hilti::rt::resumable::detail::copyArg(_cur), ::hilti::rt::resumable::detail::copyArg(_context)); |
961 | 0 | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
962 | 0 | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
963 | 0 | return hlt_internal_PNG_File::PNG::File::parse2(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap), std::get<3>(*args_on_heap)); |
964 | 0 | }; |
965 | |
|
966 | 0 | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
967 | 0 | r->run(); |
968 | 0 | return std::move(*r); |
969 | 0 | } |
970 | | |
971 | 0 | extern auto hlt_PNG_File::PNG::File::parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _context) -> ::hilti::rt::Resumable { |
972 | 0 | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_gunit), ::hilti::rt::resumable::detail::copyArg(_data), ::hilti::rt::resumable::detail::copyArg(_cur), ::hilti::rt::resumable::detail::copyArg(_context)); |
973 | 0 | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
974 | 0 | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
975 | 0 | return hlt_internal_PNG_File::PNG::File::parse3(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap), std::get<3>(*args_on_heap)); |
976 | 0 | }; |
977 | |
|
978 | 0 | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
979 | 0 | r->run(); |
980 | 0 | return std::move(*r); |
981 | 0 | } |
982 | | |
983 | 276k | auto hlt_internal_PNG_File::PNG::Chunk::_parse_PNG__Chunk_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
984 | 276k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _lhs_1;::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _lhs_2; |
985 | 276k | auto _self = Chunk::_self(); |
986 | 276k | ::hilti::rt::detail::checkStack(); |
987 | 276k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:11:14-43:1"); |
988 | 276k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:14:13-14:18"); |
989 | | |
990 | | // Begin parsing production: Variable: length_2 -> uint<32>; |
991 | 276k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:14:13-14:18"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
992 | 276k | ::hilti::rt::tuple::assign(std::tie((*_self).length.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
993 | 276k | if ( _trim ) { |
994 | 275k | (*_data).trim(_cur.begin()); |
995 | 275k | } |
996 | | |
997 | | // End parsing production: Variable: length_2 -> uint<32>; |
998 | | |
999 | 276k | ::hilti::rt::integer::safe<uint32_t> _dd = (*_self).length.value(); |
1000 | 276k | ::hilti::rt::Result<::hilti::rt::Nothing> _requires = ((::hilti::rt::integer::safe<uint64_t>(_dd) <= (*_self).max_chunk_size) ? ::hilti::rt::make_result(::hilti::rt::Nothing{}) : ::hilti::rt::result::Error("&requires failed: ($$ <= self.max_chunk_size)")); |
1001 | 276k | if ( ! (::hilti::rt::Bool(static_cast<bool>(_requires))) ) { |
1002 | 42 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:14:20-14:56"); |
1003 | 42 | throw ::spicy::rt::ParseError(_requires.errorOrThrow(), "/src/spicy/spicy-png/analyzer/analyzer.spicy:14:20-14:56"); |
1004 | 42 | } |
1005 | | |
1006 | 276k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:15:17-15:21"); |
1007 | | |
1008 | | // Begin parsing production: Variable: chunk_type_2 -> bytes; |
1009 | 276k | (*_self).chunk_type.valueOrInit() = ::spicy::rt::detail::extractBytes(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, ::hilti::rt::Bool(false), "/src/spicy/spicy-png/analyzer/analyzer.spicy:15:5-15:30"sv, (_lhs_1=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1010 | 276k | _cur = _cur.advance(::hilti::rt::integer::safe<std::uint64_t>{4U}); |
1011 | 276k | if ( _trim ) { |
1012 | 275k | (*_data).trim(_cur.begin()); |
1013 | 275k | } |
1014 | | |
1015 | | // End parsing production: Variable: chunk_type_2 -> bytes; |
1016 | | |
1017 | 276k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:16:5-36:6"); |
1018 | | |
1019 | | // Begin parsing production: Switch: switch_5 -> [b"IHDR"] -> switch_5_case_1 | [b"PLTE"] -> switch_5_case_2 | [b"iCCP"] -> switch_5_case_3 | [b"pHYs"] -> switch_5_case_4 | [b"iTXt"] -> switch_5_case_5 | [b"tEXt"] -> switch_5_case_6 | [b"zTXt"] -> switch_5_case_7 | [b"IEND"] -> switch_5_case_8 | [b"IDAT"] -> switch_5_case_9 | [b"hIST"] -> switch_5_case_10 | [b"cHRM"] -> switch_5_case_11 | [b"gAMA"] -> switch_5_case_12 | [b"sRGB"] -> switch_5_case_13 | [b"sBIT"] -> switch_5_case_14 | [b"bKGD"] -> switch_5_case_15 | [b"tRNS"] -> switch_5_case_16 | [b"tIME"] -> switch_5_case_17 | | * -> switch_5_default; |
1020 | 276k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*_self)._parse_switch_5_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1021 | | // End parsing production: Switch: switch_5 -> [b"IHDR"] -> switch_5_case_1 | [b"PLTE"] -> switch_5_case_2 | [b"iCCP"] -> switch_5_case_3 | [b"pHYs"] -> switch_5_case_4 | [b"iTXt"] -> switch_5_case_5 | [b"tEXt"] -> switch_5_case_6 | [b"zTXt"] -> switch_5_case_7 | [b"IEND"] -> switch_5_case_8 | [b"IDAT"] -> switch_5_case_9 | [b"hIST"] -> switch_5_case_10 | [b"cHRM"] -> switch_5_case_11 | [b"gAMA"] -> switch_5_case_12 | [b"sRGB"] -> switch_5_case_13 | [b"sBIT"] -> switch_5_case_14 | [b"bKGD"] -> switch_5_case_15 | [b"tRNS"] -> switch_5_case_16 | [b"tIME"] -> switch_5_case_17 | | * -> switch_5_default; |
1022 | | |
1023 | 276k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:37:10-37:14"); |
1024 | | |
1025 | | // Begin parsing production: Variable: crc_2 -> bytes; |
1026 | 276k | (*_self).crc.valueOrInit() = ::spicy::rt::detail::extractBytes(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, ::hilti::rt::Bool(false), "/src/spicy/spicy-png/analyzer/analyzer.spicy:37:5-37:23"sv, (_lhs_2=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1027 | 276k | _cur = _cur.advance(::hilti::rt::integer::safe<std::uint64_t>{4U}); |
1028 | 276k | if ( _trim ) { |
1029 | 272k | (*_data).trim(_cur.begin()); |
1030 | 272k | } |
1031 | | |
1032 | | // End parsing production: Variable: crc_2 -> bytes; |
1033 | | |
1034 | 276k | ::hilti::rt::debug::dedent("spicy"sv); |
1035 | 276k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
1036 | 276k | } |
1037 | | |
1038 | 3.03k | auto hlt_internal_PNG_File::PNG::Chunk::_parse_frequency_2_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error, ::hilti::rt::Vector<::hilti::rt::integer::safe<uint16_t>>& _dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1039 | 3.03k | auto _self = Chunk::_self(); |
1040 | 3.03k | ::hilti::rt::detail::checkStack(); |
1041 | 3.03k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:26:20-26:54"); |
1042 | 3.03k | ::hilti::rt::integer::safe<uint64_t> _repeat = ::hilti::rt::integer::safe<uint64_t>((*_self).length.value() / ::hilti::rt::integer::safe<std::uint32_t>{2U}); |
1043 | 3.03k | _dst.reserve((::hilti::rt::integer::safe<std::uint64_t>{128U} <= _repeat ? ::hilti::rt::integer::safe<std::uint64_t>{128U} : _repeat)); |
1044 | 729k | for ( ::hilti::rt::integer::safe<uint64_t> _i = _repeat; ::hilti::rt::Bool(static_cast<bool>(_i)); ) { |
1045 | 726k | _i--; |
1046 | 726k | ::hilti::rt::integer::safe<uint16_t> _elem; |
1047 | 726k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:26:31-26:36"); |
1048 | | |
1049 | | // Begin parsing production: Variable: _anon_5_2 -> uint<16> (container 'frequency'); |
1050 | 726k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:26:31-26:36"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1051 | 726k | ::hilti::rt::tuple::assign(std::tie(_elem, _cur), ::hilti::rt::integer::unpack<uint16_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1052 | 726k | if ( _trim ) { |
1053 | 726k | (*_data).trim(_cur.begin()); |
1054 | 726k | } |
1055 | | |
1056 | | // End parsing production: Variable: _anon_5_2 -> uint<16> (container 'frequency'); |
1057 | | |
1058 | 726k | _dst.emplace_back(_elem); |
1059 | 726k | } |
1060 | | |
1061 | 3.03k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
1062 | 3.03k | } |
1063 | | |
1064 | 276k | auto hlt_internal_PNG_File::PNG::Chunk::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1065 | 276k | auto _self = Chunk::_self(); |
1066 | 276k | ::hilti::rt::detail::checkStack(); |
1067 | 276k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:11:14-43:1"); |
1068 | 276k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
1069 | 276k | ::hilti::rt::debug::indent("spicy"sv); |
1070 | 276k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
1071 | 276k | _result = (*_self)._parse_PNG__Chunk_2_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
1072 | 276k | return _result; |
1073 | 276k | } |
1074 | | |
1075 | 275k | auto hlt_internal_PNG_File::PNG::Chunk::_parse_switch_5_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1076 | 275k | auto _self = Chunk::_self(); |
1077 | 275k | ::hilti::rt::detail::checkStack(); |
1078 | 275k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:16:5-36:6"); |
1079 | 275k | ::hilti::rt::debug::indent("spicy"sv); |
1080 | 275k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:16:5-36:6"); |
1081 | 275k | if ( ::hilti::rt::Bytes _x = (*_self).chunk_type.value(); _x == "IHDR"_b ) { |
1082 | 4.49k | ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::File> _lhs_3; |
1083 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:17:9-17:35"); |
1084 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:17:9-17:35"); |
1085 | | |
1086 | | // Begin parsing production: Block: switch_5_case_1 -> Resolved_19; |
1087 | 4.49k | ::hilti::rt::debug::indent("spicy"sv); |
1088 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:45:13-57:1"); |
1089 | | |
1090 | | // Begin parsing production: Unit: PNG__IHDR_2 -> width_2 height_2 bit_depth_2 colour_type_2 compression_method_5 filter_method_2 interlace_method_2 (field 'ihdr', id n/a, parser, args: (top)); |
1091 | 4.49k | (*_self).ihdr.valueOrInit() = (hlt_internal_PNG_File::PNG::IHDR(::hilti::rt::struct_::tag::Parameters(), (_lhs_3=(_self->_p_top.derefAsValue()).asSharedPtr()))); |
1092 | 4.49k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).ihdr.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1093 | | // End parsing production: Unit: PNG__IHDR_2 -> width_2 height_2 bit_depth_2 colour_type_2 compression_method_5 filter_method_2 interlace_method_2 (field 'ihdr', id n/a, parser, args: (top)); |
1094 | | |
1095 | 4.49k | ::hilti::rt::debug::dedent("spicy"sv); |
1096 | | // End parsing production: Block: switch_5_case_1 -> Resolved_19; |
1097 | 4.49k | } |
1098 | | |
1099 | 271k | else if ( _x == "PLTE"_b ) { |
1100 | 5.73k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:18:9-18:43"); |
1101 | 5.73k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:18:9-18:43"); |
1102 | | |
1103 | | // Begin parsing production: Block: switch_5_case_2 -> Resolved_20; |
1104 | 5.73k | ::hilti::rt::debug::indent("spicy"sv); |
1105 | 5.73k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:60:13-62:1"); |
1106 | | |
1107 | | // Begin parsing production: Unit: PNG__PLTE_2 -> entries_2 (field 'plte', id n/a, parser, args: (self.length)); |
1108 | 5.73k | (*_self).plte.valueOrInit() = (hlt_internal_PNG_File::PNG::PLTE(::hilti::rt::struct_::tag::Parameters(), (*_self).length.value())); |
1109 | 5.73k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).plte.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1110 | | // End parsing production: Unit: PNG__PLTE_2 -> entries_2 (field 'plte', id n/a, parser, args: (self.length)); |
1111 | | |
1112 | 5.73k | ::hilti::rt::debug::dedent("spicy"sv); |
1113 | | // End parsing production: Block: switch_5_case_2 -> Resolved_20; |
1114 | 5.73k | } |
1115 | | |
1116 | 265k | else if ( _x == "iCCP"_b ) { |
1117 | 3.00k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:19:9-19:43"); |
1118 | 3.00k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:19:9-19:43"); |
1119 | | |
1120 | | // Begin parsing production: Block: switch_5_case_3 -> Resolved_22; |
1121 | 3.00k | ::hilti::rt::debug::indent("spicy"sv); |
1122 | 3.00k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:71:13-75:1"); |
1123 | | |
1124 | | // Begin parsing production: Unit: PNG__iCCP_2 -> profile_name_2 compression_method_6 compressed_profile_2 (field 'iccp', id n/a, parser, args: (self.length)); |
1125 | 3.00k | (*_self).iccp.valueOrInit() = (hlt_internal_PNG_File::PNG::iCCP(::hilti::rt::struct_::tag::Parameters(), (*_self).length.value())); |
1126 | 3.00k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).iccp.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1127 | | // End parsing production: Unit: PNG__iCCP_2 -> profile_name_2 compression_method_6 compressed_profile_2 (field 'iccp', id n/a, parser, args: (self.length)); |
1128 | | |
1129 | 3.00k | ::hilti::rt::debug::dedent("spicy"sv); |
1130 | | // End parsing production: Block: switch_5_case_3 -> Resolved_22; |
1131 | 3.00k | } |
1132 | | |
1133 | 262k | else if ( _x == "pHYs"_b ) { |
1134 | 1.65k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:20:9-20:30"); |
1135 | 1.65k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:20:9-20:30"); |
1136 | | |
1137 | | // Begin parsing production: Block: switch_5_case_4 -> Resolved_23; |
1138 | 1.65k | ::hilti::rt::debug::indent("spicy"sv); |
1139 | 1.65k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:78:13-82:1"); |
1140 | | |
1141 | | // Begin parsing production: Unit: PNG__pHYs_2 -> ppux_2 ppuy_2 unit_specifier_2; |
1142 | 1.65k | (*_self).phys.valueOrInit() = (hlt_internal_PNG_File::PNG::pHYs()); |
1143 | 1.65k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).phys.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1144 | | // End parsing production: Unit: PNG__pHYs_2 -> ppux_2 ppuy_2 unit_specifier_2; |
1145 | | |
1146 | 1.65k | ::hilti::rt::debug::dedent("spicy"sv); |
1147 | | // End parsing production: Block: switch_5_case_4 -> Resolved_23; |
1148 | 1.65k | } |
1149 | | |
1150 | 260k | else if ( _x == "iTXt"_b ) { |
1151 | 10.1k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:21:9-21:43"); |
1152 | 10.1k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:21:9-21:43"); |
1153 | | |
1154 | | // Begin parsing production: Block: switch_5_case_5 -> Resolved_24; |
1155 | 10.1k | ::hilti::rt::debug::indent("spicy"sv); |
1156 | 10.1k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:85:13-92:1"); |
1157 | | |
1158 | | // Begin parsing production: Unit: PNG__iTXt_2 -> keyword_4 compression_flag_2 compression_method_7 language_tag_2 translated_keyword_2 text_2 (field 'itxt', id n/a, parser, args: (self.length)); |
1159 | 10.1k | (*_self).itxt.valueOrInit() = (hlt_internal_PNG_File::PNG::iTXt(::hilti::rt::struct_::tag::Parameters(), (*_self).length.value())); |
1160 | 10.1k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).itxt.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1161 | | // End parsing production: Unit: PNG__iTXt_2 -> keyword_4 compression_flag_2 compression_method_7 language_tag_2 translated_keyword_2 text_2 (field 'itxt', id n/a, parser, args: (self.length)); |
1162 | | |
1163 | 10.1k | ::hilti::rt::debug::dedent("spicy"sv); |
1164 | | // End parsing production: Block: switch_5_case_5 -> Resolved_24; |
1165 | 10.1k | } |
1166 | | |
1167 | 250k | else if ( _x == "tEXt"_b ) { |
1168 | 2.72k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:22:9-22:43"); |
1169 | 2.72k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:22:9-22:43"); |
1170 | | |
1171 | | // Begin parsing production: Block: switch_5_case_6 -> Resolved_25; |
1172 | 2.72k | ::hilti::rt::debug::indent("spicy"sv); |
1173 | 2.72k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:95:13-98:1"); |
1174 | | |
1175 | | // Begin parsing production: Unit: PNG__tEXt_2 -> keyword_5 text_string_2 (field 'text', id n/a, parser, args: (self.length)); |
1176 | 2.72k | (*_self).text.valueOrInit() = (hlt_internal_PNG_File::PNG::tEXt(::hilti::rt::struct_::tag::Parameters(), (*_self).length.value())); |
1177 | 2.72k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).text.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1178 | | // End parsing production: Unit: PNG__tEXt_2 -> keyword_5 text_string_2 (field 'text', id n/a, parser, args: (self.length)); |
1179 | | |
1180 | 2.72k | ::hilti::rt::debug::dedent("spicy"sv); |
1181 | | // End parsing production: Block: switch_5_case_6 -> Resolved_25; |
1182 | 2.72k | } |
1183 | | |
1184 | 248k | else if ( _x == "zTXt"_b ) { |
1185 | 3.55k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:23:9-23:43"); |
1186 | 3.55k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:23:9-23:43"); |
1187 | | |
1188 | | // Begin parsing production: Block: switch_5_case_7 -> Resolved_26; |
1189 | 3.55k | ::hilti::rt::debug::indent("spicy"sv); |
1190 | 3.55k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:101:13-105:1"); |
1191 | | |
1192 | | // Begin parsing production: Unit: PNG__zTXt_2 -> keyword_6 compression_method_8 compressed_text_2 (field 'ztzt', id n/a, parser, args: (self.length)); |
1193 | 3.55k | (*_self).ztzt.valueOrInit() = (hlt_internal_PNG_File::PNG::zTXt(::hilti::rt::struct_::tag::Parameters(), (*_self).length.value())); |
1194 | 3.55k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).ztzt.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1195 | | // End parsing production: Unit: PNG__zTXt_2 -> keyword_6 compression_method_8 compressed_text_2 (field 'ztzt', id n/a, parser, args: (self.length)); |
1196 | | |
1197 | 3.55k | ::hilti::rt::debug::dedent("spicy"sv); |
1198 | | // End parsing production: Block: switch_5_case_7 -> Resolved_26; |
1199 | 3.55k | } |
1200 | | |
1201 | 244k | else if ( _x == "IEND"_b ) { |
1202 | 523 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:24:9-24:55"); |
1203 | 523 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:24:9-24:55"); |
1204 | | |
1205 | | // Begin parsing production: Block: switch_5_case_8 -> _anon_3_2; |
1206 | 523 | ::hilti::rt::debug::indent("spicy"sv); |
1207 | 523 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:24:22-24:25"); |
1208 | | |
1209 | | // Begin parsing production: Variable: _anon_3_2 -> void; |
1210 | 523 | if ( _trim ) { |
1211 | 523 | (*_data).trim(_cur.begin()); |
1212 | 523 | } |
1213 | | |
1214 | | // End parsing production: Variable: _anon_3_2 -> void; |
1215 | | |
1216 | 523 | ::hilti::rt::Result<::hilti::rt::Nothing> _requires = (((*_self).length.value() == ::hilti::rt::integer::safe<std::uint32_t>{0U}) ? ::hilti::rt::make_result(::hilti::rt::Nothing{}) : ::hilti::rt::result::Error("&requires failed: (self.length == 0)")); |
1217 | 523 | if ( ! (::hilti::rt::Bool(static_cast<bool>(_requires))) ) { |
1218 | 31 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:24:27-24:54"); |
1219 | 31 | throw ::spicy::rt::ParseError(_requires.errorOrThrow(), "/src/spicy/spicy-png/analyzer/analyzer.spicy:24:27-24:54"); |
1220 | 31 | } |
1221 | | |
1222 | 492 | ::hilti::rt::debug::dedent("spicy"sv); |
1223 | | // End parsing production: Block: switch_5_case_8 -> _anon_3_2; |
1224 | 492 | } |
1225 | | |
1226 | 243k | else if ( _x == "IDAT"_b ) { |
1227 | 1.34k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _lhs_4; |
1228 | 1.34k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:25:9-25:45"); |
1229 | 1.34k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:25:9-25:45"); |
1230 | | |
1231 | | // Begin parsing production: Block: switch_5_case_9 -> _anon_4_2; |
1232 | 1.34k | ::hilti::rt::debug::indent("spicy"sv); |
1233 | 1.34k | ::hilti::rt::Bytes _transient__anon_4; |
1234 | 1.34k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:25:22-25:26"); |
1235 | | |
1236 | | // Begin parsing production: Variable: _anon_4_2 -> bytes; |
1237 | 1.34k | ::hilti::rt::integer::safe<uint64_t> _size = ::hilti::rt::integer::safe<uint64_t>((*_self).length.value()); |
1238 | 1.34k | _transient__anon_4 = ::spicy::rt::detail::extractBytes(_data, _cur, _size, ::hilti::rt::Bool(false), "/src/spicy/spicy-png/analyzer/analyzer.spicy:25:20-25:45"sv, (_lhs_4=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1239 | 1.34k | _cur = _cur.advance(_size); |
1240 | 1.34k | if ( _trim ) { |
1241 | 1.29k | (*_data).trim(_cur.begin()); |
1242 | 1.29k | } |
1243 | | |
1244 | | // End parsing production: Variable: _anon_4_2 -> bytes; |
1245 | | |
1246 | 1.34k | ::hilti::rt::debug::dedent("spicy"sv); |
1247 | | // End parsing production: Block: switch_5_case_9 -> _anon_4_2; |
1248 | 1.34k | } |
1249 | | |
1250 | 242k | else if ( _x == "hIST"_b ) { |
1251 | 3.03k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:26:9-26:54"); |
1252 | 3.03k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:26:9-26:54"); |
1253 | | |
1254 | | // Begin parsing production: Block: switch_5_case_10 -> frequency_2; |
1255 | 3.03k | ::hilti::rt::debug::indent("spicy"sv); |
1256 | 3.03k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:26:20-26:54"); |
1257 | | |
1258 | | // Begin parsing production: Counter: frequency_2 -> counter(self.length / 2): _anon_5_2; |
1259 | 3.03k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*_self)._parse_frequency_2_stage1(_data, _cur, _trim, _lah, _lahe, _error, (*_self).frequency.valueOrInit())); |
1260 | | // End parsing production: Counter: frequency_2 -> counter(self.length / 2): _anon_5_2; |
1261 | | |
1262 | 3.03k | ::hilti::rt::debug::dedent("spicy"sv); |
1263 | | // End parsing production: Block: switch_5_case_10 -> frequency_2; |
1264 | 3.03k | } |
1265 | | |
1266 | 239k | else if ( _x == "cHRM"_b ) { |
1267 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:27:9-27:30"); |
1268 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:27:9-27:30"); |
1269 | | |
1270 | | // Begin parsing production: Block: switch_5_case_11 -> Resolved_27; |
1271 | 2.63k | ::hilti::rt::debug::indent("spicy"sv); |
1272 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:108:13-117:1"); |
1273 | | |
1274 | | // Begin parsing production: Unit: PNG__cHRM_2 -> white_point_x_2 white_point_y_2 red_x_2 red_y_2 green_x_2 green_y_2 blue_x_2 blue_y_2; |
1275 | 2.63k | (*_self).chrm.valueOrInit() = (hlt_internal_PNG_File::PNG::cHRM()); |
1276 | 2.63k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).chrm.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1277 | | // End parsing production: Unit: PNG__cHRM_2 -> white_point_x_2 white_point_y_2 red_x_2 red_y_2 green_x_2 green_y_2 blue_x_2 blue_y_2; |
1278 | | |
1279 | 2.63k | ::hilti::rt::debug::dedent("spicy"sv); |
1280 | | // End parsing production: Block: switch_5_case_11 -> Resolved_27; |
1281 | 2.63k | } |
1282 | | |
1283 | 236k | else if ( _x == "gAMA"_b ) { |
1284 | 2.29k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:28:9-28:30"); |
1285 | 2.29k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:28:9-28:30"); |
1286 | | |
1287 | | // Begin parsing production: Block: switch_5_case_12 -> Resolved_28; |
1288 | 2.29k | ::hilti::rt::debug::indent("spicy"sv); |
1289 | 2.29k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:120:13-122:1"); |
1290 | | |
1291 | | // Begin parsing production: Unit: PNG__gAMA_2 -> gamma_2; |
1292 | 2.29k | (*_self).gama.valueOrInit() = (hlt_internal_PNG_File::PNG::gAMA()); |
1293 | 2.29k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).gama.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1294 | | // End parsing production: Unit: PNG__gAMA_2 -> gamma_2; |
1295 | | |
1296 | 2.29k | ::hilti::rt::debug::dedent("spicy"sv); |
1297 | | // End parsing production: Block: switch_5_case_12 -> Resolved_28; |
1298 | 2.29k | } |
1299 | | |
1300 | 234k | else if ( _x == "sRGB"_b ) { |
1301 | 1.38k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:29:9-29:30"); |
1302 | 1.38k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:29:9-29:30"); |
1303 | | |
1304 | | // Begin parsing production: Block: switch_5_case_13 -> Resolved_29; |
1305 | 1.38k | ::hilti::rt::debug::indent("spicy"sv); |
1306 | 1.38k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:125:13-127:1"); |
1307 | | |
1308 | | // Begin parsing production: Unit: PNG__sRGB_2 -> rendering_intent_2; |
1309 | 1.38k | (*_self).srgb.valueOrInit() = (hlt_internal_PNG_File::PNG::sRGB()); |
1310 | 1.38k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).srgb.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1311 | | // End parsing production: Unit: PNG__sRGB_2 -> rendering_intent_2; |
1312 | | |
1313 | 1.38k | ::hilti::rt::debug::dedent("spicy"sv); |
1314 | | // End parsing production: Block: switch_5_case_13 -> Resolved_29; |
1315 | 1.38k | } |
1316 | | |
1317 | 233k | else if ( _x == "sBIT"_b ) { |
1318 | 4.56k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:30:9-30:47"); |
1319 | 4.56k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:30:9-30:47"); |
1320 | | |
1321 | | // Begin parsing production: Block: switch_5_case_14 -> Resolved_30; |
1322 | 4.56k | ::hilti::rt::debug::indent("spicy"sv); |
1323 | 4.56k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:130:13-150:1"); |
1324 | | |
1325 | | // Begin parsing production: Unit: PNG__sBIT_2 -> switch_6 (field 'sbit', id n/a, parser, args: (top.colour_type)); |
1326 | 4.56k | (*_self).sbit.valueOrInit() = (hlt_internal_PNG_File::PNG::sBIT(::hilti::rt::struct_::tag::Parameters(), (*_self->_p_top.derefAsValue()).colour_type)); |
1327 | 4.56k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).sbit.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1328 | | // End parsing production: Unit: PNG__sBIT_2 -> switch_6 (field 'sbit', id n/a, parser, args: (top.colour_type)); |
1329 | | |
1330 | 4.56k | ::hilti::rt::debug::dedent("spicy"sv); |
1331 | | // End parsing production: Block: switch_5_case_14 -> Resolved_30; |
1332 | 4.56k | } |
1333 | | |
1334 | 228k | else if ( _x == "bKGD"_b ) { |
1335 | 4.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:31:9-31:47"); |
1336 | 4.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:31:9-31:47"); |
1337 | | |
1338 | | // Begin parsing production: Block: switch_5_case_15 -> Resolved_31; |
1339 | 4.13k | ::hilti::rt::debug::indent("spicy"sv); |
1340 | 4.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:153:13-165:1"); |
1341 | | |
1342 | | // Begin parsing production: Unit: PNG__bKGD_2 -> switch_7 (field 'bkgd', id n/a, parser, args: (top.colour_type)); |
1343 | 4.13k | (*_self).bkgd.valueOrInit() = (hlt_internal_PNG_File::PNG::bKGD(::hilti::rt::struct_::tag::Parameters(), (*_self->_p_top.derefAsValue()).colour_type)); |
1344 | 4.13k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).bkgd.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1345 | | // End parsing production: Unit: PNG__bKGD_2 -> switch_7 (field 'bkgd', id n/a, parser, args: (top.colour_type)); |
1346 | | |
1347 | 4.13k | ::hilti::rt::debug::dedent("spicy"sv); |
1348 | | // End parsing production: Block: switch_5_case_15 -> Resolved_31; |
1349 | 4.13k | } |
1350 | | |
1351 | 224k | else if ( _x == "tRNS"_b ) { |
1352 | 8.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:32:9-32:60"); |
1353 | 8.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:32:9-32:60"); |
1354 | | |
1355 | | // Begin parsing production: Block: switch_5_case_16 -> Resolved_32; |
1356 | 8.13k | ::hilti::rt::debug::indent("spicy"sv); |
1357 | 8.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:168:13-178:1"); |
1358 | | |
1359 | | // Begin parsing production: Unit: PNG__tRNS_2 -> switch_8 (field 'trns', id n/a, parser, args: (top.colour_type, self.length)); |
1360 | 8.13k | (*_self).trns.valueOrInit() = (hlt_internal_PNG_File::PNG::tRNS(::hilti::rt::struct_::tag::Parameters(), (*_self->_p_top.derefAsValue()).colour_type, (*_self).length.value())); |
1361 | 8.13k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).trns.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1362 | | // End parsing production: Unit: PNG__tRNS_2 -> switch_8 (field 'trns', id n/a, parser, args: (top.colour_type, self.length)); |
1363 | | |
1364 | 8.13k | ::hilti::rt::debug::dedent("spicy"sv); |
1365 | | // End parsing production: Block: switch_5_case_16 -> Resolved_32; |
1366 | 8.13k | } |
1367 | | |
1368 | 216k | else if ( _x == "tIME"_b ) { |
1369 | 1.69k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:33:9-33:31"); |
1370 | 1.69k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:33:9-33:31"); |
1371 | | |
1372 | | // Begin parsing production: Block: switch_5_case_17 -> Resolved_33; |
1373 | 1.69k | ::hilti::rt::debug::indent("spicy"sv); |
1374 | 1.69k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:181:13-188:1"); |
1375 | | |
1376 | | // Begin parsing production: Unit: PNG__tIME_2 -> year_2 month_2 day_2 hour_2 minute_2 second_2; |
1377 | 1.69k | (*_self).ttime.valueOrInit() = (hlt_internal_PNG_File::PNG::tIME()); |
1378 | 1.69k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*(*_self).ttime.value())._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1379 | | // End parsing production: Unit: PNG__tIME_2 -> year_2 month_2 day_2 hour_2 minute_2 second_2; |
1380 | | |
1381 | 1.69k | ::hilti::rt::debug::dedent("spicy"sv); |
1382 | | // End parsing production: Block: switch_5_case_17 -> Resolved_33; |
1383 | 1.69k | } |
1384 | | |
1385 | 214k | else { |
1386 | 214k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:35:9-35:44"); |
1387 | 214k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:35:9-35:44"); |
1388 | | |
1389 | | // Begin parsing production: Block: switch_5_default -> _anon_6_2; |
1390 | 214k | ::hilti::rt::debug::indent("spicy"sv); |
1391 | 214k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:35:14-35:44"); |
1392 | | |
1393 | | // Begin parsing production: Skip: _anon_6_2 -> skip: _anon_6; |
1394 | 214k | ::hilti::rt::integer::safe<uint64_t> _size = ::hilti::rt::integer::safe<uint64_t>((*_self).length.value()); |
1395 | 214k | ::hilti::rt::stream::View _limited_ = _cur.limit(_size); |
1396 | 214k | ::hilti::rt::stream::View _ncur = _cur.advance(_size); |
1397 | 214k | ::hilti::rt::integer::safe<uint64_t> _skip = ::hilti::rt::integer::safe<uint64_t>((*_self).length.value()); |
1398 | 217k | while ( _skip > ::hilti::rt::integer::safe<std::uint64_t>{0U} ) { |
1399 | 2.44k | ::spicy::rt::detail::waitForInput(_data, _limited_, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "not enough bytes for skipping"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:35:14-35:44"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1400 | 2.44k | ::hilti::rt::integer::safe<uint64_t> _consume = (_limited_.size() <= _skip ? _limited_.size() : _skip); |
1401 | 2.44k | _limited_ = _limited_.advance(_consume); |
1402 | 2.44k | if ( _trim ) { |
1403 | 2.12k | (*_data).trim(_limited_.begin()); |
1404 | 2.12k | } |
1405 | | |
1406 | 2.44k | _skip = _skip - _consume; |
1407 | 2.44k | } |
1408 | | |
1409 | 214k | if ( _limited_.offset() < _ncur.offset() ) { |
1410 | 0 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:35:27-35:43"); |
1411 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("&size amount not consumed: expected %lu bytes, but got %lu bytes"sv, _size, _limited_.offset() - (_ncur.offset() - _size)), "/src/spicy/spicy-png/analyzer/analyzer.spicy:35:27-35:43"); |
1412 | 0 | } |
1413 | | |
1414 | | // End parsing production: Skip: _anon_6_2 -> skip: _anon_6; |
1415 | | |
1416 | 214k | _cur = _ncur; |
1417 | 214k | ::hilti::rt::debug::dedent("spicy"sv); |
1418 | | // End parsing production: Block: switch_5_default -> _anon_6_2; |
1419 | 214k | } |
1420 | | |
1421 | 275k | ::hilti::rt::debug::dedent("spicy"sv); |
1422 | 275k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
1423 | 275k | } |
1424 | | |
1425 | 3.67k | auto hlt_internal_PNG_File::PNG::File::_parse_PNG__File_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::stream::SafeConstIterator& _begin, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1426 | 3.67k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _lhs_5; |
1427 | 3.67k | auto _self = File::_self(); |
1428 | 3.67k | ::hilti::rt::detail::checkStack(); |
1429 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:5:20-9:1"); |
1430 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:6:16-6:20"); |
1431 | | |
1432 | | // Begin parsing production: Variable: signature -> bytes; |
1433 | 3.67k | (*_self).signature.valueOrInit() = ::spicy::rt::detail::extractBytes(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{8U}, ::hilti::rt::Bool(false), "/src/spicy/spicy-png/analyzer/analyzer.spicy:6:5-6:83"sv, (_lhs_5=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1434 | 3.67k | _cur = _cur.advance(::hilti::rt::integer::safe<std::uint64_t>{8U}); |
1435 | 3.67k | if ( _trim ) { |
1436 | 3.66k | (*_data).trim(_cur.begin()); |
1437 | 3.66k | } |
1438 | | |
1439 | | // End parsing production: Variable: signature -> bytes; |
1440 | | |
1441 | 3.67k | ::hilti::rt::Bytes _dd = (*_self).signature.value(); |
1442 | 3.67k | ::hilti::rt::Result<::hilti::rt::Nothing> _requires = ((_dd == "\211PNG\015\012\032\012"_b) ? ::hilti::rt::make_result(::hilti::rt::Nothing{}) : ::hilti::rt::result::Error("&requires failed: ($$ == b\"\\x89PNG\\x0d\\x0a\\x1a\\x0a\")")); |
1443 | 3.67k | if ( ! (::hilti::rt::Bool(static_cast<bool>(_requires))) ) { |
1444 | 79 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:6:30-6:82"); |
1445 | 79 | throw ::spicy::rt::ParseError(_requires.errorOrThrow(), "/src/spicy/spicy-png/analyzer/analyzer.spicy:6:30-6:82"); |
1446 | 79 | } |
1447 | | |
1448 | 3.59k | ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::Chunk>> _transient__anon_2; |
1449 | 3.59k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:8:5-8:25"); |
1450 | | |
1451 | | // Begin parsing production: ForEach: _anon_2 -> foreach: Resolved_2; |
1452 | 3.59k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*_self)._parse__anon_2_stage1(_data, _begin, _cur, _trim, _lah, _lahe, _error, _transient__anon_2)); |
1453 | | // End parsing production: ForEach: _anon_2 -> foreach: Resolved_2; |
1454 | | |
1455 | 3.59k | ::hilti::rt::debug::dedent("spicy"sv); |
1456 | 3.59k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
1457 | 3.67k | } |
1458 | | |
1459 | 3.58k | auto hlt_internal_PNG_File::PNG::File::_parse__anon_2_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::stream::SafeConstIterator& _begin, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error, ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::Chunk>>& _dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1460 | 3.58k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _lhs_6; |
1461 | 3.58k | auto _self = File::_self(); |
1462 | 3.58k | ::hilti::rt::detail::checkStack(); |
1463 | 3.58k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:8:5-8:25"); |
1464 | 279k | while ( ! (::spicy::rt::detail::atEod(_data, _cur, (_lhs_6=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>())))) ) { |
1465 | 276k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _lhs_7; |
1466 | 276k | ::hilti::rt::stream::SafeConstIterator _old_begin = _cur.begin(); |
1467 | 276k | ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::Chunk> _elem; |
1468 | 276k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:11:14-43:1"); |
1469 | | |
1470 | | // Begin parsing production: Unit: PNG__Chunk -> length chunk_type switch crc (field '_anon', id n/a, parser, args: (self)) (container '_anon_2'); |
1471 | 276k | _elem = (hlt_internal_PNG_File::PNG::Chunk(::hilti::rt::struct_::tag::Parameters(), _self)); |
1472 | 276k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*_elem)._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1473 | | // End parsing production: Unit: PNG__Chunk -> length chunk_type switch crc (field '_anon', id n/a, parser, args: (self)) (container '_anon_2'); |
1474 | | |
1475 | 276k | if ( (_cur.begin() == _old_begin) && (! (::spicy::rt::detail::atEod(_data, _cur, (_lhs_7=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))))) ) { |
1476 | 0 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:8:5-8:25"); |
1477 | 0 | throw ::spicy::rt::ParseError("loop body did not change input position, possible infinite loop"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:8:5-8:25"); |
1478 | 0 | } |
1479 | 276k | } |
1480 | | |
1481 | 3.58k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
1482 | 3.58k | } |
1483 | | |
1484 | 3.67k | auto hlt_internal_PNG_File::PNG::File::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::stream::SafeConstIterator& _begin, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1485 | 3.67k | auto _self = File::_self(); |
1486 | 3.67k | ::hilti::rt::detail::checkStack(); |
1487 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:5:20-9:1"); |
1488 | 3.67k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
1489 | 3.67k | ::hilti::rt::debug::indent("spicy"sv); |
1490 | 3.67k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
1491 | 3.67k | _result = (*_self)._parse_PNG__File_stage2(_data, _begin_, _cur, _trim, _lah, _lahe, _error); |
1492 | 3.67k | return _result; |
1493 | 3.67k | } |
1494 | | |
1495 | 3.67k | extern auto hlt_internal_PNG_File::PNG::File::parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _context) -> ::hilti::rt::stream::View { |
1496 | 3.67k | ::hilti::rt::detail::checkStack(); |
1497 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:5:20-9:1"); |
1498 | 3.67k | ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::File> _unit = ::hilti::rt::reference::make_value<hlt_internal_PNG_File::PNG::File>((hlt_internal_PNG_File::PNG::File())); |
1499 | 3.67k | ::hilti::rt::stream::View _ncur = (_cur ? _cur.value() : (*_data).view()); |
1500 | 3.67k | ::hilti::rt::integer::safe<int64_t> _lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1501 | 3.67k | ::hilti::rt::stream::SafeConstIterator _lahead_end; |
1502 | 3.67k | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>(); |
1503 | 3.67k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:5:20-9:1"); |
1504 | | |
1505 | | // Begin parsing production: Unit: PNG__File -> signature _anon_2; |
1506 | 3.67k | ::hilti::rt::tuple::assign(std::tie(_ncur, _lahead, _lahead_end, _error), (*_unit)._parse_stage1(_data, _ncur.begin(), _ncur, ::hilti::rt::Bool(true), _lahead, _lahead_end, _error)); |
1507 | | // End parsing production: Unit: PNG__File -> signature _anon_2; |
1508 | | |
1509 | 3.67k | if ( _error.hasValue() ) { |
1510 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_error.value())), ::hilti::rt::exception::where(_error.value())); |
1511 | 0 | } |
1512 | | |
1513 | 3.67k | return _ncur; |
1514 | 3.67k | } |
1515 | | |
1516 | 0 | extern auto hlt_internal_PNG_File::PNG::File::parse2(::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::File>& _unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _context) -> ::hilti::rt::stream::View { |
1517 | 0 | ::hilti::rt::detail::checkStack(); |
1518 | 0 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:5:20-9:1"); |
1519 | 0 | ::hilti::rt::stream::View _ncur = (_cur ? _cur.value() : (*_data).view()); |
1520 | 0 | ::hilti::rt::integer::safe<int64_t> _lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1521 | 0 | ::hilti::rt::stream::SafeConstIterator _lahead_end; |
1522 | 0 | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>(); |
1523 | 0 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:5:20-9:1"); |
1524 | | |
1525 | | // Begin parsing production: Unit: PNG__File -> signature _anon_2; |
1526 | 0 | ::hilti::rt::tuple::assign(std::tie(_ncur, _lahead, _lahead_end, _error), (*_unit)._parse_stage1(_data, _ncur.begin(), _ncur, ::hilti::rt::Bool(true), _lahead, _lahead_end, _error)); |
1527 | | // End parsing production: Unit: PNG__File -> signature _anon_2; |
1528 | |
|
1529 | 0 | if ( _error.hasValue() ) { |
1530 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_error.value())), ::hilti::rt::exception::where(_error.value())); |
1531 | 0 | } |
1532 | | |
1533 | 0 | return _ncur; |
1534 | 0 | } |
1535 | | |
1536 | 0 | extern auto hlt_internal_PNG_File::PNG::File::parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _context) -> ::hilti::rt::stream::View { |
1537 | 0 | ::hilti::rt::detail::checkStack(); |
1538 | 0 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:5:20-9:1"); |
1539 | 0 | ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::File> _unit = ::hilti::rt::reference::make_value<hlt_internal_PNG_File::PNG::File>((hlt_internal_PNG_File::PNG::File())); |
1540 | 0 | ::spicy::rt::ParsedUnit::initialize((*_gunit), _unit, &type_info::_ti_value_ref_PNG__File__value_refx2anamex2aPNG__Filex2bx2b); |
1541 | 0 | ::hilti::rt::stream::View _ncur = (_cur ? _cur.value() : (*_data).view()); |
1542 | 0 | ::hilti::rt::integer::safe<int64_t> _lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1543 | 0 | ::hilti::rt::stream::SafeConstIterator _lahead_end; |
1544 | 0 | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>(); |
1545 | 0 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:5:20-9:1"); |
1546 | | |
1547 | | // Begin parsing production: Unit: PNG__File -> signature _anon_2; |
1548 | 0 | ::hilti::rt::tuple::assign(std::tie(_ncur, _lahead, _lahead_end, _error), (*_unit)._parse_stage1(_data, _ncur.begin(), _ncur, ::hilti::rt::Bool(true), _lahead, _lahead_end, _error)); |
1549 | | // End parsing production: Unit: PNG__File -> signature _anon_2; |
1550 | |
|
1551 | 0 | if ( _error.hasValue() ) { |
1552 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_error.value())), ::hilti::rt::exception::where(_error.value())); |
1553 | 0 | } |
1554 | | |
1555 | 0 | return _ncur; |
1556 | 0 | } |
1557 | | |
1558 | 4.38k | inline void hlt_internal_PNG_File::PNG::IHDR::_on_0x25_done() { |
1559 | 4.38k | auto _self = PNG::IHDR::_self(); |
1560 | 4.38k | return hlt_internal_PNG_File::PNG::_hook_IHDR__on_0x25_done(_self); |
1561 | 4.38k | } |
1562 | | |
1563 | 4.49k | auto hlt_internal_PNG_File::PNG::IHDR::_parse_PNG__IHDR_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1564 | 4.49k | auto _self = IHDR::_self(); |
1565 | 4.49k | ::hilti::rt::detail::checkStack(); |
1566 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:45:13-57:1"); |
1567 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:46:12-46:17"); |
1568 | | |
1569 | | // Begin parsing production: Variable: width_3 -> uint<32>; |
1570 | 4.49k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:46:12-46:17"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1571 | 4.49k | ::hilti::rt::tuple::assign(std::tie((*_self).width.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1572 | 4.49k | if ( _trim ) { |
1573 | 4.44k | (*_data).trim(_cur.begin()); |
1574 | 4.44k | } |
1575 | | |
1576 | | // End parsing production: Variable: width_3 -> uint<32>; |
1577 | | |
1578 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:47:13-47:18"); |
1579 | | |
1580 | | // Begin parsing production: Variable: height_3 -> uint<32>; |
1581 | 4.49k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:47:13-47:18"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1582 | 4.49k | ::hilti::rt::tuple::assign(std::tie((*_self).height.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1583 | 4.49k | if ( _trim ) { |
1584 | 4.43k | (*_data).trim(_cur.begin()); |
1585 | 4.43k | } |
1586 | | |
1587 | | // End parsing production: Variable: height_3 -> uint<32>; |
1588 | | |
1589 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:48:16-48:20"); |
1590 | | |
1591 | | // Begin parsing production: Variable: bit_depth_3 -> uint<8>; |
1592 | 4.49k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:48:16-48:20"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1593 | 4.49k | ::hilti::rt::tuple::assign(std::tie((*_self).bit_depth.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1594 | 4.49k | if ( _trim ) { |
1595 | 4.42k | (*_data).trim(_cur.begin()); |
1596 | 4.42k | } |
1597 | | |
1598 | | // End parsing production: Variable: bit_depth_3 -> uint<8>; |
1599 | | |
1600 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:49:18-49:22"); |
1601 | | |
1602 | | // Begin parsing production: Variable: colour_type_3 -> uint<8>; |
1603 | 4.49k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:49:18-49:22"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1604 | 4.49k | ::hilti::rt::tuple::assign(std::tie((*_self).colour_type.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1605 | 4.49k | if ( _trim ) { |
1606 | 4.41k | (*_data).trim(_cur.begin()); |
1607 | 4.41k | } |
1608 | | |
1609 | | // End parsing production: Variable: colour_type_3 -> uint<8>; |
1610 | | |
1611 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:50:25-50:29"); |
1612 | | |
1613 | | // Begin parsing production: Variable: compression_method_9 -> uint<8>; |
1614 | 4.49k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:50:25-50:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1615 | 4.49k | ::hilti::rt::tuple::assign(std::tie((*_self).compression_method.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1616 | 4.49k | if ( _trim ) { |
1617 | 4.40k | (*_data).trim(_cur.begin()); |
1618 | 4.40k | } |
1619 | | |
1620 | | // End parsing production: Variable: compression_method_9 -> uint<8>; |
1621 | | |
1622 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:51:20-51:24"); |
1623 | | |
1624 | | // Begin parsing production: Variable: filter_method_3 -> uint<8>; |
1625 | 4.49k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:51:20-51:24"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1626 | 4.49k | ::hilti::rt::tuple::assign(std::tie((*_self).filter_method.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1627 | 4.49k | if ( _trim ) { |
1628 | 4.39k | (*_data).trim(_cur.begin()); |
1629 | 4.39k | } |
1630 | | |
1631 | | // End parsing production: Variable: filter_method_3 -> uint<8>; |
1632 | | |
1633 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:52:23-52:27"); |
1634 | | |
1635 | | // Begin parsing production: Variable: interlace_method_3 -> uint<8>; |
1636 | 4.49k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:52:23-52:27"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1637 | 4.49k | ::hilti::rt::tuple::assign(std::tie((*_self).interlace_method.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1638 | 4.49k | if ( _trim ) { |
1639 | 4.38k | (*_data).trim(_cur.begin()); |
1640 | 4.38k | } |
1641 | | |
1642 | | // End parsing production: Variable: interlace_method_3 -> uint<8>; |
1643 | | |
1644 | 4.49k | (*_self)._error = _error; |
1645 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:45:13-57:1"); |
1646 | 4.49k | (*_self)._on_0x25_done(); |
1647 | 4.49k | _error = (*_self)._error; |
1648 | 4.49k | ::hilti::rt::debug::dedent("spicy"sv); |
1649 | 4.49k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
1650 | 4.49k | } |
1651 | | |
1652 | 4.49k | auto hlt_internal_PNG_File::PNG::IHDR::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1653 | 4.49k | auto _self = IHDR::_self(); |
1654 | 4.49k | ::hilti::rt::detail::checkStack(); |
1655 | 4.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:45:13-57:1"); |
1656 | 4.49k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
1657 | 4.49k | ::hilti::rt::debug::indent("spicy"sv); |
1658 | 4.49k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
1659 | 4.49k | _result = (*_self)._parse_PNG__IHDR_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
1660 | 4.49k | return _result; |
1661 | 4.49k | } |
1662 | | |
1663 | 5.73k | auto hlt_internal_PNG_File::PNG::PLTE::_parse_PNG__PLTE_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1664 | 5.73k | auto _self = PLTE::_self(); |
1665 | 5.73k | ::hilti::rt::detail::checkStack(); |
1666 | 5.73k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:60:13-62:1"); |
1667 | 5.73k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:61:5-61:36"); |
1668 | | |
1669 | | // Begin parsing production: Counter: entries_3 -> counter(length / 3): Resolved_36; |
1670 | 5.73k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*_self)._parse_entries_3_stage1(_data, _cur, _trim, _lah, _lahe, _error, (*_self).entries.valueOrInit())); |
1671 | | // End parsing production: Counter: entries_3 -> counter(length / 3): Resolved_36; |
1672 | | |
1673 | 5.73k | ::hilti::rt::debug::dedent("spicy"sv); |
1674 | 5.73k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
1675 | 5.73k | } |
1676 | | |
1677 | 5.73k | auto hlt_internal_PNG_File::PNG::PLTE::_parse_entries_3_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error, ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::PLTE_ENTRY>>& _dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1678 | 5.73k | auto _self = PLTE::_self(); |
1679 | 5.73k | ::hilti::rt::detail::checkStack(); |
1680 | 5.73k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:61:5-61:36"); |
1681 | 5.73k | ::hilti::rt::integer::safe<uint64_t> _repeat = ::hilti::rt::integer::safe<uint64_t>(_self->_p_length / ::hilti::rt::integer::safe<std::uint32_t>{3U}); |
1682 | 5.73k | _dst.reserve((::hilti::rt::integer::safe<std::uint64_t>{128U} <= _repeat ? ::hilti::rt::integer::safe<std::uint64_t>{128U} : _repeat)); |
1683 | 874k | for ( ::hilti::rt::integer::safe<uint64_t> _i = _repeat; ::hilti::rt::Bool(static_cast<bool>(_i)); ) { |
1684 | 868k | _i--; |
1685 | 868k | ::hilti::rt::ValueReference<hlt_internal_PNG_File::PNG::PLTE_ENTRY> _elem; |
1686 | 868k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:64:19-68:1"); |
1687 | | |
1688 | | // Begin parsing production: Unit: PNG__PLTE_ENTRY_3 -> red_5 green_5 blue_5 (container 'entries'); |
1689 | 868k | _elem = (hlt_internal_PNG_File::PNG::PLTE_ENTRY()); |
1690 | 868k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*_elem)._parse_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1691 | | // End parsing production: Unit: PNG__PLTE_ENTRY_3 -> red_5 green_5 blue_5 (container 'entries'); |
1692 | | |
1693 | 868k | _dst.emplace_back(_elem); |
1694 | 868k | } |
1695 | | |
1696 | 5.73k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
1697 | 5.73k | } |
1698 | | |
1699 | 5.73k | auto hlt_internal_PNG_File::PNG::PLTE::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1700 | 5.73k | auto _self = PLTE::_self(); |
1701 | 5.73k | ::hilti::rt::detail::checkStack(); |
1702 | 5.73k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:60:13-62:1"); |
1703 | 5.73k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
1704 | 5.73k | ::hilti::rt::debug::indent("spicy"sv); |
1705 | 5.73k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
1706 | 5.73k | _result = (*_self)._parse_PNG__PLTE_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
1707 | 5.73k | return _result; |
1708 | 5.73k | } |
1709 | | |
1710 | 868k | auto hlt_internal_PNG_File::PNG::PLTE_ENTRY::_parse_PNG__PLTE_ENTRY_4_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1711 | 868k | auto _self = PLTE_ENTRY::_self(); |
1712 | 868k | ::hilti::rt::detail::checkStack(); |
1713 | 868k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:64:19-68:1"); |
1714 | 868k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:65:10-65:14"); |
1715 | | |
1716 | | // Begin parsing production: Variable: red_6 -> uint<8>; |
1717 | 868k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:65:10-65:14"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1718 | 868k | ::hilti::rt::tuple::assign(std::tie((*_self).red.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1719 | 868k | if ( _trim ) { |
1720 | 868k | (*_data).trim(_cur.begin()); |
1721 | 868k | } |
1722 | | |
1723 | | // End parsing production: Variable: red_6 -> uint<8>; |
1724 | | |
1725 | 868k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:66:12-66:16"); |
1726 | | |
1727 | | // Begin parsing production: Variable: green_6 -> uint<8>; |
1728 | 868k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:66:12-66:16"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1729 | 868k | ::hilti::rt::tuple::assign(std::tie((*_self).green.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1730 | 868k | if ( _trim ) { |
1731 | 868k | (*_data).trim(_cur.begin()); |
1732 | 868k | } |
1733 | | |
1734 | | // End parsing production: Variable: green_6 -> uint<8>; |
1735 | | |
1736 | 868k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:67:11-67:15"); |
1737 | | |
1738 | | // Begin parsing production: Variable: blue_6 -> uint<8>; |
1739 | 868k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:67:11-67:15"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1740 | 868k | ::hilti::rt::tuple::assign(std::tie((*_self).blue.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1741 | 868k | if ( _trim ) { |
1742 | 868k | (*_data).trim(_cur.begin()); |
1743 | 868k | } |
1744 | | |
1745 | | // End parsing production: Variable: blue_6 -> uint<8>; |
1746 | | |
1747 | 868k | ::hilti::rt::debug::dedent("spicy"sv); |
1748 | 868k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
1749 | 868k | } |
1750 | | |
1751 | 868k | auto hlt_internal_PNG_File::PNG::PLTE_ENTRY::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1752 | 868k | auto _self = PLTE_ENTRY::_self(); |
1753 | 868k | ::hilti::rt::detail::checkStack(); |
1754 | 868k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:64:19-68:1"); |
1755 | 868k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
1756 | 868k | ::hilti::rt::debug::indent("spicy"sv); |
1757 | 868k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
1758 | 868k | _result = (*_self)._parse_PNG__PLTE_ENTRY_4_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
1759 | 868k | return _result; |
1760 | 868k | } |
1761 | | |
1762 | 4.38k | extern void hlt_internal_PNG_File::PNG::_hook_IHDR__on_0x25_done_bfc2(::hilti::rt::ValueReference<IHDR>& _self) { |
1763 | 4.38k | ::hilti::rt::detail::checkStack(); |
1764 | 4.38k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:55:9-55:42"); |
1765 | 4.38k | (*_self->_p_top.derefAsValue()).colour_type = (*_self).colour_type.value(); |
1766 | 4.38k | } |
1767 | | |
1768 | 1 | extern void hlt_internal_PNG_File::PNG::_init_module() { |
1769 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_Chunk(); |
1770 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_File(); |
1771 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_IHDR(); |
1772 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_PLTE(); |
1773 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_PLTE_ENTRY(); |
1774 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_bKGD(); |
1775 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_cHRM(); |
1776 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_gAMA(); |
1777 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_iCCP(); |
1778 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_iTXt(); |
1779 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_pHYs(); |
1780 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_sBIT(); |
1781 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_sRGB(); |
1782 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_tEXt(); |
1783 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_tIME(); |
1784 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_tRNS(); |
1785 | 1 | hlt_internal_PNG_File::PNG::_register_PNG_zTXt(); |
1786 | 1 | } |
1787 | | |
1788 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_Chunk() { ::hilti::rt::detail::checkStack(); } |
1789 | | |
1790 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_File() { |
1791 | 1 | ::hilti::rt::detail::checkStack(); |
1792 | 1 | PNG::File::_parser = ::spicy::rt::Parser(::hilti::rt::struct_::tag::Inits(), "PNG::File"sv, ::hilti::rt::Bool(true), hlt_PNG_File::PNG::File::parse1, hlt_PNG_File::PNG::File::parse2, hlt_PNG_File::PNG::File::parse3, ::hilti::rt::Null(), &type_info::_ti_PNG__File_namex2aPNG__Filex2b, ""s, ::hilti::rt::Vector<::spicy::rt::MIMEType>({}), ::hilti::rt::Vector<::spicy::rt::ParserPort>({})); |
1793 | 1 | ::spicy::rt::detail::registerParser(PNG::File::_parser, hlt_internal_PNG_File_hlto_scope, ::hilti::rt::StrongReference<hlt_internal_PNG_File::PNG::File>(), &type_info::_ti_strong_ref_const_PNG__File__strong_refx2anamex2aPNG__Filex2bx2b); |
1794 | 1 | } |
1795 | | |
1796 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_IHDR() { ::hilti::rt::detail::checkStack(); } |
1797 | | |
1798 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_PLTE() { ::hilti::rt::detail::checkStack(); } |
1799 | | |
1800 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_PLTE_ENTRY() { ::hilti::rt::detail::checkStack(); } |
1801 | | |
1802 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_bKGD() { ::hilti::rt::detail::checkStack(); } |
1803 | | |
1804 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_cHRM() { ::hilti::rt::detail::checkStack(); } |
1805 | | |
1806 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_gAMA() { ::hilti::rt::detail::checkStack(); } |
1807 | | |
1808 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_iCCP() { ::hilti::rt::detail::checkStack(); } |
1809 | | |
1810 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_iTXt() { ::hilti::rt::detail::checkStack(); } |
1811 | | |
1812 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_pHYs() { ::hilti::rt::detail::checkStack(); } |
1813 | | |
1814 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_sBIT() { ::hilti::rt::detail::checkStack(); } |
1815 | | |
1816 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_sRGB() { ::hilti::rt::detail::checkStack(); } |
1817 | | |
1818 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_tEXt() { ::hilti::rt::detail::checkStack(); } |
1819 | | |
1820 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_tIME() { ::hilti::rt::detail::checkStack(); } |
1821 | | |
1822 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_tRNS() { ::hilti::rt::detail::checkStack(); } |
1823 | | |
1824 | 1 | extern void hlt_internal_PNG_File::PNG::_register_PNG_zTXt() { ::hilti::rt::detail::checkStack(); } |
1825 | | |
1826 | 2 | extern void hlt_internal_PNG_File::PNG::_register_module() { |
1827 | 2 | ::hilti::rt::Library::setScope(&hlt_internal_PNG_File_hlto_scope); |
1828 | 2 | ::hilti::rt::detail::registerModule({ "PNG", hlt_internal_PNG_File_hlto_scope, &_init_module, nullptr, nullptr, nullptr}); |
1829 | 2 | } |
1830 | | |
1831 | 4.13k | auto hlt_internal_PNG_File::PNG::bKGD::_parse_PNG__bKGD_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1832 | 4.13k | auto _self = bKGD::_self(); |
1833 | 4.13k | ::hilti::rt::detail::checkStack(); |
1834 | 4.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:153:13-165:1"); |
1835 | 4.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:154:5-164:6"); |
1836 | | |
1837 | | // Begin parsing production: Switch: switch_10 -> [0,4] -> switch_10_case_1 | [2,6] -> switch_10_case_2 | [3] -> switch_10_case_3; |
1838 | 4.13k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*_self)._parse_switch_10_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
1839 | | // End parsing production: Switch: switch_10 -> [0,4] -> switch_10_case_1 | [2,6] -> switch_10_case_2 | [3] -> switch_10_case_3; |
1840 | | |
1841 | 4.13k | ::hilti::rt::debug::dedent("spicy"sv); |
1842 | 4.13k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
1843 | 4.13k | } |
1844 | | |
1845 | 4.13k | auto hlt_internal_PNG_File::PNG::bKGD::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1846 | 4.13k | auto _self = bKGD::_self(); |
1847 | 4.13k | ::hilti::rt::detail::checkStack(); |
1848 | 4.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:153:13-165:1"); |
1849 | 4.13k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
1850 | 4.13k | ::hilti::rt::debug::indent("spicy"sv); |
1851 | 4.13k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
1852 | 4.13k | _result = (*_self)._parse_PNG__bKGD_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
1853 | 4.13k | return _result; |
1854 | 4.13k | } |
1855 | | |
1856 | 4.13k | auto hlt_internal_PNG_File::PNG::bKGD::_parse_switch_10_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1857 | 4.13k | auto _self = bKGD::_self(); |
1858 | 4.13k | ::hilti::rt::detail::checkStack(); |
1859 | 4.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:154:5-164:6"); |
1860 | 4.13k | ::hilti::rt::debug::indent("spicy"sv); |
1861 | 4.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:154:5-164:6"); |
1862 | 4.13k | if ( ::hilti::rt::integer::safe<uint8_t> _x = _self->_p_colour_type; _x == ::hilti::rt::integer::safe<std::uint8_t>{0U} || _x == ::hilti::rt::integer::safe<std::uint8_t>{4U} ) { |
1863 | 744 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:155:9-156:31"); |
1864 | 744 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:155:9-156:31"); |
1865 | | |
1866 | | // Begin parsing production: Block: switch_10_case_1 -> greyscale_3; |
1867 | 744 | ::hilti::rt::debug::indent("spicy"sv); |
1868 | 744 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:156:25-156:30"); |
1869 | | |
1870 | | // Begin parsing production: Variable: greyscale_3 -> uint<16>; |
1871 | 744 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:156:25-156:30"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1872 | 744 | ::hilti::rt::tuple::assign(std::tie((*_self).greyscale.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint16_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1873 | 744 | if ( _trim ) { |
1874 | 706 | (*_data).trim(_cur.begin()); |
1875 | 706 | } |
1876 | | |
1877 | | // End parsing production: Variable: greyscale_3 -> uint<16>; |
1878 | | |
1879 | 744 | ::hilti::rt::debug::dedent("spicy"sv); |
1880 | | // End parsing production: Block: switch_10_case_1 -> greyscale_3; |
1881 | 744 | } |
1882 | | |
1883 | 3.38k | else if ( _x == ::hilti::rt::integer::safe<std::uint8_t>{2U} || _x == ::hilti::rt::integer::safe<std::uint8_t>{6U} ) { |
1884 | 876 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:157:9-162:9"); |
1885 | 876 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:157:9-162:9"); |
1886 | | |
1887 | | // Begin parsing production: Block: switch_10_case_2 -> red_7 green_7 blue_7; |
1888 | 876 | ::hilti::rt::debug::indent("spicy"sv); |
1889 | 876 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:159:18-159:23"); |
1890 | | |
1891 | | // Begin parsing production: Variable: red_7 -> uint<16>; |
1892 | 876 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:159:18-159:23"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1893 | 876 | ::hilti::rt::tuple::assign(std::tie((*_self).red.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint16_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1894 | 876 | if ( _trim ) { |
1895 | 860 | (*_data).trim(_cur.begin()); |
1896 | 860 | } |
1897 | | |
1898 | | // End parsing production: Variable: red_7 -> uint<16>; |
1899 | | |
1900 | 876 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:160:20-160:25"); |
1901 | | |
1902 | | // Begin parsing production: Variable: green_7 -> uint<16>; |
1903 | 876 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:160:20-160:25"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1904 | 876 | ::hilti::rt::tuple::assign(std::tie((*_self).green.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint16_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1905 | 876 | if ( _trim ) { |
1906 | 853 | (*_data).trim(_cur.begin()); |
1907 | 853 | } |
1908 | | |
1909 | | // End parsing production: Variable: green_7 -> uint<16>; |
1910 | | |
1911 | 876 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:161:19-161:24"); |
1912 | | |
1913 | | // Begin parsing production: Variable: blue_7 -> uint<16>; |
1914 | 876 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:161:19-161:24"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1915 | 876 | ::hilti::rt::tuple::assign(std::tie((*_self).blue.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint16_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1916 | 876 | if ( _trim ) { |
1917 | 846 | (*_data).trim(_cur.begin()); |
1918 | 846 | } |
1919 | | |
1920 | | // End parsing production: Variable: blue_7 -> uint<16>; |
1921 | | |
1922 | 876 | ::hilti::rt::debug::dedent("spicy"sv); |
1923 | | // End parsing production: Block: switch_10_case_2 -> red_7 green_7 blue_7; |
1924 | 876 | } |
1925 | | |
1926 | 2.51k | else if ( _x == ::hilti::rt::integer::safe<std::uint8_t>{3U} ) { |
1927 | 2.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:163:9-163:34"); |
1928 | 2.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:163:9-163:34"); |
1929 | | |
1930 | | // Begin parsing production: Block: switch_10_case_3 -> palette_index_3; |
1931 | 2.49k | ::hilti::rt::debug::indent("spicy"sv); |
1932 | 2.49k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:163:29-163:33"); |
1933 | | |
1934 | | // Begin parsing production: Variable: palette_index_3 -> uint<8>; |
1935 | 2.49k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:163:29-163:33"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1936 | 2.49k | ::hilti::rt::tuple::assign(std::tie((*_self).palette_index.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1937 | 2.49k | if ( _trim ) { |
1938 | 2.48k | (*_data).trim(_cur.begin()); |
1939 | 2.48k | } |
1940 | | |
1941 | | // End parsing production: Variable: palette_index_3 -> uint<8>; |
1942 | | |
1943 | 2.49k | ::hilti::rt::debug::dedent("spicy"sv); |
1944 | | // End parsing production: Block: switch_10_case_3 -> palette_index_3; |
1945 | 2.49k | } |
1946 | | |
1947 | 15 | else { |
1948 | 15 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:154:5-164:6"); |
1949 | 15 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("no matching case in switch statement for value '%s'"sv, _self->_p_colour_type), "/src/spicy/spicy-png/analyzer/analyzer.spicy:154:5-164:6"); |
1950 | 15 | } |
1951 | | |
1952 | 4.11k | ::hilti::rt::debug::dedent("spicy"sv); |
1953 | 4.11k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
1954 | 4.13k | } |
1955 | | |
1956 | 2.63k | auto hlt_internal_PNG_File::PNG::cHRM::_parse_PNG__cHRM_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1957 | 2.63k | auto _self = cHRM::_self(); |
1958 | 2.63k | ::hilti::rt::detail::checkStack(); |
1959 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:108:13-117:1"); |
1960 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:109:20-109:25"); |
1961 | | |
1962 | | // Begin parsing production: Variable: white_point_x_3 -> uint<32>; |
1963 | 2.63k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:109:20-109:25"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1964 | 2.63k | ::hilti::rt::tuple::assign(std::tie((*_self).white_point_x.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1965 | 2.63k | if ( _trim ) { |
1966 | 2.58k | (*_data).trim(_cur.begin()); |
1967 | 2.58k | } |
1968 | | |
1969 | | // End parsing production: Variable: white_point_x_3 -> uint<32>; |
1970 | | |
1971 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:110:20-110:25"); |
1972 | | |
1973 | | // Begin parsing production: Variable: white_point_y_3 -> uint<32>; |
1974 | 2.63k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:110:20-110:25"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1975 | 2.63k | ::hilti::rt::tuple::assign(std::tie((*_self).white_point_y.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1976 | 2.63k | if ( _trim ) { |
1977 | 2.57k | (*_data).trim(_cur.begin()); |
1978 | 2.57k | } |
1979 | | |
1980 | | // End parsing production: Variable: white_point_y_3 -> uint<32>; |
1981 | | |
1982 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:111:12-111:17"); |
1983 | | |
1984 | | // Begin parsing production: Variable: red_x_3 -> uint<32>; |
1985 | 2.63k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:111:12-111:17"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1986 | 2.63k | ::hilti::rt::tuple::assign(std::tie((*_self).red_x.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1987 | 2.63k | if ( _trim ) { |
1988 | 2.56k | (*_data).trim(_cur.begin()); |
1989 | 2.56k | } |
1990 | | |
1991 | | // End parsing production: Variable: red_x_3 -> uint<32>; |
1992 | | |
1993 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:112:12-112:17"); |
1994 | | |
1995 | | // Begin parsing production: Variable: red_y_3 -> uint<32>; |
1996 | 2.63k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:112:12-112:17"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
1997 | 2.63k | ::hilti::rt::tuple::assign(std::tie((*_self).red_y.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
1998 | 2.63k | if ( _trim ) { |
1999 | 2.55k | (*_data).trim(_cur.begin()); |
2000 | 2.55k | } |
2001 | | |
2002 | | // End parsing production: Variable: red_y_3 -> uint<32>; |
2003 | | |
2004 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:113:14-113:19"); |
2005 | | |
2006 | | // Begin parsing production: Variable: green_x_3 -> uint<32>; |
2007 | 2.63k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:113:14-113:19"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2008 | 2.63k | ::hilti::rt::tuple::assign(std::tie((*_self).green_x.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2009 | 2.63k | if ( _trim ) { |
2010 | 2.55k | (*_data).trim(_cur.begin()); |
2011 | 2.55k | } |
2012 | | |
2013 | | // End parsing production: Variable: green_x_3 -> uint<32>; |
2014 | | |
2015 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:114:14-114:19"); |
2016 | | |
2017 | | // Begin parsing production: Variable: green_y_3 -> uint<32>; |
2018 | 2.63k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:114:14-114:19"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2019 | 2.63k | ::hilti::rt::tuple::assign(std::tie((*_self).green_y.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2020 | 2.63k | if ( _trim ) { |
2021 | 2.54k | (*_data).trim(_cur.begin()); |
2022 | 2.54k | } |
2023 | | |
2024 | | // End parsing production: Variable: green_y_3 -> uint<32>; |
2025 | | |
2026 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:115:13-115:18"); |
2027 | | |
2028 | | // Begin parsing production: Variable: blue_x_3 -> uint<32>; |
2029 | 2.63k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:115:13-115:18"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2030 | 2.63k | ::hilti::rt::tuple::assign(std::tie((*_self).blue_x.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2031 | 2.63k | if ( _trim ) { |
2032 | 2.53k | (*_data).trim(_cur.begin()); |
2033 | 2.53k | } |
2034 | | |
2035 | | // End parsing production: Variable: blue_x_3 -> uint<32>; |
2036 | | |
2037 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:116:13-116:18"); |
2038 | | |
2039 | | // Begin parsing production: Variable: blue_y_3 -> uint<32>; |
2040 | 2.63k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:116:13-116:18"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2041 | 2.63k | ::hilti::rt::tuple::assign(std::tie((*_self).blue_y.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2042 | 2.63k | if ( _trim ) { |
2043 | 2.52k | (*_data).trim(_cur.begin()); |
2044 | 2.52k | } |
2045 | | |
2046 | | // End parsing production: Variable: blue_y_3 -> uint<32>; |
2047 | | |
2048 | 2.63k | ::hilti::rt::debug::dedent("spicy"sv); |
2049 | 2.63k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2050 | 2.63k | } |
2051 | | |
2052 | 2.63k | auto hlt_internal_PNG_File::PNG::cHRM::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2053 | 2.63k | auto _self = cHRM::_self(); |
2054 | 2.63k | ::hilti::rt::detail::checkStack(); |
2055 | 2.63k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:108:13-117:1"); |
2056 | 2.63k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
2057 | 2.63k | ::hilti::rt::debug::indent("spicy"sv); |
2058 | 2.63k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
2059 | 2.63k | _result = (*_self)._parse_PNG__cHRM_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
2060 | 2.63k | return _result; |
2061 | 2.63k | } |
2062 | | |
2063 | 2.29k | auto hlt_internal_PNG_File::PNG::gAMA::_parse_PNG__gAMA_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2064 | 2.29k | auto _self = gAMA::_self(); |
2065 | 2.29k | ::hilti::rt::detail::checkStack(); |
2066 | 2.29k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:120:13-122:1"); |
2067 | 2.29k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:121:12-121:17"); |
2068 | | |
2069 | | // Begin parsing production: Variable: gamma_3 -> uint<32>; |
2070 | 2.29k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:121:12-121:17"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2071 | 2.29k | ::hilti::rt::tuple::assign(std::tie((*_self).gamma.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2072 | 2.29k | if ( _trim ) { |
2073 | 2.26k | (*_data).trim(_cur.begin()); |
2074 | 2.26k | } |
2075 | | |
2076 | | // End parsing production: Variable: gamma_3 -> uint<32>; |
2077 | | |
2078 | 2.29k | ::hilti::rt::debug::dedent("spicy"sv); |
2079 | 2.29k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2080 | 2.29k | } |
2081 | | |
2082 | 2.29k | auto hlt_internal_PNG_File::PNG::gAMA::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2083 | 2.29k | auto _self = gAMA::_self(); |
2084 | 2.29k | ::hilti::rt::detail::checkStack(); |
2085 | 2.29k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:120:13-122:1"); |
2086 | 2.29k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
2087 | 2.29k | ::hilti::rt::debug::indent("spicy"sv); |
2088 | 2.29k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
2089 | 2.29k | _result = (*_self)._parse_PNG__gAMA_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
2090 | 2.29k | return _result; |
2091 | 2.29k | } |
2092 | | |
2093 | 3.00k | auto hlt_internal_PNG_File::PNG::iCCP::_parse_PNG__iCCP_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2094 | 3.00k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _lhs_8; |
2095 | 3.00k | auto _self = iCCP::_self(); |
2096 | 3.00k | ::hilti::rt::detail::checkStack(); |
2097 | 3.00k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:71:13-75:1"); |
2098 | 3.00k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:72:19-72:23"); |
2099 | | |
2100 | | // Begin parsing production: Variable: profile_name_3 -> bytes; |
2101 | 3.00k | ::hilti::rt::Bytes _until_bytes = "\000"_b; |
2102 | 3.00k | ::hilti::rt::integer::safe<uint64_t> _until_bytes_sz = "\000"_b.size(); |
2103 | 3.00k | (*_self).profile_name.valueOrInit() = ""_b; |
2104 | 3.13k | while ( ::hilti::rt::Bool(true) ) { |
2105 | 3.05k | ::spicy::rt::detail::waitForInput(_data, _cur, _until_bytes_sz, "end-of-data reached before &until expression found"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:72:32-72:38"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2106 | 3.05k | ::hilti::rt::Bool found; |
2107 | 3.05k | ::hilti::rt::stream::SafeConstIterator it; |
2108 | 3.05k | ::hilti::rt::tuple::assign(std::tie(found, it), _cur.find(_until_bytes)); |
2109 | 3.05k | if ( ::hilti::rt::Bool(static_cast<bool>(_cur.sub(it).size())) ) { |
2110 | 765 | (*_self).profile_name.value().append(_cur.sub(it)); |
2111 | 765 | } |
2112 | | |
2113 | 3.05k | if ( found ) { |
2114 | 2.92k | _cur = _cur.advance(it + _until_bytes_sz); |
2115 | 2.92k | if ( _trim ) { |
2116 | 2.92k | (*_data).trim(_cur.begin()); |
2117 | 2.92k | } |
2118 | | |
2119 | 2.92k | break; |
2120 | 2.92k | } |
2121 | 128 | else { |
2122 | 128 | _cur = _cur.advance(it); |
2123 | 128 | if ( _trim ) { |
2124 | 46 | (*_data).trim(_cur.begin()); |
2125 | 46 | } |
2126 | 128 | } |
2127 | 3.05k | } |
2128 | | |
2129 | 3.00k | if ( _trim ) { |
2130 | 2.92k | (*_data).trim(_cur.begin()); |
2131 | 2.92k | } |
2132 | | |
2133 | | // End parsing production: Variable: profile_name_3 -> bytes; |
2134 | | |
2135 | 3.00k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:73:25-73:29"); |
2136 | | |
2137 | | // Begin parsing production: Variable: compression_method_10 -> uint<8>; |
2138 | 3.00k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:73:25-73:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2139 | 3.00k | ::hilti::rt::tuple::assign(std::tie((*_self).compression_method.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2140 | 3.00k | if ( _trim ) { |
2141 | 2.88k | (*_data).trim(_cur.begin()); |
2142 | 2.88k | } |
2143 | | |
2144 | | // End parsing production: Variable: compression_method_10 -> uint<8>; |
2145 | | |
2146 | 3.00k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:74:25-74:29"); |
2147 | | |
2148 | | // Begin parsing production: Variable: compressed_profile_3 -> bytes; |
2149 | 3.00k | ::hilti::rt::integer::safe<uint64_t> _size = ::hilti::rt::integer::safe<uint64_t>(_self->_p_length) - ((*_self).profile_name.value().size() + ::hilti::rt::integer::safe<std::uint64_t>{2U}); |
2150 | 3.00k | (*_self).compressed_profile.valueOrInit() = ::spicy::rt::detail::extractBytes(_data, _cur, _size, ::hilti::rt::Bool(false), "/src/spicy/spicy-png/analyzer/analyzer.spicy:74:5-74:71"sv, (_lhs_8=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2151 | 3.00k | _cur = _cur.advance(_size); |
2152 | 3.00k | if ( _trim ) { |
2153 | 2.79k | (*_data).trim(_cur.begin()); |
2154 | 2.79k | } |
2155 | | |
2156 | | // End parsing production: Variable: compressed_profile_3 -> bytes; |
2157 | | |
2158 | 3.00k | ::hilti::rt::debug::dedent("spicy"sv); |
2159 | 3.00k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2160 | 3.00k | } |
2161 | | |
2162 | 3.00k | auto hlt_internal_PNG_File::PNG::iCCP::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2163 | 3.00k | auto _self = iCCP::_self(); |
2164 | 3.00k | ::hilti::rt::detail::checkStack(); |
2165 | 3.00k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:71:13-75:1"); |
2166 | 3.00k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
2167 | 3.00k | ::hilti::rt::debug::indent("spicy"sv); |
2168 | 3.00k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
2169 | 3.00k | _result = (*_self)._parse_PNG__iCCP_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
2170 | 3.00k | return _result; |
2171 | 3.00k | } |
2172 | | |
2173 | 10.1k | auto hlt_internal_PNG_File::PNG::iTXt::_parse_PNG__iTXt_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2174 | 10.1k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _lhs_9; |
2175 | 10.1k | auto _self = iTXt::_self(); |
2176 | 10.1k | ::hilti::rt::detail::checkStack(); |
2177 | 10.1k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:85:13-92:1"); |
2178 | 10.1k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:86:14-86:18"); |
2179 | | |
2180 | | // Begin parsing production: Variable: keyword_7 -> bytes; |
2181 | 10.1k | ::hilti::rt::Bytes _until_bytes = "\000"_b; |
2182 | 10.1k | ::hilti::rt::integer::safe<uint64_t> _until_bytes_sz = "\000"_b.size(); |
2183 | 10.1k | (*_self).keyword.valueOrInit() = ""_b; |
2184 | 10.2k | while ( ::hilti::rt::Bool(true) ) { |
2185 | 10.1k | ::spicy::rt::detail::waitForInput(_data, _cur, _until_bytes_sz, "end-of-data reached before &until expression found"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:86:27-86:33"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2186 | 10.1k | ::hilti::rt::Bool found; |
2187 | 10.1k | ::hilti::rt::stream::SafeConstIterator it; |
2188 | 10.1k | ::hilti::rt::tuple::assign(std::tie(found, it), _cur.find(_until_bytes)); |
2189 | 10.1k | if ( ::hilti::rt::Bool(static_cast<bool>(_cur.sub(it).size())) ) { |
2190 | 1.09k | (*_self).keyword.value().append(_cur.sub(it)); |
2191 | 1.09k | } |
2192 | | |
2193 | 10.1k | if ( found ) { |
2194 | 10.1k | _cur = _cur.advance(it + _until_bytes_sz); |
2195 | 10.1k | if ( _trim ) { |
2196 | 10.1k | (*_data).trim(_cur.begin()); |
2197 | 10.1k | } |
2198 | | |
2199 | 10.1k | break; |
2200 | 10.1k | } |
2201 | 88 | else { |
2202 | 88 | _cur = _cur.advance(it); |
2203 | 88 | if ( _trim ) { |
2204 | 26 | (*_data).trim(_cur.begin()); |
2205 | 26 | } |
2206 | 88 | } |
2207 | 10.1k | } |
2208 | | |
2209 | 10.1k | if ( _trim ) { |
2210 | 10.1k | (*_data).trim(_cur.begin()); |
2211 | 10.1k | } |
2212 | | |
2213 | | // End parsing production: Variable: keyword_7 -> bytes; |
2214 | | |
2215 | 10.1k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:87:23-87:27"); |
2216 | | |
2217 | | // Begin parsing production: Variable: compression_flag_3 -> uint<8>; |
2218 | 10.1k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:87:23-87:27"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2219 | 10.1k | ::hilti::rt::tuple::assign(std::tie((*_self).compression_flag.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2220 | 10.1k | if ( _trim ) { |
2221 | 10.0k | (*_data).trim(_cur.begin()); |
2222 | 10.0k | } |
2223 | | |
2224 | | // End parsing production: Variable: compression_flag_3 -> uint<8>; |
2225 | | |
2226 | 10.1k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:88:25-88:29"); |
2227 | | |
2228 | | // Begin parsing production: Variable: compression_method_11 -> uint<8>; |
2229 | 10.1k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:88:25-88:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2230 | 10.1k | ::hilti::rt::tuple::assign(std::tie((*_self).compression_method.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2231 | 10.1k | if ( _trim ) { |
2232 | 10.0k | (*_data).trim(_cur.begin()); |
2233 | 10.0k | } |
2234 | | |
2235 | | // End parsing production: Variable: compression_method_11 -> uint<8>; |
2236 | | |
2237 | 10.1k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:89:19-89:23"); |
2238 | | |
2239 | | // Begin parsing production: Variable: language_tag_3 -> bytes; |
2240 | 10.1k | ::hilti::rt::Bytes _until_bytes_ = "\000"_b; |
2241 | 10.1k | ::hilti::rt::integer::safe<uint64_t> _until_bytes_sz_ = "\000"_b.size(); |
2242 | 10.1k | (*_self).language_tag.valueOrInit() = ""_b; |
2243 | 10.2k | while ( ::hilti::rt::Bool(true) ) { |
2244 | 10.0k | ::spicy::rt::detail::waitForInput(_data, _cur, _until_bytes_sz_, "end-of-data reached before &until expression found"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:89:32-89:38"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2245 | 10.0k | ::hilti::rt::Bool found_; |
2246 | 10.0k | ::hilti::rt::stream::SafeConstIterator it_; |
2247 | 10.0k | ::hilti::rt::tuple::assign(std::tie(found_, it_), _cur.find(_until_bytes_)); |
2248 | 10.0k | if ( ::hilti::rt::Bool(static_cast<bool>(_cur.sub(it_).size())) ) { |
2249 | 1.17k | (*_self).language_tag.value().append(_cur.sub(it_)); |
2250 | 1.17k | } |
2251 | | |
2252 | 10.0k | if ( found_ ) { |
2253 | 9.97k | _cur = _cur.advance(it_ + _until_bytes_sz_); |
2254 | 9.97k | if ( _trim ) { |
2255 | 9.97k | (*_data).trim(_cur.begin()); |
2256 | 9.97k | } |
2257 | | |
2258 | 9.97k | break; |
2259 | 9.97k | } |
2260 | 98 | else { |
2261 | 98 | _cur = _cur.advance(it_); |
2262 | 98 | if ( _trim ) { |
2263 | 44 | (*_data).trim(_cur.begin()); |
2264 | 44 | } |
2265 | 98 | } |
2266 | 10.0k | } |
2267 | | |
2268 | 10.1k | if ( _trim ) { |
2269 | 9.97k | (*_data).trim(_cur.begin()); |
2270 | 9.97k | } |
2271 | | |
2272 | | // End parsing production: Variable: language_tag_3 -> bytes; |
2273 | | |
2274 | 10.1k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:90:25-90:29"); |
2275 | | |
2276 | | // Begin parsing production: Variable: translated_keyword_3 -> bytes; |
2277 | 10.1k | ::hilti::rt::Bytes _until_bytes__ = "\000"_b; |
2278 | 10.1k | ::hilti::rt::integer::safe<uint64_t> _until_bytes_sz__ = "\000"_b.size(); |
2279 | 10.1k | (*_self).translated_keyword.valueOrInit() = ""_b; |
2280 | 10.3k | while ( ::hilti::rt::Bool(true) ) { |
2281 | 10.0k | ::spicy::rt::detail::waitForInput(_data, _cur, _until_bytes_sz__, "end-of-data reached before &until expression found"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:90:38-90:44"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2282 | 10.0k | ::hilti::rt::Bool found__; |
2283 | 10.0k | ::hilti::rt::stream::SafeConstIterator it__; |
2284 | 10.0k | ::hilti::rt::tuple::assign(std::tie(found__, it__), _cur.find(_until_bytes__)); |
2285 | 10.0k | if ( ::hilti::rt::Bool(static_cast<bool>(_cur.sub(it__).size())) ) { |
2286 | 1.35k | (*_self).translated_keyword.value().append(_cur.sub(it__)); |
2287 | 1.35k | } |
2288 | | |
2289 | 10.0k | if ( found__ ) { |
2290 | 9.87k | _cur = _cur.advance(it__ + _until_bytes_sz__); |
2291 | 9.87k | if ( _trim ) { |
2292 | 9.87k | (*_data).trim(_cur.begin()); |
2293 | 9.87k | } |
2294 | | |
2295 | 9.87k | break; |
2296 | 9.87k | } |
2297 | 133 | else { |
2298 | 133 | _cur = _cur.advance(it__); |
2299 | 133 | if ( _trim ) { |
2300 | 29 | (*_data).trim(_cur.begin()); |
2301 | 29 | } |
2302 | 133 | } |
2303 | 10.0k | } |
2304 | | |
2305 | 10.1k | if ( _trim ) { |
2306 | 9.87k | (*_data).trim(_cur.begin()); |
2307 | 9.87k | } |
2308 | | |
2309 | | // End parsing production: Variable: translated_keyword_3 -> bytes; |
2310 | | |
2311 | 10.1k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:91:11-91:15"); |
2312 | | |
2313 | | // Begin parsing production: Variable: text_3 -> bytes; |
2314 | 10.1k | ::hilti::rt::integer::safe<uint64_t> _size = ::hilti::rt::integer::safe<uint64_t>(_self->_p_length) - ((*_self).keyword.value().size() + (*_self).language_tag.value().size() + (*_self).translated_keyword.value().size() + ::hilti::rt::integer::safe<std::uint64_t>{5U}); |
2315 | 10.1k | (*_self).text.valueOrInit() = ::spicy::rt::detail::extractBytes(_data, _cur, _size, ::hilti::rt::Bool(false), "/src/spicy/spicy-png/analyzer/analyzer.spicy:91:5-91:102"sv, (_lhs_9=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2316 | 10.1k | _cur = _cur.advance(_size); |
2317 | 10.1k | if ( _trim ) { |
2318 | 9.60k | (*_data).trim(_cur.begin()); |
2319 | 9.60k | } |
2320 | | |
2321 | | // End parsing production: Variable: text_3 -> bytes; |
2322 | | |
2323 | 10.1k | ::hilti::rt::debug::dedent("spicy"sv); |
2324 | 10.1k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2325 | 10.1k | } |
2326 | | |
2327 | 10.1k | auto hlt_internal_PNG_File::PNG::iTXt::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2328 | 10.1k | auto _self = iTXt::_self(); |
2329 | 10.1k | ::hilti::rt::detail::checkStack(); |
2330 | 10.1k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:85:13-92:1"); |
2331 | 10.1k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
2332 | 10.1k | ::hilti::rt::debug::indent("spicy"sv); |
2333 | 10.1k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
2334 | 10.1k | _result = (*_self)._parse_PNG__iTXt_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
2335 | 10.1k | return _result; |
2336 | 10.1k | } |
2337 | | |
2338 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::PLTE_ENTRY& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2339 | | |
2340 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::PLTE& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2341 | | |
2342 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::bKGD& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2343 | | |
2344 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::cHRM& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2345 | | |
2346 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::gAMA& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2347 | | |
2348 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::iCCP& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2349 | | |
2350 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::iTXt& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2351 | | |
2352 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::pHYs& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2353 | | |
2354 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::sBIT& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2355 | | |
2356 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::sRGB& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2357 | | |
2358 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::tEXt& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2359 | | |
2360 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::tIME& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2361 | | |
2362 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::tRNS& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2363 | | |
2364 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::zTXt& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2365 | | |
2366 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::IHDR& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2367 | | |
2368 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::File& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2369 | | |
2370 | 0 | extern auto hlt_internal_PNG_File::PNG::operator<<(std::ostream& o, const hlt_internal_PNG_File::PNG::Chunk& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
2371 | | |
2372 | 1.65k | auto hlt_internal_PNG_File::PNG::pHYs::_parse_PNG__pHYs_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2373 | 1.65k | auto _self = pHYs::_self(); |
2374 | 1.65k | ::hilti::rt::detail::checkStack(); |
2375 | 1.65k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:78:13-82:1"); |
2376 | 1.65k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:79:11-79:16"); |
2377 | | |
2378 | | // Begin parsing production: Variable: ppux_3 -> uint<32>; |
2379 | 1.65k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:79:11-79:16"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2380 | 1.65k | ::hilti::rt::tuple::assign(std::tie((*_self).ppux.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2381 | 1.65k | if ( _trim ) { |
2382 | 1.61k | (*_data).trim(_cur.begin()); |
2383 | 1.61k | } |
2384 | | |
2385 | | // End parsing production: Variable: ppux_3 -> uint<32>; |
2386 | | |
2387 | 1.65k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:80:11-80:16"); |
2388 | | |
2389 | | // Begin parsing production: Variable: ppuy_3 -> uint<32>; |
2390 | 1.65k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{4U}, "expecting 4 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:80:11-80:16"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2391 | 1.65k | ::hilti::rt::tuple::assign(std::tie((*_self).ppuy.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint32_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2392 | 1.65k | if ( _trim ) { |
2393 | 1.60k | (*_data).trim(_cur.begin()); |
2394 | 1.60k | } |
2395 | | |
2396 | | // End parsing production: Variable: ppuy_3 -> uint<32>; |
2397 | | |
2398 | 1.65k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:81:21-81:25"); |
2399 | | |
2400 | | // Begin parsing production: Variable: unit_specifier_3 -> uint<8>; |
2401 | 1.65k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:81:21-81:25"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2402 | 1.65k | ::hilti::rt::tuple::assign(std::tie((*_self).unit_specifier.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2403 | 1.65k | if ( _trim ) { |
2404 | 1.59k | (*_data).trim(_cur.begin()); |
2405 | 1.59k | } |
2406 | | |
2407 | | // End parsing production: Variable: unit_specifier_3 -> uint<8>; |
2408 | | |
2409 | 1.65k | ::hilti::rt::debug::dedent("spicy"sv); |
2410 | 1.65k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2411 | 1.65k | } |
2412 | | |
2413 | 1.65k | auto hlt_internal_PNG_File::PNG::pHYs::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2414 | 1.65k | auto _self = pHYs::_self(); |
2415 | 1.65k | ::hilti::rt::detail::checkStack(); |
2416 | 1.65k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:78:13-82:1"); |
2417 | 1.65k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
2418 | 1.65k | ::hilti::rt::debug::indent("spicy"sv); |
2419 | 1.65k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
2420 | 1.65k | _result = (*_self)._parse_PNG__pHYs_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
2421 | 1.65k | return _result; |
2422 | 1.65k | } |
2423 | | |
2424 | 4.56k | auto hlt_internal_PNG_File::PNG::sBIT::_parse_PNG__sBIT_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2425 | 4.56k | auto _self = sBIT::_self(); |
2426 | 4.56k | ::hilti::rt::detail::checkStack(); |
2427 | 4.56k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:130:13-150:1"); |
2428 | 4.56k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:131:5-149:6"); |
2429 | | |
2430 | | // Begin parsing production: Switch: switch_9 -> [0] -> switch_9_case_1 | [2,3] -> switch_9_case_2 | [4] -> switch_9_case_3 | [6] -> switch_9_case_4; |
2431 | 4.56k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*_self)._parse_switch_9_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
2432 | | // End parsing production: Switch: switch_9 -> [0] -> switch_9_case_1 | [2,3] -> switch_9_case_2 | [4] -> switch_9_case_3 | [6] -> switch_9_case_4; |
2433 | | |
2434 | 4.56k | ::hilti::rt::debug::dedent("spicy"sv); |
2435 | 4.56k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2436 | 4.56k | } |
2437 | | |
2438 | 4.56k | auto hlt_internal_PNG_File::PNG::sBIT::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2439 | 4.56k | auto _self = sBIT::_self(); |
2440 | 4.56k | ::hilti::rt::detail::checkStack(); |
2441 | 4.56k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:130:13-150:1"); |
2442 | 4.56k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
2443 | 4.56k | ::hilti::rt::debug::indent("spicy"sv); |
2444 | 4.56k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
2445 | 4.56k | _result = (*_self)._parse_PNG__sBIT_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
2446 | 4.56k | return _result; |
2447 | 4.56k | } |
2448 | | |
2449 | 4.56k | auto hlt_internal_PNG_File::PNG::sBIT::_parse_switch_9_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2450 | 4.56k | auto _self = sBIT::_self(); |
2451 | 4.56k | ::hilti::rt::detail::checkStack(); |
2452 | 4.56k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:131:5-149:6"); |
2453 | 4.56k | ::hilti::rt::debug::indent("spicy"sv); |
2454 | 4.56k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:131:5-149:6"); |
2455 | 4.56k | if ( ::hilti::rt::integer::safe<uint8_t> _x = _self->_p_colour_type; _x == ::hilti::rt::integer::safe<std::uint8_t>{0U} ) { |
2456 | 2.66k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:132:9-132:47"); |
2457 | 2.66k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:132:9-132:47"); |
2458 | | |
2459 | | // Begin parsing production: Block: switch_9_case_1 -> significant_greyscale_bits_5; |
2460 | 2.66k | ::hilti::rt::debug::indent("spicy"sv); |
2461 | 2.66k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:132:42-132:46"); |
2462 | | |
2463 | | // Begin parsing production: Variable: significant_greyscale_bits_5 -> uint<8>; |
2464 | 2.66k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:132:42-132:46"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2465 | 2.66k | ::hilti::rt::tuple::assign(std::tie((*_self).significant_greyscale_bits.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2466 | 2.66k | if ( _trim ) { |
2467 | 2.63k | (*_data).trim(_cur.begin()); |
2468 | 2.63k | } |
2469 | | |
2470 | | // End parsing production: Variable: significant_greyscale_bits_5 -> uint<8>; |
2471 | | |
2472 | 2.66k | ::hilti::rt::debug::dedent("spicy"sv); |
2473 | | // End parsing production: Block: switch_9_case_1 -> significant_greyscale_bits_5; |
2474 | 2.66k | } |
2475 | | |
2476 | 1.89k | else if ( _x == ::hilti::rt::integer::safe<std::uint8_t>{2U} || _x == ::hilti::rt::integer::safe<std::uint8_t>{3U} ) { |
2477 | 848 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:133:9-138:9"); |
2478 | 848 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:133:9-138:9"); |
2479 | | |
2480 | | // Begin parsing production: Block: switch_9_case_2 -> significant_red_bits_5 significant_green_bits_5 significant_blue_bits_5; |
2481 | 848 | ::hilti::rt::debug::indent("spicy"sv); |
2482 | 848 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:135:35-135:39"); |
2483 | | |
2484 | | // Begin parsing production: Variable: significant_red_bits_5 -> uint<8>; |
2485 | 848 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:135:35-135:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2486 | 848 | ::hilti::rt::tuple::assign(std::tie((*_self).significant_red_bits.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2487 | 848 | if ( _trim ) { |
2488 | 834 | (*_data).trim(_cur.begin()); |
2489 | 834 | } |
2490 | | |
2491 | | // End parsing production: Variable: significant_red_bits_5 -> uint<8>; |
2492 | | |
2493 | 848 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:136:37-136:41"); |
2494 | | |
2495 | | // Begin parsing production: Variable: significant_green_bits_5 -> uint<8>; |
2496 | 848 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:136:37-136:41"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2497 | 848 | ::hilti::rt::tuple::assign(std::tie((*_self).significant_green_bits.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2498 | 848 | if ( _trim ) { |
2499 | 825 | (*_data).trim(_cur.begin()); |
2500 | 825 | } |
2501 | | |
2502 | | // End parsing production: Variable: significant_green_bits_5 -> uint<8>; |
2503 | | |
2504 | 848 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:137:36-137:40"); |
2505 | | |
2506 | | // Begin parsing production: Variable: significant_blue_bits_5 -> uint<8>; |
2507 | 848 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:137:36-137:40"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2508 | 848 | ::hilti::rt::tuple::assign(std::tie((*_self).significant_blue_bits.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2509 | 848 | if ( _trim ) { |
2510 | 817 | (*_data).trim(_cur.begin()); |
2511 | 817 | } |
2512 | | |
2513 | | // End parsing production: Variable: significant_blue_bits_5 -> uint<8>; |
2514 | | |
2515 | 848 | ::hilti::rt::debug::dedent("spicy"sv); |
2516 | | // End parsing production: Block: switch_9_case_2 -> significant_red_bits_5 significant_green_bits_5 significant_blue_bits_5; |
2517 | 848 | } |
2518 | | |
2519 | 1.05k | else if ( _x == ::hilti::rt::integer::safe<std::uint8_t>{4U} ) { |
2520 | 454 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:139:9-142:9"); |
2521 | 454 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:139:9-142:9"); |
2522 | | |
2523 | | // Begin parsing production: Block: switch_9_case_3 -> significant_greyscale_bits_6 significant_alpha_bits_5; |
2524 | 454 | ::hilti::rt::debug::indent("spicy"sv); |
2525 | 454 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:140:41-140:45"); |
2526 | | |
2527 | | // Begin parsing production: Variable: significant_greyscale_bits_6 -> uint<8>; |
2528 | 454 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:140:41-140:45"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2529 | 454 | ::hilti::rt::tuple::assign(std::tie((*_self).significant_greyscale_bits.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2530 | 454 | if ( _trim ) { |
2531 | 447 | (*_data).trim(_cur.begin()); |
2532 | 447 | } |
2533 | | |
2534 | | // End parsing production: Variable: significant_greyscale_bits_6 -> uint<8>; |
2535 | | |
2536 | 454 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:141:37-141:41"); |
2537 | | |
2538 | | // Begin parsing production: Variable: significant_alpha_bits_5 -> uint<8>; |
2539 | 454 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:141:37-141:41"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2540 | 454 | ::hilti::rt::tuple::assign(std::tie((*_self).significant_alpha_bits.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2541 | 454 | if ( _trim ) { |
2542 | 439 | (*_data).trim(_cur.begin()); |
2543 | 439 | } |
2544 | | |
2545 | | // End parsing production: Variable: significant_alpha_bits_5 -> uint<8>; |
2546 | | |
2547 | 454 | ::hilti::rt::debug::dedent("spicy"sv); |
2548 | | // End parsing production: Block: switch_9_case_3 -> significant_greyscale_bits_6 significant_alpha_bits_5; |
2549 | 454 | } |
2550 | | |
2551 | 597 | else if ( _x == ::hilti::rt::integer::safe<std::uint8_t>{6U} ) { |
2552 | 586 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:143:9-148:9"); |
2553 | 586 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:143:9-148:9"); |
2554 | | |
2555 | | // Begin parsing production: Block: switch_9_case_4 -> significant_red_bits_6 significant_green_bits_6 significant_blue_bits_6 significant_alpha_bits_6; |
2556 | 586 | ::hilti::rt::debug::indent("spicy"sv); |
2557 | 586 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:144:35-144:39"); |
2558 | | |
2559 | | // Begin parsing production: Variable: significant_red_bits_6 -> uint<8>; |
2560 | 586 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:144:35-144:39"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2561 | 586 | ::hilti::rt::tuple::assign(std::tie((*_self).significant_red_bits.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2562 | 586 | if ( _trim ) { |
2563 | 579 | (*_data).trim(_cur.begin()); |
2564 | 579 | } |
2565 | | |
2566 | | // End parsing production: Variable: significant_red_bits_6 -> uint<8>; |
2567 | | |
2568 | 586 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:145:37-145:41"); |
2569 | | |
2570 | | // Begin parsing production: Variable: significant_green_bits_6 -> uint<8>; |
2571 | 586 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:145:37-145:41"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2572 | 586 | ::hilti::rt::tuple::assign(std::tie((*_self).significant_green_bits.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2573 | 586 | if ( _trim ) { |
2574 | 572 | (*_data).trim(_cur.begin()); |
2575 | 572 | } |
2576 | | |
2577 | | // End parsing production: Variable: significant_green_bits_6 -> uint<8>; |
2578 | | |
2579 | 586 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:146:36-146:40"); |
2580 | | |
2581 | | // Begin parsing production: Variable: significant_blue_bits_6 -> uint<8>; |
2582 | 586 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:146:36-146:40"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2583 | 586 | ::hilti::rt::tuple::assign(std::tie((*_self).significant_blue_bits.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2584 | 586 | if ( _trim ) { |
2585 | 565 | (*_data).trim(_cur.begin()); |
2586 | 565 | } |
2587 | | |
2588 | | // End parsing production: Variable: significant_blue_bits_6 -> uint<8>; |
2589 | | |
2590 | 586 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:147:37-147:41"); |
2591 | | |
2592 | | // Begin parsing production: Variable: significant_alpha_bits_6 -> uint<8>; |
2593 | 586 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:147:37-147:41"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2594 | 586 | ::hilti::rt::tuple::assign(std::tie((*_self).significant_alpha_bits.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2595 | 586 | if ( _trim ) { |
2596 | 557 | (*_data).trim(_cur.begin()); |
2597 | 557 | } |
2598 | | |
2599 | | // End parsing production: Variable: significant_alpha_bits_6 -> uint<8>; |
2600 | | |
2601 | 586 | ::hilti::rt::debug::dedent("spicy"sv); |
2602 | | // End parsing production: Block: switch_9_case_4 -> significant_red_bits_6 significant_green_bits_6 significant_blue_bits_6 significant_alpha_bits_6; |
2603 | 586 | } |
2604 | | |
2605 | 11 | else { |
2606 | 11 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:131:5-149:6"); |
2607 | 11 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("no matching case in switch statement for value '%s'"sv, _self->_p_colour_type), "/src/spicy/spicy-png/analyzer/analyzer.spicy:131:5-149:6"); |
2608 | 11 | } |
2609 | | |
2610 | 4.55k | ::hilti::rt::debug::dedent("spicy"sv); |
2611 | 4.55k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2612 | 4.56k | } |
2613 | | |
2614 | 1.38k | auto hlt_internal_PNG_File::PNG::sRGB::_parse_PNG__sRGB_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2615 | 1.38k | auto _self = sRGB::_self(); |
2616 | 1.38k | ::hilti::rt::detail::checkStack(); |
2617 | 1.38k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:125:13-127:1"); |
2618 | 1.38k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:126:23-126:27"); |
2619 | | |
2620 | | // Begin parsing production: Variable: rendering_intent_3 -> uint<8>; |
2621 | 1.38k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:126:23-126:27"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2622 | 1.38k | ::hilti::rt::tuple::assign(std::tie((*_self).rendering_intent.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2623 | 1.38k | if ( _trim ) { |
2624 | 1.35k | (*_data).trim(_cur.begin()); |
2625 | 1.35k | } |
2626 | | |
2627 | | // End parsing production: Variable: rendering_intent_3 -> uint<8>; |
2628 | | |
2629 | 1.38k | ::hilti::rt::debug::dedent("spicy"sv); |
2630 | 1.38k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2631 | 1.38k | } |
2632 | | |
2633 | 1.38k | auto hlt_internal_PNG_File::PNG::sRGB::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2634 | 1.38k | auto _self = sRGB::_self(); |
2635 | 1.38k | ::hilti::rt::detail::checkStack(); |
2636 | 1.38k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:125:13-127:1"); |
2637 | 1.38k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
2638 | 1.38k | ::hilti::rt::debug::indent("spicy"sv); |
2639 | 1.38k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
2640 | 1.38k | _result = (*_self)._parse_PNG__sRGB_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
2641 | 1.38k | return _result; |
2642 | 1.38k | } |
2643 | | |
2644 | 2.72k | auto hlt_internal_PNG_File::PNG::tEXt::_parse_PNG__tEXt_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2645 | 2.72k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _lhs_10; |
2646 | 2.72k | auto _self = tEXt::_self(); |
2647 | 2.72k | ::hilti::rt::detail::checkStack(); |
2648 | 2.72k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:95:13-98:1"); |
2649 | 2.72k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:96:14-96:18"); |
2650 | | |
2651 | | // Begin parsing production: Variable: keyword_8 -> bytes; |
2652 | 2.72k | ::hilti::rt::Bytes _until_bytes = "\000"_b; |
2653 | 2.72k | ::hilti::rt::integer::safe<uint64_t> _until_bytes_sz = "\000"_b.size(); |
2654 | 2.72k | (*_self).keyword.valueOrInit() = ""_b; |
2655 | 2.84k | while ( ::hilti::rt::Bool(true) ) { |
2656 | 2.76k | ::spicy::rt::detail::waitForInput(_data, _cur, _until_bytes_sz, "end-of-data reached before &until expression found"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:96:27-96:33"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2657 | 2.76k | ::hilti::rt::Bool found; |
2658 | 2.76k | ::hilti::rt::stream::SafeConstIterator it; |
2659 | 2.76k | ::hilti::rt::tuple::assign(std::tie(found, it), _cur.find(_until_bytes)); |
2660 | 2.76k | if ( ::hilti::rt::Bool(static_cast<bool>(_cur.sub(it).size())) ) { |
2661 | 1.04k | (*_self).keyword.value().append(_cur.sub(it)); |
2662 | 1.04k | } |
2663 | | |
2664 | 2.76k | if ( found ) { |
2665 | 2.65k | _cur = _cur.advance(it + _until_bytes_sz); |
2666 | 2.65k | if ( _trim ) { |
2667 | 2.65k | (*_data).trim(_cur.begin()); |
2668 | 2.65k | } |
2669 | | |
2670 | 2.65k | break; |
2671 | 2.65k | } |
2672 | 113 | else { |
2673 | 113 | _cur = _cur.advance(it); |
2674 | 113 | if ( _trim ) { |
2675 | 39 | (*_data).trim(_cur.begin()); |
2676 | 39 | } |
2677 | 113 | } |
2678 | 2.76k | } |
2679 | | |
2680 | 2.72k | if ( _trim ) { |
2681 | 2.65k | (*_data).trim(_cur.begin()); |
2682 | 2.65k | } |
2683 | | |
2684 | | // End parsing production: Variable: keyword_8 -> bytes; |
2685 | | |
2686 | 2.72k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:97:18-97:22"); |
2687 | | |
2688 | | // Begin parsing production: Variable: text_string_3 -> bytes; |
2689 | 2.72k | ::hilti::rt::integer::safe<uint64_t> _size = ::hilti::rt::integer::safe<uint64_t>(_self->_p_length) - ((*_self).keyword.value().size() + ::hilti::rt::integer::safe<std::uint64_t>{1U}); |
2690 | 2.72k | (*_self).text_string.valueOrInit() = ::spicy::rt::detail::extractBytes(_data, _cur, _size, ::hilti::rt::Bool(false), "/src/spicy/spicy-png/analyzer/analyzer.spicy:97:5-97:59"sv, (_lhs_10=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2691 | 2.72k | _cur = _cur.advance(_size); |
2692 | 2.72k | if ( _trim ) { |
2693 | 2.52k | (*_data).trim(_cur.begin()); |
2694 | 2.52k | } |
2695 | | |
2696 | | // End parsing production: Variable: text_string_3 -> bytes; |
2697 | | |
2698 | 2.72k | ::hilti::rt::debug::dedent("spicy"sv); |
2699 | 2.72k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2700 | 2.72k | } |
2701 | | |
2702 | 2.72k | auto hlt_internal_PNG_File::PNG::tEXt::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2703 | 2.72k | auto _self = tEXt::_self(); |
2704 | 2.72k | ::hilti::rt::detail::checkStack(); |
2705 | 2.72k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:95:13-98:1"); |
2706 | 2.72k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
2707 | 2.72k | ::hilti::rt::debug::indent("spicy"sv); |
2708 | 2.72k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
2709 | 2.72k | _result = (*_self)._parse_PNG__tEXt_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
2710 | 2.72k | return _result; |
2711 | 2.72k | } |
2712 | | |
2713 | 1.69k | auto hlt_internal_PNG_File::PNG::tIME::_parse_PNG__tIME_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2714 | 1.69k | auto _self = tIME::_self(); |
2715 | 1.69k | ::hilti::rt::detail::checkStack(); |
2716 | 1.69k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:181:13-188:1"); |
2717 | 1.69k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:182:11-182:16"); |
2718 | | |
2719 | | // Begin parsing production: Variable: year_3 -> uint<16>; |
2720 | 1.69k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:182:11-182:16"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2721 | 1.69k | ::hilti::rt::tuple::assign(std::tie((*_self).year.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint16_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2722 | 1.69k | if ( _trim ) { |
2723 | 1.66k | (*_data).trim(_cur.begin()); |
2724 | 1.66k | } |
2725 | | |
2726 | | // End parsing production: Variable: year_3 -> uint<16>; |
2727 | | |
2728 | 1.69k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:183:12-183:16"); |
2729 | | |
2730 | | // Begin parsing production: Variable: month_3 -> uint<8>; |
2731 | 1.69k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:183:12-183:16"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2732 | 1.69k | ::hilti::rt::tuple::assign(std::tie((*_self).month.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2733 | 1.69k | if ( _trim ) { |
2734 | 1.65k | (*_data).trim(_cur.begin()); |
2735 | 1.65k | } |
2736 | | |
2737 | | // End parsing production: Variable: month_3 -> uint<8>; |
2738 | | |
2739 | 1.69k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:184:10-184:14"); |
2740 | | |
2741 | | // Begin parsing production: Variable: day_3 -> uint<8>; |
2742 | 1.69k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:184:10-184:14"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2743 | 1.69k | ::hilti::rt::tuple::assign(std::tie((*_self).day.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2744 | 1.69k | if ( _trim ) { |
2745 | 1.64k | (*_data).trim(_cur.begin()); |
2746 | 1.64k | } |
2747 | | |
2748 | | // End parsing production: Variable: day_3 -> uint<8>; |
2749 | | |
2750 | 1.69k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:185:11-185:15"); |
2751 | | |
2752 | | // Begin parsing production: Variable: hour_3 -> uint<8>; |
2753 | 1.69k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:185:11-185:15"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2754 | 1.69k | ::hilti::rt::tuple::assign(std::tie((*_self).hour.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2755 | 1.69k | if ( _trim ) { |
2756 | 1.63k | (*_data).trim(_cur.begin()); |
2757 | 1.63k | } |
2758 | | |
2759 | | // End parsing production: Variable: hour_3 -> uint<8>; |
2760 | | |
2761 | 1.69k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:186:13-186:17"); |
2762 | | |
2763 | | // Begin parsing production: Variable: minute_3 -> uint<8>; |
2764 | 1.69k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:186:13-186:17"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2765 | 1.69k | ::hilti::rt::tuple::assign(std::tie((*_self).minute.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2766 | 1.69k | if ( _trim ) { |
2767 | 1.63k | (*_data).trim(_cur.begin()); |
2768 | 1.63k | } |
2769 | | |
2770 | | // End parsing production: Variable: minute_3 -> uint<8>; |
2771 | | |
2772 | 1.69k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:187:13-187:17"); |
2773 | | |
2774 | | // Begin parsing production: Variable: second_3 -> uint<8>; |
2775 | 1.69k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:187:13-187:17"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2776 | 1.69k | ::hilti::rt::tuple::assign(std::tie((*_self).second.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2777 | 1.69k | if ( _trim ) { |
2778 | 1.62k | (*_data).trim(_cur.begin()); |
2779 | 1.62k | } |
2780 | | |
2781 | | // End parsing production: Variable: second_3 -> uint<8>; |
2782 | | |
2783 | 1.69k | ::hilti::rt::debug::dedent("spicy"sv); |
2784 | 1.69k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2785 | 1.69k | } |
2786 | | |
2787 | 1.69k | auto hlt_internal_PNG_File::PNG::tIME::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2788 | 1.69k | auto _self = tIME::_self(); |
2789 | 1.69k | ::hilti::rt::detail::checkStack(); |
2790 | 1.69k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:181:13-188:1"); |
2791 | 1.69k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
2792 | 1.69k | ::hilti::rt::debug::indent("spicy"sv); |
2793 | 1.69k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
2794 | 1.69k | _result = (*_self)._parse_PNG__tIME_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
2795 | 1.69k | return _result; |
2796 | 1.69k | } |
2797 | | |
2798 | 8.13k | auto hlt_internal_PNG_File::PNG::tRNS::_parse_PNG__tRNS_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2799 | 8.13k | auto _self = tRNS::_self(); |
2800 | 8.13k | ::hilti::rt::detail::checkStack(); |
2801 | 8.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:168:13-178:1"); |
2802 | 8.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:169:5-177:6"); |
2803 | | |
2804 | | // Begin parsing production: Switch: switch_11 -> [0] -> switch_11_case_1 | [2] -> switch_11_case_2 | [3] -> switch_11_case_3; |
2805 | 8.13k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*_self)._parse_switch_11_stage1(_data, _cur, _trim, _lah, _lahe, _error)); |
2806 | | // End parsing production: Switch: switch_11 -> [0] -> switch_11_case_1 | [2] -> switch_11_case_2 | [3] -> switch_11_case_3; |
2807 | | |
2808 | 8.13k | ::hilti::rt::debug::dedent("spicy"sv); |
2809 | 8.13k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2810 | 8.13k | } |
2811 | | |
2812 | 6.29k | auto hlt_internal_PNG_File::PNG::tRNS::_parse_alpha_3_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error, ::hilti::rt::Vector<::hilti::rt::integer::safe<uint8_t>>& _dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2813 | 6.29k | auto _self = tRNS::_self(); |
2814 | 6.29k | ::hilti::rt::detail::checkStack(); |
2815 | 6.29k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:176:14-176:34"); |
2816 | 6.29k | ::hilti::rt::integer::safe<uint64_t> _repeat = ::hilti::rt::integer::safe<uint64_t>(_self->_p_length); |
2817 | 6.29k | _dst.reserve((::hilti::rt::integer::safe<std::uint64_t>{128U} <= _repeat ? ::hilti::rt::integer::safe<std::uint64_t>{128U} : _repeat)); |
2818 | 5.32M | for ( ::hilti::rt::integer::safe<uint64_t> _i = _repeat; ::hilti::rt::Bool(static_cast<bool>(_i)); ) { |
2819 | 5.31M | _i--; |
2820 | 5.31M | ::hilti::rt::integer::safe<uint8_t> _elem; |
2821 | 5.31M | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:176:21-176:25"); |
2822 | | |
2823 | | // Begin parsing production: Variable: _anon_8_3 -> uint<8> (container 'alpha'); |
2824 | 5.31M | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:176:21-176:25"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2825 | 5.31M | ::hilti::rt::tuple::assign(std::tie(_elem, _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2826 | 5.31M | if ( _trim ) { |
2827 | 5.31M | (*_data).trim(_cur.begin()); |
2828 | 5.31M | } |
2829 | | |
2830 | | // End parsing production: Variable: _anon_8_3 -> uint<8> (container 'alpha'); |
2831 | | |
2832 | 5.31M | _dst.emplace_back(_elem); |
2833 | 5.31M | } |
2834 | | |
2835 | 6.29k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2836 | 6.29k | } |
2837 | | |
2838 | 8.13k | auto hlt_internal_PNG_File::PNG::tRNS::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2839 | 8.13k | auto _self = tRNS::_self(); |
2840 | 8.13k | ::hilti::rt::detail::checkStack(); |
2841 | 8.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:168:13-178:1"); |
2842 | 8.13k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
2843 | 8.13k | ::hilti::rt::debug::indent("spicy"sv); |
2844 | 8.13k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
2845 | 8.13k | _result = (*_self)._parse_PNG__tRNS_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
2846 | 8.13k | return _result; |
2847 | 8.13k | } |
2848 | | |
2849 | 8.13k | auto hlt_internal_PNG_File::PNG::tRNS::_parse_switch_11_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2850 | 8.13k | auto _self = tRNS::_self(); |
2851 | 8.13k | ::hilti::rt::detail::checkStack(); |
2852 | 8.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:169:5-177:6"); |
2853 | 8.13k | ::hilti::rt::debug::indent("spicy"sv); |
2854 | 8.13k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:169:5-177:6"); |
2855 | 8.13k | if ( ::hilti::rt::integer::safe<uint8_t> _x = _self->_p_colour_type; _x == ::hilti::rt::integer::safe<std::uint8_t>{0U} ) { |
2856 | 1.30k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:170:9-170:39"); |
2857 | 1.30k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:170:9-170:39"); |
2858 | | |
2859 | | // Begin parsing production: Block: switch_11_case_1 -> grey_sample_value_3; |
2860 | 1.30k | ::hilti::rt::debug::indent("spicy"sv); |
2861 | 1.30k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:170:33-170:38"); |
2862 | | |
2863 | | // Begin parsing production: Variable: grey_sample_value_3 -> uint<16>; |
2864 | 1.30k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:170:33-170:38"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2865 | 1.30k | ::hilti::rt::tuple::assign(std::tie((*_self).grey_sample_value.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint16_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2866 | 1.30k | if ( _trim ) { |
2867 | 1.28k | (*_data).trim(_cur.begin()); |
2868 | 1.28k | } |
2869 | | |
2870 | | // End parsing production: Variable: grey_sample_value_3 -> uint<16>; |
2871 | | |
2872 | 1.30k | ::hilti::rt::debug::dedent("spicy"sv); |
2873 | | // End parsing production: Block: switch_11_case_1 -> grey_sample_value_3; |
2874 | 1.30k | } |
2875 | | |
2876 | 6.82k | else if ( _x == ::hilti::rt::integer::safe<std::uint8_t>{2U} ) { |
2877 | 525 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:171:9-175:9"); |
2878 | 525 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:171:9-175:9"); |
2879 | | |
2880 | | // Begin parsing production: Block: switch_11_case_2 -> red_sample_value_3 green_sample_value_3 blue_sample_value_3; |
2881 | 525 | ::hilti::rt::debug::indent("spicy"sv); |
2882 | 525 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:172:31-172:36"); |
2883 | | |
2884 | | // Begin parsing production: Variable: red_sample_value_3 -> uint<16>; |
2885 | 525 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:172:31-172:36"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2886 | 525 | ::hilti::rt::tuple::assign(std::tie((*_self).red_sample_value.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint16_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2887 | 525 | if ( _trim ) { |
2888 | 516 | (*_data).trim(_cur.begin()); |
2889 | 516 | } |
2890 | | |
2891 | | // End parsing production: Variable: red_sample_value_3 -> uint<16>; |
2892 | | |
2893 | 525 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:173:33-173:38"); |
2894 | | |
2895 | | // Begin parsing production: Variable: green_sample_value_3 -> uint<16>; |
2896 | 525 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:173:33-173:38"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2897 | 525 | ::hilti::rt::tuple::assign(std::tie((*_self).green_sample_value.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint16_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2898 | 525 | if ( _trim ) { |
2899 | 509 | (*_data).trim(_cur.begin()); |
2900 | 509 | } |
2901 | | |
2902 | | // End parsing production: Variable: green_sample_value_3 -> uint<16>; |
2903 | | |
2904 | 525 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:174:32-174:37"); |
2905 | | |
2906 | | // Begin parsing production: Variable: blue_sample_value_3 -> uint<16>; |
2907 | 525 | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{2U}, "expecting 2 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:174:32-174:37"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2908 | 525 | ::hilti::rt::tuple::assign(std::tie((*_self).blue_sample_value.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint16_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2909 | 525 | if ( _trim ) { |
2910 | 501 | (*_data).trim(_cur.begin()); |
2911 | 501 | } |
2912 | | |
2913 | | // End parsing production: Variable: blue_sample_value_3 -> uint<16>; |
2914 | | |
2915 | 525 | ::hilti::rt::debug::dedent("spicy"sv); |
2916 | | // End parsing production: Block: switch_11_case_2 -> red_sample_value_3 green_sample_value_3 blue_sample_value_3; |
2917 | 525 | } |
2918 | | |
2919 | 6.30k | else if ( _x == ::hilti::rt::integer::safe<std::uint8_t>{3U} ) { |
2920 | 6.29k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:176:9-176:34"); |
2921 | 6.29k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:176:9-176:34"); |
2922 | | |
2923 | | // Begin parsing production: Block: switch_11_case_3 -> alpha_3; |
2924 | 6.29k | ::hilti::rt::debug::indent("spicy"sv); |
2925 | 6.29k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:176:14-176:34"); |
2926 | | |
2927 | | // Begin parsing production: Counter: alpha_3 -> counter(length): _anon_8_3; |
2928 | 6.29k | ::hilti::rt::tuple::assign(std::tie(_cur, _lah, _lahe, _error), (*_self)._parse_alpha_3_stage1(_data, _cur, _trim, _lah, _lahe, _error, (*_self).alpha.valueOrInit())); |
2929 | | // End parsing production: Counter: alpha_3 -> counter(length): _anon_8_3; |
2930 | | |
2931 | 6.29k | ::hilti::rt::debug::dedent("spicy"sv); |
2932 | | // End parsing production: Block: switch_11_case_3 -> alpha_3; |
2933 | 6.29k | } |
2934 | | |
2935 | 9 | else { |
2936 | 9 | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:169:5-177:6"); |
2937 | 9 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("no matching case in switch statement for value '%s'"sv, _self->_p_colour_type), "/src/spicy/spicy-png/analyzer/analyzer.spicy:169:5-177:6"); |
2938 | 9 | } |
2939 | | |
2940 | 8.12k | ::hilti::rt::debug::dedent("spicy"sv); |
2941 | 8.12k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
2942 | 8.13k | } |
2943 | | |
2944 | 3.55k | auto hlt_internal_PNG_File::PNG::zTXt::_parse_PNG__zTXt_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2945 | 3.55k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _lhs_11; |
2946 | 3.55k | auto _self = zTXt::_self(); |
2947 | 3.55k | ::hilti::rt::detail::checkStack(); |
2948 | 3.55k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:101:13-105:1"); |
2949 | 3.55k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:102:14-102:18"); |
2950 | | |
2951 | | // Begin parsing production: Variable: keyword_9 -> bytes; |
2952 | 3.55k | ::hilti::rt::Bytes _until_bytes = "\000"_b; |
2953 | 3.55k | ::hilti::rt::integer::safe<uint64_t> _until_bytes_sz = "\000"_b.size(); |
2954 | 3.55k | (*_self).keyword.valueOrInit() = ""_b; |
2955 | 3.67k | while ( ::hilti::rt::Bool(true) ) { |
2956 | 3.59k | ::spicy::rt::detail::waitForInput(_data, _cur, _until_bytes_sz, "end-of-data reached before &until expression found"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:102:27-102:33"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2957 | 3.59k | ::hilti::rt::Bool found; |
2958 | 3.59k | ::hilti::rt::stream::SafeConstIterator it; |
2959 | 3.59k | ::hilti::rt::tuple::assign(std::tie(found, it), _cur.find(_until_bytes)); |
2960 | 3.59k | if ( ::hilti::rt::Bool(static_cast<bool>(_cur.sub(it).size())) ) { |
2961 | 1.16k | (*_self).keyword.value().append(_cur.sub(it)); |
2962 | 1.16k | } |
2963 | | |
2964 | 3.59k | if ( found ) { |
2965 | 3.46k | _cur = _cur.advance(it + _until_bytes_sz); |
2966 | 3.46k | if ( _trim ) { |
2967 | 3.46k | (*_data).trim(_cur.begin()); |
2968 | 3.46k | } |
2969 | | |
2970 | 3.46k | break; |
2971 | 3.46k | } |
2972 | 124 | else { |
2973 | 124 | _cur = _cur.advance(it); |
2974 | 124 | if ( _trim ) { |
2975 | 41 | (*_data).trim(_cur.begin()); |
2976 | 41 | } |
2977 | 124 | } |
2978 | 3.59k | } |
2979 | | |
2980 | 3.55k | if ( _trim ) { |
2981 | 3.46k | (*_data).trim(_cur.begin()); |
2982 | 3.46k | } |
2983 | | |
2984 | | // End parsing production: Variable: keyword_9 -> bytes; |
2985 | | |
2986 | 3.55k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:103:25-103:29"); |
2987 | | |
2988 | | // Begin parsing production: Variable: compression_method_12 -> uint<8>; |
2989 | 3.55k | ::spicy::rt::detail::waitForInput(_data, _cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, "expecting 1 bytes for unpacking value"sv, "/src/spicy/spicy-png/analyzer/analyzer.spicy:103:25-103:29"sv, ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()); |
2990 | 3.55k | ::hilti::rt::tuple::assign(std::tie((*_self).compression_method.valueOrInit(), _cur), ::hilti::rt::integer::unpack<uint8_t>(_cur, ::hilti::rt::ByteOrder{::hilti::rt::ByteOrder::Network}).valueOrThrow()); |
2991 | 3.55k | if ( _trim ) { |
2992 | 3.41k | (*_data).trim(_cur.begin()); |
2993 | 3.41k | } |
2994 | | |
2995 | | // End parsing production: Variable: compression_method_12 -> uint<8>; |
2996 | | |
2997 | 3.55k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:104:22-104:26"); |
2998 | | |
2999 | | // Begin parsing production: Variable: compressed_text_3 -> bytes; |
3000 | 3.55k | ::hilti::rt::integer::safe<uint64_t> _size = ::hilti::rt::integer::safe<uint64_t>(_self->_p_length) - ((*_self).keyword.value().size() + ::hilti::rt::integer::safe<std::uint64_t>{2U}); |
3001 | 3.55k | (*_self).compressed_text.valueOrInit() = ::spicy::rt::detail::extractBytes(_data, _cur, _size, ::hilti::rt::Bool(false), "/src/spicy/spicy-png/analyzer/analyzer.spicy:104:5-104:63"sv, (_lhs_11=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
3002 | 3.55k | _cur = _cur.advance(_size); |
3003 | 3.55k | if ( _trim ) { |
3004 | 3.30k | (*_data).trim(_cur.begin()); |
3005 | 3.30k | } |
3006 | | |
3007 | | // End parsing production: Variable: compressed_text_3 -> bytes; |
3008 | | |
3009 | 3.55k | ::hilti::rt::debug::dedent("spicy"sv); |
3010 | 3.55k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_cur), ::hilti::rt::optional::make(_lah), ::hilti::rt::optional::make(_lahe), ::hilti::rt::optional::make(_error)); |
3011 | 3.55k | } |
3012 | | |
3013 | 3.55k | auto hlt_internal_PNG_File::PNG::zTXt::_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _data, ::hilti::rt::stream::View _cur, ::hilti::rt::Bool _trim, ::hilti::rt::integer::safe<int64_t> _lah, ::hilti::rt::stream::SafeConstIterator _lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
3014 | 3.55k | auto _self = zTXt::_self(); |
3015 | 3.55k | ::hilti::rt::detail::checkStack(); |
3016 | 3.55k | ::hilti::rt::location("/src/spicy/spicy-png/analyzer/analyzer.spicy:101:13-105:1"); |
3017 | 3.55k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _result; |
3018 | 3.55k | ::hilti::rt::debug::indent("spicy"sv); |
3019 | 3.55k | ::hilti::rt::stream::SafeConstIterator _begin_ = _cur.begin(); |
3020 | 3.55k | _result = (*_self)._parse_PNG__zTXt_3_stage2(_data, _cur, _trim, _lah, _lahe, _error); |
3021 | 3.55k | return _result; |
3022 | 3.55k | } |
3023 | | |