|
28 | 28 | (register str (λ [Int8] String)) |
29 | 29 | (register copy (Fn [&Int8] Int8)) |
30 | 30 |
|
| 31 | + (defn zero [] (from-long 0l)) |
31 | 32 | (defn prn [a] (Int8.str a)) |
32 | 33 |
|
33 | 34 | (register from-bytes (Fn [&(Array Byte)] (Array Int8))) |
| 35 | + (implements + Int8.+) |
| 36 | + (implements - Int8.-) |
| 37 | + (implements * Int8.*) |
| 38 | + (implements / Int8./) |
| 39 | + (implements < Int8.<) |
| 40 | + (implements > Int8.>) |
| 41 | + (implements = Int8.=) |
| 42 | + (implements copy Int8.copy) |
| 43 | + (implements zero Int8.zero) |
| 44 | + (implements bit-shift-left Int8.bit-shift-left) |
| 45 | + (implements bit-shift-right Int8.bit-shift-right) |
| 46 | + (implements bit-and Int8.bit-and) |
| 47 | + (implements bit-or Int8.bit-or) |
| 48 | + (implements bit-xor Int8.bit-xor) |
| 49 | + (implements bit-not Int8.bit-not) |
34 | 50 | ) |
35 | 51 |
|
36 | 52 | (defmodule Int8Extra |
37 | | - (defn prn [a] (Int8.prn @a)) |
38 | | - (defn str [a] (Int8.str @a)) |
39 | 53 | (defn = [a b] (Int8.= @a @b)) |
| 54 | + (implements = Int8Extra.=) |
40 | 55 | ) |
41 | 56 |
|
42 | 57 | (defmodule Int16 |
|
58 | 73 | (register str (λ [Int16] String)) |
59 | 74 | (register copy (Fn [&Int16] Int16)) |
60 | 75 |
|
| 76 | + (defn zero [] (from-long 0l)) |
61 | 77 | (defn prn [a] (Int16.str a)) |
62 | 78 |
|
63 | 79 | (register from-bytes (Fn [&(Array Byte)] (Array Int16))) |
| 80 | + (implements + Int16.+) |
| 81 | + (implements - Int16.-) |
| 82 | + (implements * Int16.*) |
| 83 | + (implements / Int16./) |
| 84 | + (implements < Int16.<) |
| 85 | + (implements > Int16.>) |
| 86 | + (implements = Int16.=) |
| 87 | + (implements copy Int16.copy) |
| 88 | + (implements zero Int16.zero) |
| 89 | + (implements bit-shift-left Int16.bit-shift-left) |
| 90 | + (implements bit-shift-right Int16.bit-shift-right) |
| 91 | + (implements bit-and Int16.bit-and) |
| 92 | + (implements bit-or Int16.bit-or) |
| 93 | + (implements bit-xor Int16.bit-xor) |
| 94 | + (implements bit-not Int16.bit-not) |
64 | 95 | ) |
65 | 96 |
|
66 | 97 | (defmodule Int16Extra |
67 | | - (defn prn [a] (Int16.prn @a)) |
68 | | - (defn str [a] (Int16.str @a)) |
69 | 98 | (defn = [a b] (Int16.= @a @b)) |
| 99 | + (implements = Int16Extra.=) |
70 | 100 | ) |
71 | 101 |
|
72 | 102 | (defmodule Int32 |
|
88 | 118 | (register str (λ [Int32] String)) |
89 | 119 | (register copy (Fn [&Int32] Int32)) |
90 | 120 |
|
| 121 | + (defn zero [] (from-long 0l)) |
91 | 122 | (defn prn [a] (Int32.str a)) |
92 | 123 |
|
93 | 124 | (register from-bytes (Fn [&(Array Byte)] (Array Int32))) |
| 125 | + (implements + Int32.+) |
| 126 | + (implements - Int32.-) |
| 127 | + (implements * Int32.*) |
| 128 | + (implements / Int32./) |
| 129 | + (implements < Int32.<) |
| 130 | + (implements > Int32.>) |
| 131 | + (implements = Int32.=) |
| 132 | + (implements copy Int32.copy) |
| 133 | + (implements zero Int32.zero) |
| 134 | + (implements bit-shift-left Int32.bit-shift-left) |
| 135 | + (implements bit-shift-right Int32.bit-shift-right) |
| 136 | + (implements bit-and Int32.bit-and) |
| 137 | + (implements bit-or Int32.bit-or) |
| 138 | + (implements bit-xor Int32.bit-xor) |
| 139 | + (implements bit-not Int32.bit-not) |
94 | 140 | ) |
95 | 141 |
|
96 | 142 | (defmodule Int32Extra |
97 | | - (defn prn [a] (Int32.prn @a)) |
98 | | - (defn str [a] (Int32.str @a)) |
99 | 143 | (defn = [a b] (Int32.= @a @b)) |
| 144 | + (implements = Int32Extra.=) |
100 | 145 | ) |
101 | 146 |
|
102 | 147 | (defmodule Int64 |
|
118 | 163 | (register str (λ [Int64] String)) |
119 | 164 | (register copy (Fn [&Int64] Int64)) |
120 | 165 |
|
| 166 | + (defn zero [] (from-long 0l)) |
121 | 167 | (defn prn [a] (Int64.str a)) |
122 | 168 |
|
123 | 169 | (register from-bytes (Fn [&(Array Byte)] (Array Int64))) |
| 170 | + (implements + Int64.+) |
| 171 | + (implements - Int64.-) |
| 172 | + (implements * Int64.*) |
| 173 | + (implements / Int64./) |
| 174 | + (implements < Int64.<) |
| 175 | + (implements > Int64.>) |
| 176 | + (implements = Int64.=) |
| 177 | + (implements copy Int64.copy) |
| 178 | + (implements zero Int64.zero) |
| 179 | + (implements bit-shift-left Int64.bit-shift-left) |
| 180 | + (implements bit-shift-right Int64.bit-shift-right) |
| 181 | + (implements bit-and Int64.bit-and) |
| 182 | + (implements bit-or Int64.bit-or) |
| 183 | + (implements bit-xor Int64.bit-xor) |
| 184 | + (implements bit-not Int64.bit-not) |
124 | 185 | ) |
125 | 186 |
|
126 | 187 | (defmodule Int64Extra |
127 | | - (defn prn [a] (Int64.prn @a)) |
128 | | - (defn str [a] (Int64.str @a)) |
129 | 188 | (defn = [a b] (Int64.= @a @b)) |
| 189 | + (implements = Int64Extra.=) |
130 | 190 | ) |
131 | 191 |
|
132 | 192 | (defmodule Uint8 |
|
148 | 208 | (register str (λ [Uint8] String)) |
149 | 209 | (register copy (Fn [&Uint8] Uint8)) |
150 | 210 |
|
| 211 | + (defn zero [] (from-long 0l)) |
151 | 212 | (defn prn [a] (Uint8.str a)) |
152 | 213 |
|
153 | 214 | (register from-bytes (Fn [&(Array Byte)] (Array Uint8))) |
| 215 | + (implements + Uint8.+) |
| 216 | + (implements - Uint8.-) |
| 217 | + (implements * Uint8.*) |
| 218 | + (implements / Uint8./) |
| 219 | + (implements < Uint8.<) |
| 220 | + (implements > Uint8.>) |
| 221 | + (implements = Uint8.=) |
| 222 | + (implements copy Uint8.copy) |
| 223 | + (implements zero Uint8.zero) |
| 224 | + (implements bit-shift-left Uint8.bit-shift-left) |
| 225 | + (implements bit-shift-right Uint8.bit-shift-right) |
| 226 | + (implements bit-and Uint8.bit-and) |
| 227 | + (implements bit-or Uint8.bit-or) |
| 228 | + (implements bit-xor Uint8.bit-xor) |
| 229 | + (implements bit-not Uint8.bit-not) |
154 | 230 | ) |
155 | 231 |
|
156 | 232 | (defmodule Uint8Extra |
157 | | - (defn prn [a] (Uint8.prn @a)) |
158 | | - (defn str [a] (Uint8.str @a)) |
159 | 233 | (defn = [a b] (Uint8.= @a @b)) |
| 234 | + (implements = Uint8Extra.=) |
160 | 235 | ) |
161 | 236 |
|
162 | 237 | (defmodule Uint16 |
|
178 | 253 | (register str (λ [Uint16] String)) |
179 | 254 | (register copy (Fn [&Uint16] Uint16)) |
180 | 255 |
|
| 256 | + (defn zero [] (from-long 0l)) |
181 | 257 | (defn prn [a] (Uint16.str a)) |
182 | 258 |
|
183 | 259 | (register from-bytes (Fn [&(Array Byte)] (Array Uint16))) |
| 260 | + (implements + Uint16.+) |
| 261 | + (implements - Uint16.-) |
| 262 | + (implements * Uint16.*) |
| 263 | + (implements / Uint16./) |
| 264 | + (implements < Uint16.<) |
| 265 | + (implements > Uint16.>) |
| 266 | + (implements = Uint16.=) |
| 267 | + (implements copy Uint16.copy) |
| 268 | + (implements zero Uint16.zero) |
| 269 | + (implements bit-shift-left Uint16.bit-shift-left) |
| 270 | + (implements bit-shift-right Uint16.bit-shift-right) |
| 271 | + (implements bit-and Uint16.bit-and) |
| 272 | + (implements bit-or Uint16.bit-or) |
| 273 | + (implements bit-xor Uint16.bit-xor) |
| 274 | + (implements bit-not Uint16.bit-not) |
184 | 275 | ) |
185 | 276 |
|
186 | 277 | (defmodule Uint16Extra |
187 | | - (defn prn [a] (Uint16.prn @a)) |
188 | | - (defn str [a] (Uint16.str @a)) |
189 | 278 | (defn = [a b] (Uint16.= @a @b)) |
| 279 | + (implements = Uint16Extra.=) |
190 | 280 | ) |
191 | 281 |
|
192 | 282 | (defmodule Uint32 |
|
208 | 298 | (register str (λ [Uint32] String)) |
209 | 299 | (register copy (Fn [&Uint32] Uint32)) |
210 | 300 |
|
| 301 | + (defn zero [] (from-long 0l)) |
211 | 302 | (defn prn [a] (Uint32.str a)) |
212 | 303 |
|
213 | 304 | (register from-bytes (Fn [&(Array Byte)] (Array Uint32))) |
| 305 | + (implements + Uint32.+) |
| 306 | + (implements - Uint32.-) |
| 307 | + (implements * Uint32.*) |
| 308 | + (implements / Uint32./) |
| 309 | + (implements < Uint32.<) |
| 310 | + (implements > Uint32.>) |
| 311 | + (implements = Uint32.=) |
| 312 | + (implements copy Uint32.copy) |
| 313 | + (implements zero Uint32.zero) |
| 314 | + (implements bit-shift-left Uint32.bit-shift-left) |
| 315 | + (implements bit-shift-right Uint32.bit-shift-right) |
| 316 | + (implements bit-and Uint32.bit-and) |
| 317 | + (implements bit-or Uint32.bit-or) |
| 318 | + (implements bit-xor Uint32.bit-xor) |
| 319 | + (implements bit-not Uint32.bit-not) |
214 | 320 | ) |
215 | 321 |
|
216 | 322 | (defmodule Uint32Extra |
217 | | - (defn prn [a] (Uint32.prn @a)) |
218 | | - (defn str [a] (Uint32.str @a)) |
219 | 323 | (defn = [a b] (Uint32.= @a @b)) |
| 324 | + (implements = Uint32Extra.=) |
220 | 325 | ) |
221 | 326 |
|
222 | 327 | (defmodule Uint64 |
|
238 | 343 | (register str (λ [Uint64] String)) |
239 | 344 | (register copy (Fn [&Uint64] Uint64)) |
240 | 345 |
|
| 346 | + (defn zero [] (from-long 0l)) |
241 | 347 | (defn prn [a] (Uint64.str a)) |
242 | 348 |
|
243 | 349 | (register from-bytes (Fn [&(Array Byte)] (Array Uint64))) |
| 350 | + (implements + Uint64.+) |
| 351 | + (implements - Uint64.-) |
| 352 | + (implements * Uint64.*) |
| 353 | + (implements / Uint64./) |
| 354 | + (implements < Uint64.<) |
| 355 | + (implements > Uint64.>) |
| 356 | + (implements = Uint64.=) |
| 357 | + (implements copy Uint64.copy) |
| 358 | + (implements zero Uint64.zero) |
| 359 | + (implements bit-shift-left Uint64.bit-shift-left) |
| 360 | + (implements bit-shift-right Uint64.bit-shift-right) |
| 361 | + (implements bit-and Uint64.bit-and) |
| 362 | + (implements bit-or Uint64.bit-or) |
| 363 | + (implements bit-xor Uint64.bit-xor) |
| 364 | + (implements bit-not Uint64.bit-not) |
244 | 365 | ) |
245 | 366 |
|
246 | 367 | (defmodule Uint64Extra |
247 | | - (defn prn [a] (Uint64.prn @a)) |
248 | | - (defn str [a] (Uint64.str @a)) |
249 | 368 | (defn = [a b] (Uint64.= @a @b)) |
| 369 | + (implements = Uint64Extra.=) |
250 | 370 | ) |
0 commit comments