Commit Graph

519 Commits

Author SHA1 Message Date
gingerBill
99944f3b02 Improve behaviour of return with named results to aid with defer statements 2020-06-10 14:53:35 +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
d80049bfd2 Change runtime.Type_Info_Enum_Value to be i64 internally rather than a union 2020-06-03 21:10:07 +01:00
gingerBill
bf5ce04b24 Improve rules for shifting behaviour
Example:
x: u64 = 123;
assert(x >> 64 == 0); // In C this would be 123 because (64 & 0b111111) == 0

a: u64 123;
assert(a << 64 == 0); // In C this would be 123 because (64 & 0b111111) == 0
2020-05-31 13:50:17 +01:00
gingerBill
84fd40de77 Fix rules for recursive initialization with procedure entities; Fix executable name if not given 2020-05-30 12:23:41 +01:00
gingerBill
26fe9b0212 Fix SelectorCallExpr with no return values 2020-05-22 23:41:17 +01:00
gingerBill
7bd1039a49 Selector Call Expressions: x->y(123) == x.y(x, 123) 2020-05-22 14:54:30 +01:00
gingerBill
3f23a0b3b0 Fix edge cases of relative pointers 2020-05-17 15:23:27 +01:00
gingerBill
e1bdaa981a Relative pointer and relative slices 2020-05-15 18:45:24 +01:00
gingerBill
95e8668b77 Relative pointers in old backend 2020-05-15 17:52:09 +01:00
gingerBill
ff92eb9112 Relative pointers 2020-05-15 17:37:00 +01:00
gingerBill
2630e9ced1 Fix #622 on both backends 2020-05-13 23:00:34 +01:00
gingerBill
482c687462 Fix procedure references in global compound literals in old backend 2020-05-13 22:42:15 +01:00
gingerBill
6861ff47bc Replace entity_of_ident with entity_of_node 2020-05-12 16:28:22 +01:00
gingerBill
4fc60601d3 Fix ABI typo 2020-05-06 20:18:43 +01:00
gingerBill
45274868c3 Fix -subsystem:windows for normal backend 2020-05-04 18:07:49 +01:00
gingerBill
97f7a558fa #optional_ok tag for procedures 2020-04-19 21:45:04 +01:00
gingerBill
92402603b9 Change find_or_generator_context_ptr behaviours 2020-04-17 14:02:45 +01:00
gingerBill
602a651613 Fix name mangling for @(private) entities 2020-04-15 21:58:16 +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
65a2125dba Add -build-mode=obj 2020-04-13 12:00:40 +01:00
gingerBill
9e698b720f Change behaviour for zero-sized value types of array-related types; Fix make behaviour to always zero memory 2020-04-12 10:41:44 +01:00
gingerBill
5157619eb7 Support endian specific float on -llvm-api; fix unary - for endian floats 2020-04-11 21:51:43 +01:00
gingerBill
90593fe6ae Endian specific floating point types (e.g. f32be) 2020-04-11 21:34:55 +01:00
gingerBill
a736d0e83f Fix @force on non-windows platforms 2020-04-11 19:40:01 +01:00
gingerBill
7ba339e6bd Fix link_name for variables 2020-04-11 19:34:29 +01:00
gingerBill
f38d7b02f3 Fix phi node check with untyped types 2020-04-05 14:20:26 +01:00
gingerBill
5e706bab56 Fix typeid comparison bug in ir.cpp 2020-04-04 21:23:11 +01:00
gingerBill
b98a4c6d69 Fix #597 2020-03-27 13:33:31 +00:00
gingerBill
7909872877 Allow referencing a compound literal to act like C99 2020-03-26 15:56:08 +00:00
gingerBill
0a920b5439 Fix map references in selector expressions 2020-03-25 15:55:00 +00:00
gingerBill
921ee82c97 Fix range statements for enumerated arrays without an element value but with an index 2020-03-25 15:11:35 +00:00
gingerBill
da703edbf4 Allow map indices to be referenced &m[key] and return a valid pointer if it exists otherwise nil 2020-03-24 15:48:31 +00: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
dfc63dcb60 Fix for in for pointer to map expressions 2020-03-22 20:56:46 +00:00
gingerBill
3951b93d0a Fix branch statements within inline for blocks (partial hack) 2020-03-15 14:27:54 +00:00
gingerBill
2a2d3273ea Add @require for global variables 2020-03-12 14:40:13 +00:00
gingerBill
c213d72ec6 Fix #580 defer bug 2020-03-05 20:58:59 +00:00
gingerBill
01b1385672 Disable tmp_block behaviour for ir_find_or_generate_context_ptr 2020-03-05 20:36:53 +00:00
gingerBill
e92fdb4a99 x if cond else y and x when cond else y expressions 2020-03-05 20:34:30 +00:00
gingerBill
1596bca92d Add intrinsics.cpu_relax 2020-02-26 22:29:12 +00:00
gingerBill
15f5c85379 Fix comparison against nil for union #maybe pointers 2020-02-23 10:55:09 +00:00
gingerBill
a72ac6f841 Fix #572 2020-02-23 10:26:49 +00:00
gingerBill
81b00c7a3e Fix #563 2020-02-23 10:11:43 +00:00
gingerBill
0f399a7294 Add union #maybe 2020-02-01 11:10:28 +00:00
gingerBill
7f89f6b582 Add intrinsics.type_is_specialization_of 2020-01-17 23:30:38 +00:00
gingerBill
159150c6d9 Allow not_in as keyword over notin, but still allow notin to work 2020-01-16 10:00:14 +00:00
gingerBill
5db4bd9944 Fix #536 2020-01-15 12:01:29 +00:00