Christoffer Lerno
3bd638bf77
Fixes to debug info in function pointer declarations. Incorrect x64 ABI code for structs by val. Change "Compiler" to "GlobalContext" storage of all types inside. Call debug symbol correct.
2021-05-02 16:42:28 +02:00
Christoffer Lerno
c6f671a6ca
A bit more global...
2021-04-29 22:44:00 +02:00
Christoffer Lerno
cd4b0bd803
Clearly check min 1 source files.
2021-04-29 20:23:10 +02:00
Christoffer Lerno
0f6f376340
Remove overread warning.
2021-04-29 18:27:09 +02:00
Christoffer Lerno
d3221981bc
Remove duplicate conditions in TOML parser.
2021-04-29 18:20:35 +02:00
Christoffer Lerno
3a465a99b2
Removing warning due to issue with LLVM headers.
2021-04-29 18:17:55 +02:00
Christoffer Lerno
5ad11ebb76
Added warnings (should be ok up to GCC 8)
2021-04-29 18:13:38 +02:00
Christoffer Lerno
aa8a773ca0
Removed unsupported warning.
2021-04-29 17:45:40 +02:00
Christoffer Lerno
dbd7d9ffa9
Updated with explicit warnings.
2021-04-29 17:36:57 +02:00
Christoffer Lerno
fd08c5c980
Revert "Remove suppressed warning."
2021-04-29 17:23:46 +02:00
Christoffer Lerno
c4585f9bbd
Remove suppressed warning.
2021-04-29 17:18:50 +02:00
Christoffer Lerno
41a07f40a9
Suppress warning.
2021-04-29 16:50:38 +02:00
Christoffer Lerno
0e076234ca
Set stdlib library for testing and profit. Fix bugs when using void* to step. Make constants private linkage. Compare pointers using unsigned comparison without conversion. Use manual ptrdiff code. Fix issue returning "void!". Unify pointers when doing Foo* - void*. Allow comparing for example void* < Foo*
2021-04-29 03:12:25 +02:00
Christoffer Lerno
01f7343945
Parsing of interface. Fix to unpacking arraypointers. Fix accidental unsplat.
2021-04-29 03:12:25 +02:00
Christoffer Lerno
21d4ecf9b4
Splat/unsplat/typed varargs
2021-04-28 14:33:26 +02:00
Christoffer Lerno
12fbaf476b
Small improvements to macro parsing and checking.
2021-04-28 14:33:26 +02:00
mathis2003
ee307f2dba
minor change in checking for unclear precedence
...
Previously the function which is now named "unclear_op_precedence()" used to have an extra not operator when an unclear precedence was found, and then there was also a not operator in the if statement checking for unclear precedence. This was harder to read and having two not operators after each other is totally redundant.
2021-04-17 17:38:19 +02:00
Christoffer Lerno
5a7c174aa5
Suppress some warnings on GCC
2021-04-16 01:30:26 +02:00
data-man
44bbe1a690
Don't show the target list twice
2021-04-15 20:28:10 +02:00
Christoffer Lerno
7f3963cbc5
Add -lm linking flag.
2021-04-14 15:07:11 +02:00
Christoffer Lerno
f028bc274f
Use the platform linker by default, which will just be a call to "cc" (the Win solution will be done later)
2021-04-14 14:29:03 +02:00
Christoffer Lerno
9de932a24d
Simplify getting dir and filename.
2021-04-14 11:24:53 +02:00
Christoffer Lerno
fe3f7d427e
Updates to the linker, tentative x86_64 support (and MacOS)
2021-04-13 23:35:31 +02:00
Christoffer Lerno
a3990f1b3d
Add lib path to linux, make PIE use RelocPIC
2021-04-10 14:08:45 +02:00
Christoffer Lerno
8e9ec35914
Correct default PIC/PIE
2021-04-10 13:18:25 +02:00
Christoffer Lerno
bf36dbc4e7
Trying to improve linux linking.
2021-04-10 13:11:09 +02:00
Christoffer Lerno
bad3ea124d
Updated README
2021-04-10 13:11:09 +02:00
Christoffer Lerno
954a90dae3
Fix of arch target. Experimental linker support.
2021-04-09 18:47:41 +02:00
Christoffer Lerno
3a74c4adfc
Update to python test framework.
2021-04-07 11:14:55 +02:00
Christoffer Lerno
4536d3a270
Fix of missing O3 setting. Added safe/unsafe mode. Updated trapping on negation. Added trap on negative shift & shift exceeding bit width. Added trap on div by zero, rem by zero. Prevent UB on negative shift/shift exceeding bit width. Use ordered FP comparison.
2021-04-07 11:14:55 +02:00
Christoffer Lerno
4210f1ccb2
Some work on vararray. Fix span on post unary. Updated error recovery. Updated return analysis to handle void functions. "while" now disallows error prone next line statement. Working on auto linking. Failable load optimized. Optimization and corrections for call returns + documentation.
2021-04-05 23:34:40 +02:00
Christoffer Lerno
1bc4400246
Incorrectly removed %=. Now restored with tests.
2021-03-17 19:39:55 +01:00
Christoffer Lerno
07595df412
Change cast and int rules: constant folding always starts. Promotion using left side on all operands to bit width. Implicit narrowing to max size on right hand side.
2021-03-17 18:25:00 +01:00
mathis2003
8a7f37e4d3
Test for explicit parentheses error
2021-03-15 16:56:44 +01:00
mathis2003
fe212a5a33
Forced parentheses on unclear precedence ( #109 )
...
forced parentheses to resolve issue #97
2021-03-15 16:55:35 +01:00
Christoffer Lerno
6f922b85a1
Removed path in judge0 that no longer worked. Removed link to r/ProgrammingLanguages since there is no longer a C3 channel there.
2021-03-10 16:27:40 +01:00
Ananda Umamil
52ac783e6c
Fix build on x86_64-linux-musl
2021-03-07 18:34:42 +01:00
Christoffer Lerno
1d50beb330
Work on constant string and inferred array sizes.
2021-02-03 23:01:37 +01:00
Christoffer Lerno
4f064e7da2
Initial checkin of docs parsing. char is now unsigned, and signed char is "ichar".
2021-01-29 18:46:17 +01:00
Christoffer Lerno
45c4f205bb
More correct alignment. Foreach added. Removed dynamic designated array initialization. Use 16 byte alignment on arrays >= 16 for x64
2021-01-27 00:14:16 +01:00
Christoffer Lerno
26d25e3f74
Recursive references between globals are now correctly handled.
2021-01-27 00:14:16 +01:00
Christoffer Lerno
7fc12192f4
Added "distinct" types.
2021-01-24 21:10:57 +01:00
Christoffer Lerno
3a24fbfa6d
Moved examples around. Updated (and corrected) const initialization. Removed "in" keyword. Added "member" attribute domain. Many fixes in struct padding and alignment and tests. Fixed extern global.
2021-01-24 00:55:09 +01:00
Christoffer Lerno
564c93700e
Fixed bug that would intermittently arise from multiple contexts having the same pointer (should preferably be fixed in a different way later). Free all the arenas before codegen. Change "next" to "nextcase". Allow missing function parameters. Add "inline" structs.
2021-01-03 00:15:51 +01:00
Christoffer Lerno
781638d207
Bugfix to split arrays. Correctly generate const initializers on non globals for structs.
2020-12-27 22:13:45 +01:00
Christoffer Lerno
9a0b8aab0b
Small fixes
2020-12-22 23:12:32 +01:00
Christoffer Lerno
4da36dfed9
Optimized and improved aggregate initialization. Compound literal updated to Foo({ 1, 2 })-style. ".name = x" style initialization for named arguments and designated initializers. Added runtime messages on panics. subarrays convert implictly to pointers. len/len() functions. Fix taking slice of pointer. Vararg fixes
...
Consistent length typedef.
First stab at initializers.
Change compound literal to Foo({ 1, 2 }) style.
Fixed up some tests.
Optimize the zero struct codegen.
Optimize union empty initializer.
Fix issues with unions. Added alignment to globals. Added some union tests.
Use puts to emit error messages during runtime. Fixup of int[] -> int* style conversions.
Fix implicit conversion of int[3]* -> int*
Fix int[] size. Use () to invoke the length of a subarray. Fix taking a slice of a pointer. Limit the number of members in a struct.
Fixes to vararg using debug and cleanups to slices.
2020-12-22 21:55:52 +01:00
Christoffer Lerno
6a5a0f2b94
Moved ABI lowering from codegen to semantic analysis. Fixes for failables in the ABI and the codegen.
2020-12-04 19:19:57 +01:00
Christoffer Lerno
0b00fe6988
Added round/ceil/trunc/sqrt intrinsics.
2020-12-03 15:53:42 +01:00
Christoffer Lerno
ac89023a2d
Adding __free and __alloc as intrinsics (but maybe revisit that idea).
2020-12-02 22:02:36 +01:00