Goose  Timeline

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

137 check-ins using file bs/util/graphviz.cpp version df69c068d3

2019-09-21
21:43
  • Implemented the 'requires' and 'ensures' verification statements.
  • Verification statements are lazily parsed even for non template functions, so that they can see functions defined out of order, just like in function bodies.
check-in: 2e993951e6 user: achavasse tags: trunk
2019-09-18
22:41
When instancing template functions, parse their verification statements. check-in: a9930c3c49 user: achavasse tags: trunk
2019-09-17
22:34
parser: fill in the unparsed verification statements in tfunctype. check-in: 035c904764 user: achavasse tags: trunk
20:08
  • parser: add an utility function to retrieve a sub expression in its unparsed form.
  • tfunc type: store a pointer to a vector of unparsed tokens for the verification statements.
check-in: 0c3c9488af user: achavasse tags: trunk
2019-09-16
21:38
  • func: created an identity for the verification expressions.
  • func: created bindings for the function parameters inside of the verification expressions identity.
check-in: 8abb611e48 user: achavasse tags: trunk
2019-09-15
22:23
  • Added the "Verification" domain and domain specifier.
  • Parser: now parses a verification sub expression in function types, located after the domain specifier.
check-in: dc72d5dc8c user: achavasse tags: trunk
2019-09-09
16:38
Func types now store a pre assertion expression and a post assertion expression. check-in: 7c69a33283 user: achavasse tags: trunk
16:00
llr: added the assert verification instruction. check-in: 3e6bd22335 user: achavasse tags: trunk
2019-09-07
17:10
ir: got rid of the code to merge and to match two tries, which isn't used and is unlikely to be needed at this point. check-in: e9ee5d4728 user: achavasse tags: trunk
16:53
ir: rewrote the super inefficient "term versus trie" matching function. This speeds up everything significantly: compiling the mandelbrot sample is no longer embarrassingly slower than compiling an equivalent c++ version with clang. check-in: 0db33d7cb4 user: achavasse tags: trunk
2019-08-31
14:57
  • Unification: anonymous holes are substituted with their content right away, since otherwise they don't get substituted before the second pass.
  • When a tuple of types is used as a param type, it is converted to a tuple type.
  • Fix comma operator not correctly handling prepending a value to an open tuple.
  • Added tests for various tuple based features.
check-in: 1099848ccd user: achavasse tags: trunk
2019-08-30
01:07
The tuple assignment and compound assignment operators now first collect the results into temporary variables, and then perform the assignments. This allows things such as a,b = b,a to work. check-in: 982d26433b user: achavasse tags: trunk
2019-08-29
20:50
Implemented an unification rule for tuples. It is now possible to put multiple variable declarations in a tuple and initialize them using another tuple. check-in: aee9a8fb25 user: achavasse tags: trunk
20:12
Params are now encoded distinctly from normal values, to allow for more generic unification rules for things suchs as BigInt versus Integer. check-in: 6e598fe891 user: achavasse tags: trunk
2019-08-28
00:01
  • Made it possible to store non-resolved local variables in tuples.
  • Implemented DestroyValue and DropValue for tuples.
  • Implemented most operators for tuples.
check-in: adf946f1f5 user: achavasse tags: trunk
2019-08-27
21:40
Extended the comma operator to be able to handle the concatenation of, and prepending values to open tuples. check-in: 537ae5ab51 user: achavasse tags: trunk
21:10
When parsing a decl that immediately precedes a paren block (ie a function decl), use a lower precedence than the comma operator, to allow a non-parenthesized tuple to be used as the return type. check-in: 0052ff08b3 user: achavasse tags: trunk
20:27
Tuples containing only types or other tuples of types are now considered types. check-in: 533d2ce579 user: achavasse tags: trunk
19:46
Live values are now identified by an unique id to avoid using a fragile, non future proof way to extend the lifetime of local variables beyond their containing statements. check-in: 39cabb3447 user: achavasse tags: trunk
2019-08-26
00:18
Implemented local variable destruction (through the DestroyValue() extension point), and setup proper visibility and lifetime rules for variables declared inside of statements. check-in: c2b2425c0c user: achavasse tags: trunk
2019-08-25
02:15
Small cleanups and re-enable llvm optimizations when compiling. check-in: dc199732f8 user: achavasse tags: trunk
01:54
  • Got rid of the LoadConstInt instruction and directly handle integer constants in codegen. The old system didn't work for compile-time evaluated runtime integers.
  • Added missing implementations for unsigned comparison, that were somehow forgotten.
  • Implemented the nullptr constant.
  • Made a test version of the mandelbrot sample that gets both compiled and interpreted and whose results are compared with the same reference file, as a sanity test that interpreted and compiled code behave identically.
