mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-13 15:01:28 +00:00
Utilities and an initial webpack loader
This commit is contained in:
@ -99,12 +99,12 @@ export class Type {
|
||||
}
|
||||
|
||||
/** Computes the sign-extending shift in the target type. */
|
||||
computeSmallIntegerShift(targetType: Type) {
|
||||
computeSmallIntegerShift(targetType: Type): u32 {
|
||||
return targetType.size - this.size;
|
||||
}
|
||||
|
||||
/** Computes the truncating mask in the target type. */
|
||||
computeSmallIntegerMask(targetType: Type) {
|
||||
computeSmallIntegerMask(targetType: Type): u32 {
|
||||
return -1 >>> (targetType.size - this.size);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user