diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-11-26 19:05:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-26 19:05:21 +0100 |
commit | cf516713d070277d1455a20a14de705a1513c0d7 (patch) | |
tree | c9e6f78c3f4591e7de0d981fefc9d5161cf4e5a0 /compiler/cgen.nim | |
parent | 2f1a9eadd7023d6e6f837c8cb97b1cef8e599a61 (diff) | |
download | Nim-cf516713d070277d1455a20a14de705a1513c0d7.tar.gz |
fixes https://github.com/status-im/nimbus-eth2/issues/1549 (#16146)
* fixes https://github.com/status-im/nimbus-eth2/issues/1549 [backport:1.4] * test fixup
Diffstat (limited to 'compiler/cgen.nim')
-rw-r--r-- | compiler/cgen.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim index c2a31b775..15b85097c 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -471,6 +471,14 @@ proc getTemp(p: BProc, t: PType, result: var TLoc; needsInit=false) = result.storage = OnStack result.flags = {} constructLoc(p, result, not needsInit) + when false: + # XXX Introduce a compiler switch in order to detect these easily. + if getSize(p.config, t) > 1024 * 1024: + if p.prc != nil: + echo "ENORMOUS TEMPORARY! ", p.config $ p.prc.info + else: + echo "ENORMOUS TEMPORARY! ", p.config $ p.lastLineInfo + writeStackTrace() proc getTempCpp(p: BProc, t: PType, result: var TLoc; value: Rope) = inc(p.labels) |