Commit Graph

299 Commits

Author SHA1 Message Date
gingerBill
0859ccc5c0 Disable buggy escape analysis 2022-09-08 17:13:37 +01:00
gingerBill
c2809c2948 Improve basic escape analysis 2022-09-02 16:23:16 +01:00
gingerBill
8fd5bef0bd Fix #1977 2022-08-26 12:14:04 +01:00
gingerBill
776927709b Check for using variables 2022-08-26 12:11:27 +01:00
gingerBill
af1b3b6368 Correct check_expr_is_stack_variable 2022-08-24 16:03:04 +01:00
gingerBill
d56789e5a7 Add very basic escape analysis on return values 2022-08-24 15:58:20 +01:00
gingerBill
576914aee1 Make unreachable() a built-in compiler-level procedure 2022-08-05 11:57:33 +01:00
gingerBill
ea42613fec Improve error message with suggestion for #1866 2022-06-28 11:27:50 +01:00
gingerBill
f3868ac932 Improve missing handled results for built in procedures 2022-05-30 15:57:26 +01:00
gingerBill
5b42dd7707 Correct @(require_results) on parapoly procedures 2022-05-30 15:27:09 +01:00
gingerBill
410b85b5c7 Disallow @(thread_local) on wasm targets 2022-02-28 15:40:00 +00:00
gingerBill
67ce0ec29f Improve printing for unhandled cases by adding a new line before the cases 2022-02-05 14:58:13 +00:00
gingerBill
3439139b1c Minor clean up 2022-02-05 14:34:29 +00:00
gingerBill
dd84b61cc8 Correct add_to_seen_map logic 2022-02-05 14:07:17 +00:00
gingerBill
b8c4bf2afb Add #partial [Enum]Type{...} support to check for missing enumerated array fields 2022-02-05 14:02:21 +00:00
gingerBill
24e7356825 Add #no_type_assert and #type_assert to disable implicit type assertions with x.(T) 2022-01-27 16:08:47 +00:00
gingerBill
7cc265e14c Add mutex guards for signature scopes 2022-01-10 14:50:28 +00:00
gingerBill
defc1672c3 Revert fix #1344 2022-01-03 13:48:12 +00:00
gingerBill
12f459b5fb Fix #1344 2022-01-03 13:12:39 +00:00
gingerBill
0548db4230 Disallow @(static) and @(thread_local) within defer statements 2021-12-17 11:06:17 +00:00
gingerBill
f47311f2f6 Remove scope field from Ast 2021-11-14 15:22:40 +00:00
gingerBill
3f038428a7 Begin minimizing Ast size 2021-11-14 15:12:37 +00:00
gingerBill
541beb615b Move more things to PtrMap 2021-11-05 17:13:07 +00:00
gingerBill
c9effb9b9f Correct ternary if expression type determination 2021-10-22 14:37:27 +01:00
gingerBill
48de1a01a9 Correct update propagation of type for ternary if expressions 2021-10-22 13:14:19 +01:00
gingerBill
b88e945268 ERROR_BLOCK() any usages of "Did you mean?" like behaviour whilst iterating across a scope entry map 2021-08-27 12:14:51 +01:00
gingerBill
b33bf3f704 Correct race condition and incorrect usage of condition_signal outside of a mutex lock 2021-08-26 22:17:51 +01:00
gingerBill
382ca20916 Correct procedure checking flag handling, and correct the (bodge) handle of unchecked procedure bodies 2021-08-23 19:24:53 +01:00
gingerBill
fe2ad54f60 Fix bug in check_is_terminating 2021-08-23 17:42:54 +01:00
gingerBill
cba0bd30f5 Add suggestions when trying to take the address the a value from a for/switch statement 2021-08-23 11:50:02 +01:00
gingerBill
35026000bb Fix deadlock caused by typo 2021-08-19 11:40:26 +01:00
gingerBill
e3fef2dade Improve parsing for or_return; allow #force_inline foo() or_return; 2021-08-16 11:58:50 +01:00
gingerBill
4c306a6f99 Correct or_return logic for debug printing and expression is not used checking 2021-08-16 11:08:37 +01:00
gingerBill
000bda8419 Reduce superfluous error messages for return statements expecting not-1 return values 2021-08-07 16:29:00 +01:00
gingerBill
ed5a4afc8c Temporarily disable -threaded-checker; Restructure the untyped-expr-info system to be much more thread-friendly 2021-07-13 15:54:56 +01:00
gingerBill
d9e6ade030 Add experimental support for a threaded semantic checker to -threaded-checker 2021-07-10 23:51:37 +01:00
gingerBill
4a932616fc Improve CheckerContext usage 2021-07-10 13:02:13 +01:00
gingerBill
3662275119 Allow x in ptr_to_map_or_bit_set 2021-07-10 11:18:19 +01:00
gingerBill
e8f2c5a48a [Experimental] Add 'try' and `or_else' built-in procedures 2021-07-04 01:38:43 +01:00
gingerBill
41f2539484 Improve logic for diverging procedures by checking if it terminates 2021-06-16 12:07:24 +01:00
gingerBill
8f57bb0799 Add unreachable detection for deferred statements in a scope which contains a diverging procedure call
```odin
{
    defer foo(); // Unreachable defer statement due to diverging procedure call at the end of the current scope
    os.exit(0);
}
```
2021-06-16 11:41:29 +01:00
gingerBill
b0e21bd616 Allow trivial optimizations for switch statements of typeid 2021-06-09 23:05:37 +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
92abddddc5 Be a little more correct with the temporary Ast node 2021-05-19 15:02:36 +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
3ac934dd15 Add suggestion for unused expression on x == y
Expression is not used: 'x == 123'
	Suggestion: Did you mean to do an assignment?
	            'x = 123;'
2021-05-19 11:58:02 +01:00
gingerBill
6ef96d3300 Improve untyped to typed logic for aiding the backend 2021-05-16 14:44:02 +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
be12f12c3c Fix #814 2021-05-13 00:57:10 +01:00