Commit Graph

290 Commits

Author SHA1 Message Date
ringabout
b57a9637e8 fixes #20914; fixes the alignment of big sets (#20918)
* fixes #20914; fixes the align of bug sets

* add a test for alignof
2022-11-26 07:48:11 +01:00
ringabout
cbc2fa7156 add a testcase for vcc (#20915)
test vcc
2022-11-25 17:39:50 +08:00
ringabout
cdbf5b4699 fixes a severe bug of testament (#20832)
* test azure

* use exit 1

* try again

* use useSysAssert

* disable i386

* use refc for tlsEmulation on i386

* use refc

* disable i386

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-11-17 09:38:07 +08:00
ringabout
7db0d2bb58 fixes a CI error (#20834) 2022-11-14 14:05:13 +08:00
Bung
ecc8f61fe4 Fix #18079 Illegal storage access compiling call with nested ref/deref (#20738)
* add test case
* refactoring transformAddrDeref and fix #18079
* fix jsgen
2022-11-04 09:54:45 +01:00
Bung
49e793e8c4 fix #20272 range of uint64 shows signed upper bound (#20702) 2022-11-01 05:58:32 +01:00
Bung
534c97edc5 fix #16264 low(Time) OverflowDefect (#20552)
fix #16264 regression(0.18.0 => devel): import times; echo low(Time) gives OverflowDefect
2022-10-29 08:59:51 +02:00
ringabout
81e7811e01 fixes nim check with orc (#20456)
* fixes nim check with orc

* fixes tests

* add tests

* fixes tests

* Update tests/arc/t20456.nim
2022-10-02 06:44:10 +02:00
metagn
24b81e9df6 remove hack for deprecated csize in compiler (#20463)
* remove hack for deprecated csize in compiler

* remove test
2022-10-01 09:07:52 +02:00
metagn
919a889ba8 moderate system cleanup & refactor (#20355)
* system refactor, move out 600 lines

* compilation, slice, backwardsindex, misc_num moved out of system
* some procs/types moved into arithmetics, basic_types
* system no longer depends on syncio
* some procs moved around to fit with their surroundings

* make exceptions an import, old ops to misc_num

* move instantiationInfo back

* move back nim version, fix windows echo

* include compilation

* better docs for imported modules, fix unsigned ops

also remove ze, ze64, toU8, toU16, toU32 with nimPreviewSlimSystem

* fix terminal

* workaround IC test & weird csize bug, changelog

* move NimMajor etc back to compilation, rebase for CI

* try ic fix

* form single `indices`, slim out TaintedString, try fix IC

* fix CI, update changelog, addQuitProc

* fix CI

* try fix CI

* actually fix CI finally hopefully

* Update lib/system/compilation.nim

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>

* update kochdocs

* hopefully fix csize uses for slimsystem

* fix tquit

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
2022-09-28 15:28:45 -04:00
ringabout
37ca97dd76 close #15955; add a test case (#20414) 2022-09-24 01:37:21 +08:00
ringabout
7739e23420 defaults to ORC (#19972)
* defaults to Orc

* bootstrap using refc

* use gc

* init orc defines

* unregister orc

* fix gc

* fix commands

* add prepareMutation for orc

* enable deepcopy for orc

* prepareMutation

* more fixes

* some cases

* bug #20081

* partial fixes

* partial fixes

* fixes command line

* more fixes

* build Nim with refc

* use gc

* more fixes

* rstore

* orc doesn't support threadpool

* more shallowCopy

* more fixes

* fixes unsafeNew

* workarounds

* small

* more fixes

* fixes some megatest

* tcodegenbugs1 refc

* fxies megatest

* build nimble with refc

* workaround tensordsl tests

* replace shallowCopy with move

* fixes action

* workaround

* add todo

* fixes important packages

* unpublic unregisterArcOrc

* fixes cpp

* enable windows

Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
2022-09-23 13:05:05 +02:00
metagn
86f7f4ffa5 remove deprecated type pragma syntax, fix bugs that required it (#20199)
* remove deprecated pragma syntax from 0.20.0

closes #4651, closes #16653 with a cheap fix for now due to
how early `tfFinal` is set

* remove type pragma between name and generics

* undo removal, try removing bind expression (0.8.14)

* fix test, unremove bind expr

* remove again

* Update changelog.md

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

* dependencies @ HEAD & weave test dependencies

* try fix package ci

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2022-09-03 09:52:13 +02:00
ringabout
5ff06fd3c2 Revert "fix #19600 No error checking on fclose (#19836)" (#20297)
This reverts commit 04e4a5ec0e.
2022-09-02 19:04:58 +02:00
Andreas Rumpf
5211a471c8 fixes the regressions caused by the fix for #20107 [backport] (#20287)
* fixes the regressions caused by the fix for #20107 [backport]
2022-08-31 13:19:26 +02:00
Bung
04e4a5ec0e fix #19600 No error checking on fclose (#19836)
* fix #19600 No error checking on fclose

* add IOError to open
2022-08-29 18:09:14 +02:00
metagn
f4af9e955b remove some deprecated pre-1.0 stdlib modules (#20202)
* remove pre-1.0 stdlib deprecations

notable exceptions:
* ze, toU8 etc in system/arithmetics
* potentially callsite

* undo macros, ospaths, securehash, oswalkdir

* add sets back

* add back future, document deprecated versions

* add to changelog [skip ci]
2022-08-23 20:18:40 +02:00
metagn
f6eb1d4d7d remove {.this.} pragma, deprecated since 0.19 (#20201)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-08-23 19:44:37 +02:00
ringabout
25c6491b65 fixes #20162; locals doesn't work with ORC [backport] (#20163)
fixes #20162; locals doesn't work with ORC
2022-08-23 09:00:23 +02:00
ringabout
d8d86e07c3 fixes #11953; jsondoc creates no files unless the htmldocs dir is created (#20198)
* fixes #11953; jsondoc creates no files unless the htmldocs dir is created

* target

* fixes runner
2022-08-20 20:09:48 -04:00
ringabout
641381e3d4 fixes #20149; fixes #16762; hintAsError and warningAsError now ignore foreign packages (#20151)
* fixes #20149;  hintAsError/warningAsError ignores foreign packages

* add changelog

* fixes the test

* remove

* fixes tests again

* fix

* I'm careless

Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
2022-08-19 16:24:09 -04:00
ringabout
d2318d9ccf closes #15316; add testcase (#20213) 2022-08-13 22:23:11 +08:00
ringabout
2aeb0d516b fixes #20132; fixes the broken jsondoc comand [backport] (#20135)
* fixes #20132; fixes the broken jsondoc comand

* add testcase
2022-08-04 08:49:51 +02:00
metagn
5c510a9ab9 allow dots in defined() (#20010)
* allow dots in defined()

refs https://github.com/nim-lang/RFCs/issues/181

* mention accents in older versions
2022-07-12 18:03:58 +02:00
Bung
ac89eead8a test for #19046 (#19839)
* test for #19046

* add threads flag
2022-06-10 20:40:34 +02:00
flywind
8bfc396a4d fixes #18612; apply cache and memcmp for methods in arc/orc (#19749)
* try using endsWith

* use memcmp

* add cache

* cleanup

* better

* minor

* fix

* improve test coverage for methods with ARC
2022-04-26 20:14:39 +02:00
flywind
26bcf18f91 fix #19680; check if stderr is static (#19709) 2022-04-12 09:48:48 +02:00
flywind
a77ffdb7ea fix #17286 nim check -b:js works (#19704)
* fix #17286 nim check -b:js works

* fix
2022-04-09 17:52:11 +02:00
flywind
82319ef00d fix #8219; nim check/dump shouldn't run single nimscript project [backport: 1.6] (#19641)
* fix #8219; nim check/dump shouldn't run single nimscript project [backport: 1.6]
2022-03-26 11:50:15 +01:00
flywind
d102b2f54c deprecate unsafeAddr; extend addr (#19373)
* deprecate unsafeAddr; extend addr

addr is now available for all addressable locations, unsafeAddr is deprecated and become an alias for addr

* follow @Vindaar's advice

* change the signature of addr

* unsafeAddr => addr (stdlib)

* Update changelog.md

* unsafeAddr => addr (tests)

* Revert "unsafeAddr => addr (stdlib)"

This reverts commit ab83c99c50.

* doc changes; thanks to @konsumlamm

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

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2022-01-16 11:08:38 +01:00
flywind
9df195ef58 style usages part one (openarray => openArray) (#19321)
* style usages (openArray)

* revert doc changes
2022-01-04 13:29:50 +01:00
Andreas Rumpf
d584dd5b99 fixes #19015 [backport:1.6] (#19204) 2021-12-04 07:42:58 +01: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
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
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
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
Andreas Rumpf
01fc9e58ca fixes #18550 (#18553)
* fixes #18550

* update the manual to reflect reality
2021-07-21 16:55:50 +02:00
Andreas Rumpf
70fb377e88 undo RFC #294, it breaks code for no good reason, the compiler can wa… (#18546)
* undo RFC #294, it breaks code for no good reason, the compiler can warn about the construct instead

* Update changelog.md

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

* enable test case

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-07-21 08:51:03 +02:00
Timothee Cour
0b7361e938 followup #18362: make UnusedImport work robustly (#18366)
* warnDuplicateModuleImport => hintDuplicateModuleImport
* improve DuplicateModuleImport msg, add test
2021-06-27 20:39:16 +02:00
Timothee Cour
7d5e6b0169 support --hint:all:off --hint:x (ditto with --warnings + friends) (#17852)
* select all hints via `--hint:all:on|off`, etc
* simplify code with setutils
* address comment
2021-06-20 19:52:22 +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
Andreas Rumpf
06232b7f2e fixes #18058 (#18162) 2021-06-03 17:12:45 +02:00
Timothee Cour
a36efb59b5 fix #16256: nimout: <empty> should give error (vacuously true); improve a few tests (#18089)
* fix #16256: nimout: <empty> should give error (vacuously true); improve some tests

* renamed:    tests/stdlib/t9710.nim -> tests/misc/t9710.nim

* improve tests

* fix non-DRY tests

* improve $nim_prs_D/tests/stdlib/t9091.nim

* renamed:    tests/stdlib/t9091.nim -> tests/misc/t9091.nim

* fixup

* address comment: doAssert => result.parseErrors
2021-05-31 13:39:19 +02:00
Timothee Cour
0b2bbcaa23 fix #18077 testament now parses cmd properly (#18086) 2021-05-26 09:46:53 +02:00
Timothee Cour
8df55d0ad7 close #3482 no more cgen error with typed templates (#18094) 2021-05-26 09:44:00 +02:00
Timothee Cour
b59dc3b255 remove some custom logic in testament around flags, testExec (#18090)
* remove some custom logic in testament around flags, testExec

* remove testExec, custom logic around flags from testament

* fixup
2021-05-26 09:41:50 +02:00
Timothee Cour
1636c05d13 close #5540 generic object with generic field evaluated too early (#18062) 2021-05-23 01:02:04 -07:00
Timothee Cour
f68f28d157 make testament isSuccess more robust and allow tests with --hints:off to succeed (#17968)
* fix testament isSuccess

* show givenSpec in addResult

* simplify tstatictypes.nim
2021-05-11 06:54:52 +02:00
Timothee Cour
f07583588c close #9039: compiler does not hang anymore in 1 case involving static params and arrays (#17983) 2021-05-09 21:33:32 +02:00