Commit graph

79 commits

Author SHA1 Message Date
Araq
06ad50b671 fixes #669 2014-08-14 21:56:06 +02:00
Clay Sweetser
93fa75bb07 Fixed #1172 (for real) 2014-06-01 17:40:06 -04:00
Araq
be6474af63 removed flawed thread analysis pass 2014-04-20 14:00:04 +02:00
Zahary Karadjov
49b0440c47 make some tests green 2014-03-16 20:42:49 +02:00
Zahary Karadjov
ac271e76b1 more robust handling of proc signatures containing inter-param type references 2014-03-16 20:42:06 +02:00
Zahary Karadjov
37b199d34a first phase of tyGenericParam reforms needed for static params 2014-03-16 20:42:06 +02:00
Zahary Karadjov
085b339b8b implements higher-order inline iterators and return type inference for iterators 2014-03-08 22:57:06 +02:00
Zahary Karadjov
1ffae7cbaf progress towards fixing tgenericshardcases 2014-01-06 00:15:55 +02:00
Zahary Karadjov
8e0941576f clean-up some obsolete code; close #602 2013-12-31 12:39:43 +02:00
Zahary Karadjov
7e24cf26de handle recursive types during the instantiation of meta types; propagate tfHasMeta more carefully 2013-12-30 16:06:32 +02:00
Zahary Karadjov
afddae5aaf Merge branch 'upstream' into devel
Conflicts:
	compiler/ccgutils.nim
	compiler/msgs.nim
	compiler/sem.nim
	compiler/semexprs.nim
	compiler/seminst.nim
	compiler/semmagic.nim
	compiler/semstmts.nim
	compiler/semtypes.nim
	compiler/semtypinst.nim
	compiler/sigmatch.nim
	compiler/types.nim
	compiler/vmgen.nim
	lib/core/macros.nim
	lib/system.nim
	tests/reject/tenummix.nim
	web/news.txt
2013-12-29 17:21:00 +02:00
Zahary Karadjov
72291875bf integrate the logic of fixupProcType into ReplaceTypeVars 2013-12-29 16:08:33 +02:00
Araq
b731e6ef1c case consistency: cs:partial bootstraps on windows 2013-12-29 03:19:10 +01:00
Araq
438703f59e case consistency: next steps 2013-12-29 01:13:51 +01:00
Zahary Karadjov
66a2556525 make more tests green 2013-12-29 00:00:37 +02:00
Zahary Karadjov
a59f13b00d lift generic parameters from concrete composite type classes 2013-12-28 12:50:45 +02:00
Araq
92b8fac94a case consistency part 4 2013-12-27 23:10:36 +01:00
Zahary Karadjov
a27eb51535 towards support for composite type classes such as seq[Number] and SquareMatrix[T] 2013-12-27 18:34:28 +02:00
Araq
2df9b442c6 case consistency part 1 2013-12-27 15:48:53 +01:00
Zahary Karadjov
027f30610e static params: expr[T] is now static[T]
This introduces tyStatic and successfully bootstraps and handles
few simple test cases.  Static params within macros are no longer
treated as PNimrodNodes - they are now equivalent to constants
of the designated type.
2013-12-19 01:06:38 +02:00
Zahary Karadjov
de3b7cd413 progress towards adding negative type classes
[unittest bugfixes]
the block form of check now allows comments
errors when inspecting the arguments of var-accepting procs
2013-12-09 00:09:03 +02:00
Zahary Karadjov
fee2a7ecfa Experimental support for delayed instantiation of generics
This postpones the semantic pass over the generic's body until
the generic is instantiated. There are several pros and cons for
this method and the capabilities that it enables may still be possible
in the old framework if we teach it a few new trick. Such an attempt
will follow in the next commits.

pros:
1) It allows macros to be expanded during generic instantiation that
will provide the body of the generic. See ``tmacrogenerics``.
2) The instantiation code is dramatically simplified. Dealing with unknown
types in the generic's body pre-pass requires a lot of hacky code and error
silencing in semTypeNode. See ``tgenericshardcases``.

