Commit Graph

226 Commits

Author SHA1 Message Date
Andreas Rumpf
54cc702351 update stdlib to not use deprecated symbols 2016-08-25 17:21:48 +02:00
Andreas Rumpf
60b187513e stdlib and compiler don't use .immediate anymore 2016-07-29 23:51:01 +02:00
Andreas Rumpf
2ac21261b4 Merge pull request #4394 from yglukhov/macro-routines2
Added addPragma routine
2016-07-16 14:35:17 +02:00
Araq
c416346d38 deprecated macros.emit 2016-06-30 18:42:56 +02:00
Yuriy Glukhov
e06b32249f Added addPragma routine 2016-06-22 22:08:07 +03:00
Hans Raaf
25c3a62acd Fix a warning about result reused in macros.nim. 2016-06-21 13:13:46 +02:00
Andreas Rumpf
1a88c01f92 documentation build cleaned up 2016-05-31 03:04:45 +02:00
Andreas Rumpf
d3fe4a2db1 Merge pull request #4113 from jcosborn/gettypeinst
getTypeInst
2016-05-28 17:14:52 +02:00
Araq
97129ebd8a added another version of eqIdent 2016-05-10 22:03:07 +02:00
James Osborn
0356f53b56 getTypeInst and getTypeImpl mostly working now and added test 2016-05-04 00:24:44 -05:00
James Osborn
d462cca21f added getTypeInst which includes generic parameters 2016-05-04 00:24:44 -05:00
Ruslan Mustakov
1d85ca3aa4 Fixed macros unpackX procedured to return values correctly 2016-04-04 15:50:02 +06:00
Anatoly Galiulin
45bbecb021 Use `when insideRLocksModule instead of when compiles` 2016-03-31 16:47:55 +06:00
Anatoly Galiulin
ebc02f6dc0 Fix `XDeclaredButNotUsed` warning when locks or rlocks module is used 2016-03-31 16:47:55 +06:00
Dominik Picheta
34401a3639 Documentation for withLock. 2016-03-23 12:47:05 +00:00
Dominik Picheta
1cc1a7faf4 Rename locks.lock tmplt to withLock and change body to untyped. 2016-03-23 12:45:36 +00:00
Dominik Picheta
f0341979bd Implement a lock template in locks module. 2016-03-18 19:06:34 +00:00
Andreas Rumpf
c9966a3e17 use 'using' instead of 'sig' keyword; cleans up new features a bit 2016-02-29 12:19:54 +01:00
Andreas Rumpf
38dee2095c added 'sig' feature; removed tfShared support in the compiler 2016-02-28 19:56:41 +01:00
Anatoly Galiulin
b0eeacf71e Added rlocks module to documentation and news.txt 2016-02-18 09:46:34 +06:00
Anatoly Galiulin
c1028b3363 Added fixes from Araq's comments 2016-02-17 20:44:48 +06:00
Anatoly Galiulin
0290bc2240 Added reentrant locks module to stdlib 2016-02-17 17:05:20 +06:00
Ruslan Mustakov
ac4dad5193 Added nnkTemplateDef and nnkConverterDef to RoutineNodes set 2016-02-10 14:53:46 +06:00
Andreas Rumpf
c1627354d1 first implementation of the new lambda-lifting pass; barely anything works 2015-12-26 00:42:30 +01:00
Reimer Behrends
f664c576c2 Fix code generation issues with TNimType.
This is an alternative attempt to fix issue #2841 in a way that does not
rely on non-standard C compiler behavior.

The underlying problem is that the typeinfo module includes
system/hti.nim, but system/hti.nim is also included by system.nim. The
result is that the compiler at any given point has two instances of
TNimType with the same external name and will generate code either for
one or both of them. Code generation for the second version is normally
suppressed by using {.importc.}, but that results in a missing type
declaration for modules that only use the second version. This happens
for modules that import typeinfo, because the the second component of
typeinfo.Any has type PNimType = ptr TNimType, which generates a
"TNimType *" struct member.

The previous solution was to have a typedef for TNimType in nimbase.h;
however, this results in duplicate typedefs (specifically, but not only
for the code generated for typeinfo.nim). Duplicate typedefs with the
same type name are allowed in C++ and C11, but are explicitly forbidden
in C89 and C99. Modern versions of gcc and clang accept them anyway, but
this is not standard-compliant and may break for other C compilers or
older versions of gcc and clang.

