3
0
mirror of https://github.com/Qortal/AT.git synced 2025-02-11 17:55:52 +00:00

6 Commits

Author SHA1 Message Date
catbref
454d4bed35 OpCode refactoring, versioned constants, refactored tests
API is now an abstract class instead of an Interface. This is to
allow protected methods that give access to package-scoped methods
and variables inside MachineState.

MachineState now supports a different set of constants based on AT
version.

MachineState's methods and variables have had their scopes tightened
up and getters/setters added where appropriate.

MachineState.parseHeader() inlined into the constructor that calls it
so it can set public final variables.

Some reordering and additional comments in MachineState.

OpCode enum entries refactored so that:
a) variables provided via MachineState "state" are not explicitly
passed as well

b) args to each opcode are pre-fetched from the codeByteBuffer before
calling and only need to be cast before use. this comes almost
"for free" thanks to OpCodeParam.fetch

Calling functions from OpCode now cleaner as there's no write-access
to programCounter, only changing codeByteBuffer's position.

Also in OpCode, state.getProgramCounter() now provides a consistent
before-opcode position for branches, jumps, etc.

Lots of repeated code refactored out of unit tests into ExecutableTest
class. ExecutableTest also provides helper methods for examining
post-execution data values, stack positions and entries.
2018-10-05 15:56:32 +01:00
catbref
f0e031599d Initial upload of Java re-implementation
Note that this is unfinished, requiring fee-per-opcode support
and some refactoring.
2018-09-27 13:59:43 +01:00
Ian Knowles
2d7555be98
Merge pull request #2 from spebern/master
correct test 3 output for bor dat
2018-08-26 07:44:53 +00:00
bold
b7aa79d00d correct test 3 output for bor dat 2018-08-26 15:11:59 +08:00
Ian Knowles
2e8cf285d3 Initial documentation added. 2016-02-15 00:44:59 +08:00
Ian Knowles
c7a515ef5e Initial commit 2016-02-15 00:34:00 +08:00