mirror of
https://github.com/irmen/prog8.git
synced 2026-10-22 05:02:58 +00:00
added 'pointer' as type alias for uword or long depending on the compilation target's pointer size
This commit is contained in:
1 parent
67e6888009
commit
0e978b250b
29 files changed
+393
-334
No files matched your search
@@ -32,7 +32,7 @@ internal class NormalMemSizer(val floatsize: Int, val pointerSize: Int = 2): IMe
|
||||
dt.isLong -> 4 * (numElements ?: 1)
|
||||
dt.isWord -> 2 * (numElements ?: 1)
|
||||
dt.isPointer -> pointerSize * (numElements ?: 1)
|
||||
dt.isStructInstance -> dt.subType!!.memsize(this)
|
||||
dt.isStructInstance -> dt.subType?.memsize(this) ?: 0
|
||||
dt.isUndefined -> throw IllegalArgumentException("undefined has no memory size")
|
||||
else -> throw IllegalArgumentException("invalid dt $dt")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user