summary refs log tree commit diff stats
path: root/lib/core
Commit message (Collapse)AuthorAgeFilesLines
* document macros.unpackVarargs (#18106)Timothee Cour2021-05-311-0/+15
| | | | | | | * deprecate macros.unpackVarargs * un-deprecate unpackVarargs and add docs+runnableExamples * update examples + tests with varargs[typed]
* Revert "fix #14873 properly by skipping `abi` field in importc type ↵Andreas Rumpf2021-05-151-0/+5
| | | | | (#17944)" (#17992) This reverts commit 98c29c01eb91a0c6ce7da09380a272eebe6bca6f.
* fix #14873 properly by skipping `abi` field in importc type (#17944)Timothee Cour2021-05-071-5/+0
| | | | | | | * fix #14873 properly by skipping `abi` field in importc type * add test * fix test for windows
* getCustomPragmaVal priority/override fixes (#17725)Clyybber2021-04-211-38/+40
| | | | | | | | | * Adhere left-to-right rule for custom pragma priority * Improve error message for no custom pragmas * custom pragmas on var/let sym take priority over its type ones * Workaround & bug
* [std/locks]close #7998(complete condition variables) (#17711)flywind2021-04-191-2/+7
| | | | | | * close #7998 * workaround genode * Update lib/system/syslocks.nim
* [std/locks]remove workaround for withLock (#17772)flywind2021-04-191-4/+3
| | | | | | | | | | Ref #6113 and #6049 The workaround for generics instantiation is unnecessary. It seems to be fixed by another PR I guess. The test still works. So the changes should be harmless. https://github.com/nim-lang/Nim/blob/devel/tests/stdlib/tlocks.nim I also add some inline pragmas.
* [std/rlocks]add inline pragma (#17773)flywind2021-04-191-3/+3
| | | so that it can be used as the base of new locks module with destructors.
* replace defer with try ... finally (#17753)flywind2021-04-171-5/+5
|
* cString => cSourceString; tyCString => tyCstring so that error msgs show ↵Timothee Cour2021-04-171-4/+4
| | | | cstring, not cString (#17744)
* Fix getCustomPragmaVal for some multi arg pragmas (#17723)Clyybber2021-04-151-41/+45
| | | | | * Fix getCustomPragmaVal for some multi arg pragmas * Bootstrap fix
* getCustomPragma is split up in more usable chunks (#11526)Arne Döring2021-04-141-93/+165
| | | | | | | | | | | | | | | | | * getCustomPragma is split up in more usable chunks * changelog entry * fix for style checks * shitty typedesc special casing * Add since annotation and remove typedesc comments * Fix typo * Revert since annotation because it breaks bootstrapping * Export getCustomPragmaNode conditionally * Reduce code duplication * Update since * Update lib/core/macros.nim * Apply suggestions from code review Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* macrocache.nim: removed trailing whitespaceAraq2021-04-111-23/+23
|
* Fix rst typo (#17671)konsumlamm2021-04-081-1/+1
|
* ref #14873 (#17644)flywind2021-04-061-0/+5
| | | | | | | * ref #14873 * comment * Update lib/core/locks.nim
* Improve the typeinfo module (#17625)konsumlamm2021-04-051-122/+129
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* new `genAst` as replacement for `quote do` (#17426)Timothee Cour2021-04-021-1/+4
| | | | | | | | | | | | | | * new `macros.genAst`: fixes all issues with `quote do` * add changelog entry * add workaround for https://github.com/nim-lang/Nim/issues/2465#issuecomment-511076669 * add test for #9607 * add kNoExposeLocalInjects option * add test case for nested application of genAst * genAst: automatically call newLit when needed * allow skipping `{}`: genAst: foo * add test that shows this fixes #11986 * add examples showing mixin; add examples showing passing types, macros, templates * move to std/genasts * improve docs
* added nkError to the AST (#17567)Andreas Rumpf2021-03-291-1/+2
| | | | | | | | | | | | | * added nkError to the AST * Update lib/core/macros.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update compiler/ast.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* nnkArglist => nnkArgList + special case stylecheck:error (#17529)Timothee Cour2021-03-271-1/+1
| | | | | * nnkArglist => nnkArgList * special case stylecheck:error
* remove {.compileTime.} for procs with NimNode: redundant because of ↵Timothee Cour2021-03-231-99/+94
| | | | tfTriggersCompileTime (#17463)
* fix #17454 (#17461)Timothee Cour2021-03-231-11/+9
|
* Add documentation to the `macrocache` module (#17431)Danil Yarantsev2021-03-211-15/+176
| | | | | | | | | | | | | | | | | | | | | * Add docs to macrocache * use hint * Use incl in the incl example * add macrocache to lib * consistency * Update doc/lib.rst Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * apply suggestions * clarify the warning Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Fix macros.quote custom op symbol interpolation. (#17256)quantimnot2021-03-051-2/+6
| | | | | | | | | | Provides a workaround/fix for #7589. https://github.com/nim-lang/Nim/issues/7589 Updated docs and tutorial to reflect change. Updated runnableExamples to include an example. Co-authored-by: name <name@example.com>
* Replace double backticks with single backticks - Part 2 out of ~6 (#17206)Danil Yarantsev2021-02-281-79/+79
|
* Change stdlib imports to use std prefix in most examples (#17202)Danil Yarantsev2021-02-281-2/+2
|
* use single backtick (#17100)flywind2021-02-181-24/+24
|
* remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ↵Timothee Cour2021-02-171-113/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#16918) * nimNoArrayToCstringConversion deadcode * nimbabel deadcode * nimHasalignOf deadcode * nimvarargstyped deadcode * nimhygiene deadcode * nimNewTypedesc deadcode * nimlocks deadcode * nimHasCppDefine deadcode * nimHasRunnableExamples deadcode * nimHasNilChecks deadcode * nimSymKind deadcode * minor macros refactoring * nimVmEqIdent deadcode * nimNoNil deadcode * nimNoZeroTerminator deadcode * nimHasSymOwnerInMacro deadcode * nimVmExportFixed deadcode * nimNewRuntime deadcode * nimAshr deadcode * nimUncheckedArrayTyp deadcode * nimHasTypeof deadcode * nimErrorProcCanHaveBody deadcode * nimHasHotCodeReloading deadcode * nimHasSignatureHashInMacro deadcode * nimHasDefault deadcode * nimMacrosSizealignof deadcode
* use typeof instead type (#16962)flywind2021-02-081-3/+3
|
* fix floats slice (#16853)flywind2021-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * see whether it breaks * fix * fix * minor * fix * add enum * use Ordinal types * fix tests * fix * another style * fix remainning cases
* refactor cmpNimIdentifier (#16611)flywind2021-01-132-9/+3
| | | | | | | | | * refactor cmpNimIdentifier * Apply suggestions from code review Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Clyybber <darkmine956@gmail.com>
* macros.quote: document hard to use `op`; add more useful examples (#16489)Timothee Cour2021-01-061-23/+71
| | | | | | | | | | | | | | | | | * macros.quote: document hard to use `op`; add more useful examples * add back doc comment removed in a60305fbf3897cd90680e693dd4c0db2334d85d4 * address comment * fixup * clarify quoting rules * Update lib/core/macros.nim Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Clyybber <darkmine956@gmail.com>
* refactor cmpIgnoreStyle and cmpIgnoreCase (#16399)flywind2020-12-312-36/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init * support strutils * more * better * Call len once per string/cstring * Change var to let * Compare ternary on first char * More appropriate param name * fix * better * one test * impl * more efficient * minor Co-authored-by: Clyybber <darkmine956@gmail.com>
* fix cmpIgnoreStyle bug (#16392)flywind2020-12-181-0/+1
|
* Fixes #16219, `hasArgOfName` ignoring argument sets. (#16233)Aditya Siram2020-12-031-4/+4
| | | | | | | | | | | | | | | * Fixes #16219, `hasArgOfName` ignoring argument sets. * Fix test and simplify ident traversal. * Moved test into a block and removed some boilerplate. * Fix some argument formatting. * use ..< * Change the preceding line too Co-authored-by: Clyybber <darkmine956@gmail.com>
* typeinfo minor improvement (#16083)flywind2020-11-231-111/+52
| | | | | | | | | * typeinfo minor improvement * minor * Update lib/core/typeinfo.nim * rename typeinfo
* alternative way to fix #16022 (#16064) [backport:1.4]flywind2020-11-201-2/+2
| | | | | | * alternative way to fix #16022 * add testcase for #16022 [backport:1.4]
* fix #15934 and #15620 (#15938) [backport:1.4]Andreas Rumpf2020-11-151-1/+4
|\ | | | | | | * make workaround for #15934 and #15620 * add testcase for #9754
| * nilflywind2020-11-131-0/+2
| |
| * make workaround for #15934 and #15620flywind2020-11-121-1/+2
| |
* | Correct all eggs (#15906)Miran2020-11-101-2/+2
|/ | | | * "eg" is a misspelled "egg", "e.g." is "exempli gratia" * Also, "ie" is "i.e.".
* ARC now capable of custom extra alignment. Ref, closure and seq support. ↵cooldome2020-10-281-2/+2
| | | | (#15697)
* fix rlock compilation failure (#15584)shirleyquirk2020-10-151-1/+1
| | | | | | | | | | | * change SysLockType_Reentrant fix edge case where using SysLockType_Reentrant doesn't trigger an #include pthread.h * syslocktype_reentrant now a var * remove nodecl to remove empty system_syslocks.c * let is better than var. in reality SysLockType = enum, maybe that would be a better fix
* fixes #9754 [backport] (#15342)Andreas Rumpf2020-09-161-4/+1
|
* allow old styled RTTI for arc/orc (#15331)Andreas Rumpf2020-09-161-54/+113
|
* enable,document,test getImplTransformed, very useful for understanding how ↵Timothee Cour2020-07-181-2/+5
| | | | | | nim transforms code (#14924) * enable,document,test getImplTransformed, very useful for understanding how nim transforms code
* Clean up macros (#14959)Juan Carlos2020-07-141-34/+0
|
* fix #14846; add macros.extractDocCommentsAndRunnables (#14849)Timothee Cour2020-07-011-0/+36
| | | | | | | | | * fix #14846; add macros.extractDocCommentsAndRunnables * fixup * update tests * address comment
* init checks and 'out' parameters (#14521)Andreas Rumpf2020-06-231-3/+4
| | | | | | | | | | | * 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
* add legacy workaround; improve test so that it actually tests for the bugfixTimothee Cour2020-06-191-3/+5
|
* Update tuple newLitsolo9892020-06-191-5/+12
|
* Remove deprecated stuff from stdlib (#14699)Miran2020-06-171-6/+0
| | | | | | | * update to the latest Jester * remove deprecated procs from some stdlib modules * 'criterion' is not maintained anymore and relies on obsolete stuff