summary refs log tree commit diff stats
path: root/compiler/renderer.nim
Commit message (Collapse)AuthorAgeFilesLines
* Correct all eggs (#15906)Miran2020-11-101-1/+1
| | | | * "eg" is a misspelled "egg", "e.g." is "exempli gratia" * Also, "ie" is "i.e.".
* Use modern enums in compiler (#15775)cooldome2020-11-021-1/+1
|
* fixes a regressionAraq2020-10-081-10/+18
|
* docgen: improve alignment of comments (still not perfect) (#15506)Andreas Rumpf2020-10-071-1/+1
| | | | | | | * docgen: improve alignment of comments (still not perfect) * fix error message text in `tunknown_named_parameter` Co-authored-by: narimiran <narimiran@disroot.org>
* implements https://github.com/nim-lang/RFCs/issues/258 (#15503)Andreas Rumpf2020-10-061-3/+4
| | | | | | | | | * 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
* renderer: use the biggest integer type for masking literals (#15482)alaviss2020-10-041-1/+1
| | | | | | | | On 32-bit system the mask would have a size of 32-bit, which is smaller than the BiggestInt (usually 64-bit) it was masked against. For some reason this only affect 32-bit Windows but not 32-bit Linux. Might just be a difference in how gcc handle out of bound shifts for Windows and Linux.
* borrow checking (#15282)Andreas Rumpf2020-09-091-1/+8
| | | | | | | | | | | * refactoring: move procs to typeallowed.nim * frontend preparations for first class openArray support * prepare the code generator for first class openArray * code generation for first class openArray; WIP * code generation for open arrays, progress * added isViewType proc * preparations for borrow checking * added borrow checking to the front end
* Big compiler Cleanup (#14777)Clyybber2020-08-281-14/+14
|
* Show that a variable is cursor in --expandArc (#15002)Clyybber2020-07-171-0/+2
|
* An optimizer for ARC (#14962)Andreas Rumpf2020-07-151-3/+18
| | | | | | | | | | | | | | | | | | | | * 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>
* renderer.nim: more obvious debug outputAraq2020-07-101-1/+11
|
* init checks and 'out' parameters (#14521)Andreas Rumpf2020-06-231-4/+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
* Implement rendering of `[]=`, `{}`, `{}=` braces (#14539)cooldome2020-06-011-16/+54
| | | | | | | * render curly braces * fix typo * fix test Co-authored-by: cooldome <ariabushenko@bk.ru>
* fix #14174 do not collapse pragma inside runnableExamples (#14385)Timothee Cour2020-05-181-1/+1
|
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-281-2/+2
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* fix several bugs with `repr` (#13386)Timothee Cour2020-02-111-4/+8
|
* fix #12740 (#12774)Arne Döring2019-12-041-7/+16
| | | | | | | | | | * fix #12740 * A different kind of a hack * proper fix * fix typo
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-191/+181
| | | | | | | | | | | | | | | | | | * Cleanup compiler code base * Unify add calls * Unify len invocations * Unify range operators * Fix oversight * Remove {.procvar.} pragma * initCandidate -> newCandidate where reasonable * Unify safeLen calls
* .cursor implementation (#12637)Andreas Rumpf2019-11-121-0/+2
| | | | | | | | | | | * 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
* make renderIds work againAndreas Rumpf2019-11-011-2/+3
|
* renderer letAux fix only for octal literal (#12343)Ridho Pratama2019-10-081-5/+8
| | | | | | | | * renderer letAux fix only for octal literal * Handle when it's octal -1 for i64 * Added testcases
* render typeof as typeofAndreas Rumpf2019-10-071-2/+2
|
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-32/+32
| | | | | * Remove sonsLen * Use Indexable
* fixes #12029; finish the 'unused import' feature (#12064)Andreas Rumpf2019-08-271-0/+5
|
* genSym symbols rendered as b1_416049 instead of b1416049 (#11960)Timothee Cour2019-08-161-7/+12
|
* fixes #10053 (#11951)Timothee Cour2019-08-151-0/+12
|
* int128 on firstOrd, lastOrd and lengthOrd (#11701)Arne Döring2019-08-071-2/+1
| | | | * fixes #11847
* there is only one style -- my styleAraq2019-07-101-7/+7
|
* nimpretty: code cleanupsAraq2019-07-091-7/+4
|
* Fixes #11662: render ops priority (#11664)cooldome2019-07-051-4/+7
|
* docgen: do not render the ugly <//> operator; temporary hack until 0.20 has ↵Araq2019-05-291-1/+4
| | | | been released
* fixes #11239Araq2019-05-221-0/+1
|
* fixes #7816 (#11261)Andreas Rumpf2019-05-151-1/+1
|
* fixes #11131Andreas Rumpf2019-05-131-3/+4
|
* Replace countup(x, y) with x .. yClyybber2019-05-071-6/+6
|
* Replace countup(x, y-1) with x ..< yClyybber2019-05-071-8/+8
|
* dfa.nim: track object/tuple field accesses more precisely; sink(o.x); ↵Araq2019-04-161-1/+1
| | | | sink(o.y) needs to compile; activate the tuple unpacking transf.nim bugfix
* more destructor based changes (#10885)Andreas Rumpf2019-03-231-4/+4
| | | | | | | | | | | * mark user defined destructors with sfOverriden to simplify the logic * refactoring in preparation to merge liftings and generic instantiations for destructors * ast: introduce nkHiddenTryStmt for destructor generation in order to be able to optimize better the code later on * renamed 'patterns' switch to 'trmacros' as it was totally misleading before * destructors: introduce tfCheckedForDestructor flag in preparation of strict =destroy checking * test for invalid/too late destructor introductions * liftdestructors: make code robust for nimsuggest * --newruntime works for hello world again * newruntime: code generation for closures
* docgen: generate pragma after generic, fixes #10792 (#10865)Miran2019-03-191-2/+8
|
* fixes #10805 (#10806)cooldome2019-03-131-2/+9
|
* Render a colon for command if last arg list (#10803)Alexander Ivanov2019-03-081-1/+10
|
* don't crash when rendering wrong nkInfix nodesAndreas Rumpf2018-10-121-8/+8
|
* compiler refactoring; use typesafe path handing; docgen: render symbols ↵Andreas Rumpf2018-09-071-5/+13
| | | | between modules
* Renderer bug fixes (#8804)cooldome2018-09-071-15/+58
| | | | | | Fixes #8763: render bug: pure enums not handled correctly Fixes #8762: render bug: binary operators called with quotes rendered incorrectly FIxes #8761: render bug: inversion of operator priorities
* improve the error message for 'addQuitProc' etc; fixes #5794Araq2018-09-031-12/+12
|
* even more strict isNil handling for strings/seqs in order to detect bugsAraq2018-08-221-2/+2
|
* WIP: disallow 'nil' for strings and seqsAndreas Rumpf2018-08-131-8/+8
|
* Render bug: if expression with statement list expression as condition (#8375)cooldome2018-07-211-5/+12
| | | | * Fixes #8348
* Fixes #8343, Fixes #8344 (#8347)cooldome2018-07-181-5/+3
|
* Fixes #8287 (#8288)cooldome2018-07-121-6/+10
|