@@ -78,31 +78,33 @@ function Effects(e::Effects = EFFECTS_UNKNOWN;
7878end
7979
8080is_total_or_error (effects:: Effects ) =
81- effects. consistent === ALWAYS_TRUE && effects. effect_free === ALWAYS_TRUE &&
81+ effects. consistent === ALWAYS_TRUE &&
82+ effects. effect_free === ALWAYS_TRUE &&
8283 effects. terminates === ALWAYS_TRUE
8384
8485is_total (effects:: Effects ) =
85- is_total_or_error (effects) && effects. nothrow === ALWAYS_TRUE
86+ is_total_or_error (effects) &&
87+ effects. nothrow === ALWAYS_TRUE
8688
8789is_removable_if_unused (effects:: Effects ) =
8890 effects. effect_free === ALWAYS_TRUE &&
8991 effects. terminates === ALWAYS_TRUE &&
9092 effects. nothrow === ALWAYS_TRUE
9193
9294function encode_effects (e:: Effects )
93- return (e. consistent. state << 1 ) |
94- (e. effect_free. state << 3 ) |
95- (e. nothrow. state << 5 ) |
96- (e. terminates. state << 7 ) |
97- (e. overlayed)
95+ return (e. consistent. state << 0 ) |
96+ (e. effect_free. state << 2 ) |
97+ (e. nothrow. state << 4 ) |
98+ (e. terminates. state << 6 ) |
99+ (UInt32 ( e. overlayed) << 8 )
98100end
99- function decode_effects (e:: UInt8 )
101+ function decode_effects (e:: UInt32 )
100102 return Effects (
101- TriState ((e >> 1 ) & 0x03 ),
102- TriState ((e >> 3 ) & 0x03 ),
103- TriState ((e >> 5 ) & 0x03 ),
104- TriState ((e >> 7 ) & 0x03 ),
105- e & 0x01 ≠ 0x00 ,
103+ TriState ((e >> 0 ) & 0x03 ),
104+ TriState ((e >> 2 ) & 0x03 ),
105+ TriState ((e >> 4 ) & 0x03 ),
106+ TriState ((e >> 6 ) & 0x03 ),
107+ _Bool ( (e >> 8 ) & 0x01 ) ,
106108 false )
107109end
108110
0 commit comments