From: Brendan Hansen Date: Fri, 5 Feb 2021 04:18:24 +0000 (-0600) Subject: tiny and insignificant changes X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=d47c66666c13266c567731280a880411c4afbdf7;p=onyx.git tiny and insignificant changes --- diff --git a/bin/onyx b/bin/onyx index 68452646..3705eefb 100755 Binary files a/bin/onyx and b/bin/onyx differ diff --git a/core/math.onyx b/core/math.onyx index 241c1642..08a5d3c7 100644 --- a/core/math.onyx +++ b/core/math.onyx @@ -136,7 +136,7 @@ atanh :: (t: $T) -> T { // are needed. Logarithms are implemented using a polynomial that is accurate in the range of // [1, 2], and then utilizes this identity for values outside of that range, // -// ln(x) = ln(2^n * v) = n * ln(2) + v, v is in [1, 2] +// ln(x) = ln(2^n * v) = n * ln(2) + ln(v), v is in [1, 2] // exp :: (p: $T) -> T do return pow(base = cast(T) E, p = p); diff --git a/onyx.exe b/onyx.exe index 5f5be401..9da7accf 100644 Binary files a/onyx.exe and b/onyx.exe differ diff --git a/src/onyxwasm.c b/src/onyxwasm.c index 680475a9..a55cf9c5 100644 --- a/src/onyxwasm.c +++ b/src/onyxwasm.c @@ -2923,8 +2923,7 @@ static void emit_file_contents(OnyxWasmModule* mod, AstFileContents* fc) { } u32 offset = mod->next_datum_offset; - if (offset % 16 != 0) - offset += 16 - (offset % 16); + bh_align(offset, 16); if (!bh_file_exists(fc->filename->text)) { onyx_report_error(fc->filename->pos, diff --git a/src/onyxwasm_output.c b/src/onyxwasm_output.c index 2e802b87..6e19836c 100644 --- a/src/onyxwasm_output.c +++ b/src/onyxwasm_output.c @@ -170,7 +170,7 @@ static i32 output_memorysection(OnyxWasmModule* module, bh_buffer* buff) { u8* leb = uint_to_uleb128((u64) 1, &leb_len); bh_buffer_append(&vec_buff, leb, leb_len); - output_limits(256, -1, &vec_buff); + output_limits(1024, -1, &vec_buff); leb = uint_to_uleb128((u64) (vec_buff.length), &leb_len); bh_buffer_append(buff, leb, leb_len);