diff options
author | Araq <rumpf_a@web.de> | 2018-06-08 19:50:36 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-06-08 19:50:36 +0200 |
commit | 8e9551b1c7614029f12e7d62ba81f367d1aaf6bd (patch) | |
tree | 6aaa97a9734784ab5a65d1d2975100e4dd9872d1 /lib/system | |
parent | 8ba7e7d807c37a0988abd69ef9824b4822fe04f3 (diff) | |
parent | f99acdb07584d2c4c5eb1f22d998d97bcd823357 (diff) | |
download | Nim-8e9551b1c7614029f12e7d62ba81f367d1aaf6bd.tar.gz |
fixex merge conflicts
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/channels.nim | 2 | ||||
-rw-r--r-- | lib/system/embedded.nim | 3 | ||||
-rw-r--r-- | lib/system/excpt.nim | 4 |
3 files changed, 8 insertions, 1 deletions
diff --git a/lib/system/channels.nim b/lib/system/channels.nim index 3c5bda4b1..254b87dfc 100644 --- a/lib/system/channels.nim +++ b/lib/system/channels.nim @@ -116,7 +116,7 @@ proc storeAux(dest, src: pointer, mt: PNimType, t: PRawChannel, if mode == mStore: x[] = alloc0(t.region, seq.len *% mt.base.size +% GenericSeqSize) else: - unsureAsgnRef(x, newObj(mt, seq.len * mt.base.size + GenericSeqSize)) + unsureAsgnRef(x, newSeq(mt, seq.len)) var dst = cast[ByteAddress](cast[PPointer](dest)[]) var dstseq = cast[PGenericSeq](dst) dstseq.len = seq.len diff --git a/lib/system/embedded.nim b/lib/system/embedded.nim index 46e84e056..4d453fcca 100644 --- a/lib/system/embedded.nim +++ b/lib/system/embedded.nim @@ -41,3 +41,6 @@ proc reraiseException() {.compilerRtl.} = proc writeStackTrace() = discard proc setControlCHook(hook: proc () {.noconv.}) = discard + +proc closureIterSetupExc(e: ref Exception) {.compilerproc, inline.} = + sysFatal(ReraiseError, "exception handling is not available") diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index fb38948f7..dabfe010e 100644 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -131,6 +131,10 @@ proc popCurrentExceptionEx(id: uint) {.compilerRtl.} = quitOrDebug() prev.up = cur.up +proc closureIterSetupExc(e: ref Exception) {.compilerproc, inline.} = + if not e.isNil: + currException = e + # some platforms have native support for stack traces: const nativeStackTraceSupported* = (defined(macosx) or defined(linux)) and |