From 3aab6a409d0a02874717b1e10ca54a32da35cd1a Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Thu, 5 Nov 2020 14:56:44 +0100 Subject: [PATCH] micro improvements (#15849) --- doc/destructors.rst | 2 +- lib/system/excpt.nim | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/destructors.rst b/doc/destructors.rst index ff09d6644..66f1043b3 100644 --- a/doc/destructors.rst +++ b/doc/destructors.rst @@ -522,7 +522,7 @@ a form of copy elision. To see how and when we can do that, think about this question: In `dest = src` when do we really have to *materialize* the full copy? - Only if `dest` or `src` are mutated -afterward. If `dest` is a local variable that is simple to analyze. And if `src` is a +afterwards. If `dest` is a local variable that is simple to analyze. And if `src` is a location derived from a formal parameter, we also know it is not mutated! In other words, we do a compile-time copy-on-write analysis. diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index c189f116d..04c5d3ce8 100644 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -554,7 +554,8 @@ proc nimFrame(s: PFrame) {.compilerRtl, inl, raises: [].} = when defined(cpp) and appType != "lib" and not gotoBasedExceptions and not defined(js) and not defined(nimscript) and - hostOS != "standalone" and hostOS != "any" and not defined(noCppExceptions): + hostOS != "standalone" and hostOS != "any" and not defined(noCppExceptions) and + not defined(nimQuirky): type StdException {.importcpp: "std::exception", header: "".} = object