summary refs log tree commit diff stats
path: root/compiler/vmdeps.nim
Commit message (Collapse)AuthorAgeFilesLines
* remove fauxMatch for tyFromExpr, remove tyProxy and tyUnknown aliases (#24018)metagn2024-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | updated version of #22193 After #22029 and the followups #23983 and #24005 which fixed issues with it, `tyFromExpr` no longer match any proc params in generic type bodies but delay all non-matching calls until the type is instantiated. Previously the mechanism `fauxMatch` was used to pretend that any failing match against `tyFromExpr` actually matched, but prevented the instantiation of the type until later. Since this mechanism is not needed anymore for `tyFromExpr`, it is now only used for `tyError` to prevent cascading errors and changed to a bool field for simplicity. A change in `semtypes` was also needed to prevent calling `fitNode` on default param values resolving to type `tyFromExpr` in generic procs for params with non-generic types, as this would try to coerce the expression into a concrete type when it can't be instantiated yet. The aliases `tyProxy` and `tyUnknown` for `tyError` and `tyFromExpr` are also removed for uniformity.
* type refactor: part 4 (#23077)Andreas Rumpf2023-12-151-11/+11
|
* type graph refactor; part 3 (#23064)Andreas Rumpf2023-12-141-1/+1
|
* type refactoring: part 2 (#23059)Andreas Rumpf2023-12-131-14/+14
|
* Types: Refactorings; step 1 (#23055)Andreas Rumpf2023-12-121-12/+12
|
* IC: progress and refactorings (#22961)Andreas Rumpf2023-11-201-3/+3
|
* prepare for the enforcement of `std` prefix (#22873)ringabout2023-10-291-1/+3
| | | follow up https://github.com/nim-lang/Nim/pull/22851
* make getType nodes of generic insts have full inst type (#22655)metagn2023-09-071-0/+4
| | | | | | | | | | | | | fixes #22639 for the third time Nodes generated by `getType` for `tyGenericInst` types, instead of having the original `tyGenericInst` type, will have the type of the last child (due to the `mapTypeToAst` calls which set the type to the given argument). This will cause subsequent `getType` calls to lose information and think it's OK to use the sym of the instantiated type rather than fully expand the generic instantiation. To prevent this, update the type of the node from the `mapTypeToAst` calls to the full generic instantiation type.
* unpublic the sons field of PType; the precursor to PType refactorings (#22446)ringabout2023-08-111-1/+1
| | | | | | | | | | | * unpublic the sons field of PType * tiny fixes * fixes an omittance * fixes IC * fixes
* refactoring in preparation for better, simpler name mangling that wor… ↵Andreas Rumpf2023-04-241-1/+1
| | | | | | | | | | | (#21667) * refactoring in preparation for better, simpler name mangling that works with IC flawlessly * use new disamb field * see if this makes tests green * make tests green again
* move assertions out of system (#19599)flywind2022-03-231-0/+3
|
* getType now works with tyInferred (arising from concepts); refs #18220 (#18241)Timothee Cour2021-06-121-1/+1
| | | | | | | * getType now works with tyInferred (concepts); refs #18220 * avoid cast * add more docs
* cString => cSourceString; tyCString => tyCstring so that error msgs show ↵Timothee Cour2021-04-171-1/+1
| | | | cstring, not cString (#17744)
* iterable[T] (#17196)Timothee Cour2021-04-111-0/+1
| | | | | | | | * fix failing test toSeq in manual which now works * changelog * reject proc fn(a: iterable) * add iterable to spec * remove MCS/UFCS limitation that now works
* new-style concepts implementation, WIP (#15251)Andreas Rumpf2021-02-241-1/+3
| | | | | | | | | | | | | * fixes #15210 [backport:1.2] * make tests green * make ordinal work * makes Swapable test compile * make Indexable example work * concepts: 'self' is now 'Self' * concepts: make Dictionary example compile * document the new concept implementation * concepts: make typeDesc work properly * concepts: allow documentation comments (d'oh)
* big steps torwards an efficient, simple IC implementation (#16543)Andreas Rumpf2021-01-021-2/+2
| | | | | | | | | | | | | | | | | | | * reworked ID handling * the packed AST now has its own ID mechanism * basic serialization code works * extract rodfiles to its own module * rodfiles: store and compare configs * rodfiles: store dependencies * store config at the end * precise dependency tracking * dependency tracking for rodfiles * completed loading of PSym, PType, etc * removed dead code * bugfix: do not realloc seqs when taking addr into an element * make IC opt-in for now * makes tcompilerapi green again * final cleanups Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-24/+27
| | | | | | | | | | | | | | | | | * refactoring: idents don't need inheritance * refactoring: adding an IdGenerator (part 1) * refactoring: adding an IdGenerator (part 2) * refactoring: adding an IdGenerator (part 3) * refactoring: adding an IdGenerator (part 4) * refactoring: adding an IdGenerator (part 5) * refactoring: adding an IdGenerator (part 5) * IdGenerator must be a ref type; hello world works again * make bootstrapping work again * progress: add back the 'exactReplica' ideas * added back the missing exactReplica hacks * make tcompilerapi work again * make important packages green * attempt to fix the build for 32 bit machines (probably need a better solution here)
* Expand hoisted default params in sem (#15270)Clyybber2020-09-051-2/+1
| | | | | | | | | * Expand hoisted default params in sem Introduce ast.newTree{I,IT} Add test for default params in procs * Cleanup * Simplify hoist transformation and expand test
* expr => untyped; stmt => typed (#14804)Timothee Cour2020-06-251-2/+2
| | | | | * expr => untyped; stmt => typed * changelog + comment
* remove tyOpt, mOpt (#14636)Timothee Cour2020-06-121-1/+1
| | | | | * remove tyOpt, mOpt * fixup
* Fix typeSym.getImpl for ref types (#13752)zah2020-03-261-4/+4
| | | | | | | | | | | | | | | | | | | | | * 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
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-31/+31
| | | | | | | | | | | | | | | | | | * 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
* fixes #12663 staticRead now creates a dependency for rebuilds (#12731) ↵Timothee Cour2019-11-251-0/+2
| | | | | | | [backport] * fix #12663 staticRead * address comments
* fix range.getType crashJasper Jenkins2019-09-051-2/+3
|
* [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-6/+6
| | | | --styleCheck:error
* rename tyExpr/tyStmt to tyUntyped/tyTyped (#11227)Arne Döring2019-05-111-2/+2
|
* code cleanup: there is no tyOptRefAndreas Rumpf2019-02-221-1/+1
|
* make code more readableAndreas Rumpf2019-02-181-3/+3
|
* fixes #9600 (#9601)jcosborn2018-11-071-1/+4
|
* getTypeImpl now returns pragmas for object types (#9538)jcosborn2018-10-301-9/+7
|
* fixes #9532Araq2018-10-281-1/+1
|
* Unchecked arrays now have their own type (#9267)LemonBoy2018-10-101-1/+5
|
* Fix range type construction in the VM (#9205)LemonBoy2018-10-091-2/+9
| | | | | | The `range[X,Y]` representation is wrong, we use `range[X .. Y]` instead. Fixes #9194
* compiler refactoring; use typesafe path handing; docgen: render symbols ↵Andreas Rumpf2018-09-071-1/+1
| | | | between modules
* Custom pragmas in proc types (#8205)cooldome2018-07-091-1/+2
|
* refactoring: remove idents.legacy global variable and pass the IdentCache ↵Andreas Rumpf2018-05-271-26/+26
| | | | around explicitly
* remove more global variables in the Nim compilerAndreas Rumpf2018-05-271-1/+1
|
* preparations of making compiler/msgs.nim free of global variablesAndreas Rumpf2018-05-171-1/+1
|
* remove ast.emptyNode global; cleanup configuration.nimAraq2018-05-161-11/+11
|
* transf and vmgen compile againAndreas Rumpf2018-05-121-5/+5
|
* Fix the return value of GetType and friends when given a `var T` type. (#7701)Varriount2018-04-271-1/+6
|
* introduce nkTupleConstr AST node for unary tuple construction; breaking changeAndreas Rumpf2018-04-131-1/+1
|
* preparations for language extensions: 'sink' and 'lent' typesAndreas Rumpf2018-01-071-1/+3
|
* modify getTypeImpl to reduce result to final implementation (#6891)jcosborn2017-12-091-3/+3
| | | | | * added test case for getTypeImpl * modify getTypeImpl to reduce result to final implementation
* fix getTypeInst for tyGenericInst (#6868)jcosborn2017-12-041-3/+6
|
* deprecated unary '<'Andreas Rumpf2017-10-291-3/+3
|
* implemented new experimental scriptable import mechanismAndreas Rumpf2017-10-011-44/+1
|
* first steps of making 'opt' a first class type for NimAndreas Rumpf2017-09-251-1/+1
|
* some work to make 'opt' a first class typeAndreas Rumpf2017-09-241-1/+2
|