Commit Graph

7428 Commits

Author SHA1 Message Date
Araq
2dea920379 ARC: implemented a simple cycle detector 2019-11-28 23:00:34 +01:00
PMunch
b662842bd0 Fix for 16 bit platforms (#12760) [backend]
This fixes some tiny issues with using Nim on 16-bit platforms. Not
entirely sure why the AVR chip I was compiling for with "cpu = avr" was
detected as 16-bit, but that's probably another issue..
2019-11-28 17:11:56 +01:00
3n-k1
0944b0f441 [backport] Fix style issues in lib/, tools/, and testament/. Fixes #12687. (#12754) 2019-11-28 08:32:11 +01:00
Brian Wignall
a7aeabb9d2 [backport] Fix spelling typos (#12755) 2019-11-28 08:30:55 +01:00
Andreas Rumpf
fd85a5ae05 more fixes for --cpu:avr [backport] (#12748) 2019-11-27 16:24:21 +01:00
Araq
72237e2bcf ARC: ported the GC tests over to --gc:arc 2019-11-26 16:04:28 +01:00
Andy Davidoff
bd8f49cbd3 replace some runtime repr in stdlib for gc:arc (#12716) 2019-11-25 10:13:30 +01:00
Mamy Ratsimbazafy
1f7871ea1c csize_t changes: pinToCpu didn't compile (#12725) 2019-11-25 08:42:19 +01:00
Arne Döring
2acf74d458 delete list comprehension (#12392)
The `lc` macro is now part of `graveyard` repository.
2019-11-22 19:57:43 +01:00
Jack Tang
f0c5d99924 index out of bounds exception when data is empty (#12428) 2019-11-22 15:37:59 +01:00
b3liever
5bb6c67a45 add collect macro (#12708)
* add collect macro

* Add to changelog
2019-11-22 14:40:50 +01:00
Andreas Rumpf
e5478b32a8 fixes #11863 multipart data need $ (#12707)
* fixes #11863
* improved the code; refs #12412
2019-11-22 14:21:03 +01:00
Andreas Rumpf
85ffcd80c0 more arc improvements (#12690)
* ARC: bugfix for =destroy for inherited objects
* added code useful for debugging
2019-11-20 14:34:05 +01:00
c-blake
a88004114d Discussion both in (#12678)
https://github.com/nim-lang/Nim/pull/12600
and in
    https://forum.nim-lang.org/t/5499
indicates that everyone is happy/happier with ``pop``.

This just renames the brand new ``take``s to ``pop`` and installs inline
aliases/wrappers to preserve ``Table.take`` and ``TableRef.take``.

Update apis.rst to try to maintain consistency of remove-and-return procs.
2019-11-20 08:39:45 +01:00
Dominik Picheta
bab5351d43 Fixes ambiguity errors when evaluating Nimble files. (#12674) [backport]
When trying to evaluate a Nimble file which imports a Nim module
I was getting the following errors for some reason:

```
/Users/dom/projects/nim/lib/pure/parseopt.nim(229, 46) Error: ambiguous call; both system.paramCount() [declared in /Users/dom/projects/nim/lib/system/nimscript.nim(65, 6)] and os.paramCount() [declared in /Users/dom/projects/nim/lib/pure/os.nim(2613, 8)] match for: ()
```
2019-11-18 09:26:06 +01:00
Andreas Rumpf
58f3e07b1a fixes and changes the recently introduced 'alignas' to be 'align' (#12666)
* fixes and changes the recently introduced 'alignas' to be 'align'

* more improvements
2019-11-15 20:24:14 +01:00
Juan Carlos
9c46526cfa Fix htmlgen html lang (#12668) [backport]
* Fix HTMLGen enable lang on html tag
2019-11-15 20:23:03 +01:00
David Krause
ffca3eefb5 fix documentation of $*(dt: DateTime) (#12660)
(cherry picked from commit 39122ecd93)
2019-11-15 08:06:26 +01:00
Andreas Rumpf
6ad0238fd7 make tests green again 2019-11-13 23:29:21 +01:00
Araq
25c724d38b gc:arc: support GC_ref/unref for ref T 2019-11-13 23:29:21 +01:00
Araq
eea0cb07cf async: cleaner solution that avoids GC_ref on strings which doesn't exist for --gc:arc 2019-11-13 23:29:21 +01:00
narimiran
8394c00300 remove long-deprecated 'mapIt' 2019-11-13 14:24:25 +01:00
Arne Döring
0496a666e2 implemented alignas pragma (#12643)
* implemented alignas pragma

* fix bootstrap

* generate c++ compatible syntax for alignas

* Make it work.

* Multiple alignof expressions. Implement top level alignof.
2019-11-13 08:22:41 +00:00
Andreas Rumpf
84861eb48a fixes #12644 2019-11-12 23:56:19 +01:00
Andreas Rumpf
dfb020b174 .cursor implementation (#12637)
* cursors: first implementation
* added currently failing test
* .cursor works for doubly linked lists
* make -d:useMalloc work again
* added code to nil out refs in a destructor
* it's now called --gc:arc
* renderer.nim: render nkBreakState properly
* make simple closure iterators work without leaking
2019-11-12 15:05:36 +01:00
Euan
7e689873e2 Fix #12135 and #12109 (#12137)
* Fix #12135 and fix #12109 - fix OpenBSD type defs

* Fix Mode definition as in #12132
2019-11-11 16:18:08 +01:00
b3liever
0c4d81241a Version of trimZeros without temp strings (#12633) 2019-11-11 12:54:17 +01:00
Clyybber
144ad36974 Implemented outplace differently (#12599)
* implemented sugar.outplace; refs #12550
* Different approach, allows for chaining
2019-11-09 12:52:31 +01:00
Miran
6958248efe fix #12519: introduce OrderedTable.take, CountTable.del, CountTable.take (#12600)
* add OrderedTable.take

* add CountTable.del and CountTable.take

* add .since pragma to the introduced public procs

* add changelog entry [ci skip]
2019-11-08 16:35:27 +01:00
cooldome
1e71c13697 fix compilation warning (#12618)
* fix compilation warning

* comments incorporated
2019-11-08 09:16:44 +01:00
Volodymyr Lashko
4e841ab156 Fix crash in terminate handler (#12572) [backport]
* fix undefined behavior in terminate handler

* fix failing unit test

* Revert "fix failing unit test"

This reverts commit 0e5e385fbf.

* Revert "fix undefined behavior in terminate handler"

This reverts commit 2b582871f1.

* do not throw inside terminate handler with msvc < 1923
2019-11-07 22:00:34 +00:00
Andreas Rumpf
135e945ff0 make parsexml compatible with --gc:destructors/newruntime 2019-11-07 18:18:51 +01:00
Yanis Zafirópulos
76085e8a45 added support for openArray's for gcd and lcm (#12621) 2019-11-07 18:06:48 +01:00
Arne Döring
a2d6691af2 fix #12597 (#12604) 2019-11-07 17:16:34 +01:00
Judd
8b1ef8e07e allow random module to be used in standalone: (#12617)
proc randomized*() uses time releated function which is not available on
standalone, so disable this function for standalone.
2019-11-07 14:48:33 +01:00
Arne Döring
94675c2378 backtick and export marker handling in eqIdent (#12574) 2019-11-07 14:40:44 +01:00
Andreas Rumpf
372b01711e added 'since' template for further stdlib additions 2019-11-07 14:20:39 +01:00
Andreas Rumpf
166048da5d osproc needs 'import linux' for -d:useClone 2019-11-07 09:51:15 +01:00
Dominik Picheta
675189c77f Merge pull request #12613 from nim-lang/miran-unused-imports
Remove unused imports
2019-11-06 22:08:43 +00:00
narimiran
717da9f158 [backport] print more information for the previous commit 2019-11-06 16:14:28 +01:00
narimiran
5381c810a8 [backport] rewrite flaky runnable example 2019-11-06 15:54:21 +01:00
narimiran
cc3e9ca164 remove unused imports 2019-11-06 12:01:00 +01:00
Araq
d19206755b async: use $ and not repr in debug mode 2019-11-05 17:10:02 +01:00
jiro
0694bd47b9 Add or detectOs(Manjaro) (#12587) [backport]
Using `pacman` command in Manjaro Linux

(cherry picked from commit 1ff3494dab)
2019-11-05 16:21:28 +01:00
Andreas Rumpf
3ba3307d61 remove deprecated procs (#12535) 2019-11-05 11:05:46 +01:00
Miran
ffa9a7405f fix #8242, fix #12586: fix 'formatFloat' with 'precision = 0' (#12592)
* fix #8242, fix #12586: fix 'formatFloat' with 'precision = 0'

'formatFloat' with 'precision = 0' now gives the same result
(a number without a decimal point) in all backends.
This is compatible with Python's formatters, too.

* fix failing tests

* add changelog entry

* add version switch
2019-11-05 10:31:23 +01:00
Kaushal Modi
b24560a140 Make sequtils.zip return seq of anonymous tuples (#12575)
* Make sequtils.zip return seq of anonymous tuples

Earlier the tuples had named fields "a" and "b" and that made it
difficult to assign the zip returned seqs to other vars which expected
seqs of tuples with field names other than "a" and "b".

* Make sequtils.zip backwards compatible with Nim 1.0.x
2019-11-04 21:11:43 +01:00
Miran
ae32d637f7 [backport] fix #12395 (#12590)
'countBits32' is now fixed in the same way that
'countBits64' was already patched earlier (by adding 'u32
where needed).
2019-11-04 15:02:36 +01:00
Arne Döring
992f0a7756 fix conversions to uint in varints.nim (#12564) 2019-11-04 13:06:08 +01:00
narimiran
bdc2bcc36c NimPatch of devel version should be an odd number because of the earlier hacks 2019-11-03 16:04:21 +01:00