forked from TrueCloudLab/neoneo-go
compiler: drop some useless NOPs
They're all obsolete and not needed.
This commit is contained in:
parent
0d50730382
commit
410aabe7a1
3 changed files with 2 additions and 7 deletions
|
@ -85,7 +85,7 @@ func TestNEP17Balance(t *testing.T) {
|
|||
}
|
||||
|
||||
e.checkNextLine(t, "^\\s*$")
|
||||
addr4, err := address.StringToUint160("NU4CTk9H2fgNCuC3ZPqX4LjUX3MHt3Rh6p") // deployed verify.go contract
|
||||
addr4, err := address.StringToUint160("NQ3nAdFQXzemHC9uvr4af2Ysap6aZJpqgN") // deployed verify.go contract
|
||||
require.NoError(t, err)
|
||||
e.checkNextLine(t, "^Account "+address.Uint160ToString(addr4))
|
||||
e.checkEOF(t)
|
||||
|
|
2
cli/testdata/wallet1_solo.json
vendored
2
cli/testdata/wallet1_solo.json
vendored
|
@ -61,7 +61,7 @@
|
|||
"isDefault": false
|
||||
},
|
||||
{
|
||||
"address": "NU4CTk9H2fgNCuC3ZPqX4LjUX3MHt3Rh6p",
|
||||
"address": "NQ3nAdFQXzemHC9uvr4af2Ysap6aZJpqgN",
|
||||
"key": "6PYSATFztBa3CHjSR6sLAKungUEAbQUCVE16KzmaQQ38gLeYGZ9Knd5mGv",
|
||||
"label": "verify",
|
||||
"contract": {
|
||||
|
|
|
@ -1571,10 +1571,6 @@ func (c *codegen) convertSyscall(f *funcScope, expr *ast.CallExpr) {
|
|||
if strings.HasPrefix(f.name, "Syscall") {
|
||||
c.emitReverse(len(expr.Args) - 1)
|
||||
emit.Syscall(c.prog.BinWriter, name)
|
||||
|
||||
// This NOP instruction is basically not needed, but if we do, we have a
|
||||
// one to one matching avm file with neo-python which is very nice for debugging.
|
||||
emit.Opcodes(c.prog.BinWriter, opcode.NOP)
|
||||
} else {
|
||||
op, err := opcode.FromString(name)
|
||||
if err != nil {
|
||||
|
@ -1824,7 +1820,6 @@ func (c *codegen) convertStruct(lit *ast.CompositeLit, ptr bool) {
|
|||
return
|
||||
}
|
||||
|
||||
emit.Opcodes(c.prog.BinWriter, opcode.NOP)
|
||||
keyedLit := len(lit.Elts) > 0
|
||||
if keyedLit {
|
||||
_, ok := lit.Elts[0].(*ast.KeyValueExpr)
|
||||
|
|
Loading…
Reference in a new issue