aboutsummaryrefslogtreecommitdiff
path: root/vm.d
diff options
context:
space:
mode:
authormryouse2023-06-06 20:27:18 -0400
committermryouse2023-06-06 20:27:18 -0400
commit59d076f6dc179315b6dfc1c141dc9ee48cc66a54 (patch)
treeec667f8146e12299404ab11d52fed2e8d79c62b3 /vm.d
parent87ee44163d0f7ec86963cefea51e721ce4eb156c (diff)
initial commit of reverse
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 a8d3d6e..db2d4a0 100644
--- a/vm.d
+++ b/vm.d
@@ -475,6 +475,10 @@ class VM {
Seq seq = asSeq(this.popA());
this.pushA(makeNumberValue(seq.length()));
break;
+ case OpCode.OP_REVERSE:
+ Seq seq = asSeq(this.popA());
+ this.pushA(makeSeqValue(seq.reverse()));
+ break;
case OpCode.OP_MEMBER:
Seq seq = asSeq(this.popA());
Value val = this.popA();