Same thing done in a2a8981979 for PUSHBYTES,
failing to read the amount of bytes specified should lead to FAULT. Also
makes readUint16() and readUint32() panic as this is the behavior we want in
these cases. Add some tests along the way.
Current NEO documentation lists them:
https://docs.neo.org/docs/en-us/tooldev/advanced/neo_vm.html
CALL_* instructions were left out because of conflict with golint (but they're
removed in NEO 3.0 anyway, so wasting time on them makes no sense).
Update autogenerated instruction_string.go accordingly.
The code that we have actually implements XTUCK and not TUCK. And it's a bit
broken, so fix it and add some tests. The most interesting one (that required
to touch stack code) is the one when we have 1 element on the stack and are
trying to tell XTUCK to push 2 elements deep.
Fixes things like:
* exported type/method/function X should have comment or be unexported
* comment on exported type/method/function X should be of the form "X ..."
(with optional leading article)
Refs. #213.
Simplifies a lot of code and removes some duplication. Unfortunately I had to
move test_util random functions in same commit to avoid cycle
dependencies. One of these random functions was also used in core/transaction
testing, to simplify things I've just dropped it there and used a static
string (which is nice to have for a test anyway).
There is still sha256 left in wallet (but it needs to pass Hash structure into
the signing function).
* support VM to pass method and arguments to a script.
* added support for type assertions in smartcontracts.
* added native vm support for print.
* moved VM API packages to vm -> API
* reverted the native Print opcode in favor of runtime.Log
* added support for registering custom interop hooks in the VM.
* Updated README
* Updated compiler with @OPTIMIZE tags
* Moved more tests to VM package.
* optimized and refactored compiler and vm API
* updated README with new smartcontract apis
* bumped version
* renamed test folders and fixed bug where wrong jump labels would be exectuted for rewrite.
* Added support for Osize (len(string)) and factored out the array tests
* Added current instruction number to VM prompt if program is loaded.
* added support for unary expressions.
* updated README of and sorted the help commands
* updated readme of the compiler
* bumped version -> 0.39.0
* changed vm commands to match more of the standard
* fixed Uint16 jmp bug in VM
* moved test to vm + fixed numnotequal bug
* fixed broken tests
* moved compiler tests to vm tests
* added basic for support + inc and dec stmts
* bumped version