Commit Graph

6568 Commits

Author SHA1 Message Date
cooldome
4c19c5dfae fix static[Slice[T]] as argument issue (#15842) 2020-11-04 19:52:53 +01:00
cooldome
d62f3627aa EnumUtils, speed up findStr in compiler (#15777)
* add parseEnumRange
* fix runnable example
* update changelog
* use parseEnumRange in compiler
* reorganise code
* add changelog, make single normalizer argument
2020-11-03 16:26:16 +01:00
flywind
b8bcf236dd fix #12640 (#15829) 2020-11-03 11:41:41 +01:00
flywind
fde17b159f follow #15818 and close #7109 (#15823)
* follow #15818 and close #7109

* Update compiler/jsgen.nim

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
2020-11-02 18:27:39 +01:00
flywind
5b4c17b5e7 Closure iterators are not supported by VM (#15818) 2020-11-02 10:58:14 +01:00
flywind
544cb107c7 fix #8821 (#15809) 2020-11-02 10:41:44 +01:00
cooldome
00b495de95 Use modern enums in compiler (#15775) 2020-11-02 10:35:24 +01:00
flywind
558115fa29 fixes #15717 2020-11-02 10:27:48 +01:00
flywind
27eb19cc48 fix #15145 (#15816) 2020-11-02 08:56:51 +01:00
flywind
80b0748d75 fix #15651 (#15800)
* fix

* minor
2020-10-31 12:06:13 +01:00
Miran
28bbcd9d45 fix #15702, show enum fields documentation (#15792) 2020-10-30 16:30:00 +01:00
flywind
2cfe5e0745 [closes #11625 and closes #2488]add global and threadvar(with --threads:off mode ) pragmas supports for JS backend (#15772)
* add global pragma support for js backend

* globalThis

* add support for threadvar

* more tests

* Update compiler/jsgen.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-10-30 15:34:07 +01:00
cooldome
6fe2e8977d canAlias improvement (#15773)
* canAlias improvement

* fix comment
2020-10-30 11:42:06 +00:00
flywind
17f08b2939 closes #7658 (#15784)
* fix #7658

* more
2020-10-30 09:58:55 +01:00
flywind
f79ded3cb6 fix #15638 (#15789) 2020-10-30 09:16:47 +01:00
cooldome
610e9b2fe9 fix #15756 (#15761)
* fix #15756

* simplify test
2020-10-28 13:24:38 +00:00
cooldome
0956a99537 ARC now capable of custom extra alignment. Ref, closure and seq support. (#15697) 2020-10-28 14:00:49 +01:00
cooldome
f8cac6bbbc fix #15752 (#15754) 2020-10-28 00:09:26 +01:00
Timothee Cour
0fb878324e honor --declaredLocs in more places, including type mismatch errors; also show kind with --declaredLocs (#15673)
* honor --declaredLocs in more places, including type mismatch errors
* fix tests
* show declaration location also when type mismatch names clash
2020-10-27 14:19:28 +01:00
Timothee Cour
58a1eec96a condsyms: add nimHasDeclaredLocs (#15735) 2020-10-27 07:53:45 +01:00
Timothee Cour
da476a8723 fix #15740 --hint:conf now works more reliably (#15741) 2020-10-27 07:35:10 +01:00
Timothee Cour
3bdc000521 [backport] fix #15595 procvar == works in VM (#15724) 2020-10-26 22:19:05 +02:00
Andreas Rumpf
cf01945f54 ensure the Nim compiler works with --experimental:strictFuncs --experimental:views [backport:1.4] (#15737) 2020-10-26 21:08:57 +01:00
Jason Beetham
a87617956f Fixed iteration limit hit from execproc (#15723) [backport:1.2] [backport:1.4]
When calling procs from Nim in Nimscript you could hit the VM iteration limit even though the code is functioning properly. This resolves that by making the iteration limit reset eachtime you call a proc.
2020-10-26 11:06:18 +01:00
Timothee Cour
d4c2e2c53f fix #15704 #15597 wrong VM register was freed (#15705)
* fix #15704 #15597 wrong VM register was freed

* same treatment for nkCheckedFieldExpr

* note concerning HighRegisterPressure

* bump NimPatch

* Update lib/system.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-10-26 09:13:37 +01:00
Andreas Rumpf
226595515c explicit ID generation for easier IC (#15559)
* refactoring: idents don't need inheritance
* refactoring: adding an IdGenerator (part 1)
* refactoring: adding an IdGenerator (part 2)
* refactoring: adding an IdGenerator (part 3)
* refactoring: adding an IdGenerator (part 4)
* refactoring: adding an IdGenerator (part 5)
* refactoring: adding an IdGenerator (part 5)
* IdGenerator must be a ref type; hello world works again
* make bootstrapping work again
* progress: add back the 'exactReplica' ideas
* added back the missing exactReplica hacks
* make tcompilerapi work again
* make important packages green
* attempt to fix the build for 32 bit machines (probably need a better solution here)
2020-10-25 08:50:47 +01:00
Timothee Cour
64eb62889a [minor] nimVMDebug: fix codeListing formatting for jump-to-file to work (#15711) 2020-10-25 01:56:07 +03:00
Clyybber
d4022ebe53 Revert "fixes #15280 [backport:1.2] (#15281)" (#15700)
This reverts commit 3f00a738db.
2020-10-24 11:45:18 +02:00
cooldome
ae320b4e7d fix #15662 (#15678)
* fix #15662

* alternative fix

* fix spacing
2020-10-23 11:14:54 +02:00
Timothee Cour
275354709d make cgen header consistent with jsgen header (#15682) 2020-10-23 08:03:09 +02:00
Andreas Rumpf
64016ddedc fixes view types for sizeof() and --gc:orc (#15680) 2020-10-22 18:52:05 +02:00
Andreas Rumpf
8358974b73 fixes #15652 [backport:1.4] (#15679) 2020-10-22 17:28:43 +02:00
Miran
d8a6b0b04e [backport: 1.4] Better linebreaks (#15658) 2020-10-22 12:16:19 +02:00
Clyybber
773643b47b Cleanup 2020-10-22 11:03:05 +02:00
Timothee Cour
0979524137 add Source+Edit links on top of every docgend file (#15642) 2020-10-22 10:44:28 +02:00
Timothee Cour
e09c259bf3 reuse existing toHumanStr (#15674) 2020-10-21 15:53:43 -07:00
Timothee Cour
05752cd5d0 add --declaredlocs (#15666) 2020-10-21 15:37:29 +02:00
Timothee Cour
4b0b3818c3 fix cgen header copyright (#15649)
* remove copyright Andreas Rumpf from cgen files
2020-10-21 11:49:59 +02:00
Andreas Rumpf
9a059657ca fixes bootstrapping for any machine that has a Nim already installed [backport:1.4] (#15660) 2020-10-20 21:07:24 +02:00
narimiran
b418c54ec4 even more "eg" fixes [ci skip] 2020-10-20 13:58:12 +02:00
Clyybber
f20e485827 Fix commentOffsetA for doc comments (#15643) 2020-10-20 01:19:49 +02:00
cooldome
833035bacd arc allocation method aligned (#15588)
* progress

* fix typo
2020-10-19 14:50:06 +02:00
cooldome
04f8fcfbd0 Tables, use sink val arguments more actively (#15625) 2020-10-19 14:13:26 +02:00
Clyybber
66cd9c2e57 Fix #15599 (#15601)
* Fix #15599

* Add test
2020-10-16 18:03:01 +02:00
Andreas Rumpf
da4aa2e1fb renamed '=' to '=copy' [backport:1.2] (#15585)
* Assign hook name changed to `=copy`
* Adapt destructors.rst
* [nobackport] Duplicate tests for =copy hook
* Fix tests
* added a changelog entry

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-10-15 12:52:30 +02:00
Andreas Rumpf
644eb4dd54 ORC: critical bugfix for the cycle analyser, introduce -d:nimStressOrc for easier stress testing (#15572) 2020-10-14 22:26:21 +02:00
alaviss
c2ba4ef979 suggest: try to find the implementation of a symbol when def is used (#15555)
* suggest: try to find the implementation of a symbol when def is used

* suggest: return all declarations of the symbol on `def`
2020-10-14 17:08:56 +02:00
Clyybber
977bccdbff Make useVersion:1.0 disable the proc arg sym change (#15570)
* Make useVersion:1.0 disable the proc arg sym change

* Also do this for useVersion:1.2
2020-10-14 16:07:25 +02:00
Andreas Rumpf
8978112457 fixes a C code generator regression, no need to backport, only the 1.4 line is affected (#15569) 2020-10-14 13:58:36 +02:00
Benjamin Lee
12c8ef5949 Update the list of GC options when raising an error (closes #15547) (#15553) 2020-10-14 11:20:59 +02:00