From d0c6994a0c3706a3eb09d32c8bf33513b1dbd3be Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 12 Apr 2017 18:06:10 +0200 Subject: Implement integer comparsion primitives --- src/primitives/impl.d | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/primitives/impl.d') diff --git a/src/primitives/impl.d b/src/primitives/impl.d index 4ec9019..56ea4ce 100644 --- a/src/primitives/impl.d +++ b/src/primitives/impl.d @@ -117,3 +117,19 @@ bool binary_op_stack_swp() { return true; } + +bool binary_cond_lt() { + int b = stack.pop.get!int; + int a = stack.pop.get!int; + + stack.push(a < b); + return true; +} + +bool binary_cond_eq() { + int b = stack.pop.get!int; + int a = stack.pop.get!int; + + stack.push(a == b); + return true; +} -- cgit v1.2.3