diff options
author | Araq <rumpf_a@web.de> | 2012-01-03 00:21:12 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-01-03 00:21:12 +0100 |
commit | bcbfa3aaa4f05a002702528b0efa980dad8b5286 (patch) | |
tree | 3f44c853f00d721f92c8c209a9955b2117807d8e | |
parent | d32a1e9ba250ccf66f76f568bd2019f3eaa3d3e5 (diff) | |
download | Nim-bcbfa3aaa4f05a002702528b0efa980dad8b5286.tar.gz |
C sources regenerated for new len(openarray) header that catches more bugs; symbol files should work again
-rwxr-xr-x | compiler/semtypes.nim | 4 | ||||
-rwxr-xr-x | install.sh | 8 | ||||
-rwxr-xr-x | lib/system.nim | 7 | ||||
-rwxr-xr-x | todo.txt | 10 | ||||
-rwxr-xr-x | web/news.txt | 2 |
5 files changed, 18 insertions, 13 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 493915025..20e31b969 100755 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -764,8 +764,8 @@ proc processMagicType(c: PContext, m: PSym) = of mOpenArray: setMagicType(m, tyOpenArray, 0) of mRange: setMagicType(m, tyRange, 0) of mSet: setMagicType(m, tySet, 0) - of mSeq: setMagicType(m, tySequence, 0) - of mOrdinal: nil + of mSeq: setMagicType(m, tySequence, 0) + of mOrdinal: setMagicType(m, tyOrdinal, 0) else: GlobalError(m.info, errTypeExpected) proc newConstraint(c: PContext, k: TTypeKind): PType = diff --git a/install.sh b/install.sh index 30660c17d..6c0c2082d 100755 --- a/install.sh +++ b/install.sh @@ -124,6 +124,8 @@ if [ $# -eq 1 ] ; then chmod 644 $docdir/regexprs.txt cp doc/rst.txt $docdir/rst.txt || exit 1 chmod 644 $docdir/rst.txt + cp doc/subexes.txt $docdir/subexes.txt || exit 1 + chmod 644 $docdir/subexes.txt cp doc/theindex.txt $docdir/theindex.txt || exit 1 chmod 644 $docdir/theindex.txt cp doc/tools.txt $docdir/tools.txt || exit 1 @@ -176,6 +178,8 @@ if [ $# -eq 1 ] ; then chmod 644 $libdir/system/assign.nim cp lib/system/atomics.nim $libdir/system/atomics.nim || exit 1 chmod 644 $libdir/system/atomics.nim + cp lib/system/avltree.nim $libdir/system/avltree.nim || exit 1 + chmod 644 $libdir/system/avltree.nim cp lib/system/cellsets.nim $libdir/system/cellsets.nim || exit 1 chmod 644 $libdir/system/cellsets.nim cp lib/system/cgprocs.nim $libdir/system/cgprocs.nim || exit 1 @@ -312,6 +316,8 @@ if [ $# -eq 1 ] ; then chmod 644 $libdir/pure/strtabs.nim cp lib/pure/strutils.nim $libdir/pure/strutils.nim || exit 1 chmod 644 $libdir/pure/strutils.nim + cp lib/pure/subexes.nim $libdir/pure/subexes.nim || exit 1 + chmod 644 $libdir/pure/subexes.nim cp lib/pure/terminal.nim $libdir/pure/terminal.nim || exit 1 chmod 644 $libdir/pure/terminal.nim cp lib/pure/times.nim $libdir/pure/times.nim || exit 1 @@ -328,6 +334,8 @@ if [ $# -eq 1 ] ; then chmod 644 $libdir/pure/xmlparser.nim cp lib/pure/xmltree.nim $libdir/pure/xmltree.nim || exit 1 chmod 644 $libdir/pure/xmltree.nim + cp lib/pure/collections/critbits.nim $libdir/pure/collections/critbits.nim || exit 1 + chmod 644 $libdir/pure/collections/critbits.nim cp lib/pure/collections/intsets.nim $libdir/pure/collections/intsets.nim || exit 1 chmod 644 $libdir/pure/collections/intsets.nim cp lib/pure/collections/lists.nim $libdir/pure/collections/lists.nim || exit 1 diff --git a/lib/system.nim b/lib/system.nim index 905bb9114..274b8d94e 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -309,15 +309,12 @@ proc newSeq*[T](s: var seq[T], len: int) {.magic: "NewSeq", noSideEffect.} ## This is equivalent to ``s = @[]; setlen(s, len)``, but more ## efficient since no reallocation is needed. -when defined(newOpenArrayLen): - proc len*[T: openArray](x: T): int {.magic: "LengthOpenArray", noSideEffect.} -else: - proc len*[T](x: openArray[T]): int {.magic: "LengthOpenArray", noSideEffect.} +proc len*[T: openArray](x: T): int {.magic: "LengthOpenArray", noSideEffect.} proc len*(x: string): int {.magic: "LengthStr", noSideEffect.} proc len*(x: cstring): int {.magic: "LengthStr", noSideEffect.} proc len*[I, T](x: array[I, T]): int {.magic: "LengthArray", noSideEffect.} proc len*[T](x: seq[T]): int {.magic: "LengthSeq", noSideEffect.} - ## returns the length of an array, a sequence or a string. + ## returns the length of an array, an openarray, a sequence or a string. ## This is rougly the same as ``high(T)-low(T)+1``, but its resulting type is ## always an int. diff --git a/todo.txt b/todo.txt index 4e10bdc62..1080e3a77 100755 --- a/todo.txt +++ b/todo.txt @@ -2,13 +2,10 @@ version 0.8.14 ============== - BUG: type TX = TTable[string, int] -- BUG: len(openArray) breaks symbol files - BUG: temp3.nim triggers weird compiler bug - BUG: --debugger:on does not work with talloc.nim -- warning for implicit openArray -> varargs conversion -- implement explicit varargs; **but** ``len(varargs)`` problem remains! - --> solve by implicit conversion from varargs to openarray -- implicit invokation of `items`/`pairs` seems nice +- implicit invokation of `items`/`pairs` seems nice; ensure items(23) does + not compile though version 0.9.0 ============= @@ -125,6 +122,9 @@ Low priority need to recompile clients; er ... what about templates, macros or anything that has inlining semantics? - codegen should use "NIM_CAST" macro and respect aliasing rules for GCC +- warning for implicit openArray -> varargs conversion +- implement explicit varargs; **but** ``len(varargs)`` problem remains! + --> solve by implicit conversion from varargs to openarray Version 2 ========= diff --git a/web/news.txt b/web/news.txt index 2b7b8fca6..fc936aee6 100755 --- a/web/news.txt +++ b/web/news.txt @@ -2,7 +2,7 @@ News ==== -2011-XX-XX Version 0.8.14 released +2012-XX-XX Version 0.8.14 released ================================== Version 0.8.14 has been released! Get it `here <download.html>`_. |