bit.ptr_flipΒΆ
Flip the bit whose address is stored in ptr. Effectively *ptr;.
SignatureΒΆ
def ptr_flip ptr @ cleanup < bit.pointers.to_flip { ... }
Defined in bit/pointers.fj β lines 70β79 (view on GitHub).
ComplexityΒΆ
Time:
2w@ + @Space:
2w@ + @
See the complexity glossary for what @, w, dw, dbit, n mean.
Requires initΒΆ
The following must be initialised before this macro is invoked:
bit.pointers.ptr_init
SourceΒΆ
Click to view the macro body
def ptr_flip ptr @ cleanup < bit.pointers.to_flip {
wflip bit.pointers.to_flip+w, cleanup
.pointers.set_flip_pointer ptr
;bit.pointers.to_flip
pad 4
cleanup:
wflip bit.pointers.to_flip+w, cleanup
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
bit.ptr_flip_dbitinbit/pointers.fj
β Previous: bit.ptr_jump
Next: bit.ptr_flip_dbit β