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
Bung
a302b26e0e
fix #19882 Improve error message when instantiating generics that lac… ( #20356 )
...
* fix #19882 Improve error message when instantiating generics that lack a type
* Update tests/errmsgs/t19882.nim
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-09-19 18:31:40 -04:00
Andrey Makarov
c4ba4f06f8
Markdown link migration part 2 ( #20371 )
2022-09-19 18:24:40 -04:00
Juan Carlos
2147b116a1
Add missing proc to dom ( #20378 )
...
* Add missing proc from dom
* Add missing proc from dom
* Add missing proc from dom
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-09-19 17:51:47 -04:00
Juan Carlos
c8000b1025
Add missing symbols to regex ( #20383 )
...
* Add missing attribute to jsre
* Add missing attribute to jsre
2022-09-19 17:47:39 -04:00
Amjad Ben Hedhili
7023176dcb
Recommend mapIt in some cases ( #20347 )
...
* Recommend `mapIt` in some cases
* Remove runnableExample
2022-09-19 17:43:46 -04:00
Amjad Ben Hedhili
7a756bfaef
Shorten JS block code ( #20370 )
2022-09-19 15:09:41 +02:00
ringabout
97259a5ab3
fixes #19713 ; Revert "Remove tlsEmulation enabled from Windows + GCC config" ( #19119 ) ( #20327 )
...
* Revert "Remove tlsEmulation enabled from Windows + GCC config (#19119 ) [backport:1.6]"
This reverts commit 77b696c2c9 .
* increase nimTlsSize to 48000
* enable for windows
* fixes tests
* fixes tlsEmulation:on
2022-09-19 09:16:54 +02:00
ringabout
f6dc30e52d
fixes Thread initializer for ARC/ORC on Macos ( #20368 )
...
* fixes Thread initializer for ARC/ORC
* another try
* fix
* use int
2022-09-16 16:35:53 -04:00
Tanguy
3a5e38ab9d
Allow custom pragma on iterators [backport] ( #20344 )
...
Allow custom pragma on iterators
2022-09-17 02:10:47 +08:00
ringabout
d44b547144
add docs to copyNimNode and copyNimTree ( #20357 )
...
* add docs to copyNimNode and copyNimTree
* Apply suggestions from code review
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-09-16 00:35:44 -04:00
metagn
c7ee4ab509
don't run azure on other branches either ( #20365 )
...
* don't run azure on other branches either
refs #20184
Azure is more prone to clogging & it's especially bad with the timeouts (some PRs haven't rebased).
* allow all version- branches
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
* add closing quote
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-09-16 10:48:47 +08:00