aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2020-12-03Type Resolve ReturnExpr's to ensure they match the function type.Philip Herron4-7/+63
This an implementation to check return types for functions it needs work to handle structs and other data structures later on.
2020-12-03We cannot lookup types to ensure they are known as AST::Type differsPhilip Herron1-14/+14
to how struct AST Types. We need to move to HIR to avoid this issue via name resolution.
2020-12-03Add failure tests to rust testsuitePhilip Herron6-25/+39
We need to have test cases for when the compilation should xfail this will help add more tests for name/type resolutions. This is needed as there is a large code changes on the horizon and this will help spot regressions.
2020-12-01GIMPLE coversions for ArrayIndexExpr and Arrays with valuesPhilip Herron6-6/+143
This compiles the ArrayIndexExpressions and Arrays such as: let x = [1,2,3]; let a = x[0]; Addresses: #55
2020-12-01Mark this as a FIXME memory leakPhilip Herron1-0/+1
2020-12-01Ensure the array index is of integer type.Philip Herron1-1/+9
The index expression must be validated to ensure it is an integer. Addresses: #27 #55
2020-12-01Resolve the type from an ArrayIndexExpressionPhilip Herron3-9/+290
Adds new TypeVisitor to resolve Types from the AST via Visitor Pattern, so the element type can be extracted. Addresses: #27 #55
2020-12-01Add Type resolution to Array expressionsPhilip Herron3-14/+180
This adds type inferencing and validation for arrays such as: let x: [i32, 5] = [1,2,3,4,5] ley y = [1,2,3]; It checks that each element is of a valid type and they line up correctly. There needs to be some refactoring of the type resolution to handle the array index expressions so this is a good save point for now. Addresses: #27 #55
2020-11-30Linemap and Backend are both singletonsPhilip Herron1-3/+7
We can only create on linemap instance to avoid missing locations in error diagnostics. We also only need one instance of the backend.
2020-11-28No need to declare Type as inferedType when it is already definedPhilip Herron1-7/+0
In the case where there is no init_expression for a variable declaration and the type was defined on the name we dont need to then assign that the variable was infered.
2020-11-28Use ifdef guards instead of pragma oncePhilip Herron1-1/+4
2020-11-28Fix formatting in MakefilePhilip Herron1-41/+42
2020-11-28Initial TestSuite setup for make check-rustPhilip Herron9-1/+832
This is an initial basic testsuite with one file with expected failures for now.
2020-11-28Remove unused and add FIXMEPhilip Herron2-18/+4
We need to ensure in type resolution pass we fix up the ordering for a struct initilization and give defaults to missing fields.
2020-11-28Added skeleton for macro expansion and added way to convert MetaItems back ↵SimplyTheOther9-193/+209
to Attributes (e.g. for cfg_attr use)
2020-11-28Improved parsing of MatchExpr (and AST structure)SimplyTheOther15-113/+231
Fixed compilation errors Fixed accidental break out of loop when expr_with_block when parsing match expr
2020-11-28Testing some more algorithmic changesSimplyTheOther2-102/+389
Fixed syntax errors
2020-11-28Test even more generic algorithm for parsing in for lifetimesSimplyTheOther2-19/+9
2020-11-28Added more error_at formatting fixesSimplyTheOther4-184/+190
Debug for parsing failure with partially consolidated lifetime parsing More debug for parsing failure Corrected the apparent lack of skip_token in parse_lifetime_param()
2020-11-28Attempt to significantly reduce warning count by modifying error message formatSimplyTheOther3-428/+457
2020-11-28Working on consolidating some other parsing functionsSimplyTheOther2-138/+241
2020-11-28Attempt to consolidate CompoundAssignmentExpr parsingSimplyTheOther2-20/+116
2020-11-28Attempt consolidation of ArithmeticOrLogicalExpr parsingSimplyTheOther2-32/+127
Fixed typo of MODULUS as MODULO
2020-11-28Attempt to fix the ExprWithoutBlock in ExprStmtWithoutBlock issueSimplyTheOther4-126/+191
First step toward consolidation of similar parsing functions (ComparisonExpr in this case) Debug output for apparent parsing failure Attempt to fix problem with non-digit character after 0 being mistaken as non-decimal int literal Attempt to fix incorrect tokenisation of a dot then a decimal Try new implementation of token splitting rather than token replacing
2020-11-28Converted Parser to template in preparation for macro expansionSimplyTheOther7-14106/+14220
2020-11-28Potential modifications to buffered_queue to move when resizing instead of ↵SimplyTheOther3-115/+60
copying - test if works properly Added messages to buffered_queue to debug assertion failure Attempt to fix the buffered_queue issue Removed some debug in buffered_queue
2020-11-28Attempt to modify buffered_queue to take ownership of a source rather than ↵SimplyTheOther17-5658/+3934
reference, other cleanup Attempt to fix compile errors caused by make_shared with private constructor Attempt to fix compile errors Attempt to fix appearance of no characters in lexer
2020-11-28Massive lexer cleanup and refactoring - moved lots of stuff out of main methodSimplyTheOther2-2267/+2225
Minor changes to parse_non_decimal_int_literal to fix naming Another minor fix regarding naming in lexer More lexer refactoring to reduce size of build_token() method
2020-11-28Attempted to solve string escape vs null character location issuesSimplyTheOther2-59/+27
2020-11-28Lexer cleanupSimplyTheOther6-405/+426
2020-11-28Miscellaneous improvements to various target hooksSimplyTheOther8-549/+638
2020-11-28i386 build fix against latest gccPhilip Herron1-14/+14
2020-11-28Improvements to aarch64 target hookSimplyTheOther2-96/+117
2020-11-28Improved and tidied up ARM target hookSimplyTheOther1-191/+153
2020-11-28Enhancements to x86 target hook, should be feature complete with llvm to the ↵SimplyTheOther1-138/+406
greatest extent possible
2020-11-28Added Xtensa target hook (or provisional one at least)SimplyTheOther1-0/+14
2020-11-28Added Visium target hook (or at least provisional one)SimplyTheOther1-0/+24
2020-11-28Added VAX target hook (or provisional one at least)SimplyTheOther1-0/+17
2020-11-28Added NEC V850 target hook (or provisional one at least)SimplyTheOther6-1/+94
2020-11-28Added TILEPro target hookSimplyTheOther1-0/+8
2020-11-28Added TILE-Gx target hookSimplyTheOther1-0/+15
2020-11-28Compile AST::StructExprStructFields into a constructor tree.Philip Herron3-12/+113
This still requires more type resolution work to ensure field ordering on the initilizer and defaults if required. struct Foo struct_test; try { struct_test.one = 1; struct_test.two = 2; } finally { struct_test = {CLOBBER}; }
2020-11-28Added provisional SPARC target hookSimplyTheOther5-0/+75
2020-11-28Added target hook for Renesas SH (or provisional one at least)SimplyTheOther5-0/+173
2020-11-28Added extremely provisional S/390 and zSeries target hookSimplyTheOther6-1/+69
2020-11-28Added Renesas RX target hook (or at least provisional one)SimplyTheOther5-0/+86
2020-11-28Added RL78 target hook (or at least provisional one)SimplyTheOther1-0/+24
2020-11-28Added RISC-V target hook (or at least provisional one)SimplyTheOther5-0/+73
2020-11-28Added PRU target hook (or provisional one at least)SimplyTheOther1-0/+15
2020-11-28Added PDP-11 target hook (or provisional one at least)SimplyTheOther5-0/+68