Commit Graph

93 Commits

Author SHA1 Message Date
dzaima
b1e2e17edd even more FFI cleanup 2024-02-06 22:31:57 +02:00
dzaima
2b30010c25 disallow writing array to pointer within pointer object
and while at it move a global to an argument
2024-02-06 20:29:24 +02:00
dzaima
74f7e4701d disallow '&' outside of top-level type 2024-02-06 20:03:46 +02:00
dzaima
cb550bf885 more FFI cleanup 2024-02-06 15:17:49 +02:00
dzaima
b7f845300c some FFI error message changes 2024-02-06 15:16:29 +02:00
dzaima
5a8ad03ff5 buildObj → readUpdatedObj, inline printFFIType 2024-02-06 15:16:29 +02:00
dzaima
677b341ad4 merge readRe & makeRe, reduce its result size to the proper size
previously the 1<<reW was used as the number of bytes to require but it's actually number of bits
2024-02-06 14:22:20 +02:00
dzaima
05ceb45b2f fix ptr.Write doing weird things 2024-02-05 22:42:24 +02:00
dzaima
445cfcf15a fix type of returned pointer within struct 2024-02-05 21:40:28 +02:00
dzaima
3c297ffeb8 add pointer reading within struct 2024-02-05 21:24:05 +02:00
dzaima
a8772dc3ae fix **:i8 2024-02-05 04:54:55 +02:00
dzaima
b22c5d2883 get rid of sty_ptr 2024-02-05 04:51:12 +02:00
dzaima
7ab13e3c5a refactor BQNFFIEnt & BQNFFIType 2024-02-05 04:14:02 +02:00
dzaima
102874c43f support passing pointer objects to typed arguments 2024-02-05 01:29:49 +02:00
dzaima
a4c0424931 fix type equality checking on untyped pointer elements 2024-02-05 01:29:49 +02:00
dzaima
ac16b69fe1 add toggle to always run buildObj for testing object matching more 2024-02-05 01:29:49 +02:00
dzaima
61f142a1fd type formatting for error messages 2024-02-05 01:29:49 +02:00
dzaima
7471c5c9f5 fix plain "&" argument being accepted 2024-02-05 00:34:55 +02:00
dzaima
e89d59c606 more proper error message 2024-02-04 23:27:28 +02:00
dzaima
7edcccdf82 initial pointer objects 2024-02-04 23:19:57 +02:00
dzaima
0ce728bcce do a thing that should be done 2024-02-04 18:10:11 +02:00
dzaima
1b26e85325 don't need to mark static globals as hidden
gcc complains about this
2024-02-01 21:26:08 +02:00
dzaima
c078f62b1f add GLOBAL, INIT_GLOBAL, or const to globals 2024-02-01 21:13:39 +02:00
dzaima
20185b57c5 fix nested •FFI calls, more FFI testing 2024-01-02 19:33:28 +02:00
dzaima
ca7e62d09f fix •FFI with various arguments while mutable ones are present more 2024-01-02 18:30:33 +02:00
dzaima
381c03a456 fix •FFI with both a mutated & struct/array argument 2024-01-02 17:08:10 +02:00
dzaima
01a60dceff separate path & name, store path+name+args in state 2023-11-26 16:32:37 +02:00
dzaima
789064140b use isStr more, include builtin name in bad path messages 2023-11-26 15:37:41 +02:00
dzaima
a4befbd8bf FFI: check for 𝕨 being present when required 2023-10-29 01:01:48 +03:00
dzaima
721dccf636 fix FFI integer overflow check on ARM
clang optimizes a raw f!=(u8)f to like f!=(u32)f on ARM which changes behavior (we're technically using UB here, but there's no reasonable alternative); use q_ functions that know how to work around this
2023-08-19 20:12:53 +03:00
dzaima
7fe1ab930a FFI: permit 𝕨≡⟨⟩, require 𝕩≡⟨⟩ if no arguments are on 𝕩, check list rank 2023-08-05 16:13:07 +03:00
dzaima
627a7e0771 more FFI error checking, plus bugfixes 2023-07-28 15:25:06 +03:00
dzaima
1bc96f5557 extract u8/u16/u32/f32 reading functions 2023-07-28 14:02:22 +03:00
dzaima
1454ca3a1a expand & test FFI error checking 2023-07-28 13:59:25 +03:00
dzaima
79f72d84b8 extract unsigned & f32 copying functions in ffi.c 2023-07-28 13:41:03 +03:00
dzaima
9cfc3f3f25 various changes on filling arrays with the same element 2023-07-12 16:23:03 +03:00
dzaima
efa1c4a4ff __declspec(dllexport) 2023-06-01 19:04:34 +03:00
dzaima
227dfa20c7 use isatty as a default for notui 2023-05-25 00:16:16 +03:00
dzaima
2f51974c2f use proper pointer conversion macros in ffi.c 2023-05-12 19:36:02 +03:00
dzaima
d1a5ed3e00 err → fatal 2023-05-11 15:28:23 +03:00
dzaima
35786d4f5b m_hVec\d → m_hvec\d 2023-04-29 17:39:13 +03:00
dzaima
bb7c37960e a round of more incG/incByG 2023-04-29 17:39:13 +03:00
dzaima
aa5ed7cc7a BB2B & BBB2B → FC1 & FC2 2023-04-29 15:31:31 +03:00
dzaima
20b3867581 change %c in format strings to u32 unicode codepoint 2023-04-22 10:58:25 +03:00
dzaima
71f9278a95 use COPY_TO to copy in bqn_readObjArr if possible 2023-04-06 13:37:00 +03:00
dzaima
b0201131e2 array type support for •FFI 2023-03-20 16:44:58 +02:00
dzaima
8194f51b30 MAKE_MUT_INIT, move mut_init to mut.c 2023-03-11 16:52:09 +02:00
dzaima
01c457b77b make all cpy.*Arr function results Arr* 2023-03-11 16:51:13 +02:00
dzaima
c5aedaa414 switch to GCv2, various fixes/cleanup
includes:
  fixing some refcounts for FOR_BUILD build •FFI
  moving DEBUG_VM prints to stderr
  fixing heapverify reports of loose shape objects of fillarrs
  regular ol' adding-of-semicolon-after-label for old gcc
  move GC enable to after all initialization, not load_init
2023-03-05 01:23:53 +02:00
dzaima
7b57b4ae39 explicitly mark code sections where allocations aren't allowed to happen 2023-02-18 17:46:55 +02:00