[Wasm] Implement Any::hashCode()

This commit is contained in:
Igor Laevsky
2021-11-11 20:15:59 +03:00
committed by TeamCityServer
parent 9e00a2c5b4
commit c7cfa97748
3 changed files with 13 additions and 7 deletions
@@ -267,6 +267,7 @@ class BodyGenerator(val context: WasmFunctionCodegenContext) : IrElementVisitorV
val klassId = context.referenceClassId(klass.symbol)
body.buildConstI32Symbol(klassId)
body.buildConstI32(0) // Any::_hashCode
generateExpression(call.getValueArgument(0)!!)
body.buildGetGlobal(context.referenceClassRTT(klass.symbol))
body.buildStructNew(structTypeName)