Fix for nolibc (eg wasm). Add multi global declarations. Simplicity wasm export / import. Prevent "extern" functions to have a function body.

This commit is contained in:
Christoffer Lerno
2023-02-11 11:16:31 +01:00
parent 2fa3ae7bc9
commit 3b49b87784
22 changed files with 146 additions and 58 deletions

View File

@@ -41,12 +41,13 @@ macro double! decfloat(char[] chars, int $bits, int $emin, int sign)
int emax = - $emin - $bits + 3;
const int[*] P10S = { 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000 };
usz index = 0;
usz index;
bool got_digit = chars[0] == '0';
bool got_rad;
long lrp, dc;
int k, j, lnz;
usz len = chars.len;
usz last_char = len - 1;
long lrp = 0;
assert(len);
@@ -77,10 +78,6 @@ macro double! decfloat(char[] chars, int $bits, int $emin, int sign)
}
}
long dc = 0;
int k;
int j;
int lnz;
while (c - '0' < 10u || c == '.')
{
switch