summary refs log tree commit diff stats
path: root/compiler/condsyms.nim
Commit message (Collapse)AuthorAgeFilesLines
* replaces `pairs` with `keys` and `items`; saves 8 bytes (#21319)ringabout2023-02-021-1/+1
| | | replace `pairs` with `keys` and `items`
* remove legacy code (#21134)ringabout2022-12-261-23/+24
| | | | | * remove legacy code * fixes
* fixes #20244; fixes castSizes warnings (#21102)ringabout2022-12-221-0/+1
| | | | | | | | | | | | | | | | | * fixes #20244; fixes castSizes warnings * fixes js * fixes js * fixes js * fixes * typo * extend using uint64 * Update lib/std/syncio.nim
* fix #19580; add warning for bare except: clause (#21099)ringabout2022-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | * fix #19580; add warning for bare except: clause * fixes some easy ones * Update doc/manual.md * fixes docs * Update changelog.md * addition * Apply suggestions from code review Co-authored-by: Jacek Sieka <arnetheduck@gmail.com> * Update doc/tut2.md Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
* generic `define` pragma + string alias (#20979)metagn2022-12-131-0/+2
| | | | | | | | | * generic `define` pragma + string alias * clean * add tests and document * remove char/float, minimize changelog
* An unnamed break in a block now gives an `UnnamedBreak` warning (#20901)ringabout2022-11-241-0/+1
| | | | | | | | | | | | | | | | | | | | | * unnamed break in the block now gives an error * bootstrap * fixes * more fixes * break with label * label again * one moee * Delete test5.txt * it now gives a UnnamedBreak warning * change the URL of bump back to the original one
* fixes #20026; marks system procs which can raise defects (#20864)ringabout2022-11-221-0/+1
| | | | | | | | | * marks system procs which can raise defects * add tests * add more systemRaisesDefect * add comment
* DAA and 'out' parameters (#20506)Andreas Rumpf2022-10-061-0/+2
| | | | | | | | | | | * DAA and 'out' parameters * progress * documented strictDefs and out parameters * docs, tests and a bugfix * fixes silly regression
* pragma for sfCallsite instead of name check + better semantics, test (#20464)metagn2022-10-031-0/+1
| | | | | | | | | | | * pragma for sfCallsite instead of name check at every template definition Not documented because it seems to be for internal use? Should also make it possible to make comparisons and setops imports, but this doesn't have to be done. I can reuse a name like `cursor` for the pragma as well, added a new name just to be safe. * make sfCallsite recursive, add tests
* closed ambiguous enum defaults to first overload (#20457)metagn2022-10-011-0/+1
| | | | | | | | | * closed ambiguous enum defaults to first overload * add warning * turn to hint * work around config
* turn nimIncrSeqV3 into deadcode (#20388)ringabout2022-09-201-1/+1
|
* support cstring in `case` (#20130)metagn2022-09-011-0/+1
| | | | | | | | | | | | | | | * implement case for cstring for now just converts to string on C backend * custom implementation for cstring * remove leftover * revert even more * add nil + fix packages weird variant literal bug * update docs
* top-down type inference, implements rfc 149 (#20091)metagn2022-08-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * micro implementation of rfc 149 refs https://github.com/nim-lang/RFCs/issues/149 * number/array/seq literals, more statements * try fix number literal alias issue * renew expectedType with if/case/try branch types * fix (nerf) index type handling and float typed int * use typeAllowed * tweaks + const test (tested locally) [skip ci] * fill out more of the checklist * more literals, change @ order, type conversions Not copying the full call tree before the typedesc call check in `semIndirectOp` is also a small performance improvement. * disable self-conversion warning * revert type conversions (maybe separate op later) * deal with CI for now (seems unrelated), try enums * workaround CI different way * proper fix * again * see sizes * lol * overload selection, simplify int literal -> float * range, new @ solution, try use fitNode for nil * use new magic * try fix ranges, new magic, deal with #20193 * add documentation, support templates Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* new .redefine pragma for templates, warn on redefinition without it (#20211)metagn2022-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test CI for template redefinitions * adapt asyncmacro * fix quote * fix again * try something else * revert * fix ioselectors_select, disable packages CI * adapt more tests & simplify * more * more * more * rename to redefine, warn on implicit redefinition * basic documentation [skip ci] * Update compiler/lineinfos.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fixes #19078 [backport] (#19090)Andreas Rumpf2021-11-021-0/+2
|
* strict effects (#18777)Andreas Rumpf2021-09-021-0/+1
| | | | | | | | | | | | | | | | | * fixes #17369 * megatest is green for --cpu:arm64 * docgen output includes more tags/raises * implemented 'effectsOf' * algorithm.nim: uses new effectsOf annotation * closes #18376 * closes #17475 * closes #13905 * allow effectsOf: [a, b] * added a test case * parameters that are not ours cannot be declared as .effectsOf * documentation * manual: added the 'sort' example * bootstrap with the new better options
* ORC: support for custom =trace procs (#18459)Andreas Rumpf2021-07-091-0/+1
| | | | | | | | | | | * ORC: support custom =trace procs (WIP) * Update tests/arc/tcustomtrace.nim Co-authored-by: Clyybber <darkmine956@gmail.com> * =trace is now documented and seems to work * make test green Co-authored-by: Clyybber <darkmine956@gmail.com>
* support `--hint:all:off --hint:x` (ditto with `--warnings` + friends) (#17852)Timothee Cour2021-06-201-1/+1
| | | | | * select all hints via `--hint:all:on|off`, etc * simplify code with setutils * address comment
* use dragonbox algorithm; alternative to #18008 (#18139)Andreas Rumpf2021-06-011-0/+2
| | | | | * use dragonbox algorithm; alternative to #18008 * removed unsafe code
* `typeof(voidStmt)` now works (#17807)Timothee Cour2021-04-231-0/+1
| | | | | | | | * `typeof(voidStmt)` now works * remove typeOrVoid * add condsyms, and reference cligen https://github.com/c-blake/cligen/pull/193 * fixup * changelog [skip ci] * fixup
* iterable[T] (#17196)Timothee Cour2021-04-111-0/+1
| | | | | | | | * fix failing test toSeq in manual which now works * changelog * reject proc fn(a: iterable) * add iterable to spec * remove MCS/UFCS limitation that now works
* unify tuple expressions (#13793)Arne Döring2021-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * unify tuple expressions * fix test * fix test * apply feedback * Handle empty tuples * Fix rendering named unary tuple * Protect static NimNode against stripping * Slightly less hacky * Revert "Slightly less hacky" This reverts commit 170c5aec0addc029f637afbc948700ca006b7942. * Slightly less hacky * Cleanup * Fix test * Fix another test * Add condsym * Rebase fallout * changelog: Move from compiler changes to language changes * Add stricter tests * Add empty tuple example to doc/astspec * Fix test Co-authored-by: Clyybber <darkmine956@gmail.com>
* followup custom literals (#17500)Timothee Cour2021-03-271-0/+1
|
* followup #16067 --spellSuggest (#17401)Timothee Cour2021-03-171-0/+1
| | | | | | | * followup #16067 --spellSuggest * enable --spellSuggest by default * fixup
* remove tests/deps/ (#17132)Timothee Cour2021-02-231-1/+2
| | | | | | | | | * remove tests/deps/ * fix tests * fix tests/manyloc/keineschweine/lib/zlib_helpers.nim * fixup
* add -d:nimStrictMode in CI to keep code from regressing; fixes ↵Timothee Cour2021-02-171-0/+1
| | | | ConvFromXtoItselfNotNeeded, UnusedImport notes (#16764)
* remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ↵Timothee Cour2021-02-171-46/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#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
* remove conditionals on nimHasUserErrors, nimNoNilSeqs2, nimNoNilSeqs (#16861)Timothee Cour2021-01-291-3/+3
| | | | | | | | | * cleanup docs for type(nil) | type(nil); simplify nimHasUserErrors * simplify nimNoNilSeqs2 * simplify nimNoNilSeqs * fixup
* `--hintAsError` (#16763)Timothee Cour2021-01-201-0/+1
| | | | | | | * --hintAsError * add test, changelog * condsyms
* [backport 1.0] add backend support for js bigint (#16606)Timothee Cour2021-01-061-0/+1
| | | | | | | | | | | | | * add backend support for js bigint * cleanup * add tests * add -d:nimHasJsBigIntBackend * cleanup * more tests
* clean up old codes (#16284)flywind2020-12-091-1/+0
| | | | | | | * clean up old codes * fix docs and links * clean
* Use modern enums in compiler (#15775)cooldome2020-11-021-5/+5
|
* condsyms: add nimHasDeclaredLocs (#15735)Timothee Cour2020-10-271-0/+1
|
* implements https://github.com/nim-lang/RFCs/issues/258 (#15503)Andreas Rumpf2020-10-061-0/+2
| | | | | | | | | * implements https://github.com/nim-lang/RFCs/issues/258 * don't be too strict with custom pragma blocks * cast pragmas: documentation * added most missing inference query procs to effecttraits.nim
* finish the stacktraces.nim implementation [backport:1.2] (#15393)Andreas Rumpf2020-09-231-0/+1
|
* Big compiler Cleanup (#14777)Clyybber2020-08-281-1/+1
|
* Fix #5691 (#15158)Clyybber2020-08-271-0/+1
| | | | | | | | * Fix #5691 * Cleanup and thoughts * Use scope approach * Seperate defined/declared/declaredInScope magics * Fix declaredInScope * Update spec accordingly
* fix #14421 items uses lent T (#14447)Timothee Cour2020-05-291-0/+1
| | | | | * fix #14421 items uses lent T for seq + openArray * add -d:nimWorkaround14447 * fix test
* fixes #13881Andreas Rumpf2020-05-121-0/+1
| | | | | | * fixes #13881 * documented changed requirements for system.onThreadDestruction * destructors.rst: update the documentation
* forward type alignment information to seqs (#12430)Arne Döring2020-04-191-0/+1
|
* DrNim (Nim compiler with Z3 integration) (#13743)Andreas Rumpf2020-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * code cleanups and feature additions * added basic test and koch/CI integration * make it build on Unix * DrNim: now buildable on Unix, only takes 10 minutes, enjoy * added basic documentation for DrNim which can also be seen as the RFC we're following * drnim: change the build setup so that drnim.exe ends up in bin/ * makes simple floating point ranges work * added basic float range check * drnim: teach Z3 about Nim's range types plus code refactoring * drnim: make unsigned numbers work * added and fixed index checking under setLen * first implementation of .ensures, .invariant and .assume (.requires still missing and so is proc type compatibility checking * drnim: .requires checking implemented * drnim: implemented .ensures properly * more impressive test involving min() * drnim: check for proc type compatibility and base method compatibility wrt .requires and .ensures * testament: support for 'pattern <directory> * koch: uses new <directory> feature of testament * drnim: added tiny musings about 'old' * Make testament work with old SSL versions * koch: add support for 'koch drnim -d:release' * drnim: preparations for the param.old notation
* stacktraces can now show custom runtime msgs per frame (#13351)Timothee Cour2020-03-301-0/+1
| | | | | | | | * stacktraces can now show custom runtime msgs * improve tests/stdlib/tstackframes.nim * fix test for --gc:arc * test --stacktraceMsgs:on and --stacktraceMsgs:off * --stacktracemsgs:off by default
* catchable defects (#13626)Andreas Rumpf2020-03-121-0/+1
| | | | | | | | | | * allow defects to be caught even for --exceptions:goto (WIP) * implemented the new --panics:on|off switch; refs https://github.com/nim-lang/RFCs/issues/180 * new implementation for integer overflow checking * produce a warning if a user-defined exception type inherits from Exception directly * applied Timothee's suggestions; improved the documentation and replace the term 'checked runtime check' by 'panic' * fixes #13627 * don't inherit from Exception directly
* sink parameter inference for types that have destructors (#13544)Andreas Rumpf2020-03-041-0/+2
| | | | | | | | | | | | | | * ensure capitalize doesn't take an inferred sink parameter * sink parameter inference: first version, for now disabled. Changed that sink parameters can be consumed multiple times in order to adhere to our spec. * sink inference can now be disabled with .nosinks; sometimes for proc type interop this is required * fixes yet another critical DFA bug * better implementation that also understands if expressions etc * document sink parameter inference and allow for global disabling
* cleanup Ordinal (#13501)Timothee Cour2020-02-271-0/+1
|
* replace old problematic isNamedTuple implementation by TypeTrait ↵Timothee Cour2020-02-071-0/+1
| | | | | | | | isNamedTuple in dollars.nim (#13347) * replace old problematic isNamedTuple implementation by TypeTrait isNamedTuple * fix for bootstrap
* enable testing -d:nimHasLibFFI mode (#13091)Timothee Cour2020-02-041-0/+6
|
* --exception:goto switch for deterministic exception handling (#12977)Andreas Rumpf2020-01-011-0/+1
| | | | | This implements "deterministic" exception handling for Nim based on goto instead of setjmp. This means raising an exception is much cheaper than in C++'s table based implementations. Supports hard realtime systems. Default for --gc:arc and the C target because it's generally a good idea and arc is all about deterministic behavior. Note: This implies that fatal runtime traps are not catchable anymore! This needs to be documented.
* .cursor implementation (#12637)Andreas Rumpf2019-11-121-0/+1
| | | | | | | | | | | * cursors: first implementation * added currently failing test * .cursor works for doubly linked lists * make -d:useMalloc work again * added code to nil out refs in a destructor * it's now called --gc:arc * renderer.nim: render nkBreakState properly * make simple closure iterators work without leaking
* fixes a regression that caused that Nim devel cannot compile 1.0 anymoreAraq2019-10-241-0/+1
|