aboutsummaryrefslogtreecommitdiff
path: root/frontend/compare_constructor.icl
diff options
context:
space:
mode:
authorronny1999-10-05 13:09:14 +0000
committerronny1999-10-05 13:09:14 +0000
commitdb9e59813541e06caece64592854862bab9c0138 (patch)
treeae7cef5982a377261188aed09dc0f0cc95c50f8c /frontend/compare_constructor.icl
parentStandard project directories initialized by cvs2svn. (diff)
Initial import
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/compare_constructor.icl')
-rw-r--r--frontend/compare_constructor.icl36
1 files changed, 36 insertions, 0 deletions
diff --git a/frontend/compare_constructor.icl b/frontend/compare_constructor.icl
new file mode 100644
index 0000000..d92f9a9
--- /dev/null
+++ b/frontend/compare_constructor.icl
@@ -0,0 +1,36 @@
+implementation module compare_constructor;
+
+equal_constructor :: !a !a ->Bool;
+equal_constructor _ _ = code {
+ .inline equal_constructor
+ pushD_a 1
+ pushD_a 0
+ pop_a 2
+ eqI
+ .end
+};
+
+less_constructor :: !a !a ->Bool;
+less_constructor _ _ = code {
+ .inline less_constructor
+ pushD_a 1
+ pushD_a 0
+ pop_a 2
+ ltI
+ .end
+};
+
+greater_constructor :: !a !a ->Bool;
+greater_constructor _ _ = code {
+ .inline greater_constructor
+ pushD_a 1
+ pushD_a 0
+ pop_a 2
+ gtI
+ .end
+};
+
+
+
+
+