compiler: emit debug variable info for _deploy()
This commit is contained in:
parent
b72f6be9e9
commit
7b638d5489
3 changed files with 9 additions and 3 deletions
|
@ -48,6 +48,8 @@ type codegen struct {
|
|||
staticVariables []string
|
||||
// initVariables contains variables local to `_initialize` method.
|
||||
initVariables []string
|
||||
// deployVariables contains variables local to `_initialize` method.
|
||||
deployVariables []string
|
||||
|
||||
// A mapping from label's names to their ids.
|
||||
labels map[labelWithType]uint16
|
||||
|
@ -464,6 +466,8 @@ func (c *codegen) convertFuncDecl(file ast.Node, decl *ast.FuncDecl, pkg *types.
|
|||
|
||||
if isInit {
|
||||
c.initVariables = append(c.initVariables, f.variables...)
|
||||
} else if isDeploy {
|
||||
c.deployVariables = append(c.deployVariables, f.variables...)
|
||||
}
|
||||
|
||||
f.rng.End = uint16(c.prog.Len() - 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue