/src/libjxl/lib/jxl/base/status.h
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright (c) the JPEG XL Project Authors. All rights reserved. |
2 | | // |
3 | | // Use of this source code is governed by a BSD-style |
4 | | // license that can be found in the LICENSE file. |
5 | | |
6 | | #ifndef LIB_JXL_BASE_STATUS_H_ |
7 | | #define LIB_JXL_BASE_STATUS_H_ |
8 | | |
9 | | // Error handling: Status return type + helper macros. |
10 | | |
11 | | #include <cstdarg> |
12 | | #include <cstdint> |
13 | | #include <cstdio> |
14 | | #include <cstdlib> |
15 | | #include <type_traits> |
16 | | #include <utility> |
17 | | |
18 | | #include "lib/jxl/base/common.h" |
19 | | #include "lib/jxl/base/compiler_specific.h" |
20 | | |
21 | | namespace jxl { |
22 | | |
23 | | // The Verbose level for the library |
24 | | #ifndef JXL_DEBUG_V_LEVEL |
25 | 88.4k | #define JXL_DEBUG_V_LEVEL 0 |
26 | | #endif // JXL_DEBUG_V_LEVEL |
27 | | |
28 | | #ifdef USE_ANDROID_LOGGER |
29 | | #include <android/log.h> |
30 | | #define LIBJXL_ANDROID_LOG_TAG ("libjxl") |
31 | | inline void android_vprintf(const char* format, va_list args) { |
32 | | char* message = nullptr; |
33 | | int res = vasprintf(&message, format, args); |
34 | | if (res != -1) { |
35 | | __android_log_write(ANDROID_LOG_DEBUG, LIBJXL_ANDROID_LOG_TAG, message); |
36 | | free(message); |
37 | | } |
38 | | } |
39 | | #endif |
40 | | |
41 | | // Print a debug message on standard error or android logs. You should use the |
42 | | // JXL_DEBUG macro instead of calling Debug directly. This function returns |
43 | | // false, so it can be used as a return value in JXL_FAILURE. |
44 | | JXL_FORMAT(1, 2) |
45 | 0 | inline JXL_NOINLINE bool Debug(const char* format, ...) { |
46 | 0 | va_list args; |
47 | 0 | va_start(args, format); |
48 | | #ifdef USE_ANDROID_LOGGER |
49 | | android_vprintf(format, args); |
50 | | #else |
51 | 0 | vfprintf(stderr, format, args); |
52 | 0 | #endif |
53 | 0 | va_end(args); |
54 | 0 | return false; |
55 | 0 | } |
56 | | |
57 | | // Print a debug message on standard error if "enabled" is true. "enabled" is |
58 | | // normally a macro that evaluates to 0 or 1 at compile time, so the Debug |
59 | | // function is never called and optimized out in release builds. Note that the |
60 | | // arguments are compiled but not evaluated when enabled is false. The format |
61 | | // string must be a explicit string in the call, for example: |
62 | | // JXL_DEBUG(JXL_DEBUG_MYMODULE, "my module message: %d", some_var); |
63 | | // Add a header at the top of your module's .cc or .h file (depending on whether |
64 | | // you have JXL_DEBUG calls from the .h as well) like this: |
65 | | // #ifndef JXL_DEBUG_MYMODULE |
66 | | // #define JXL_DEBUG_MYMODULE 0 |
67 | | // #endif JXL_DEBUG_MYMODULE |
68 | | #define JXL_DEBUG_TMP(format, ...) \ |
69 | 0 | ::jxl::Debug(("%s:%d: " format "\n"), __FILE__, __LINE__, ##__VA_ARGS__) |
70 | | |
71 | | #define JXL_DEBUG(enabled, format, ...) \ |
72 | 30.9k | do { \ |
73 | 30.9k | if (enabled) { \ |
74 | 0 | JXL_DEBUG_TMP(format, ##__VA_ARGS__); \ |
75 | 0 | } \ |
76 | 30.9k | } while (0) |
77 | | |
78 | | // JXL_DEBUG version that prints the debug message if the global verbose level |
79 | | // defined at compile time by JXL_DEBUG_V_LEVEL is greater or equal than the |
80 | | // passed level. |
81 | | #if JXL_DEBUG_V_LEVEL > 0 |
82 | | #define JXL_DEBUG_V(level, format, ...) \ |
83 | | JXL_DEBUG(level <= JXL_DEBUG_V_LEVEL, format, ##__VA_ARGS__) |
84 | | #else |
85 | | #define JXL_DEBUG_V(level, format, ...) |
86 | | #endif |
87 | | |
88 | | #define JXL_WARNING(format, ...) \ |
89 | 30.9k | JXL_DEBUG(JXL_IS_DEBUG_BUILD, format, ##__VA_ARGS__) |
90 | | |
91 | | #if JXL_IS_DEBUG_BUILD |
92 | | // Exits the program after printing a stack trace when possible. |
93 | | JXL_NORETURN inline JXL_NOINLINE bool Abort() { |
94 | | JXL_PRINT_STACK_TRACE(); |
95 | | JXL_CRASH(); |
96 | | } |
97 | | #endif |
98 | | |
99 | | #if JXL_IS_DEBUG_BUILD |
100 | | #define JXL_DEBUG_ABORT(format, ...) \ |
101 | | do { \ |
102 | | if (JXL_DEBUG_ON_ABORT) { \ |
103 | | ::jxl::Debug(("%s:%d: JXL_DEBUG_ABORT: " format "\n"), __FILE__, \ |
104 | | __LINE__, ##__VA_ARGS__); \ |
105 | | } \ |
106 | | ::jxl::Abort(); \ |
107 | | } while (0); |
108 | | #else |
109 | | #define JXL_DEBUG_ABORT(format, ...) |
110 | | #endif |
111 | | |
112 | | // Use this for code paths that are unreachable unless the code would change |
113 | | // to make it reachable, in which case it will print a warning and abort in |
114 | | // debug builds. In release builds no code is produced for this, so only use |
115 | | // this if this path is really unreachable. |
116 | | #if JXL_IS_DEBUG_BUILD |
117 | | #define JXL_UNREACHABLE(format, ...) \ |
118 | | (::jxl::Debug(("%s:%d: JXL_UNREACHABLE: " format "\n"), __FILE__, __LINE__, \ |
119 | | ##__VA_ARGS__), \ |
120 | | ::jxl::Abort(), JXL_FAILURE(format, ##__VA_ARGS__)) |
121 | | #else // JXL_IS_DEBUG_BUILD |
122 | | #define JXL_UNREACHABLE(format, ...) \ |
123 | 0 | JXL_FAILURE("internal: " format, ##__VA_ARGS__) |
124 | | #endif |
125 | | |
126 | | // Only runs in debug builds (builds where NDEBUG is not |
127 | | // defined). This is useful for slower asserts that we want to run more rarely |
128 | | // than usual. These will run on asan, msan and other debug builds, but not in |
129 | | // opt or release. |
130 | | #if JXL_IS_DEBUG_BUILD |
131 | | #define JXL_DASSERT(condition) \ |
132 | | do { \ |
133 | | if (!(condition)) { \ |
134 | | JXL_DEBUG(JXL_DEBUG_ON_ABORT, "JXL_DASSERT: %s", #condition); \ |
135 | | ::jxl::Abort(); \ |
136 | | } \ |
137 | | } while (0) |
138 | | #else |
139 | | #define JXL_DASSERT(condition) |
140 | | #endif |
141 | | |
142 | | // A jxl::Status value from a StatusCode or Status which prints a debug message |
143 | | // when enabled. |
144 | | #define JXL_STATUS(status, format, ...) \ |
145 | 94.0k | ::jxl::StatusMessage(::jxl::Status(status), "%s:%d: " format "\n", __FILE__, \ |
146 | 94.0k | __LINE__, ##__VA_ARGS__) |
147 | | |
148 | | // Notify of an error but discard the resulting Status value. This is only |
149 | | // useful for debug builds or when building with JXL_CRASH_ON_ERROR. |
150 | | #define JXL_NOTIFY_ERROR(format, ...) \ |
151 | 0 | (void)JXL_STATUS(::jxl::StatusCode::kGenericError, "JXL_ERROR: " format, \ |
152 | 0 | ##__VA_ARGS__) |
153 | | |
154 | | // An error Status with a message. The JXL_STATUS() macro will return a Status |
155 | | // object with a kGenericError code, but the comma operator helps with |
156 | | // clang-tidy inference and potentially with optimizations. |
157 | | #define JXL_FAILURE(format, ...) \ |
158 | 20.2k | ((void)JXL_STATUS(::jxl::StatusCode::kGenericError, "JXL_FAILURE: " format, \ |
159 | 20.2k | ##__VA_ARGS__), \ |
160 | 20.2k | ::jxl::Status(::jxl::StatusCode::kGenericError)) |
161 | | |
162 | | // Always evaluates the status exactly once, so can be used for non-debug calls. |
163 | | // Returns from the current context if the passed Status expression is an error |
164 | | // (fatal or non-fatal). The return value is the passed Status. |
165 | | #define JXL_RETURN_IF_ERROR(status) \ |
166 | 363M | do { \ |
167 | 363M | ::jxl::Status jxl_return_if_error_status = (status); \ Unexecuted instantiation: encode.cc:JxlEncoderStruct::ProcessOneEnqueuedInput()::$_0::operator()() const Unexecuted instantiation: enc_fields.cc:jxl::WriteCodestreamHeaders(jxl::CodecMetadata*, jxl::BitWriter*, jxl::AuxOut*)::$_0::operator()() const Unexecuted instantiation: enc_frame.cc:jxl::(anonymous namespace)::EncodeGroups(jxl::FrameHeader const&, jxl::PassesEncoderState*, jxl::ModularFrameEncoder*, jxl::ThreadPool*, std::__1::vector<std::__1::unique_ptr<jxl::BitWriter, std::__1::default_delete<jxl::BitWriter> >, std::__1::allocator<std::__1::unique_ptr<jxl::BitWriter, std::__1::default_delete<jxl::BitWriter> > > >*, jxl::AuxOut*)::$_0::operator()(unsigned int, unsigned long) const::{lambda()#1}::operator()() const Unexecuted instantiation: enc_frame.cc:jxl::(anonymous namespace)::EncodeGroups(jxl::FrameHeader const&, jxl::PassesEncoderState*, jxl::ModularFrameEncoder*, jxl::ThreadPool*, std::__1::vector<std::__1::unique_ptr<jxl::BitWriter, std::__1::default_delete<jxl::BitWriter> >, std::__1::allocator<std::__1::unique_ptr<jxl::BitWriter, std::__1::default_delete<jxl::BitWriter> > > >*, jxl::AuxOut*)::$_0::operator()(unsigned int, unsigned long) const::{lambda()#2}::operator()() const Unexecuted instantiation: enc_frame.cc:jxl::(anonymous namespace)::EncodeGlobalACInfo(jxl::PassesEncoderState*, jxl::BitWriter*, jxl::ModularFrameEncoder*, jxl::AuxOut*)::$_0::operator()() const Unexecuted instantiation: enc_frame.cc:jxl::(anonymous namespace)::EncodeGlobalACInfo(jxl::PassesEncoderState*, jxl::BitWriter*, jxl::ModularFrameEncoder*, jxl::AuxOut*)::$_1::operator()() const Unexecuted instantiation: enc_frame.cc:jxl::(anonymous namespace)::EncodeGroups(jxl::FrameHeader const&, jxl::PassesEncoderState*, jxl::ModularFrameEncoder*, jxl::ThreadPool*, std::__1::vector<std::__1::unique_ptr<jxl::BitWriter, std::__1::default_delete<jxl::BitWriter> >, std::__1::allocator<std::__1::unique_ptr<jxl::BitWriter, std::__1::default_delete<jxl::BitWriter> > > >*, jxl::AuxOut*)::$_3::operator()() const Unexecuted instantiation: enc_frame.cc:jxl::(anonymous namespace)::EncodeFrameStreaming(JxlMemoryManagerStruct*, jxl::CompressParams const&, jxl::FrameInfo const&, jxl::CodecMetadata const*, jxl::JxlEncoderChunkedFrameAdapter&, JxlCmsInterface const&, jxl::ThreadPool*, JxlEncoderOutputProcessorWrapper*, jxl::AuxOut*)::$_0::operator()() const Unexecuted instantiation: enc_frame.cc:jxl::(anonymous namespace)::OutputAcGlobal(jxl::PassesEncoderState&, jxl::FrameDimensions const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*, JxlEncoderOutputProcessorWrapper*, jxl::AuxOut*)::$_0::operator()() const Unexecuted instantiation: enc_frame.cc:jxl::(anonymous namespace)::OutputAcGlobal(jxl::PassesEncoderState&, jxl::FrameDimensions const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*, JxlEncoderOutputProcessorWrapper*, jxl::AuxOut*)::$_1::operator()() const Unexecuted instantiation: enc_frame.cc:jxl::(anonymous namespace)::OutputAcGlobal(jxl::PassesEncoderState&, jxl::FrameDimensions const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*, JxlEncoderOutputProcessorWrapper*, jxl::AuxOut*)::$_2::operator()() const Unexecuted instantiation: enc_frame.cc:jxl::(anonymous namespace)::EncodeTOC(JxlMemoryManagerStruct*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > const&, jxl::AuxOut*)::$_0::operator()() const Unexecuted instantiation: enc_group.cc:jxl::EncodeGroupTokenizedCoefficients(unsigned long, unsigned long, unsigned long, jxl::PassesEncoderState const&, jxl::BitWriter*, jxl::AuxOut*)::$_0::operator()() const Unexecuted instantiation: enc_icc_codec.cc:jxl::WriteICC(jxl::Span<unsigned char const>, jxl::BitWriter*, jxl::LayerType, jxl::AuxOut*)::$_0::operator()() const Unexecuted instantiation: enc_modular.cc:jxl::ModularFrameEncoder::EncodeGlobalInfo(bool, jxl::BitWriter*, jxl::AuxOut*)::$_0::operator()() const Unexecuted instantiation: enc_ans.cc:jxl::BuildAndEncodeHistograms(JxlMemoryManagerStruct*, jxl::HistogramParams const&, unsigned long, std::__1::vector<std::__1::vector<jxl::Token, std::__1::allocator<jxl::Token> >, std::__1::allocator<std::__1::vector<jxl::Token, std::__1::allocator<jxl::Token> > > >&, jxl::EntropyEncodingData*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >*, jxl::BitWriter*, jxl::LayerType, jxl::AuxOut*)::$_0::operator()() const::{lambda()#1}::operator()() const Unexecuted instantiation: enc_ans.cc:jxl::BuildAndStoreANSEncodingData(JxlMemoryManagerStruct*, jxl::HistogramParams::ANSHistogramStrategy, int const*, unsigned long, unsigned long, bool, jxl::ANSEncSymbolInfo*, jxl::BitWriter*)::$_0::operator()() const Unexecuted instantiation: enc_context_map.cc:jxl::EncodeContextMap(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned long, jxl::BitWriter*, jxl::LayerType, jxl::AuxOut*)::$_0::operator()() const Unexecuted instantiation: enc_context_map.cc:jxl::EncodeContextMap(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, unsigned long, jxl::BitWriter*, jxl::LayerType, jxl::AuxOut*)::$_1::operator()() const |
168 | 363M | if (!jxl_return_if_error_status) { \ |
169 | 101k | (void)::jxl::StatusMessage( \ |
170 | 101k | jxl_return_if_error_status, \ |
171 | 101k | "%s:%d: JXL_RETURN_IF_ERROR code=%d: %s\n", __FILE__, __LINE__, \ |
172 | 101k | static_cast<int>(jxl_return_if_error_status.code()), #status); \ |
173 | 101k | return jxl_return_if_error_status; \ |
174 | 101k | } \ |
175 | 363M | } while (0) |
176 | | |
177 | | // As above, but without calling StatusMessage. Intended for bundles (see |
178 | | // fields.h), which have numerous call sites (-> relevant for code size) and do |
179 | | // not want to generate excessive messages when decoding partial headers. |
180 | | #define JXL_QUIET_RETURN_IF_ERROR(status) \ |
181 | 86.2M | do { \ |
182 | 86.2M | ::jxl::Status jxl_return_if_error_status = (status); \ |
183 | 86.2M | if (!jxl_return_if_error_status) { \ |
184 | 69.9k | return jxl_return_if_error_status; \ |
185 | 69.9k | } \ |
186 | 86.2M | } while (0) |
187 | | |
188 | | #if JXL_IS_DEBUG_BUILD |
189 | | // Debug: fatal check. |
190 | | #define JXL_ENSURE(condition) \ |
191 | | do { \ |
192 | | if (!(condition)) { \ |
193 | | ::jxl::Debug("JXL_ENSURE: %s", #condition); \ |
194 | | ::jxl::Abort(); \ |
195 | | } \ |
196 | | } while (0) |
197 | | #else |
198 | | // Release: non-fatal check of condition. If false, just return an error. |
199 | | #define JXL_ENSURE(condition) \ |
200 | 435M | do { \ |
201 | 435M | if (!(condition)) { \ |
202 | 2 | return JXL_FAILURE("JXL_ENSURE: %s", #condition); \ |
203 | 2 | } \ |
204 | 435M | } while (0) |
205 | | #endif |
206 | | |
207 | | enum class StatusCode : int32_t { |
208 | | // Non-fatal errors (negative values). |
209 | | kNotEnoughBytes = -1, |
210 | | |
211 | | // The only non-error status code. |
212 | | kOk = 0, |
213 | | |
214 | | // Fatal-errors (positive values) |
215 | | kGenericError = 1, |
216 | | }; |
217 | | |
218 | | // Drop-in replacement for bool that raises compiler warnings if not used |
219 | | // after being returned from a function. Example: |
220 | | // Status LoadFile(...) { return true; } is more compact than |
221 | | // bool JXL_MUST_USE_RESULT LoadFile(...) { return true; } |
222 | | // In case of error, the status can carry an extra error code in its value which |
223 | | // is split between fatal and non-fatal error codes. |
224 | | class JXL_MUST_USE_RESULT Status { |
225 | | public: |
226 | | // We want implicit constructor from bool to allow returning "true" or "false" |
227 | | // on a function when using Status. "true" means kOk while "false" means a |
228 | | // generic fatal error. |
229 | | // NOLINTNEXTLINE(google-explicit-constructor) |
230 | | constexpr Status(bool ok) |
231 | 389M | : code_(ok ? StatusCode::kOk : StatusCode::kGenericError) {} |
232 | | |
233 | | // NOLINTNEXTLINE(google-explicit-constructor) |
234 | 104M | constexpr Status(StatusCode code) : code_(code) {} |
235 | | |
236 | | // We also want implicit cast to bool to check for return values of functions. |
237 | | // NOLINTNEXTLINE(google-explicit-constructor) |
238 | 503M | constexpr operator bool() const { return code_ == StatusCode::kOk; } |
239 | | |
240 | 400k | constexpr StatusCode code() const { return code_; } |
241 | | |
242 | | // Returns whether the status code is a fatal error. |
243 | 269k | constexpr bool IsFatalError() const { |
244 | 269k | return static_cast<int32_t>(code_) > 0; |
245 | 269k | } |
246 | | |
247 | | private: |
248 | | StatusCode code_; |
249 | | }; |
250 | | |
251 | 0 | static constexpr Status OkStatus() { return Status(StatusCode::kOk); } Unexecuted instantiation: encode.cc:jxl::OkStatus() Unexecuted instantiation: enc_jpeg_data.cc:jxl::OkStatus() Unexecuted instantiation: enc_jpeg_data_reader.cc:jxl::OkStatus() Unexecuted instantiation: enc_jpeg_huffman_decode.cc:jxl::OkStatus() Unexecuted instantiation: color_encoding_internal.cc:jxl::OkStatus() Unexecuted instantiation: decode.cc:jxl::OkStatus() Unexecuted instantiation: fields.cc:jxl::OkStatus() Unexecuted instantiation: frame_header.cc:jxl::OkStatus() Unexecuted instantiation: headers.cc:jxl::OkStatus() Unexecuted instantiation: icc_codec.cc:jxl::OkStatus() Unexecuted instantiation: icc_codec_common.cc:jxl::OkStatus() Unexecuted instantiation: image.cc:jxl::OkStatus() Unexecuted instantiation: image_bundle.cc:jxl::OkStatus() Unexecuted instantiation: image_metadata.cc:jxl::OkStatus() Unexecuted instantiation: loop_filter.cc:jxl::OkStatus() Unexecuted instantiation: luminance.cc:jxl::OkStatus() Unexecuted instantiation: memory_manager_internal.cc:jxl::OkStatus() Unexecuted instantiation: encoding.cc:jxl::OkStatus() Unexecuted instantiation: modular_image.cc:jxl::OkStatus() Unexecuted instantiation: transform.cc:jxl::OkStatus() Unexecuted instantiation: quant_weights.cc:jxl::OkStatus() Unexecuted instantiation: quantizer.cc:jxl::OkStatus() Unexecuted instantiation: decode_to_jpeg.cc:jxl::OkStatus() Unexecuted instantiation: dec_jpeg_data.cc:jxl::OkStatus() Unexecuted instantiation: dec_jpeg_data_writer.cc:jxl::OkStatus() Unexecuted instantiation: jpeg_data.cc:jxl::OkStatus() Unexecuted instantiation: enc_aux_out.cc:jxl::OkStatus() Unexecuted instantiation: enc_bit_writer.cc:jxl::OkStatus() Unexecuted instantiation: enc_fast_lossless.cc:jxl::OkStatus() Unexecuted instantiation: enc_fields.cc:jxl::OkStatus() Unexecuted instantiation: enc_frame.cc:jxl::OkStatus() Unexecuted instantiation: enc_group.cc:jxl::OkStatus() Unexecuted instantiation: enc_heuristics.cc:jxl::OkStatus() Unexecuted instantiation: enc_icc_codec.cc:jxl::OkStatus() Unexecuted instantiation: enc_modular.cc:jxl::OkStatus() Unexecuted instantiation: enc_noise.cc:jxl::OkStatus() Unexecuted instantiation: enc_patch_dictionary.cc:jxl::OkStatus() Unexecuted instantiation: enc_photon_noise.cc:jxl::OkStatus() Unexecuted instantiation: enc_progressive_split.cc:jxl::OkStatus() Unexecuted instantiation: enc_quant_weights.cc:jxl::OkStatus() Unexecuted instantiation: enc_splines.cc:jxl::OkStatus() Unexecuted instantiation: enc_toc.cc:jxl::OkStatus() Unexecuted instantiation: enc_xyb.cc:jxl::OkStatus() Unexecuted instantiation: enc_encoding.cc:jxl::OkStatus() Unexecuted instantiation: enc_ma.cc:jxl::OkStatus() Unexecuted instantiation: enc_transform.cc:jxl::OkStatus() Unexecuted instantiation: ac_strategy.cc:jxl::OkStatus() Unexecuted instantiation: chroma_from_luma.cc:jxl::OkStatus() Unexecuted instantiation: compressed_dc.cc:jxl::OkStatus() Unexecuted instantiation: dec_ans.cc:jxl::OkStatus() Unexecuted instantiation: dec_cache.cc:jxl::OkStatus() Unexecuted instantiation: dec_context_map.cc:jxl::OkStatus() Unexecuted instantiation: dec_external_image.cc:jxl::OkStatus() Unexecuted instantiation: dec_frame.cc:jxl::OkStatus() Unexecuted instantiation: dec_group.cc:jxl::OkStatus() Unexecuted instantiation: dec_huffman.cc:jxl::OkStatus() Unexecuted instantiation: dec_modular.cc:jxl::OkStatus() Unexecuted instantiation: dec_noise.cc:jxl::OkStatus() Unexecuted instantiation: dec_patch_dictionary.cc:jxl::OkStatus() Unexecuted instantiation: dec_xyb.cc:jxl::OkStatus() Unexecuted instantiation: entropy_coder.cc:jxl::OkStatus() Unexecuted instantiation: epf.cc:jxl::OkStatus() Unexecuted instantiation: huffman_table.cc:jxl::OkStatus() Unexecuted instantiation: image_ops.cc:jxl::OkStatus() Unexecuted instantiation: dec_ma.cc:jxl::OkStatus() Unexecuted instantiation: palette.cc:jxl::OkStatus() Unexecuted instantiation: rct.cc:jxl::OkStatus() Unexecuted instantiation: squeeze.cc:jxl::OkStatus() Unexecuted instantiation: opsin_params.cc:jxl::OkStatus() Unexecuted instantiation: passes_state.cc:jxl::OkStatus() Unexecuted instantiation: render_pipeline.cc:jxl::OkStatus() Unexecuted instantiation: simple_render_pipeline.cc:jxl::OkStatus() Unexecuted instantiation: stage_blending.cc:jxl::OkStatus() Unexecuted instantiation: stage_chroma_upsampling.cc:jxl::OkStatus() Unexecuted instantiation: stage_cms.cc:jxl::OkStatus() Unexecuted instantiation: stage_epf.cc:jxl::OkStatus() Unexecuted instantiation: stage_from_linear.cc:jxl::OkStatus() Unexecuted instantiation: stage_gaborish.cc:jxl::OkStatus() Unexecuted instantiation: stage_noise.cc:jxl::OkStatus() Unexecuted instantiation: stage_patches.cc:jxl::OkStatus() Unexecuted instantiation: stage_splines.cc:jxl::OkStatus() Unexecuted instantiation: stage_spot.cc:jxl::OkStatus() Unexecuted instantiation: stage_to_linear.cc:jxl::OkStatus() Unexecuted instantiation: stage_tone_mapping.cc:jxl::OkStatus() Unexecuted instantiation: stage_upsampling.cc:jxl::OkStatus() Unexecuted instantiation: stage_write.cc:jxl::OkStatus() Unexecuted instantiation: stage_xyb.cc:jxl::OkStatus() Unexecuted instantiation: stage_ycbcr.cc:jxl::OkStatus() Unexecuted instantiation: splines.cc:jxl::OkStatus() Unexecuted instantiation: toc.cc:jxl::OkStatus() Unexecuted instantiation: butteraugli.cc:jxl::OkStatus() Unexecuted instantiation: enc_ac_strategy.cc:jxl::OkStatus() Unexecuted instantiation: enc_adaptive_quantization.cc:jxl::OkStatus() Unexecuted instantiation: enc_ans.cc:jxl::OkStatus() Unexecuted instantiation: enc_butteraugli_comparator.cc:jxl::OkStatus() Unexecuted instantiation: enc_cache.cc:jxl::OkStatus() Unexecuted instantiation: enc_chroma_from_luma.cc:jxl::OkStatus() Unexecuted instantiation: enc_cluster.cc:jxl::OkStatus() Unexecuted instantiation: enc_coeff_order.cc:jxl::OkStatus() Unexecuted instantiation: enc_context_map.cc:jxl::OkStatus() Unexecuted instantiation: enc_debug_image.cc:jxl::OkStatus() Unexecuted instantiation: enc_dot_dictionary.cc:jxl::OkStatus() Unexecuted instantiation: enc_entropy_coder.cc:jxl::OkStatus() Unexecuted instantiation: enc_external_image.cc:jxl::OkStatus() Unexecuted instantiation: enc_gaborish.cc:jxl::OkStatus() Unexecuted instantiation: enc_huffman.cc:jxl::OkStatus() Unexecuted instantiation: enc_huffman_tree.cc:jxl::OkStatus() Unexecuted instantiation: enc_image_bundle.cc:jxl::OkStatus() Unexecuted instantiation: enc_palette.cc:jxl::OkStatus() Unexecuted instantiation: enc_rct.cc:jxl::OkStatus() Unexecuted instantiation: enc_squeeze.cc:jxl::OkStatus() Unexecuted instantiation: ans_common.cc:jxl::OkStatus() Unexecuted instantiation: blending.cc:jxl::OkStatus() Unexecuted instantiation: coeff_order.cc:jxl::OkStatus() Unexecuted instantiation: convolve_separable5.cc:jxl::OkStatus() Unexecuted instantiation: convolve_slow.cc:jxl::OkStatus() Unexecuted instantiation: convolve_symmetric5.cc:jxl::OkStatus() Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::OkStatus() Unexecuted instantiation: enc_detect_dots.cc:jxl::OkStatus() Unexecuted instantiation: enc_linalg.cc:jxl::OkStatus() Unexecuted instantiation: dec_group_border.cc:jxl::OkStatus() Unexecuted instantiation: jxl_cms.cc:jxl::OkStatus() |
252 | | |
253 | | // Helper function to create a Status and print the debug message or abort when |
254 | | // needed. |
255 | | inline JXL_FORMAT(2, 3) Status |
256 | 196k | StatusMessage(const Status status, const char* format, ...) { |
257 | | // This block will be optimized out when JXL_IS_DEBUG_BUILD is disabled. |
258 | 196k | if ((JXL_IS_DEBUG_BUILD && status.IsFatalError()) || |
259 | 196k | (JXL_DEBUG_ON_ALL_ERROR && !status)) { |
260 | 0 | va_list args; |
261 | 0 | va_start(args, format); |
262 | | #ifdef USE_ANDROID_LOGGER |
263 | | android_vprintf(format, args); |
264 | | #else |
265 | 0 | vfprintf(stderr, format, args); |
266 | 0 | #endif |
267 | 0 | va_end(args); |
268 | 0 | } |
269 | | #if JXL_CRASH_ON_ERROR |
270 | | // JXL_CRASH_ON_ERROR means to Abort() only on non-fatal errors. |
271 | | if (status.IsFatalError()) { |
272 | | ::jxl::Abort(); |
273 | | } |
274 | | #endif // JXL_CRASH_ON_ERROR |
275 | 196k | return status; |
276 | 196k | } |
277 | | |
278 | | template <typename T> |
279 | | class JXL_MUST_USE_RESULT StatusOr { |
280 | | static_assert(!std::is_convertible<StatusCode, T>::value && |
281 | | !std::is_convertible<T, StatusCode>::value, |
282 | | "You cannot make a StatusOr with a type convertible from or to " |
283 | | "StatusCode"); |
284 | | static_assert(std::is_move_constructible<T>::value && |
285 | | std::is_move_assignable<T>::value, |
286 | | "T must be move constructible and move assignable"); |
287 | | |
288 | | public: |
289 | | // NOLINTNEXTLINE(google-explicit-constructor) |
290 | 2 | StatusOr(StatusCode code) : code_(code) { |
291 | 2 | JXL_DASSERT(code_ != StatusCode::kOk); |
292 | 2 | } Unexecuted instantiation: jxl::StatusOr<jxl::PaddedBytes>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<JxlOutputProcessorBuffer>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<float> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Image3<float> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::AlignedMemory>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<int> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Channel>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Image>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<float>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<unsigned char> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Image3<int> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<int>, std::__1::default_delete<jxl::ACImageT<int> > > >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::AlignedArray<jxl::GroupDecCache> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::ModularStreamId>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::ModularFrameEncoder>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<std::__1::vector<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > >, std::__1::allocator<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > > > > >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<std::__1::vector<jxl::PropertyDecisionNode, std::__1::allocator<jxl::PropertyDecisionNode> > >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::AcStrategyImage>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<signed char> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::ColorCorrelationMap>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::ANSSymbolReader>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<hwy::float16_t> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<unsigned int> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<short> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Image3<short> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<short>, std::__1::default_delete<jxl::ACImageT<short> > > >::StatusOr(jxl::StatusCode) Unexecuted instantiation: dec_group.cc:jxl::StatusOr<jxl::(anonymous namespace)::GetBlockFromEncoder>::StatusOr(jxl::StatusCode) jxl::StatusOr<std::__1::unique_ptr<jxl::RenderPipeline, std::__1::default_delete<jxl::RenderPipeline> > >::StatusOr(jxl::StatusCode) Line | Count | Source | 290 | 2 | StatusOr(StatusCode code) : code_(code) { | 291 | 2 | JXL_DASSERT(code_ != StatusCode::kOk); | 292 | 2 | } |
Unexecuted instantiation: jxl::StatusOr<jxl::QuantizedSpline>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<std::__1::unique_ptr<jxl::ButteraugliComparator, std::__1::default_delete<jxl::ButteraugliComparator> > >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::ImageBundle>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<unsigned int>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<unsigned long>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::Image3<unsigned char> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::StatusOr<jxl::(anonymous namespace)::Rows>::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::RectT<long> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: jxl::StatusOr<jxl::RectT<unsigned long> >::StatusOr(jxl::StatusCode) Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<std::__1::vector<jxl::(anonymous namespace)::ConnectedComponent, std::__1::allocator<jxl::(anonymous namespace)::ConnectedComponent> > >::StatusOr(jxl::StatusCode) Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<jxl::(anonymous namespace)::GaussianEllipse>::StatusOr(jxl::StatusCode) |
293 | | |
294 | | // NOLINTNEXTLINE(google-explicit-constructor) |
295 | 2 | StatusOr(Status status) : StatusOr(status.code()) {} Unexecuted instantiation: jxl::StatusOr<jxl::PaddedBytes>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<JxlOutputProcessorBuffer>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<float> >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Image3<float> >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::AlignedMemory>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<int> >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Channel>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Image>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<float>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<unsigned char> >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Image3<int> >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<int>, std::__1::default_delete<jxl::ACImageT<int> > > >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::AlignedArray<jxl::GroupDecCache> >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::ModularStreamId>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::ModularFrameEncoder>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<std::__1::vector<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > >, std::__1::allocator<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > > > > >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<std::__1::vector<jxl::PropertyDecisionNode, std::__1::allocator<jxl::PropertyDecisionNode> > >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::AcStrategyImage>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<signed char> >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::ColorCorrelationMap>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::ANSSymbolReader>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<hwy::float16_t> >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<unsigned int> >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<short> >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Image3<short> >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<short>, std::__1::default_delete<jxl::ACImageT<short> > > >::StatusOr(jxl::Status) Unexecuted instantiation: dec_group.cc:jxl::StatusOr<jxl::(anonymous namespace)::GetBlockFromEncoder>::StatusOr(jxl::Status) jxl::StatusOr<std::__1::unique_ptr<jxl::RenderPipeline, std::__1::default_delete<jxl::RenderPipeline> > >::StatusOr(jxl::Status) Line | Count | Source | 295 | 2 | StatusOr(Status status) : StatusOr(status.code()) {} |
Unexecuted instantiation: jxl::StatusOr<jxl::QuantizedSpline>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<std::__1::unique_ptr<jxl::ButteraugliComparator, std::__1::default_delete<jxl::ButteraugliComparator> > >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::ImageBundle>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<unsigned int>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<unsigned long>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::Image3<unsigned char> >::StatusOr(jxl::Status) Unexecuted instantiation: low_memory_render_pipeline.cc:jxl::StatusOr<jxl::(anonymous namespace)::Rows>::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::RectT<long> >::StatusOr(jxl::Status) Unexecuted instantiation: jxl::StatusOr<jxl::RectT<unsigned long> >::StatusOr(jxl::Status) Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<std::__1::vector<jxl::(anonymous namespace)::ConnectedComponent, std::__1::allocator<jxl::(anonymous namespace)::ConnectedComponent> > >::StatusOr(jxl::Status) Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<jxl::(anonymous namespace)::GaussianEllipse>::StatusOr(jxl::Status) |
296 | | |
297 | | // NOLINTNEXTLINE(google-explicit-constructor) |
298 | 104M | StatusOr(T&& value) : code_(StatusCode::kOk) { |
299 | 104M | new (&storage_.data_) T(std::move(value)); |
300 | 104M | } jxl::StatusOr<jxl::PaddedBytes>::StatusOr(jxl::PaddedBytes&&) Line | Count | Source | 298 | 52.7k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 52.7k | new (&storage_.data_) T(std::move(value)); | 300 | 52.7k | } |
Unexecuted instantiation: jxl::StatusOr<JxlOutputProcessorBuffer>::StatusOr(JxlOutputProcessorBuffer&&) jxl::StatusOr<jxl::Plane<float> >::StatusOr(jxl::Plane<float>&&) Line | Count | Source | 298 | 49.8M | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 49.8M | new (&storage_.data_) T(std::move(value)); | 300 | 49.8M | } |
jxl::StatusOr<jxl::Image3<float> >::StatusOr(jxl::Image3<float>&&) Line | Count | Source | 298 | 113k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 113k | new (&storage_.data_) T(std::move(value)); | 300 | 113k | } |
jxl::StatusOr<jxl::AlignedMemory>::StatusOr(jxl::AlignedMemory&&) Line | Count | Source | 298 | 51.3M | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 51.3M | new (&storage_.data_) T(std::move(value)); | 300 | 51.3M | } |
jxl::StatusOr<jxl::Plane<int> >::StatusOr(jxl::Plane<int>&&) Line | Count | Source | 298 | 1.27M | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 1.27M | new (&storage_.data_) T(std::move(value)); | 300 | 1.27M | } |
jxl::StatusOr<jxl::Channel>::StatusOr(jxl::Channel&&) Line | Count | Source | 298 | 886k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 886k | new (&storage_.data_) T(std::move(value)); | 300 | 886k | } |
jxl::StatusOr<jxl::Image>::StatusOr(jxl::Image&&) Line | Count | Source | 298 | 151k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 151k | new (&storage_.data_) T(std::move(value)); | 300 | 151k | } |
jxl::StatusOr<float>::StatusOr(float&&) Line | Count | Source | 298 | 151k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 151k | new (&storage_.data_) T(std::move(value)); | 300 | 151k | } |
jxl::StatusOr<jxl::Plane<unsigned char> >::StatusOr(jxl::Plane<unsigned char>&&) Line | Count | Source | 298 | 131k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 131k | new (&storage_.data_) T(std::move(value)); | 300 | 131k | } |
jxl::StatusOr<jxl::Image3<int> >::StatusOr(jxl::Image3<int>&&) Line | Count | Source | 298 | 11.8k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 11.8k | new (&storage_.data_) T(std::move(value)); | 300 | 11.8k | } |
jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<int>, std::__1::default_delete<jxl::ACImageT<int> > > >::StatusOr(std::__1::unique_ptr<jxl::ACImageT<int>, std::__1::default_delete<jxl::ACImageT<int> > >&&) Line | Count | Source | 298 | 1.56k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 1.56k | new (&storage_.data_) T(std::move(value)); | 300 | 1.56k | } |
Unexecuted instantiation: jxl::StatusOr<jxl::AlignedArray<jxl::GroupDecCache> >::StatusOr(jxl::AlignedArray<jxl::GroupDecCache>&&) jxl::StatusOr<jxl::ModularStreamId>::StatusOr(jxl::ModularStreamId&&) Line | Count | Source | 298 | 84 | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 84 | new (&storage_.data_) T(std::move(value)); | 300 | 84 | } |
Unexecuted instantiation: jxl::StatusOr<jxl::ModularFrameEncoder>::StatusOr(jxl::ModularFrameEncoder&&) Unexecuted instantiation: jxl::StatusOr<std::__1::vector<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > >, std::__1::allocator<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > > > > >::StatusOr(std::__1::vector<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > >, std::__1::allocator<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > > > >&&) Unexecuted instantiation: jxl::StatusOr<std::__1::vector<jxl::PropertyDecisionNode, std::__1::allocator<jxl::PropertyDecisionNode> > >::StatusOr(std::__1::vector<jxl::PropertyDecisionNode, std::__1::allocator<jxl::PropertyDecisionNode> >&&) jxl::StatusOr<jxl::AcStrategyImage>::StatusOr(jxl::AcStrategyImage&&) Line | Count | Source | 298 | 43.9k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 43.9k | new (&storage_.data_) T(std::move(value)); | 300 | 43.9k | } |
jxl::StatusOr<jxl::Plane<signed char> >::StatusOr(jxl::Plane<signed char>&&) Line | Count | Source | 298 | 87.8k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 87.8k | new (&storage_.data_) T(std::move(value)); | 300 | 87.8k | } |
jxl::StatusOr<jxl::ColorCorrelationMap>::StatusOr(jxl::ColorCorrelationMap&&) Line | Count | Source | 298 | 43.9k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 43.9k | new (&storage_.data_) T(std::move(value)); | 300 | 43.9k | } |
jxl::StatusOr<jxl::ANSSymbolReader>::StatusOr(jxl::ANSSymbolReader&&) Line | Count | Source | 298 | 148k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 148k | new (&storage_.data_) T(std::move(value)); | 300 | 148k | } |
Unexecuted instantiation: jxl::StatusOr<jxl::Plane<hwy::float16_t> >::StatusOr(jxl::Plane<hwy::float16_t>&&) Unexecuted instantiation: jxl::StatusOr<jxl::Plane<unsigned int> >::StatusOr(jxl::Plane<unsigned int>&&) jxl::StatusOr<jxl::Plane<short> >::StatusOr(jxl::Plane<short>&&) Line | Count | Source | 298 | 25.9k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 25.9k | new (&storage_.data_) T(std::move(value)); | 300 | 25.9k | } |
jxl::StatusOr<jxl::Image3<short> >::StatusOr(jxl::Image3<short>&&) Line | Count | Source | 298 | 8.65k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 8.65k | new (&storage_.data_) T(std::move(value)); | 300 | 8.65k | } |
jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<short>, std::__1::default_delete<jxl::ACImageT<short> > > >::StatusOr(std::__1::unique_ptr<jxl::ACImageT<short>, std::__1::default_delete<jxl::ACImageT<short> > >&&) Line | Count | Source | 298 | 8.65k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 8.65k | new (&storage_.data_) T(std::move(value)); | 300 | 8.65k | } |
Unexecuted instantiation: dec_group.cc:jxl::StatusOr<jxl::(anonymous namespace)::GetBlockFromEncoder>::StatusOr(jxl::(anonymous namespace)::GetBlockFromEncoder&&) jxl::StatusOr<std::__1::unique_ptr<jxl::RenderPipeline, std::__1::default_delete<jxl::RenderPipeline> > >::StatusOr(std::__1::unique_ptr<jxl::RenderPipeline, std::__1::default_delete<jxl::RenderPipeline> >&&) Line | Count | Source | 298 | 37.8k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 37.8k | new (&storage_.data_) T(std::move(value)); | 300 | 37.8k | } |
Unexecuted instantiation: jxl::StatusOr<jxl::QuantizedSpline>::StatusOr(jxl::QuantizedSpline&&) Unexecuted instantiation: jxl::StatusOr<std::__1::unique_ptr<jxl::ButteraugliComparator, std::__1::default_delete<jxl::ButteraugliComparator> > >::StatusOr(std::__1::unique_ptr<jxl::ButteraugliComparator, std::__1::default_delete<jxl::ButteraugliComparator> >&&) Unexecuted instantiation: jxl::StatusOr<jxl::ImageBundle>::StatusOr(jxl::ImageBundle&&) Unexecuted instantiation: jxl::StatusOr<unsigned int>::StatusOr(unsigned int&&) Unexecuted instantiation: jxl::StatusOr<unsigned long>::StatusOr(unsigned long&&) Unexecuted instantiation: jxl::StatusOr<jxl::Image3<unsigned char> >::StatusOr(jxl::Image3<unsigned char>&&) jxl::StatusOr<jxl::RectT<long> >::StatusOr(jxl::RectT<long>&&) Line | Count | Source | 298 | 163k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 163k | new (&storage_.data_) T(std::move(value)); | 300 | 163k | } |
low_memory_render_pipeline.cc:jxl::StatusOr<jxl::(anonymous namespace)::Rows>::StatusOr(jxl::(anonymous namespace)::Rows&&) Line | Count | Source | 298 | 42.4k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 42.4k | new (&storage_.data_) T(std::move(value)); | 300 | 42.4k | } |
jxl::StatusOr<jxl::RectT<unsigned long> >::StatusOr(jxl::RectT<unsigned long>&&) Line | Count | Source | 298 | 318k | StatusOr(T&& value) : code_(StatusCode::kOk) { | 299 | 318k | new (&storage_.data_) T(std::move(value)); | 300 | 318k | } |
Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<std::__1::vector<jxl::(anonymous namespace)::ConnectedComponent, std::__1::allocator<jxl::(anonymous namespace)::ConnectedComponent> > >::StatusOr(std::__1::vector<jxl::(anonymous namespace)::ConnectedComponent, std::__1::allocator<jxl::(anonymous namespace)::ConnectedComponent> >&&) Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<jxl::(anonymous namespace)::GaussianEllipse>::StatusOr(jxl::(anonymous namespace)::GaussianEllipse&&) |
301 | | |
302 | | StatusOr(StatusOr&& other) noexcept { |
303 | | if (other.ok()) { |
304 | | new (&storage_.data_) T(std::move(other.storage_.data_)); |
305 | | } |
306 | | code_ = other.code_; |
307 | | } |
308 | | |
309 | | StatusOr& operator=(StatusOr&& other) noexcept { |
310 | | if (this == &other) return *this; |
311 | | if (ok() && other.ok()) { |
312 | | storage_.data_ = std::move(other.storage_.data_); |
313 | | } else if (other.ok()) { |
314 | | new (&storage_.data_) T(std::move(other.storage_.data_)); |
315 | | } else if (ok()) { |
316 | | storage_.data_.~T(); |
317 | | } |
318 | | code_ = other.code_; |
319 | | return *this; |
320 | | } |
321 | | |
322 | | StatusOr(const StatusOr&) = delete; |
323 | | StatusOr operator=(const StatusOr&) = delete; |
324 | | |
325 | 0 | bool ok() const { return code_ == StatusCode::kOk; } |
326 | 104M | Status status() const { return code_; } jxl::StatusOr<jxl::AlignedMemory>::status() const Line | Count | Source | 326 | 51.3M | Status status() const { return code_; } |
Unexecuted instantiation: jxl::StatusOr<JxlOutputProcessorBuffer>::status() const jxl::StatusOr<jxl::Image3<float> >::status() const Line | Count | Source | 326 | 113k | Status status() const { return code_; } |
jxl::StatusOr<jxl::Plane<float> >::status() const Line | Count | Source | 326 | 49.8M | Status status() const { return code_; } |
jxl::StatusOr<jxl::Plane<int> >::status() const Line | Count | Source | 326 | 1.27M | Status status() const { return code_; } |
jxl::StatusOr<jxl::PaddedBytes>::status() const Line | Count | Source | 326 | 52.7k | Status status() const { return code_; } |
jxl::StatusOr<jxl::ANSSymbolReader>::status() const Line | Count | Source | 326 | 148k | Status status() const { return code_; } |
jxl::StatusOr<jxl::Channel>::status() const Line | Count | Source | 326 | 888k | Status status() const { return code_; } |
jxl::StatusOr<float>::status() const Line | Count | Source | 326 | 151k | Status status() const { return code_; } |
Unexecuted instantiation: jxl::StatusOr<jxl::ModularFrameEncoder>::status() const jxl::StatusOr<jxl::AcStrategyImage>::status() const Line | Count | Source | 326 | 43.9k | Status status() const { return code_; } |
jxl::StatusOr<jxl::Plane<unsigned char> >::status() const Line | Count | Source | 326 | 131k | Status status() const { return code_; } |
jxl::StatusOr<jxl::ColorCorrelationMap>::status() const Line | Count | Source | 326 | 43.9k | Status status() const { return code_; } |
jxl::StatusOr<jxl::Image3<int> >::status() const Line | Count | Source | 326 | 11.8k | Status status() const { return code_; } |
jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<int>, std::__1::default_delete<jxl::ACImageT<int> > > >::status() const Line | Count | Source | 326 | 1.56k | Status status() const { return code_; } |
Unexecuted instantiation: jxl::StatusOr<unsigned long>::status() const Unexecuted instantiation: jxl::StatusOr<std::__1::unique_ptr<jxl::ButteraugliComparator, std::__1::default_delete<jxl::ButteraugliComparator> > >::status() const Unexecuted instantiation: jxl::StatusOr<jxl::AlignedArray<jxl::GroupDecCache> >::status() const jxl::StatusOr<jxl::ModularStreamId>::status() const Line | Count | Source | 326 | 84 | Status status() const { return code_; } |
jxl::StatusOr<jxl::Image>::status() const Line | Count | Source | 326 | 150k | Status status() const { return code_; } |
Unexecuted instantiation: jxl::StatusOr<std::__1::vector<jxl::PropertyDecisionNode, std::__1::allocator<jxl::PropertyDecisionNode> > >::status() const Unexecuted instantiation: jxl::StatusOr<std::__1::vector<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > >, std::__1::allocator<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > > > > >::status() const jxl::StatusOr<jxl::Plane<signed char> >::status() const Line | Count | Source | 326 | 87.8k | Status status() const { return code_; } |
jxl::StatusOr<std::__1::unique_ptr<jxl::RenderPipeline, std::__1::default_delete<jxl::RenderPipeline> > >::status() const Line | Count | Source | 326 | 37.8k | Status status() const { return code_; } |
Unexecuted instantiation: jxl::StatusOr<jxl::Plane<hwy::float16_t> >::status() const Unexecuted instantiation: jxl::StatusOr<jxl::Plane<unsigned int> >::status() const jxl::StatusOr<jxl::Plane<short> >::status() const Line | Count | Source | 326 | 25.9k | Status status() const { return code_; } |
jxl::StatusOr<jxl::Image3<short> >::status() const Line | Count | Source | 326 | 8.65k | Status status() const { return code_; } |
jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<short>, std::__1::default_delete<jxl::ACImageT<short> > > >::status() const Line | Count | Source | 326 | 8.65k | Status status() const { return code_; } |
Unexecuted instantiation: dec_group.cc:jxl::StatusOr<jxl::(anonymous namespace)::GetBlockFromEncoder>::status() const Unexecuted instantiation: jxl::StatusOr<jxl::ImageBundle>::status() const Unexecuted instantiation: jxl::StatusOr<unsigned int>::status() const Unexecuted instantiation: jxl::StatusOr<jxl::Image3<unsigned char> >::status() const jxl::StatusOr<jxl::RectT<long> >::status() const Line | Count | Source | 326 | 163k | Status status() const { return code_; } |
jxl::StatusOr<jxl::RectT<unsigned long> >::status() const Line | Count | Source | 326 | 318k | Status status() const { return code_; } |
low_memory_render_pipeline.cc:jxl::StatusOr<jxl::(anonymous namespace)::Rows>::status() const Line | Count | Source | 326 | 42.4k | Status status() const { return code_; } |
Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<jxl::(anonymous namespace)::GaussianEllipse>::status() const Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<std::__1::vector<jxl::(anonymous namespace)::ConnectedComponent, std::__1::allocator<jxl::(anonymous namespace)::ConnectedComponent> > >::status() const |
327 | | |
328 | | // Only call this if you are absolutely sure that `ok()` is true. |
329 | | // Never call this manually: rely on JXL_ASSIGN_OR. |
330 | 104M | T value_() && { |
331 | 104M | JXL_DASSERT(ok()); |
332 | 104M | return std::move(storage_.data_); |
333 | 104M | } jxl::StatusOr<jxl::AlignedMemory>::value_() && Line | Count | Source | 330 | 51.3M | T value_() && { | 331 | 51.3M | JXL_DASSERT(ok()); | 332 | 51.3M | return std::move(storage_.data_); | 333 | 51.3M | } |
jxl::StatusOr<jxl::PaddedBytes>::value_() && Line | Count | Source | 330 | 52.7k | T value_() && { | 331 | 52.7k | JXL_DASSERT(ok()); | 332 | 52.7k | return std::move(storage_.data_); | 333 | 52.7k | } |
Unexecuted instantiation: jxl::StatusOr<JxlOutputProcessorBuffer>::value_() && jxl::StatusOr<jxl::Image3<float> >::value_() && Line | Count | Source | 330 | 113k | T value_() && { | 331 | 113k | JXL_DASSERT(ok()); | 332 | 113k | return std::move(storage_.data_); | 333 | 113k | } |
jxl::StatusOr<jxl::Plane<float> >::value_() && Line | Count | Source | 330 | 49.8M | T value_() && { | 331 | 49.8M | JXL_DASSERT(ok()); | 332 | 49.8M | return std::move(storage_.data_); | 333 | 49.8M | } |
jxl::StatusOr<jxl::Plane<int> >::value_() && Line | Count | Source | 330 | 1.27M | T value_() && { | 331 | 1.27M | JXL_DASSERT(ok()); | 332 | 1.27M | return std::move(storage_.data_); | 333 | 1.27M | } |
jxl::StatusOr<jxl::ANSSymbolReader>::value_() && Line | Count | Source | 330 | 148k | T value_() && { | 331 | 148k | JXL_DASSERT(ok()); | 332 | 148k | return std::move(storage_.data_); | 333 | 148k | } |
jxl::StatusOr<jxl::Channel>::value_() && Line | Count | Source | 330 | 888k | T value_() && { | 331 | 888k | JXL_DASSERT(ok()); | 332 | 888k | return std::move(storage_.data_); | 333 | 888k | } |
jxl::StatusOr<float>::value_() && Line | Count | Source | 330 | 151k | T value_() && { | 331 | 151k | JXL_DASSERT(ok()); | 332 | 151k | return std::move(storage_.data_); | 333 | 151k | } |
Unexecuted instantiation: jxl::StatusOr<jxl::ModularFrameEncoder>::value_() && jxl::StatusOr<jxl::AcStrategyImage>::value_() && Line | Count | Source | 330 | 43.9k | T value_() && { | 331 | 43.9k | JXL_DASSERT(ok()); | 332 | 43.9k | return std::move(storage_.data_); | 333 | 43.9k | } |
jxl::StatusOr<jxl::Plane<unsigned char> >::value_() && Line | Count | Source | 330 | 131k | T value_() && { | 331 | 131k | JXL_DASSERT(ok()); | 332 | 131k | return std::move(storage_.data_); | 333 | 131k | } |
jxl::StatusOr<jxl::ColorCorrelationMap>::value_() && Line | Count | Source | 330 | 43.9k | T value_() && { | 331 | 43.9k | JXL_DASSERT(ok()); | 332 | 43.9k | return std::move(storage_.data_); | 333 | 43.9k | } |
jxl::StatusOr<jxl::Image3<int> >::value_() && Line | Count | Source | 330 | 11.8k | T value_() && { | 331 | 11.8k | JXL_DASSERT(ok()); | 332 | 11.8k | return std::move(storage_.data_); | 333 | 11.8k | } |
jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<int>, std::__1::default_delete<jxl::ACImageT<int> > > >::value_() && Line | Count | Source | 330 | 1.56k | T value_() && { | 331 | 1.56k | JXL_DASSERT(ok()); | 332 | 1.56k | return std::move(storage_.data_); | 333 | 1.56k | } |
Unexecuted instantiation: jxl::StatusOr<unsigned long>::value_() && Unexecuted instantiation: jxl::StatusOr<std::__1::unique_ptr<jxl::ButteraugliComparator, std::__1::default_delete<jxl::ButteraugliComparator> > >::value_() && Unexecuted instantiation: jxl::StatusOr<jxl::AlignedArray<jxl::GroupDecCache> >::value_() && jxl::StatusOr<jxl::ModularStreamId>::value_() && Line | Count | Source | 330 | 84 | T value_() && { | 331 | 84 | JXL_DASSERT(ok()); | 332 | 84 | return std::move(storage_.data_); | 333 | 84 | } |
jxl::StatusOr<jxl::Image>::value_() && Line | Count | Source | 330 | 150k | T value_() && { | 331 | 150k | JXL_DASSERT(ok()); | 332 | 150k | return std::move(storage_.data_); | 333 | 150k | } |
Unexecuted instantiation: jxl::StatusOr<std::__1::vector<jxl::PropertyDecisionNode, std::__1::allocator<jxl::PropertyDecisionNode> > >::value_() && Unexecuted instantiation: jxl::StatusOr<std::__1::vector<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > >, std::__1::allocator<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > > > > >::value_() && jxl::StatusOr<jxl::Plane<signed char> >::value_() && Line | Count | Source | 330 | 87.8k | T value_() && { | 331 | 87.8k | JXL_DASSERT(ok()); | 332 | 87.8k | return std::move(storage_.data_); | 333 | 87.8k | } |
jxl::StatusOr<std::__1::unique_ptr<jxl::RenderPipeline, std::__1::default_delete<jxl::RenderPipeline> > >::value_() && Line | Count | Source | 330 | 37.8k | T value_() && { | 331 | 37.8k | JXL_DASSERT(ok()); | 332 | 37.8k | return std::move(storage_.data_); | 333 | 37.8k | } |
Unexecuted instantiation: jxl::StatusOr<jxl::Plane<hwy::float16_t> >::value_() && Unexecuted instantiation: jxl::StatusOr<jxl::Plane<unsigned int> >::value_() && jxl::StatusOr<jxl::Plane<short> >::value_() && Line | Count | Source | 330 | 25.9k | T value_() && { | 331 | 25.9k | JXL_DASSERT(ok()); | 332 | 25.9k | return std::move(storage_.data_); | 333 | 25.9k | } |
jxl::StatusOr<jxl::Image3<short> >::value_() && Line | Count | Source | 330 | 8.65k | T value_() && { | 331 | 8.65k | JXL_DASSERT(ok()); | 332 | 8.65k | return std::move(storage_.data_); | 333 | 8.65k | } |
jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<short>, std::__1::default_delete<jxl::ACImageT<short> > > >::value_() && Line | Count | Source | 330 | 8.65k | T value_() && { | 331 | 8.65k | JXL_DASSERT(ok()); | 332 | 8.65k | return std::move(storage_.data_); | 333 | 8.65k | } |
Unexecuted instantiation: dec_group.cc:jxl::StatusOr<jxl::(anonymous namespace)::GetBlockFromEncoder>::value_() && Unexecuted instantiation: jxl::StatusOr<jxl::ImageBundle>::value_() && Unexecuted instantiation: jxl::StatusOr<unsigned int>::value_() && Unexecuted instantiation: jxl::StatusOr<jxl::Image3<unsigned char> >::value_() && jxl::StatusOr<jxl::RectT<long> >::value_() && Line | Count | Source | 330 | 163k | T value_() && { | 331 | 163k | JXL_DASSERT(ok()); | 332 | 163k | return std::move(storage_.data_); | 333 | 163k | } |
jxl::StatusOr<jxl::RectT<unsigned long> >::value_() && Line | Count | Source | 330 | 318k | T value_() && { | 331 | 318k | JXL_DASSERT(ok()); | 332 | 318k | return std::move(storage_.data_); | 333 | 318k | } |
low_memory_render_pipeline.cc:jxl::StatusOr<jxl::(anonymous namespace)::Rows>::value_() && Line | Count | Source | 330 | 42.4k | T value_() && { | 331 | 42.4k | JXL_DASSERT(ok()); | 332 | 42.4k | return std::move(storage_.data_); | 333 | 42.4k | } |
Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<jxl::(anonymous namespace)::GaussianEllipse>::value_() && Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<std::__1::vector<jxl::(anonymous namespace)::ConnectedComponent, std::__1::allocator<jxl::(anonymous namespace)::ConnectedComponent> > >::value_() && |
334 | | |
335 | 104M | ~StatusOr() { |
336 | 104M | if (code_ == StatusCode::kOk) { |
337 | 104M | storage_.data_.~T(); |
338 | 104M | } |
339 | 104M | } jxl::StatusOr<jxl::AlignedMemory>::~StatusOr() Line | Count | Source | 335 | 51.3M | ~StatusOr() { | 336 | 51.3M | if (code_ == StatusCode::kOk) { | 337 | 51.3M | storage_.data_.~T(); | 338 | 51.3M | } | 339 | 51.3M | } |
jxl::StatusOr<jxl::PaddedBytes>::~StatusOr() Line | Count | Source | 335 | 52.7k | ~StatusOr() { | 336 | 52.7k | if (code_ == StatusCode::kOk) { | 337 | 52.7k | storage_.data_.~T(); | 338 | 52.7k | } | 339 | 52.7k | } |
Unexecuted instantiation: jxl::StatusOr<JxlOutputProcessorBuffer>::~StatusOr() jxl::StatusOr<jxl::Plane<float> >::~StatusOr() Line | Count | Source | 335 | 49.8M | ~StatusOr() { | 336 | 49.8M | if (code_ == StatusCode::kOk) { | 337 | 49.8M | storage_.data_.~T(); | 338 | 49.8M | } | 339 | 49.8M | } |
jxl::StatusOr<jxl::Image3<float> >::~StatusOr() Line | Count | Source | 335 | 113k | ~StatusOr() { | 336 | 113k | if (code_ == StatusCode::kOk) { | 337 | 113k | storage_.data_.~T(); | 338 | 113k | } | 339 | 113k | } |
jxl::StatusOr<jxl::ANSSymbolReader>::~StatusOr() Line | Count | Source | 335 | 148k | ~StatusOr() { | 336 | 148k | if (code_ == StatusCode::kOk) { | 337 | 148k | storage_.data_.~T(); | 338 | 148k | } | 339 | 148k | } |
jxl::StatusOr<jxl::Plane<int> >::~StatusOr() Line | Count | Source | 335 | 1.28M | ~StatusOr() { | 336 | 1.28M | if (code_ == StatusCode::kOk) { | 337 | 1.28M | storage_.data_.~T(); | 338 | 1.28M | } | 339 | 1.28M | } |
jxl::StatusOr<jxl::Channel>::~StatusOr() Line | Count | Source | 335 | 889k | ~StatusOr() { | 336 | 889k | if (code_ == StatusCode::kOk) { | 337 | 889k | storage_.data_.~T(); | 338 | 889k | } | 339 | 889k | } |
jxl::StatusOr<float>::~StatusOr() Line | Count | Source | 335 | 151k | ~StatusOr() { | 336 | 151k | if (code_ == StatusCode::kOk) { | 337 | 151k | storage_.data_.~T(); | 338 | 151k | } | 339 | 151k | } |
jxl::StatusOr<jxl::Image3<int> >::~StatusOr() Line | Count | Source | 335 | 11.8k | ~StatusOr() { | 336 | 11.8k | if (code_ == StatusCode::kOk) { | 337 | 11.8k | storage_.data_.~T(); | 338 | 11.8k | } | 339 | 11.8k | } |
jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<int>, std::__1::default_delete<jxl::ACImageT<int> > > >::~StatusOr() Line | Count | Source | 335 | 1.56k | ~StatusOr() { | 336 | 1.56k | if (code_ == StatusCode::kOk) { | 337 | 1.56k | storage_.data_.~T(); | 338 | 1.56k | } | 339 | 1.56k | } |
Unexecuted instantiation: jxl::StatusOr<unsigned long>::~StatusOr() jxl::StatusOr<jxl::Plane<unsigned char> >::~StatusOr() Line | Count | Source | 335 | 131k | ~StatusOr() { | 336 | 131k | if (code_ == StatusCode::kOk) { | 337 | 131k | storage_.data_.~T(); | 338 | 131k | } | 339 | 131k | } |
jxl::StatusOr<jxl::ColorCorrelationMap>::~StatusOr() Line | Count | Source | 335 | 43.9k | ~StatusOr() { | 336 | 43.9k | if (code_ == StatusCode::kOk) { | 337 | 43.9k | storage_.data_.~T(); | 338 | 43.9k | } | 339 | 43.9k | } |
jxl::StatusOr<jxl::AcStrategyImage>::~StatusOr() Line | Count | Source | 335 | 43.9k | ~StatusOr() { | 336 | 43.9k | if (code_ == StatusCode::kOk) { | 337 | 43.9k | storage_.data_.~T(); | 338 | 43.9k | } | 339 | 43.9k | } |
Unexecuted instantiation: jxl::StatusOr<jxl::ModularFrameEncoder>::~StatusOr() Unexecuted instantiation: jxl::StatusOr<std::__1::unique_ptr<jxl::ButteraugliComparator, std::__1::default_delete<jxl::ButteraugliComparator> > >::~StatusOr() Unexecuted instantiation: jxl::StatusOr<jxl::AlignedArray<jxl::GroupDecCache> >::~StatusOr() jxl::StatusOr<jxl::ModularStreamId>::~StatusOr() Line | Count | Source | 335 | 84 | ~StatusOr() { | 336 | 84 | if (code_ == StatusCode::kOk) { | 337 | 84 | storage_.data_.~T(); | 338 | 84 | } | 339 | 84 | } |
jxl::StatusOr<jxl::Image>::~StatusOr() Line | Count | Source | 335 | 150k | ~StatusOr() { | 336 | 150k | if (code_ == StatusCode::kOk) { | 337 | 150k | storage_.data_.~T(); | 338 | 150k | } | 339 | 150k | } |
Unexecuted instantiation: jxl::StatusOr<std::__1::vector<jxl::PropertyDecisionNode, std::__1::allocator<jxl::PropertyDecisionNode> > >::~StatusOr() Unexecuted instantiation: jxl::StatusOr<std::__1::vector<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > >, std::__1::allocator<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > > > > >::~StatusOr() jxl::StatusOr<jxl::Plane<signed char> >::~StatusOr() Line | Count | Source | 335 | 87.8k | ~StatusOr() { | 336 | 87.8k | if (code_ == StatusCode::kOk) { | 337 | 87.8k | storage_.data_.~T(); | 338 | 87.8k | } | 339 | 87.8k | } |
jxl::StatusOr<std::__1::unique_ptr<jxl::RenderPipeline, std::__1::default_delete<jxl::RenderPipeline> > >::~StatusOr() Line | Count | Source | 335 | 37.8k | ~StatusOr() { | 336 | 37.8k | if (code_ == StatusCode::kOk) { | 337 | 37.8k | storage_.data_.~T(); | 338 | 37.8k | } | 339 | 37.8k | } |
Unexecuted instantiation: jxl::StatusOr<jxl::Plane<hwy::float16_t> >::~StatusOr() Unexecuted instantiation: jxl::StatusOr<jxl::Plane<unsigned int> >::~StatusOr() jxl::StatusOr<jxl::Plane<short> >::~StatusOr() Line | Count | Source | 335 | 25.9k | ~StatusOr() { | 336 | 25.9k | if (code_ == StatusCode::kOk) { | 337 | 25.9k | storage_.data_.~T(); | 338 | 25.9k | } | 339 | 25.9k | } |
jxl::StatusOr<jxl::Image3<short> >::~StatusOr() Line | Count | Source | 335 | 8.65k | ~StatusOr() { | 336 | 8.65k | if (code_ == StatusCode::kOk) { | 337 | 8.65k | storage_.data_.~T(); | 338 | 8.65k | } | 339 | 8.65k | } |
jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<short>, std::__1::default_delete<jxl::ACImageT<short> > > >::~StatusOr() Line | Count | Source | 335 | 8.65k | ~StatusOr() { | 336 | 8.65k | if (code_ == StatusCode::kOk) { | 337 | 8.65k | storage_.data_.~T(); | 338 | 8.65k | } | 339 | 8.65k | } |
Unexecuted instantiation: dec_group.cc:jxl::StatusOr<jxl::(anonymous namespace)::GetBlockFromEncoder>::~StatusOr() Unexecuted instantiation: jxl::StatusOr<jxl::ImageBundle>::~StatusOr() Unexecuted instantiation: jxl::StatusOr<unsigned int>::~StatusOr() Unexecuted instantiation: jxl::StatusOr<jxl::Image3<unsigned char> >::~StatusOr() jxl::StatusOr<jxl::RectT<long> >::~StatusOr() Line | Count | Source | 335 | 163k | ~StatusOr() { | 336 | 163k | if (code_ == StatusCode::kOk) { | 337 | 163k | storage_.data_.~T(); | 338 | 163k | } | 339 | 163k | } |
jxl::StatusOr<jxl::RectT<unsigned long> >::~StatusOr() Line | Count | Source | 335 | 318k | ~StatusOr() { | 336 | 318k | if (code_ == StatusCode::kOk) { | 337 | 318k | storage_.data_.~T(); | 338 | 318k | } | 339 | 318k | } |
low_memory_render_pipeline.cc:jxl::StatusOr<jxl::(anonymous namespace)::Rows>::~StatusOr() Line | Count | Source | 335 | 42.4k | ~StatusOr() { | 336 | 42.4k | if (code_ == StatusCode::kOk) { | 337 | 42.4k | storage_.data_.~T(); | 338 | 42.4k | } | 339 | 42.4k | } |
Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<jxl::(anonymous namespace)::GaussianEllipse>::~StatusOr() Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<std::__1::vector<jxl::(anonymous namespace)::ConnectedComponent, std::__1::allocator<jxl::(anonymous namespace)::ConnectedComponent> > >::~StatusOr() |
340 | | |
341 | | private: |
342 | | union Storage { |
343 | | char placeholder_; |
344 | | T data_; |
345 | 104M | Storage() {} jxl::StatusOr<jxl::PaddedBytes>::Storage::Storage() Line | Count | Source | 345 | 52.7k | Storage() {} |
Unexecuted instantiation: jxl::StatusOr<JxlOutputProcessorBuffer>::Storage::Storage() jxl::StatusOr<jxl::Plane<float> >::Storage::Storage() Line | Count | Source | 345 | 49.8M | Storage() {} |
jxl::StatusOr<jxl::Image3<float> >::Storage::Storage() Line | Count | Source | 345 | 113k | Storage() {} |
jxl::StatusOr<jxl::AlignedMemory>::Storage::Storage() Line | Count | Source | 345 | 51.3M | Storage() {} |
jxl::StatusOr<jxl::Plane<int> >::Storage::Storage() Line | Count | Source | 345 | 1.27M | Storage() {} |
jxl::StatusOr<jxl::Channel>::Storage::Storage() Line | Count | Source | 345 | 886k | Storage() {} |
jxl::StatusOr<jxl::Image>::Storage::Storage() Line | Count | Source | 345 | 151k | Storage() {} |
jxl::StatusOr<float>::Storage::Storage() Line | Count | Source | 345 | 151k | Storage() {} |
jxl::StatusOr<jxl::Plane<unsigned char> >::Storage::Storage() Line | Count | Source | 345 | 131k | Storage() {} |
jxl::StatusOr<jxl::Image3<int> >::Storage::Storage() Line | Count | Source | 345 | 11.8k | Storage() {} |
jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<int>, std::__1::default_delete<jxl::ACImageT<int> > > >::Storage::Storage() Line | Count | Source | 345 | 1.56k | Storage() {} |
Unexecuted instantiation: jxl::StatusOr<jxl::AlignedArray<jxl::GroupDecCache> >::Storage::Storage() jxl::StatusOr<jxl::ModularStreamId>::Storage::Storage() Line | Count | Source | 345 | 84 | Storage() {} |
Unexecuted instantiation: jxl::StatusOr<jxl::ModularFrameEncoder>::Storage::Storage() Unexecuted instantiation: jxl::StatusOr<std::__1::vector<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > >, std::__1::allocator<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > > > > >::Storage::Storage() Unexecuted instantiation: jxl::StatusOr<std::__1::vector<jxl::PropertyDecisionNode, std::__1::allocator<jxl::PropertyDecisionNode> > >::Storage::Storage() jxl::StatusOr<jxl::AcStrategyImage>::Storage::Storage() Line | Count | Source | 345 | 43.9k | Storage() {} |
jxl::StatusOr<jxl::Plane<signed char> >::Storage::Storage() Line | Count | Source | 345 | 87.8k | Storage() {} |
jxl::StatusOr<jxl::ColorCorrelationMap>::Storage::Storage() Line | Count | Source | 345 | 43.9k | Storage() {} |
jxl::StatusOr<jxl::ANSSymbolReader>::Storage::Storage() Line | Count | Source | 345 | 148k | Storage() {} |
Unexecuted instantiation: jxl::StatusOr<jxl::Plane<hwy::float16_t> >::Storage::Storage() Unexecuted instantiation: jxl::StatusOr<jxl::Plane<unsigned int> >::Storage::Storage() jxl::StatusOr<jxl::Plane<short> >::Storage::Storage() Line | Count | Source | 345 | 25.9k | Storage() {} |
jxl::StatusOr<jxl::Image3<short> >::Storage::Storage() Line | Count | Source | 345 | 8.65k | Storage() {} |
jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<short>, std::__1::default_delete<jxl::ACImageT<short> > > >::Storage::Storage() Line | Count | Source | 345 | 8.65k | Storage() {} |
Unexecuted instantiation: dec_group.cc:jxl::StatusOr<jxl::(anonymous namespace)::GetBlockFromEncoder>::Storage::Storage() jxl::StatusOr<std::__1::unique_ptr<jxl::RenderPipeline, std::__1::default_delete<jxl::RenderPipeline> > >::Storage::Storage() Line | Count | Source | 345 | 37.8k | Storage() {} |
Unexecuted instantiation: jxl::StatusOr<jxl::QuantizedSpline>::Storage::Storage() Unexecuted instantiation: jxl::StatusOr<std::__1::unique_ptr<jxl::ButteraugliComparator, std::__1::default_delete<jxl::ButteraugliComparator> > >::Storage::Storage() Unexecuted instantiation: jxl::StatusOr<jxl::ImageBundle>::Storage::Storage() Unexecuted instantiation: jxl::StatusOr<unsigned int>::Storage::Storage() Unexecuted instantiation: jxl::StatusOr<unsigned long>::Storage::Storage() Unexecuted instantiation: jxl::StatusOr<jxl::Image3<unsigned char> >::Storage::Storage() low_memory_render_pipeline.cc:jxl::StatusOr<jxl::(anonymous namespace)::Rows>::Storage::Storage() Line | Count | Source | 345 | 42.4k | Storage() {} |
jxl::StatusOr<jxl::RectT<long> >::Storage::Storage() Line | Count | Source | 345 | 163k | Storage() {} |
jxl::StatusOr<jxl::RectT<unsigned long> >::Storage::Storage() Line | Count | Source | 345 | 318k | Storage() {} |
Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<std::__1::vector<jxl::(anonymous namespace)::ConnectedComponent, std::__1::allocator<jxl::(anonymous namespace)::ConnectedComponent> > >::Storage::Storage() Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<jxl::(anonymous namespace)::GaussianEllipse>::Storage::Storage() |
346 | 104M | ~Storage() {} jxl::StatusOr<jxl::AlignedMemory>::Storage::~Storage() Line | Count | Source | 346 | 51.3M | ~Storage() {} |
jxl::StatusOr<jxl::PaddedBytes>::Storage::~Storage() Line | Count | Source | 346 | 52.7k | ~Storage() {} |
Unexecuted instantiation: jxl::StatusOr<JxlOutputProcessorBuffer>::Storage::~Storage() jxl::StatusOr<jxl::Plane<float> >::Storage::~Storage() Line | Count | Source | 346 | 49.8M | ~Storage() {} |
jxl::StatusOr<jxl::Image3<float> >::Storage::~Storage() Line | Count | Source | 346 | 113k | ~Storage() {} |
jxl::StatusOr<jxl::ANSSymbolReader>::Storage::~Storage() Line | Count | Source | 346 | 148k | ~Storage() {} |
jxl::StatusOr<jxl::Plane<int> >::Storage::~Storage() Line | Count | Source | 346 | 1.28M | ~Storage() {} |
jxl::StatusOr<jxl::Channel>::Storage::~Storage() Line | Count | Source | 346 | 888k | ~Storage() {} |
jxl::StatusOr<float>::Storage::~Storage() Line | Count | Source | 346 | 151k | ~Storage() {} |
jxl::StatusOr<jxl::Image3<int> >::Storage::~Storage() Line | Count | Source | 346 | 11.8k | ~Storage() {} |
jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<int>, std::__1::default_delete<jxl::ACImageT<int> > > >::Storage::~Storage() Line | Count | Source | 346 | 1.56k | ~Storage() {} |
Unexecuted instantiation: jxl::StatusOr<unsigned long>::Storage::~Storage() jxl::StatusOr<jxl::Plane<unsigned char> >::Storage::~Storage() Line | Count | Source | 346 | 131k | ~Storage() {} |
jxl::StatusOr<jxl::ColorCorrelationMap>::Storage::~Storage() Line | Count | Source | 346 | 43.9k | ~Storage() {} |
jxl::StatusOr<jxl::AcStrategyImage>::Storage::~Storage() Line | Count | Source | 346 | 43.9k | ~Storage() {} |
Unexecuted instantiation: jxl::StatusOr<jxl::ModularFrameEncoder>::Storage::~Storage() Unexecuted instantiation: jxl::StatusOr<std::__1::unique_ptr<jxl::ButteraugliComparator, std::__1::default_delete<jxl::ButteraugliComparator> > >::Storage::~Storage() Unexecuted instantiation: jxl::StatusOr<jxl::AlignedArray<jxl::GroupDecCache> >::Storage::~Storage() jxl::StatusOr<jxl::ModularStreamId>::Storage::~Storage() Line | Count | Source | 346 | 84 | ~Storage() {} |
jxl::StatusOr<jxl::Image>::Storage::~Storage() Line | Count | Source | 346 | 150k | ~Storage() {} |
Unexecuted instantiation: jxl::StatusOr<std::__1::vector<jxl::PropertyDecisionNode, std::__1::allocator<jxl::PropertyDecisionNode> > >::Storage::~Storage() Unexecuted instantiation: jxl::StatusOr<std::__1::vector<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > >, std::__1::allocator<std::__1::pair<jxl::QuantizedPatch, std::__1::vector<std::__1::pair<unsigned int, unsigned int>, std::__1::allocator<std::__1::pair<unsigned int, unsigned int> > > > > > >::Storage::~Storage() jxl::StatusOr<jxl::Plane<signed char> >::Storage::~Storage() Line | Count | Source | 346 | 87.8k | ~Storage() {} |
jxl::StatusOr<std::__1::unique_ptr<jxl::RenderPipeline, std::__1::default_delete<jxl::RenderPipeline> > >::Storage::~Storage() Line | Count | Source | 346 | 37.8k | ~Storage() {} |
Unexecuted instantiation: jxl::StatusOr<jxl::Plane<hwy::float16_t> >::Storage::~Storage() Unexecuted instantiation: jxl::StatusOr<jxl::Plane<unsigned int> >::Storage::~Storage() jxl::StatusOr<jxl::Plane<short> >::Storage::~Storage() Line | Count | Source | 346 | 25.9k | ~Storage() {} |
jxl::StatusOr<jxl::Image3<short> >::Storage::~Storage() Line | Count | Source | 346 | 8.65k | ~Storage() {} |
jxl::StatusOr<std::__1::unique_ptr<jxl::ACImageT<short>, std::__1::default_delete<jxl::ACImageT<short> > > >::Storage::~Storage() Line | Count | Source | 346 | 8.65k | ~Storage() {} |
Unexecuted instantiation: dec_group.cc:jxl::StatusOr<jxl::(anonymous namespace)::GetBlockFromEncoder>::Storage::~Storage() Unexecuted instantiation: jxl::StatusOr<jxl::ImageBundle>::Storage::~Storage() Unexecuted instantiation: jxl::StatusOr<unsigned int>::Storage::~Storage() Unexecuted instantiation: jxl::StatusOr<jxl::Image3<unsigned char> >::Storage::~Storage() jxl::StatusOr<jxl::RectT<long> >::Storage::~Storage() Line | Count | Source | 346 | 163k | ~Storage() {} |
jxl::StatusOr<jxl::RectT<unsigned long> >::Storage::~Storage() Line | Count | Source | 346 | 318k | ~Storage() {} |
low_memory_render_pipeline.cc:jxl::StatusOr<jxl::(anonymous namespace)::Rows>::Storage::~Storage() Line | Count | Source | 346 | 42.4k | ~Storage() {} |
Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<jxl::(anonymous namespace)::GaussianEllipse>::Storage::~Storage() Unexecuted instantiation: enc_detect_dots.cc:jxl::StatusOr<std::__1::vector<jxl::(anonymous namespace)::ConnectedComponent, std::__1::allocator<jxl::(anonymous namespace)::ConnectedComponent> > >::Storage::~Storage() |
347 | | } storage_; |
348 | | |
349 | | StatusCode code_; |
350 | | }; |
351 | | |
352 | | #define JXL_ASSIGN_OR_RETURN(lhs, statusor) \ |
353 | 104M | PRIVATE_JXL_ASSIGN_OR_RETURN_IMPL( \ |
354 | 104M | JXL_JOIN(assign_or_return_temporary_variable, __LINE__), lhs, statusor) |
355 | | |
356 | | // NOLINTBEGIN(bugprone-macro-parentheses) |
357 | | #define PRIVATE_JXL_ASSIGN_OR_RETURN_IMPL(name, lhs, statusor) \ |
358 | 104M | auto name = statusor; \ |
359 | 104M | JXL_RETURN_IF_ERROR(name.status()); \ |
360 | 104M | lhs = std::move(name).value_(); |
361 | | // NOLINTEND(bugprone-macro-parentheses) |
362 | | |
363 | | #define JXL_ASSIGN_OR_QUIT(lhs, statusor, message) \ |
364 | 0 | PRIVATE_JXL_ASSIGN_OR_QUIT_IMPL( \ |
365 | 0 | JXL_JOIN(assign_or_temporary_variable, __LINE__), lhs, statusor, \ |
366 | 0 | message) |
367 | | |
368 | | // NOLINTBEGIN(bugprone-macro-parentheses) |
369 | | #define PRIVATE_JXL_ASSIGN_OR_QUIT_IMPL(name, lhs, statusor, message) \ |
370 | 0 | auto name = statusor; \ |
371 | 0 | if (!name.ok()) { \ |
372 | 0 | QUIT(message); \ |
373 | 0 | } \ |
374 | 0 | lhs = std::move(name).value_(); |
375 | | // NOLINTEND(bugprone-macro-parentheses) |
376 | | |
377 | | } // namespace jxl |
378 | | |
379 | | #endif // LIB_JXL_BASE_STATUS_H_ |