diff backendutils_c.rhope @ 135:18a4403fe576

Javascript backend can now produce broken output. Needs fixes plus port of standard lib
author Mike Pavone <pavone@retrodev.com>
date Sun, 14 Nov 2010 03:09:49 -0500
parents b7df624895b2
children fc3815b7462f
line wrap: on
line diff
--- a/backendutils_c.rhope	Wed Nov 10 22:29:49 2010 -0500
+++ b/backendutils_c.rhope	Sun Nov 14 03:09:49 2010 -0500
@@ -44,6 +44,11 @@
 	out <- op
 }
 
+Get Type@String[op,func:out]
+{
+	out <- [func]Get Var Type[op]
+}
+
 Make Op@String Cat[string,func:out]
 {
 	out <- [func]Resolve[string]
@@ -54,6 +59,11 @@
 	out <- op
 }
 
+Get Type@String Cat[op,func:out]
+{
+	out <- [func]Get Var Type[op]
+}
+
 Make Op@String Slice[string,func:out]
 {
 	out <- [func]Resolve[string]
@@ -64,6 +74,11 @@
 	out <- op
 }
 
+Get Type@String Slice[op,func:out]
+{
+	out <- [func]Get Var Type[op]
+}
+
 Make Op@Whole Number[num,func:out]
 {
 	out <- num
@@ -120,6 +135,11 @@
 	out <- [func]Lookup Constant[[const]Value >>, [const]Need Addref >>]
 }
 
+Get Type@Constant[const,func:out]
+{
+	out <- [func]Get Constant Type[const]
+}
+
 Strip Addref@Constant[op:out]
 {
 	out <- [op]Need Addref <<[No]
@@ -269,6 +289,11 @@
 	out <- [[Build[Field Ref()]]Variable <<[var]]Field <<[field]
 }
 
+Get Type@Field Ref[ref,func:out]
+{
+	out <- [func]Get Field Type[[[ref]Variable >>]Get Type[func], [ref]Field >>]
+}
+
 Make Op@Field Ref[ref,func:out]
 {
 	out <- [func]Field Result[[ref]Variable >>,[ref]Field >>]