io/key: [API] add InputHintOp for specifying the input hint for a tag

We're about to replace key.InputOp with a filter; this change separates
the input hint into its own operation.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2023-10-19 18:10:49 -05:00
parent ef8171b971
commit 12a0ad7038
5 changed files with 43 additions and 14 deletions
+6 -1
View File
@@ -64,6 +64,7 @@ const (
TypePopPass
TypeInput
TypeKeyInput
TypeKeyInputHint
TypeSave
TypeLoad
TypeAux
@@ -139,7 +140,8 @@ const (
TypePassLen = 1
TypePopPassLen = 1
TypeInputLen = 1
TypeKeyInputLen = 1 + 1
TypeKeyInputLen = 1
TypeKeyInputHintLen = 1 + 1
TypeSaveLen = 1 + 4
TypeLoadLen = 1 + 4
TypeAuxLen = 1
@@ -414,6 +416,7 @@ var opProps = [0x100]opProp{
TypePopPass: {Size: TypePopPassLen, NumRefs: 0},
TypeInput: {Size: TypeInputLen, NumRefs: 1},
TypeKeyInput: {Size: TypeKeyInputLen, NumRefs: 2},
TypeKeyInputHint: {Size: TypeKeyInputHintLen, NumRefs: 1},
TypeSave: {Size: TypeSaveLen, NumRefs: 0},
TypeLoad: {Size: TypeLoadLen, NumRefs: 0},
TypeAux: {Size: TypeAuxLen, NumRefs: 0},
@@ -477,6 +480,8 @@ func (t OpType) String() string {
return "Input"
case TypeKeyInput:
return "KeyInput"
case TypeKeyInputHint:
return "KeyInputHint"
case TypeSave:
return "Save"
case TypeLoad: