Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
126 check-ins using file bs/sema/substitute.cpp version c179d0d5b3
|
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 |
| |
| 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 |
| |
| 14:32 |
| |
|
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 |
| |
| 19:35 |
llr:
| |
| 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 |
| |
| 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:
| |
| 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 |
| |
| 20:20 | Implemented the if statement. check-in: 866b8caaca user: achavasse tags: trunk | |
| 14:25 | parser: setup proper visibility rules for nested brace blocks. check-in: 09150fdc1c user: achavasse tags: trunk | |
| 13:20 | sema: extended cfgbuilder to handle multiple basic blocks. check-in: d3d40f668d user: achavasse tags: trunk | |
| 12:46 | llr, execute, codegen: implemented Branch and CondBranch. check-in: 3c78ba6139 user: achavasse tags: trunk | |
|
2019-07-29
| ||
| 20:01 | Implemented the builtin bool type, cleaned up things here and there by making use of it. check-in: e6ed8750c4 user: achavasse tags: trunk | |
| 16:40 | frontend: use the source filename as the module name. check-in: 71dce5b655 user: achavasse tags: trunk | |
| 16:11 | First rudimentary version of the front-end. Added a more civilized hello world sample. check-in: c73275098a user: achavasse tags: trunk | |
| 15:50 | In preparation to implement the first version of the front end, made the current direct file execution behavior available through a special command line options, to keep the current tests working. check-in: c34657ae47 user: achavasse tags: trunk | |
| 15:35 | Builtins: added a couple of builtin utility string functions needed to bring up the frontend. check-in: de781b5a85 user: achavasse tags: trunk | |
| 14:44 | Embedded lld and added builtin functions to invoke it. The shitty hello world sample now performs all the steps to produce a functional binary. check-in: 16a9039350 user: achavasse tags: trunk | |
| 01:15 |
| |
|
2019-07-28
| ||
| 17:22 | codegen: added functions to set the target for a module, and to output a module either as an asm or as an object file. check-in: 0d6a77f7ab user: achavasse tags: trunk | |
|
2019-07-27
| ||
| 15:20 | codegen: added a function to run the LLVM optimization passes on a module (with default optimization settings for the time being). check-in: db120ccb3a user: achavasse tags: trunk | |
| 13:08 | Updated a test reference file. check-in: f93a7e7cb4 user: achavasse tags: trunk | |
| 13:04 | Implemented external runtime functions. check-in: 6a99df8278 user: achavasse tags: trunk | |
|
2019-07-26
| ||
| 23:52 |
| |
| 22:30 |
| |
| 18:33 | llr, codegen: implemented "load constant" instructions for integers and strings. check-in: 443351dafe user: achavasse tags: trunk | |
| 16:57 | codegen: generate basic blocks. check-in: 8574428775 user: achavasse tags: trunk | |
| 13:41 |
llr:
| |
| 09:28 | Added license file. check-in: 7ae7a08ed3 user: achavasse tags: trunk | |
| 02:14 | codegen: generate correct function types. check-in: 5c095a9872 user: achavasse tags: trunk | |
| 01:50 | Fix the Env never being deleted due to captured shared_ptr in some builtin functions which created reference cycles. check-in: 1eb3c4a890 user: achavasse tags: trunk | |
|
2019-07-25
| ||
| 22:30 | Enable ThinLTO. check-in: cd65a705fd user: achavasse tags: trunk | |
| 22:17 | codegen: handle function types in LowerType(). check-in: 8816e0b6e9 user: achavasse tags: trunk | |
| 15:50 | builtins: extend GetLLVMType() to handle function types. check-in: eb91eeb361 user: achavasse tags: trunk | |
| 15:37 | builtins: llvm types are now built and stored at a standard location in the ir expressions of runtime types. check-in: 3f9a7b5082 user: achavasse tags: trunk | |
| 14:09 | Have the llvm context be a static instance instead of being owned by the Env object, so that we can access it anywhere. check-in: c5a38bbeae user: achavasse tags: trunk | |
|
2019-07-24
| ||
| 20:15 | func type: change the term encoding to include a void pointer that will be used to link to the function's llvm type, if any. check-in: 403761ee88 user: achavasse tags: trunk | |
| 11:41 | codegen: revised mangling, allow opaque pointers to be mangled since they are going to appear in native type identities, even though we don't care about what they point to for that purpose. check-in: 86893043c5 user: achavasse tags: trunk | |
| 11:03 |
ir:
| |
|
2019-07-23
| ||
| 19:44 | codegen: implemented LowerType. check-in: e42ae3d514 user: achavasse tags: trunk | |
| 19:02 | Moved overloadset's implementation into sema, as we'll need to keep pointers to some of them (used as extension points) in env. check-in: f8f1fcd169 user: achavasse tags: trunk | |
| 13:44 | execute: added an execution limit on calls and branch instructions to be able to time out of non-terminating compile time code. check-in: f0b3b44bbb user: achavasse tags: trunk | |
|
2019-07-22
| ||
| 15:36 | builtins: added a function to test whether a type is a runtime type. check-in: 138905cf4e user: achavasse tags: trunk | |
| 14:50 | builtins: runtime types: added a common prefix to easily be able to check if a type is a runtime type. check-in: 64244c6d0c user: achavasse tags: trunk | |
| 13:15 | Added a helper to perform a compile time OverloadSet invocation. check-in: c768853a4f user: achavasse tags: trunk | |
| 12:50 | builtins: added a helper to create and register an empty OverloadSet, to serve as extension points for the library. check-in: f10b5377f7 user: achavasse tags: trunk | |
|
2019-07-21
| ||
| 23:48 | Bumped llvm version. check-in: 8648053c0d user: achavasse tags: trunk | |
|
2019-07-16
| ||
| 20:06 |
builtins:
| |
|
2019-07-15
| ||
| 21:58 | builtins: added definitions for runtime array type. check-in: eade11527c user: achavasse tags: trunk | |
| 21:43 | builtins: added definitions for runtime pointer type. check-in: 84b541f45b user: achavasse tags: trunk | |
| 21:13 | sema: removed a couple of superfluous rule lookups when resolving an invocation. check-in: c7da710bb0 user: achavasse tags: trunk | |
| 20:21 | builtins: added definitions for basic runtime types. check-in: 54b8960363 user: achavasse tags: trunk | |
| 19:10 | builtins: renamed int and string to ct_int and ct_string to distinguish them from the future runtime and user facing types. In the end there should be little to no reason to ever use these types directly outside of the library anyway. check-in: f40cfaed57 user: achavasse tags: trunk | |
|
2019-07-14
| ||
| 19:29 |
codegen:
| |
|
2019-07-13
| ||
| 23:30 |
| |
| 19:33 | codegen: very first draft of function generation. check-in: 98a6fcaf3f user: achavasse tags: trunk | |
|
2019-07-12
| ||
| 20:58 | codegen: implemented mangling. check-in: f97c0b2cab user: achavasse tags: trunk | |
|
2019-07-11
| ||
| 19:32 | Allow overloading of builtin functions. check-in: bff15eb03d user: achavasse tags: trunk | |
|
2019-07-09
| ||
| 22:46 | codegen: added builtin functions to create a module and to dump it as llvm assembly text. check-in: 429f55ae3c user: achavasse tags: trunk | |
| 21:14 | Began the implementation of the code generator. check-in: c3a5885c4f user: achavasse tags: trunk | |
|
2019-07-08
| ||
| 19:40 | Implemented parsing rules for function domain specifiers, and fixed a couple of related bugs. check-in: b39d1cbe9a user: achavasse tags: trunk | |
|
2019-07-07
| ||
| 16:22 | Parser: parse function type modifiers. check-in: 105ba83ebf user: achavasse tags: trunk | |
| 10:33 | Parser: refactored function and template function parsing to go through a common code path to build function types. check-in: 5fd301c5f9 user: achavasse tags: trunk | |
|
2019-07-06
| ||
| 13:27 | Cleanup: remove a superfluous argument from BuildFunc(). check-in: f0724b61e5 user: achavasse tags: trunk | |
|
2019-06-29
| ||
| 14:36 | Handle execution domains when invoking/unifying functions, template functions, overload sets and constrained funcs. check-in: 2acce94d2d user: achavasse tags: trunk | |
| 13:43 | Build fixes to work with the latest git version of libc++. check-in: 326d403e6c user: achavasse tags: trunk | |
| 11:40 | Added a domain specifier in function and template function types. check-in: ef1e94f44d user: achavasse tags: trunk | |
|
2019-06-27
| ||
| 19:37 | sema: fixed a context creation mistake when resolving an invocation. check-in: 48ee263157 user: achavasse tags: trunk | |
| 19:30 | sema: when resolving an invocation, attempt first to resolve it as a compile time invocation when applicable. check-in: c046a7f803 user: achavasse tags: trunk | |
|
2019-06-23
| ||
| 14:01 | Functions are now recompiled for different execution domains as needed. check-in: 25e7ce2c8c user: achavasse tags: trunk | |
|
2019-06-22
| ||
| 15:00 | Func: functions can be stored in an invalid state which means they couldn't be compiled for a given domain, but still contain enough information to compile/retrieve that function for a different domain. check-in: 87068d0fe8 user: achavasse tags: trunk | |
|
2019-06-21
| ||
| 18:22 | Domains: setup correct identity domains in a few places. check-in: aaa9d75b0c user: achavasse tags: trunk | |
|
2019-06-19
| ||
| 19:49 |
| |
|
2019-06-18
| ||
| 21:44 | Added some helper functions for domains and identities. check-in: a15bdabfec user: achavasse tags: trunk | |
|
2019-06-17
| ||
| 22:00 | Pass the sema context to ParseFuncBody(), rather than just the env. check-in: 9320a3b76f user: achavasse tags: trunk | |
|
2019-06-16
| ||
| 14:41 | Added the current domain to sema context, and include it in function identities. check-in: 7e053c8063 user: achavasse tags: trunk | |
|
2019-05-25
| ||
| 10:44 | Domains: refactored functions to use the new representation. check-in: cf3bb178ea user: achavasse tags: trunk | |
|
2019-05-22
| ||
| 21:35 | Execution domains: created a new representation for function values that contains enough informations to retrieve or build the same function for a different execution domain. check-in: cd9b67cf09 user: achavasse tags: trunk | |
|
2019-05-04
| ||
| 21:04 | Cleanup: make use of c++20 explicit lambda template parameter lists to get rid of some clunky decltype(). check-in: 980e2740bc user: achavasse tags: trunk | |
|
2019-04-14
| ||
| 20:10 | Small cleanup. check-in: 26ee86b2dd user: achavasse tags: trunk | |
| 18:43 | Allow any texpr to be used as a function parameter, so we can write a generic parameter as just $a instead of $t $a if we don't care about capturing its type. check-in: da786f812f user: achavasse tags: trunk | |
| 17:30 | Fixed a test name. check-in: 0ca4414e9d user: achavasse tags: trunk | |
| 17:22 | Added tests for higher order template functions, and higher order polymorphism. check-in: 185f783a15 user: achavasse tags: trunk | |
| 17:07 | Added tests for higher order functions, and fixed some previously missed bugs. check-in: 31e4e0e834 user: achavasse tags: trunk | |
| 15:18 | Added tests for overloading and template functions. check-in: fa01f562ca user: achavasse tags: trunk | |
| 14:57 | Removed the ct_ prefix from the compile time int and string types for now. It's ugly and we don't need to decide on their names until starting library work anyway. check-in: 2b1598932c user: achavasse tags: trunk | |
| 14:53 | Fixed a few bugs and started to turn the haphazard test code into proper, automated tests of the core language features. check-in: f78ccdd8a8 user: achavasse tags: trunk | |
|
2019-04-13
| ||
| 22:03 | api: added a builtin Execute command, which executes the specified file. Also added the possibility to optionally return an error code. check-in: 47708770e6 user: achavasse tags: trunk | |
| 10:55 | Started a first version of a minimal compile time api to be able to implement proper automated testing of the language features. check-in: b2a8a8ad0b user: achavasse tags: trunk | |
|
2019-04-12
| ||
| 19:37 |
| |
|
2019-04-11
| ||
| 19:11 | llr: add Ret element. check-in: 82591a0918 user: achavasse tags: trunk | |
|
2019-04-09
| ||
| 21:38 | Higher order polymorphism: changed the representation of constrained func to be explicit instead of just an opaque pointer, so that it can be used as is within function identities. check-in: b7fd77d885 user: achavasse tags: trunk | |
| 20:15 | Standardize the way function identities are generated, and give overload sets their own identities. This will be necessary to generate proper identities for template functions instanced with polymorphic parameters. check-in: da8245add8 user: achavasse tags: trunk | |
|
2019-04-08
| ||
| 22:15 | Compare the addresses of pvoid once again in compare to match the behavior of pvoid stored in tries. That change wasn't actually needed anyway. check-in: 0a9cac94de user: achavasse tags: trunk | |
| 21:39 | func: move the identity back into the llr func, as we will need it some day to generate a label for the code generation. check-in: a307741bd9 user: achavasse tags: trunk | |
| 20:29 | Higher order polymorphism: fix non-callable template lambdas passed as a generic compile-time parameter. check-in: 007891dc2f user: achavasse tags: trunk | |
|
2019-04-06
| ||
| 15:19 | Higher order polymorphism: implemented the unification of a polymorphic tfunc type param with an overload set. check-in: 2f27622539 user: achavasse tags: trunk | |
| 14:16 |
| |
|
2019-04-04
| ||
| 20:08 | Higher order polymorphism: refactored TDecl to use its own representation as its signature. check-in: f5fb53ad20 user: achavasse tags: trunk | |
|
2019-04-03
| ||
| 20:56 | Higher order polymorphism: overloadset and tfunc invocation no longer consider multiple unification solutions with the same score to be ambiguous if they are actually the same solution. check-in: be53d55f67 user: achavasse tags: trunk | |
|
2019-04-02
| ||
| 20:38 | Higher order polymorphism: implemented ConstrainedFunc unification. check-in: f6c1df5107 user: achavasse tags: trunk | |
|
2019-04-01
| ||
| 20:37 | sema: implemented SubstituteNamed. check-in: 121c78d7e5 user: achavasse tags: trunk | |