This commit is contained in:
dcode
2019-03-16 11:24:13 +01:00
parent b8a08da7a5
commit 05a35f42f6
18 changed files with 15370 additions and 16933 deletions

View File

@ -145,6 +145,11 @@ export class Type {
}
}
/** Gets this type's logarithmic alignment in memory. */
get alignLog2(): i32 {
return 31 - clz<i32>(this.byteSize);
}
/** Tests if this is a managed type that needs GC hooks. */
isManaged(program: Program): bool {
if (program.gcImplemented) {