Commit graph

217 commits

Author SHA1 Message Date
Araq
38ab30d153 implemented generic converters 2012-12-05 22:03:36 +01:00
Araq
0834224070 disable SSLv2_method for ubuntu 2012-12-03 21:48:12 +01:00
Araq
dd9ad9e497 next steps for first class iterators 2012-11-26 02:43:32 +01:00
Araq
ccd2934e4a first steps for 'not nil' annotation 2012-11-25 11:03:14 +01:00
Araq
9f38ff0c65 next steps for exception tracking 2012-11-03 15:57:12 +01:00
Araq
de338526ec caas barely works now 2012-10-24 01:13:44 +02:00
Zahary Karadjov
3c9e3a6a71 Improved support for nkSymChoices in type coercions
For example, this allows you to pick up a proc with a specific signature from
an overload set.

bugfix: nimrod generated invalid code when a RVO function had a single
compile-time param

bugfix: nkHiddenDerefs were not neutralised properly for indirect proc calls
2012-10-15 21:00:29 +03: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
Araq
ffcbe19cd8 fixes #217 2012-10-13 01:59:20 +02: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
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
Zahary Karadjov
27dc9fcb8f fixes #186 and the ttypedesc1 test case 2012-09-23 19:34:20 +03:00
Zahary Karadjov
b2814df5cd fixed incorrect implicit conversion between arrays of different sizes; see #202 2012-09-13 03:03:12 +03:00
Araq
1786e30991 first steps towards term rewriting macros 2012-08-30 10:55:40 +02:00
Araq
6bcdb9c8f4 implemented generic templates 2012-08-27 01:59:14 +02:00
Araq
b5b5e6e76d distinguish properly between nkOpen and nkClosedSymChoice 2012-08-26 02:47:17 +02:00
Araq
0171566c98 openarray/varargs split; breaks bootstrapping 2012-08-16 08:34:33 +02:00
Araq
1215193010 bugfix: typo in actors.nim 2012-08-15 08:13:31 +02:00
Araq
51de278bd4 next steps for tyVarargs/tyOpenArray split 2012-08-14 08:44:26 +02:00
Araq
c7158af752 idetools: 'usages' and 'def' should work now; documented js backend 2012-08-05 12:33:23 +02:00
Araq
79aaf213d6 idetools improvements 2012-08-03 17:33:44 +02:00
Araq
7d6500f1de idetools improvements; preparation of first class iterators; fixes #183 2012-08-02 23:14:38 +02:00
Araq
674c05f426 made compiler more robust for idetools; implemented idetools.usages 2012-07-30 23:07:19 +02:00
Araq
8413772063 optimizations for system.compiles 2012-07-20 16:23:07 +02:00
Araq
c9513c2e5a bugfix: constraint matching for tyGenericInst; implements #130 2012-07-19 08:41:57 +02:00
Araq
8d99753d63 preparations for making 'closure' the default calling convention for proc types 2012-07-16 23:00:57 +02:00
Araq
b4084df434 improved unsigned support 2012-07-14 14:03:13 +02:00
Araq
e2f8d91290 overloading resolution finally takes inheritance depth into account 2012-07-11 00:10:24 +02:00
Araq
95faae2c0a some more bugfixes for the integer promotion rules 2012-07-10 01:12:03 +02:00
Araq
121d4e0fc2 'addSon' for types deprecated for 'int literal type' analysis 2012-07-09 08:09:00 +02:00
Araq
4fbba0a65a changed integer promotion rules; breaks bootstrapping and lots of code 2012-07-08 21:03:47 +02:00
Araq
36247e0947 added devel/logging; weakrefs test; next steps for proper unsigned support 2012-07-05 00:03:33 +02:00
Araq
2900ceae35 changed integer promotion rules; added math.fmod 2012-06-28 08:33:25 +02:00
Zahary Karadjov
b11fe5d0b4 more uint related fixes 2012-06-14 17:33:00 +03:00
Zahary Karadjov
e2d38a57ec better support for unsigned integers. 2012-06-11 21:38:01 +03: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
22dc76a361 typedesc and expr params
types are now valid proc/template/macro params and you can overload over them:
proc foo(T: typedesc)        # accept any type
proc foo(T: typedesc{int}) # overload specifically for int
proc foo(T: typedesc{int or float or Callable}) # overload for any type matching the constraints

expr{type} is a param expecting compile time value of the designated type (or type class).

when typedesc or expr params are used with a proc, the proc will be instantiated once
for each unique type/value used as parameter.
2012-03-31 18:50:48 +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
Zahary Karadjov
296ef07955 tyOrdinal now means "integral types". tyTypeClass created to take care of type constraints 2012-03-22 16:24:12 +02:00
Zahary Karadjov
3a5cf3d63a expr params implemented for procs; paving the way for type classes 2012-03-22 03:27:00 +02:00
Zahary Karadjov
d1d5fc8254 allowing definitions of procs and templates to be overridden in local scopes 2012-03-14 21:01:18 +02:00
Zahary Karadjov
e5bd3b5b97 bootstraps fine with overloadable templates 2012-03-14 21:00:42 +02:00
Araq
2633e3fb27 closure implementation: first steps 2012-02-04 15:47:48 +01:00
Araq
92e1a21b26 further steps to eliminate generics bugs 2012-01-11 08:52:50 +01:00
Araq
7405278138 bugfix: type alias to generic; generic type not stripped away from for loop variable 2012-01-07 20:03:41 +01:00
Araq
4f1b89c30c year 2012 for most copyright headers 2012-01-02 23:07:35 +01:00
Araq
d25fefc0ff make trecinca|b tests green 2011-12-31 10:23:56 +01:00
Zahary Karadjov
e4e74034c2 path canonicalization and proper project relative paths 2011-12-09 04:40:59 +02:00