Commit Graph

199 Commits

Author SHA1 Message Date
gingerBill
cb2e6ea31d Remove use_llvm_api related checks and other related things 2021-04-25 20:03:05 +01:00
gingerBill
c29b643a58 Move out some intrinsics into separate procedures in llvm_backend.cpp; Rename InlineRangeStmt to UnrollRangeStmt (eventually merge the two AST nodes) 2021-04-24 15:00:01 +01:00
gingerBill
47c7dc6a9b Add new intrinsics: debug_trap, trap, read_cycle_counter, expect 2021-04-22 10:35:17 +01:00
gingerBill
3612569624 Allow casting of #optional_ok call expressions 2021-04-19 15:46:12 +01:00
gingerBill
1aecd7f5ff Add support for soa slice reference iteration 2021-03-24 22:39:29 +00:00
gingerBill
5faf859a56 Support using on intermediate soa field value from a for-in statement 2021-03-24 22:34:55 +00:00
gingerBill
2ec3326653 Support #soa array iteration in a for in loop for -llvm-api backend only 2021-03-24 14:31:44 +00:00
gingerBill
d969d0b264 Make for in logic a bit more generic 2021-03-24 12:31:05 +00:00
gingerBill
0e3ecc350a Make the parser support as many identifiers on the LHS in for in loops to improve error messages 2021-03-24 12:11:00 +00:00
gingerBill
8123ff83a3 Fix is_diverging_stmt for invalid statements 2021-03-13 15:01:23 +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
a1693c0184 Deprecate inline for in favour of #unroll for 2021-02-23 14:45:15 +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
6c2b93d519 Improve text/scanner whitespace parameter to use a bit_set instead; Improve error message for for x in y where y is not iterable but allows in as an operator 2020-12-15 22:28:40 +00:00
gingerBill
828fe2ce56 Fix #795 2020-12-03 12:25:45 +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
939878df50 Improve logic for x->y() shorthand 2020-11-15 23:54:18 +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
4844dd4d96 Add check to block statements to see if they only contain one statement, a value declaration, and err. 2020-09-23 11:16:33 +01:00
Joseph Battelle
e9c598a426 Fix issue #723
Typo in `check_stmt_internal` for case Ast_UsingStmt; first element
was used for all elements of the enumerated list.
2020-09-14 16:41:53 -07:00
gingerBill
ccb7c3513b Fix check_arity_match bug 2020-09-12 15:50:42 +01:00
gingerBill
6158a49618 Make sync.atomic_* operations use when statements instead of switch; Make #panic diverging 2020-08-16 12:34:12 +01:00
gingerBill
2a684830f9 Fix using pointers bug with addressing struct fields 2020-06-18 17:50:54 +01:00
gingerBill
87a6d695d6 Fix typo in error message 2020-06-06 22:39:36 +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
7bd1039a49 Selector Call Expressions: x->y(123) == x.y(x, 123) 2020-05-22 14:54:30 +01:00
gingerBill
d59fced21b #591 Improve type switch statement error for fallthrough 2020-05-13 23:33:03 +01:00
gingerBill
14ce6d8ed8 Fix #632 behaviour 2020-05-13 23:09:38 +01:00
gingerBill
6861ff47bc Replace entity_of_ident with entity_of_node 2020-05-12 16:28:22 +01:00
gingerBill
e27f5796d6 Add experimental atom op tables for llvm-backend 2020-05-02 18:45:57 +01:00
gingerBill
f09b6a4c90 Simplify compiler's Map and create a StringMap specifically for strings 2020-04-13 13:02:30 +01:00
gingerBill
d57fbf48f0 Support by-reference semantics in for value_ref, index in &some_array and for key, value_ref in &some_map 2020-03-24 15:28:58 +00:00
gingerBill
5cbb266ef5 Change behaviour of switch v in &value to make v have by-reference semantics 2020-03-24 14:29:54 +00:00
gingerBill
3951b93d0a Fix branch statements within inline for blocks (partial hack) 2020-03-15 14:27:54 +00:00
gingerBill
ce20604e3c Fix #578 2020-02-29 09:35:41 +00:00
gingerBill
5073fcd39e Improve error message on using with procedure parameters #568 2020-02-23 10:37:27 +00:00
gingerBill
ceef5db547 Support for and inline for for enumerated arrays 2019-12-27 17:16:43 +00:00
gingerBill
d1c9fd4e01 Implement #complete switch by default, replace with #partial switch #511 2019-12-22 12:03:48 +00:00
gingerBill
4ba579bc25 Also allow #no_bounds_check on an expression #499 2019-12-15 11:41:21 +00:00
gingerBill
8bec324779 Fix Duplicate integer switch case values incorrectly consider its absolute value #502
(Hashing proc was wrong for big ints)
2019-12-15 09:56:11 +00:00
gingerBill
e229885b2b Remove addressing mode Addressing_Immutable 2019-12-01 19:11:00 +00:00
gingerBill
dfb3101ecf SOA Struct support intrinsics.soa_struct 2019-11-02 21:08:51 +00:00
gingerBill
e3d3a81617 multivalued procedure calls allows in for in to allow a pseudo-iterator; @thread_local for variables in procedure 2019-11-02 16:36:46 +00:00
gingerBill
dbdbbcd60f Fix range in statement bug caused by incorrectly assigned addressing mode #461 2019-11-02 10:57:42 +00:00
gingerBill
7fae890ef9 Allow ranges for array-like compound literals 2019-10-26 14:06:29 +01:00
gingerBill
94879ed149 Fix Compiler assertion when applying using to _ procedure parameter. #451 2019-10-26 12:14:04 +01:00
gingerBill
7fa2d25eea Fix #complete switch with pointer case doesn't compile #416 2019-10-05 10:22:41 +01:00