Commit graph

18 commits

Author SHA1 Message Date
2dc8eac296 System/Setup/Environment: Don't deadlock on spawning multicore tasks simultaneously 2025-03-28 10:31:06 -04:00
3369304fb4 System/Libraries/Json: Add KeyValueAsArray(), ItemValueAsArray()
We need these two functions for Objects and Arrays, respectively, to
deal with applications that incorrectly implement the JSON API spec.
2025-03-21 16:30:00 -04:00
11d114aa9d System/Setup/Environment: Patch reboot-on-crash to Fault2 instead of Dbg2 2025-03-15 17:53:06 -04:00
de213e35fe System/Libraries/Json: Implement array->contains() 2025-03-12 13:38:11 -04:00
8ef544d912 System/Libraries/Json: Set arr->last_item to NULL if arr->length is zero 2025-03-12 09:39:51 -04:00
e982c9584a System/FFI/LibC: Round-robin mem_task selection for malloc
This fixes an issue where multiple HTTP requests would arrive
simultaneously, and the subsequent calls to @rsa_import would
end up clobbering the shared mem_task's CHeapCtrl, leading to #GP.

Eventually, we may want to simplify this to only init the CHeapCtrl,
rather than creating the entire CTask, but for now it seems ok.
2025-03-10 07:51:19 -04:00
6a0ecc2bd2 System/Utilities/Time: Update JSON API, remove tz stuff for now 2025-03-09 13:32:20 -04:00
bacab705b3 System/Libraries/Http: Update JSON API 2025-03-09 13:26:03 -04:00
90af0edcbb System/Libraries/Json: Fundamental (breaking) changes to API
Going forward, the following methods will require a mem_task to be
provided: Clone, CreateArray, CreateObject, Parse, Stringify.

For JsonArray, append/insert/prepend will take arguments in the form
((index,) value, type). A JsonItem will automatically be created which
encapsulates this value and type. If type is not specified, the
following will be done to determine the type:

- Cast value to JsonElement* and check if the signature matches. If it
  does, assign type as value(JsonElement*)->type; or

- If value > 0x1000, assign type as JSON_STRING; or

- Otherwise, assign type as JSON_BOOLEAN.
2025-03-09 13:16:33 -04:00
b4e6abc79f System/Utilities/Time: Update for DST 2025-03-08 16:28:12 -05:00
64f31de070 Everywhere: Use slon_mem_task for memory allocation 2025-03-06 09:54:26 -05:00
68e5cf5eb9 System/Libraries/String: Use mode instead of always trimming both ends in String.Trim() 2025-03-03 13:53:47 -05:00
691504f48f System/Libraries/String: Add String.Trim() 2025-03-03 10:35:29 -05:00
81d65056a9 System/Libraries/Json: Implement @json_stringify_string to eliminate StrLen() bottleneck 2025-02-27 11:30:08 -05:00
40b3fceab1 System/Libraries/Json: Prepend signature to elements 2025-02-20 08:05:07 -05:00
fcc95d971b System/Libraries/Json: Keep escaped unicode in its original form, and let the program ingesting the JSON handle the UTF-8 conversion 2025-02-17 14:53:42 -05:00
cafa3158a3 System/Libraries/Json: Properly escape double-quotes when stringifying a string 2025-02-17 13:23:16 -05:00
52cb92f587 Meta: Add files to repository 2025-02-16 15:21:19 -05:00