Commit Graph

9572 Commits

Author SHA1 Message Date
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
Jeroen van Rijn
ae0be9c785 Merge pull request #3096 from ktsiligkiris/documentation/fix-format
[DOC] Fix documentation formatting in site
2024-01-14 16:03:57 +01: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
Jeroen van Rijn
c58eeca1b2 Merge pull request #3095 from laytan/macos-add-common-library-paths
darwin: add library paths for default Homebrew and MacPorts locations
2024-01-13 21:51:07 +01:00
Laytan Laats
5032839abc darwin: add library paths for default Homebrew and MacPorts locations 2024-01-13 21:38:30 +01:00
Jeroen van Rijn
2b1d85968d Merge pull request #3094 from laytan/fix-miniaudio-import
vendor/miniaudio: fix import for MacOS
2024-01-13 21:31:13 +01:00
Laytan Laats
5896469f3b vendor/miniaudio: fix import for macos
Using `system:miniaudio` is suboptimal, we already provide the
`Makefile` that builds the `lib/miniaudio.a` and this works on MacOS.
This PR makes linking with that library the default.
2024-01-13 21:14:02 +01:00
Jeroen van Rijn
5e7b031a1d Add RAD Debugger file to .gitignore. 2024-01-13 16:10:32 +01:00
gingerBill
ef05e0858d Merge pull request #3092 from jon-lipstate/cpu_features_fix
cpu_features - fix shift direction
2024-01-13 11:54:31 +00: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
gingerBill
577049c69e Merge pull request #3086 from karl-zylinski/patch-1
Added comment on SetConfigFlags in Raylib bindings that it must be called before window creation
2024-01-13 00:04:46 +00:00
Karl Zylinski
46f46e645c Added comment on SetConfigFlags in Raylib bindings that it must be called before window creation 2024-01-11 11:20:14 +01:00
Jeroen van Rijn
b13aa5db37 Merge pull request #3085 from Platin21/fix/macos-versions
Adds new MacOS Versions and Fixes Kernel Matching
2024-01-10 18:31:17 +01: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
bb94f4d129 Fixed version matching 2024-01-10 17:24:53 +01:00
Platin21
120ef168bf Added macOS versions for a lot of revisions 2024-01-10 16:42:25 +01:00
gingerBill
72dfb73c9d Merge branch 'master' of https://github.com/odin-lang/Odin 2024-01-09 11:01:24 +00:00
gingerBill
67dcd916e8 Update instrumentation signature to support runtime.Source_Code_Location as last parameter. 2024-01-09 11:01:18 +00:00
Lucas Perlind
67d5b97ff9 Fix linalg shadowing error 2024-01-09 10:24:12 +11:00
Jeroen van Rijn
efb2b05040 Merge pull request #3078 from Kelimion/pq_peek
Add `peek` to priority queue.
2024-01-08 19:39:57 +01:00
Jeroen van Rijn
656e62d724 Add peek to priority queue. 2024-01-08 19:33:30 +01:00
gingerBill
f3dc1f6e3b Merge pull request #3075 from FrancisTheCat/fix-sort_by_indices_overwrite
Fixed type of temporary slice in sort_by_indices_overwrite
2024-01-08 16:39:08 +00: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
gingerBill
aff8f06e3c Add frontend stuff instrumentation tooling
//+no-instrumentation
@(no_instrumentation)
@(instrumentation_enter)
@(instrumentation_exit)
2024-01-07 19:56:00 +00:00
gingerBill
1e1228fb37 Merge pull request #3024 from Yawning/fix/simd-x86
core:simd/x86: Various fixes
2024-01-07 11:57:22 +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
cd65a15d81 src: enable_target_feature should add features, not overwrite
`llvm_features` being empty is the default state, and implies the
presence of certain features.

Previously if any target features were explicitly enabled by the
`enable_target_feature` attribute, they were added comma separated
to `llvm_features`.

For example: `lzcnt,popcnt,...,sse4.2,sse`

This was causing LLVM to try to target a CPU that *ONLY* has the
explicitly enabled features.  This now will prefix explicitly enabled
features with a `+`, and preserve the existing `llvm_features` string
by appending to it if it is set.
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
Yawning Angel
ecee0e2db2 repo: Add more test binaries to .gitignore 2024-01-07 20:04:40 +09:00
Jeroen van Rijn
2784e8ea51 Merge pull request #3072 from laytan/add-dynlib-last_error
dynlib: add last_error procedure
2024-01-06 02:13:53 +01: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
8545f316ff Fix the type inference in builtin.quaternion 2024-01-05 14:45:03 +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
gingerBill
d7d23e65ea Clean up error block usage 2024-01-05 13:47:00 +00:00
gingerBill
2820bbc269 Add @(entry_point_only) for procedures 2024-01-05 13:38:30 +00:00
gingerBill
70c5153471 Merge branch 'master' of https://github.com/odin-lang/Odin 2024-01-03 21:00:35 +00:00
gingerBill
5961d4b316 Merge pull request #2983 from perogycook/raylib5
Raylib5 bindings with fixes
dev-2024-01
2024-01-03 18:32:45 +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
gingerBill
0cc72b536f Merge pull request #3066 from laytan/darwin-actually-honor-no-crt
darwin: actually honor no-crt by not linking with `-lSystem -lm`
2024-01-03 17:25:41 +00:00
Laytan Laats
8a7c2ea9d0 darwin: actually honor no-crt by not linking with -lSystem -lm 2024-01-02 21:44:51 +01:00