Commit Graph

9196 Commits

Author SHA1 Message Date
gingerBill c4d19dfa92 Use uint instead of int to improve code generation for bounds checking 2022-09-27 22:31:46 +01:00
gingerBill 35e70f4be1 Add node data for union when using intrinsics.type_convert_variants_to_pointers 2022-09-27 22:30:00 +01:00
ftphikari eb6c388f13 Merge branch 'odin-lang:master' into master 2022-09-27 11:06:05 +03:00
hikari 42144d957b Merge remote-tracking branch 'origin/master' 2022-09-27 11:05:46 +03:00
hikari d1c778680b sys/windows: add a couple of functions and constants, fix formatting 2022-09-27 11:05:01 +03:00
gingerBill 0fe006157e Remove extra pointer indirection 2022-09-27 00:18:19 +01:00
gingerBill 4d208dc092 Override lbArgKind to be indirect for #by_ptr parameters 2022-09-27 00:10:05 +01:00
matias 162e86663f Add WSATRY_AGAIN to windows/types.odin
Not sure if the intent is to only add the defines that are commonly used in this file in order to keep things lean, rather than the complete list of WSA error codes from winerror.h into winerror.odin. I can close this and redo by adding all the WSA codes into winerror.odin and deleting these instead if preferred.
2022-09-26 01:54:27 -04:00
gingerBill 83ffb68bb7 Fix typo in map_insert 2022-09-23 12:09:46 +01:00
Jeroen van Rijn 4705321988 Merge pull request #2074 from Tetralux/serial-dcb
[sys/windows] Add DCB structure, SetCommState, GetCommState
2022-09-22 17:20:54 +02:00
Tetralux 37a2356485 [sys/windows] Add DCB structure, SetCommState, GetCommState
These are the procedures for configuring a serial port.

You simply open the port with CreateFile (os.open), followed by a call to GetCommState,
setting the DCB as desired, followed by a SetCommState call.

The DCB structure uses C bitfields, so a configuration struct is provided along with a helper procedure to make it easier
to initialize in Odin code.
This makes it possible to initialize a DCB structure with one call to the helper:
```
dcb: DCB
windows.init_dcb_with_config(&dcb, {
	BaudRate = 115200,
	ByteSize = 8,
	Parity = .None,
	StopBits = .One,
})
```
(The parity and the stopbits are actually optional in this example, as their zero-values are None and One, respectively.)
2022-09-22 15:14:14 +00:00
gingerBill 5cf473b31c Fix typo 2022-09-22 15:19:24 +01:00
gingerBill a7484f16cb Merge branch 'master' of https://github.com/odin-lang/Odin 2022-09-22 15:17:42 +01:00
gingerBill 6c8aad0afb Make intrinsics.{count_ones, count_zeros, count_trailing_zeros, count_leading_zeros} work at compile time 2022-09-22 15:17:36 +01:00
gingerBill c767d55e9a Fix typo 2022-09-22 12:21:43 +01:00
gingerBill 7f601c9535 Add Allocator_Mode.Alloc_Non_Zerored 2022-09-22 12:12:57 +01:00
Jeroen van Rijn 12cc7388e7 Merge pull request #2071 from colrdavidson/fix-target-features
fix target features to make wasm intrinsics happy
2022-09-22 04:05:27 +02:00
Colin Davidson 2ff61bdfc7 fix target features to make wasm intrinsics happy 2022-09-21 18:35:56 -07:00
gingerBill eb0d7465e2 Fix libc.aligned_alloc for Windows (thanks Microsoft(!)) 2022-09-22 01:22:48 +01:00
gingerBill 07d798c61a Fix libc.aligned_alloc on Windows 2022-09-22 01:17:58 +01:00
gingerBill b426e8577b cap(Enum) (equivalent to max(Enum)-min(Enum)+1) 2022-09-22 01:09:18 +01:00
gingerBill 532133d648 Minor technical improvement 2022-09-22 00:55:28 +01:00
gingerBill c056a0d108 Add slice.enumerated_array 2022-09-22 00:52:37 +01:00
gingerBill 6fe1825db9 Improve error message for slicing an enumerated array 2022-09-22 00:47:23 +01:00
gingerBill b15968f140 Improve suggestions for certain assignments 2022-09-22 00:42:03 +01:00
gingerBill 0ddf1bf660 Minor style change 2022-09-22 00:36:31 +01:00
gingerBill dade5b5ef2 Improve error message for check_is_expressible (Cannot convert X to Y from Z) 2022-09-22 00:34:36 +01:00
gingerBill 3aea9a7c20 Improve error messages for compile time known bounds checking 2022-09-22 00:30:10 +01:00
gingerBill 0dce7769f4 Clean up private internal constant global handling 2022-09-22 00:18:03 +01:00
gingerBill 4b73438833 Merge branch 'master' of https://github.com/odin-lang/Odin 2022-09-22 00:05:46 +01:00
gingerBill 8c3f01fbfa Correct parapoly determination of generated internal type of a map 2022-09-22 00:05:11 +01:00
Jeroen van Rijn b7abacfa7e Enable libc complex test. 2022-09-22 01:01:40 +02:00
gingerBill 3383e9c556 Merge pull request #2070 from 13419596/master
Correcting libc pow bindings
2022-09-21 23:48:25 +01:00
gingerBill 0380601bb4 Fix map_insert 2022-09-21 23:47:33 +01:00
13419596 4b4c2a2abd Correcting libc pow bindings
Adding tests that libc pow(f) functions
- have two arguments
- behave as expected for simple inputs.
2022-09-21 17:15:28 -05:00
Jeroen van Rijn b1542d4e98 Merge pull request #2065 from yay/core-os-indent-fix
Fix indent
2022-09-21 18:39:24 +02:00
Vitaly Kravchenko d469c2da48 Fix indent 2022-09-21 17:31:37 +01:00
gingerBill 29c5e390aa Merge pull request #2063 from odin-lang/map-header-changes
Map header changes
2022-09-21 16:07:36 +01:00
Jeroen van Rijn 3455e5690c [examples/all] Make OS-specific for zlib, cmark 2022-09-21 16:54:21 +02:00
Jeroen van Rijn 0ca8a5e186 Add vendor:zlib to examples/all; prefix vendor packages. 2022-09-21 16:45:01 +02:00
Jeroen van Rijn cb85d00e9e Merge pull request #2064 from awwdev/patch-2
removed do
2022-09-21 16:23:54 +02:00
André (counter) 8ce1ce85ad removed do 2022-09-21 16:03:52 +02:00
gingerBill a6d3cbe824 Correct json.unmarshal for maps 2022-09-21 13:10:06 +01:00
gingerBill 9b9aa9c353 Remove more dead code for map header stuff 2022-09-21 13:08:40 +01:00
gingerBill 831620bfc4 Remove header cache code 2022-09-21 13:06:02 +01:00
gingerBill 4f50988799 Remove debug code 2022-09-21 13:03:30 +01:00
gingerBill ff97a73152 Reduce unnecessary map gets 2022-09-21 13:03:13 +01:00
gingerBill 769d8dd038 Simplify __get_map_header stuff 2022-09-21 12:13:05 +01:00
gingerBill 1d793ea338 Split header table data and the map pointer 2022-09-21 12:09:05 +01:00
gingerBill 5337413c56 Temporary patch for lb_gen_map_header 2022-09-21 11:36:14 +01:00