bit.pointers.ptr_initΒΆ
Initializes the global opcodes and pointer-copies required for the pointers macros.
SignatureΒΆ
def ptr_init > to_flip, to_jump, to_flip_var, to_jump_var { ... }
Defined in bit/pointers.fj β lines 13β23 (view on GitHub).
ComplexityΒΆ
Time:
O(1)Space:
2w+2
See the complexity glossary for what @, w, dw, dbit, n mean.
Output labelsΒΆ
This macro exposes labels into the callerβs scope via >:
to_flipβ address of opcode that holds a flipping address in its first word. jumping into it will flip wanted bit.to_flip_varβ the bit-vector (pointer) that also holds the flipping address.to_jumpβ address of opcode that holds a jumping address in its second word. jumping into it will jump to the wanted address.to_jump_varβ the bit-vector (pointer) that also holds the jumping address.
SourceΒΆ
Click to view the macro body
def ptr_init > to_flip, to_jump, to_flip_var, to_jump_var {
to_flip:
0;0
to_jump:
;0
to_flip_var:
bit.vec w, 0
to_jump_var:
bit.vec w, 0
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
stl.ptr_initinptrlib.fj
Next: bit.pointers.set_jump_pointer β