bycopy/byref for object/tuple types
This commit is contained in:
parent
d37fe6e0a5
commit
e4c432387e
6 changed files with 49 additions and 17 deletions
|
|
@ -249,6 +249,8 @@ proc getGlobalTempName(): PRope =
|
|||
proc ccgIntroducedPtr(s: PSym): bool =
|
||||
var pt = skipTypes(s.typ, abstractInst)
|
||||
assert skResult != s.kind
|
||||
if tfByRef in pt.flags: return true
|
||||
elif tfByCopy in pt.flags: return false
|
||||
case pt.Kind
|
||||
of tyObject:
|
||||
if (optByRef in s.options) or (getSize(pt) > platform.floatSize * 2):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue