Commit Graph

417 Commits

Author SHA1 Message Date
Jeroen van Rijn
888913c739 Add runtime.dll_forward_reason for Windows DLLs. 2022-06-21 17:29:55 +02:00
gingerBill
c53426fcb4 Merge pull request #1818 from IanLilleyT/reserve_exceed
Dynamic array append reserves more space when it exceeds capacity
2022-06-12 17:19:08 +01:00
gingerBill
ca1f419dc2 Merge pull request #1819 from IanLilleyT/no_query_info
Allocator: tidying up Query_Info return values when not part of Query_Features
2022-06-12 17:15:08 +01:00
gingerBill
670f18ad1b Minor change to shrink 2022-06-12 16:12:24 +01:00
Tetralux
fa2296a124 [runtime] Add builtin shrink for dynamic arrays and maps
Asks the allocator to shrink the backing allocation to the current __length__, or a capacity
of the user's choosing.

Returns `(did_shrink: bool, err: mem.Allocator_Error)`.

```
shrink(&array) // shrinks to len(array)
shrink(&array, N) // shrink to N capacity

shrink(&map) // shrinks down to len(map)
shrink(&map, N) // shrink to N capacity
```
2022-06-04 23:29:47 +00:00
Ian Lilley
dda2ed290a tidying up Query_Info return value when not in query features 2022-06-01 22:40:39 -04:00
Ian Lilley
ee9908b09e Reserve more space when exceeding, not meeting, capacity 2022-06-01 22:01:00 -04:00
gingerBill
63d6c08d90 Add raw_simd_data 2022-05-25 22:09:38 +01:00
gingerBill
3ec70c5517 Merge functionality of #maybe with the standard 'union' functionality 2022-05-23 12:04:19 +01:00
gingerBill
8c1499dbc2 Make raw_data return [^]T types 2022-05-23 11:48:05 +01:00
gingerBill
f002857edc Clean up core:time to be consistent across all platforms 2022-05-12 15:47:24 +01:00
gingerBill
be8de4a1ff Update arch enum 2022-05-01 23:52:55 +01:00
gingerBill
9349dfba8f Add new builtin container_of 2022-04-27 12:39:45 +01:00
hikari
b9dc81d808 runtime: update comment description 2022-04-16 13:46:36 +03:00
hikari
ad90f416a5 runtime: fix typo 2022-04-07 12:24:53 +03:00
gingerBill
abf0fd7efc Merge pull request #1671 from colrdavidson/add_nocrt
Make no crt work on Linux
2022-03-30 12:58:12 +01:00
Colin Davidson
a632db3618 Make no crt work on Linux 2022-03-30 04:45:22 -07:00
gingerBill
3f935bea25 union #shared_nil
This adds a feature to `union` which requires all the variants to have a `nil` value and on assign to the union, checks whether that value is `nil` or not. If the value is `nil`, the union will be `nil` (thus sharing the `nil` value)
2022-03-24 11:55:03 +00:00
Jeroen van Rijn
19dc84e300 Reinstate NBC. 2022-03-15 19:37:04 +01:00
Jeroen van Rijn
a932168f50 [runtime] fix insert_at procedure group. 2022-03-15 19:35:00 +01:00
gingerBill
a7adb2fb6e Merge branch 'master' into freestanding_amd64 2022-03-14 11:02:59 +00:00
gingerBill
17eebf338c Fix #1606 (Call runtime._cleanup_runtime_contextless() for os.exit) 2022-03-09 15:05:51 +00:00
gingerBill
fc4eb4152c Correct calling convention for _startup_runtime 2022-02-28 15:35:10 +00:00
gingerBill
dd9843aa21 Merge pull request #1557 from semarie/openbsd-support
initial OpenBSD support
2022-02-28 14:23:56 +00:00
gingerBill
01162e08b5 Add -disallow-rtti 2022-02-28 13:35:29 +00:00
gingerBill
a7ae197a55 Merge branch 'master' into freestanding_amd64 2022-02-28 13:02:31 +00:00
gingerBill
3c72cb67d3 Remove context.user_data 2022-02-28 13:00:32 +00:00
gingerBill
37bba4c0a6 Reorganize error check procedures 2022-02-28 12:45:19 +00:00
Sébastien Marie
5676c9e7eb initial OpenBSD support 2022-02-25 08:49:25 +00:00
gingerBill
0fa487f468 Add -foreign-error-procedures 2022-02-20 14:27:44 +00:00
gingerBill
db6bd9b358 Allow sysv and win64 calling conventions to be used on any platform on amd64 2022-02-16 16:03:49 +00:00
gingerBill
1857bc7b02 Improve slice bounds checking runtime error messages 2022-02-16 14:51:54 +00:00
gingerBill
d45ff0694d Merge pull request #1438 from odin-lang/odin-global-constants-as-enums
Odin global constants as enums
2022-02-15 16:18:07 +00:00
gingerBill
f5697dd7f2 Merge branch 'master' into odin-global-constants-as-enums 2022-02-15 15:47:24 +00:00
gingerBill
32c7e81745 Use objc_allocateClassPair for intrinsics.objc_register_class 2022-02-14 18:32:10 +00:00
gingerBill
340838c878 Add procs_darwin.odin 2022-02-08 23:00:00 +00:00
gingerBill
97be867103 Rename #partial[Enum]Type to #sparse[Enum]Type for non-contiguous enum fields 2022-02-05 13:01:15 +00:00
Andrea Piseri
cf9f3d5e2d fix logic in bswap_128 2022-02-03 15:50:39 +01:00
gingerBill
070b450768 Add ODIN_ERROR_POS_STYLE constant and change runtime.print_caller_location based on that constant 2022-01-26 17:34:39 +00:00
gingerBill
d269dbcd40 Add comment for the internals of assert 2022-01-23 22:01:54 +00:00
gingerBill
77b91352ae Add Odin_OS_Type and Odin_Arch_Type to core:runtime 2022-01-20 19:58:35 +00:00
gingerBill
3d7d347192 Convert ODIN_OS and ODIN_ARCH to use enums rather than use strings 2022-01-20 19:56:05 +00:00
gingerBill
cfbc1a447b Correct inverse and inverse_transpose for 2x2 matrices 2022-01-20 13:18:37 +00:00
gingerBill
cd6898439e Comment out link_section on procedures 2022-01-17 12:17:13 +00:00
gingerBill
f0529535e0 ODIN_ENDIAN changed to an enum constant; ODIN_ENUM_STRING is the new string version of the old constant 2022-01-15 17:53:18 +00:00
gingerBill
29ebe0c3c9 Rename architecture 386 to i386 2022-01-15 17:40:00 +00:00
gingerBill
6c48670819 Make ODIN_BUILD_MODE a enum type 2022-01-15 17:34:35 +00:00
gingerBill
e15f714660 Define wasm _start entry point in Odin code 2022-01-13 15:18:47 +00:00
gingerBill
b33ca6651e Rename proc_* to entry_* 2022-01-13 12:05:22 +00:00
gingerBill
315a08f33f Add main to proc_unix.odin 2022-01-13 12:04:42 +00:00