Properly inline getters; Simplify blocks when last statement returns

This commit is contained in:
dcodeIO
2018-06-22 15:26:59 +02:00
parent 525795b354
commit 7a8995b18b
75 changed files with 5090 additions and 6836 deletions

View File

@ -7,12 +7,10 @@ export class Pointer<T> {
return changetype<Pointer<T>>(offset);
}
// FIXME: does not inline
@inline get offset(): usize {
return changetype<usize>(this);
}
// FIXME: does not inline
@inline get value(): T {
return changetype<T>(changetype<usize>(this));
}