Andreas Rumpf
e0ef859130
strict effects ( #18777 )
...
* fixes #17369
* megatest is green for --cpu:arm64
* docgen output includes more tags/raises
* implemented 'effectsOf'
* algorithm.nim: uses new effectsOf annotation
* closes #18376
* closes #17475
* closes #13905
* allow effectsOf: [a, b]
* added a test case
* parameters that are not ours cannot be declared as .effectsOf
* documentation
* manual: added the 'sort' example
* bootstrap with the new better options
2021-09-02 12:10:14 +02:00
flywind
72fa5833ad
fix #9778 (pairs iterator calling a helper proc with tuple return type will cut the iterator yield into half) ( #18767 )
...
* test someSymFromImportTable
* Update compiler/lookups.nim
* test nkTupleConstr
* use isConstExpr
* add tests
* add comments and todo
* use todo
2021-09-02 07:41:14 +02:00
flywind
8f4bdb3596
[minor]break loops after a candidate is added to seqs ( #18770 )
...
* [minor]break loops when added
* Update compiler/lookups.nim
Co-authored-by: Clyybber <darkmine956@gmail.com >
Co-authored-by: Clyybber <darkmine956@gmail.com >
2021-08-31 13:32:37 +02:00
Timothee Cour
fa7c1aa864
move PNode.comment to a side channel, reducing memory usage during compilation by a factor 1.25x ( #18760 )
...
* move PNode.comment so a side channel, reducing memory usage
* fix a bug
* fixup
* use sfHasComment to speedup comment lookups
* fix for IC
* Update compiler/parser.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-08-29 15:54:07 +02:00
Timothee Cour
014edde36a
followup #18759 : make compiler build cleanly with 0 warnings/hints ( #18764 )
2021-08-28 16:34:27 -07:00
Miran
719718df2f
more minor bootstrapping cleanups ( #18759 )
2021-08-28 08:27:56 +02:00
flywind
5eba372570
[minor] break loops if it is ambiguous ( #18745 )
...
* [minor] break loops if it is ambiguous
* Update compiler/lookups.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-08-27 11:50:06 +02:00
Timothee Cour
3aa16c1de0
fix RFC #341 : dot-like operators are now parsed with same precedence as . ( #18711 )
...
* fix RFC #341 : dot-like operators are now parsed with same precedence as `.`
* fixup
* [skip ci] address comment in changelog
* address comment
* update grammmar
* add manual entry
* fixup
* -d:nimPreviewDotLikeOps
* address comment to unblock PR: move nimPreviewDotLikeOps out of config/config.nims
2021-08-25 06:50:40 +02:00
flywind
3d1bba04ab
[minor]use addInt and addFloat ( #18733 )
...
* unify int and uint
* back
* minor
2021-08-24 17:16:12 +02:00
Miran
24178bf8aa
get rid of the warnings during bootstrapping ( #18741 )
...
* fix bootstrapping hints and warnings
* revert removals in ccgtypes
2021-08-24 17:15:26 +02:00
flywind
8a8267e2bc
fix a typo ( #18736 )
2021-08-23 21:05:22 +08:00
flywind
061a9183f7
replace wrt with proper word ( #18724 )
...
* what does wrt mean?
* clarify
2021-08-22 06:21:53 +02:00
Timothee Cour
f2910077ac
sigmatch: support optional params with last block arg(s) ( #18631 )
...
* sigmatch: support optional params with last block arg
* add tests
* works with multiple block args
* cleanup
* address comment
2021-08-20 10:13:03 +02:00
flywind
13b9729183
fix #18627(Program segfaults with ARC when using openArray[string]) ( #18713 )
...
* fix #18627
* add testcase
* rename
* another
* remove tyVarargs
2021-08-19 19:56:52 +02:00
flywind
8fa0decf6b
fix a typo ( #18715 )
2021-08-19 21:54:45 +08:00
Timothee Cour
394f4ac7bb
improvements to addInt and $ for integer types ( #18592 )
...
* improvements to $(SomeInteger) and addInt
* remove mIntToStr, mInt64ToStr
* improvements
* fix tests/pragmas/tinjectstmt.nim; the diff is harmless, cgen code is identical with -d:danger or debug mode
* rm tests/system/tstrmantle.nim
* revert compiler/jsgen.nim for -d:nimVersion140
2021-08-19 11:33:52 +02:00
Timothee Cour
7b58dc2de0
allow building 1.4.0 from devel ( #18708 )
...
* allow building 1.4.0 from devel
* changelog
2021-08-18 19:33:11 +02:00
flywind
0778a38bbd
[wip]better hint message for JS ( #18704 )
...
* better hint message for JS
* both
2021-08-18 15:53:52 +02:00
Timothee Cour
1acba63cb7
cross compilation targetting windows now supports nim r: nim r -d:mingw main ( #18682 )
...
* cross compilation targetting windows now supports `nim r`: `nim r -d:mingw main`
* quoteShell
* address comment: remove `conf.getConfigVar("nimrun.exe")`
2021-08-16 09:32:12 +02:00
Timothee Cour
b24812df5f
properly fix #10053 ; FieldDefect msg now shows discriminant value + lineinfo, in all backends (c,vm,js) ( #11955 )
...
* fix #10053 FieldError for vm
* fixup
* FieldError now also shows runtime value of discriminant
* fix field error reporting in vm
* also report culprit line info in err msg
* fix errors for newruntime 2
* fix for js
* fixup
* PRTEMP4
* works
* works
* works perfect
* refactor
* std/private/repr_impl
* suppport --gc:arc
* cleanup
* refactor
* simplify
* simplify
* simplify
* fixup
* move out compiler.vmgen.genCustom
* fixup
* fixup
* add tests
* revert compiler/debugutils.nim
* simplify reprDiscriminant
* fixup
* lib/std/private/repr_impl.nim -> lib/system/repr_impl.nim
* try to fix D20210812T165220
* honor --declaredlocs
* control toFileLineCol via --declaredlocs
2021-08-13 09:35:48 +02:00
Andreas Rumpf
018465a234
fixes #18643 [backport:1.0] ( #18678 )
2021-08-12 08:25:11 +02:00
Timothee Cour
c94933acb7
fix #18674 --nimcache now works better with --os:windows ( #18675 )
2021-08-11 13:30:51 -07:00
Andreas Rumpf
bc14b77359
fixes #18665 DFA generator bug ( #18676 )
2021-08-11 17:19:23 +02:00
Timothee Cour
6c1bd4bb1c
fix: var a{.foo.} = expr inside templates (refs #15920 ) (except when foo is overloaded) ( #13869 )
...
* fix: `var a{.foo.} = expr` inside templates
* add test
* improve tdecls test
* improve tests
* add failing test
* PRTEMP
* fixup
2021-08-11 12:17:17 +02:00
Timothee Cour
8540065754
--cc:env now works correctly to assign linker executable, allowing to cross-compile/run for windows on osx via wine ( #18672 )
...
* --cc:env now works correctly to assign linker executable, allowing using wine on osx
* fixup
2021-08-11 11:42:01 +02:00
Kyle Brown
31fc0f9718
Remove unused imports, and deprecated function usage ( #18663 )
...
* clean up imports and slice to remove delete
* revert buggy code
* Replace "delete" with setlen to remove depreciation warning
2021-08-11 01:26:42 +02:00
Timothee Cour
8ce782d463
Add optional recursive arg to distinctBase (v2) ( #18659 )
...
* Add optional recursive arg to distinctBase
* Add docs and examples
Co-authored-by: ALANVF <alan.invents@gmail.com >
2021-08-09 08:51:39 +02:00
flywind
2bc07554cc
make proc names consistent ( #18626 )
...
* rename `endswith` to `endsWith`
* rename
2021-08-01 12:52:24 +01:00
Andreas Rumpf
562dde624f
fixes #18371 ( #18617 )
2021-07-30 12:05:14 +02:00
Timothee Cour
9a26f5059b
refs #16613 : check opcWrDeref for nil ( #18613 )
2021-07-30 09:30:22 +02:00
Andreas Rumpf
a273ea70e8
implements overloadable enum values; WIP ( #18470 )
...
* implements overloadable enum values
* simpler code
2021-07-28 12:46:28 +02:00
Timothee Cour
8d2f6bba3a
support same-line doc comments in routines ( #18595 )
...
* support same-line comments in routines
* remove assert as per review comment
2021-07-27 19:50:59 +02:00
Andreas Rumpf
c86f9590fb
fixes #18570 ( #18599 )
2021-07-27 12:48:27 +02:00
Timothee Cour
493721c16c
delEnv now works at CT ( #18568 )
2021-07-27 09:56:16 +02:00
Timothee Cour
3b3006ef16
add comment to astalgo.debug ( #18594 )
2021-07-27 09:37:11 +02:00
Jason Beetham
ed44618deb
Fixed const tuples in inferred generics ( #18598 )
2021-07-27 09:36:59 +02:00
Andreas Rumpf
fa0209609d
fixes #18565 ( #18593 )
...
* fixes #18565
2021-07-27 09:36:19 +02:00
flywind
9cb5ab0108
fix #18578 ( #18580 )
...
* fix #18578
* add tests
* tiny
* apply changes
* typo
* add removeStaticFile
2021-07-27 07:21:39 +02:00
Miran
4eca84cff7
don't use plus instead of space ( #18589 )
2021-07-26 19:13:47 -04:00
Andreas Rumpf
158d7c7a7a
fixes #18558 again ( #18586 )
2021-07-26 14:15:55 +02:00
Araq
ff280c0127
added missing .inline for toCChar
2021-07-26 09:57:19 +02:00
Andrey Makarov
10da888c07
docgen: sort symbols ( fix #17910 ) ( #18560 )
...
* docgen: sort symbols (fix #17910 )
* add workaround + change naming
* switch to a dedicated sort comparator
* fix numbers with unequal string lengths
* dedicated `sortName` instead of `plainNameEsc`:
* more compact names for non-overloaded symbols
* more predictable Ascii sort (e.g. `<` instead of `<`)
2021-07-25 23:01:19 +02:00
Saem Ghani
2cbfc1e514
fixes #18385 ( #18571 )
...
needs a more permanent fix by better incorporating IC, but fixes
nimsuggest highlighting for now.
2021-07-25 18:06:04 +02:00
Andreas Rumpf
f4ff276a90
refactoring: removed dead code ( #18567 )
2021-07-24 00:30:02 +02:00
Timothee Cour
cc0f02d57d
rename nimFpRoundtrips => nimPreviewFloatRoundtrip ( #18566 )
2021-07-23 14:57:47 -07:00
Andreas Rumpf
faabcfa643
fixes #18558 ( #18563 )
...
* fixes #18558
* better fix
2021-07-23 16:15:40 +02:00
Jason Beetham
5386ae75ba
Fixed template const tuple unpacking ( #18562 )
2021-07-23 08:46:13 +02:00
Andreas Rumpf
0c4582c665
mitigates #12815 ( #18557 )
...
* mitigates #12815
* Update doc/nimc.rst
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-07-22 11:59:21 +02:00
Andreas Rumpf
58e27ebd4a
fixes #12815 ( #18554 )
2021-07-22 09:37:41 +02:00
Timothee Cour
d5b5827bc2
fix setCommand so it behaves like regular nim invocation ( #18555 )
2021-07-22 08:00:29 +02:00