[Wasm] Require location for buildConstF32 & buildConstF64 and fix all usages
This commit is contained in:
+4
-4
@@ -478,8 +478,8 @@ fun generateDefaultInitializerForType(type: WasmType, g: WasmExpressionBuilder)
|
||||
when (type) {
|
||||
WasmI32 -> g.buildConstI32(0, location)
|
||||
WasmI64 -> g.buildConstI64(0, location)
|
||||
WasmF32 -> g.buildConstF32(0f)
|
||||
WasmF64 -> g.buildConstF64(0.0)
|
||||
WasmF32 -> g.buildConstF32(0f, location)
|
||||
WasmF64 -> g.buildConstF64(0.0, location)
|
||||
is WasmRefNullType -> g.buildRefNull(type.heapType)
|
||||
is WasmRefNullNoneType -> g.buildRefNull(WasmHeapType.Simple.NullNone)
|
||||
is WasmRefNullExternrefType -> g.buildRefNull(WasmHeapType.Simple.NullNoExtern)
|
||||
@@ -512,8 +512,8 @@ fun generateConstExpression(expression: IrConst<*>, body: WasmExpressionBuilder,
|
||||
is IrConstKind.Int -> body.buildConstI32(kind.valueOf(expression), location)
|
||||
is IrConstKind.Long -> body.buildConstI64(kind.valueOf(expression), location)
|
||||
is IrConstKind.Char -> body.buildConstI32(kind.valueOf(expression).code, location)
|
||||
is IrConstKind.Float -> body.buildConstF32(kind.valueOf(expression))
|
||||
is IrConstKind.Double -> body.buildConstF64(kind.valueOf(expression))
|
||||
is IrConstKind.Float -> body.buildConstF32(kind.valueOf(expression), location)
|
||||
is IrConstKind.Double -> body.buildConstF64(kind.valueOf(expression), location)
|
||||
is IrConstKind.String -> {
|
||||
val stringValue = kind.valueOf(expression)
|
||||
val (literalAddress, literalPoolId) = context.referenceStringLiteralAddressAndId(stringValue)
|
||||
|
||||
Reference in New Issue
Block a user