1.1 --- a/templates/native/float.c Sat Nov 06 17:06:01 2021 +0100
1.2 +++ b/templates/native/float.c Sun Nov 07 01:18:51 2021 +0100
1.3 @@ -65,54 +65,54 @@
1.4
1.5 /* Floating point operations. Exceptions are raised in the signal handler. */
1.6
1.7 -__attr __fn_native_float_float_add(__attr __self, __attr self, __attr other)
1.8 +__attr __fn_native_float_float_add(__attr __stack, __attr __self, __attr self, __attr other)
1.9 {
1.10 /* self and other interpreted as float */
1.11 __float i = __TOFLOAT(self);
1.12 __float j = __TOFLOAT(other);
1.13 - return __new_float(i + j);
1.14 + return __new_float(__stack, i + j);
1.15 }
1.16
1.17 -__attr __fn_native_float_float_sub(__attr __self, __attr self, __attr other)
1.18 +__attr __fn_native_float_float_sub(__attr __stack, __attr __self, __attr self, __attr other)
1.19 {
1.20 /* self and other interpreted as float */
1.21 __float i = __TOFLOAT(self);
1.22 __float j = __TOFLOAT(other);
1.23 - return __new_float(i - j);
1.24 + return __new_float(__stack, i - j);
1.25 }
1.26
1.27 -__attr __fn_native_float_float_mul(__attr __self, __attr self, __attr other)
1.28 +__attr __fn_native_float_float_mul(__attr __stack, __attr __self, __attr self, __attr other)
1.29 {
1.30 /* self and other interpreted as float */
1.31 __float i = __TOFLOAT(self);
1.32 __float j = __TOFLOAT(other);
1.33 - return __new_float(i * j);
1.34 + return __new_float(__stack, i * j);
1.35 }
1.36
1.37 -__attr __fn_native_float_float_div(__attr __self, __attr self, __attr other)
1.38 +__attr __fn_native_float_float_div(__attr __stack, __attr __self, __attr self, __attr other)
1.39 {
1.40 /* self and other interpreted as float */
1.41 __float i = __TOFLOAT(self);
1.42 __float j = __TOFLOAT(other);
1.43 - return __new_float(i / j);
1.44 + return __new_float(__stack, i / j);
1.45 }
1.46
1.47 -__attr __fn_native_float_float_mod(__attr __self, __attr self, __attr other)
1.48 +__attr __fn_native_float_float_mod(__attr __stack, __attr __self, __attr self, __attr other)
1.49 {
1.50 /* self and other interpreted as float */
1.51 __float i = __TOFLOAT(self);
1.52 __float j = __TOFLOAT(other);
1.53 - return __new_float(fmod(i, j));
1.54 + return __new_float(__stack, fmod(i, j));
1.55 }
1.56
1.57 -__attr __fn_native_float_float_neg(__attr __self, __attr self)
1.58 +__attr __fn_native_float_float_neg(__attr __stack, __attr __self, __attr self)
1.59 {
1.60 /* self interpreted as float */
1.61 __float i = __TOFLOAT(self);
1.62 - return __new_float(-i);
1.63 + return __new_float(__stack, -i);
1.64 }
1.65
1.66 -__attr __fn_native_float_float_pow(__attr __self, __attr self, __attr other)
1.67 +__attr __fn_native_float_float_pow(__attr __stack, __attr __self, __attr self, __attr other)
1.68 {
1.69 /* self and other interpreted as float */
1.70 __float i = __TOFLOAT(self);
1.71 @@ -128,10 +128,10 @@
1.72 __raise_overflow_error();
1.73
1.74 /* Return the result. */
1.75 - return __new_float(result);
1.76 + return __new_float(__stack, result);
1.77 }
1.78
1.79 -__attr __fn_native_float_float_le(__attr __self, __attr self, __attr other)
1.80 +__attr __fn_native_float_float_le(__attr __stack, __attr __self, __attr self, __attr other)
1.81 {
1.82 /* self and other interpreted as float */
1.83 __float i = __TOFLOAT(self);
1.84 @@ -141,7 +141,7 @@
1.85 return i <= j ? __builtins___boolean_True : __builtins___boolean_False;
1.86 }
1.87
1.88 -__attr __fn_native_float_float_lt(__attr __self, __attr self, __attr other)
1.89 +__attr __fn_native_float_float_lt(__attr __stack, __attr __self, __attr self, __attr other)
1.90 {
1.91 /* self and other interpreted as float */
1.92 __float i = __TOFLOAT(self);
1.93 @@ -151,7 +151,7 @@
1.94 return i < j ? __builtins___boolean_True : __builtins___boolean_False;
1.95 }
1.96
1.97 -__attr __fn_native_float_float_ge(__attr __self, __attr self, __attr other)
1.98 +__attr __fn_native_float_float_ge(__attr __stack, __attr __self, __attr self, __attr other)
1.99 {
1.100 /* self and other interpreted as float */
1.101 __float i = __TOFLOAT(self);
1.102 @@ -161,7 +161,7 @@
1.103 return i >= j ? __builtins___boolean_True : __builtins___boolean_False;
1.104 }
1.105
1.106 -__attr __fn_native_float_float_gt(__attr __self, __attr self, __attr other)
1.107 +__attr __fn_native_float_float_gt(__attr __stack, __attr __self, __attr self, __attr other)
1.108 {
1.109 /* self and other interpreted as float */
1.110 __float i = __TOFLOAT(self);
1.111 @@ -171,7 +171,7 @@
1.112 return i > j ? __builtins___boolean_True : __builtins___boolean_False;
1.113 }
1.114
1.115 -__attr __fn_native_float_float_eq(__attr __self, __attr self, __attr other)
1.116 +__attr __fn_native_float_float_eq(__attr __stack, __attr __self, __attr self, __attr other)
1.117 {
1.118 /* self and other interpreted as float */
1.119 __float i = __TOFLOAT(self);
1.120 @@ -181,7 +181,7 @@
1.121 return i == j ? __builtins___boolean_True : __builtins___boolean_False;
1.122 }
1.123
1.124 -__attr __fn_native_float_float_ne(__attr __self, __attr self, __attr other)
1.125 +__attr __fn_native_float_float_ne(__attr __stack, __attr __self, __attr self, __attr other)
1.126 {
1.127 /* self and other interpreted as float */
1.128 __float i = __TOFLOAT(self);
1.129 @@ -191,7 +191,7 @@
1.130 return i != j ? __builtins___boolean_True : __builtins___boolean_False;
1.131 }
1.132
1.133 -__attr __fn_native_float_float_str(__attr __self, __attr self)
1.134 +__attr __fn_native_float_float_str(__attr __stack, __attr __self, __attr self)
1.135 {
1.136 /* self interpreted as float */
1.137 __float i = __TOFLOAT(self);
1.138 @@ -200,13 +200,13 @@
1.139 return format_number(i, 64);
1.140 }
1.141
1.142 -__attr __fn_native_float_float_int(__attr __self, __attr self)
1.143 +__attr __fn_native_float_float_int(__attr __stack, __attr __self, __attr self)
1.144 {
1.145 /* self interpreted as float */
1.146 __float i = __TOFLOAT(self);
1.147
1.148 /* NOTE: Test for conversion failure. */
1.149 - return __new_int((int) i);
1.150 + return __new_int(__stack, (int) i);
1.151 }
1.152
1.153 /* Module initialisation. */