1.1 --- a/templates/native/int.c Sat Nov 06 17:06:01 2021 +0100
1.2 +++ b/templates/native/int.c Sun Nov 07 01:18:51 2021 +0100
1.3 @@ -31,12 +31,12 @@
1.4
1.5 /* Integer operations. */
1.6
1.7 -__attr __fn_native_int_is_int(__attr __self, __attr obj)
1.8 +__attr __fn_native_int_is_int(__attr __stack, __attr __self, __attr obj)
1.9 {
1.10 return __INTEGER(obj) ? __builtins___boolean_True : __builtins___boolean_False;
1.11 }
1.12
1.13 -__attr __fn_native_int_int_add(__attr __self, __attr self, __attr other)
1.14 +__attr __fn_native_int_int_add(__attr __stack, __attr __self, __attr self, __attr other)
1.15 {
1.16 /* self and other interpreted as int */
1.17 __int i = __TOINT(self);
1.18 @@ -49,10 +49,10 @@
1.19 __raise_overflow_error();
1.20
1.21 /* Return the new integer. */
1.22 - return __new_int(i + j);
1.23 + return __new_int(__stack, i + j);
1.24 }
1.25
1.26 -__attr __fn_native_int_int_sub(__attr __self, __attr self, __attr other)
1.27 +__attr __fn_native_int_int_sub(__attr __stack, __attr __self, __attr self, __attr other)
1.28 {
1.29 /* self and other interpreted as int */
1.30 __int i = __TOINT(self);
1.31 @@ -65,10 +65,10 @@
1.32 __raise_overflow_error();
1.33
1.34 /* Return the new integer. */
1.35 - return __new_int(i - j);
1.36 + return __new_int(__stack, i - j);
1.37 }
1.38
1.39 -__attr __fn_native_int_int_mul(__attr __self, __attr self, __attr other)
1.40 +__attr __fn_native_int_int_mul(__attr __stack, __attr __self, __attr self, __attr other)
1.41 {
1.42 /* self and other interpreted as int */
1.43 __int i = __TOINT(self);
1.44 @@ -83,10 +83,10 @@
1.45 __raise_overflow_error();
1.46
1.47 /* Return the new integer. */
1.48 - return __new_int(i * j);
1.49 + return __new_int(__stack, i * j);
1.50 }
1.51
1.52 -__attr __fn_native_int_int_div(__attr __self, __attr self, __attr other)
1.53 +__attr __fn_native_int_int_div(__attr __stack, __attr __self, __attr self, __attr other)
1.54 {
1.55 /* self and other interpreted as int */
1.56 __int i = __TOINT(self);
1.57 @@ -99,10 +99,10 @@
1.58 __raise_overflow_error();
1.59
1.60 /* Return the new integer. */
1.61 - return __new_int(i / j);
1.62 + return __new_int(__stack, i / j);
1.63 }
1.64
1.65 -__attr __fn_native_int_int_mod(__attr __self, __attr self, __attr other)
1.66 +__attr __fn_native_int_int_mod(__attr __stack, __attr __self, __attr self, __attr other)
1.67 {
1.68 /* self and other interpreted as int */
1.69 __int i = __TOINT(self);
1.70 @@ -115,10 +115,10 @@
1.71 __raise_overflow_error();
1.72
1.73 /* Return the new integer. */
1.74 - return __new_int(i % j);
1.75 + return __new_int(__stack, i % j);
1.76 }
1.77
1.78 -__attr __fn_native_int_int_neg(__attr __self, __attr self)
1.79 +__attr __fn_native_int_int_neg(__attr __stack, __attr __self, __attr self)
1.80 {
1.81 /* self interpreted as int */
1.82 __int i = __TOINT(self);
1.83 @@ -128,10 +128,10 @@
1.84 __raise_overflow_error();
1.85
1.86 /* Return the new integer. */
1.87 - return __new_int(-i);
1.88 + return __new_int(__stack, -i);
1.89 }
1.90
1.91 -__attr __fn_native_int_int_pow(__attr __self, __attr self, __attr other)
1.92 +__attr __fn_native_int_int_pow(__attr __stack, __attr __self, __attr self, __attr other)
1.93 {
1.94 /* self and other interpreted as int */
1.95 __int i = __TOINT(self);
1.96 @@ -151,10 +151,10 @@
1.97 __raise_overflow_error();
1.98
1.99 /* Return the new integer. */
1.100 - return __new_int(k);
1.101 + return __new_int(__stack, k);
1.102 }
1.103
1.104 -__attr __fn_native_int_int_and(__attr __self, __attr self, __attr other)
1.105 +__attr __fn_native_int_int_and(__attr __stack, __attr __self, __attr self, __attr other)
1.106 {
1.107 /* self and other interpreted as int */
1.108 __int i = __TOINT(self);
1.109 @@ -162,19 +162,19 @@
1.110
1.111 /* Return the new integer. */
1.112 /* NOTE: No overflow test applied. */
1.113 - return __new_int(i & j);
1.114 + return __new_int(__stack, i & j);
1.115 }
1.116
1.117 -__attr __fn_native_int_int_not(__attr __self, __attr self)
1.118 +__attr __fn_native_int_int_not(__attr __stack, __attr __self, __attr self)
1.119 {
1.120 /* self interpreted as int */
1.121 __int i = __TOINT(self);
1.122
1.123 /* Return the new integer. */
1.124 - return __new_int(~i);
1.125 + return __new_int(__stack, ~i);
1.126 }
1.127
1.128 -__attr __fn_native_int_int_or(__attr __self, __attr self, __attr other)
1.129 +__attr __fn_native_int_int_or(__attr __stack, __attr __self, __attr self, __attr other)
1.130 {
1.131 /* self and other interpreted as int */
1.132 __int i = __TOINT(self);
1.133 @@ -182,10 +182,10 @@
1.134
1.135 /* Return the new integer. */
1.136 /* NOTE: No overflow test applied. */
1.137 - return __new_int(i | j);
1.138 + return __new_int(__stack, i | j);
1.139 }
1.140
1.141 -__attr __fn_native_int_int_xor(__attr __self, __attr self, __attr other)
1.142 +__attr __fn_native_int_int_xor(__attr __stack, __attr __self, __attr self, __attr other)
1.143 {
1.144 /* self and other interpreted as int */
1.145 __int i = __TOINT(self);
1.146 @@ -193,10 +193,10 @@
1.147
1.148 /* Return the new integer. */
1.149 /* NOTE: No overflow test applied. */
1.150 - return __new_int(i ^ j);
1.151 + return __new_int(__stack, i ^ j);
1.152 }
1.153
1.154 -__attr __fn_native_int_int_lshift(__attr __self, __attr self, __attr other)
1.155 +__attr __fn_native_int_int_lshift(__attr __stack, __attr __self, __attr self, __attr other)
1.156 {
1.157 /* self and other interpreted as int */
1.158 __int i = __TOINT(self);
1.159 @@ -204,10 +204,10 @@
1.160
1.161 /* Return the new integer. */
1.162 /* NOTE: No overflow test applied. */
1.163 - return __new_int(i << j);
1.164 + return __new_int(__stack, i << j);
1.165 }
1.166
1.167 -__attr __fn_native_int_int_rshift(__attr __self, __attr self, __attr other)
1.168 +__attr __fn_native_int_int_rshift(__attr __stack, __attr __self, __attr self, __attr other)
1.169 {
1.170 /* self and other interpreted as int */
1.171 __int i = __TOINT(self);
1.172 @@ -215,10 +215,10 @@
1.173
1.174 /* Return the new integer. */
1.175 /* NOTE: No overflow test applied. */
1.176 - return __new_int(i >> j);
1.177 + return __new_int(__stack, i >> j);
1.178 }
1.179
1.180 -__attr __fn_native_int_int_le(__attr __self, __attr self, __attr other)
1.181 +__attr __fn_native_int_int_le(__attr __stack, __attr __self, __attr self, __attr other)
1.182 {
1.183 /* self and other interpreted as int */
1.184 __int i = __TOINT(self);
1.185 @@ -228,7 +228,7 @@
1.186 return i <= j ? __builtins___boolean_True : __builtins___boolean_False;
1.187 }
1.188
1.189 -__attr __fn_native_int_int_lt(__attr __self, __attr self, __attr other)
1.190 +__attr __fn_native_int_int_lt(__attr __stack, __attr __self, __attr self, __attr other)
1.191 {
1.192 /* self and other interpreted as int */
1.193 __int i = __TOINT(self);
1.194 @@ -238,7 +238,7 @@
1.195 return i < j ? __builtins___boolean_True : __builtins___boolean_False;
1.196 }
1.197
1.198 -__attr __fn_native_int_int_ge(__attr __self, __attr self, __attr other)
1.199 +__attr __fn_native_int_int_ge(__attr __stack, __attr __self, __attr self, __attr other)
1.200 {
1.201 /* self and other interpreted as int */
1.202 __int i = __TOINT(self);
1.203 @@ -248,7 +248,7 @@
1.204 return i >= j ? __builtins___boolean_True : __builtins___boolean_False;
1.205 }
1.206
1.207 -__attr __fn_native_int_int_gt(__attr __self, __attr self, __attr other)
1.208 +__attr __fn_native_int_int_gt(__attr __stack, __attr __self, __attr self, __attr other)
1.209 {
1.210 /* self and other interpreted as int */
1.211 __int i = __TOINT(self);
1.212 @@ -258,7 +258,7 @@
1.213 return i > j ? __builtins___boolean_True : __builtins___boolean_False;
1.214 }
1.215
1.216 -__attr __fn_native_int_int_eq(__attr __self, __attr self, __attr other)
1.217 +__attr __fn_native_int_int_eq(__attr __stack, __attr __self, __attr self, __attr other)
1.218 {
1.219 /* self and other interpreted as int */
1.220 __int i = __TOINT(self);
1.221 @@ -268,7 +268,7 @@
1.222 return i == j ? __builtins___boolean_True : __builtins___boolean_False;
1.223 }
1.224
1.225 -__attr __fn_native_int_int_ne(__attr __self, __attr self, __attr other)
1.226 +__attr __fn_native_int_int_ne(__attr __stack, __attr __self, __attr self, __attr other)
1.227 {
1.228 /* self and other interpreted as int */
1.229 __int i = __TOINT(self);
1.230 @@ -278,7 +278,7 @@
1.231 return i != j ? __builtins___boolean_True : __builtins___boolean_False;
1.232 }
1.233
1.234 -__attr __fn_native_int_int_str(__attr __self, __attr self)
1.235 +__attr __fn_native_int_int_str(__attr __stack, __attr __self, __attr self)
1.236 {
1.237 /* self interpreted as int */
1.238 __int i = __TOINT(self);
1.239 @@ -294,12 +294,12 @@
1.240 return __new_str(s, strlen(s));
1.241 }
1.242
1.243 -__attr __fn_native_int_int_float(__attr __self, __attr self)
1.244 +__attr __fn_native_int_int_float(__attr __stack, __attr __self, __attr self)
1.245 {
1.246 /* self interpreted as int */
1.247 int i = __TOINT(self);
1.248
1.249 - return __new_float((double) i);
1.250 + return __new_float(__stack, (double) i);
1.251 }
1.252
1.253 /* Module initialisation. */