diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2024-08-13 00:34:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-13 00:34:19 +0200 |
| commit | 02b4bb84915e0359ea085aef0bbb843b48a4b147 (patch) | |
| tree | e211db82f6ac6b585988363f43f61257c587e4ed | |
| parent | 0d916a659e1b7f2b439fa3329754e109a131186b (diff) | |
| parent | 2808ecc5b6847ba03439ac14eedb8d0f37ad00b8 (diff) | |
Merge pull request #4072 from laytan/fix-32-bit-math-round
fix type hint propagation for shift
| -rw-r--r-- | src/check_expr.cpp | 2 | ||||
| -rw-r--r-- | vendor/stb/truetype/stb_truetype_wasm.odin | 8 |
2 files changed, 2 insertions, 8 deletions
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); 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") |