cons:
1) There is a performance penalty of roughly 5% when bootstrapping.
2) Certain errors that used to be detected in the previous pre-pass won't
be detected with the new scheme until instantiation.
2013-08-23 01:10:20 +03:00
Zahary Karadjov
ca3a4ce672 hacky fix for generic constraints matching 2013-08-19 01:48:25 +03:00
Zahary Karadjov
b01d9b6181 work-in-progress for compiling generics in their owner module 2013-08-19 01:45:16 +03:00
Zahary Karadjov
c6d0611112 Revert "Revert "made some tests green"" 2013-08-19 01:35:33 +03:00
Zahary Karadjov
a453d8d64d Revert "Revert "further fixes for void stripping. fixes tvoid.""
This reverts commit d11cf5d191.
2013-08-19 01:30:17 +03:00
Zahary Karadjov
cefa16ae77 Revert "Revert "fix threading tests""
This reverts commit 9c45e33d8c.
2013-08-19 01:29:58 +03:00
Zahary Karadjov
fc858927f0 Revert "Revert "fix tforwardgeneric""
This reverts commit e3f93241c3.
2013-08-19 01:29:47 +03:00
Zahary Karadjov
dfb5cb3c5d remerge "Fixes #267" 2013-08-19 01:26:37 +03:00
Araq
a8ba628bcd Revert "fixes #267"
This reverts commit 7fccdedcb5.
2013-05-27 23:20:41 +02:00
Araq
e3f93241c3 Revert "fix tforwardgeneric"
This reverts commit d82a032566.
2013-05-27 23:18:15 +02:00
Araq
9c45e33d8c Revert "fix threading tests"
This reverts commit d5fffc032f.
2013-05-27 23:17:48 +02:00
Araq
d11cf5d191 Revert "further fixes for void stripping. fixes tvoid."
This reverts commit 4ae4005f80.
2013-05-27 23:17:18 +02:00
Araq
c67abd7e61 Revert "more test made green"
This reverts commit 911e6e710f.
2013-05-27 23:16:56 +02:00
Zahary Karadjov
911e6e710f more test made green
the lambda lifting was trying too hard to ignore generic prods
isGenericRoutine was producing false-negatives and only
this allowed for some of the warning and error messages
to be triggered.

some files with mixed line endings were fixed
2013-05-26 21:06:39 +03:00
Zahary Karadjov
4ae4005f80 further fixes for void stripping. fixes tvoid. 2013-05-26 18:06:01 +03:00
Zahary Karadjov
d5fffc032f fix threading tests
* more type names are valid expressions now
* void is properly stripped off during generic instantiation
2013-05-26 16:23:23 +03:00
Zahary Karadjov
d82a032566 fix tforwardgeneric 2013-05-26 15:12:09 +03:00
Zahary Karadjov
7fccdedcb5 fixes #267 2013-05-26 11:14:23 +03:00
Zahary Karadjov
9a6f47ae69 switch to a linked list of scopes 2013-05-11 23:45:20 +03:00
Grzegorz Adam Hankiewicz
72a3e21f28 Removes executable bit for text files. 2013-03-16 23:53:07 +01:00
Zahary Karadjov
81a3585872 merged upstream master 2013-01-27 23:41:45 +02:00
Zahary Karadjov
55f8ed2452 remove any traces of the old global generics cache 2013-01-27 21:28:34 +02:00
Araq
c43697b59a implemented generic multi methods 2013-01-16 08:42:30 +01:00
Araq
cd00679289 some fixes for generic first class iterators 2012-12-15 23:39:27 +01:00
Zahary Karadjov
e6f3f46cd9 store the instantiation cache in the generic symbol 2012-11-28 01:15:13 +02:00
Zahary Karadjov
7e44015491 implemented return type inference
Other fixes:
* bind once is now the default for type classes as documented in the manual
* fixes an issue in template overloading (erroneous  ambiguity when different typedesc params were used)
2012-10-03 01:59:49 +03:00
Zahary Karadjov
badb6c0f66 improved support for typedesc values
* can be stored in constants and variables (including in containers like sequences)
* can be passed to and returned from macros
2012-09-25 02:03:15 +03:00
Araq
759b3201ad proc bodies can be expressions with a type 2012-09-22 22:43:36 +02:00
Araq
043921c7a7 fixes #194 2012-09-20 23:44:52 +02:00