Commit Graph

65 Commits

Author SHA1 Message Date
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
Andreas Rumpf
3a2697dd73 drnim: tiny progress (#13882)
* drnim: tiny progress
* refactoring complete
* drnim: prove .ensures annotations
* Moved code around to avoid code duplication
* drnim: first implementation of the 'old' property
* drnim: be precise about the assignment statement
* first implementation of --assumeUnique
* progress on forall/exists handling
2020-04-15 20:03:25 +02:00
Andreas Rumpf
9ffec79300 DrNim (Nim compiler with Z3 integration) (#13743)
* 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
2020-03-31 22:54:48 +02:00
Andreas Rumpf
3f29911a94 new feature: --staticBoundChecks:on to enforce static array index checking (#10965) 2020-03-18 14:25:10 +01:00
Arne Döring
2f557652d4 fix operators containing percent for VM usage (#13536)
* fixes #13513
* merge tarithmetics in tarithm
2020-03-11 01:01:25 +01:00
Arne Döring
eb42f38088 Remove dead magics (#13551) 2020-03-03 12:42:43 +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
Paul Tan
ad3c10022a guards.nim:sameTree(): handle uint literals correctly (#12483) [backport] 2019-10-22 18:18:33 +02:00
Clyybber
ed1d41c51e Small ast.nim cleanup (#12156)
* Remove sonsLen
* Use Indexable
2019-09-09 11:54:15 +02:00
Arne Döring
3d4ad9739c fix min/max for float numbers (#12068) 2019-09-02 11:21:26 +02:00
Arne Döring
afbcd1b330 int128 on firstOrd, lastOrd and lengthOrd (#11701)
* fixes #11847
2019-08-07 15:53:16 +02:00
Araq
296c48de5e fixes #11436 2019-06-19 09:48:55 +02:00
Clyybber
f18b3af9d4 Replace countup(x, y-1) with x ..< y 2019-05-07 12:32:05 +02:00
jcosborn
044cef152f add custom pragma support for var and let symbols (#9582)
* add custom pragma support for var and let symbols
* updated changelog for custom pragmas on var and let symbols
* add oldast switch for backwards compatibility
2019-01-07 12:36:06 +01:00
cooldome
eaca5be9d6 Change the order of compilation passes, transformation is made lazy at code gen (#8489)
* Ast no transformation
* Add getImplNoTransform to the macros module
* progress on delaying transf
* Fix methods tranformation
* Fix lazy lambdalifting
* fix create thread wrapper
* transform for lambda lifting
* improve getImplTransformed
* Fix destructor tests
* try to fix nimprof for linux
2018-10-18 20:21:25 +02:00
Andreas Rumpf
669a564492 remove more global variables in the Nim compiler 2018-05-27 11:10:56 +02:00
Andreas Rumpf
a4e2b0c153 platform.nim doesn't use globals anymore; prepare msgs.nim for not using globals 2018-05-18 15:18:00 +02:00
Andreas Rumpf
05724645f8 more modules compile again 2018-05-12 11:58:44 +02:00
Andreas Rumpf
2e76a92fe1 sempass2 compiles again 2018-05-11 14:18:39 +02:00
Andreas Rumpf
7eb39d9d26 guards.nim does compile 2018-05-11 13:07:16 +02:00
Arne Döring
6baca58693 Get symbol kind (#7491) 2018-04-11 16:48:01 +02:00
Andreas Rumpf
4f9e8cf313 macros.nim: deprecated ! operator 2017-11-19 13:23:04 +01:00
Andreas Rumpf
3fdb78fe80 fixes #5781 2017-11-18 21:47:14 +01:00
Andreas Rumpf
70ea45cdba deprecated unary '<' 2017-10-29 08:37:13 +01:00
Araq
aa4260ffa8 overloading resolution for getAst; breaking change 2017-03-18 20:57:45 +01:00
Araq
e6c5622aa7 removed tyArrayConstr completely from the compiler; introduced tyAlias instead in preparation for further bugfixes 2016-11-14 23:18:30 +01:00
Araq
29db0d8585 refactoring complete: explicit ident cache 2016-10-31 19:47:20 +01:00
Araq
773d17cd14 big refactoring: step 1 2016-10-31 15:34:44 +01:00
Andreas Rumpf
39ebe2175b compiler almost free of deprecated expr/stmt names 2016-07-30 16:34:42 +02:00
Araq
000c413f35 disjoint checker is smarter (and slower) 2015-09-23 21:46:34 +02:00
Araq
90d1ad4231 made disjoint checker smarter; fixes regressions 2015-09-23 21:46:32 +02:00
rku
47114342c4 Removed magics: mEqI64 mLtI64 mLeI64 2015-06-10 10:25:36 +03:00
rku
372a5d3cbb Removed magics: mAddI64, mSubI64, mMulI64, mDivI64, mModI64
Author:    rku <rokups@zoho.com>
2015-06-10 10:25:35 +03:00
Araq
3fa2e79814 sempass2: bugfixes 2015-04-28 15:01:05 +02:00
Araq
4be0d16520 added '..^' and '..<' operators; 'nil' is allowed for 'len'; added plugin system to the compiler 2015-04-22 12:04:11 +02:00
Araq
aacaa8f171 cleaned up some magics to make room for new magics; added '..<' and '..^' templates 2015-04-22 12:04:09 +02:00
Araq
ee99771afa fixes #2359 2015-03-16 23:24:33 +01:00
Araq
ea5217c9fc disjoint checker is somewhat smarter 2015-03-16 23:02:18 +01:00
Araq
5a21892da0 fixes #2287 2015-03-12 01:45:14 +01:00
Araq
a4b2762249 fixes #325 2015-01-28 19:31:36 +01:00
Guillaume Gelin
3119fe087d Happy new year! 2015-01-06 15:26:33 +01:00
Araq
7916b1f9aa implemented 'guard' annotation 2014-09-21 18:39:00 +02:00
Araq
2781fea9e2 Nimrod renamed to Nim 2014-08-28 09:38:14 +02:00
Araq
b1c8461a3b fixes tinavlid_array_bounds test 2014-08-10 13:46:42 +02:00
Simon Hafner
be534279da Merge pull request #1279 from Varriount/fix-1216
Fix issue #1216
2014-06-18 18:47:45 -05:00
Clay Sweetser
ec23f5ec0a Fix issue #1216 2014-06-15 20:13:44 -04:00
Araq
9953e0bbca tdisjoint_slice2 works 2014-05-31 01:16:16 +02:00
Araq
6470bd8f87 'parallel' proves array bounds 2014-05-29 13:27:45 +02:00
Araq
417b9f5a1d 'parallel' statement almost working 2014-05-22 08:41:50 +02:00
Araq
31b8fd66b1 'parallel' statement: next steps 2014-05-14 23:36:28 +02:00