mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-15 22:32:16 +00:00
sizeof, load and store builtins
This commit is contained in:
@@ -29,6 +29,7 @@ export class Type {
|
||||
|
||||
kind: TypeKind;
|
||||
size: i32;
|
||||
byteSize: i32;
|
||||
classType: Class | null;
|
||||
nullable: bool = false;
|
||||
nullableType: Type | null = null; // cached, of this type
|
||||
@@ -36,6 +37,7 @@ export class Type {
|
||||
constructor(kind: TypeKind, size: i32) {
|
||||
this.kind = kind;
|
||||
this.size = size;
|
||||
this.byteSize = Math.ceil(<f64>size / 8);
|
||||
this.classType = null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user