aboutsummaryrefslogtreecommitdiff
path: root/src/eval.cpp
AgeCommit message (Collapse)Author
2016-12-17IR: add more instructionsAndrew Kelley
* MaybeWrap * TestErr * UnwrapErrCode * UnwrapErrPayload * ErrUnionTypeChild * ErrWrapCode * ErrWrapPayload
2016-12-08IR: a bunch of fixes and some additionsAndrew Kelley
* add errorName builtin function * add assertion for generated memcopy being on correct types * respect handle_is_ptr for constant values * fix return codegen to respect sret semantics * remove ArrayLen IR instruction; we already have StructFieldPtr with "len" field * fix gen_const_val for pointers inside aggregates
2016-12-07IR: add minValue, maxValue, and negationAndrew Kelley
2016-12-04add missing copyright noticesAndrew Kelley
2016-12-04IR: re-organize where state goes to prepare for genericsAndrew Kelley
* Rip out legacy code for generics * put scope in instruction instead of AST nodes * separate top level decl stuff from AST nodes - remove the assumption that there is a 1:1 correspondence between an output instruction and an AST node - This way we won't have to clone AST nodes for generics.
2016-11-28IR: function call porting progressAndrew Kelley
also implemented container init generics is still todo
2016-11-19IR: implement compileVar builtin and moreAndrew Kelley
* implicit array to slice cast * fix if statements at global scope * implement array type IR
2016-11-17IR: pointers to constants don't copy dataAndrew Kelley
2016-11-17remove superseded eval codeAndrew Kelley
2016-10-09explicit casting works with IRAndrew Kelley
2016-09-28remove compiler directivesAndrew Kelley
* add `setFnTest`, `setFnVisible`, `setFnStaticEval`, `setFnNoInline` builtin functions to replace previous directive functionality * add `coldcc` and `nakedcc` as keywords which can be used as part of a function prototype. * `setDebugSafety` builtin can be used to set debug safety features at a per block scope level. * closes #169
2016-09-26add this keyword refers to thing in immediate scopeAndrew Kelley
See #169
2016-09-26cstr.len and cstr.cmp can run at compile timeAndrew Kelley
closes #140
2016-09-23enums support member functionsAndrew Kelley
2016-09-19use size_t for indexesAndrew Kelley
protect against incorrect copies in debug mode
2016-09-13change `unreachable{}` to `@unreachable()`Andrew Kelley
instead of a container init expression, it's a builtin function call.
2016-09-08ability to infer parameter typesAndrew Kelley
2016-08-29add ability to explicitly cast enum with no payload to intAndrew Kelley
2016-08-29implement null as a literal typeAndrew Kelley
2016-08-08add zeroes valueAndrew Kelley
2016-08-04new multiline string syntaxAndrew Kelley
This patch also moves a bunch of the parser code into the tokenizer. Closes #162.
2016-07-27explicit wrapping integer operationsAndrew Kelley
instead of wrapping integer types closes #159
2016-07-26std: improve rand implementation and APIAndrew Kelley
2016-07-25inline parametersAndrew Kelley
This replaces the current generic syntax for functions and replaces it with the concept of inline parameters. This paves the way for the "all structs anonymous" proposal. Closes #151.
2016-07-17rename NodeTypeStructDecl to NodeTypeContainerDeclAndrew Kelley
2016-07-09ability to cast explicitly from int to enumAndrew Kelley
This commit also fixes a bug where pure functions are marked with the read-only attribute in debug mode. This resulted in incorrect codegen because calls to read-only functions with unused values were not generated. For example, a call to assert() would not be generated if assert is marked with read-only. Which it *is* marked with in release mode.
2016-05-15add int_type builtin functionAndrew Kelley
2016-05-14add compile_err builtinAndrew Kelley
2016-05-09add debug safety for shortening castsAndrew Kelley
closes #150
2016-05-07add div_exact builtin fnAndrew Kelley
closes #149
2016-05-07ability to cast slice to u8 sliceAndrew Kelley
2016-05-07better array concatenation semanticsAndrew Kelley
closes #87
2016-05-06add frame_address and return_address builtinsAndrew Kelley
2016-05-06fix eval integer wrapping and add testsAndrew Kelley
See #46
2016-05-06add shl_with_overflow builtin functionAndrew Kelley
See #46
2016-05-04add fence builtin functionAndrew Kelley
2016-05-04add cmpxchg builtin functionAndrew Kelley
2016-04-28add array multiplication operatorAndrew Kelley
2016-04-24rename unknown_size_array to sliceAndrew Kelley
2016-04-24add skeleton for union supportAndrew Kelley
2016-04-23fix gcc build errorsJosh Wolfe
2016-04-20for loop: add ability to get pointer to elem varAndrew Kelley
see #51
2016-04-19add optional continue expression to while loopAndrew Kelley
closes #139
2016-04-19enum init uses container init syntax instead of fn callAndrew Kelley
See #5
2016-04-18add @embed_file builtin functionAndrew Kelley
2016-04-13eval: support array literalsAndrew Kelley
2016-04-12more eval tests and fix eval call analyze codeAndrew Kelley
2016-04-12add error for dividing by zero in static function evaluationAndrew Kelley
2016-04-12passing all testsAndrew Kelley
2016-04-12eval: ability to eval more thingsAndrew Kelley