Merge branch 'devel' into bigbreak

Conflicts:
	web/news.txt
This commit is contained in:
Araq
2014-10-23 23:13:49 +02:00
7 changed files with 35 additions and 27 deletions

View File

@@ -153,7 +153,7 @@ proc importModuleAs(n: PNode, realModule: PSym): PSym =
localError(n.info, errGenerated, "module alias must be an identifier")
elif n.sons[1].ident.id != realModule.name.id:
# some misguided guy will write 'import abc.foo as foo' ...
result = createModuleAlias(realModule, n.sons[1].ident, n.sons[1].info)
result = createModuleAlias(realModule, n.sons[1].ident, realModule.info)
proc myImportModule(c: PContext, n: PNode): PSym =
var f = checkModuleName(n)
@@ -173,7 +173,7 @@ proc evalImport(c: PContext, n: PNode): PNode =
# ``addDecl`` needs to be done before ``importAllSymbols``!
addDecl(c, m) # add symbol to symbol table of module
importAllSymbolsExcept(c, m, emptySet)
importForwarded(c, m.ast, emptySet)
#importForwarded(c, m.ast, emptySet)
proc evalFrom(c: PContext, n: PNode): PNode =
result = n
@@ -198,4 +198,4 @@ proc evalImportExcept*(c: PContext, n: PNode): PNode =
let ident = lookups.considerQuotedIdent(n.sons[i])
exceptSet.incl(ident.id)
importAllSymbolsExcept(c, m, exceptSet)
importForwarded(c, m.ast, exceptSet)
#importForwarded(c, m.ast, exceptSet)

View File

@@ -1949,11 +1949,13 @@ proc semExport(c: PContext, n: PNode): PNode =
while s != nil:
if s.kind in ExportableSymKinds+{skModule}:
x.add(newSymNode(s, a.info))
strTableAdd(c.module.tab, s)
s = nextOverloadIter(o, c, a)
if c.module.ast.isNil:
c.module.ast = newNodeI(nkStmtList, n.info)
assert c.module.ast.kind == nkStmtList
c.module.ast.add x
when false:
if c.module.ast.isNil:
c.module.ast = newNodeI(nkStmtList, n.info)
assert c.module.ast.kind == nkStmtList
c.module.ast.add x
result = n
proc setGenericParams(c: PContext, n: PNode) =

View File

@@ -2125,8 +2125,7 @@ elif hostOS != "standalone":
inc(i)
{.pop.}
proc echo*[T](x: varargs[T, `$`]) {.magic: "Echo", tags: [WriteIOEffect], gcsafe,
locks: 0.}
proc echo*[T](x: varargs[T, `$`]) {.magic: "Echo", tags: [WriteIOEffect], gcsafe.}
## Writes and flushes the parameters to the standard output.
##
## Special built-in that takes a variable number of arguments. Each argument
@@ -2142,7 +2141,7 @@ proc echo*[T](x: varargs[T, `$`]) {.magic: "Echo", tags: [WriteIOEffect], gcsafe
## instead.
proc debugEcho*[T](x: varargs[T, `$`]) {.magic: "Echo", noSideEffect,
tags: [], raises: [], locks: 0.}
tags: [], raises: [].}
## Same as `echo <#echo>`_, but as a special semantic rule, ``debugEcho``
## pretends to be free of side effects, so that it can be used for debugging
## routines marked as `noSideEffect <manual.html#nosideeffect-pragma>`_.

View File

@@ -4,6 +4,9 @@ discard """
import mexporta
# bug #1029:
from rawsockets import accept
# B.TMyObject has been imported implicitly here:
var x: TMyObject
echo($x, q(0), q"0")

View File

@@ -1,8 +1,9 @@
discard """
file: "tselfimport.nim"
line: 6
line: 7
errormsg: "A module cannot import itself"
"""
import strutils as su # guard against regression
import tselfimport #ERROR
echo("Hello World")

View File

@@ -192,8 +192,14 @@
${If} $0 == "success"
ZipDLL::extractall "$TEMP\?zipName" "$INSTDIR\?dir"
Delete "$TEMP\?zipName"
${ElseIf} $0 == "cancel"
MessageBox MB_ICONQUESTION|MB_YESNO|MB_TOPMOST \
"Download of component '?sectionName' cancelled. Continue installation process??" \
IDYES ignore
abort
${Else}
MessageBox MB_ICONSTOP|MB_ABORTRETRYIGNORE "Error: $0" IDRETRY retry IDIGNORE ignore
MessageBox MB_ICONSTOP|MB_ABORTRETRYIGNORE|MB_TOPMOST "Error: $0" \
IDRETRY retry IDIGNORE ignore
abort
${EndIf}
@@ -252,4 +258,4 @@
Function .onInit
${GetRoot} "$EXEDIR" $R0
strCpy $INSTDIR "$R0\?{c.name}"
FunctionEnd
FunctionEnd

View File

@@ -13,16 +13,6 @@ News
prevent name conflicts with the new type ``FileHandle``.
- Comments are now not part of the AST, as such you cannot use them in place
of ``discard``.
- The ``irc`` module has been moved into its own
`repository <https://github.com/nimrod-code/irc>`_
and is now a Nimble package.
- Many wrappers have been moved into their own repositories and are now
Nimble packages including ``lua``, ``opengl``, ``x11``, ``nim-zmq``,
``gtk2``, ``mongo``, ``cairo``, ``tcl``, ``python`` and
`more <https://github.com/Araq/Nimrod/issues/623>`_. They can be
found under the `nim-code <https://github.com/nimrod-code>`_ organisation.
- Removed the deprecated ``web`` module, the ``httpclient`` module should
be used instead.
- Large parts of the stdlib got rid of the T/P type prefixes. Instead most
types now simply start with an uppercased letter. The
so called "partial case sensitivity" is now active allowing for code
@@ -63,7 +53,7 @@ News
2014-10-19 Nimrod version 0.9.6 released
========================================
**Note: 0.9.6 is the last release of Nimrod. The language has been renamed to
**Note: 0.9.6 is the last release of Nimrod. The language is being renamed to
Nim. Nim slightly breaks compatibility.**
This is a maintenance release. The upcoming 0.10.0 release has
@@ -95,13 +85,20 @@ Changes affecting backwards compatibility
will disappear soon!
Compiler improvements
---------------------
- Multi method dispatching performance has been improved by a factor of 10x for
pathological cases.
Language Additions
------------------
- This version introduces the new ``deprecated`` pragma statement that is used
- This version introduces the ``deprecated`` pragma statement that is used
to handle the upcoming massive amount of symbol renames.
- ``spawn`` can now wrap proc that has a return value. It then returns a flow
variable of the wrapped return type.
- ``spawn`` can now wrap proc that has a return value. It then returns a data
flow variable of the wrapped return type.
Library Additions