bycopy/byref for object/tuple types

This commit is contained in:
Araq 2012-08-16 17:54:11 +02:00
commit e4c432387e
6 changed files with 49 additions and 17 deletions

View file

@ -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):