summary refs log tree commit diff stats
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* added an .assert pragma and mentioned the pragmas in the changelogAraq2020-04-023-4/+4
|
* fix last remaining warning when building nim (`intVal should be Int128`) + ↵Timothee Cour2020-04-024-47/+29
| | | | minor cleanups (#13841)
* Deprecate when declared(echo):echo (#13840)Juan Carlos2020-04-023-84/+82
|
* fixes #13782 (#13834)Andreas Rumpf2020-04-013-19/+60
|
* Fix tests/types/tparameterizedparent0Zahary Karadjov2020-04-011-1/+1
|
* The raises list can now use expressions referencing the generic paramsZahary Karadjov2020-04-014-5/+16
|
* Turn some of the errors back into warningsZahary Karadjov2020-04-015-18/+30
|
* Replace tfHasRequiresInit with a more accurate mechanismZahary Karadjov2020-04-0110-45/+69
| | | | | | | | | The new mechanism can deal with more complex scenarios such as not nil field appearing in a non-default case object branch or a field within a generic object that may depend on a when branch. The commit also plugs another hole: the user is no longer able to create illegal default values through seq.setLen(N).
* Fix tests/parallel/tguard2.nimZahary Karadjov2020-04-013-3/+5
|
* Fix a CI failure during koch docZahary Karadjov2020-04-011-1/+2
|
* Fix https://github.com/nim-lang/Nim/issues/4907Zahary Karadjov2020-04-012-4/+38
|
* Perform nil checks during object construction and within compiles()Zahary Karadjov2020-04-013-4/+8
| | | | Close https://github.com/nim-lang/Nim/issues/6494
* More precise error messages for uninitialized fields in the presence of ↵Zahary Karadjov2020-04-012-35/+32
| | | | inheritance
* not nil types are illegal to construct through default(T)Zahary Karadjov2020-04-011-0/+2
|
* Turn the warning for uninitialized (result) variables into errorsZahary Karadjov2020-04-016-15/+22
|
* Enable the requiresInit checks only for objectsZahary Karadjov2020-04-012-2/+2
|
* Plug another hole: default(T) forbidden for objects requiring initializationZahary Karadjov2020-04-014-19/+26
|
* Don't allow 'var x: T' for objects that require initializationZahary Karadjov2020-04-013-37/+55
|
* More sophistication; Allow requiresInit to be specified per-fieldZahary Karadjov2020-04-013-15/+30
|
* First steps, the compiler can boot with enforced requiresInitZahary Karadjov2020-04-016-25/+22
|
* make `usage of foo is a user-defined error` more informative (#13833)Timothee Cour2020-04-011-3/+5
|
* fix open file leak when running --debugger:native (#13832)Timothee Cour2020-04-012-6/+16
|
* Add arm/arm64 for FreeBSD (#13822)lbartoletti2020-03-311-1/+1
| | | | | * Add arm and arm64 for FreeBSD * Add arm64 with aarch64 and reorder to avoid conflict with arm
* DrNim (Nim compiler with Z3 integration) (#13743)Andreas Rumpf2020-03-3112-27/+178
| | | | | | | | | | | | | | | | | | | | | | | | * code cleanups and feature additions * added basic test and koch/CI integration * make it build on Unix * DrNim: now buildable on Unix, only takes 10 minutes, enjoy * added basic documentation for DrNim which can also be seen as the RFC we're following * drnim: change the build setup so that drnim.exe ends up in bin/ * makes simple floating point ranges work * added basic float range check * drnim: teach Z3 about Nim's range types plus code refactoring * drnim: make unsigned numbers work * added and fixed index checking under setLen * first implementation of .ensures, .invariant and .assume (.requires still missing and so is proc type compatibility checking * drnim: .requires checking implemented * drnim: implemented .ensures properly * more impressive test involving min() * drnim: check for proc type compatibility and base method compatibility wrt .requires and .ensures * testament: support for 'pattern <directory> * koch: uses new <directory> feature of testament * drnim: added tiny musings about 'old' * Make testament work with old SSL versions * koch: add support for 'koch drnim -d:release' * drnim: preparations for the param.old notation
* fixes #13810 (#13821)cooldome2020-03-311-1/+1
| | | Co-authored-by: cooldome <ariabushenko@bk.ru>
* macros for proc types, macros for types (#13778)Andreas Rumpf2020-03-313-95/+134
| | | | | | | | | * new minor feature: macros for proc types, to be documented * Finished the implementation and added tests * [skip ci] Describe the new custom pragmas in the manual and the changelog Co-authored-by: Zahary Karadjov <zahary@gmail.com>
* stacktraces can now show custom runtime msgs per frame (#13351)Timothee Cour2020-03-304-2/+12
| | | | | | | | * stacktraces can now show custom runtime msgs * improve tests/stdlib/tstackframes.nim * fix test for --gc:arc * test --stacktraceMsgs:on and --stacktraceMsgs:off * --stacktracemsgs:off by default
* '.push raises: []' now also affects proc types (#13776)Andreas Rumpf2020-03-294-3/+11
| | | | | | | | | * '.push raises: []' now also affects proc types * fixes the regression * less disruptive bugfix * another attempt
* fix #13730 (#13787)Timothee Cour2020-03-281-2/+6
|
* fixes #13763 (#13777)Andreas Rumpf2020-03-272-1/+10
|
* make nim_temp compile with --gc:arc --sinkInference:off (#13769)cooldome2020-03-261-1/+1
| | | | | | | * make nim_temp compiler with --gc:arc * trigger build Co-authored-by: cooldome <ariabushenko@bk.ru>
* Fix vm.nim for --gc:arc (#13741)Clyybber2020-03-263-41/+30
| | | | | | | | | | | | | * koch boot --gc:arc now passes the nim stage ... but generates invalid C code * Move it closer to where its used * Try something else * Poor mans var * Use UncheckedArray instead
* Fix typeSym.getImpl for ref types (#13752)zah2020-03-263-6/+6
| | | | | | | | | | | | | | | | | | | | | * Fix typeSym.getImpl for ref types * Fix a codegen issue affecting the test suite of nim-beacon-chain * Fix tests/stdlib/tjsonmacro To understand the fix better it may help to take a look at the history of the replaced code. The nil check that is removed in this commit was introduced in another fix that failed to identify the root cause of the issue - namely that we allow an object type to exist for which no ast is present: https://github.com/nim-lang/Nim/pull/9601/files The original intention of the code is more obvious here: https://github.com/nim-lang/Nim/pull/9538/files
* Continue bool conversion fixing (#13751)cooldome2020-03-252-1/+12
| | | | | | | | | * continue fixing #13744 * improve style * improve test Co-authored-by: cooldome <ariabushenko@bk.ru>
* bump copyright year to 2020 (#13753)Miran2020-03-251-1/+1
|
* fixes #13744 (#13749)cooldome2020-03-253-1/+9
| | | | | | | * fixes #13744 * improve style Co-authored-by: cooldome <ariabushenko@gmail.ru>
* fix #13737 (#13738)Timothee Cour2020-03-241-1/+2
|
* fixes #13722 (#13729)Andreas Rumpf2020-03-231-1/+1
| | | | | * fixes #13722 * better fix
* trees.nim: compare floating points by their bitpatterns because NaN ↵Araq2020-03-231-1/+1
| | | | comparisions are always false (WORST design in the history of computing!)
* disable even more of scope based destruction handling; fixes #13709Araq2020-03-231-7/+98
|
* trees.nim: compare floating points by their bitpatterns because NaN ↵Araq2020-03-231-1/+1
| | | | comparisions are always false (WORST design in the history of computing!)
* new syntax for lvalue references: `var b {.byaddr.} = expr` (#13508)Timothee Cour2020-03-231-0/+46
| | | | | | | | * new syntax for lvalue references: `var b {.byaddr.} = expr` * on type mismatch, `???(0, 0)` not shown anymore * * compiler now lowers `var a: {.foo.}: MyType = expr` to foo(a, MyType, expr) * new pragmas.byaddr defined in pure library code exploiting this lowering * skip `template foo() {.pragma.}`
* Revert "fix #13417 (#13712)" (#13728)Andreas Rumpf2020-03-231-10/+11
| | | This reverts commit a5f02cac85281fc2804e910f330f0c11d3c4f77b.
* better error messages for Nim's effect systemAraq2020-03-222-20/+43
|
* fix #13417 (#13712)Arne Döring2020-03-221-11/+10
| | | | | * fix #13417 * add test
* fixes #13715 (#13716)Arne Döring2020-03-221-1/+4
| | | | | * fixes #13715 * fix test
* typoAraq2020-03-221-1/+1
|
* fix #13720 (#13721)Arne Döring2020-03-221-1/+1
|
* fixes #13708 (#13711)cooldome2020-03-212-10/+20
| | | | | | * fixes #13708 * differentiate between arc and rest of GC Co-authored-by: cooldome <ariabushenko@bk.ru>
* [RFC] 'walkDir' now has a new 'checkDir' flag, to mimic behaviour of other ↵Timothee Cour2020-03-201-1/+1
| | | | | languages (#13642) Co-authored-by: narimiran