summary refs log tree commit diff stats
path: root/compiler/sempass2.nim
Commit message (Collapse)AuthorAgeFilesLines
* fix #14314 do not analyze importc procs for effects (#14319)Timothee Cour2020-05-121-1/+6
|
* do not track 'raise Defect' in the .raises: [] clause anymore (#14298)Andreas Rumpf2020-05-111-1/+4
| | | | | | | | | * do not track 'raise Defect' in the .raises: [] clause anymore * --panics:on maps 'raise Defect' to an unrecoverable fatal error * make tests green again * update the documentation too
* fixes #14177Araq2020-05-021-2/+3
|
* fixes #14079 [backport:1.2] (#14163)Andreas Rumpf2020-04-291-1/+2
|
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-281-1/+1
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* drnim: tiny progress (#13882)Andreas Rumpf2020-04-151-61/+22
| | | | | | | | | | | * drnim: tiny progress * refactoring complete * drnim: prove .ensures annotations * Moved code around to avoid code duplication * drnim: first implementation of the 'old' property * drnim: be precise about the assignment statement * first implementation of --assumeUnique * progress on forall/exists handling
* added an .assert pragma and mentioned the pragmas in the changelogAraq2020-04-021-1/+1
|
* The raises list can now use expressions referencing the generic paramsZahary Karadjov2020-04-011-1/+6
|
* Turn some of the errors back into warningsZahary Karadjov2020-04-011-3/+3
|
* Replace tfHasRequiresInit with a more accurate mechanismZahary Karadjov2020-04-011-3/+3
| | | | | | | | | 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 a CI failure during koch docZahary Karadjov2020-04-011-1/+2
|
* Perform nil checks during object construction and within compiles()Zahary Karadjov2020-04-011-2/+3
| | | | Close https://github.com/nim-lang/Nim/issues/6494
* Turn the warning for uninitialized (result) variables into errorsZahary Karadjov2020-04-011-9/+8
|
* First steps, the compiler can boot with enforced requiresInitZahary Karadjov2020-04-011-4/+4
|
* DrNim (Nim compiler with Z3 integration) (#13743)Andreas Rumpf2020-03-311-16/+94
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* better error messages for Nim's effect systemAraq2020-03-221-20/+26
|
* cycle breaker (#13593)Andreas Rumpf2020-03-191-1/+9
| | | | * cycle breaking as an alternative to cycle detection
* new feature: --staticBoundChecks:on to enforce static array index checking ↵Andreas Rumpf2020-03-181-1/+66
| | | | (#10965)
* sink parameter inference for types that have destructors (#13544)Andreas Rumpf2020-03-041-3/+19
| | | | | | | | | | | | | | * ensure capitalize doesn't take an inferred sink parameter * sink parameter inference: first version, for now disabled. Changed that sink parameters can be consumed multiple times in order to adhere to our spec. * sink inference can now be disabled with .nosinks; sometimes for proc type interop this is required * fixes yet another critical DFA bug * better implementation that also understands if expressions etc * document sink parameter inference and allow for global disabling
* fix #8312 --hints:off and --warnings:off now honored everywhere (#13489)Timothee Cour2020-02-261-7/+7
|
* fixes #13110 (#13197)Andreas Rumpf2020-01-191-1/+11
|
* fixes #13119 (#13128)Andreas Rumpf2020-01-141-2/+8
| | | | | * fixes #13119 * fixes a regression
* more arc features (#13098)Andreas Rumpf2020-01-101-0/+1
| | | | | * config update * ARC now supports 'repr' and 'new' with finalizers is supported
* Fixes #13026 (#13028)cooldome2020-01-041-1/+1
|
* --exception:goto switch for deterministic exception handling (#12977)Andreas Rumpf2020-01-011-3/+1
| | | | | This implements "deterministic" exception handling for Nim based on goto instead of setjmp. This means raising an exception is much cheaper than in C++'s table based implementations. Supports hard realtime systems. Default for --gc:arc and the C target because it's generally a good idea and arc is all about deterministic behavior. Note: This implies that fatal runtime traps are not catchable anymore! This needs to be documented.
* minor refactoringsAndreas Rumpf2019-12-271-0/+2
|
* ARC: cycle detector (#12823)Andreas Rumpf2019-12-171-0/+3
| | | | | | | | | | | | | * first implementation of the =trace and =dispose hooks for the cycle collector * a cycle collector for ARC: progress * manual: the .acyclic pragma is a thing once again * gcbench: adaptations for --gc:arc * enable valgrind tests for the strutils tests * testament: better valgrind support * ARC refactoring: growable jumpstacks * ARC cycle detector: non-recursive algorithm * moved and renamed core/ files back to system/ * refactoring: --gc:arc vs --gc:orc since 'orc' is even more experimental and we want to ship --gc:arc soonish
* Fixes #12883 (#12894)cooldome2019-12-131-0/+13
| | | | | | | | | | * fixes #12883 * fix comment * add normalize * fix
* invoke createTypeBoundOps for constructors (#12878)cooldome2019-12-111-0/+7
|
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-123/+121
| | | | | | | | | | | | | | | | | | * Cleanup compiler code base * Unify add calls * Unify len invocations * Unify range operators * Fix oversight * Remove {.procvar.} pragma * initCandidate -> newCandidate where reasonable * Unify safeLen calls
* ARC: ported the GC tests over to --gc:arcAraq2019-11-261-0/+1
|
* ARC: yet another silly bugfixAraq2019-11-221-0/+2
|
* more arc improvements (#12690)Andreas Rumpf2019-11-201-1/+4
| | | | | * ARC: bugfix for =destroy for inherited objects * added code useful for debugging
* ARC: closure bugfixes (#12677)Andreas Rumpf2019-11-181-2/+5
| | | | | | | | * ARC: closure bugfixes * progress * ARC closures: create =hooks for captured parameters * ARC: always destroy constructions like tuples, arrays properly, even in edge cases * fixes a regression
* ARC: solves phase ordering problems (#12654)Andreas Rumpf2019-11-141-10/+16
|
* remove unused importsnarimiran2019-11-061-3/+0
|
* fixes #12281 [backport]Andreas Rumpf2019-09-301-1/+3
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* gc:destructors progressAndreas Rumpf2019-09-161-0/+1
|
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-3/+3
| | | | | * Remove sonsLen * Use Indexable
* fixes #11254Araq2019-08-121-1/+9
|
* revert changesAndrii Riabushenko2019-07-251-15/+15
|
* fixes #11826Andrii Riabushenko2019-07-251-15/+15
|
* [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-1/+1
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-7/+7
| | | | --styleCheck:error
* fixes #11628Araq2019-07-011-0/+1
|
* [refactoring] liftdestructors.nim is callable from lambdalifting; refs #11217Araq2019-06-121-8/+8
|
* [refactoring] liftdestructors is now a module of its ownAraq2019-06-121-1/+1
|
* fixes #8053Araq2019-05-151-1/+2
|
* Replace countup(x, y) with x .. yClyybber2019-05-071-1/+1
|