Nim/compiler
LemonBoy 5afcd09cb3 Pervasive replacement of nkRecWhen in generic types
Long story short, even if the type contains no reference at all to its
generic parameters we still have to walk its AST and evaluate any
nkRecWhen nodes that semRecordNodeAux skipped due to the type being a
generic one.

We also must be careful to modify the type `n` node in place since it
may be referenced by the caller as seen in the tillegaltyperecursion
test.

Moreover we also can't have the nkSym drift away from their original
values in order not to break the JS nkObjConstr codegen.
2018-10-19 22:17:38 +02:00
..
nimfix implements a --nep1:on switch to make the compiler enforce the naming conventions outlined in NEP-1 2018-06-13 01:44:19 +02:00
plugins baby steps for incremental compilation 2018-05-30 23:50:34 +02:00
aliases.nim more modules compile again 2018-05-12 11:58:44 +02:00
ast.nim Fix #8126 (#8712) 2018-08-21 22:14:12 +02:00
astalgo.nim Fix unsound transform pass (#8633) 2018-08-14 20:38:04 +02:00
bitsets.nim Generate populationCount const at compile time (#7583) 2018-04-16 21:52:27 +02:00
btrees.nim added btrees.contains 2018-06-03 20:15:37 +02:00
canonicalizer.nim deprecated unary '<' 2017-10-29 08:37:13 +01:00
ccgcalls.nim WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
ccgexprs.nim exploit nil seqs for performance (#8688) 2018-08-20 11:54:18 +02:00
ccgliterals.nim C code generator compiles again 2018-05-12 23:45:51 +02:00
ccgmerge.nim WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
ccgstmts.nim Fixes 8535 (#8591) 2018-08-17 00:34:27 +02:00
ccgthreadvars.nim remove the last global variables in the C code generator 2018-05-28 18:18:43 +02:00
ccgtrav.nim exploit nil seqs for performance (#8688) 2018-08-20 11:54:18 +02:00
ccgtypes.nim Bugfix for modules with multi byte characters in the name (#8319) 2018-07-14 16:00:51 +02:00
ccgutils.nim remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
cgen.nim Fixes 8535 (#8591) 2018-08-17 00:34:27 +02:00
cgendata.nim Fixes 8535 (#8591) 2018-08-17 00:34:27 +02:00
cgmeth.nim Pick the and symbol we need explicitly (#8249) 2018-07-08 22:00:32 +02:00
closureiters.nim Fixed #8399 (#8401) 2018-07-22 22:30:59 +02:00
commands.nim implement the --nilseqs switch properly 2018-08-15 16:56:32 +02:00
condsyms.nim every .experimental feature has a corrsponding 'nimHasX' define; fixes #8644; refs #8672 2018-08-18 01:21:47 +02:00
configuration.nim remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
debuginfo.nim happy new year 2017-01-07 22:35:09 +01:00
depends.nim incremental compilation: implemented basic replay logic 2018-06-02 09:41:27 +02:00
destroyer.nim baby steps for incremental compilation 2018-05-30 23:50:34 +02:00
dfa.nim remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
docgen.nim partially fix #8218: nim doc --project (#8737) 2018-08-23 10:18:10 +02:00
docgen2.nim incremental compilation: implemented basic replay logic 2018-06-02 09:41:27 +02:00
evalffi.nim remove ast.emptyNode global; cleanup configuration.nim 2018-05-16 03:06:07 +02:00
evaltempl.nim baby steps for incremental compilation 2018-05-30 23:50:34 +02:00
extccomp.nim fix shell quoting error for static libraries (#8532) 2018-08-04 01:18:27 +02:00
filter_tmpl.nim remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
filters.nim big refactoring: magicsys compiles again 2018-05-10 13:12:42 +02:00
forloops.nim deprecated unary '<' 2017-10-29 08:37:13 +01:00
gorgeimpl.nim remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
guards.nim remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
hlo.nim New approach 2018-06-12 00:20:08 +01:00
idents.nim deprecate the .this pragma 2018-08-09 20:31:40 +02:00
idgen.nim big refactoring: parser compiles again 2018-05-10 10:49:51 +02:00
importer.nim Fix for module alias inside brackets (#8726) 2018-08-23 10:23:02 +02:00
incremental.nim incremental compilation: save the configuration 2018-06-11 00:14:29 +02:00
installer.ini Nintendo switch support (#8069) 2018-06-27 12:35:09 +02:00
jsgen.nim WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
jstypes.nim platform.nim doesn't use globals anymore; prepare msgs.nim for not using globals 2018-05-18 15:18:00 +02:00
lambdalifting.nim Access implicit result trough envP in closures (#8471) 2018-07-30 08:34:15 +02:00
layouter.nim nimpretty: detect '; vs ,' style based on the first usage of the token in parameter lists 2018-06-26 01:43:41 +02:00
lexer.nim Cosmetic: fix typo on TRIPLESTR_LIT (#8663) 2018-08-21 22:17:19 +02:00
liftlocals.nim refactoring: remove idents.legacy global variable and pass the IdentCache around explicitly 2018-05-27 22:09:15 +02:00
lineinfos.nim WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
linter.nim implements a --nep1:on switch to make the compiler enforce the naming conventions outlined in NEP-1 2018-06-13 01:44:19 +02:00
lists.nim removed compiler internal list implementation (#5371) 2017-02-22 17:33:12 +01:00
llstream.nim closes #5070 2017-10-15 20:55:38 +02:00
lookups.nim better formatting for recursive module dependency (#8735) 2018-08-23 08:19:03 +02:00
lowerings.nim allow referencing other parameters in default parameter values 2018-06-16 16:46:32 +03:00
macrocacheimpl.nim completed VM support for incremental compilations 2018-06-04 01:01:08 +02:00
magicsys.nim baby steps for incremental compilation 2018-05-30 23:50:34 +02:00
main.nim incremental compilation: implemented basic replay logic 2018-06-02 09:41:27 +02:00
modulegraphs.nim deprecate the .this pragma 2018-08-09 20:31:40 +02:00
modulepaths.nim Fix for module alias inside brackets (#8726) 2018-08-23 10:23:02 +02:00
modules.nim toy program works with incremental compilation 2018-06-07 18:24:16 +02:00
msgs.nim WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
ndi.nim preparations of making compiler/msgs.nim free of global variables 2018-05-17 15:21:22 +02:00
nim.cfg disable -d:nimIncremental for devel 2018-06-11 17:08:25 +02:00
nim.nim incremental compilation: implemented basic replay logic 2018-06-02 09:41:27 +02:00
nimblecmd.nim remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
nimconf.nim Look for user nim.cfg in "nim/" subdir in usual config dir locations (#8662) 2018-08-17 10:52:10 +02:00
nimeval.nim make tests green again 2018-06-11 01:23:14 +02:00
nimlexbase.nim fixes an off-by-one error for nimpretty 2017-10-16 00:04:46 +02:00
nimsets.nim remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
nodejs.nim Add "safety compilation". Improved, fixed messages 2015-06-04 07:33:27 +02:00
nversion.nim remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
options.nim implements 'case statement macros' in order to encourage the development of pattern matching mechanisms that are not terrible to look at 2018-08-16 00:16:49 +02:00
packagehandling.nim guards.nim does compile 2018-05-11 13:07:16 +02:00
parampatterns.nim Allow taking address of skForVar variables (#8632) 2018-08-14 21:28:14 +02:00
parser.nim Cosmetic: fix typo on TRIPLESTR_LIT (#8663) 2018-08-21 22:17:19 +02:00
passaux.nim incremental compilation: implemented basic replay logic 2018-06-02 09:41:27 +02:00
passes.nim incremental compilation: implemented basic replay logic 2018-06-02 09:41:27 +02:00
patterns.nim fixes more nil handling regressions 2018-08-13 17:27:44 +02:00
platform.nim Nintendo switch support (#8069) 2018-06-27 12:35:09 +02:00
pluginsupport.nim refactoring: fewer global variables 2018-05-27 19:19:12 +02:00
pragmas.nim More robust handling of deprecated pragmas (#8696) 2018-08-21 15:07:44 +02:00
prefixmatches.nim remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
procfind.nim make tests green again 2018-05-18 20:53:41 +02:00
readme.txt Nimrod renamed to Nim 2014-08-28 09:38:14 +02:00
renderer.nim WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
reorder.nim incremental compilation: implemented basic replay logic 2018-06-02 09:41:27 +02:00
rod.nim incremental compilation: implemented basic replay logic 2018-06-02 09:41:27 +02:00
rodimpl.nim incremental compilation: save the configuration 2018-06-11 00:14:29 +02:00
rodutils.nim fixes 8594 (#8721) 2018-08-22 12:16:18 +02:00
ropes.nim WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
saturate.nim compiler: Trim .nim files trailing whitespace 2015-09-04 23:03:22 +02:00
scriptconfig.nim scriptconfig: register passes once (#8590) 2018-08-17 11:09:33 +02:00
sem.nim WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
semasgn.nim enable destructors without the --newruntime switch 2018-07-04 20:36:15 +02:00
semcall.nim Update all the default parameters after an instantiation (#8689) 2018-08-20 16:54:13 +02:00
semdata.nim WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
semexprs.nim Don't consider tyAnd/tyNot/tyOr/tyAnything as generic (#8700) 2018-08-22 09:40:31 +02:00
semfields.nim refactoring: remove idents.legacy global variable and pass the IdentCache around explicitly 2018-05-27 22:09:15 +02:00
semfold.nim Fix abs & unary sub in semfold (#8724) 2018-08-22 15:59:33 +02:00
semgnrc.nim Fix use of custom pragmas in generic procs (#8165) 2018-07-01 08:06:58 +02:00
seminst.nim WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
semmacrosanity.nim make tests green again 2018-08-13 23:16:03 +02:00
semmagic.nim fixes #7827, bindSym enhancement (#8499) 2018-08-02 12:56:44 +02:00
semobjconstr.nim WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
semparallel.nim refactoring: remove idents.legacy global variable and pass the IdentCache around explicitly 2018-05-27 22:09:15 +02:00
sempass2.nim Extend init variable tracking to tuple assignments (#8321) 2018-07-17 17:50:05 +02:00
semstmts.nim implements 'case statement macros' in order to encourage the development of pattern matching mechanisms that are not terrible to look at 2018-08-16 00:16:49 +02:00
semtempl.nim code cleanup: remove newScopeForIf switch 2018-07-04 20:04:08 +02:00
semtypes.nim Pick skParam symbols when resolving type idents (#8720) 2018-08-22 15:49:43 +02:00
semtypinst.nim Pervasive replacement of nkRecWhen in generic types 2018-10-19 22:17:38 +02:00
sighashes.nim Correctly hash inferred types (#8286) 2018-07-12 13:00:11 +02:00
sigmatch.nim Fix #8126 (#8712) 2018-08-21 22:14:12 +02:00
suggest.nim More robust handling of deprecated pragmas (#8696) 2018-08-21 15:07:44 +02:00
syntaxes.nim remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
tccgen.nim nimrod is obsolete 2015-11-03 14:52:36 +01:00
transf.nim Fix unsound transform pass (#8633) 2018-08-14 20:38:04 +02:00
trees.nim introduce nkTupleConstr AST node for unary tuple construction; breaking change 2018-04-13 17:45:58 +02:00
treetab.nim compiler: Trim .nim files trailing whitespace 2015-09-04 23:03:22 +02:00
types.nim Expand tyAlias in typeToString (#8634) 2018-08-18 15:27:47 +02:00
typesrenderer.nim avoid more global variables 2018-05-11 15:01:28 +02:00
vm.nim fixes #6255, add system.ashr arithmetic right shift (#8547) 2018-08-07 18:41:30 +02:00
vmdef.nim change the VM's max instruction count to 3_000_000 2018-08-10 08:42:13 +02:00
vmdeps.nim Custom pragmas in proc types (#8205) 2018-07-09 12:11:03 +02:00
vmgen.nim fixes #6255, add system.ashr arithmetic right shift (#8547) 2018-08-07 18:41:30 +02:00
vmhooks.nim stdlib and compiler don't use .immediate anymore 2016-07-29 23:51:01 +02:00
vmmarshal.nim refactoring: remove idents.legacy global variable and pass the IdentCache around explicitly 2018-05-27 22:09:15 +02:00
vmops.nim compiler API: final cleanups; improve security by diabling 'gorge' and friends 2018-05-29 09:07:24 +02:00
wordrecg.nim remove dead code elimination option (#7669) 2018-04-23 11:02:38 +02:00
writetracking.nim remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00

This directory contains the Nim compiler written in Nim. Note that this
code has been translated from a bootstrapping version written in Pascal, so
the code is **not** a poster child of good Nim code.