compiler: allow to emit opcodes directly

This commit is contained in:
Evgeniy Stratonikov 2021-03-02 14:15:25 +03:00
parent 58ea4607d0
commit 578bbabd1d
4 changed files with 56 additions and 9 deletions

View file

@ -288,7 +288,8 @@ func isSyscall(fun *funcScope) bool {
if fun.selector == nil || fun.pkg == nil || !isInteropPath(fun.pkg.Path()) {
return false
}
return fun.pkg.Name() == "neogointernal" && strings.HasPrefix(fun.name, "Syscall")
return fun.pkg.Name() == "neogointernal" && (strings.HasPrefix(fun.name, "Syscall") ||
strings.HasPrefix(fun.name, "Opcode"))
}
const interopPrefix = "github.com/nspcc-dev/neo-go/pkg/interop"