aboutsummaryrefslogtreecommitdiff
path: root/vm.d
diff options
context:
space:
mode:
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();
/*