compiler: implement NEO contract wrapper

This commit is contained in:
Evgeniy Stratonikov 2021-02-08 11:06:01 +03:00
parent e5d8c1c985
commit 6e866b622a
3 changed files with 89 additions and 2 deletions

View file

@ -1915,7 +1915,8 @@ func (c *codegen) compile(info *buildInfo, pkg *loader.PackageInfo) error {
// Don't convert the function if it's not used. This will save a lot
// of bytecode space.
name := c.getFuncNameFromDecl(pkg.Path(), n)
if !isInitFunc(n) && !isDeployFunc(n) && funUsage.funcUsed(name) && !isInteropPath(pkg.Path()) {
if !isInitFunc(n) && !isDeployFunc(n) && funUsage.funcUsed(name) &&
(!isInteropPath(pkg.Path()) || isNativeHelpersPath(pkg.Path())) {
c.convertFuncDecl(f, n, pkg)
}
}