summaryrefslogtreecommitdiff
path: root/vm/op_string.go
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2025-12-02 15:45:14 +0100
committerMarc Vertes <mvertes@free.fr>2025-12-02 15:45:14 +0100
commit3d64f909cfb55d8886ac4b4839a98f8f6cdc98e7 (patch)
treec0e4149ef652f2d422d2f598da1651fde4009496 /vm/op_string.go
parentf40a1c23467eef36f53635e525f8b25f591e8a45 (diff)
feat: support of struct literal composite
Added missing vm instructions to allocate a typed value on the stack and to set a structure field. It's possible now to generate struct literal composites for non keyed struct fields.
Diffstat (limited to 'vm/op_string.go')
-rw-r--r--vm/op_string.go52
1 files changed, 27 insertions, 25 deletions
diff --git a/vm/op_string.go b/vm/op_string.go
index ac5b557..63bf738 100644
--- a/vm/op_string.go
+++ b/vm/op_string.go
@@ -20,34 +20,36 @@ func _() {
_ = x[Deref-9]
_ = x[Dup-10]
_ = x[Fdup-11]
- _ = x[Equal-12]
- _ = x[EqualSet-13]
- _ = x[Exit-14]
- _ = x[Field-15]
- _ = x[Greater-16]
- _ = x[Grow-17]
- _ = x[Index-18]
- _ = x[Jump-19]
- _ = x[JumpTrue-20]
- _ = x[JumpFalse-21]
- _ = x[JumpSetTrue-22]
- _ = x[JumpSetFalse-23]
- _ = x[Lower-24]
- _ = x[Loweri-25]
- _ = x[Mul-26]
- _ = x[New-27]
- _ = x[Not-28]
- _ = x[Pop-29]
- _ = x[Push-30]
- _ = x[Return-31]
- _ = x[Sub-32]
- _ = x[Subi-33]
- _ = x[Swap-34]
+ _ = x[Fnew-12]
+ _ = x[Equal-13]
+ _ = x[EqualSet-14]
+ _ = x[Exit-15]
+ _ = x[Field-16]
+ _ = x[FieldSet-17]
+ _ = x[Greater-18]
+ _ = x[Grow-19]
+ _ = x[Index-20]
+ _ = x[Jump-21]
+ _ = x[JumpTrue-22]
+ _ = x[JumpFalse-23]
+ _ = x[JumpSetTrue-24]
+ _ = x[JumpSetFalse-25]
+ _ = x[Lower-26]
+ _ = x[Loweri-27]
+ _ = x[Mul-28]
+ _ = x[New-29]
+ _ = x[Not-30]
+ _ = x[Pop-31]
+ _ = x[Push-32]
+ _ = x[Return-33]
+ _ = x[Sub-34]
+ _ = x[Subi-35]
+ _ = x[Swap-36]
}
-const _Op_name = "NopAddAddrAssignFassignVassignCallCalliCallXDerefDupFdupEqualEqualSetExitFieldGreaterGrowIndexJumpJumpTrueJumpFalseJumpSetTrueJumpSetFalseLowerLoweriMulNewNotPopPushReturnSubSubiSwap"
+const _Op_name = "NopAddAddrAssignFassignVassignCallCalliCallXDerefDupFdupFnewEqualEqualSetExitFieldFieldSetGreaterGrowIndexJumpJumpTrueJumpFalseJumpSetTrueJumpSetFalseLowerLoweriMulNewNotPopPushReturnSubSubiSwap"
-var _Op_index = [...]uint8{0, 3, 6, 10, 16, 23, 30, 34, 39, 44, 49, 52, 56, 61, 69, 73, 78, 85, 89, 94, 98, 106, 115, 126, 138, 143, 149, 152, 155, 158, 161, 165, 171, 174, 178, 182}
+var _Op_index = [...]uint8{0, 3, 6, 10, 16, 23, 30, 34, 39, 44, 49, 52, 56, 60, 65, 73, 77, 82, 90, 97, 101, 106, 110, 118, 127, 138, 150, 155, 161, 164, 167, 170, 173, 177, 183, 186, 190, 194}
func (i Op) String() string {
idx := int(i) - 0