Commit Graph

4660 Commits

Author SHA1 Message Date
gingerBill
ecd7846ec3 Clean up allocator stuff into allocators.odin 2024-05-14 17:10:53 +01:00
gingerBill
1b593fc1ca Correct core:intrinsics to base:intrinsics 2024-05-13 13:27:44 +01:00
gingerBill
54ebfa6179 Fix hanging on thread.join for windows where the thread had not been started 2024-05-13 12:58:18 +01:00
gingerBill
6dc0ee3877 Fix #3577 2024-05-13 12:54:01 +01:00
gingerBill
90f26368d9 Merge pull request #3572 from Feoramund/fix-unix-nonstart-thread-stall
Fix joining non-`Started` threads from blocking main thread
2024-05-13 12:45:02 +01:00
korvahkh
9b759f39fc encoding/json: Properly marshal #no_nil unions
Previously the first variant of a `#no_nil` would always be output as
`null`, and following variants would be treated as the wrong type.
2024-05-11 14:36:56 -05:00
Jeroen van Rijn
3a3ae6d0df Fix and re-enable .doc tests. 2024-05-11 19:25:35 +02:00
Feoramund
33c6f75a2e Fix joining non-Started threads from blocking main thread 2024-05-10 17:24:45 -04:00
gingerBill
aebb5a5178 Merge pull request #3506 from IllusionMan1212/windows-hid
core/sys/windows: added various procedures and constants for the hid library
2024-05-10 16:03:13 +01:00
gingerBill
b4d0b1d17d Merge pull request #3544 from ntn9995/fix-parser-empty-or-no-pkg
Fix core:odin/parser crashing on empty and/or no package files
2024-05-10 16:01:16 +01:00
gingerBill
20d35acce1 Fix parser 2024-05-10 15:59:14 +01:00
gingerBill
6c4672c158 Merge pull request #3566 from Feoramund/fmt-refactor
Refactor `wprintf`
2024-05-10 15:56:26 +01:00
ikarus
3add85e7a7 fix typo & free memory when skipping empty files 2024-05-10 14:51:09 +01:00
gingerBill
b269fd00f0 Merge pull request #3560 from wschiefer/add-more-win32-console-apis
Add more win32 console APIs
2024-05-10 12:00:28 +01:00
Feoramund
11180e36ae Amend fmt documentation 2024-05-09 19:38:44 -04:00
Feoramund
8c111f1baf Fix %e printing incorrect precision
For example, `%.2e` with 30.56 as the value would produce `30.60e+01`,
as opposed to C's printf producing `30.6e+01`.
2024-05-09 19:37:17 -04:00
Feoramund
5e149d2cae Refactor wprintf
- Extracts common code between C and Python-like syntax into its own
   sub-procedures.
 - Fixes Python-like syntax from treating `}` as a verb.
 - Makes C-like syntax treat ' ' as a missing verb.
 - Fixes EXTRA arguments being formatted with options that were
   previously set, instead using default options now.
 - Makes error messaging more consistent between C and Python-like
   syntax.
 - Requires argument index to be specified immediately before the verb
   in C-like syntax, per the documentation, instead of after `%` _or_
   before the verb.
 - Tracks argument usage through a `bit_set`, allowing for reporting of
   unused arguments even when reordered.
 - Moves exit for C-like syntax if next byte is `%` to beginning of
   block instead of needlessly trying to parse through all options.
 - Pops next unused argument for unspecified formatters like `%i` or
   `{}`, instead of taking the argument after the last one used.
 - Fixes unspecified precision `%.f` from not setting precision to zero,
   per the documentation.
