Struct sputnikvm::PCMut [] [src]

pub struct PCMut<'a, P: Patch> { /* fields omitted */ }

Represents a mutable program counter in EVM.

Methods

impl<'a, P: Patch> PCMut<'a, P>
[src]

[src]

Get the code bytearray.

[src]

Get the current program counter position.

[src]

Get the current opcode position. Should only be used when debugging.

[src]

Returns true if the position is a valid jump destination. If not, returns false.

[src]

Check whether the PC is ended. Next read on this PC would result in PCError::PCOverflow.

[src]

Peek the next opcode.

[src]

Peek the next instruction.

impl<'a, P: Patch> PCMut<'a, P>
[src]

[src]

Create a new program counter from the given code.

[src]

Jump to a position in the code. The destination must be valid to jump.

[src]

Read the next instruction and step the program counter.