Commit Graph

6134 Commits

Author SHA1 Message Date
gingerBill
70dd93db8f Correct case nil: handling for unions 2026-03-15 17:24:38 +00:00
gingerBill
c51391f8cb Fix #5129 2026-03-15 17:15:16 +00:00
gingerBill
0314c91a64 Add error message for foo := Foo{&foo} where the type of foo is not determined yet 2026-03-15 16:16:46 +00:00
gingerBill
c23d2793df Fix lb_convert_struct_index for FCD arrays 2026-03-15 15:45:29 +00:00
gingerBill
a0685f0511 Add intrinsics.likely and intrinsics.unlikely 2026-03-15 15:39:52 +00:00
gingerBill
2f8da5ec67 Add fixed capacity dynamic array to the doc-format 2026-03-15 11:55:04 +00:00
gingerBill
c6772dfd06 Merge branch 'master' into bill/fixed-capacity-dynamic-array 2026-03-15 11:41:01 +00:00
gingerBill
117e3a7b5a Merge branch 'master' of https://github.com/odin-lang/Odin 2026-03-15 10:34:01 +00:00
gingerBill
ca73cd395f Fix #6412 2026-03-15 10:33:52 +00:00
gingerBill
e40fdb8a31 Merge pull request #6372 from laytan/more-accurate-native-features
More accurate native features
2026-03-14 17:50:35 +00:00
gingerBill
0e6ea3884d General improves 2026-03-14 16:26:42 +00:00
Laytan Laats
f56ec37d1b fix type info of u16 could not be found 2026-03-13 20:43:03 +01:00
Laytan
af8853473a query host features instead of only host cpu for more accurate -microarch:native 2026-03-13 20:15:33 +01:00
Jeroen van Rijn
27667ce36b iff -> if and only if (⟺) 2026-03-13 11:54:15 +01:00
gingerBill
8e23c58620 Add intrinsics type_fixed_capacity_dynamic_array_len_offset and type_is_fixed_capacity_dynamic_array 2026-03-12 17:39:44 +00:00
Fredrik Vaeng Røtnes
b4405d01f8 Fix typo in error message for using statement
Change "It you do require..." to "If you do require..."
2026-03-12 16:37:05 +01:00
gingerBill
bc636e4b36 raddbg debug view for fixed capacity dynamic arrays 2026-03-12 12:56:00 +00:00
gingerBill
a6160770ff Support compound literals for fixed capacity dynamic arrays 2026-03-12 10:03:58 +00:00
gingerBill
8ff07d29be Fix parser position for fixed capacity dynamic arrays 2026-03-12 09:42:46 +00:00
Jeroen van Rijn
7a8b6d189e Merge pull request #6404 from botero-dev/android-platforms
Add support for other Android architectures
2026-03-11 22:34:25 +01:00
Andrés Botero
9df092759e Add support for other Android architectures 2026-03-11 15:37:37 -05:00
gingerBill
f1dbe9c242 [dynamic; N]T proof of concept: fixed capacity dynamic array (akin to small_array.Small_Array(N, T)) 2026-03-11 16:46:33 +00:00
gingerBill
b7bb7a1dc4 Use scope_reserve call directly 2026-03-11 14:22:36 +00:00
bymehul
763c8d3a42 Fix generic cycle deadlock in struct layout 2026-03-11 03:04:26 +05:30
bymehul
c9e55d3add fix: handle full-width bit_field literal masks 2026-03-10 23:21:19 +05:30
Krzesimir Nowak
7320f10de6 Fix tokenizer init 2026-03-08 12:09:12 +01:00
Jeroen van Rijn
6434bf4b65 Limit maximum exponent in parsing of float/integer literals 2026-03-07 12:38:04 +01:00
Franz Hoeltermann
b351b58ddc Fix #6270 2026-03-03 17:22:31 +01:00
Jeroen van Rijn
b80ffe6ad7 Merge pull request #6363 from odin-lang/bill/bit_set_rtti
Update `Type_Info_Bit_Set`
2026-03-03 13:48:37 +01:00
gingerBill
a5e1eb56ab Add explicit_underlying: bool RTTI field for bit_set; add runtime.type_info_underlying 2026-03-03 12:26:42 +00:00
Krzesimir Nowak
1f00da471c Make sure to assign proper comment as package docs
So far, the first comment found was marked as package docs, which
meant that for the following code, the TODO comment would be assigned
to the package declaration instead of the comment directly preceding
the package declaration.

    // TODO: drop after finished with refactoring
    #+ feature using-stmt
    // Package foo implements this and that.
    package foo