check-in: 9a68159d52 user: achavasse tags: trunk
2019-08-24
22:05
Added a sample program that renders an ascii art mandelbrot. check-in: 05234fc5f0 user: achavasse tags: trunk
20:41
Make cast() eagerly evaluated once again, it was removed by mistake. check-in: 7fa6ff1937 user: achavasse tags: trunk
19:33
More cleanup around which builtin functions should be intrinsics/eager/non eager. check-in: fece958df9 user: achavasse tags: trunk
16:54
  • ExecuteFile is now a regular builtin function.
  • Added #Include, which works the same as the old ExecuteFile.
  • Added a CreateConstant() builtin func.
  • Used the above to cleanup the command line parsing code in empathy.em.
check-in: f1cab5f761 user: achavasse tags: trunk
13:42
Factored out the common code of Compiler::execute(), ExecuteFile() and #CompileFileToFunction(). check-in: 0c5641877d user: achavasse tags: trunk
12:58
Removed unnecessary sema tests dependencies. check-in: 64fbc04864 user: achavasse tags: trunk
12:04
Vscode syntax highlighter tweak. check-in: 9969a33d0a user: achavasse tags: trunk
2019-08-23
20:18
  • Added a default InitializeVar() overload allowing any builtin type to be stored in a local variable during compile time.
  • Remplaced a lot of hackish uses of using with local variables, now that they work.
  • Changed several eager-evaluated bultin function to normal builtin functions, thanks to the above cleanup.
  • Eager-evaluated builtin functions are all now prefixed with a # symbol to indicate their "compiler directive" nature and make it clearer that they are evaluated during the translation phase of the program, rather than its execution (even compile time execution).
  • A few build and testing scripts fixes.
check-in: 133303cbbf user: achavasse tags: trunk
2019-08-22
13:23
You have failed me for the last time, CMake. check-in: e38aee1ca0 user: achavasse tags: trunk
2019-08-21
13:38
  • Automatically compile the samples during the build.
  • Added a --forcecolors to the front-end, since it can't detect whether colors are allowed when launched by Ninja.
  • while: if the condition evaluates to constant true and there is no break statement in the body, use a different code generation strategy to avoid generating a continuation block which makes a return statement mandatory after the loop even though it's unreachable.
check-in: 20d317a921 user: achavasse tags: trunk
2019-08-20
23:48
Removed an irrelevant comment. check-in: d2c3ec7961 user: achavasse tags: trunk
23:42
  • Fixed broken canBeExecuted() and canBeEagerlyEvaluated() computation of CFGs.
  • Added some error messages when a function with compile-time only types contains calls to runtime functions. (to be improved and detected during parsing rather than codegen but serviceable for now)
check-in: d5bc4daeca user: achavasse tags: trunk
20:00
Improved error messages. check-in: 25f4d2946d user: achavasse tags: trunk
16:15
  • Fixed error messages when compiling a file through the real frontend (this was broken again because this is a day ending in y)
  • Implemented initialization, assigment, and equality comparison for ct_char.
  • Implemented the cast builtin function. Its only overload currently allows to cast a ct_char into a ct_int.
  • Implemented the PrintAsciiChar builtin function to write a single ascii character.
check-in: c20ed5f1d3 user: achavasse tags: trunk
02:09
  • Implemented the ct_char type.
  • Implemented character literals.
  • Replaced the ridiculous hash based stringid implementation to just use string interning instead, which is something I remembered exists (duh)
check-in: 932f41fd6a user: achavasse tags: trunk
2019-08-19
19:25
  • Factored escape sequence parsing out and made hex and octal literal also output correct UTF-8 sequences when used in strings.
  • Fixed lexer errors never being displayed if they happen during the compile-time execution attempt, during which diagnostics are silenced.
