Commit Graph

20395 Commits

Author SHA1 Message Date
ringabout
96c5586d03 add plausibleAnalytics support for koch docs[backport:1.6] (#20454)
add plausibleAnalytics to koch docs[backport:1.6]
2022-09-30 12:39:28 +02:00
ringabout
ae050b05e9 koch boot compiler with orc (#20467)
* koch boot compiler with orc

* use orc

* workaround bugs

* move it

* move the data
2022-09-30 12:38:25 +02:00
ringabout
3e43ea3384 make koch and tools work with nimPreviewSlimSystem (#20459) 2022-09-30 08:09:40 +08:00
ringabout
716d68cb24 fixes postgres with nimPreviewSlimSystem (#20455) 2022-09-29 23:54:45 +08:00
Juan Carlos
1e635bb539 Undeprecate isvalidfilename (#19643)
* Remove deprecated isvalidfilename
* https://github.com/nim-lang/Nim/pull/19643#issuecomment-1235102314
* https://github.com/nim-lang/Nim/pull/19643#issuecomment-1235102314
* https://github.com/nim-lang/Nim/pull/19643#issuecomment-1235102314
* Add unittests
* Add more

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-09-29 12:22:29 +02:00
ringabout
f56085f21e refactor dbFormat (#19746)
* refactor dbFormat

* add simple tests
2022-09-29 12:16:42 +02:00
Andreas Rumpf
77a65d3c33 fixed tstrimpl (#20452) 2022-09-29 09:41:00 +02:00
ringabout
a8cc5d1379 Unicode Operators are no longer experimental (#20444)
* Unicode Operators are no longer experimental

* fixes tests

* Update doc/manual.md

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-09-28 22:37:26 +02:00
ringabout
65c2518d5c fix #19500; remove find optimization [backport: 1.6] (#19714)
* remove find optimization

close #19500

* save find to std

* add simple tests

* Apply suggestions from code review

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

Co-authored-by: sandytypical <43030857+xflywind@users.noreply.github.com>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2022-09-28 16:05:41 -04: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
b463c8aedf fixes changelog links (#20446) 2022-09-28 19:40:14 +02:00
Tomohiro
92a0f191bf Use vccexe when generating static lib with vcc (#19843) 2022-09-28 15:07:41 +02:00
metagn
de4b0346bd store full definition AST for consts, fix noRewrite (#20115)
* continue #9582 for consts, close #9331, fix #20114

also move extractPragma to ast to pave the way for things like {.strdefine: "abc".} etc

* changelog correctly

* fix jsgen

* update tgetimpl

* fix sighashes

* fix #19766, add comment about postfix

* fix noRewrite LOL

refs #16620

* fix changelog

* fix destructors
2022-09-28 15:05:01 +02:00
ringabout
fdc6b0fb6e fixes #19986; mutable view from immutable location (#20134)
* fixes #19986; mutable view from immutable location

* fixes the tests
2022-09-28 14:02:07 +02:00
konsumlamm
18cea8e9bd Update message for checking cast (#20145)
* Update message for checking `cast`

* Update error messages in tests
2022-09-28 13:59:27 +02:00
ringabout
e33e9e4a32 fixes #20141; dereferencing pointer to incomplete type error with cast (#20147)
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
2022-09-28 13:57:47 +02:00
ringabout
fe8feb46c6 fixes #19457 seqs are not properly updated in loop with ARC/ORC (#19922)
* test CI

* fixes #19457

* add comments

Co-authored-by: sandytypical <43030857+xflywind@users.noreply.github.com>
2022-09-28 13:12:08 +02:00
ringabout
95614089ac remove deprecated and broken nimweb tools (#20442)
* remove deprecated and broken nimweb tools

* readme
2022-09-28 12:14:35 +02:00
ringabout
89f76bb448 follow up #19408; bump devel version and deprecated unsafeAddr (#20432)
bump devel version and deprecated unsafeAddr
2022-09-28 11:09:01 +02:00
Nan Xiao
fd257a9a0f Refactor initOptParser (#19656)
Co-authored-by: flywind <xzsflywind@gmail.com>
2022-09-27 15:00:57 -04:00
ringabout
80e739f2bf fixes #19401; fixes #19402; rework Forward declaration and finalizer for ORC (#20295)
* fixes #19401; fixes #19402; rework Forward declaration and finalizer for ORC

* add more tests

* give it a name

* make more tests

* fixes tests

* hidden addr for cpp

* move code to a function
2022-09-27 20:07:26 +02:00
ringabout
3d2f0e2c7c make more standard libraries work with nimPreviewSlimSystem (#20343)
* make more standard libraries work with `nimPreviewSlimSystem`

* typo

* part two

* Delete specutils.nim

* fixes more tests

* more fixes

* fixes tests

* fixes three more tests

* add formatfloat import

* fix

* last
2022-09-27 20:06:23 +02:00
Amjad Ben Hedhili
98a717dda9 allow more simple expressions in js (#20270)
* make it match ccgexprs.nim `isSimpleExpr`
* x in {1, 2}
* r[].x and r.x when r is ref type
* float(x)

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-27 12:47:45 +02:00
Amjad Ben Hedhili
d755c02b02 Compute small nim string lit at CT (#20439)
* Reduces runtime overhead for small strings.
* Avoids including `makeNimstrLit` in the output when all strings are
  small enough.
2022-09-27 11:11:09 +02:00
Andreas Rumpf
ca1f3f36b9 no ropes WIP (#20433)
* refactorings in preparation for ropes elimination of the C code generator; mostly the usual ': Rope' -> 'result: var Rope' rewrite
* rewrote ccgcalls.nim
* refactored ccgexprs.nim
* ccgliterals: refactoring
* refactoring: code dealing with name mangling
* refactoring: getRecordFieldsAux
* ropes are strings (insert obscene joke here)
* optimize JS code gen
* optimizations and code improvements
* more optimizations
* final cleanups
2022-09-27 10:57:47 +02:00
Peter Munch-Ellingsen
805186809c Fix issue with fields trying to use wrong name (#12655)
* Fix issue with fields trying to use wrong name

* Fix similar issue in winlean

* Revert accidental csize change

Co-authored-by: Clyybber <darkmine956@gmail.com>
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
2022-09-26 15:44:02 -04:00
n5m
6b4ea88734 use almostEqual in tstats.nim (#20431)
prefer math.almostEqual
2022-09-26 15:42:26 -04:00
ringabout
cb24eea86b fixes #20426; remove maincommand and m options since they are a no op since 2014 (#20429)
* bump macOS image on Azure CI to macos-11

##[warning]The macOS-10.15 environment is deprecated, consider switching to macos-11(macos-latest), macos-12 instead. For more details see https://github.com/actions/virtual-environments/issues/5583

* fix CI error

* fixes #20426; remove `maincommand` and `m` options since they are a noop since 2014 and causes confusion

fixes #20426

7f7b13a45f (diff-d949f8c356fd2dc9ceedc6f3dbbd01e2c806269dd0a8ad6516facf589fa2c99a) makes it a no op, but it causes a regression because it should add `expectArg(switch, arg, pass, info)` before the discard statement. It causes https://github.com/nim-lang/Nim/issues/20426 to happen. Without `expectArg(switch, arg, pass, info)`, `-mm:orc` is wrongly interpreted as `-m` and compiler, which doesn't make sense. It should either abort compilation or prints `argument for command line option expected: '-m'` message. Since they are a no op since 2014, let's remove it to clear the confusion. Let's wait and see whether it breaks something.

* add a changelog
2022-09-26 15:40:20 -04:00
n5m
9ca88a1889 fix #18128 rfind on empty needle returns rightmost index (#20430)
rfind on empty needle returns haystack len
2022-09-26 15:39:22 -04:00
ringabout
b213913dcb add a changelog and update the document for ORC (#20415)
* add a changelog and update the document for ORC

* hone

* back

* Apply suggestions from code review

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update doc/mm.md

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update doc/mm.md

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2022-09-26 19:32:08 +02:00
Amjad Ben Hedhili
40dae8c731 Represent more types as JS TypedArrays (#20411)
* Represent `array[N, char]` as JS `UInt8Array(N)`

* Add support distinct and range types

* Add support for bools and enums
2022-09-26 12:26:28 +02:00
Bung
e13cd40e21 fix #2614 improve error message when array of proc calling convention… (#20379)
fix #2614 improve error message when array of proc calling convention mismatch
2022-09-26 11:58:13 +02:00
Amjad Ben Hedhili
f7f375f59d Optimize base64.encodeMime (#20409)
* Optimize `base64.encodeMime`

* 5x faster for common scenarios, 13x faster if `lineLen` <= encoded
string's length or `newLine` is empty.
* Changed `lineLen`'s type to `Positive` to disallow `0`.

* Fix
2022-09-25 15:23:23 -04:00
ringabout
30bd75e459 continue booting the compiler with refc (#20421)
* continue boot the compiler with refc

* koch

* use `gc:refc`
2022-09-24 20:14:01 +08: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
ringabout
47b59e4d33 fix #17351; switch to c++17 and remove hacks (#20407)
* fix #17351; switch to c++17

* remove workaround
2022-09-23 11:16:43 +02:00
Aditya Siram
be4bd8a0ed Fixes #20348; only respect the recursion limit if the symbol's generic type has been generated by the compiler (#20377)
Fixes #20348
2022-09-22 14:19:36 -04:00
ringabout
db8a62d480 fixes #20285; prevent oid time overflow at year 2038 (#20338)
* Revert "fixes  #20285; prevent oid time overflow at year 2038"

This reverts commit dfcdb6ec2a.

* increase time to 64 bits and clean up

* add testcase

* inline consts

* add a changelog

* fixes  #20285; prevent oid time overflow at year 2038
2022-09-22 21:15:27 +08:00
Andrey Makarov
ae3dd759c4 Extract markdown/rst doc into separate file (#20404)
* Extract Markdown & Rst doc into separate file

This documentation should be extracted into separate file
as it's user's documentation, which can be used as a separate
utility for compiling `.md/.rst` files.

* Restructure: move markup info into markdown_rst.md

+Markdown link migration
2022-09-22 12:05:53 +02:00
Bung
2afce84616 Improve error message when instantiating generics with object constructor (#20358)
* Improve error message when instantiating generics with object constructor

* follow suggestion

* Update compiler/semobjconstr.nim

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update tests/errmsgs/t19882_2.nim

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-21 21:11:39 -04:00
Bung
de089d7fdb contentLength default to -1 if not present (#19835)
* contentLength default to -1 if not present

* `httpclient.contentLength` changelog
2022-09-21 18:01:22 -04:00
ringabout
70c25c45d6 fixes #20397; fixes stylecheck regression (#20398)
* fixes  #20397; fixes stylecheck

* add testcase
2022-09-21 15:04:33 -04:00
Judd
4133698f2d Update manual.md (#20394)
* Update manual.md

update outdated information on `ObservableStores`.

* Update manual.md

add `base` pragma to fix the warning.

* Update doc/manual.md

accept.

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* Update manual.md

update example code.

* Update manual.md

1. more updates to help keeping readers on track.
1. fix typos.

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-21 15:00:55 -04:00
Juan Carlos
ebb1b7af23 RFC-460 implemented (#19771)
* RFC-460 implemented

* RFC-460 implemented

* RFC-460 implemented

* Fix dumb GitHub autoupdate on changelog
2022-09-21 10:37:13 +02:00
ringabout
e0c1159fb3 fixes #20391; make of operator work with generics for ORC (#20395) 2022-09-21 10:29:39 +02:00
ringabout
de70128fcc follow up #19968; add more tests (#20396) 2022-09-20 16:14:01 -04:00
ringabout
4a1bda667c turn nimIncrSeqV3 into deadcode (#20388) 2022-09-20 14:59:50 +02:00
metagn
3dc302662e clarify distinct pointer type nil change (#20376)
* clarify distinct pointer type `nil` change

* Update changelog.md [skip ci]

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>

* remove extra quote [skip ci]

Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
2022-09-20 14:58:22 +02:00
Bung
08c02f0236 report expression has no type other than has to be used (or discarded… (#20392)
report expression has no type other than has to be used (or discarded) when typ is tyNone in discardCheck
2022-09-20 14:50:48 +02:00