Commit Graph

6949 Commits

Author SHA1 Message Date
Timothee Cour
87cd9b24a3 add more APIs to compiler/debugutils; re-export it (#18243) 2021-06-18 15:52:08 +02:00
Timothee Cour
c83ac16671 Renamed -d:nimCompilerStackraceHints to -d:nimCompilerStacktraceHints. (#18283) 2021-06-17 00:17:46 -07:00
Timothee Cour
3c854e8c24 followup #16400; use use -d:nimCompilerStackraceHints in more places (#18282) 2021-06-16 23:04:12 -07:00
Clyybber
13b94c0297 Fix doubly typed forward declarations (#18279)
* Add testcase

* Fix testcase

* Fix doubly typed forward decls

* Better fix
2021-06-16 16:40:22 +02:00
Clyybber
c5cf21c0c4 Don't report unused hints for consumed AST (#18270)
* Fix #18203

* Add testcase

* Fix testcase

* Fix test
2021-06-16 02:45:05 +02:00
Timothee Cour
8ef6073543 add test case for pure enum redefinition error within enum (fixed in recent PR) (#18266)
* add test case for pure enum redefinition error within enum (fixed in recent PR)

* remove code duplication

* Revert "remove code duplication" (would require bootstrap >= 1.4)

This reverts commit 3f793874c2.

* fixup
2021-06-15 08:56:10 +02:00
Clyybber
8c42f5be02 Small scope refactoring (#18263)
* Small scope refactoring

* Add test for #10251

* Add inline where appropriate
2021-06-14 19:19:58 +02:00
Saem Ghani
488acd9d07 fixes #18235 - proc annotation type macro sym leak (#18249)
* fixes #18235 - proc annotation type macro sym leak

- also fixed a typo
- proc annotations guard symbol exports with shadow scopes
- symbol handling is shadow scope aware

* test for exporting an existing unexported sym

this one is for my homie alaviss.

* Special handling not needed in semProcAnnotation

* Testcasing

* [skip ci]  clean-up and add some more comments

* [skip ci] rm trailing whitespace

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-06-14 09:21:33 +02:00
Timothee Cour
e1e8af535e merge BuildMode into SuccessX, remove code duplication w drnim, add useful info to successx, add gc to compilesettings (#18252)
* merge BuildMode into SuccessX, add more info

* refactor duplicated with drnim

* fixup

* address comment
2021-06-14 08:51:40 +02:00
Timothee Cour
065243dc59 followup #17777: declaredloc field error msgs now work with generics (#18259)
* followup #17777: declaredloc field error msgs now work with generics

* fix tests

* cleanup
2021-06-14 08:21:18 +02:00
Timothee Cour
897e50d5fe getType now works with tyInferred (arising from concepts); refs #18220 (#18241)
* getType now works with tyInferred (concepts); refs #18220

* avoid cast

* add more docs
2021-06-12 21:35:12 +02:00
Miran
57609902c4 use more meaningful name than "workaround14447" (#18237) 2021-06-11 10:07:23 +02:00
Timothee Cour
c64d917619 handle tyUserTypeClassInst in addDeclaredLoc (#18236) 2021-06-11 08:36:06 +02:00
Andreas Rumpf
f65f760dee fixes #15884 (#18230)
* fixes #15884

* micro optimization
2021-06-10 18:19:20 +02:00
Andreas Rumpf
2ea7287217 view types: spec changes (#18226)
* view types: spec changes

* Update doc/manual_experimental.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update doc/manual_experimental.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-06-10 16:49:17 +02:00
Andreas Rumpf
47acc80f4e make strict funcs analysis smarter (#18219)
* make strict funcs analysis smarter: varParam[i] = v is different from varParam[i][] = v
* added a test case
* Update compiler/varpartitions.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-06-09 17:33:19 +02:00
Timothee Cour
9106ab7db1 make changeDetectedViaJsonBuildInstructions warning less verbose when json file invalid (eg due to spec change) (#18197) 2021-06-06 09:53:22 +02:00
Andreas Rumpf
5423915e5a real bugfix for #17170 (#18171)
* real bugfix for #17170

* better fix
2021-06-04 16:20:47 +02:00
Timothee Cour
654a20166e simplify extccomp.nim json logic via jsonutils; fix #18084 (#18100)
* simplify extccomp.nim json logic via jsonutils
* fix #18084
* simplify further
* workaround for bootstrap that can be removed after updating csources_v1 >= 1.2
2021-06-03 22:29:45 +02:00
Andreas Rumpf
28f2abe1a2 fixes #18112 (#18165) 2021-06-03 20:55:41 +02:00
Andreas Rumpf
06232b7f2e fixes #18058 (#18162) 2021-06-03 17:12:45 +02:00
Andreas Rumpf
daaa40973c added float32 schubfach algorithm; wip (#18155)
* added float32 schubfach algorithm; wip

* fixes #18418
2021-06-03 12:09:40 +02:00
Timothee Cour
0de3d4292f fix #16993, #18054, #17835 runnableExamples now works with templates and nested templates (#18082) 2021-06-02 09:02:14 -07:00
Andreas Rumpf
6768f507fb refactoring: removed empty withBracketExpr template (#18152) 2021-06-02 13:14:10 +02:00
Andreas Rumpf
f10eef29b5 fixes #18059 (#18140)
* fixes #18059
2021-06-02 13:13:23 +02:00
Andreas Rumpf
63db2b19bf use dragonbox algorithm; alternative to #18008 (#18139)
* use dragonbox algorithm; alternative to #18008
* removed unsafe code
2021-06-01 22:29:53 +02:00
Andrey Makarov
ba3ec7b049 docs: Latex generation improvements (#18141)
* docs: improve Latex generation

* make it work on Windows + fix ] escaping

* minor fixes with escapes and style
2021-06-01 20:47:23 +02:00
Dylan Modesitt
06d50bfd4c Fixes #5034 illformed AST from getImpl with proc returning value (#17976)
* Fixes 5034

* address comments
2021-05-31 22:51:32 +02:00
Saem Ghani
b7ad29e692 fix #18113 (#18124) 2021-05-31 13:27:44 +02:00
Yuriy Glukhov
a6bd6c7ed8 Fixes #17849 (#18055) [backport:1.2]
* Fixes #17849
* Update compiler/closureiters.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-05-30 22:38:33 +02:00
Timothee Cour
3b1aabdcff change --hint[X] => --hint:X in nim repo (avoids shell quoting issues) (#18085) 2021-05-26 09:51:48 +02:00
Juan Carlos
e12597589f Error message minor (#18021)
* Update compiler/semtypes.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: flywind <xzsflywind@gmail.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-05-22 13:12:30 +02:00
Juan Carlos
6a5973882b jsgen improve spacing (#18048)
* Fix inconsistent spacings in generated JS of jsgen
2021-05-20 15:48:46 +02:00
Andreas Rumpf
df429fa287 config system: special case -d:release and -d:danger [backport:1.4] (#18051) 2021-05-20 11:52:46 +02:00
Andreas Rumpf
558644725d fixes #17943 (#18045)
* fixes #17943

* IC: test 'nim check --ic:on' for the full Nim compiler

* Update testament/testament.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-05-19 16:00:14 +02:00
Andreas Rumpf
53935b8b27 ARC: fixes memory leaks with newSeq used in a loop [backport:1.4] (#18040)
* ARC: fixes memory leaks with newSeq used in a loop [backport:1.4]
* Update tests/arc/tnewseq_legacy.nim
2021-05-18 21:45:37 +02:00
Clyybber
63fcb9e5f5 Disable performance hints by default (verbosity 1) (#18024) 2021-05-16 19:43:52 +02:00
Timothee Cour
3619a5a2aa more informative error msg for undeclared field (A(badfield: 1) and a.badfield = expr) (#17777) 2021-05-16 10:03:22 -07:00
Clyybber
3614523664 Rework DFA traversal (#18016)
* enable using dbg: without a context

* Optimally joining first write/last read analysis

* Add test for #18002

* potLastReads -> potentialLastReads
2021-05-16 00:15:53 +02:00
Andrey Makarov
1568ae23c6 docgen: escape special characters in titles (#18014) 2021-05-15 06:53:38 +02:00
Andrey Makarov
97970d9dcc doc2tex: generate docs to Latex (#17997)
* `doc2tex`: generate docs to Latex

* address some comments
2021-05-14 07:30:47 +02:00
Andreas Rumpf
3bc625aff1 ORC: progress (#18000)
* ORC: progress

* ORC: bugfix; don't follow acyclic data even if only at runtime the subtype is marked as acyclic

* progress

* minor style changes
2021-05-12 22:00:37 +02:00
Andreas Rumpf
39ad9a69a9 ORC: improvements (#17993)
* ORC: improvements
* ORC: fix .acyclic annotation for ref objects
2021-05-12 07:15:05 +02:00
Andreas Rumpf
2c2ec48bc4 ORC: critical bugfix for mixing acyclic refs with cyclic refs [backport:1.4] (#17991) 2021-05-11 16:21:29 +02:00
Andreas Rumpf
378ee7f888 feature: the compiler can warn when you use the implicit 'result' variable (#17988) [backport:1.2]
* implements #17855
2021-05-10 23:41:51 +02:00
Andreas Rumpf
a9ae5fe5be since we have now so many virtual registers, reduce memory consumption for the register allocator (#17985) 2021-05-10 11:29:19 +02:00
Andreas Rumpf
d84a3b10b5 fixes #17675 (#17981) 2021-05-09 11:34:28 +02:00
Clyybber
72d6b59ffa treetab: tiny cleanup (#17929)
* treetab: tiny cleanup

* Another tiny thing

* Explicitly move n

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

* Typo

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-05-09 00:56:37 +02:00
Andreas Rumpf
c14427dbf3 ORC: cursor inference bugfix (#17973)
* fixed a .cursor inference bug

* added a test case
2021-05-08 16:47:06 +02:00
Timothee Cour
38b41f893a fix #17941: UnusedImport works for var/let/const/type invoked inside a generic (#17942)
* fix #17941: UnusedImport works for var/let/const/type invoked inside a generic

* fixup
2021-05-08 09:56:46 +02:00