This patch attempts to fix the issue by making the second component of
typeinfo.Nim a pointer instead of a PNimType and casting back and forth
as needed. Thus, the second version of TNimType occurs only within the
code for typeinfo.nim, where it can be safely omitted.
2015-12-15 13:33:38 +01:00
Araq
ba6d0eb4db fixes #3541 2015-11-18 16:07:20 +01:00
Adam Strzelecki
144dc8f8ad Move deprecated modules into lib/deprecated/
This gives clear indication what modules are now deprecated and reduce clutter
in non-deprecated module directories.
2015-09-30 12:26:25 +02:00
Araq
0cc662d8b8 fixes bootstrapping 2015-08-21 12:18:04 +02:00
Araq
695e2e970e implemented macros.getImpl 2015-08-21 02:34:34 +02:00
Dominik Picheta
b9c1dd0072 Fixed macros.nim not compiling.
Iterator aliases are not possible.
2015-08-03 18:42:02 +01:00
Dominik Picheta
303bc45745 Added documentation to macros.items. 2015-08-03 17:05:14 +01:00
Dominik Picheta
04dc46b1aa Merge branch 'macro-items' of https://github.com/transfuturist/Nim into transfuturist-macro-items 2015-08-03 17:03:57 +01:00
Araq
8913e82f45 removed macros.high as it never worked outside of macros.nim 2015-07-28 02:54:21 +02:00
Araq
8594faa543 fixes #2841 2015-07-22 17:08:21 +02:00
Andreas Rumpf
fc9dc6c828 Merge pull request #2272 from def-/unsigned
Move unsigned int operations to system module
2015-07-11 13:28:20 +02:00
Araq
83842ff4ed Nimrod -> Nim rename 2015-07-08 11:49:33 +02:00
Araq
b9ccd06013 fixes bootstrapping problem 2015-07-04 18:24:57 +02:00
transfuturist
558360e6fd Update macros.nim 2015-07-03 13:48:13 -07:00
Adam Strzelecki
1a0417fbe0 macros: Introduce sameType(a, b) for node types
Previously introduced node comparison `==` was working somehow wrong on nodes
returned from getType(a), comparing just ids of the symbols.

Recently introduced `==` change 47dce26886
started comparing symbol nodes pointer-wise, thus strictly. Since getType(a)
always creates new symbol pointing to the type, comparing two such nodes using
`==` always returns false, even they point to the same type.

That is why we need a new sameType macro to be able to tell if these nodes
point to the same type.
2015-07-03 11:11:10 +02:00
Araq
60ac5e3e76 fixes #3046 2015-07-03 10:55:50 +02:00
Araq
6b3abdba0f made macros.$ a bit smarter; but really this one needs to die 2015-07-03 01:57:01 +02:00
def
2353fe343a Update deprecation notice about unsigned module 2015-07-02 12:26:04 +02:00
def
ec97195d8f Add unsigned exports for backwards-compatibility 2015-07-01 18:59:08 +02:00
def
11a908fd40 Move unsigned int operations to system module
This should lead to less confusion because uint numbers and literals
seem to work, but operators are just missing.
2015-07-01 18:57:54 +02:00
Araq
28de800d61 Merge branch 'more_concurrency' into devel
Conflicts:
	doc/tut1.txt
	lib/core/locks.nim
	lib/pure/collections/tables.nim
	lib/pure/selectors.nim
2015-06-30 12:50:24 +02:00
transfuturist
a31c36e98f Undeprecate children 2015-06-20 12:21:16 -07:00
Stefan Talpalaru
b487d4e425 conditional TGenericSeq extension 2015-06-16 15:15:17 +02:00
Stefan Talpalaru
bdac85f2cf Merge branch 'devel' into gogc 2015-06-15 08:44:02 +02:00
Andreas Rumpf
bbb1bdb4a9 Merge pull request #2643 from grncdr/TAny-and-inheritance
Resolve base type fields in `[](TAny, string)`
2015-06-07 10:56:29 +02:00
pdw
6ca3504dfb lib/core - Dropped 'T' from types 2015-06-04 13:17:08 +02:00