2026-03-02 21:26:04 +01:00
Krzesimir Nowak
b8f2daa5b2 Kill deprecated file tags
We had the recommended form of file tags for long enough. Also there
were some issues with the deprecated file tags - they were ignored if
the appeared after recommended file tags, and could possibly show up
in package docs.
2026-03-02 21:26:04 +01:00
Krzesimir Nowak
4ab536a85a Drop pointless code
Modifies a local variable after it was stored in an out parameter, so
this modification has no effect.
2026-03-02 21:24:59 +01:00
Jeroen van Rijn
a4ee06ca75 Merge pull request #6355 from louisnovy/fix-bit_set-parapoly-specialization
Fix bit_set parapoly specialization #6240
2026-03-02 12:59:48 +01:00
Louis Novy
e3d6fe72f8 fix broken bit_set parapoly specialization #6240 2026-03-01 20:58:43 -08:00
gingerBill
e029cfc279 Merge pull request #6350 from krnowak/krnowak/diverging-semicolon
Fix separating of diverging procedure types from block statements
2026-03-01 22:19:04 +00:00
Franz
5e009f5e83 Fix name canonicalization for typed ranges in bit_set (#6353) 2026-03-01 15:43:17 +01:00
Jeroen van Rijn
579b2612b1 Fix #6347 2026-03-01 14:54:26 +01:00
Krzesimir Nowak
8bdf82ac8d Fix separating of diverging procedure types from block statements
To avoid creating a procedure literal from a procedure type and a
following block statement, one can insert a semicolon or an empty line
between the two:

    // procedure literals
    p1 :: proc() {…}
    p2 :: proc()
    {…}
    // procedure type followed by a block statement
    p3 :: proc()

    {…}

The empty line as a separator did not work if the procedure type had a
diverging result:

    // all of these are procedure literals
    p4 :: proc() -> ! {…}
    p5 :: proc() -> !
    {…}
    p6 :: proc() -> !

    {…}

The least annoying fix I came up with is to insert implicit semicolon
after the "not" token. I only needed to make sure that the inserted
implicit semicolon is being skipped when the "not" token is a part of
unary expression to avoid breaking an oddly-formatted code like:

    b := get_some_bool()
    if !
       b {…}

One small side-effect of this change is that in code like below:

    Proc_Type :: proc() -> !

    // Some comment
    Some_Other_Type :: enum byte {…}

The "// Some comment" is not associated with "Proc_Type" anymore. In
Odin's standard library this only happens in one place, in
`base/runtime/core.odin`:

    Assertion_Failure_Proc :: #type proc(prefix, message: string, loc: Source_Code_Location) -> !

    // Allocation Stuff
    Allocator_Mode :: enum byte {
    	Alloc,
    	…,
    }
2026-03-01 14:49:24 +01:00
gingerBill
c0468446f6 Ignore const nil "optimization" and fix c: Maybe(string); c == "" bug. 2026-02-24 18:52:42 +00:00
Jeroen van Rijn
5d94c01e47 Disable LLVMTailCallKindMustTail under LLVM 18 2026-02-21 23:29:32 +01:00
gingerBill
7c9ac5a777 Try to improve the error handling for procedure groups 2026-02-19 13:51:20 +00:00
gingerBill
a7ed7ccd0c Merge pull request #6259 from odin-lang/bill/range-init
`for init; x in y {}` style loops (proof of concept)
2026-02-17 11:11:56 +00:00
gingerBill
a8cc056e3a Merge pull request #6278 from ske2004/spread-string
Add broadcasting to strings (fix #1837)
2026-02-16 13:30:50 +00:00
Krzesimir Nowak
a84179de1f Do not allow duplicate #partial directives on switch statement 2026-02-15 16:37:14 +01:00
ske
9d439bd630 Add broadcasting to strings (fix #1837) 2026-02-14 16:23:51 -03:00
tpat7187
4fce910973 Minor Spelling mistake in Using error line 2026-02-14 15:51:03 +00:00
Jeroen van Rijn
6386b395de Add -did-you-mean-limit:N
```
-did-you-mean-limit:<integer>
        Sets the maximum number of suggestions the compiler provides.
        Must be an integer >0.
        If not set, the default limit is 10.
```
e.g. with a limit of 5

```
W:/Scratch/main.odin(44:7) Error: Undeclared name 'B1' for type 'E'
	e = .B1
	     ^^
	Suggestion: Did you mean?
		A23
		A02
		A19
		A20
		A21
		... and 25 more ...
```
2026-02-13 15:15:03 +01:00
gingerBill
6412c84690 Merge branch 'master' into bill/range-init 2026-02-12 13:15:39 +00:00
Laytan Laats
d49ab07d35 fix typo 2026-02-11 20:05:45 +01:00