compiler: use CALLT for native contract calls, fix #2257

This commit is contained in:
Roman Khimov 2021-12-08 22:33:03 +03:00
parent 06fc450789
commit 299a7ea614
26 changed files with 322 additions and 190 deletions

View file

@ -308,9 +308,9 @@ func TestJumpOptimize(t *testing.T) {
for _, mi := range di.Methods {
// only _deploy and init have locals here
if mi.Name.Name == "_deploy" || mi.Name.Name == "init" {
require.Equal(t, b[mi.Range.Start], byte(opcode.INITSLOT))
require.Equal(t, b.Script[mi.Range.Start], byte(opcode.INITSLOT))
}
require.Equal(t, b[mi.Range.End], byte(opcode.RET))
require.Equal(t, b.Script[mi.Range.End], byte(opcode.RET))
}
}