Mercurial > repos > rhope
comparison number.rhope @ 52:079200bc3e75
String literals almost working. Print moved out of C runtime.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 28 Apr 2010 01:23:30 -0400 |
parents | 7d6a6906b648 |
children | d0ce696786cc |
comparison
equal
deleted
inserted
replaced
51:7d6a6906b648 | 52:079200bc3e75 |
---|---|
82 compops <- (("<", "CompLess"), (">", "CompGreater"), ("=", "CompEqual"), ("<=", "CompLessEqual"), (">=", "CompGreaterEqual"), ("!=", "CompNotEqual")) | 82 compops <- (("<", "CompLess"), (">", "CompGreater"), ("=", "CompEqual"), ("<=", "CompLessEqual"), (">=", "CompGreaterEqual"), ("!=", "CompNotEqual")) |
83 | 83 |
84 Fold[["Compile Number Method"]Set Input[2, type], backend, opmap] | 84 Fold[["Compile Number Method"]Set Input[2, type], backend, opmap] |
85 { Fold[["Compile Number Comp Method"]Set Input[2, type], ~, compops] | 85 { Fold[["Compile Number Comp Method"]Set Input[2, type], ~, compops] |
86 { Fold[[["Compile Conversion Method"]Set Input[1, type]]Set Input[3, ""], ~, Legal Conversions[type]] | 86 { Fold[[["Compile Conversion Method"]Set Input[1, type]]Set Input[3, ""], ~, Legal Conversions[type]] |
87 { out <- Fold[[["Compile Conversion Method"]Set Input[1, type]]Set Input[3, "Trunc "], ~, Legal Conversions[type]] }}} | 87 { out <- Fold[[["Compile Conversion Method"]Set Input[1, type]]Set Input[3, "Trunc "], ~, Truncations[type]] }}} |
88 } | 88 } |
89 | 89 |
90 Generate Number Methods[backend:out] | 90 Generate Number Methods[backend:out] |
91 { | 91 { |
92 numtypes <- ("Int8","Int16","Int32","Int64","UInt8","UInt16","UInt32","UInt64") | 92 numtypes <- ("Int8","Int16","Int32","Int64","UInt8","UInt16","UInt32","UInt64") |
154 compmethods <- ("<", ">", "=", "<=", ">=", "!=") | 154 compmethods <- ("<", ">", "=", "<=", ">=", "!=") |
155 register <- ["Register Number Method"]Set Input[2, type] | 155 register <- ["Register Number Method"]Set Input[2, type] |
156 Fold[[register]Set Input[3, type], program, methods] | 156 Fold[[register]Set Input[3, type], program, methods] |
157 { Fold[[register]Set Input[3, "Boolean"], ~, compmethods] | 157 { Fold[[register]Set Input[3, "Boolean"], ~, compmethods] |
158 { Fold[[["Register Conversion Method"]Set Input[1, type]]Set Input[3, ""], ~, Legal Conversions[type]] | 158 { Fold[[["Register Conversion Method"]Set Input[1, type]]Set Input[3, ""], ~, Legal Conversions[type]] |
159 { out <- Fold[[["Register Conversion Method"]Set Input[1, type]]Set Input[3, "Trunc ", ~, Truncations[type]] }}} | 159 { out <- Fold[[["Register Conversion Method"]Set Input[1, type]]Set Input[3, "Trunc "], ~, Truncations[type]] }}} |
160 } | 160 } |
161 | 161 |
162 Register Number Methods[program:out] | 162 Register Number Methods[program:out] |
163 { | 163 { |
164 numtypes <- ("Int8","Int16","Int32","Int64","UInt8","UInt16","UInt32","UInt64") | 164 numtypes <- ("Int8","Int16","Int32","Int64","UInt8","UInt16","UInt32","UInt64") |