interop: add Abort() function to ABORT things

Related to #2227.
This commit is contained in:
Roman Khimov 2021-10-22 14:50:51 +03:00
parent e230040c2e
commit 36295357d8
5 changed files with 30 additions and 2 deletions

View file

@ -1724,6 +1724,8 @@ func (c *codegen) convertBuiltin(expr *ast.CallExpr) {
c.emitStoreByIndex(varGlobal, c.exceptionIndex)
case "delete":
emit.Opcodes(c.prog.BinWriter, opcode.REMOVE)
case "Abort":
emit.Opcodes(c.prog.BinWriter, opcode.ABORT)
case "Remove":
if !isCompoundSlice(c.typeOf(expr.Args[0])) {
c.prog.Err = errors.New("`Remove` supports only non-byte slices")