mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
compiler: do not introduce excessive locals on inline
When function call-site parameter is an identifier, we may load it directly. Currently it can be also modified, this will be fixed in a separate commit.
This commit is contained in:
parent
1ae0d022dd
commit
27e60455c7
3 changed files with 32 additions and 12 deletions
|
@ -111,12 +111,7 @@ func TestInlineConversion(t *testing.T) {
|
|||
a := 2
|
||||
{
|
||||
b := 1
|
||||
c := a
|
||||
{
|
||||
bb := b
|
||||
cc := c
|
||||
return (bb + cc) * (b + c)
|
||||
}
|
||||
return (b + a) * (b + a)
|
||||
}
|
||||
}`
|
||||
b2, err := compiler.Compile("foo.go", strings.NewReader(src2))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue