Commit Graph

1575 Commits

Author SHA1 Message Date
genotrance
450a3e3179 Fix #2408 - add -d:globalSymbols (#14904) 2020-07-21 19:14:36 +02:00
Bung
ba5604b96d fix #13621, the nim-livereload is mentioned as proposal in #8927 (#14998) 2020-07-16 11:18:59 +02:00
Andreas Rumpf
c5358b0d4b An optimizer for ARC (#14962)
* WIP: an optimizer for ARC
* do not optimize away destructors in 'finally' if unstructured control flow is involved
* optimized the optimizer
* minor code cleanup
* first steps to .cursor inference
* cursor inference: big steps to a working solution
* baby steps
* better .cursor inference
* new feature: expandArc for easy inspection of the AST after ARC transformations
* added topt_cursor test
* adapt tests
* cleanups, make tests green
* optimize common traversal patterns
* moved test case
* fixes .cursor inference so that npeg compiles once again
* cursor inference: more bugfixes

Co-authored-by: Clyybber <darkmine956@gmail.com>
2020-07-15 23:00:06 +02:00
Juan Carlos
6d10baa339 https://github.com/nim-lang/Nim/pull/14948#issuecomment-656498426 (#14958) 2020-07-11 06:21:59 -04:00
Clyybber
bf51cee431 Update docs and changelog 2020-07-10 13:36:02 +02:00
Ico Doornekamp
d7ccd82eac VM profiler (#14833)
* Crude VM profiler

* Added --profileVM flag, refactoring

* fixed FileLine hash

* Use TLineInfo instead of own FileLine, updated formatting

* Refactoring, moved PStackFrame to vmdefs for cleaner data structure

* Moved vmprofiler to separate file

* Simplified TLineInfo hash, use toFileLineCol for output

* Hash

* Moved profile data into Config, dump only once at end of run

* Changed profile output header to show '#instr' instead of 'count'

* Do not accumulate instrcount for non-top frames

Co-authored-by: Ico Doornekamp <git@zevv.nl>
2020-07-09 19:18:35 +02:00
awr1
37253d660f Minor improvements to typecast section of manual (#14896)
* Minor improvements to typecast section of manual

* Clarification to casting w/ concrete types

* Added less ambiguous language
2020-07-07 10:22:55 +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
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
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
Danil Yarantsev
7936768560 Fix some typos (#14843) 2020-06-28 19:17:18 +02:00
Clyybber
4f70180a58 Fix typo 2020-06-28 18:03:39 +02:00
Manuel Bojato
22f1b5120e Fix nimdoc invalid css on theme switch class (#14834) 2020-06-27 23:36:31 +02:00
Sizhe Zhao
ad00d616e8 Warn about calling wrappers at compile time until #14049 is fixed. (#14828) 2020-06-27 16:51:48 +02:00
Sizhe Zhao
70b07edf42 Fix missing comma (#14829) 2020-06-27 12:11:29 +02:00
Timothee Cour
4dfb062f4d update contributing.rst and docstyle.rst: refer to a bug via bug #1234 + other guidelines (#14796)
* add a testing convention in nep1
* misc updates to contributing.rst and docstyle.rst
* address comments
2020-06-26 10:40:34 +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
Juan Carlos
79ed8e79ef Documentation GC (#14739) 2020-06-23 11:21:33 +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
79c90b30ee nep1: use subjectVerb, not verbSuject (#14732) 2020-06-19 23:38:43 +02:00
Kaushal Modi
ac8ab4c549 Clarify the use of the backwards index operator (^N) in tut1 (#14681)
* Clarify the use of the backwards index operator (^N) in tut1

For consistency:
- Do `[a .. ^b]` (notice spaces on both sides of `..`)
- Do `[c ..< d]` (notice spaces on both sides of `..<`)

Fixes https://github.com/nim-lang/Nim/issues/14671.

* tut1: Add a note that ^ template calls can be saved to consts
2020-06-19 10:22:48 -04:00
Juan Carlos
99c198625c Deprecate unroll pragma, remove from documentation (#14705) 2020-06-19 15:08:45 +02:00
Miran
e7f280bd26 Remove deprecated stuff from stdlib (#14699)
* update to the latest Jester

* remove deprecated procs from some stdlib modules

* 'criterion' is not maintained anymore and relies on obsolete stuff
2020-06-17 15:25:02 +02:00
Juan Carlos
15a45e8e73 Documentation update nims.rst (#14683)
* Update nims.rst to add modules that work on NimScript as mentioned in the changelog.md

* https://github.com/nim-lang/Nim/pull/14683#issuecomment-644976921
2020-06-17 07:58:03 +02:00
Juan Carlos
a056b4c3f1 Change 'Future Directions' to link memory management documentation (#14664) 2020-06-15 08:55:24 +02:00
Andy Davidoff
4e3edf5836 add arc and orc to gc list (#14653) 2020-06-14 11:12:08 +02:00
Dominik Picheta
d3b25a2948 Clarify imported exceptions note in manual 2020-06-13 11:44:01 +01:00
Juan Carlos
387e337a2a Documentation update a description (#14619)
* Documentation update a description in a page listing links

* Update doc/docs.rst

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
2020-06-09 22:17:32 +01:00
Juan Carlos
881fa94b57 Documentation Fix Typo, Add Table (#14609) 2020-06-09 15:43:42 +02:00
ynfle
aa70cfdea2 Fix(astspec.txt): type of repeated word (#14612) 2020-06-08 20:14:26 -07:00
Timothee Cour
3cf88c2b49 walkDirRecFilter, update doc CI filter, compiler/index.nim for docs + various other fixes (#14501)
* update doc CI filter to include the files mostly likely to require doc rebuild
* remove code duplication in ./config/nimdoc.cfg; show link to compiler docs, various fixes
* walkDirRecFilter, factor nativeToUnixPath workaround
* glob for getRst2html
* docslocal: 40s to build all docs
* revert code dedup in github actions which did not work alas...
* fixups
2020-06-01 19:21:41 +02:00
Ico Doornekamp
0489e76da7 manual: removed subjective phrase from 'macros' section (#14536)
Removed phrase "However, this is no real restriction because
Nim's syntax is flexible enough anyway." from the manual - I find it
very subjective, and I sometimes *do* find myself restricted by Nim's
syntax when writing DSLs
2020-06-01 14:02:17 +02:00
Araq
177c7f96e9 spec: be explicit that NRVO will evolve further 2020-05-30 19:55:01 +02:00
Araq
984af3d64e document NVRO and exception handling 2020-05-30 19:50:11 +02:00
Timothee Cour
fe7a2d60f9 make it easier to figure out how to debug issues (#14477) 2020-05-28 01:19:12 -07:00
Huy Doan
00fa7a5747 Add thiscall calling convention, mostly for hooking purpose (#14466)
* Add thiscall calling convention, mostly for hooking purpose
* add changelog and documentation
2020-05-27 16:24:47 +02:00
Timothee Cour
58282547f6 fix #6583, fix #14376, index+search now generated for all projects, many bug fixes with nim doc (#14324)
* refs #6583 fix nim doc output
* changelog
* change default for outDir when unspecified
* cleanups
* --project implies --index
2020-05-25 13:25:40 +02:00
Andreas Rumpf
79e85cb0b5 manual.rst: updates [backport] (#14445) 2020-05-25 12:16:32 +02:00
Danil Yarantsev
1450924b1e Fix some typos in the manual [backport] (#14399) 2020-05-20 09:28:47 +02:00
Timothee Cour
2627e1e945 refs #14369 improve docs for importcpp exceptions (#14391)
* refs #14369 improve docs for importcpp exceptions

* address comments
2020-05-18 17:10:30 +01:00
cooldome
810039ec0b docs:getCurrentException() and getCurrentExceptionMsg() are not available for imported exceptions (#14392) 2020-05-18 08:15:10 -07:00
Frank Schmitt
42e80829c7 docs: fix syntax error in hotCodeReloading example (fixes #14380) (#14381)
Co-authored-by: Frank Schmitt <frankschmitt@gmx.de>
2020-05-17 12:44:36 +02:00
Bung
c32e1378eb docfix: fix wrong link in doc/manual.rst (#14367) 2020-05-16 03:04:39 -07:00
PMunch
9acbf99efb Allow let to not have value when using importc (#14258)
* Allow let to not have value when using importc

This allows a let statement with the `{.importc.}` pragma to not be
initialised with a value. This allows us to declare C constants as Nim
lets without putting the value in the Nim code (which can lead to
errors, and requires us to go looking for the value). Fixes #14253

* Proper fix and documentation + changelog entry

* Improve testcase with one from timotheecour

* Add test to verify it working with macros
2020-05-12 20:28:18 +02:00
Andreas Rumpf
06dfd31612 fixes #13881
* fixes #13881
* documented changed requirements for system.onThreadDestruction
* destructors.rst: update the documentation
2020-05-12 15:46:24 +02:00
Avahe Kellenberger
55446c05a4 Added a reference to ternary operators. (#14309)
`if expressions` are similar to ternary operators in other languages.
In order to make this easier to find in the manual, I've added a
sentence about it.
2020-05-12 08:28:10 +02:00
Andreas Rumpf
03c146cd93 do not track 'raise Defect' in the .raises: [] clause anymore (#14298)
* do not track 'raise Defect' in the .raises: [] clause anymore

* --panics:on maps 'raise Defect' to an unrecoverable fatal error

* make tests green again

* update the documentation too
2020-05-11 16:25:56 +02:00
Timothee Cour
9502e39b63 nim doc --backend:js, nim doc --doccmd:-d:foo, nim r --backend:js, --doccmd:skip + other improvements (#14278)
* `nim doc --backend:js|cpp...`
`nim doc --doccmd:'-d:foo --threads:on'`
`nim r --backend:cpp...` (implies --run --usenimcache)
* --usenimcache works with all targets
* --docCmd:skip now skips compiling snippets; 50X speedup for doc/manual.rst
2020-05-11 12:01:18 +02:00
Clyybber
4bd77cf045 Fix typo 2020-05-08 16:13:53 +02:00