check-in: 6c118e666d user: achavasse tags: trunk
13:43
  • Fixed many issues with compile time versus run time function invocations.
  • Improved some error messages.
check-in: baf9721752 user: achavasse tags: trunk
2019-08-18
20:54
  • Added a function to adjust the compile time execution budget.
  • lexer: Implemented escape sequences in string literals.
check-in: bd4456308c user: achavasse tags: trunk
18:52
  • Implemented the break and the continue statements.
  • Fixed cfg generation issues with nested control statements.
  • Fixed unreachable code error messages not emitted in some cases.
check-in: a504aedf6c user: achavasse tags: trunk
15:35
llr: added the break and continue terminators. check-in: b16e7c5933 user: achavasse tags: trunk
14:51
  • Fixed speculative compile-time execution causing compilation failures.
  • Fixed compile time execution budget underflowing, leading to the compiler going into an infinte loop while compiling an infinite loop (erm...)
  • Fixed more cases of missing propagation of poison states leading to spurious error messages.
check-in: 9d81e31cfe user: achavasse tags: trunk
00:54
  • Implemented the while statement.
  • Fixed a lexer issue that generated invalid locations at the very end of files.
check-in: 459ee84d6b user: achavasse tags: trunk
2019-08-17
20:46
Implemented compound assignment operators. check-in: 35a5fd236f user: achavasse tags: trunk
14:49
  • Intrinsics automatically set their domain depending on the domain restrictions of the builtin types that they use.
  • Declaring a local variable of a compile-time only type is now properly rejected during codegen.
  • Improved error messages for operators and extension point invocations.
check-in: 48a020a1fa user: achavasse tags: trunk
2019-08-16
23:52
Simplified ir::Vector, use plain std::vector to store the terms. immer::vector was pointless for that since we pretty much never actually take advantage of them being CoW in this case. check-in: f2ca82dfce user: achavasse tags: trunk
20:33
Implemented variable declarations with local type inference. check-in: 5a361c8b86 user: achavasse tags: trunk
14:48
Added a new type of template expression: TVec, along with a helper function to make it possible for parametric types to be constructed either normally or as a template expression when passed template parameters. Only used by LocalVar for now, parametric runtime types require some refactoring. check-in: 27fc719d74 user: achavasse tags: trunk
2019-08-15
22:58
Implemented InitializeLocalVar() for the bool, ct_int and ct_string types. check-in: 6d69e387ac user: achavasse tags: trunk
22:37
  • Fixed some bugs related to dropping values.
  • Implemented local variable declarations with default initialization.
  • codegen: Fixed allocas not properly grouped up at the start of the first basic block of functions.
check-in: 3d8b581261 user: achavasse tags: trunk
01:54
Fixed a couple of typos. check-in: 1e6e7c928d user: achavasse tags: trunk
01:27
  • Implemented the DropValue() extension point, called when a previously pushed value is dropped without being used.
  • ir, sema: the complexity of an ir expression is now directly counted by ir::Vector, so that we don't have to deal with it in every unification rule (and it was missing from most of them, which caused incorrect overload resolutions in some cases).
check-in: 75bcd81044 user: achavasse tags: trunk
2019-08-14
15:21
Implemented the "InitializeLocalVar" extension point, with a builtin overload for integers. check-in: ffbb9276bb user: achavasse tags: trunk
02:35
Fixed a misnamed test. check-in: 5a4946c300 user: achavasse tags: trunk
02:30
  • Added an unification rule to deal with LocationIds. It honors poisoning and preserve the most recent location from the input values.
  • Added a diagnostic context indicating the point at which a template function passed as a value has been instantiated.
  • Added a trace mode that logs the diagnostics contexts, which can be activated by calling a compile time function.
  • Added a few diagnostic messages tests.
check-in: 980effe072 user: achavasse tags: trunk
00:04
Reorganized tests. The current set of tests have been moved to a "noprelude" subdirectory. check-in: 7e4e9d28d2 user: achavasse tags: trunk
2019-08-13
23:27
cleanup: got rid of more optional< Value >. check-in: 0288a69883 user: achavasse tags: trunk
22:43
Cleanup: got rid of optional< Value > in a lot of places that ought to always return a poison value if an error happens. check-in: 1feb20f522 user: achavasse tags: trunk
21:21
  • Completed the diagnostics renderer.
  • Fixed a few places where value poisoning wasn't correctly propagated.
