Sunagatov Denis
e6635e2508
Update runtime doc file
...
This updates and reformats the doc file for the runtime package. The
list of things that need to be implemented for a compiler runtime to
work has been updated in accordance with recent changes to runtime
(notably `cstring16` and `string16` types and `#load_directory`). Some
copy-paste errors around string-comparison procedures have been fixed.
The file has been renamed to `doc.odin` as per convention, the comment
has been moved to the top of the package declaration and the comment is
now markdown-formatted.
Also wrote down a little map to maybe slightly help with understanding
navigation within package runtime's files and added a few more
explanations as to why that list of declarations exists and how to use
it.
The list of declarations has been detailed to some degree, explaining
under what conditions the declarations are required.
2025-08-08 15:34:30 +11:00
Sunagatov Denis
c22da490b9
Print the name of missing runtime procedure
...
This continues the fix made at 46b7abee9f ,
by asserting on missing entity early and printing it's name if its not
found.
2025-08-08 04:56:59 +11:00
Sunagatov Denis
46b7abee9f
Fix ICE on missing procedure in base:runtime
...
When a required built-in procedure is missing from the base:runtime
package, an assert should be triggered. However this does not happen
and instead the compiler crashes silently. The cause is the
null-dereference after scope_lookup_current returns nullptr.
This adds an assertion that the runtime procedure is found, before
proceeding to check it's type and performing further lookups.
2025-08-08 03:30:15 +11:00
Sunagatov Denis
e21cde0cf7
sys/linux: Unify IPC_Flags and IPC_Mode bitsets
...
In #5399 it was noticed, that IPC_Mode isn't being used within SystemV
IPC procedures, even though it was designed this way, which lead to a
weird API where in order to call SystemV IPC procedures multiple
transmutes and a bitwise-OR are needed.
This unifies IPC_Mode and IPC_Flags bitsets, making it possible to call
the SystemV IPC procedures without extra casts, and rearranges the flags
in a way that hopefully makes it easier to see when they are not
colliding and should not be mixed. The explanation, explaining this
arrangement of the enum was added.
The IPC_Perm structure is modified, so that the flags can be re-used
between the calls. It's probably not as good as keeping them separate,
but should work... hopefully.
Kept the "old" style of documentation for consistency.
Signed-off-by: Sunagatov Denis <thebumboni@gmail.com >
2025-06-24 20:30:50 +11:00
flysand7
c95742ff2b
Fix the CI badge URL
2025-04-09 07:46:44 +11:00
flysand7
47eefb3f21
[datetime]: Remove the definition of EPOCH
2025-03-06 20:28:12 +11:00
flysand7
70daf40cb1
Fix documentation for simd_shuffle
2025-03-02 20:42:13 +11:00
flysand7
698c510ba7
Merge branch 'master' into docs-simd
2025-03-02 20:05:55 +11:00
flysand7
7127992625
Fix the '+' sign placement in the presence of '0'-padding
2025-01-24 08:36:01 +11:00
flysand7
5d290dce06
Merge branch 'simd-docs' into docs-simd
2025-01-21 11:45:51 +11:00
flysand7
b7afbd6d57
Suggestion fixes
2025-01-21 11:15:00 +11:00
flysand7
3f20b63243
Error if -no-thread-local is used in presence of -no-crt on Unix
2025-01-17 02:51:22 +03:00
flysand7
4f0206ce08
Added compile-time checks for thread locals with -no-crt
...
Now using any thread-local variables with -no-crt enabled
will cause a compiler error, unless -no-thread-local is
given.
Also fixed a minor typo in a comment.
2025-01-17 01:12:23 +03:00
flysand7
87b590c99b
Do not warn about stack overflow in range loops 'by reference'
2025-01-16 22:11:30 +03:00
flysand7
9da144157e
[sync]: Fix typos in comments and remove my note.
2025-01-16 19:33:09 +03:00
flysand7
dfe3073cef
[simd] Fixes to inputs/result/example/output sections & grmamar fixes
2025-01-08 16:47:12 +03:00
flysand7
8387561d0a
[core/simd]: Write package documentation
2024-12-02 01:24:33 +11:00
flysand7
596921fb7a
First pass
2024-12-01 11:42:24 +11:00
flysand7
f61996fd6f
Don't append to buffer if nothing was read
2024-10-05 11:06:36 +11:00
flysand7
dad418cf91
Remove unused things
2024-10-05 07:23:15 +11:00
flysand7
ca9cfc7167
remove extra binary
2024-09-29 08:01:47 +11:00
flysand7
0e446e1d68
adjust docs
2024-09-29 07:54:29 +11:00
flysand7
d830069e5c
[os2/process]: Implement process_exec
2024-09-28 11:25:32 +11:00
flysand7
7deb28c810
[os2/process]: Unindent doc comments
2024-09-28 10:30:54 +11:00
flysand7
e54b1560ee
Add missing registers in User_Regs on AMD64
2024-09-26 07:27:11 +11:00
flysand7
abd52529a6
Revert "Add missing registers in User_Regs on AMD64"
...
This reverts commit acfac3cf2d .
2024-09-26 07:26:01 +11:00
flysand7
acfac3cf2d
Add missing registers in User_Regs on AMD64
2024-09-26 07:25:40 +11:00
flysand7
842f1ae304
Fix indentation issues
2024-09-26 07:13:00 +11:00
flysand7
45d26dc7f9
[encoding/ini]: Add missing line terminator at the end of the section
2024-09-24 18:57:42 +11:00
flysand7
dbad23385d
[os2]: Implement pipe_has_data procedure
2024-09-24 08:12:21 +11:00
flysand7
ee02d04a9b
[os2/process]: Don't quote arguments unless needed
2024-09-19 22:38:20 +11:00
flysand7
bec09d82df
Fix vet errors
2024-09-19 21:07:08 +11:00
flysand7
e0bb07728d
Fix resize OOB when copying old data that's bigger than new data
2024-09-19 20:55:52 +11:00
flysand7
833157ecc9
[sys/linux]: Fix the order of arguments for ptrace cont, singlestep and syscall
2024-09-18 07:52:22 +11:00
flysand7
466e29bb38
[mem]: Rollback allocator API consistency
2024-09-14 13:15:02 +11:00
flysand7
016d1a84d4
[mem]: Document mutex, rollback stack and tracking allocators
2024-09-14 10:46:35 +11:00
flysand7
3ed2ab6e2c
[mem]: Adjust the docs for calc_padding_with_header
2024-09-14 10:18:51 +11:00
flysand7
e90f5d2528
[mem]: Adjust the docs on the buddy allocator
2024-09-14 10:03:04 +11:00
flysand7
f16ed256ea
[mem]: Fix handling of default resize to check alignment
2024-09-11 08:00:27 +11:00
flysand7
fdd4882568
[mem]: Adjust docs for alloc
2024-09-10 19:51:20 +11:00
flysand7
167ced8ad1
[mem]: Don't use named params for dynamic pool in tests
2024-09-08 18:52:55 +11:00
flysand7
05df34f99c
[mem]: Start documenting allocators.odin
2024-09-08 18:44:33 +11:00
flysand7
299accb717
[mem]: Put panic allocator after nil allocator, adjust @require_results
2024-09-08 14:17:32 +11:00
flysand7
3b30bc305c
[mem]: Document raw.odin
2024-09-08 14:13:03 +11:00
flysand7
f1f5dc614e
[mem]: Remove old comments
2024-09-08 11:17:27 +11:00
flysand7
6eb80831b5
[mem]: Panic when allocator is not initialized
2024-09-08 11:12:28 +11:00
flysand7
b78d546010
[mem]: Add non_zeroed versions of resize
2024-09-08 11:02:17 +11:00
flysand7
c719a86312
[mem]: Document alloc.odin
2024-09-08 10:58:40 +11:00
flysand7
f8cd13767e
[mem]: Fix the issue with unbranched version of ptr align
2024-09-07 18:08:11 +11:00
flysand7
3a351ec407
[mem]: Document mem.odin
2024-09-07 18:01:41 +11:00
flysand7
7c9d2f61f5
[mem]: Update package documentation
2024-09-07 15:16:20 +11:00
flysand7
6017a20e1c
[mem]: Make resize_bytes take a slice for the old memory
2024-09-07 15:11:04 +11:00
flysand7
2d988bbc5f
[mem]: Rename alloc to alloc_bytes and add alloc
2024-09-07 14:45:15 +11:00
flysand7
64814f4199
[mem]: Document the package
2024-09-07 14:19:50 +11:00
flysand7
c0112d1c70
[mem]: Add free_all for buddy allocator
2024-09-07 13:27:17 +11:00
flysand7
c0e17808d4
[mem]: Split alloc and alloc_non_zeroed for buddy allocator
2024-09-07 13:26:09 +11:00
flysand7
6d3cffa13c
[mem]: Add @require_results to all functions returning values
2024-09-07 13:14:58 +11:00
flysand7
b350a35b77
[mem]: Add resize_non_zeroed variant to dynamic arena, and rename pool to arena
2024-09-07 13:10:29 +11:00
flysand7
03f6b9bbf6
[mem]: Add alloc_non_zeroed variant to dynamic pool
2024-09-07 12:59:19 +11:00
flysand7
f8641ddd1b
[mem]: Rename dynamic pool to dynamic arena
2024-09-07 12:33:12 +11:00
flysand7
aea3e9a585
[mem]: Fix vet errors
2024-09-07 12:26:47 +11:00
flysand7
4843db0960
[mem]: API for using small stack allocator directly
2024-09-07 12:23:55 +11:00
flysand7
de220a9aa5
[mem]: Remove the extra word 'allocator' in procedures
2024-09-07 11:07:06 +11:00
flysand7
9750b64096
[mem]: API for using stack allocator directly
2024-09-07 10:55:54 +11:00
flysand7
834f082dba
[mem]: Initialize scratch allocator during calls to free and resize
2024-09-07 10:24:00 +11:00
flysand7
e5106e48a8
[mem]: API for using scratch allocator directly
2024-09-07 10:09:05 +11:00
flysand7
da6213196d
[mem]: API for using arena directly
2024-09-07 09:42:04 +11:00
flysand7
2b9096517c
[mem]: Code formatting
2024-09-07 09:20:56 +11:00
flysand7
1a4faff9c9
[os2/process]: Fix typo on doc comments
2024-08-27 08:06:11 +11:00
flysand7
3119e0489f
[os2/process]: Fix vet errors
2024-08-26 07:23:59 +11:00
flysand7
db94e646e0
[os2/process]: Adjust documentation for process info
2024-08-26 07:21:54 +11:00
flysand7
4737485f09
[os2/process]: Force return on allocation errors and process not existing
2024-08-26 07:19:39 +11:00
flysand7
fa84e86766
[os2/process]: Allow for partial success scenarios
2024-08-25 14:22:27 +11:00
flysand7
0d7e6430eb
[os2/process]: Don't free process info fields in partial success scenarios
2024-08-25 13:08:24 +11:00
flysand7
3aac4b1a3e
[sync]: Document all procedures
2024-07-30 19:13:35 +11:00
flysand7
b84b4c47d7
[thread]: Document all functions in core:thread
2024-07-21 14:34:36 +11:00
flysand7
b3ca2d5e0a
[time]: Document all functions
2024-07-20 18:48:50 +11:00
flysand7
0c78cab336
[time/datetime]: Document package datetime
2024-07-20 12:49:40 +11:00
flysand7
15997d2a90
[vendor/x11]: Fix missing argument in XDefaultDepth, wrong types in CreateSimpleWindow
2024-07-20 12:47:00 +11:00
flysand7
7b501b22bb
[os2]: Split file type from mode bits
2024-07-18 23:09:27 +11:00
flysand7
75605a47e7
[os2]: Make anonymous pipes always inheritable
2024-07-18 22:57:30 +11:00
flysand7
4dcb75af6d
Make all handles non-inheritable by default
...
The sockets are left as non-inheritable because they
never should be inherited.
2024-07-18 22:50:47 +11:00
flysand7
8df61b7209
[os2/process]: Make get_args() private and use heap_allocator
2024-07-15 23:28:03 +11:00
flysand7
255f00d971
[os2/process]: Implement missing functionality, update docs
2024-07-15 20:24:05 +11:00
flysand7
b7ccfed9af
[os2/process]: Implement process_kill
2024-07-15 07:27:44 +11:00
flysand7
4eca60946c
[os2/process]: Refactor process_info procs, add process_info_by_handle
2024-07-15 07:27:44 +11:00
flysand7
8f4755532e
[os2/process]: Adjust docs on process_close function
2024-07-15 07:27:44 +11:00
flysand7
63d94301fc
[os2/process]: Implement process creation procedures
2024-07-15 07:27:43 +11:00
flysand7
e1eed7610c
[os2/process]: Fix leaking memory on errors
2024-07-15 07:27:43 +11:00
flysand7
5d6e0bc793
[os2/process]: Implement retrieving command args in process info
2024-07-15 07:27:43 +11:00
flysand7
c1f5d8f006
[os2/process]: Improve documentation for *process_info() family of function
2024-07-15 07:27:43 +11:00
flysand7
f3d4a734d8
[os2/process]: Fix environment block null-terminator counting
2024-07-15 07:27:43 +11:00
flysand7
6387cd2c24
[os2/process] Added process_info() procedure
2024-07-15 07:27:43 +11:00
flysand7
56d55e4a86
Rebase master
2024-07-15 07:27:43 +11:00
flysand7
6fab055f43
[os2/process]: Add process list function
2024-07-15 07:27:43 +11:00
flysand7
2495f1c39a
[os2/process]: Fill in basic functions
2024-07-15 07:27:43 +11:00
flysand7
b686b072d5
[os2/file]: Fixes related to handle inheritance
...
All file handles created on Windows used to be made
non-inheritable, by forcing the .Close_On_Exec flag
in _open() function. In addition, there was an
issue with security descriptor being freed before
use, which has been fixed.
2024-07-14 15:06:28 +11:00
flysand7
a7d95ab3e1
[core/os]: Fix read_console not stopping the read when newline can't fit in output slice
2024-07-12 20:28:38 +11:00
flysand7
6ae47c6f43
[sys/windows] Add advapi bindings, process-related functions and context-related stuff
2024-07-12 19:21:44 +11:00
flysand7
41282b5211
Add bindings for WOW64 API set
2024-07-02 21:56:04 +11:00