Commit Graph

6354 Commits

Author SHA1 Message Date
Clyybber
5bd2da3f64 Fix #14911 (#14922) [backport]
* Fix #14911

* Add testcase

* Fix test
2020-07-07 10:21:18 +02:00
Dean Eigenmann
842efab8ae Update btrees.nim (#14916) 2020-07-06 10:23:42 +02:00
Clyybber
af27e6bdea Fix #14396 (#14793)
* Correct Left-To-Right evaluation of proc args
* Fix CPP backend
* Add testcase
* closes #14396
* closes #14345
* Improve test and optimize
* Improve testcase and optimize literals
* Fix bug
* Expand testcase and use DFA to optimize
* Turn genParams into proc
* Turn withTmpIfNeeded into a proc
* Cleanup
* Fix crash
* Better analysis
* Cleanup
* Trailing newline..
* Fix build
* Tiny cleanup

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-07-04 17:45:07 +02:00
Andreas Rumpf
1854d29781 scoped memory management (#14790)
* fixes the regressions
* closes #13936
* scope based memory management implemented
* enabled tcontrolflow.nim test case
* final cleanups
2020-07-04 07:37:24 +02:00
Timothee Cour
695154970d deprecate existsDir; use dirExists instead (#14884) 2020-07-03 23:04:23 +02:00
Timothee Cour
a6cbe58e8c typetraits.$: $((int, float), int) is now "((int, float), int)" instead of "(tuple of (int, float), int)" (#14812)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-07-02 16:19:43 +02:00
Timothee Cour
dc5a40f3f3 {.deprecated: [existsFile: fileExists].} (#14735)
* {.deprecated: [existsFile: fileExists].}

* s/existsFile/fileExists/ except under deps

* workaround pending #14819

* fix test
2020-07-02 16:19:13 +02:00
Tomohiro
366b9a7e4a Fix #12745 (#14879) 2020-07-02 13:20:34 +02:00
Clyybber
1440e70c62 allow packed union (#14868)
Co-authored-by: Arne Döring <arne.doering@gmx.net>
2020-07-01 11:41:03 +02:00
Miran
1edb9a6178 fix #14401, trailing comma confuses nimpretty (#14867) 2020-07-01 11:40:13 +02:00
Juan Carlos
74d1f25010 Clean out oldast (#14837)
* Clean out old Deprecated CLI switch
* Update to remove --oldast CLI option
2020-06-30 10:01:25 +02:00
lbartoletti
5c1fa142d6 New freebsd platforms (#14801)
* add riscv as riscv64

* add all platforms supported by FreeBSD
2020-06-29 10:31:25 +02:00
Timothee Cour
1b41c3122b fix #13432 typetraits.$: $(int,) is now (int,); $tuple[] is now tuple[] (#14799)
* typetraits.$: $(int,) is now (int,); $tuple[] is now tuple[]

* changelog
2020-06-29 09:34:05 +02:00
Clyybber
299ddda5f6 Make unreachable code a warning instead of an error (#14816)
* Make unreachable code a warning

* Adapt test

* Trigger CI
2020-06-29 08:49:53 +02:00
Clyybber
62394616e8 DFA and injectdestructors cleanup (#14824)
* DFA and injectdestructors cleanup

* More precise write analysis

* Cleanup obsoleted path

* Unify defInstrTargets and useInstrTargets

* Misc cleanups

* Nicer CFG printing

* Misc cleanups 2
2020-06-28 19:36:30 +02:00
Clyybber
394a56650a Fix #14647 (#14776)
* Fix #14647

* Correct fix

* Typo and add test

* For real now :p
2020-06-28 17:47:47 +02:00
Timothee Cour
0c56eeda0e expr => untyped; stmt => typed (#14804)
* expr => untyped; stmt => typed

* changelog + comment
2020-06-25 10:22:08 +02:00
Timothee Cour
32f335f594 fix #14802 (#14803) 2020-06-25 08:00:19 +02:00
Danil Yarantsev
80952cadaa Reject casts to builtin typeclasses (#14788)
* Closes #14231, closes #14452

* Merge test to tcast.nim
2020-06-24 22:32:01 +02:00
Miran
6bf2990f66 [backport] fix #14748, move gdb files to other section of installer.ini (#14772) 2020-06-23 20:36:59 +02:00
Juan Carlos
28510a9da9 Deprecated laxStrings for mutating the internal zero terminator on strings and its Deprecated code cleaned out (#14766)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-06-23 13:20:53 +02:00
Juan Carlos
c3459c7b14 Deprecate oldNewlines, clean out deprecated code from oldNewlines (#14763) 2020-06-23 11:22:07 +02:00
Araq
ebd1cc0265 minor bugfixes for 'func' and .borrow 2020-06-23 10:58:55 +02:00
Andreas Rumpf
da29222f86 init checks and 'out' parameters (#14521)
* I don't care about observable stores
* enforce explicit initializations
* cleaner code for the stdlib
* stdlib: use explicit initializations
* make tests green
* algorithm.nim: set result explicitly
* remove out parameters and bring the PR into a mergable state
* updated the changelog
2020-06-23 10:53:57 +02:00
Timothee Cour
511bd947d3 fix bug in semgnrc: runnableExamples should not semcheck, even with > 1 arg (#14768) 2020-06-23 10:06:36 +02:00
Andreas Rumpf
451129de42 fixes #14240 [backport:1.2] (#14757) 2020-06-22 14:11:13 +02:00
Andreas Rumpf
8df20276c9 fixes #14458 [backport:1.2] (#14756) 2020-06-22 13:06:22 +02:00
Andreas Rumpf
3ba0c30758 sizeof for empty objects/tuples should be 1; fixes #14690 (#14751) 2020-06-21 19:58:37 +02:00
Araq
45bc6954c5 improve the parser's error message 2020-06-19 10:50:39 +02:00
Araq
522bc8dda1 added a space 2020-06-19 10:32:16 +02:00
Timothee Cour
bb62feff72 fix #14691 docgen works again for methods (#14701)
* fix #14691 docgen methods

* fixup
2020-06-18 08:47:16 +02:00
Timothee Cour
7df27b5035 [cleanups] doassert => doAssert; mark deadcode (#14711) 2020-06-17 20:25:25 -07:00
Timothee Cour
45cac4afda fix #14179, fix #14142, make CI 1.4x faster (2x faster locally) (#14658)
* fix #14142: no more clash with: import os + use of existsDir/dirExists/existsFile/fileExists/findExe in config.nims

* remove a comment

* Revert "fixes the regression #12860 caused; hotfix"

This reverts commit 3d2459bdc0.

* Revert "Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims (#12860)"

This reverts commit d38853c504.

* noNimScript => noWeirdTarget + noNimJs
2020-06-16 08:56:12 +02:00
Timothee Cour
de5cde473a hintMsgOrigin now works in VM code (#14678)
* `hintMsgOrigin` now works in VM code

* remove a simplification for now
2020-06-16 08:49:57 +02:00
Timothee Cour
faedb14a16 misc cleanups in compiler msgs: use toHumanStr, etc (#14677) 2020-06-15 21:17:24 -07:00
jcosborn
5a22d6b57b fix codegen bug due to changing existing symbol declaration in template (#14666) 2020-06-15 08:40:12 +02:00
alaviss
d749c8cd87 compiler/commands: make gitHash settable at compile-time. (#14654)
This is useful for building nightlies, since we will be building from a
generated source archive and git metadata is lost there.
2020-06-14 11:22:55 +02:00
Araq
5a26c3799b reorder.nim: fixed typos 2020-06-12 11:57:29 +02:00
Timothee Cour
e30a08103d remove tyOpt, mOpt (#14636)
* remove tyOpt, mOpt

* fixup
2020-06-12 11:03:52 +02:00
Timothee Cour
8bbdb8f43f fix #14545 windows CI docs (#14590)
* fix #14545 windows paths
* add lib/std/private/strutils2.nim
* remove dependency strutils2 => strutils
* address comment: lib/std/private/strutils2.nim => compiler/strutils2.nim
2020-06-10 14:10:57 +02:00
Andreas Rumpf
6085ad95ff fixes #14279 (#14618) 2020-06-09 20:39:26 +02:00
Andreas Rumpf
b3029ba213 fixes #14578 (#14615) 2020-06-09 17:05:01 +02:00
lbartoletti
30c09e4607 [OpenBSD] Add arm support (#14608)
* add arm support to openbsd

* use clang on openbsd
2020-06-08 20:06:04 +02:00
Andreas Rumpf
e3f80e434a fixes #14557 (#14607) 2020-06-08 14:32:45 +02:00
Clyybber
52841dba09 Fix #14568 (#14583)
* Fix #14568
* Add testcase
* Fix bogus test
* Adapt other failing tests
* Declarations are always first writes
2020-06-07 23:32:41 +02:00
Andreas Rumpf
754a196d47 fixes #14315 (#14594) 2020-06-07 23:29:26 +02:00
Andreas Rumpf
419dbd573d fixes #14118 (#14595) 2020-06-07 20:11:42 +02:00
Andreas Rumpf
66c50c2ffc implement the 'bind' statement for generics, it was an oversight that this was never implemented (#14584) 2020-06-07 09:55:56 +02:00
Andreas Rumpf
32083c7ff8 more precise analysis about 'observable stores' [backport:1.2] (#14582) 2020-06-06 21:28:46 +02:00
Timothee Cour
61f2f1f5c5 fix #14576 addr of param (including for lent) now works with nim js (#14577)
* fix #14576 addr(param) now works in nim js

* workaround https://github.com/nim-lang/Nim/issues/14578
2020-06-06 20:15:24 +02:00