Commit Graph

5171 Commits

Author SHA1 Message Date
gingerBill
07ec93bfeb Add procs_windows_amd64.asm for use with -no-crt 2021-11-24 18:32:27 +00:00
gingerBill
994ee5a559 Allow for multiple .asm files 2021-11-24 17:57:31 +00:00
gingerBill
50057b0696 Add basic support for foreign import "foo.asm" on Windows with nasm.exe 2021-11-24 16:56:42 +00:00
gingerBill
70d4bc8573 Add nasm binaries 2021-11-24 16:36:34 +00:00
gingerBill
bc775afccb Merge branch 'master' of https://github.com/odin-lang/Odin 2021-11-24 16:31:47 +00:00
gingerBill
504ea7deeb Fix update_untyped_expr_type for ternary if expressions with an untyped type 2021-11-24 16:31:37 +00:00
gingerBill
5e2280a787 Fix set_file_path_string and thread_safe_set_ast_file_from_id 2021-11-24 16:20:01 +00:00
gingerBill
84e03421d3 Merge pull request #1312 from DYSEQTA/master
Improve compiler help output with regard to command specific help.
2021-11-24 15:49:49 +00:00
DYSEQTA
0a87ffe0e6 Merge branch 'odin-lang:master' into master 2021-11-24 12:07:14 +11:00
DYSEQTA
e5f961b48f Removed '--help' from help string as per request. 2021-11-24 11:10:40 +11:00
gingerBill
5db505c42f Merge pull request #1277 from Yawning/feature/modern-crypto
core/crypto: Add some "modern" primitives
2021-11-23 17:54:03 +00:00
gingerBill
275241f9b4 Merge branch 'master' of https://github.com/odin-lang/Odin 2021-11-23 11:43:38 +00:00
gingerBill
9246e89c4a Fix #1328 2021-11-23 11:43:32 +00:00
gingerBill
b56964e465 Merge pull request #1315 from SrMordred/patch-2
GetMouseDelta
2021-11-23 11:30:54 +00:00
gingerBill
2e89585c8c Merge branch 'master' of https://github.com/odin-lang/Odin 2021-11-23 10:59:50 +00:00
gingerBill
e230b7110c Merge pull request #1327 from graphitemaster/fix-path-join-leak
fix memory leak in path.join
2021-11-22 15:34:30 +00:00
Dale Weiler
a55f0cfb63 fix memory leak in path.join 2021-11-22 10:25:54 -05:00
gingerBill
de435c9318 Remove unneeded semicolons from vendor:OpenGL 2021-11-21 14:52:40 +00:00
gingerBill
f40f12d480 Minor cleanup to math constants 2021-11-21 14:06:32 +00:00
gingerBill
8a2c829e07 Patch odin doc binary format 2021-11-21 14:06:15 +00:00
gingerBill
42b9ce636f Remove #force_inline from all wrappers 2021-11-21 13:59:28 +00:00
gingerBill
ca6951d05e Add MessageDecompose; Update the static library 2021-11-20 20:20:12 +00:00
gingerBill
446f1f6183 Correct foreign imports for portmidi on Windows 2021-11-20 19:27:34 +00:00
gingerBill
d424c84bf9 Merge pull request #1322 from Gaunsessa/master
Add darwin support for glfw and re-add ln for js.
2021-11-20 12:22:38 +00:00
Gus
56d2bbc5b9 Added back ln for js 2021-11-20 20:03:54 +11:00
Gus
2c7bf87998 Added darwin support 2021-11-20 20:02:21 +11:00
gingerBill
daebaa8b50 Fix #1319 2021-11-19 15:43:13 +00:00
gingerBill
9320a31f4d Merge branch 'master' of https://github.com/odin-lang/Odin 2021-11-19 12:26:19 +00:00
gingerBill
3e04b45106 Allow cast from float to complex 2021-11-19 12:26:10 +00:00
gingerBill
acd5878d66 Merge pull request #1316 from Skytrias/master
add `builtin.` in slice.swap_between
2021-11-18 23:48:43 +00:00
Michael Kutowski
4439d59105 add builtin. 2021-11-19 00:24:56 +01:00
gingerBill
12c1291805 Add optional seed parameters to all hashes 2021-11-18 16:14:33 +00:00
Patric Dexheimer
61bc963e92 GetMouseDelta 2021-11-17 19:03:01 -03:00
gingerBill
ae59f214ee @(tag=<string>) - dummy attribute for tooling 2021-11-17 21:32:33 +00:00
Yawning Angel
6bafa21bee crypto: Add rand_bytes
This adds `rand_bytes(dst: []byte)` which fills the destination buffer
with entropy from the cryptographic random number generator.  This takes
the "simple is best" approach and just directly returns the OS CSPRNG
output instead of doing anything fancy (a la OpenBSD's arc4random).
2021-11-17 14:00:00 +00:00
Yawning Angel
61c581baeb core/sys/unix: Add syscalls_linux.odin
Linux is in the unfortunate situation where the system call number is
architecture specific.  This consolidates the system call number
definitions in a single location, adds some wrappers, and hopefully
fixes the existing non-portable invocations of the syscall intrinsic.
2021-11-17 14:00:00 +00:00
Yawning Angel
6c4c9aef61 core/crypto: Add chacha20poly1305
This package implements the chacha20poly1305 AEAD construct as specified
in RFC 8439.
2021-11-17 13:59:53 +00:00
Yawning Angel
7bed317636 core/crypto: Add chacha20
This package implements the ChaCha20 stream cipher as specified in
RFC 8439, and the somewhat non-standard XChaCha20 variant that supports
a 192-bit nonce.

While an IETF draft for XChaCha20 standardization exists,
implementations that pre-date the draft use a 64-bit counter, instead of
the IETF-style 32-bit one.  This implementation opts for the latter as
compatibility with libsodium is more important than compatibility with
an expired IETF draft.
2021-11-17 13:59:53 +00:00
Yawning Angel
4647081f49 core/crypto/poly1305: Triple performance on amd64 with -o:speed 2021-11-17 13:59:53 +00:00
Yawning Angel
64db286582 core/crypto: Add poly1305
This package implements the Poly1305 MAC algorithm as specified in RFC
8439, using routines taked from fiat-crypto and poly1305-donna.
2021-11-17 13:59:53 +00:00
Yawning Angel
1a7a6a9116 core/crypto: Add x25519
This package implements the X25519 key agreement scheme as specified in
RFC 7748, using routines taken from fiat-crypto and Monocypher.
2021-11-17 13:59:53 +00:00
Yawning Angel
d1e76ee4f2 core/crypto: Add constant-time memory comparison routines
Using a constant-time comparison is required when comparing things like
MACs, password digests, and etc to avoid exposing sensitive data via
trivial timing attacks.

These routines could also live under core:mem, but they are somewhat
specialized, and are likely only useful for cryptographic applications.
2021-11-17 13:59:53 +00:00
gingerBill
9be0d18e5d Correct x in ptr logic 2021-11-17 11:02:11 +00:00
gingerBill
e877525073 Keep -vet happy for -no-crt and wasm targets 2021-11-17 10:40:55 +00:00
gingerBill
f09638318f Add support for darwin to core:c/libc 2021-11-16 21:19:08 +00:00
gingerBill
bb7703fcec Improve ptr_map_hash_key 2021-11-16 16:08:20 +00:00
gingerBill
1b28226a67 Add math.lgamma based off FreeBSD's /usr/src/lib/msun/src/e_lgamma_r.c 2021-11-16 15:32:32 +00:00
gingerBill
2b546a598c Add math.signbit; Add math.gamma based on http://netlib.sandia.gov/cephes/cprob/gamma.c 2021-11-16 15:23:19 +00:00
gingerBill
b530ca9a5e Add math.nextafter 2021-11-16 15:12:01 +00:00
gingerBill
d232796149 Fix typo 2021-11-16 15:09:47 +00:00