Commit Graph

169 Commits

Author SHA1 Message Date
gingerBill
65551ba8fb Add optimization_mode attribute for procedures
Allowed modes: "none", "minimal", "size", "speed"
Currently: none == minimal and size == speed
2021-04-22 00:04:47 +01:00
gingerBill
a4d0092b16 Remove temporary reference types 2021-04-19 11:02:09 +01:00
gingerBill
eb49b5f84a Fix override_entity_in_scope behaviour to correctly to report the changes upstream better 2021-04-19 11:01:00 +01:00
gingerBill
9adec628c1 Add @(cold) attribute to procedure declarations 2021-04-14 17:15:28 +01:00
gingerBill
c62980eaea Minor improvement to error message about assigning a type to a variable with no inference 2021-03-23 22:33:32 +00:00
gingerBill
f5142aaec4 Change from test_* prefix to @(test) attribute for odin test 2021-03-14 18:43:21 +00:00
gingerBill
15dbc99cb9 Minimize TokenPos size by using i32 for line/column/offset and file_id instead of String
To make `i32` safe, the parser limits the file size of odin files to a maximum of 2GiB (which will be good enough for the vast vast majority of cases)
2021-03-04 16:45:30 +00:00
gingerBill
41b854f192 Remove #opaque types 2021-02-23 15:45:06 +00:00
gingerBill
28f279329d Remove bit_field keyword and parsing logic 2021-02-23 15:29:54 +00:00
gingerBill
28ed310f31 Remove "pure" and "pure_none" calling conventions 2021-02-23 13:10:23 +00:00
gingerBill
efdee0dafb Remove bit_field type from Odin (keyword and dead runtime code still exists) 2021-02-19 11:31:14 +00:00
gingerBill
089eccb245 Fix minor constant value declaration bug 2020-12-14 22:47:21 +00:00
gingerBill
6f71d1f2a9 Add -show-unused (Shows unused package declarations of all imported packages)
Crude output at the moment but better than nothing
2020-11-17 12:10:25 +00:00
gingerBill
ca4b0527e8 Minimize memory usage for AST nodes by using Slice<T> rather than Array<T> when the parameter doesn't need to grow 2020-11-16 15:18:25 +00:00
gingerBill
0d6f5cec37 Implement custom temporary allocator using ring buffer 2020-11-15 19:36:37 +00:00
gingerBill
17ec3e72a6 Add SCOPED_TEMPORARY_BLOCK for temporary allocations within a block 2020-11-15 18:45:40 +00:00
gingerBill
4629754f7c Inline asm expression (-llvm-api)
See https://llvm.org/docs/LangRef.html#inline-assembler-expressions
Example:
```
x := asm(i32) -> i32 {
    "bswap $0",
    "=r,r",
}(123);
```
Allowed directives `#side_effect`, `#align_stack`, `#att`, `#intel` e.g. `asm() #side_effect #intel {...}`
2020-10-24 16:32:37 +01:00
gingerBill
6aa708a455 Fix Odin bug with "none" procedure calling conventions in the runtime 2020-09-10 16:36:33 +01:00
gingerBill
c1149dbdee Update math and math/linalg; add "pure_none" calling convention 2020-09-10 15:00:19 +01:00
gingerBill
7bdd8094d6 Fix signature_parameter_similar_enough logic 2020-06-30 19:10:24 +01:00
gingerBill
92363da58e Add -show-system-calls; Update runtime for windows_386; Fix some minor bugs 2020-06-30 10:09:58 +01:00
gingerBill
6bd05ef5d7 Begin migration from sys/win32 to sys/windows 2020-06-26 19:11:34 +01:00
gingerBill
e86fde3cb1 Fix #648 2020-06-10 15:09:04 +01:00
gingerBill
59a0bbb385 Improve termination rules checking for missing return; Make diverging procedure -> ! be terminators 2020-06-06 15:16:24 +01:00
gingerBill
aa029fe8d9 Add "pure" procedure types 2020-05-23 13:38:06 +01:00
gingerBill
c2bfb221f5 Fix #561 where statements that eval to false do not show incorrect usage location 2020-05-13 23:45:55 +01:00
gingerBill
fcdfcfce19 Let -vet ignore intentional declaration shadowing #637 2020-05-12 10:31:49 +01:00
gingerBill
e27f5796d6 Add experimental atom op tables for llvm-backend 2020-05-02 18:45:57 +01:00
gingerBill
f229084baa Basic polymorphic named procedure parameters for procedures and records 2020-04-13 15:48:56 +01:00
gingerBill
f09b6a4c90 Simplify compiler's Map and create a StringMap specifically for strings 2020-04-13 13:02:30 +01:00
gingerBill
b54b5aabac Fix crash on aliasing compiler-only packages (e.g. intrinsics) with _ at the global scope. 2020-04-04 19:45:54 +01:00
gingerBill
18fb6a4be4 Merge branch 'master' into llvm-integration 2020-03-15 14:31:26 +00:00
gingerBill
2a2d3273ea Add @require for global variables 2020-03-12 14:40:13 +00:00
gingerBill
8dc74a004c Fix nested type declarations name generation, to be internally consistent 2020-03-08 11:46:05 +00:00
gingerBill
5073fcd39e Improve error message on using with procedure parameters #568 2020-02-23 10:37:27 +00:00
gingerBill
2252d992d7 Add -disable-assert to disable the code generation of the built-in run-time 'assert' procedure 2019-12-29 21:10:27 +00:00
gingerBill
f99f351e01 Add constant literal expressions 2019-12-27 15:49:52 +00:00
gingerBill
880c7f01a8 Fix array lengths with enum value counts. 2019-12-27 13:55:18 +00:00
gingerBill
e229885b2b Remove addressing mode Addressing_Immutable 2019-12-01 19:11:00 +00:00
gingerBill
69afa33fa5 Fix Implicit Selector Expressions do not work at the global/package scope #484 2019-11-20 21:56:37 +00:00
gingerBill
94879ed149 Fix Compiler assertion when applying using to _ procedure parameter. #451 2019-10-26 12:14:04 +01:00
gingerBill
6c69e8c043 Make typeid semantics consistent across variables and constants 2019-10-06 14:55:25 +01:00
gingerBill
68582c5ad1 Add suggestions to errors on casts and assignments. 2019-09-17 19:47:04 +01:00
gingerBill
4afc78efc6 Add where clauses to struct and union 2019-09-08 12:12:41 +01:00
gingerBill
d4914c3546 Fix Ir panic on using append() from within anonymous function #432 2019-09-04 18:06:02 +01:00
gingerBill
b9d3129fb3 where clauses for procedure literals 2019-08-31 20:13:28 +01:00
gingerBill
b311540b16 Make require_results an attribute rather than a suffix tag for procedures 2019-08-31 14:48:56 +01:00
gingerBill
07ced1cf0e Fix variable dependency ordering issues caused by procedure literals 2019-08-31 11:12:41 +01:00
gingerBill
c89fc35e94 Fix global variable initialization ordering
(related to #427)
2019-08-29 14:36:42 +01:00
gingerBill
04036aba9c package reflect; fix substring type bug; fix scoping rules for using on procedure parameter 2019-08-11 23:58:49 +01:00