2024-05-09 19:28:04 -04:00
Laytan
d7fdccb08c fix a couple of -vet-style failures after f54977336b 2024-05-09 19:39:48 +02:00
Jeroen van Rijn
8f706a14f8 Add allocator param. 2024-05-09 17:58:48 +02:00
Jeroen van Rijn
e5af98eabe Simplify bitset_to_enum_slice 2024-05-09 17:55:50 +02:00
Jeroen van Rijn
858c78b844 Pass new -vet-style check. 2024-05-09 17:47:19 +02:00
Jeroen van Rijn
a61d8daec1 Add make version of bitset to slice. 2024-05-09 17:44:39 +02:00
Jeroen van Rijn
7bcf3b1a0d Add slice.enum_slice_to_bitset & slice.bitset_to_enum_slice 2024-05-09 17:15:45 +02:00
Waldemar Schiefer
abcbb8b47a Add more win32 console APIs 2024-05-09 16:41:09 +02:00
ikarus
60b6c798a5 tabs for indentation 2024-05-08 09:07:53 +01:00
IllusionMan1212
ad3675cdd6 core/sys/windows: added various procedures and constants related to the hid library 2024-05-07 21:18:25 +02:00
gingerBill
e378516011 Merge pull request #3547 from hnakamur/pass_size_to_epoll_create
sys/linux: Pass size to epoll_create
2024-05-07 14:33:18 +01:00
gingerBill
41d38bf964 Merge pull request #3468 from Feoramund/fix-pthread-cancel
Fix discrepancy with pthread cancelability state
2024-05-07 11:30:07 +01:00
Hiroaki Nakamura
df53fec828 sys/linux: Pass size to epoll_create
Without this fix, you can see a random size value is passed to
epoll_create by using strace.
2024-05-06 21:44:59 +09:00
ikarus
16fbfd0418 ignore empty files and errors on no package 2024-05-06 09:25:22 +01:00
gingerBill
15f7148eae Merge pull request #3526 from laytan/target-features
Improve target features support
2024-05-05 21:50:57 +01:00
gingerBill
96a4cecee5 Merge pull request #3536 from laytan/linux-fix-open-bits
sys/linux: fix open bits
2024-05-05 16:47:42 +01:00
Laytan Laats
eaab17f8fb sys/linux: fix open bits 2024-05-05 14:16:21 +02:00
Feoramund
1165d65c94 Minimally support compiling Odin on FreeBSD arm64
This is enough to get Odin itself compiling and the demo running.
2024-05-05 07:26:45 -04:00
gingerBill
17a01a81d8 Merge pull request #3528 from laytan/fix-some-sync-issues
Fix some sync issues
2024-05-03 17:14:50 +01:00
Laytan Laats
8aab395c70 darwin: fix minimum os version check not being inclusive 2024-05-02 21:18:49 +02:00
Laytan Laats
8506e64345 sync: fix deadlock in one shot event 2024-05-02 20:49:29 +02:00
Laytan Laats
25f1d0906d compiler: improve target features support 2024-05-02 00:59:52 +02:00
flysand7
9ffa4a4eb1 [sys/linux]: Fix bit numbers for open flags 2024-05-01 05:24:02 +11:00
gingerBill
eb06cb5d23 Merge pull request #3518 from laytan/sysinfo-arm-additions
sys/info: add arm feature detection, fix Linux implementation, show more CPU info on Darwin
2024-04-30 12:48:48 +01:00
Laytan Laats
c0ca26ac17 sys/info: add missing @(private)'s 2024-04-30 00:24:09 +02:00
Laytan Laats
b41395e3b4 sys/info: update doc.odin 2024-04-30 00:24:09 +02:00
Laytan Laats
d40c207fde sys/info: retrieve better CPU description on Darwin
Previously either `ARM` or `ARM64`, now you get something like `Apple
M1`
2024-04-30 00:24:09 +02:00
Laytan Laats
8660718ebe sys/info: add feature detection for Darwin and Linux ARM 2024-04-30 00:24:09 +02:00
Laytan Laats
485afb011c sys/info: improve platform_linux
1. fix the `linux.open` call, passing `{ .RDONLY }` becomes `0x00000001`
   while `RDONLY` is supposed to be `0x00000000`
2. fix the case where `/etc/os-release` starts with `PRETTY_NAME`
   `strings.index` was used but was checking `> 0` while `0` is valid
3. remove unneccesary temporary allocations
4. simplify the logic
2024-04-30 00:24:09 +02:00
Laytan Laats
9e94e9dac1 sys/info: remove unneccesary build tags 2024-04-30 00:24:09 +02:00
Laytan Laats
cebe6bd982 sys/unix: add sysctlbyname for darwin 2024-04-30 00:24:09 +02:00
Laytan Laats
c58da76562 sys/darwin: fix sysctl and sysctlbyname syscalls 2024-04-30 00:24:09 +02:00
Laytan Laats
e896efdaeb sys/info: add easy way of getting the MacOS version 2024-04-30 00:24:09 +02:00
Damian Tarnawski
ae322739b5 Remove instrinsics and utf16 imports from os/os_js 2024-04-29 16:59:52 +02:00