forked from TrueCloudLab/neoneo-go
a7457d08a1
This solves two problems: * adds support for shortened SYSCALL form that uses IDs (similar to #434, but for NEO 2.0, supporting both forms), which is important for compatibility with C# node and mainnet chain that uses it from some height * reworks interop plugging to use callbacks rather than appending to the map, these map mangling functions are clearly visible in the VM profiling statistics and we want spawning a VM to be fast, so it makes sense optimizing it. This change moves most of the work to the init() phase making VM setup cheaper. Caveats: * InteropNameToID accepts `[]byte` because that's the thing we have in SYSCALL processing and that's the most often usecase for it, it leads to some conversions in other places but that's acceptable because those are either tests or init() * three getInterop functions are: `getDefaultVMInterop`, `getSystemInterop` and `getNeoInterop` Our 100K (1.4M->1.5M) block import time improves by ~4% with this change. |
||
---|---|---|
.. | ||
bar | ||
foo | ||
foobar | ||
assign_test.go | ||
binary_expr_test.go | ||
byte_conversion_test.go | ||
contant_test.go | ||
for_test.go | ||
function_call_test.go | ||
if_test.go | ||
import_test.go | ||
numeric_test.go | ||
struct_test.go | ||
syscall_test.go | ||
type_test.go | ||
util_test.go | ||
vm_test.go |