diff backendutils_c.rhope @ 169:fd06fb07762a

Basic inlining of arithmetic and comparison operations on integer types
author Mike Pavone <pavone@retrodev.com>
date Sun, 08 May 2011 01:37:44 -0700
parents a68e6828d896
children ed322ae64738
line wrap: on
line diff
--- a/backendutils_c.rhope	Sun May 01 18:41:17 2011 -0700
+++ b/backendutils_c.rhope	Sun May 08 01:37:44 2011 -0700
@@ -236,6 +236,27 @@
 	out <- [[op]Left <<[ [[op]Left >>]Strip Addref ]]Right <<[ [[op]Right >>]Strip Addref ]
 }
 
+Blueprint Cast
+{
+	Value
+	Type
+}
+
+Cast[val,type:out]
+{
+	out <- [[Build[Cast()]]Value <<[val]]Type <<[type]
+}
+
+Make Op@Cast[cast,func:out]
+{
+	out <- [func]Cast Value[[cast]Value >>, [cast]Type >>]
+}
+
+Strip Addref@Cast[op:out]
+{
+	out <- [op]Value <<[[[op]Value >>]Strip Addref]
+}
+
 Blueprint NotCond
 {
 	Condition