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
Timothee Cour
dfe5d115fb
fixes #12663 staticRead now creates a dependency for rebuilds ( #12731 ) [backport]
...
* fix #12663 staticRead
* address comments
2019-11-25 14:44:13 +01:00
Jasper Jenkins
40c5175145
fix range.getType crash
2019-09-05 15:56:44 -07:00
Araq
07d465ca42
[refactoring] remove unused imports in the compiler and in some stdlib modules
2019-07-18 00:36:03 +02:00
Araq
c94647aeca
styleCheck: make the compiler and large parts of the stdlib compatible with --styleCheck:error
2019-07-10 12:42:41 +02:00
Arne Döring
b92fd30282
rename tyExpr/tyStmt to tyUntyped/tyTyped ( #11227 )
2019-05-11 10:11:08 +02:00
Andreas Rumpf
721bf7188b
code cleanup: there is no tyOptRef
2019-02-22 19:42:11 +01:00
Andreas Rumpf
b5eed8ab3f
make code more readable
2019-02-18 10:30:30 +01:00
jcosborn
fc740c54ec
fixes #9600 ( #9601 )
2018-11-07 08:40:00 +01:00
jcosborn
69c0a9c6fb
getTypeImpl now returns pragmas for object types ( #9538 )
2018-10-30 06:41:12 +01:00
Araq
f9eec2aa1e
fixes #9532
2018-10-28 13:23:27 +01:00
LemonBoy
0ead36dae6
Unchecked arrays now have their own type ( #9267 )
2018-10-10 21:03:18 +02:00
LemonBoy
8a1055adce
Fix range type construction in the VM ( #9205 )
...
The `range[X,Y]` representation is wrong, we use `range[X .. Y]`
instead.
Fixes #9194
2018-10-09 15:51:49 +02:00
Andreas Rumpf
86556ebfdb
compiler refactoring; use typesafe path handing; docgen: render symbols between modules
2018-09-07 19:21:16 +02:00
cooldome
dec97924a4
Custom pragmas in proc types ( #8205 )
2018-07-09 12:11:03 +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
bf6c2c5ccf
preparations of making compiler/msgs.nim free of global variables
2018-05-17 15:21:22 +02:00
Araq
2a7fc84c86
remove ast.emptyNode global; cleanup configuration.nim
2018-05-16 03:06:07 +02:00
Andreas Rumpf
fedc136985
transf and vmgen compile again
2018-05-12 09:38:41 +02:00
Varriount
822d2b5085
Fix the return value of GetType and friends when given a var T type. ( #7701 )
2018-04-27 21:35:41 +02:00
Andreas Rumpf
47335aab41
introduce nkTupleConstr AST node for unary tuple construction; breaking change
2018-04-13 17:45:58 +02:00
Andreas Rumpf
e4081a7201
preparations for language extensions: 'sink' and 'lent' types
2018-01-07 23:09:26 +01:00
jcosborn
96a5062b8c
modify getTypeImpl to reduce result to final implementation ( #6891 )
...
* added test case for getTypeImpl
* modify getTypeImpl to reduce result to final implementation
2017-12-09 13:07:37 +01:00
jcosborn
35d7a99b6a
fix getTypeInst for tyGenericInst ( #6868 )
2017-12-04 17:37:25 +01:00
Andreas Rumpf
70ea45cdba
deprecated unary '<'
2017-10-29 08:37:13 +01:00
Andreas Rumpf
02ff5f596c
implemented new experimental scriptable import mechanism
2017-10-01 23:38:23 +02:00
Andreas Rumpf
f7f3a25be8
first steps of making 'opt' a first class type for Nim
2017-09-25 13:19:36 +02:00
Andreas Rumpf
e879da5791
some work to make 'opt' a first class type
2017-09-24 11:21:52 +02:00
Yuriy Glukhov
0755f902dd
Corrected tuple type to nkPar for unnamed tuples on getType ( #6172 )
2017-08-03 10:37:47 +02:00
jcosborn
ec50dab57d
fixed macros.getTypeImpl for a symbol of type tyGenericBody ( #5788 ) ( #5812 )
...
* fixed macros.getTypeImpl for a symbol of type tyGenericBody
* added test case and commented test code
2017-05-14 15:08:41 +02:00
Zahary Karadjov
0b0a3e5f20
support derived values in non-generic user type classes
2017-03-24 16:58:15 +02:00
Zahary Karadjov
8cd5f1f8f5
introduce tyInferred for the unbound concept type params
...
* Why is tyInferred needed?
The bindings in TCandidate are capable of inferring types within a single
call expression. In concepts, we need to infer types in the same way, but
across the whole body of the concept.
Previously, once a concept type param was inferred, it was destructively
mutated using t.assignType, but this proved to be problematic in the presence
of overloads, because the bindings established while a non-matching overload
is tested must be reverted/forgotten. tyInferred offers a non-destructive way to
keep track of the inference progress.
While introducing new types usually requires a lot of code paths in the compiler
to updated, currently tyInferred is only a short-lived type within the concept body
pass and it's unlikely to introduce breakage elsewhere in the compiler.
2017-03-24 16:58:15 +02:00
jcosborn
3bffb3ba35
fix getTypeImpl for tyEnum ( #5568 )
...
* fixed getTypeImpl for tyEnum
* fixed getType for enum and updated release notes about change
2017-03-19 20:34:27 +01:00
Fabian Keller
e2567e2e03
Fix sigsegv in getTypeImpl for unnamed tuple ( #5440 )
...
avoid sigsegv in getTypeImpl for unnamed tuple; fixes #4862
2017-03-02 15:30:19 +01:00
Araq
9d488261df
added system.gorgeEx that includes the exitCode; refs #4874 ; fixes #1994
2017-01-07 02:38:26 +01:00
Araq
c166394024
fixes #5131
2016-12-20 22:42:25 +01:00
Araq
414c2decbe
Merge branch 'devel' into sighashes
2016-12-13 12:18:45 +01:00
Araq
dc5e4b018b
macros.getType: do not copy symbols if not necessary
2016-12-07 20:08:03 +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
Andreas Rumpf
6fd27a8a08
Merge pull request #4945 from arnetheduck/cleanup-tyXxx
...
Cleanup ty xxx
2016-10-24 19:20:02 +02:00
Andreas Rumpf
cceb6c625c
Merge pull request #4872 from flyx/gorgefix
...
Fixes #4871
2016-10-24 17:40:32 +02:00
Jacek Sieka
f5c3eb6a25
clean up tyMutable remnants
2016-10-24 23:30:10 +08:00
Jacek Sieka
b3de34548d
clean up tyConst remnants
2016-10-24 23:19:46 +08:00
Jacek Sieka
f488ed973d
clean up tyBigNum remnants
2016-10-24 23:11:38 +08:00
Jacek Sieka
6f7b891bdc
remove remnants of tyIter
2016-10-24 21:10:48 +08:00
Felix Krause
39f03d816c
Fixes #4871
2016-10-09 18:02:48 +02:00
Jacek Sieka
3cd4cf4320
remove unused stuff
2016-08-09 22:54:27 +08:00
Andreas Rumpf
e8aa6f6c30
fixes #4526
2016-08-04 11:15:38 +02:00
Andreas Rumpf
39ebe2175b
compiler almost free of deprecated expr/stmt names
2016-07-30 16:34:42 +02:00