mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-23 11:41:45 +00:00
Update binaryen; Replace uses of Math.* with portable built-ins
This commit is contained in:
@ -1707,7 +1707,7 @@ export class Compiler extends DiagnosticEmitter {
|
||||
case LiteralKind.FLOAT: {
|
||||
const floatValue: f64 = (<FloatLiteralExpression>expression).value;
|
||||
if (contextualType == Type.f32)
|
||||
return this.module.createF32(Math.fround(floatValue));
|
||||
return this.module.createF32(<f32>floatValue);
|
||||
this.currentType = Type.f64;
|
||||
return this.module.createF64(floatValue);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ export class Type {
|
||||
constructor(kind: TypeKind, size: i32) {
|
||||
this.kind = kind;
|
||||
this.size = size;
|
||||
this.byteSize = Math.ceil(<f64>size / 8);
|
||||
this.byteSize = ceil<f64>(<f64>size / 8);
|
||||
this.classType = null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user