check-in: ec58d0ff48 user: achavasse tags: trunk
14:12
First, incomplete draft of the diagnostics renderer. check-in: 904cb2d062 user: achavasse tags: trunk
12:14
diagnostics: simplify the code a bit by merging the LocationManager as static methods in Location. check-in: 17905bf47a user: achavasse tags: trunk
00:42
Diagnostics: use value poisoning to (hopefully) fix most cases of superfluous cascading error messages. check-in: 59ecc02baa user: achavasse tags: trunk
2019-08-12
20:15
  • Implemented a system to temporarily silence error outputs.
  • Syntax errors now silence further errors encountered while parsing the same block and nested children blocks.
  • All errors are also silenced while speculatively attempting to evaluate invocations at compilation time.
check-in: 972c1d8b47 user: achavasse tags: trunk
16:07
Added local vscode workspace settings to link cmake-tools and cpp tools. check-in: b48fe61a11 user: achavasse tags: trunk
2019-08-11
18:59
Converted all the remaining error messages to use the diagnostics manager. check-in: 4a121b956a user: achavasse tags: trunk
17:18
  • Converted more error messages to the new system.
  • Propagated value locations in some missing places.
  • Added the location of template function calls as diagnostics context.
check-in: b8548d8b24 user: achavasse tags: trunk
13:36
Ported more error messages to the DiagnosticsManager. check-in: 157221e014 user: achavasse tags: trunk
01:26
  • ir: created a new type for LocationId which is handled in a specific way so that two LocationIds are always considered equal by pattern matching. This prevent the values' locationIds stored in ir expressions from fucking up everything.
  • propagate value locations in a few places: in the parser, when resolving invocations and when doing eager evaluation. There are probably a lot of other places still missing.
  • converted all the builtin statements to use the DiagnosticsManager.
check-in: 2efa23555d user: achavasse tags: trunk
2019-08-10
20:15
parser: custom parsing rules are now passed the location id of the value that resolved to them. check-in: e7fce87609 user: achavasse tags: trunk
19:33
Implemented a DiagnosticsContext class which can be used to push contextual informations that are printed when an error is emitted. check-in: ffa2c830dd user: achavasse tags: trunk
17:50
lexer: generate token locations. check-in: bd2fd03a33 user: achavasse tags: trunk
17:01
Implemented the very first draft of the DiagnosticsManager and converted the using statement to use it. check-in: 2eb6c1fa43 user: achavasse tags: trunk
14:26
Refactored the lexer (and the resolver) to output Terms associated with location Ids. check-in: c4abb2a3ed user: achavasse tags: trunk
12:56
diagnostics: implemented the new location class, and the location manager. check-in: 179de91f52 user: achavasse tags: trunk
2019-08-09
20:45
Added a location id and poison state to ir::Value. check-in: 1a6405a1c7 user: achavasse tags: trunk
19:54
Cleanup: got rid of the half-assed location and poisoning systems in ir::Terms. check-in: aee388d9c0 user: achavasse tags: trunk
2019-08-08
23:24
Implemented the assignation operator. check-in: 3a2f2c23ab user: achavasse tags: trunk
16:53
  • Implemented the local variable unification rule, which allows to read them.
  • Fixed comparison operators not returning bools.
check-in: c9a44e2fb9 user: achavasse tags: trunk
14:29
Implemented the assignment operator of an expression to a decl of the same type, which declares and initialize a local variable. check-in: 90ab7b489f user: achavasse tags: trunk
09:59
Implemented the localvar builtin type. check-in: 3e177bc8cf user: achavasse tags: trunk
2019-08-07
19:31
Cleanup: removed an unused file. check-in: 45f56c570b user: achavasse tags: trunk
19:10
llr, execute, codegen: implemented the SetVar instruction. check-in: a7d4b38ca5 user: achavasse tags: trunk
17:29
llr, execute, codegen: implemented the AllocVar and GetVar instructions. check-in: b0b8db5e09 user: achavasse tags: trunk
16:07
execute: removed the old local var functions in frame, and reimplemented them using the new temporary system. Function args are now also handled through this. check-in: 391fc3dedd user: achavasse tags: trunk
14:50
codegen: function arguments are now stored in allocas. check-in: e15e6a6e20 user: achavasse tags: trunk
01:56
  • Implemented some missing compile time instruction execution for unsigned ints.
  • C++ integer types are now mapped to fixed size integer types, rather than BigInt, now that the former are available at compile time.
  • The binary shift operators for ct_int now take an uint32 as their right hand side operand, rather than a ct_int.
