Araq
f2216b8e32
fixes #833
2014-02-14 02:12:07 +01:00
Araq
d912d18379
tyTypeDesc and tyRange always have 1 child; this might be tyNone but it is required for skipTypes
2014-02-05 23:43:13 +01:00
Zahary Karadjov
5d712e0d3f
Merge branch 'devel' of https://www.github.com/Araq/Nimrod into devel
2014-01-26 01:38:45 +02:00
Araq
8a7f50889c
fixes #838
2014-01-25 23:03:43 +01:00
Zahary Karadjov
a6a18be089
support for parametric user-defined type classes
2014-01-24 14:13:32 +02:00
Araq
73c6efdf66
'nil' as a statement is deprecated, use an empty 'discard' instead
2014-01-19 16:54:59 +01:00
Zahary Karadjov
1ffae7cbaf
progress towards fixing tgenericshardcases
2014-01-06 00:15:55 +02:00
Zahary Karadjov
789ba107cf
introduce tyFromExpr; fixes #618
2014-01-04 13:10:52 +02:00
Zahary Karadjov
8f3d5a25a6
Templates will pick the candidate in the nearest scope when symbols are mixed-in
2013-12-31 04:04:59 +02:00
Zahary Karadjov
754e2ef1db
migrate the static param handling to ReplaceTypeVars; fix tgenericvariant
2013-12-30 19:15:41 +02:00
Zahary Karadjov
af7c3251cd
properly remove intLiterals from proc signatures; fixes trettypeinference
2013-12-30 17:07:49 +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
723efe7cfb
fix the filtering of void params in procs' signatures
2013-12-29 19:26:52 +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
a427648c48
case consistency part 2
2013-12-27 16:35:21 +01:00
Araq
2df9b442c6
case consistency part 1
2013-12-27 15:48:53 +01:00
Zahary Karadjov
edab4aaad0
better integration of tyStatic into typeRel
2013-12-25 22:29:44 +02:00
Zahary Karadjov
1d02f2ea53
wip type class reforms (the compiler bootstraps fine)
...
* replace tfAny and tfAll with tyAnd and tyOr
* integrate matchTypeClass into typeRel
* introduce tyBuiltInTypeClass to handle types such as tuple, object, proc, etc
2013-12-25 19:25:04 +02: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
Araq
ac474a2812
'noStackFrame' implies 'naked' in the generated C code
2013-10-06 00:10:45 +02:00
Zahary Karadjov
01ccb52a00
minor improvement towards tgenericshardcases
2013-08-28 01:10:51 +03:00
Zahary Karadjov
8682ed9bd0
pass-through of static int generic params to arrays when late instantiation is disabled
2013-08-23 01:10:20 +03: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
Araq
23ef565a3c
implemented large parts of the 'not nil' checking
2013-06-09 23:29:43 +02:00
Grzegorz Adam Hankiewicz
72a3e21f28
Removes executable bit for text files.
2013-03-16 23:53:07 +01:00
Zahary Karadjov
55f8ed2452
remove any traces of the old global generics cache
2013-01-27 21:28:34 +02:00
Zahary Karadjov
41cbd1c980
minor bug fixes to make some tests green
2013-01-21 02:03:13 +02:00
Zahary Karadjov
e6f3f46cd9
store the instantiation cache in the generic symbol
2012-11-28 01:15:13 +02:00
Zahary Karadjov
4ef96a7435
fixes #211
...
transf: fix a clang compilation error when lineDir:on is used
2012-10-13 23:31:27 +03:00
Zahary Karadjov
d9d82fb0af
syntax compatibility between do blocks and stmt blocks
...
See the section `do notation` in the manual for more info.
* nkMacroStmt has been removed
Macro statements are now mapped to regular nkCall nodes.
The support for additional clauses (such as else, except, of, etc)
have been restored - they will now appear as additional arguments
for the nkCall node (as nkElse, nkExcept, etc nodes)
* fixed some regressions in the `is` operator and semCompiles
2012-10-04 15:37:26 +03:00
Zahary Karadjov
9c8bc3a244
the is operator now works with type classes and type variables
...
bugfixes:
the DLL tests were failing on Mac OS X, due to an incorrect DynlibFormat
2012-10-03 01:59:49 +03:00
Araq
b595fc8347
better error handling for better idetools support
2012-07-29 23:08:28 +02:00
Araq
4966212141
more fixes for new integer promotion rules; fixes #152 ; fixes #157 ; fixes #156 ; fixes #155
2012-07-09 21:11:11 +02:00
Araq
121d4e0fc2
'addSon' for types deprecated for 'int literal type' analysis
2012-07-09 08:09:00 +02:00
Zahary Karadjov
251c44ff04
implicit generics types as return types. removed the error message for capturing incorrect uses of `proc`
2012-04-21 03:24:32 +03:00
Zahary Karadjov
c1d16c5a4d
made built-in types primary expressions to allow infix operators to be used with them
2012-04-20 21:35:59 +03:00
Zahary Karadjov
bc2eb0ea9b
generic types can be used like type classes. distinct can be applied to type classes.
2012-03-25 20:55:21 +03:00
Araq
4f1b89c30c
year 2012 for most copyright headers
2012-01-02 23:07:35 +01:00
Araq
72651de710
bugfix: 'when' sections in generic objects now work, so TThread[void] compiles
2011-11-20 16:13:03 +01:00
Araq
90db9171a2
compilation cache: various bugfixes; works for the compiler itself
2011-10-27 00:41:42 +02:00
Araq
9fb36bd20c
compilation cache: mostly working; generics not yet
2011-10-25 15:26:36 +02:00
Araq
fd62116f6e
bugfixes for generics; new threads implementation still broken
2011-09-20 00:56:48 +02:00
Araq
2183bf77a6
added xmltree.innerText; fixes #49
2011-08-15 19:40:00 +02:00