diff options
-rw-r--r-- | compiler/ccgtypes.nim | 4 | ||||
-rw-r--r-- | compiler/destroyer.nim | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index c9705e784..4c85294b2 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -278,7 +278,7 @@ proc ccgIntroducedPtr(s: PSym): bool = elif tfByCopy in pt.flags: return false case pt.kind of tyObject: - if (optByRef in s.options) or (getSize(pt) > platform.floatSize * 2): + if (optByRef in s.options) or (getSize(pt) > platform.floatSize * 3): result = true # requested anyway elif (tfFinal in pt.flags) and (pt.sons[0] == nil): result = false # no need, because no subtyping possible @@ -286,7 +286,7 @@ proc ccgIntroducedPtr(s: PSym): bool = result = true # ordinary objects are always passed by reference, # otherwise casting doesn't work of tyTuple: - result = (getSize(pt) > platform.floatSize*2) or (optByRef in s.options) + result = (getSize(pt) > platform.floatSize*3) or (optByRef in s.options) else: result = false proc fillResult(param: PNode) = diff --git a/compiler/destroyer.nim b/compiler/destroyer.nim index 78df1bf06..afa2e5e50 100644 --- a/compiler/destroyer.nim +++ b/compiler/destroyer.nim @@ -290,7 +290,7 @@ proc injectDestructorCalls*(owner: PSym; n: PNode): PNode = else: result.add body - when false: + when defined(nimDebugDestroys): echo "------------------------------------" - echo owner.name.s, " transformed from: ", n + echo owner.name.s, " transformed to: " echo result |