Commit Graph

4214 Commits

Author SHA1 Message Date
gingerBill
799f4379d8 Keep vet happy 2024-01-17 22:51:49 +00:00
gingerBill
bd51b21386 Fix typo 2024-01-17 22:47:23 +00:00
gingerBill
276284cbec Fix typo 2024-01-17 22:44:28 +00:00
gingerBill
a8021f03a6 Rename to Map_File_* 2024-01-17 22:43:35 +00:00
gingerBill
c35d5d4c42 Merge branch 'master' of https://github.com/odin-lang/Odin 2024-01-17 22:41:28 +00:00
gingerBill
248a0bfa5f Add virtual.map_file 2024-01-17 22:41:22 +00:00
Colin Davidson
b6838731f5 oops, indentation 2024-01-17 13:30:03 -08:00
Colin Davidson
991c1d4446 add resize_non_zeroed to query features 2024-01-17 13:27:19 -08:00
Colin Davidson
d0bb1fb844 bring log allocator up to date 2024-01-17 13:11:10 -08:00
Jeroen van Rijn
ea43c030aa Merge pull request #3107 from ktsiligkiris/documentation/fix_xml_docs
Fix comments for proper rendering in documentation in encoding/xml
2024-01-17 21:10:49 +01:00
Kostas Tsiligkiris
d54f34a162 Fix comments in xml_reader.odin for better rendering in documentation 2024-01-17 21:58:38 +02:00
Kostas Tsiligkiris
a86cfa6e97 Fix filename in example 2024-01-17 21:38:33 +02:00
Jeroen van Rijn
1b83f4a18b Merge pull request #3082 from edyu/master
Fix math/fixed floor/ceil/round
2024-01-17 19:13:22 +01:00
gingerBill
90ac400ec5 stdcall -> system 2024-01-17 17:25:23 +00:00
gingerBill
75c659fa41 Change stdcall -> system 2024-01-17 17:04:54 +00:00
gingerBill
c5bab58180 Merge pull request #3076 from xb-bx/mprotect-fix-for-linux-and-darwin
virtual.protect returns inverted result on linux and darwin platforms
2024-01-17 16:46:39 +00:00
gingerBill
12e53f2336 Fix imports to be case sensitive correct 2024-01-17 16:26:18 +00:00
gingerBill
7b89174a26 Remove //+build windows tag 2024-01-17 15:57:37 +00:00
FourteenBrush
05e27fa92d Fix typo in bytes.scrub 2024-01-17 13:37:06 +01:00
Kostas Tsiligkiris
02c2aff41b Fix formatting of package documentation string 2024-01-17 07:04:00 +02:00
Kostas Tsiligkiris
5476d43441 Move package xml before copyright
Having the same copyright on all files made the documentation script
to include it multiple times in the package information.
2024-01-17 07:00:25 +02:00
gingerBill
7ee7f4b064 Merge pull request #3077 from laytan/add-libc-to-stream
c/libc: add `to_stream` proc
2024-01-16 18:09:44 +00:00
Kostas Tsiligkiris
3f6f00d8e5 [DOC] Fix documentation formatting in site
The comments that were added automatically in odin site, contained
tabs, so the first line of a two line comment was properly rendered in
the site, but the second line of the comment (because it included tabs
in the beginning of the line) was rendered as preformattted text. I
think that the proposed changes will fix this problem in the
documentation site.

An example of the problematic rendering of documentation is
https://pkg.odin-lang.org/core/compress/#COMPRESS_OUTPUT_ALLOCATE_MAX
2024-01-14 13:22:18 +02:00
Jon Lipstate
880a18f124 fix shift direction 2024-01-12 22:28:38 -08:00
gingerBill
5d94887e76 Merge pull request #3083 from Lperlind/master
Fix linalg shadowing error
2024-01-13 00:05:14 +00:00
Jeroen van Rijn
2990747cf8 Reindent and align and f ix Ventura kernel+version swap. 2024-01-10 18:26:14 +01:00
Platin21
62c30795e6 Fixed indentation 2024-01-10 17:27:31 +01:00
Platin21
120ef168bf Added macOS versions for a lot of revisions 2024-01-10 16:42:25 +01:00
Ed Yu
7f6f971284 Fix math/fixed floor/ceil/round 2024-01-08 18:56:12 -08:00
Lucas Perlind
67d5b97ff9 Fix linalg shadowing error 2024-01-09 10:24:12 +11:00
Jeroen van Rijn
656e62d724 Add peek to priority queue. 2024-01-08 19:33:30 +01:00
Laytan Laats
ce8801c37f c/libc: add to_stream proc
Adds the `to_stream` procedure to `core:c/libc` to improve usability of
the core collection when you have to use libc.
2024-01-08 19:20:06 +01:00
xb-bx
c6c710465a fix 2024-01-08 19:54:39 +02:00
Franz Höltermann
873b7f8588 Fixed type of temporary slice in sort_by_indices_overwrite 2024-01-08 17:11:06 +01:00
Jeroen van Rijn
7d3dfb1046 Merge pull request #3006 from hwchen/hwchen/last_index_any
fix strings.last_index_any for single char
2024-01-08 15:57:36 +01:00
gingerBill
f4782157d3 Implement instrumentation pass 2024-01-07 21:34:44 +00:00
Yawning Angel
8d7c37e384 core/simd/x86: Use the none calling convention for intrinsics
The LLVM intrinsics that live under `llvm.x86` are not actual functions,
so trying to invoke them as such using the platform's native C
calling convention causes incorrect types to be emitted in the IR.

