Mark Leyva
285ea3c48e
Fix : #21541 . Add support for xnVerbatimText ( #21542 )
...
to text and text= procs. Remove unnecessary LF for xnVerbatimText
in $ proc.
2023-03-20 18:50:58 +01:00
Ivan Yonchovski
fb00b482eb
Avoid calling build_all* when nim binary is present ( #21522 )
...
- `nimble` will build `nim` using `bin/nim` and if it is already present we can
reuse it.
2023-03-20 18:49:59 +01:00
Regis Caillaud
ba22826e9b
Add check for nimMaxJeap on occupied memory + allocation size ( #21521 )
...
* fix nimMAxHeap checks
* move check to alloc pages
* remove debug trace
* Fix bad indentation
How the hell did that pass through CI ?
2023-03-20 18:49:18 +01:00
Jake Leahy
741fed716e
Use analyseIfAddressTaken logic for checking if address is taken in converter ( #21533 )
...
* Add a test case
There are way more test cases (See all branches of analyseIfAddressTaken but this covers at least a second branch
* Port analyseIfAddressTaken from semexprs to sigmatch
This was done since we cannot import sem or semexprs (circular import) but we need the rest of the logic. In needs to be done here since the converter isn't semmed afterwards and so we can't just leave the process til later use the version from semexprs
* Less hacky solution which has the checking be done in analyseIfAddressTakenInCall
This was done instead of the recommendation on removing it since sfAddrTaken is used in places other than the backend
* Remove weird whitespace
* Still check nkHiddenAddr if we are checking a converter
2023-03-20 18:48:13 +01:00
Hiroki Noda
ae06c6623d
NuttX: use posix_spawn for osproc ( #21539 )
...
NuttX has standard posix_spawn interface, and can be used with it.
* https://nuttx.apache.org/docs/12.0.0/reference/user/01_task_control.html#c.posix_spawn
2023-03-20 18:43:10 +01:00
Hiroki Noda
0c1d595fae
NuttX: use accept4 ( #21544 )
...
NuttX supports accept4 since 48c9d10336
2023-03-20 18:41:25 +01:00
Joey
cae539996a
Update LLDB debug script + Add Custom Nim formatters ( #21517 )
...
* Fix custom objects, fix handling of nil variables
* Rename because lldb complains about dashes in filename
* Add example of how to use custom type formatting from Nim
* Add synthetic objects with dynamic fields and add an example
2023-03-19 06:28:00 +01:00
Jason Beetham
a9d0124b5d
Made generic type classes work with types using static parameters ( #21528 )
2023-03-17 10:17:08 +01:00
ringabout
fd4e3ae3e4
add a prepass for codeReordering ( #21513 )
...
* add a prepass for codeReordering
* simplify
* fixes
2023-03-17 08:02:48 +01:00
ringabout
b5ee81fd23
fix #18977 ; disallow change branch of an object variant in ORC ( #21526 )
...
* fix #18977 disallow change branch of an object variant in ORC
* check errors for goto exception
* fixes conditions
* fixes tests
* add a test case for #18977
2023-03-16 16:06:26 +01:00
ringabout
6552a27ec1
fixes #19857 ; Exception raised in closure may be "skipped" in ORC ( #21530 )
...
fixes #19857 ; Exception raised in closure may be "skipped"
2023-03-16 21:07:54 +08:00
Hiroki Noda
c43ac90390
Add NuttX for thread stack size doc ( #21529 )
2023-03-16 18:03:43 +08:00
Amjad Ben Hedhili
26b7a74a45
Optimize cgen.addIndent ( #21508 )
...
* Optimize `cgen.addIndent`
* Avoid temporaries
2023-03-13 17:32:20 +01:00
Amjad Ben Hedhili
c52e44d845
Add cursor annotations to lists iterator variables ( #21507 )
...
Add `cursor` annotations to iterator variables
* See https://nim-lang.github.io/Nim/destructors.html#the-cursor-pragma
2023-03-13 08:43:45 +01:00
ringabout
b2c1dcbbc9
fixes explicit globals in macros ( #21502 )
2023-03-12 20:03:46 +01:00
ringabout
ffadc75afe
fixes #21496 ; Ambiguous calls compiles when module name are equal ( #21500 )
...
* fixes #21496 ; Ambiguous calls compiles when module name are equal
* add a test case
2023-03-12 20:03:14 +01:00
ringabout
af086b68f2
fixes sinkinference documentation, which has been disabled ( #21470 )
...
since https://github.com/nim-lang/Nim/pull/15105
2023-03-12 13:01:12 +08:00
Andreas Rumpf
46d2161c23
minor refactoring ( #21499 )
2023-03-10 14:20:30 +01:00
ringabout
f2dad94902
fixes #21306 ; fixes #20485 ; don't transform yields in the var section when introducing new local vars [backport: 1.6] ( #21489 )
...
* fixes #21306 ; don't transform yields in the var section when introducing new local vars
* adds `inVarSection` so the var section in the var section is freshed
* use `isIntroducingNewLocalVars` to avoid yield transformations in var sections
* fixes comments
2023-03-10 14:19:31 +01:00
ringabout
0319824322
fixes #21023 ; Segfault when mixing seqs, orc, variants and futures ( #21497 )
...
* fixes #21023 ; Segfault when mixing seqs, orc, variants and futures
* fixes none of the branches were explicitly selected
* add one more test
* one more test
2023-03-10 09:28:51 +01:00
ringabout
72e262666b
fixes quoted variables with typedesc types ( #21493 )
2023-03-09 08:09:08 +01:00
ghost
8e9fc5e639
a better message if graphviz's dot/nodejs is not found in PATH ( #21488 )
...
* finish issue #21474 : a better message if dot is not found locally when using gendepend
* fix a typo in compiler
* trim empty path reported in `findNodeJs`
* compiler/main.nim: switch raise to simply quit
2023-03-08 22:34:59 +01:00
ringabout
2f89f1eb78
closes #8295 ; add a test case ( #21486 )
2023-03-07 20:17:05 +08:00
ringabout
6ef9430153
closes #6231 ; add a test case ( #21485 )
2023-03-07 17:34:02 +08:00
Jake Leahy
25eef64fe1
Remove Defect from raises list in std/times ( #21473 )
...
* Remove Defect from raises list
Since defects aren't tracked anymore this causes a hint to pop up mentioning it
* Still track Defect when getting ran with an older Nim version
The raises followed a pattern so moving them into a pragma didn't seem to cause any extra problems
2023-03-06 15:31:53 +01:00
ringabout
64a0355f3f
fixes #21377 ; fixes @[] and {} type inference as returns in generics ( #21475 )
...
* fixes `@[]` type inference in generics
* add issue links
* fixes macros and iterators
* refactor
* add one more test
2023-03-06 15:30:22 +01:00
ringabout
2d9af2bd55
closes #20704 ; add a test case ( #21480 )
2023-03-06 17:34:41 +08:00
ringabout
4d76725299
closes #16654 ; add a test case ( #21478 )
2023-03-06 14:12:47 +08:00
Joey
05e8a60bb4
Add line directives for C code variables ( #21466 )
...
* Add line directives for C code variables
* Refactor genCLineDir to only use toFullPath if necessary
2023-03-05 20:14:59 +01:00
SirOlaf
7bde421e4d
Fix #21272 : Rewrite parts of pickBestCandidate ( #21465 )
...
* Make pickBestCandidate store syms
* Remove useless cursor
* Try making pickBestCandidate more readable
* Fix advance order
* Revert back to seq with lots of comments
---------
Co-authored-by: SirOlaf <>
2023-03-05 11:56:51 +01:00
Sultan Al Isaiee
04a494f8cf
Add warning to specify timeout value in milliseconds, Fix #21449 ( #21471 )
...
a warning message been added to the documentation to remind users that the timeout parameter is expressed in milliseconds, not seconds. to help prevent confusion and unexpected behaviours.
2023-03-04 15:53:57 +01:00
ringabout
d950e5f3a8
remove nosinks hacks from compiler ( #21469 )
2023-03-04 20:07:33 +08:00
quantimnot
6994e1b1d7
--embedsrc for JavaScript (#21467 )
...
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com >
2023-03-04 07:57:30 +01:00
Arnaud Moura
b2c5f8a05f
fixes #21461 ( #21463 )
...
* fixes #21461 ; Move nim-gdb.py and add nim-lldb.py
* fixes bad path for nim-gdb.py
2023-03-03 23:37:12 +01:00
ringabout
2e2affb13c
test DLL generation with ORC ( #21445 )
...
* test DLL generation with ORC
* fixes
* fixes refc
* Update testament/categories.nim
2023-03-03 23:13:27 +08:00
ringabout
d51a392149
replaces implicit passes array registed at runtime with explicit function calls; simplify compilation pipeline ( #21444 )
...
* abolish using passes in the compiler; simplify compilation pipeline
* duplicate code
* Really cool to have the same signature...
* haul
* unify other backends
* refactor process
* introduce PipelinePhase
* refactor compiler
* fixes passes
* fixes nimsuggest
* add a sentinel
* enable docs checkj
* activate doc testing
* clean up
* complete cleanups
2023-03-03 07:36:38 +01:00
Jake Leahy
d4d28f2ffe
Allow futureLogging in release builds ( #21448 )
...
* Add test case
* Fixes 21447: Keeps stackTrace around when using futureLogging
* Remove extra whitespace
2023-03-02 14:27:10 -05:00
ringabout
38d299dfc0
fixes #20139 ; hash types based on its path relative to its package path ( #21274 ) [backport:1.6]
...
* fixes #20139 ; hash types based on its path relative its project
* add a test case
* fixes procs
* better implementation and test case
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2023-03-02 09:16:28 +01:00
Andreas Rumpf
50baf21eac
fixes #20422 ; emit nimPrepareStrMutationV2 for toOpenArray to keep th… ( #21459 )
...
fixes #20422 ; emit nimPrepareStrMutationV2 for toOpenArray to keep the abstraction of mutable strings which have immutable string literals
2023-03-02 08:36:02 +01:00
tersec
612abda4f4
remove decades-deprecated Win32 API *A function support ( #21315 )
2023-03-02 05:51:54 +01:00
Ivan Yonchovski
9b5ae2b2eb
Define the version of nim package without using system module ( #21415 )
...
This is follow up from https://github.com/nim-lang/Nim/pull/21313
2023-03-02 05:30:55 +01:00
ringabout
a137e50150
fixes #19291 ; implements wasMoved hook ( #21303 )
...
* fixes #19291 ; implements `wasMoved` hook
* basics
* checkpoint
* finish `wasMoved`
* add a test for #19291
* add documentation and changelog
* work `attachedWasMoved` with generics
* fixes optimizer
* register `=wasMoved`
* handle wasMoved magcis
* check another round
* some patches
* try `op == nil`
* nicer
* generate `wasMoved` before `destroy`
* try again
* fixes tests
* default wasMoved
* Update tests/destructor/tv2_cast.nim
* Update tests/destructor/tv2_cast.nim
* Update tests/arc/topt_refcursors.nim
2023-03-02 05:29:40 +01:00
ringabout
9948fed919
fixes #21326 ; fixes #7375 ; fixes #11986 ; fixes #9607 ; rework quote do; getAst uses type info to annotate the type of quoted variables; no more type erasures for quoted variables ( #21433 )
...
* fixes #21326 ; getAst uses type info to annotateType quoted variables
* simplify logics; sem types first
* fixes important packages
* add testcases
* tiny
2023-03-02 05:25:55 +01:00
Anna
070938720a
tests/errmsgs/tcall_with_default_arg.nim: sync ( #21237 )
2023-03-01 21:29:23 +01:00
Anna
cf083af262
tests: explicitly enable stack traces where needed ( #21236 )
...
* tests/assert/tassert_c.nim: explicitly enable stack traces
* tests/errmsgs: explicitly enable stack traces
2023-03-01 18:01:58 +01:00
Anna
89d8c0b246
tests/stylecheck: make sure necessary hints are enabled ( #21240 )
2023-03-01 18:00:58 +01:00
ringabout
1b1412f3d1
fixes #10938 ; fixes #13312 ; fixes #13918 ; fixes #20985 ; always initializes global variables with null values in VM ( #21351 )
...
* fixes #10938 ; always initialize global variable in VM
* fixes importc vars
* there is a pre-existing issue regarding closure types in the VM
* add tests
2023-03-01 17:18:09 +01:00
heterodoxic
c4dd0c4301
suggestion for a simple fix for #21279 ( #21378 )
2023-03-01 17:17:05 +01:00
Constantine Molchanov
39d0a93d0e
Fix #21452 ; enable Norm in important packages. ( #21455 )
...
* fix #21452 ; enable Norm in important packages.
* Run test that doesn't require SQLite.
2023-03-01 10:30:38 +08:00
Century Systems
dd629c8f45
asyncdispatch: for NuttX, add destructor to clear global dispatcher. ( #21432 )
...
* asyncdispatch: for NuttX, add destructor to clear global dispatcher using atexit().
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp >
* std: exitprocs: remove "when defined(nuttx)" block.
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp >
---------
Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp >
2023-02-28 14:38:50 +01:00