From 39eccdf6b947ee57e6e2c0921e7f733bd78dd8a8 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 23 May 2021 15:17:58 +0100 Subject: [PATCH] Make `js` default to nil allocator for the time being --- core/runtime/default_allocators.odin | 2 +- core/runtime/internal.odin | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/runtime/default_allocators.odin b/core/runtime/default_allocators.odin index 7d13f2a32..86fce47ae 100644 --- a/core/runtime/default_allocators.odin +++ b/core/runtime/default_allocators.odin @@ -1,6 +1,6 @@ package runtime -when ODIN_DEFAULT_TO_NIL_ALLOCATOR || ODIN_OS == "freestanding" { +when ODIN_DEFAULT_TO_NIL_ALLOCATOR || ODIN_OS == "freestanding" || ODIN_OS == "js" { // mem.nil_allocator reimplementation default_allocator_proc :: proc(allocator_data: rawptr, mode: mem.Allocator_Mode, diff --git a/core/runtime/internal.odin b/core/runtime/internal.odin index 8a7b22ca4..be1a69316 100644 --- a/core/runtime/internal.odin +++ b/core/runtime/internal.odin @@ -623,7 +623,7 @@ truncsfhf2 :: proc "c" (value: f32) -> u16 { } if (e > 30) { - f := 1e12; + f := i64(1e12); for j := 0; j < 10; j += 1 { /* NOTE(bill): Cause overflow */ g := intrinsics.volatile_load(&f);