You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 89a7691
Browse filesBrowse the repository at this point in the historyBrowse files
Fix Date.now after 2038 on Windows and current GC memory, and speed up Array<Int>.join (#440)
Date.now() on Windows keeps the seconds since 1970 in 64 bits, so it no longer goes back to 1902 after January 2038 (#413). Gc.memInfo64(MEM_INFO_CURRENT) counts a block taken from the free list without the lock, the usual way (#414). Joining an Array<Int> with a byte separator writes the digits straight into one allocation: 200 joins of 8,192 integers went from 33 to 38 ms to 20 ms (#415). Fixes#413, fixes#414, fixes#415.
# Conflicts:
# Changes.md
Copy file name to clipboardExpand all lines: Changes.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,9 @@ libhxcpp 6.0.0 (unreleased)
10
10
* Fixed cpp.encoding.Utf8.encode writing bytes for a code point that is no Unicode scalar value, a surrogate or one past U+10FFFF, which UTF-8 cannot hold and the UTF-16 encoder refused. Both encoders, and both getByteCount, throw for one before writing anything, at API level 500 (libhxcpp #407)
11
11
* Fixed Haxe 5's Bytes.ofString keeping an array of three bytes for each unit of a string that was not all ASCII: cpp.encoding.Utf8.encode allocated for the worst case and only shortened it, so a megabyte of ASCII with one other character held 3 MB. It counts the bytes and allocates them exactly (libhxcpp #405)
12
12
* Fixed a malformed cppia file that calls a static function on a host interface crashing the loader: it looked the function up in the interface's script glue, which an interface does not have. The fuzz job found it
13
+
* Sped up joining an Array<Int>, which made a String for each element and then joined those. The digits go straight into the result, so joining 8,192 integers 200 times takes 41 ms instead of 53 ms, what writing them with std::to_chars takes (libhxcpp #415)
14
+
* Fixed Gc.memInfo64(Gc.MEM_INFO_CURRENT) leaving out most of what was allocated since the last collection: a block taken from the free list without the lock, which is the usual way, was not counted until the next collection. Retaining 2 MB of arrays showed 90 KB more (libhxcpp #414)
15
+
* Fixed Date.now() on Windows going back to 1902 after January 2038, x64 builds too: the seconds since 1970 passed through a long, which is 32 bits on Windows (libhxcpp #413)
13
16
* Added timedWait to hx::thread::ConditionVariable, which Haxe 5's sys.thread.Condition.timedWait calls: with the Haxe nightly, every program that used Condition failed to compile. It returns true once a signal or broadcast came and false when the time ran out, and it waits out the wakeups MSVC's timed waits give just before the deadline with nothing signalled
14
17
* Fixed an exception from blit, setSize or resize under the cppia JIT ending the process instead of reaching the script's catch, on typed arrays and on Array<Dynamic>: their native calls had no exception bridge. The script catches it, as it does interpreted and in compiled code (libhxcpp #404)
15
18
* Fixed resize() and cpp.NativeArray.setSize() on an Array<Dynamic> under the cppia JIT evaluating the array expression twice, so a call in it ran twice and the array it returned the second time was the one resized. The JIT evaluates it once (libhxcpp #411)
0 commit comments