comparison cbackend.rhope @ 50:689fb73e7612

Add support for various integer literals and add support for raw pointers to objects and raw pointers to arrays in the FFI
author Mike Pavone <pavone@retrodev.com>
date Fri, 16 Apr 2010 01:57:04 -0400
parents 3e20ed8959c4
children 079200bc3e75
comparison
equal deleted inserted replaced
49:3e20ed8959c4 50:689fb73e7612
1073 { Print["_Set Consts got output yes"] } 1073 { Print["_Set Consts got output yes"] }
1074 }{ 1074 }{
1075 out <- [text]Append[[["\t_const_"]Append[Escape Rhope Name[name]]]Append[" = (object *)val_no;\n"]] 1075 out <- [text]Append[[["\t_const_"]Append[Escape Rhope Name[name]]]Append[" = (object *)val_no;\n"]]
1076 { Print["_Set Consts got output no"] } 1076 { Print["_Set Consts got output no"] }
1077 } 1077 }
1078 }{
1079 If[[valtype] = ["Machine Integer"]]
1080 {
1081 If[[value]Signed? >>]
1082 { s <- "I" }
1083 { s <- "UI" }
1084
1085 make <- [[[" = make_"]Append[s]]Append["nt"]]Append[[value]Size >>]
1086 out <- [text]Append[ [[[[["\t_const_"]Append[Escape Rhope Name[name]]]Append[make]]Append["("]]Append[[value]Value >>]]Append[");\n"] ]
1087 }
1078 } 1088 }
1079 } 1089 }
1080 } 1090 }
1081 } 1091 }
1082 1092