Commit graph

686 commits

Author SHA1 Message Date
Araq
8c553fa8a2 Merge branch 'master' into vm2 2013-12-13 15:58:03 +01: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
5eba93d584 Merge branch 'master' into vm2
Conflicts:
	compiler/sem.nim
2013-12-05 00:03:27 +01: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
27ec76dd3a VM now supports lambda lifting 2013-11-06 08:37:20 +01:00
Araq
ac474a2812 'noStackFrame' implies 'naked' in the generated C code 2013-10-06 00:10:45 +02:00
Araq
83584bf889 implemented 'import a as b' 2013-09-24 09:36:31 +02:00
Araq
f1e789bfc2 fixes #576 2013-09-18 02:58:18 +02:00
Zahary Karadjov
b5d833b329 implemented the using statement 2013-08-31 19:40:36 +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
Zahary Karadjov
6378fbd66e working code for simple cases of user-defined type classes 2013-08-25 12:17:40 +03:00
Zahary Karadjov
037a1a3e0f parsing of user defined type classes 2013-08-23 21:36:56 +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
Zahary Karadjov
4980ef85e2 check the owners of generic instantiations properly and fix tinvalidclosure 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
fc858927f0 Revert "Revert "fix tforwardgeneric""
This reverts commit e3f93241c3.
2013-08-19 01:29:47 +03:00
Zahary Karadjov
f760bc243b Revert "Revert "static and default params for generics""
This reverts commit 0662ec4a43.
2013-08-19 01:29:37 +03:00
Zahary Karadjov
dfb5cb3c5d remerge "Fixes #267" 2013-08-19 01:26:37 +03:00
Araq
d640121ce6 lfFullExternalName for 'nimrod pretty' 2013-07-30 17:15:58 +02:00
Araq
f9426bfcd5 added macros.genSym 2013-07-24 21:58:17 +02:00
Araq
bfbdb1f028 refactorings for the eval engine; bugfix: clean templates as accessors 2013-07-19 22:22:20 +02:00
Araq
a8542fbe06 some small performance improvement for the evaluator 2013-06-28 23:36:43 +02:00
Araq
139562cc64 implements the 'codegenDecl' pragma 2013-06-27 18:13:11 +02:00
Araq
a674c039fb fixed a long standing xml parser bug; html parser bugfixes + speed improvements 2013-06-27 01:04:56 +02:00
Araq
d4c91bbd85 improvements for 'not nil' checking 2013-06-13 01:40:11 +02:00
Araq
23ef565a3c implemented large parts of the 'not nil' checking 2013-06-09 23:29:43 +02:00
Araq
865a43050d fixes #385 2013-06-03 01:21:21 +02:00
Araq
4308f32255 astToStr is now immediate 2013-06-02 21:52:04 +02:00
Araq
a8ba628bcd Revert "fixes #267"
This reverts commit 7fccdedcb5.
2013-05-27 23:20:41 +02:00
Araq
0662ec4a43 Revert "static and default params for generics"
This reverts commit 46813bbe4e.
2013-05-27 23:18:38 +02:00
Araq
e3f93241c3 Revert "fix tforwardgeneric"
This reverts commit d82a032566.
2013-05-27 23:18:15 +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
d82a032566 fix tforwardgeneric 2013-05-26 15:12:09 +03:00
Zahary Karadjov
46813bbe4e static and default params for generics 2013-05-26 13:59:39 +03:00
Zahary Karadjov
7fccdedcb5 fixes #267 2013-05-26 11:14:23 +03:00
Zahary Karadjov
14b5d5f262 merged the persistent scopes work with the delayed proc compilation strategy 2013-05-12 14:41:32 +03:00
Zahary Karadjov
7a2b1a7520 get rid of ImportTablePos and ModuleTablePos 2013-05-12 01:20:40 +03:00
Zahary Karadjov
9a6f47ae69 switch to a linked list of scopes 2013-05-11 23:45:20 +03:00
Zahary Karadjov
f44a4362bb added a `noforward` pragma that enables a new compilation strategy
not requiring forward declarations on a per-module basis
2013-05-11 22:47:37 +03:00
Araq
9fc98cefda Merge branch 'master' into newparser 2013-05-07 18:44:24 +02:00
Araq
4de6d1be72 fixed void context detection 2013-05-07 13:54:38 +02:00
Zahary Karadjov
f52ea04d22 support suggest after compile in caas mode 2013-05-05 15:12:50 +03:00
Zahary Karadjov
3f1e9b3a25 Merge branch 'master' of gh:/Araq/Nimrod into upstream 2013-05-04 17:50:38 +03:00
Araq
5893a9195c implemented --dynlibOverride option for static linking of 'dynlib' 2013-04-08 16:38:49 +02:00
Araq
3051c52f51 fixes a long-standing bug about procvar checking 2013-03-25 01:44:52 +01:00
Araq
c9ed846a43 added system.locals 2013-03-21 21:28:46 +01:00
Grzegorz Adam Hankiewicz
72a3e21f28 Removes executable bit for text files. 2013-03-16 23:53:07 +01:00
Araq
225d657019 first steps to implement object construction expressions 2013-03-07 01:52:17 +01:00