Commit Graph

1128 Commits

Author SHA1 Message Date
ringabout
4c46358db1 remove shallowCopy for ARC/ORC (#20070)
* remove shallowCopy for ARC/ORC

* use move

* fix

* more fixes

* typo

* Update lib/system.nim

* follow

* add nodestroy

* move

* copy string

* add a changelog entry

Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-07-26 16:51:01 +02:00
flywind
10c8e2037d fixes #20015; document shallowCopy does a deep copy with ARC/ORC (#20025) 2022-07-14 18:42:56 +08:00
flywind
7f6e800caf move assertions out of system (#19599) 2022-03-23 20:34:53 +01:00
flywind
d6d36093b1 apply changes from #18017 and some fixes (#19571)
* implements https://github.com/nim-lang/RFCs/issues/369

* 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>

* merge

* remove

* fix bug

Co-authored-by: Araq <rumpf_a@web.de>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2022-03-01 07:46:08 +01:00
flywind
891329cd4b move io out of system (#19442)
* move io out of system

* fix tests

* fix tests

* next step

* rename to syncio

* rename

* fix nimscript

* comma

* fix

* fix parts of errors

* good for now

* fix test
2022-02-02 17:10:11 +01:00
Tom
ce44cf03cc Add noQuit option (#19419) [backport:1.6]
* Add noQuit option

* Add nim prefix in case of conflicts

Co-authored-by: flywind <xzsflywind@gmail.com>

Co-authored-by: flywind <xzsflywind@gmail.com>
2022-01-19 17:41:11 +01:00
nblaxall
23c4bbedcb add an example to setControlCHook (#19416)
* add an example to setControlCHook

* [skip CI] format example for setControlCHook

Co-authored-by: Nathan Blaxall <nathan.blaxall@actionstep.com>
2022-01-19 12:25:21 +01:00
flywind
b3c178c202 suppress deprecated warnings (#19408)
* suppress deprecated warnings

once bump version to 1.7.3 enable deprecated messages

* deprecate later
2022-01-19 08:39:22 +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
wenghongquan
742e9d65ad Add support for LoongArch (#19223)
* Add support for LoongArch

* Update compiler/installer.ini

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-12-09 14:00:33 +01:00
narimiran
c239db4817 bump NimVersion to 1.7.1 2021-10-19 17:01:56 +02:00
flywind
45c4332c81 document -d:nimStrictDelete [backport] (#18939) 2021-10-03 07:22:53 +02:00
flywind
5eb357f5a2 change comment (#18913) 2021-09-28 06:45:25 +02:00
Andreas Rumpf
90a2b5afd8 correct effect tracking for .borrowed procs [backport] (#18882)
* correct effect tracking for .borrowed procs [backport]

* progress

* fix error message in a test

* correctly fix it

Co-authored-by: narimiran <narimiran@disroot.org>
2021-09-23 16:47:24 +02:00
Andreas Rumpf
ac7acd827c we need something better than warningAsError for effect handling viol… (#18796)
* we need something better than warningAsError for effect handling violations
2021-09-04 08:18:00 +02: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
Andreas Rumpf
9c2442af94 unary slices get a deprecation period (#18549) 2021-07-21 09:46:18 +02:00
Timothee Cour
cf0cf32d27 make -d:nimFpRoundtrips work consistently in vm vs rt, fix #18400, etc (#18531)
* compiler/vmhooks: add getVar to allow vmops with var params
* addFloat vmops with var param
* cgen now renders float32 literals in c backend using roundtrip float to string
2021-07-20 22:13:52 +02:00
flywind
dbf8d0b894 use more .} (#18542) 2021-07-20 20:12:15 +08:00
Andreas Rumpf
99c4b69097 fixed system.delete (#18507) 2021-07-18 15:16:26 +02:00
Andreas Rumpf
96a7f9b31c deprecate cuchar, don't redefine it (#18505) 2021-07-16 15:50:02 +02:00
Andreas Rumpf
4ec2f74246 ORC: support for custom =trace procs (#18459)
* ORC: support custom =trace procs (WIP)
* Update tests/arc/tcustomtrace.nim

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

* =trace is now documented and seems to work
* make test green

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-07-09 15:15:49 +02:00
Andreas Rumpf
3eb3e6b9a3 ORC: use =destroy instead of =dispose (#18440)
* ORC refactoring in preparation for further changes (=dispose must die)
* ORC: embrace =destroy, avoid =dispose
* ORC: no need for =dispose
* closes #18421
2021-07-07 09:39:01 +02:00
Heiko Nickerl
92cb765714 Raise IndexDefect when deleting element at out of bounds index (#17821)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Heiko Nickerl <mail@hnicke.de>
Co-authored-by: Heiko Nickerl <heiko.nickerl@flipapp.de>
2021-06-20 08:56:33 -07:00
Euan
a2b6081256 Ref #18177 - lbgc.so.5.0 on OpenBSD 6.9 (#18180) 2021-06-04 15:46:57 -07:00
Timothee Cour
98ea61f09b dont silence hints in system.nim (#18034) 2021-05-30 23:57:25 +02:00
Timothee Cour
2ce592a209 refs #18011 disable some newly failing tests on cpp windows; refs #17946 increase timeout for tchannels (#18012) 2021-05-14 15:33:17 -07: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
Timothee Cour
ee6d56141c fix #17911 rawProc for cpp (#17912) 2021-05-01 11:12:13 +02:00
Andreas Rumpf
fb86271556 system.nim cleanup some exported constants which should never have be… (#17909)
* system.nim cleanup some exported constants which should never have been exported
2021-05-01 11:10:40 +02:00
Timothee Cour
82996aee3f misc fixes: remove forceConst (obsolete by static), add more runnableExamples to system (#17896)
* misc fixes

* add runnableExamples for compileOption

* add runnableExamples for runnableExamples

* move tconsteval => tconst

* cleanup
2021-05-01 07:26:52 +02:00
Gabriel Huber
34a09574ce Document the difference between toFloat/toInt and type conversion (#17894) 2021-04-30 22:39:25 +02:00
flywind
68e522ecec Remove confusing <//> (#17830) 2021-04-26 09:04:52 +02:00
Timothee Cour
4742e6e1fd followup #16714: add -d:nimLegacyUnarySlice + changelog (#17794) 2021-04-20 00:25:28 -07:00
Timothee Cour
ad67bcf379 fix https://github.com/nim-lang/RFCs/issues/311 remove unary slice (#16714) 2021-04-19 19:02:52 -07:00
Clyybber
6de5aa1971 Rename = to =copy in stdlib (#17781) 2021-04-19 13:16:10 +02:00
Andreas Rumpf
7b6ab5109f IC exposes typedesc implementation shenanigans (#17759)
* IC exposes typedesc implementation shenanigans; so I change system.default's definition to what it should have been to begin with
* Update lib/system.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-04-18 07:27:03 +02:00
shirleyquirk
c8b8cb8458 make cuchar alias uint8 instead of char (#17738) 2021-04-17 17:27:10 +02:00
Tanguy Cizain
363467fc00 Fix array's high & low return type for empty arrays (#17705)
* fix array.high/low return type

* Add test for empty array low return type

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

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-04-15 15:45:38 +02:00
Timothee Cour
ceadf54d76 iterable[T] (#17196)
* 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
2021-04-11 14:25:41 +02:00
Timothee Cour
28de32c8b2 document caveats of quit (#17648) 2021-04-05 12:19:17 -07:00
flywind
e2269f9216 [docs]fix #17473 (#17565)
* fix nim js cmp fails at CT

* Add `hasClosure` to `std/effecttraits`

* type

* Update changelog.md

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* fix #14011

* Delete ttypetraits.nim

* Apply suggestions from code review

* fix #17473

* Revert "fix #14011"

This reverts commit 0eed97a84b.

* Update lib/system.nim

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

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-03-29 14:39:49 +02:00
ee7
eb3ed44009 system: fix link in delete proc (#17550)
The `delete` proc had a "See also" link that linked to itself.
2021-03-28 12:44:16 +02:00
Timothee Cour
1590d14575 fix #17260 render \ properly in nim doc, rst2html (#17315) 2021-03-24 10:58:29 +01:00
Andreas Rumpf
6c1c8f51b3 IC: green tests (#17311)
* IC: renamed to_packed_ast module to ic module

* IC: don't store the --forceBuild flag, makes it easier to test

* IC: enable hello world test

* Codegen: refactorings for IC; changed the name mangling algorithm

* fixed the HCR regressions

* life is too short for HCR

* tconvexhull is now allowed to use deepCopy

* IC exposed a stdlib bug, required a refactoring

* codegen: code cleanups

* IC: even if a module is outdated, its dependencies might come from disk

* IC: progress

* IC: better name mangling, module IDs are not stable

* IC: another refactoring helping with --ic:on --gc:arc

* disable arraymancer on Windows for the time being

* disable arraymancer altogether

* IC: make basic test work with 'nim cpp'

* IC: progress on --ic:on --gc:arc

* wip; name mangling for type info
2021-03-19 16:53:38 +01:00
flywind
2e730f1452 rename channels to channels_builtin (#17330)
* improve test coverage for isolation

* a bit better

* rename channels to channels_builtin
2021-03-12 13:04:32 +01:00
flywind
5670b848cb use .. warning:: (#17226)
* remove unnecessary when statement

* remove outdated codes

* use warnings
2021-03-04 11:34:55 +01:00
Timothee Cour
f561afae41 followup #17225: simplify code after removing gc2, generational (#17242) 2021-03-03 13:37:42 +01:00
Timothee Cour
e417bd62f7 \r now renders as \r, not \c which was not standard (#17244) 2021-03-03 11:57:00 +01:00
flywind
a04c9d1f62 rename prepareStrMutation to prepareMutation (#17235)
* remove unnecessary when statement

* remove outdated codes

* rename prepareStrMutation to prepareMutation
2021-03-03 08:08:52 +08:00