summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-06-08 19:50:36 +0200
committerAraq <rumpf_a@web.de>2018-06-08 19:50:36 +0200
commit8e9551b1c7614029f12e7d62ba81f367d1aaf6bd (patch)
tree6aaa97a9734784ab5a65d1d2975100e4dd9872d1 /lib/system
parent8ba7e7d807c37a0988abd69ef9824b4822fe04f3 (diff)
parentf99acdb07584d2c4c5eb1f22d998d97bcd823357 (diff)
downloadNim-8e9551b1c7614029f12e7d62ba81f367d1aaf6bd.tar.gz
fixex merge conflicts
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/channels.nim2
-rw-r--r--lib/system/embedded.nim3
-rw-r--r--lib/system/excpt.nim4
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
n232'>232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347