Commit Graph

560 Commits

Author SHA1 Message Date
gingerBill
8b1bfc80fb Fix #1051 2021-07-10 11:27:38 +01:00
gingerBill
3662275119 Allow x in ptr_to_map_or_bit_set 2021-07-10 11:18:19 +01:00
gingerBill
e692efbe09 Improve update expr type semantics for ternary expressions 2021-07-10 11:08:51 +01:00
gingerBill
35230b1a11 Add "Suggestion: Did you mean?" for selector expression typos 2021-07-08 23:15:07 +01:00
gingerBill
a98eee145d Remove try; Replace try x else y with or_else(x, y) 2021-07-05 16:23:13 +01:00
gingerBill
46264032aa Improve error messages for try expressions 2021-07-04 12:50:44 +01:00
gingerBill
4b831dbddd Try try and or_else built-in procedures with operators try and try else 2021-07-04 12:37:21 +01:00
gingerBill
e8f2c5a48a [Experimental] Add 'try' and `or_else' built-in procedures 2021-07-04 01:38:43 +01:00
gingerBill
d8940f5fd7 Support compound literals for struct #raw_union types 2021-06-26 12:08:14 +01:00
gingerBill
dbdc4471c2 Fix double evaluation bug with selector call expressions x->y(z) 2021-06-16 14:03:12 +01:00
gingerBill
28abf5d33b Correct minimum dependency for complex32 2021-06-08 21:20:33 +01:00
gingerBill
795a5910cf Add support for Addressing_OptionalOkPtr
Allowing for `i, ok := &x.(T);` (type assertions) and `v, ok := &m[k];` (map indexing)
2021-06-06 12:18:45 +01:00
gingerBill
104aea9f42 Improve error message for addressing a swizzle intermediate array value 2021-06-05 18:25:51 +01:00
gingerBill
599d18f26f Experimental support for inline swizzling for array types of len <= 4 e.g. v.xyz, v.argb, v.xxx 2021-06-05 17:22:39 +01:00
gingerBill
d90adb7a8e Fix #998 2021-05-31 21:03:50 +01:00
gingerBill
4d80f8598d Fix polymorphic record "too few" lacking error message 2021-05-31 20:33:14 +01:00
gingerBill
247f4f3293 Fix ..= logic in the backend 2021-05-21 10:51:19 +01:00
gingerBill
9c54ed5792 Add range-based error messages to -verbose-errors
Example:
Cannot convert '(1 + 2)' to 'untyped bool' from 'untyped integer'

	x := (1 + 2) * true;
	     ^~~~~~^
2021-05-19 14:15:57 +01:00
gingerBill
6ef96d3300 Improve untyped to typed logic for aiding the backend 2021-05-16 14:44:02 +01:00
gingerBill
2e633f57a0 Add concrete type information for untyped values as procedure arguments 2021-05-16 13:00:16 +01:00
gingerBill
385385364b Fix #988 2021-05-16 12:46:25 +01:00
gingerBill
ce08e832f7 Allow ..= alongside .. as a "full range" operator; Update core:odin/parser etc 2021-05-16 12:34:35 +01:00
gingerBill
7b7081d607 Remove old dead code 2021-05-15 18:59:54 +01:00
gingerBill
0507b9ebb7 Fix #987 2021-05-15 18:40:06 +01:00
gingerBill
b01c2e1017 Disallow slicing of constant values 2021-05-15 16:40:40 +01:00
gingerBill
63b54ce7c6 Add minor ignoring hint on type assertions to get better code generation with no optimizations enabled 2021-05-13 12:48:12 +01:00
gingerBill
2e5f57d8a1 Fix #741 2021-05-13 00:44:33 +01:00
gingerBill
fdd0c726bc Improve error message to "fix" #640 2021-05-12 23:12:20 +01:00
gingerBill
d962cfdc6b Fix #713 2021-05-12 22:38:37 +01:00
gingerBill
dfb8143149 Fix #651 2021-05-12 22:23:43 +01:00
gingerBill
47f97b8f89 Remove unused hint 2021-05-06 14:09:50 +01:00
gingerBill
902be0d09c Improve type inference system to allow &{} alongside &T{} in some cases 2021-05-06 14:06:22 +01:00
gingerBill
da7a9a3584 Improve type inference rules for implicit selector expressions
New improvements:
`(.A == x)`
`a_union_containing_many_enums = .A;`
2021-05-06 13:59:05 +01:00
gingerBill
278de3a92f Unify AstTernaryExpr with AstTernaryIfExpr
Allow for both syntaxes `x if cond else y` and `cond ? x : y`
Removes the confusing semantics behind `?:` which could be `if` or `when` depending on the context.
2021-05-05 15:22:54 +01:00
gingerBill
abdf54800e Improve ternary expression logic within parametric polymorphic parameter assignments 2021-05-05 15:14:39 +01:00
gingerBill
222bab501c Disallow unnamed polymorphic records 2021-04-29 11:00:14 +01:00
gingerBill
e7e1866e50 Fix #893 2021-04-27 13:09:37 +01:00
gingerBill
1aa9c49172 Remove warning for "Redundant 'auto_cast' applied to expression" 2021-04-26 19:17:25 +01:00
gingerBill
cb2e6ea31d Remove use_llvm_api related checks and other related things 2021-04-25 20:03:05 +01:00
gingerBill
6383714bff Remove old procedure ABI code 2021-04-25 19:56:46 +01:00
gingerBill
c9b82a21e9 Move check_builtin_procedure to check_builtin.cpp 2021-04-23 10:01:52 +01:00
gingerBill
17bbb48d8a Warn on redundant auto_cast, and make an error on -vet 2021-04-22 17:36:28 +01:00
gingerBill
b68b090f13 Add intrinsics: overflow_add, overflow_sub, overflow_mul; Change byte swap behaviour in -llvm-api to be the same as the intrinsic 2021-04-22 11:33:46 +01:00
gingerBill
542098dc6f Add intrinsics: byte_swap (integers and floats); count_ones; trailing_zeros; reverse_bits 2021-04-22 11:06:16 +01:00
gingerBill
0a66f8c9a3 Remove intrinsics.x86_mmx type 2021-04-22 10:39:20 +01:00
gingerBill
47c7dc6a9b Add new intrinsics: debug_trap, trap, read_cycle_counter, expect 2021-04-22 10:35:17 +01:00
gingerBill
6b45856e81 Remove useless error message for constant binary expressions with non-constant operations 2021-04-21 10:52:26 +01:00
gingerBill
201cad51a9 Fix typo 2021-04-19 22:41:52 +01:00
gingerBill
d21e522208 Add code that was accidentally removed 2021-04-19 22:35:59 +01:00
gingerBill
f1bdd2e60f Improve #optional_ok logic for procedures; Add #optional_second for package runtime usage 2021-04-19 22:31:14 +01:00