Commit Graph

6671 Commits

Author SHA1 Message Date
Andreas Rumpf
add1ccb6cb compiler: minor refactoring (#16633) 2021-01-08 13:36:03 +01:00
Andrew
596da7f9a0 happy new year 2021 again (#16638) 2021-01-08 09:29:32 +01:00
Andreas Rumpf
796498525a IC: next steps (#16550)
* cleanups
* ast.nim: cleanups
* IC: no more sym.tab field, stored externally in the module graph
* nimble compiles again
* rodfiles: store bitwidth of integers and the endianness in the cookie because we serialize 'int' directly
* rodfiles: added compilerproc and export sections
* rodfiles: added all the missing sections
* rodfiles: track the missing information
* IC: architecture for lazy loading of proc bodies
* make tests green again
* completed the lazy loading of proc bodies
* symbol lookup integration, part 1
* symbol lookup integration, part 2
* symbol lookup integration, part 3
* make tcompilerapi work again
* rodfiles: fixed config change handling
2021-01-07 20:26:40 +01:00
flywind
bab0aa6ecf add math.signbit (#16592) 2021-01-07 08:48:02 +01:00
Timothee Cour
025ca660f7 [backport 1.0] add backend support for js bigint (#16606)
* add backend support for js bigint

* cleanup

* add tests

* add -d:nimHasJsBigIntBackend

* cleanup

* more tests
2021-01-06 20:28:24 +01:00
Saem Ghani
21dfa04cbf fixes nim-lang/nimsuggest#119 outline includes (#16608)
nimsuggest outline should account for includes, now it does:
- the module prefix will be of the module doing the including
- the filename will be of the module that was included
- adds a test case for it
2021-01-06 20:26:16 +01:00
cooldome
58b9191354 fix #16516 method dispatch for sink args (#16594)
* fix #16516

* fix comment

* Trigger build
2021-01-06 10:47:03 +00:00
Andreas Rumpf
6317e4004d make --gc:arc --exceptions:quirky work again [backport:1.4] (#16583)
* make --gc:arc --exceptions:quirky work again [backport:1.4]

* fixes #16404 [backport:1.4]
2021-01-04 19:44:50 +01:00
flywind
acf3715ea8 continue #15456 add #pragma directives compiler support (#16472)
* continue #15456
* follow the advice from juan_carlos
2021-01-04 11:34:13 +01:00
Timothee Cour
471aab86a0 fix #16526 run config.nims before foo.nim.cfg (#16557)
* fix #16526 run config.nims before foo.nim.cfg

* add test
2021-01-02 21:41:44 +01:00
flywind
b8775bff57 fix is "closure" (#16552) 2021-01-02 17:11:46 +01:00
Timothee Cour
854ff26ac5 fix #16206, nim r / nim -r recompiles if cwd changes (#16349) 2021-01-02 01:33:59 -08:00
Andreas Rumpf
73a8b950cb big steps torwards an efficient, simple IC implementation (#16543)
* reworked ID handling
* the packed AST now has its own ID mechanism
* basic serialization code works
* extract rodfiles to its own module
* rodfiles: store and compare configs
* rodfiles: store dependencies
* store config at the end
* precise dependency tracking
* dependency tracking for rodfiles
* completed loading of PSym, PType, etc
* removed dead code
* bugfix: do not realloc seqs when taking addr into an element
* make IC opt-in for now
* makes tcompilerapi green again
* final cleanups

Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
2021-01-02 07:30:39 +01:00
Timothee Cour
0d0e43469f fix #14340 (#16386) 2021-01-01 22:55:22 +01:00
flywind
515cd45420 Add math.copySign (#16406)
* add math.copySign
* fix + tests
2020-12-30 15:09:30 +01:00
Timothee Cour
8508c4e1c2 fix hintProcessing dots interference with static:echo and hintCC; add tests for nim secret, add tests for hintProcessing, misc other bug fixes (#16495)
* fix dots interfering with static:echo
* add tests
* fix hintProcessing dots for hintCC
* improve trunner tests
* fix bug: readLineFromStdin now writes prompt to stdout, consistent with linenoise and rdstdin
* disable a failing test for windows
2020-12-30 14:58:41 +01:00
flywind
95f599ca2d move asciitables to std/private/ (#16498)
* move asciitables

* minor
2020-12-29 16:20:47 +01:00
Timothee Cour
c9886a4952 use -d:nimCompilerStackraceHints in more places (#16400) 2020-12-29 02:12:05 -08:00
Alexander Ivanov
672dc5cd87 Nil type check implementation (#15287)
* Nil checking
* Enable current older not nil checking again, run new checking only under flag, skip our test
* Enable tests, work on try/except and bugs, fix notnil tests

* Enable strictNotNil tests (currently with lowercase category) and add some expected output
* Work on try/except/finally: still some things unclear and a lot of code can raise out of try
* Fix the notnil build by going back to the old version of a test which I shouldn't have changed

* Fix test : use action compile
* Work on mutation and aliasing: not finished
* Render var parititions graph, try to understand it, fix a nilcheck if bug
* Rebase, progress on working with partitions
* Improve time logic
* Fix some bugs, use graph indices instead of symbol in nil map
* Fix bugs, test simpler ident aliasing for now, support two mutation levels
* Support ContentMutation and ReAssignment: for now just detect possible re assignment for var parameters of calls
* Enable several simple passing tests
* Cleanup a bit, fix condition/branch infix-related bug
* Remove some files, address some comments by Araq
* Use internalError and no quit for now
* Separate tests with expected warnings and with expected ok, fix a bug with if with a single branch related to copyMap
* Fix new data structures, bugs: make tests pass, disable some for now
* Work on fixing errors with non-sym nodes, aliasing: tests fail
* Work on alias support: simple set-based logic, todo more tests and ref sets?
* Use ref sets: TODO can we think of handle seq-s similar to varpartitions' Araq ones
* Handle defers in one place, stop raising in reverse to make an async test compile with strictNotNil, add a commented out test
* Dot expressions: call/reassignment. Other refactorings and distinct, SeqOfDistinct support. Checkout an older varpartitions
* Work on field tracking
* Backup : trying to fix bugs when running some stdlib stuff for running an async test
* Start a section about strict not nil checking in experimental manual
* Fix experimental strict not nil manual section and move it to another file based on Araq feedback
* Fix unstructured flow and double warning problems, fix manual, cleanup
* Fix if/elif/else : take in account structure according to Araq feedback
* Refactor a bit
* Work on bracket expr support, re-enable tests, clarify in manual/tests/implementation static index support for now
* Work on compiling stdlib and compiler with strictNotNil
* Small fixes to the manual for strictNotNil
* Fix idgen for strict check nil rebase
* Enable some simple tests, remove old stuff, comment out code/print
* Copy the original varpartitions source instead of my changes
* Remove some files
2020-12-29 10:31:11 +01:00
Timothee Cour
f9a15dbae9 fix nim secret dots interfering with prompt (#16491)
* fix nim secret dots

* cleanups
2020-12-28 12:19:47 +01:00
cooldome
fbc8a40c7a fix #15043 (#16441) [backport:1.4]
* fix #15043

* Trigger build
2020-12-27 20:05:33 +01:00
flywind
792e4a0392 Revert #16478 (#16483)
* minor

* Revert "minor"

This reverts commit ef1807cbb4.
2020-12-27 23:08:48 +08:00
Timothee Cour
357729639f fix #16469 vm float constants: do not conflate -0.0 and 0.0 (#16470)
* fix #16469 vm float constants: do not conflate -0.0 and 0.0

* fix test for 32bit
2020-12-27 14:35:01 +01:00
flywind
1e859fa320 minor (#16478) 2020-12-27 09:04:58 +01:00
Timothee Cour
e84354666a fix #16346 rst2html now honors SuccessX (#16347)
* fix #16346 SuccessX rst2html

* cleanups

* _

* _

* _
2020-12-26 23:28:56 +01:00
Timothee Cour
bc84d9c8cb [backport => 1.0] fix #16428 vmops now works for generic procs (#16429)
* fix #16428 vmops now works for generic procs

* remove duplication
2020-12-22 02:05:21 +01:00
Timothee Cour
df17cf5e9e misc cleanups (#16383) 2020-12-18 08:53:43 +01:00
Andreas Rumpf
979148e863 refactorings to prepare the compiler for IC (#15935)
* added ic specific Nim code; WIP
* make the symbol import mechanism lazy; WIP
* ensure that modules can be imported multiple times
* ambiguity checking
* handle converters and TR macros properly
* make 'enum' test category green again
* special logic for semi-pure enums
* makes nimsuggest tests green again
* fixes nimdata
* makes nimpy green again
* makes more important packages work
2020-12-17 08:01:36 +01:00
Timothee Cour
2728711dd3 fix #16248 forward --lib to runnableExamples (#16350) 2020-12-14 17:49:39 +01:00
RSDuck
b6443c96a0 fix #16334 (#16335)
* fix #16334

* rename isstdout -> isStdout

* separate lastMsgWasDot for stdout and stderr

* simplify logic
2020-12-14 13:28:03 +01:00
Timothee Cour
4850f9b596 fix #16265; fix #13999 (HCR on OSX); cgen now does not line wrap string litterals (#16329)
* fix #16265: cgen now does not line wrap string litterals which, in combination with other hacks, caused a really obscure looking bug

* fix #13999; nimhcr_integration.nim now works for osx

* try to make appveyor CI disappear

* disable openbsd + add diagnostic for openbsd

* enable for openbsd

* PTEMP

* re-disable openbsd
2020-12-14 11:17:24 +01:00
Timothee Cour
f344a70412 fix #16150 improve type mismatch errors (#16152)
* fix #16150 improve type mismatch errors

* allow -d:nimLegacyTypeMismatch

* address comment
2020-12-09 16:19:39 +01:00
flywind
9ce2f87a0a clean up old codes (#16284)
* clean up old codes

* fix docs and links

* clean
2020-12-09 12:18:32 +01:00
Miran
40255f6721 put both funcs and procs under the same section in the documentation (#16301)
* both funcs and procs are under the same section in the documentation

* update the test
2020-12-09 10:56:28 +01:00
Andreas Rumpf
94bb816de3 OSX: support for M1 [backport:1.0] (#16279) 2020-12-07 10:50:30 +01:00
flywind
1e320bc8c5 [docs minor]space for code-block (#16266)
* [docs minor]space for code-block

* correct more errors

* to runnableExamples

* add newline
2020-12-06 09:54:32 +01:00
Andreas Rumpf
8178388a78 fixes #16249 [backport:1.4] (#16251) 2020-12-05 00:36:06 +01:00
Alf-André Walla
545c406cbe Add 32-bit RISC-V support (#16231) 2020-12-03 17:33:42 +01:00
Timothee Cour
c731f7ab14 fixes #15939, fixes #15464, fixes #16169, fixes #16226 VM now supports addr(mystring[ind]) (index + index assignment) (#15987)
* fix #15939, fix #15464 VM now supports `addr(mystring[ind])` (index + index assignment), var char return etc
* cleanups
* cstring tests
* add test for bug #15464
* improve test coverage
2020-12-03 16:55:43 +01:00
Miran
c0b76ef3cb fix #16164, render doc comments (#16230)
* fix #16164, render doc comments

* add a test
2020-12-02 15:36:08 +01:00
ihlec
5c23ba7545 fixed article duplication typos (#16216) 2020-12-02 09:15:29 +01:00
Timothee Cour
84f2ad3068 add test for --eval; fix a minor bug (#16224) 2020-12-01 21:09:08 -08:00
Andreas Rumpf
2e4b6b94e6 Revert "fix #16185 (#16195)" (#16197)
This reverts commit bb4b27a2ca.
2020-11-30 23:36:38 +01:00
cooldome
bb4b27a2ca fix #16185 (#16195)
* fix #16185

* fix test

* fix comment

* fix comment

* better approach
2020-11-30 18:45:37 +01:00
Timothee Cour
52829fc8d1 cmdline: improve command processing (#16056) 2020-11-26 15:55:56 -08:00
Andreas Rumpf
9f1c5f64c5 fixes #16119 [backport:1.4] (#16149) 2020-11-26 22:16:43 +00:00
Timothee Cour
13b1b19a83 remove all mentions of doc2, jsondoc2 (except 1 mentioning the alias) (#15683) 2020-11-26 11:54:18 -08:00
Andreas Rumpf
cf516713d0 fixes https://github.com/status-im/nimbus-eth2/issues/1549 (#16146)
* fixes https://github.com/status-im/nimbus-eth2/issues/1549 [backport:1.4]

* test fixup
2020-11-26 19:05:21 +01:00
cooldome
2f1a9eadd7 More on #16110 (#16130)
* fix #16110

* refs #16110

* fix comment

* Trigger build

* use shallowCopy for efficiency
2020-11-26 13:44:06 +00:00
cooldome
8c12d3e29d fix #16120 (#16145) 2020-11-26 14:37:34 +01:00