Create RefMode from nullable and track_ref flags. This is a constexpr function for compile-time field metadata conversion.
| 51 | /// Create RefMode from nullable and track_ref flags. |
| 52 | /// This is a constexpr function for compile-time field metadata conversion. |
| 53 | FORY_ALWAYS_INLINE constexpr RefMode make_ref_mode(bool nullable, |
| 54 | bool track_ref) { |
| 55 | if (track_ref) { |
| 56 | return RefMode::Tracking; |
| 57 | } |
| 58 | if (nullable) { |
| 59 | return RefMode::NullOnly; |
| 60 | } |
| 61 | return RefMode::None; |
| 62 | } |
| 63 | |
| 64 | /// Check if this mode reads/writes ref flags. |
| 65 | /// Fast path check - single comparison. |
no outgoing calls
no test coverage detected