check-in: a67a742689 user: achavasse tags: trunk
2019-08-06
23:07
Fixed size integers are now supported by compile time execution. check-in: 8714554a92 user: achavasse tags: trunk
22:51
Fixed size integers can now be represented as compile time values. check-in: f469cad435 user: achavasse tags: trunk
22:22
Renamed runtime types, because most of them (except pointers) will have to be available during compile time as well, so their names may as well be generic. check-in: fbc9052f6a user: achavasse tags: trunk
21:31
Updated .ll codegen test files that have changed after updating llvm. check-in: 97f68b01c9 user: achavasse tags: trunk
16:17
Cleanup: use the equality operator in tests now that it is available. check-in: 036f80c021 user: achavasse tags: trunk
16:04
Implemented comparison operators. check-in: 56107a5d5e user: achavasse tags: trunk
15:28
llr, execute, codegen: implemented comparison instructions. check-in: 08d543eea8 user: achavasse tags: trunk
12:15
Implemented arithmetic operators. check-in: d2db15fbbc user: achavasse tags: trunk
11:40
llr, execute, codegen: implemented arithmetic instructions. check-in: 270fa5b77b user: achavasse tags: trunk
00:33
  • Improved the operator parsing rules construction helpers to support both an unary and an infix operators sharing the same identifier.
  • Updated the comma operator implementation to use the same helpers as other operators, which makes it possible to overload it.
check-in: 035cf4826c user: achavasse tags: trunk
2019-08-05
21:14
Fixed shift operators precedence. check-in: 4fe0527143 user: achavasse tags: trunk
21:04
Implemented the shift operators. check-in: 2fdf1d1929 user: achavasse tags: trunk
20:07
Implemented the bitwise not, bitwise and and bitwise or operators. check-in: c7acd1eba0 user: achavasse tags: trunk
19:02
llr, execute, codegen: Implemented the And, Or, Shl, LShr and AShr instructions. check-in: c44aed7937 user: achavasse tags: trunk
17:47
Fixed a typo. check-in: b65e87c8ce user: achavasse tags: trunk
17:46
Implemented a wrapper around llvm::APSInt for compile time integers to manage mixing operations on integers of different bitsizes, and to automatically extend them as needed. check-in: 2bee844d3c user: achavasse tags: trunk
02:45
  • Unification now works in two passes. The second pass gives unification rules a chance to match again after all the holes have been resolved and substituted.
  • Fixed many horrible bugs in various unification rules that managed to go by unnoticed until the above change, after which they made everything catch on fire.
  • Simplified the ct_int and ct_string unification rules to take advantage of the new unification behavior. Everything finally works as intended wrt to ct_int versus RT integers.
  • Removed unification callbacks. It was a system to provide a way to perform unification work post hole substitution, so it is now obsolete.
check-in: 43e22af793 user: achavasse tags: trunk
2019-08-04
12:53
logic ops: forbid xor between runtime integers of different signedness. check-in: 011df3c4d3 user: achavasse tags: trunk
00:38
Improved the vscode syntax highlighting. check-in: e535403270 user: achavasse tags: trunk
00:04
Apply the ct_int unification fix to ct_string unification. check-in: 5a80915ee6 user: achavasse tags: trunk
2019-08-03
23:38
Fixed the ct_int unification rule, which didn't work correctly against generic function parameters. check-in: 18e3bfa195 user: achavasse tags: trunk
19:29
Implemented the runtime bitwise xor operator. check-in: 1886f5f367 user: achavasse tags: trunk
17:16
  • lexer: handle hex and binary integer literals.
  • builtins: implemented the logic and the compile-time bitwise xor operator.
