From a1d518442aa83e7d71f952e8356c974ff8b74a91 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Mon, 12 Aug 2024 23:39:07 +0200 Subject: [PATCH 1/2] fix type hint propogation for shift Fixes #3856 --- src/check_expr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 38dc30cfa..e92de2d93 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -3038,7 +3038,7 @@ gb_internal void check_shift(CheckerContext *c, Operand *x, Operand *y, Ast *nod x->mode = Addressing_Value; if (type_hint) { if (is_type_integer(type_hint)) { - x->type = type_hint; + convert_to_typed(c, x, type_hint); } else { gbString x_str = expr_to_string(x->expr); gbString to_type = type_to_string(type_hint); From 2808ecc5b6847ba03439ac14eedb8d0f37ad00b8 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Mon, 12 Aug 2024 23:48:36 +0200 Subject: [PATCH 2/2] remove panic workaround --- vendor/stb/truetype/stb_truetype_wasm.odin | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/vendor/stb/truetype/stb_truetype_wasm.odin b/vendor/stb/truetype/stb_truetype_wasm.odin index ff1d4fac5..472419ccb 100644 --- a/vendor/stb/truetype/stb_truetype_wasm.odin +++ b/vendor/stb/truetype/stb_truetype_wasm.odin @@ -65,14 +65,8 @@ ceil :: proc "c" (x: f64) -> f64 { return math.ceil(x) } sqrt :: proc "c" (x: f64) -> f64 { return math.sqrt(x) } @(require, linkage="strong", link_name="stbtt_pow") pow :: proc "c" (x, y: f64) -> f64 { return math.pow(x, y) } - @(require, linkage="strong", link_name="stbtt_fmod") -fmod :: proc "c" (x, y: f64) -> f64 { - context = runtime.default_context() - // NOTE: only called in the `stbtt_GetGlyphSDF` code path. - panic("`math.round` is broken on 32 bit targets, see #3856") -} - +fmod :: proc "c" (x, y: f64) -> f64 { return math.mod(x, y) } @(require, linkage="strong", link_name="stbtt_cos") cos :: proc "c" (x: f64) -> f64 { return math.cos(x) } @(require, linkage="strong", link_name="stbtt_acos")