From 137b5f43022c3c5e22a7f28c8012f1d0ea6007c6 Mon Sep 17 00:00:00 2001 From: Parashurama Date: Thu, 2 Feb 2017 11:33:54 +0100 Subject: [PATCH 1/3] fixes #4992 --- compiler/vm.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/vm.nim b/compiler/vm.nim index 7ce96f7dfc..dd91b80e84 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -932,7 +932,10 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = c.module var macroCall = newNodeI(nkCall, c.debug[pc]) macroCall.add(newSymNode(prc)) - for i in 1 .. rc-1: macroCall.add(regs[rb+i].regToNode) + for i in 1 .. rc-1: + let node = regs[rb+i].regToNode + node.info = c.debug[pc] + macroCall.add(node) let a = evalTemplate(macroCall, prc, genSymOwner) a.recSetFlagIsRef ensureKind(rkNode) From 899d84e06dc83d494ed29af039f8e66e544677f7 Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 2 Feb 2017 14:10:32 +0100 Subject: [PATCH 2/3] minor website update --- web/download.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/web/download.rst b/web/download.rst index 34f5725e49..d2c6a0fc23 100644 --- a/web/download.rst +++ b/web/download.rst @@ -16,8 +16,14 @@ We now encourage you to install via the provided zipfiles: * | 64 bit: `nim-0.16.0_x64.zip `_ | SHA-256 e667cdad1ae8e9429147aea5031fa8a80c4ccef6d274cec0e9480252d9c3168c -Unzip these where you want and optionally run ``finish.exe`` to -detect your MingW environment. +Unzip these where you want and **optionally** run ``finish.exe`` to +detect your MingW environment. (Though that's not reliable yet.) + +You can find the required DLLs here, if you lack them for some reason: + +* | 32 and 64 bit: `DLLs.zip `_ + | SHA-256 198112d3d6dc74d7964ba452158d44bfa57adef4dc47be8c39903f2a24e4a555 + Exes %%%% From e236039d109a49531098679156c5ed93a8c533b0 Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 2 Feb 2017 21:12:36 +0100 Subject: [PATCH 3/3] make tests on Windows green under --pedantic --- lib/pure/terminal.nim | 2 +- tests/misc/tfsmonitor.nim | 7 +++---- tests/testament/categories.nim | 4 ++-- tests/testament/tester.nim | 19 +++++++++---------- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/lib/pure/terminal.nim b/lib/pure/terminal.nim index 7a8113b2af..31278eabf4 100644 --- a/lib/pure/terminal.nim +++ b/lib/pure/terminal.nim @@ -630,7 +630,7 @@ proc getch*(): char = when defined(windows): let fd = getStdHandle(STD_INPUT_HANDLE) var keyEvent = KEY_EVENT_RECORD() - var numRead: cint + var numRead: cint while true: # Block until character is entered doAssert(waitForSingleObject(fd, INFINITE) == WAIT_OBJECT_0) diff --git a/tests/misc/tfsmonitor.nim b/tests/misc/tfsmonitor.nim index 27e1a2e323..35f93fb47c 100644 --- a/tests/misc/tfsmonitor.nim +++ b/tests/misc/tfsmonitor.nim @@ -1,6 +1,6 @@ -# -# fsmonitor test -# +discard """ + disabled: windows +""" import unittest import fsmonitor @@ -9,4 +9,3 @@ suite "fsmonitor": test "should not raise OSError, bug# 3611": let m = newMonitor() m.add("foo", {MonitorCloseWrite, MonitorCloseNoWrite}) - diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim index c788395f84..2dc8e33183 100644 --- a/tests/testament/categories.nim +++ b/tests/testament/categories.nim @@ -284,9 +284,9 @@ proc compileExample(r: var TResults, pattern, options: string, cat: Category) = testNoSpec r, makeTest(test, options, cat) proc testStdlib(r: var TResults, pattern, options: string, cat: Category) = - var disabledSet = disabledFiles.toSet() for test in os.walkFiles(pattern): - if test notin disabledSet: + let name = extractFilename(test) + if name notin disabledFiles: let contents = readFile(test).string if contents.contains("when isMainModule"): testSpec r, makeTest(test, options, cat, actionRunNoSpec) diff --git a/tests/testament/tester.nim b/tests/testament/tester.nim index 2734742f49..7efd405bb8 100644 --- a/tests/testament/tester.nim +++ b/tests/testament/tester.nim @@ -108,12 +108,6 @@ proc callCompiler(cmdTemplate, filename, options: string, elif suc =~ pegSuccess: result.err = reSuccess - if result.err == reNimcCrash and - ("Your platform is not supported" in result.msg or - "cannot open 'sdl'" in result.msg or - "cannot open 'opengl'" in result.msg): - result.err = reIgnored - proc callCCompiler(cmdTemplate, filename, options: string, target: TTarget): TSpec = let c = parseCmdLine(cmdTemplate % ["target", targetToCmd[target], @@ -393,9 +387,14 @@ proc makeTest(test, options: string, cat: Category, action = actionCompile, result = TTest(cat: cat, name: test, options: options, target: target, action: action, startTime: epochTime()) -const - # array of modules disabled from compilation test of stdlib. - disabledFiles = ["-"] +when defined(windows): + const + # array of modules disabled from compilation test of stdlib. + disabledFiles = ["coro.nim", "fsmonitor.nim"] +else: + const + # array of modules disabled from compilation test of stdlib. + disabledFiles = ["-"] include categories @@ -460,7 +459,7 @@ proc main() = backend.close() if optPedantic: var failed = r.total - r.passed - r.skipped - if failed > 0 : quit(QuitFailure) + if failed > 0: quit(QuitFailure) if paramCount() == 0: quit Usage