Thanks to laytanl for assistance in testing.
2024-01-07 20:04:40 +09:00
Yawning Angel
9235e82451 core/simd/x86: Correct a target feature name 2024-01-07 20:04:40 +09:00
Laytan Laats
85b71708dd dynlib: add last_error procedure 2024-01-06 02:08:11 +01:00
Jeroen van Rijn
649b5fa528 Add bool return to dynlib.initialize_symbols. 2024-01-06 02:04:09 +01:00
Jeroen van Rijn
d6a89d667d Add dynlib.initialize_symbols (#3071)
```
package example

import "core:dynlib"
import "core:fmt"

Symbols :: struct {
	// `foo_` is prefixed, so we look for the symbol `foo_add`.
	add: proc "c" (int, int) -> int,
	// We use the tag here to override the symbol to look for, namely `bar_sub`.
	sub: proc "c" (int, int) -> int `dynlib:"bar_sub"`,

	// Exported global (if exporting an i32, the type must be ^i32 because the symbol is a pointer to the export.)
	// If it's not a pointer or procedure type, we'll skip the struct field.
	hellope: ^i32,

	// Handle to free library.
	// We can have more than one of these so we can match symbols for more than one DLL with one struct.
	_my_lib_handle: dynlib.Library,
}

main :: proc() {
	sym: Symbols

	// Load symbols from `lib.dll` into Symbols struct.
	// Each struct field is prefixed with `foo_` before lookup in the DLL's symbol table.
	// The library's Handle (to unload) will be stored in `sym._my_lib_handle`. This way you can load multiple DLLs in one struct.
	count := dynlib.initialize_symbols(&sym, "lib.dll", "foo_", "_my_lib_handle")
	defer dynlib.unload_library(sym._my_lib_handle)
	fmt.printf("%v symbols loaded from lib.dll (%p).\n", count, sym._my_lib_handle)

	if count > 0 {
		fmt.println("42 + 42 =", sym.add(42, 42))
		fmt.println("84 - 13 =", sym.sub(84, 13))
		fmt.println("hellope =", sym.hellope^)
	}
}
```
2024-01-06 01:31:27 +01:00
gingerBill
b408ec6bac Remove distinct from the specific types 2024-01-05 14:48:39 +00:00
gingerBill
3bf7b416e7 Fix builtin.quaternion generation 2024-01-05 14:36:58 +00:00
gingerBill
0b83e3dae5 Enforce naming the parameters with builtin.quaternion to reduce confusion 2024-01-05 14:29:14 +00:00
Jeroen van Rijn
b59c80d6fd Merge pull request #3068 from laytan/json-unmarshal-union
encoding/json: try to unmarshal into union variants
2024-01-03 19:13:36 +01:00
Laytan Laats
8c10f4cdde encoding/json: try to unmarshal into union variants 2024-01-03 19:02:30 +01:00
Laytan Laats
8a7c2ea9d0 darwin: actually honor no-crt by not linking with -lSystem -lm 2024-01-02 21:44:51 +01:00
Jeroen van Rijn
4efef08c94 Update core:encoding to Unicode 15.1 table. 2024-01-02 18:03:32 +01:00
gingerBill
87c835268a Merge pull request #2917 from flysand7/sys-linux-additions
[sys/linux]: Fixes and additions
2024-01-02 14:23:40 +00:00
gingerBill
76eef47491 Merge pull request #3054 from igordreher/win_error
[core:sys/windows] add System Error Codes enum
2024-01-02 14:16:36 +00:00