summary refs log tree commit diff stats
path: root/compiler/sem.nim
Commit message (Collapse)AuthorAgeFilesLines
* misc cleanups in compiler msgs: use toHumanStr, etc (#14677)Timothee Cour2020-06-151-4/+2
|
* * honor --errorMax even for tools (eg drnim, nim doc) (#14546)Timothee Cour2020-06-021-1/+1
| | | * fix a bug that prevented nim doc compiler/nim on windows
* disallow typedesc in arrays & move existing checks to `types.typeAllowedAux` ↵Neelesh Chandola2020-05-291-5/+7
| | | | | | (#13261) * disallow typedesc in arrays and move previous checks to types.typeAllowedAux
* Make ./koch temp --gc:arc work (#14186)Clyybber2020-05-011-2/+5
|
* implement (#14114)cooldome2020-04-251-8/+3
| | | Co-authored-by: cooldome <ariabushenko@bk.ru>
* The raises list can now use expressions referencing the generic paramsZahary Karadjov2020-04-011-0/+1
|
* Replace tfHasRequiresInit with a more accurate mechanismZahary Karadjov2020-04-011-1/+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).
* Perform nil checks during object construction and within compiles()Zahary Karadjov2020-04-011-1/+1
| | | | Close https://github.com/nim-lang/Nim/issues/6494
* Plug another hole: default(T) forbidden for objects requiring initializationZahary Karadjov2020-04-011-18/+1
|
* Don't allow 'var x: T' for objects that require initializationZahary Karadjov2020-04-011-0/+18
|
* EndsInNoReturn in expressions extension, fixes #13490 (#13520)cooldome2020-02-281-1/+1
| | | | * fix #13490
* fixes #12627 (#13521)cooldome2020-02-281-1/+1
| | | | * fixes #12627
* make case-object transitions explicit, make unknownLineInfo a const, replace ↵Jasper Jenkins2020-01-171-1/+1
| | | | a few magic numbers with consts (#13170)
* remove all remaining warnings when build nim (with -d:nimHasLibFFI) (#13084)Timothee Cour2020-01-091-1/+1
| | | | | | * cleanup deprecations in evalffi + elsewhere * remove dead code getOrdValue64
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-18/+17
| | | | | | | | | | | | | | | | | | * 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
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-1/+1
| | | | | * Remove sonsLen * Use Indexable
* fixes #11941 (#12079)Andreas Rumpf2019-08-291-2/+7
|
* lift destructor for openarray (#12073)cooldome2019-08-281-6/+4
| | | | * destroy for sink openarray
* Fix several float range issues (supersedes #11905) (#12067)Andreas Rumpf2019-08-271-0/+1
|\ | | | | | | | | | | * Fix several float range issues * address the comments
| * address the commentsnarimiran2019-08-271-0/+1
| |
* | fixes #12029; finish the 'unused import' feature (#12064)Andreas Rumpf2019-08-271-1/+2
|/
* [refactoring] compiler: simplified markUsedAndreas Rumpf2019-08-081-1/+1
|
* IC: some progressAndreas Rumpf2019-07-271-6/+0
|
* revert changesAndrii Riabushenko2019-07-251-2/+2
|
* fixes #11826Andrii Riabushenko2019-07-251-2/+2
|
* Merge branch 'devel' into araq-detect-unused-importsAndreas Rumpf2019-07-181-4/+4
|\
| * [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-4/+4
| |
* | warn about unused imports; fixes an 'export' regression [nobackport]Andreas Rumpf2019-07-181-1/+1
| |
* | [feature] detect unused importsAraq2019-07-171-1/+6
|/
* [refactoring] moves transformation for 'spawn' into its own spawn.nim ↵Araq2019-07-141-1/+1
| | | | implementation
* introduce internal Int128 type, use it to fix case stmt checks (#11652)Arne Döring2019-07-051-1/+1
| | | | | | * initial version of int128 * use int128 in case stmt * fixes #11552
* Remove immediate pragma (#11308)Arne Döring2019-05-291-2/+1
| | | | | * remove immediate from tests * remove immediate from the compiler
* new compiler feature: --expandMacroAraq2019-05-291-1/+3
|
* Allow void macro result (#11286)Arne Döring2019-05-211-4/+3
| | | | | * allow void macro result * add test for void macro result type
* rename tyExpr/tyStmt to tyUntyped/tyTyped (#11227)Arne Döring2019-05-111-9/+9
|
* Replace countup(x, y-1) with x ..< yClyybber2019-05-071-1/+1
|
* more destructor based changes (#10885)Andreas Rumpf2019-03-231-1/+1
| | | | | | | | | | | * mark user defined destructors with sfOverriden to simplify the logic * refactoring in preparation to merge liftings and generic instantiations for destructors * ast: introduce nkHiddenTryStmt for destructor generation in order to be able to optimize better the code later on * renamed 'patterns' switch to 'trmacros' as it was totally misleading before * destructors: introduce tfCheckedForDestructor flag in preparation of strict =destroy checking * test for invalid/too late destructor introductions * liftdestructors: make code robust for nimsuggest * --newruntime works for hello world again * newruntime: code generation for closures
* compiler/sem: correct macros lineinfo (#10438)alaviss2019-01-241-4/+5
| | | | | | | | | The compiler believes these are where a macro call starts (marked with `^`): m "string" ^ ^ This commit addresses that.
* Fix defer not not-working at top level (#10191)Neelesh Chandola2019-01-071-2/+0
|
* fixes nested gensym'ed parameters; fixes #9476Araq2018-12-081-5/+6
|
* Destructors: more moves for tuples (#9808)cooldome2018-11-271-1/+1
|
* added first version of a nimfind tool for the poor souls that don't have a ↵Andreas Rumpf2018-11-141-2/+2
| | | | good nimsuggest integretation
* make Nim take roughly 100MB less RAM for bootstrapping via a new compiler ↵Andreas Rumpf2018-11-071-1/+4
| | | | switch -d:leanCompiler; useful for the Raberry PI
* Change the order of compilation passes, transformation is made lazy at code ↵cooldome2018-10-181-1/+1
| | | | | | | | | | | | | | | gen (#8489) * Ast no transformation * Add getImplNoTransform to the macros module * progress on delaying transf * Fix methods tranformation * Fix lazy lambdalifting * fix create thread wrapper * transform for lambda lifting * improve getImplTransformed * Fix destructor tests * try to fix nimprof for linux
* compiler: show name of instantiating context in error traces (#6763) (#9207)xzfc2018-10-111-1/+1
|
* Make the registered passes local to the ModuleGraph (#9259)LemonBoy2018-10-091-1/+1
| | | Closes #9068
* make tests green againAndreas Rumpf2018-09-241-2/+10
|
* extended system.type/typeof to support an upcoming 'collect' macro that ↵Andreas Rumpf2018-09-111-4/+4
| | | | works much better than sugar.lc
* change runnableExamples implementation; fixes #8641; fixes #7135; ↵Andreas Rumpf2018-09-021-23/+0
| | | | runnableExamples works for templates and generics
* WIP: disallow 'nil' for strings and seqsAndreas Rumpf2018-08-131-1/+1
|