Skip to content

Commit

Permalink
Populate missing ops in String method (#175)
Browse files Browse the repository at this point in the history
To avoid displaying Unknown to known operations

Co-authored-by: Enrique J. Hernández <sixstone-qq@users.noreply.github.com>
  • Loading branch information
sixstone-qq and sixstone-qq committed Feb 3, 2022
1 parent b77063f commit 6f2898d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions v10/vm/op.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ const (
// Set the field with the target index to nil
NullField

// Hint at the final size of a map or an array for performance
HintSize
)

// String implements Stringer interface.
func (o Op) String() string {
switch o {
case Read:
Expand Down Expand Up @@ -117,6 +119,10 @@ func (o Op) String() string {
return "set_long"
case SetInt:
return "set_int"
case NullField:
return "null_field"
case HintSize:
return "hint_size"
}
return "Unknown"
}

0 comments on commit 6f2898d

Please sign in to comment.