Skip to content

Commit

Permalink
Merge branch 'master' into fix/2035
Browse files Browse the repository at this point in the history
  • Loading branch information
omarsy authored May 5, 2024
2 parents 4635def + 555357e commit 4044fe0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions gnovm/pkg/gnolang/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -2047,14 +2047,20 @@ func (m *Machine) String() string {
builder.WriteString(fmt.Sprintf(" #%d %v\n", i, m.Values[i]))
}

builder.WriteString(`Exprs: `)

for i := len(m.Exprs) - 1; i >= 0; i-- {
builder.WriteString(fmt.Sprintf(" #%d %v\n", i, m.Exprs[i]))
}

builder.WriteString(`Stmts: `)

for i := len(m.Stmts) - 1; i >= 0; i-- {
builder.WriteString(fmt.Sprintf(" #%d %v\n", i, m.Stmts[i]))
}

builder.WriteString(`Blocks: `)

for b := m.LastBlock(); b != nil; {
gen := builder.Len()/3 + 1
gens := "@" // strings.Repeat("@", gen)
Expand Down Expand Up @@ -2090,6 +2096,8 @@ func (m *Machine) String() string {
}
}

builder.WriteString(`Blocks (other): `)

for i := len(m.Blocks) - 2; i >= 0; i-- {
b := m.Blocks[i]

Expand All @@ -2110,6 +2118,8 @@ func (m *Machine) String() string {
}
}

builder.WriteString(`Frames: `)

for i := len(m.Frames) - 1; i >= 0; i-- {
builder.WriteString(fmt.Sprintf(" #%d %s\n", i, m.Frames[i]))
}
Expand All @@ -2118,6 +2128,8 @@ func (m *Machine) String() string {
builder.WriteString(fmt.Sprintf(" Realm:\n %s\n", m.Realm.Path))
}

builder.WriteString(`Exceptions: `)

for _, ex := range m.Exceptions {
builder.WriteString(fmt.Sprintf(" %s\n", ex.Sprint(m)))
}
Expand Down

0 comments on commit 4044fe0

Please sign in to comment.