mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
compiler: add contract.CallEx
interop
This commit is contained in:
parent
ec58bec803
commit
37a8550215
5 changed files with 93 additions and 5 deletions
|
@ -850,7 +850,14 @@ func (c *codegen) Visit(node ast.Node) ast.Visitor {
|
|||
emit.Opcodes(c.prog.BinWriter, opcode.PACK)
|
||||
numArgs -= varSize - 1
|
||||
}
|
||||
c.emitReverse(numArgs)
|
||||
// CallFlag in CallEx interop should be the last argument
|
||||
// but this can't be reflected in signature due to varargs.
|
||||
// It is first in compiler interop though, thus we just need to reverse 1 values less.
|
||||
if f != nil && isSyscall(f) && f.pkg.Name() == "contract" && f.name == "CallEx" {
|
||||
c.emitReverse(numArgs - 1)
|
||||
} else {
|
||||
c.emitReverse(numArgs)
|
||||
}
|
||||
}
|
||||
|
||||
// Check builtin first to avoid nil pointer on funcScope!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue