Commit Graph

142 Commits

Author SHA1 Message Date
jcosborn
5a22d6b57b fix codegen bug due to changing existing symbol declaration in template (#14666) 2020-06-15 08:40:12 +02:00
Andreas Rumpf
347a04606b fixes #12885 [backport] (#12895) 2019-12-13 19:20:29 +01:00
Neelesh Chandola
ff5ef95414 Fixes #12832 (#12842) [backport]
* Fix #12832
* nimVm -> nimvm in json.nim
* Use suggestSym() instead of markUsed(); Also use styleCheckUse() for finding style violations
2019-12-08 23:27:25 +01:00
Clyybber
7e747d11c6 Cosmetic compiler cleanup (#12718)
* 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
2019-11-28 17:13:04 +01:00
Andreas Rumpf
059a16b34d fixes #12193 (#12199) 2019-09-16 15:38:07 +02:00
Clyybber
ed1d41c51e Small ast.nim cleanup (#12156)
* Remove sonsLen
* Use Indexable
2019-09-09 11:54:15 +02:00
Andreas Rumpf
488f3ed085 fixes yet another gensym regression (#12145) 2019-09-06 00:45:00 +02:00
Andreas Rumpf
58bcf6cd46 fixes #12121 (#12126) 2019-09-05 08:21:01 +02:00
Araq
fc7fe636e2 improvement for 'unused import' warnings 2019-09-02 12:49:31 +02:00
Andreas Rumpf
b07694cd90 new gensym handling (#11985)
* new .gensym implementation
* make astspec test green again
* introduce a --useVersion switch to group compatibility switches
* fixes #10180
* fixes #11494 
* fixes #11483
* object constructor fields and named parameters are also not gensym'ed
* disabled broken package
2019-08-23 16:15:02 +02:00
Andreas Rumpf
81ddc67785 [refactoring] compiler: simplified markUsed 2019-08-08 22:43:58 +02:00
Araq
4137a4dbf3 [feature] detect unused imports 2019-07-17 22:36:23 +02:00
Arne Döring
f94ec363ab Allow void macro result (#11286)
* allow void macro result
* add test for void macro result type
2019-05-21 21:31:40 +02:00
Aditya Siram
a6d4421241 Fixes #9365 : let with exportC pragma in template. (#11235)
* Fixes #9365 : let with exportC pragma in template.

* Fix according to comments.
2019-05-14 01:34:32 +02:00
Arne Döring
b92fd30282 rename tyExpr/tyStmt to tyUntyped/tyTyped (#11227) 2019-05-11 10:11:08 +02:00
Clyybber
cc28eef38e Replace countup(x, y) with x .. y 2019-05-07 12:37:28 +02:00
Clyybber
f18b3af9d4 Replace countup(x, y-1) with x ..< y 2019-05-07 12:32:05 +02:00
nc-x
e42c304e4a Fix loop tuple unpacking in templates (#11174)
* Fix loop tuple unpacking in templates

* Add test
2019-05-05 12:22:41 +02:00
Arne Döring
ed6160ad6d callsite lineinfe for stackTrace template (#10785) 2019-04-18 14:02:10 +02:00
Andreas Rumpf
bf592c4e94 more destructor based changes (#10885)
* 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
2019-03-23 00:12:05 +01:00
Andreas Rumpf
15c208cd29 it's spelt callsite 2019-02-22 18:28:49 +01:00
Arne Döring
28394153ab 32 bit fixes (#10608) 2019-02-13 23:30:14 +01:00
alaviss
e962be8981 compiler/sem*: improve lineinfo for qualified and generic procs (#10427)
Previously the compiler will believe these are where `newSeq` symbol
starts:

    newSeq[int]()
          ^
    system.newSeq[int]()
                 ^

This commit moves them back to:

    newSeq[int]()
    ^
    system.newSeq[int]()
           ^
2019-01-23 09:24:21 +01:00
Andreas Rumpf
2104863910 nimfind: improvements 2018-11-15 12:17:12 +01:00
Andreas Rumpf
6e8ed8c6fa added first version of a nimfind tool for the poor souls that don't have a good nimsuggest integretation 2018-11-14 16:04:54 +01:00
Araq
331d1a6ca1 fixes regressions 2018-10-30 11:28:45 +01:00
Steve Kellock
173e8c4913 fixes unexpected transforming of runnableExamples (#9158) 2018-10-09 20:14:54 +02:00
Araq
e09eeb02bf fixes #8052 2018-08-31 17:27:57 +02:00
Andreas Rumpf
db35ac435b code cleanup: remove newScopeForIf switch 2018-07-04 20:04:08 +02:00
Andreas Rumpf
5348fef003 implements a --nep1:on switch to make the compiler enforce the naming conventions outlined in NEP-1 2018-06-13 01:44:19 +02:00
Andreas Rumpf
40ec7be45c refactoring: remove idents.legacy global variable and pass the IdentCache around explicitly 2018-05-27 22:09:15 +02:00
Andreas Rumpf
669a564492 remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
Andreas Rumpf
ce859d8c16 more modules compile again 2018-05-12 16:35:59 +02:00
cooldome
2c9e56a783 Implement custom annotations (#6987) 2018-01-09 15:25:22 +01:00
Araq
ee67a67ac4 first steps in adding template/macro calls to stack traces 2017-12-21 10:03:33 +01:00
Andreas Rumpf
4e4d466d06 minor breaking change: for loop bodies now get their own scope 2017-11-05 16:53:05 +01:00
Andreas Rumpf
f1dab39086 remove old implementation of the roof operator; make tests green again; close #6292 2017-10-29 20:36:07 +01:00
Andreas Rumpf
70ea45cdba deprecated unary '<' 2017-10-29 08:37:13 +01:00
Andreas Rumpf
1a61c4d46d first implementation of the 'func' keyword 2017-09-23 23:22:53 +02:00
Arne Döring
000b8afd26 Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
Araq
4a77b66b19 fixes #5478 2017-03-06 18:38:15 +01:00
Andreas Rumpf
3e7b04683c make tests green again 2017-03-02 12:23:35 +01:00
Andreas Rumpf
46f33515d7 Merge branch 'devel' into faster-nimsuggest 2017-02-24 01:28:50 +01:00
Andreas Rumpf
2d546ca0ac fixes #5417 2017-02-24 00:32:14 +01:00
Andreas Rumpf
46efaf294b big compiler refactoring; avoid globals for multi method dispatcher generation 2017-02-22 16:27:52 +01:00
Araq
97e26967f1 fixes #5383 2017-02-16 00:43:14 +01:00
Dominik Picheta
d5bb5e832b Merge branch 'devel' into feature/3691 2017-02-07 18:34:05 +01:00
Dominik Picheta
3c8c5d081e Adds except T as ident handling in semtempl. 2017-02-06 20:42:01 +01:00
Andreas Rumpf
abaf5d0bdb fixes #5285 2017-02-04 21:00:07 +01:00
Andreas Rumpf
d651012688 template+emit supports volatileRead and volatileWrite ops 2017-01-23 11:22:19 +01:00