check-in: bd7954bf0c user: achavasse tags: trunk
14:10
Added support for signed runtime integers and fixed multiple issues with ct_integer to runtime integer conversion. check-in: c7b1aea0a6 user: achavasse tags: trunk
12:08
builtins: added a mechanism to customize the patterns used to match parameter types in builtin function, to be able to create builtin generic functions. check-in: 2f3c7d306a user: achavasse tags: trunk
2019-08-02
23:26
Cleanup: removed an unused method. check-in: 69d5b9d0cc user: achavasse tags: trunk
22:35
Implemented the logic and operator. check-in: 7395ea3ffc user: achavasse tags: trunk
22:28
  • Implemented an "inline cfg" llr instruction that transfer execution control to another CFG.
  • Used the above in the logic or operator, which now works.
check-in: 9a6ae2acd0 user: achavasse tags: trunk
14:32
  • Removed ComplexVariable and related support code in llr. This will be replaced with a much better system.
  • Temporaries are now identified both by a cfg identifier, and an index within that cfg.
check-in: de2ecb573c user: achavasse tags: trunk
2019-08-01
22:49
Implemented the logic or operator. Not functional yet due to an architectural flaw. check-in: d939807dfa user: achavasse tags: trunk
21:11
parser: implemented ComplexValue, which is a value bundled with a CFG whose execution or insertion is a prerequisite to use the value. check-in: 79a134aa8e user: achavasse tags: trunk
20:25
  • CFGs keep track of the number of temporaries that they use
  • Temporaries indices are updated when appending a CFG to another, to avoid collisions
  • Phi now stores its result into a new temporary, instead of returning it directly (Phi has to be at the beginning of a basic block so we can't attach it directly to a value)
check-in: 59b1c58c70 user: achavasse tags: trunk
19:35
llr:
  • Added a function to append a CFG at the end of a specific basick block of another CFG.
  • CFGs can now be eagerly evaluated.
check-in: c1a795a64f user: achavasse tags: trunk
16:35
Cleanup: got rid of a bunch of header files that each contained only one function prototype. check-in: cc50e8025d user: achavasse tags: trunk
15:53
  • Rewrote the operator helpers: they now generate and invoke an overloadable intrinsic.
  • Implemented the logical not operator.
check-in: ed31e6303b user: achavasse tags: trunk
13:53
builtins: implemented intrinsic functions. check-in: b15874568f user: achavasse tags: trunk
2019-07-31
23:27
llr, execute, codegen: implemented the Xor instruction. check-in: 5ec364bc88 user: achavasse tags: trunk
22:40
builtins: implemented some helpers to easily create builtin operators with overloadable extension points. check-in: 39f2220e39 user: achavasse tags: trunk
19:06
llr, execute, codegen: added the Phi instruction. check-in: 52f162f30a user: achavasse tags: trunk
17:20
llr, execute, codegen: added the CreateTemporary instruction. check-in: 498281afd4 user: achavasse tags: trunk
16:06
Function's llr representations lifetimes are now handled by Env, and function values only contain raw pointers to their LLR. This is to avoid leaks with recursive functions. check-in: 1effb3a67a user: achavasse tags: trunk
14:05
Fixed some cyclic reference issues with cyclic CFGs:
  • Moved and renamed sema::CFGBuilder to llr::CFG.
  • llr::Func now owns a CFG pointer, rather than a pointer to its entry BB.
  • Branch and CondBranch now store weak pointers to their target BB.
check-in: d19a6bf065 user: achavasse tags: trunk
10:10
Small cleanup. check-in: 4464b9355c user: achavasse tags: trunk
09:35
Created a syntax highlighting vscode extension for .em files. check-in: a311d6a33e user: achavasse tags: trunk
07:50
Minor fixes. check-in: b288174776 user: achavasse tags: trunk
00:07
Compile time integers are now represented with infinite precision by using llvm::APSInt. check-in: 9988bc3dc8 user: achavasse tags: trunk
2019-07-30
22:44
Implemented the #if statement. check-in: 1767c5b87e user: achavasse tags: trunk
22:09
Cleanup. check-in: 527297d900 user: achavasse tags: trunk
22:05
  • Builtin functions are now explicitely marked if they need to be evaluated eagerly.
  • Using errors out if the expression doesn't evaluate to a constant.
check-in: 3c074f1b7d user: achavasse tags: trunk
20:20
Implemented the if statement. check-in: 866b8caaca user: achavasse tags: trunk