Codereview
This commit is contained in:
committed by
Space Team
parent
39c8d5759b
commit
53783daeaf
+3
-3
@@ -32,13 +32,13 @@ private class WasmArrayConstructorTransformer(
|
||||
override fun visitConstructorCall(expression: IrConstructorCall): IrExpression {
|
||||
val target = expression.symbol.owner
|
||||
|
||||
expression.transformChildrenVoid()
|
||||
|
||||
// Array(size, init) -> create###Array(size, init)
|
||||
val creator = when (target.valueParameters.size) {
|
||||
2 -> context.wasmSymbols.primitiveTypeToCreateTypedArray[target.constructedClass.symbol]
|
||||
else -> null
|
||||
} ?: return super.visitConstructorCall(expression)
|
||||
|
||||
expression.transformChildrenVoid()
|
||||
} ?: return expression
|
||||
|
||||
val scope = (currentScope ?: createScope(container)).scope
|
||||
return context.createIrBuilder(scope.scopeOwnerSymbol).irBlock(expression.startOffset, expression.endOffset) {
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ private class WasmArrayConstructorReferenceTransformer(val context: WasmBackendC
|
||||
val creator = when (target.valueParameters.size) {
|
||||
2 -> context.wasmSymbols.primitiveTypeToCreateTypedArray[target.constructedClass.symbol]
|
||||
else -> null
|
||||
} ?: return super.visitFunctionReference(expression)
|
||||
} ?: return expression
|
||||
|
||||
return IrFunctionReferenceImpl(
|
||||
startOffset = expression.startOffset,
|
||||
|
||||
Reference in New Issue
Block a user