mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 23:02:27 +00:00
compiler: support basic inlining
This commit is contained in:
parent
1f238ce6fd
commit
1ae0d022dd
9 changed files with 258 additions and 4 deletions
|
@ -304,3 +304,11 @@ func canConvert(s string) bool {
|
|||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// canInline returns true if function is to be inlined.
|
||||
// Currently there is a static list of function which are inlined,
|
||||
// this may change in future.
|
||||
func canInline(s string) bool {
|
||||
return isNativeHelpersPath(s) ||
|
||||
strings.HasPrefix(s, "github.com/nspcc-dev/neo-go/pkg/compiler/testdata/inline")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue