diff options
author | Araq <rumpf_a@web.de> | 2014-10-23 23:13:49 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-10-23 23:13:49 +0200 |
commit | 201d3c9ed0dac94a337f23416c556b45f7fc1138 (patch) | |
tree | ce2e5a5042d2de98dd8079507cc5728d367ea4f1 | |
parent | ca4d7b1ea865d8ec3c76276c59d83edaac8a392f (diff) | |
parent | d72818e3a390a7e887e18568e82b26ba99214717 (diff) | |
download | Nim-201d3c9ed0dac94a337f23416c556b45f7fc1138.tar.gz |
Merge branch 'devel' into bigbreak
Conflicts: web/news.txt
-rw-r--r-- | compiler/importer.nim | 6 | ||||
-rw-r--r-- | compiler/semexprs.nim | 10 | ||||
-rw-r--r-- | lib/system.nim | 5 | ||||
-rw-r--r-- | tests/modules/texport.nim | 3 | ||||
-rw-r--r-- | tests/modules/tselfimport.nim | 3 | ||||
-rw-r--r-- | tools/niminst/nsis.tmpl | 10 | ||||
-rw-r--r-- | web/news.txt | 25 |
7 files changed, 35 insertions, 27 deletions
diff --git a/compiler/importer.nim b/compiler/importer.nim index b9fd552bf..fbf3be4f2 100644 --- a/compiler/importer.nim +++ b/compiler/importer.nim @@ -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) diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 34e8c6fcd..f2d0c0b82 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -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) = diff --git a/lib/system.nim b/lib/system.nim index f8edca760..da49386ed 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -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>`_. diff --git a/tests/modules/texport.nim b/tests/modules/texport.nim index 99228dfce..9515f9060 100644 --- a/tests/modules/texport.nim +++ b/tests/modules/texport.nim @@ -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") diff --git a/tests/modules/tselfimport.nim b/tests/modules/tselfimport.nim index f20a40407..ddb3a5b09 100644 --- a/tests/modules/tselfimport.nim +++ b/tests/modules/tselfimport.nim @@ -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") diff --git a/tools/niminst/nsis.tmpl b/tools/niminst/nsis.tmpl index c4270081e..974def634 100644 --- a/tools/niminst/nsis.tmpl +++ b/tools/niminst/nsis.tmpl @@ -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 \ No newline at end of file + FunctionEnd diff --git a/web/news.txt b/web/news.txt index 6efb064ac..7038e8234 100644 --- a/web/news.txt +++ b/web/news.txt @@ -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 |