summaryrefslogtreecommitdiff
path: root/parse/ops.def
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-11-10 18:43:38 -0500
committerOri Bernstein <ori@eigenstate.org>2014-11-10 18:43:38 -0500
commit7d590b64d3ad57239c8835b2fd1a0d2db2b2981a (patch)
tree3b7c832ca3323bd8e6dfaad83547e228f62b17e8 /parse/ops.def
parent39e533eb005ede822948726073f3a0925e3998b8 (diff)
downloadmc-7d590b64d3ad57239c8835b2fd1a0d2db2b2981a.tar.gz
Operator shuffling.
Preparation for better compilation of match statements.
Diffstat (limited to 'parse/ops.def')
-rw-r--r--parse/ops.def14
1 files changed, 11 insertions, 3 deletions
diff --git a/parse/ops.def b/parse/ops.def
index b9bbc43..be7f8d7 100644
--- a/parse/ops.def
+++ b/parse/ops.def
@@ -50,25 +50,32 @@ O(Obreak, 0)
O(Ocontinue, 0)
O(Ovar, 1)
O(Olit, 1)
-O(Olbl, 1)
O(Oucon, 1)
-O(Ouget, 1)
O(Otup, 1)
O(Ostruct, 1)
O(Oarr, 1)
/* all below this point are backend-only */
O(Ocjmp, 1) /* conditional jump */
+O(Ojtab, 1) /* jump table */
O(Oset, 1) /* store to var */
O(Osllen, 1) /* size of slice */
O(Oslbase, 1) /* base of sice */
-O(Oblit, 1) /* block copy of memory */
+O(Outag, 1) /* tag of union */
+O(Oudata, 1) /* pointer to contents of union */
+O(Oblit, 1) /* blit memory */
+
+/* integer conversions */
O(Otrunc, 1) /* truncating cast */
O(Ozwiden, 1) /* zero-extending widening cast */
O(Oswiden, 1) /* sign-extending widening cast */
+
+/* float conversions */
O(Oflt2int, 1) /* float to int conversion */
O(Oint2flt, 1) /* int to float conversion */
O(Oflt2flt, 1) /* flt32<->flt64 conversion */
+
+/* floating arithmetic */
O(Ofadd, 1)
O(Ofsub, 1)
O(Ofmul, 1)
@@ -82,6 +89,7 @@ O(Ofgt, 1)
O(Ofge, 1)
O(Oflt, 1)
O(Ofle, 1)
+
/* unsigned comparisons */
O(Oueq, 1)
O(Oune, 1)