Commit Graph

256 Commits

Author SHA1 Message Date
Zahary Karadjov
c1f1f84194 fix some regressions caused by tyTypeDesc[tyNone] 2014-02-15 20:44:01 +02:00
Zahary Karadjov
492fa86638 the delegator pragma becomes a set of dot operators 2014-02-15 17:41:35 +02:00
Zahary Karadjov
a158053ae9 fixes #797; generic procs can be used in places expecting matching concrete proc types 2014-02-11 01:14:57 +02:00
Araq
dbc8aa60e3 fixes 'newSeq[T]' instantiation bug 2014-02-09 00:41:53 +01:00
Araq
47e4f9698c fixes #844 2014-02-02 10:00:10 +01:00
Araq
efcbaa965e remove the old tester 2014-02-02 00:45:47 +01:00
Araq
d8d93218fa bugfix: object constructor doesn't allow 'distinct' types 2014-02-01 11:56:21 +01:00
Zahary Karadjov
5a6030a16b the is operator now uses exactly the same algorithm as proc signature matching 2014-01-26 00:45:50 +02:00
Zahary Karadjov
3f71b7f1f6 implements #766;
expressions such as Type.field are now recognised by the compiler.
This also fixes a bug, preventing the user-defined to check for the presence of
regular fields in addition to procs
2014-01-24 23:52:52 +02: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
Araq
fc452787e7 better html generator for the tester; fixes some VM bugs 2014-01-17 01:18:57 +01:00
Zahary Karadjov
1ffae7cbaf progress towards fixing tgenericshardcases 2014-01-06 00:15:55 +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
fa3bb8d66b restore return type inference 2013-12-30 00:03:57 +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
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
Araq
92b8fac94a case consistency part 4 2013-12-27 23:10:36 +01:00
Araq
2df9b442c6 case consistency part 1 2013-12-27 15:48:53 +01: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
299cefdc98 make the current PContext accessible through TCandidate
the goal here is to remove all the hacks from ParamTypeMatch and to handle
all type matching in typeRel (the context there is required to evaluate any static
params and to run the compilation tests of user-defined type classes)
2013-12-25 00:58:22 +02:00
Araq
1081c104d0 Merge branch 'vm2' of github.com:Araq/Nimrod into vm2 2013-12-24 01:30:48 +01:00
Satish BD
033938a53a Correct the spelling of the word 'implicitly' 2013-12-23 04:29:50 +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
8c553fa8a2 Merge branch 'master' into vm2 2013-12-13 15:58:03 +01:00
Araq
6db20a4be8 new VM: improvements 2013-12-12 01:34:01 +01:00
Zahary Karadjov
95a6e01ea8 Merge branch 'master' of github.com:Araq/Nimrod into upstream 2013-12-09 00:26:04 +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
Araq
29357ab556 more tests are green 2013-12-08 01:47:07 +01:00
Araq
5eba93d584 Merge branch 'master' into vm2
Conflicts:
	compiler/sem.nim
2013-12-05 00:03:27 +01:00
Araq
2dcbc6493a fixes #686 2013-11-29 20:42:12 +01:00
Zahary Karadjov
a068aaed3c simple unit test and better documentation for the user defined type classes 2013-11-17 22:50:26 +02:00
Zahary Karadjov
4cea15d274 improvements for the is operator; implemented the type lifting rule in user-defined type classes 2013-11-17 16:28:42 +02:00
Zahary Karadjov
31dd66acbf support for multiple test variables and var qualifiers in user-defined type classes 2013-11-13 02:24:08 +02:00
Araq
6a9baf3fd7 compiler bootstraps with new VM 2013-10-15 08:06:54 +02:00
Araq
596496f695 fixes #566 2013-09-11 00:00:11 +02:00
Araq
4d86b8a83c fixes #588 2013-09-10 23:49:53 +02:00
Zahary Karadjov
f05ac0cb23 fix regressions affecting the echo magic and the creating of rod files
the markAndSweep GC was not responsible for the regressions so
this commit restores its use
2013-09-07 11:55:19 +03:00
Zahary Karadjov
6082595e96 Merge branch 'type-classes' into upstream 2013-09-03 03:14:56 +03:00
Zahary Karadjov
b5d833b329 implemented the using statement 2013-08-31 19:40:36 +03:00
Araq
e698d6255b fixes #563 2013-08-31 10:03:41 +02:00
Araq
8710118b2c Merge branch 'master' of github.com:Araq/Nimrod 2013-08-30 12:44:27 +02:00
Araq
7056ceda67 float64 is now an alias to 'float'; fixes #545 2013-08-30 12:24:54 +02:00
Zahary Karadjov
01ccb52a00 minor improvement towards tgenericshardcases 2013-08-28 01:10:51 +03:00
Zahary Karadjov
52b00630c8 fix tisop
Adding nil checks on the exit paths for semCompiles errors.
This was probably not needed before, because semIndirectOp
had a special detection for semCompiles contexts. We could
try to restore these, but wouldn't this just postpone the crashes
until someone tries the same expressions in nimrod check?

One of the previous commits also used errorNode to avoid
returning nil. This may be an alaternative approach.
2013-08-27 01:51:02 +03:00
Zahary Karadjov
9cc23118be fix tcompiles 2013-08-27 01:01:03 +03:00
Zahary Karadjov
bdeaee4a33 fix tnoop
This commit requires further investigation.

Fixing semExpr(nkCall) once and for all to work with sym-choices and to
allow overloading with immediate templates and macros will probably set
this straight too.
2013-08-26 23:43:39 +03:00
Zahary Karadjov
28d9398de7 implemented delegators and improved the error messages of unmatched type classes 2013-08-26 23:29:24 +03:00