hex.ptr_flipΒΆ
Flip the bit whose address is stored in ptr. Effectively *ptr;.
SignatureΒΆ
def ptr_flip ptr @ cleanup < hex.pointers.to_flip { ... }
Defined in hex/pointers/xor_to_pointer.fj β lines 7β16 (view on GitHub).
ComplexityΒΆ
Time:
w(0.5@+2) + @Space:
w(0.5@+14) + @
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def ptr_flip ptr @ cleanup < hex.pointers.to_flip {
wflip hex.pointers.to_flip+w, cleanup
.pointers.set_flip_pointer ptr
;hex.pointers.to_flip
pad 4
cleanup:
wflip hex.pointers.to_flip+w, cleanup
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
hex.ptr_flip_dbitinhex/pointers/xor_to_pointer.fj
Next: hex.ptr_flip_dbit β