aboutsummaryrefslogtreecommitdiff
path: root/vm.d
diff options
context:
space:
mode:
authormryouse2023-05-25 22:52:07 +0000
committermryouse2023-05-25 22:52:07 +0000
commit785b43a7b6635e6fadb94e224a094e524c9e0ccd (patch)
tree5c60ee3d25a747c21e480283a9dd4021457c43f3 /vm.d
parent3535bfefccea789169786767ac80c54241cae019 (diff)
length on seq
Diffstat (limited to 'vm.d')
-rw-r--r--vm.d4
1 files changed, 4 insertions, 0 deletions
diff --git a/vm.d b/vm.d
index 5f1d889..40877b8 100644
--- a/vm.d
+++ b/vm.d
@@ -395,6 +395,10 @@ class VM {
Seq seq = asSeq(this.popA());
this.pushA(makeSeqValue(seq.rest()));
break;
+ case OpCode.OP_LENGTH:
+ Seq seq = asSeq(this.popA());
+ this.pushA(makeNumberValue(seq.length()));
+ break;
case OpCode.OP_ADD:
Value b = this.popA();
/*