| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This gives clear indication what modules are now deprecated and reduce clutter
in non-deprecated module directories.
|
| |
|
| |
|
|
|
|
| |
Iterator aliases are not possible.
|
| |
|
|\
| |
| |
| | |
transfuturist-macro-items
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously introduced node comparison `==` was working somehow wrong on nodes
returned from getType(a), comparing just ids of the symbols.
Recently introduced `==` change 47dce2688633fad840a2f5e4073c531f1cd640ca
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.
|
| | | |
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
doc/tut1.txt
lib/core/locks.nim
lib/pure/collections/tables.nim
lib/pure/selectors.nim
|
| |/ |
|
| | |
|
|\ \ |
|
| |\ \
| | | |
| | | | |
Resolve base type fields in `[](TAny, string)`
|
| | |/ |
|
| | | |
|
|/ / |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Since typedesc are exception in macros and they are not implicitly converted to
NimNode on macro call, we need some means to perform such conversion on demand.
Fortunately it is as simple as declaring new magic "NGetType" proc with
typedesc parameter.
NOTE: Keeping actual macro exceptional behavior for typedesc is important,
since it allows passing typedesc macro parameter to other procs or macros
expecting type parameter. If typedesc parameter was implicitly converted, then
we would lost this ability.
|
| |
|
|\ |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
When the indentation syntax is allowed it is always interpreted as a
tuple:
type
Unit = tuple
|
|
|
|
| |
so that we get rid of any imports in the core modules
|
|
|
|
| |
is still a remaining import of cmpIgnoreStyle from strutils that needs to be removed as well
|
|
|
|
| |
consistent with error message shown with a set of TNimrodNodeKind by displaying the actual node kind (as well as the expected)
|