Skip to content

Commit

Permalink
micro improvements (nim-lang#15849)
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq authored and mildred committed Jan 11, 2021
1 parent bcb8fe9 commit 335c6a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/destructors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 2 additions & 1 deletion lib/system/excpt.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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: "<exception>".} = object
Expand Down

0 comments on commit 335c6a6

Please sign in to comment.