Revert change is ResourceProgramTransformer which is not necessary for WasmGC BE, but breaks C BE

This commit is contained in:
Alexey Andreev 2024-09-09 19:06:52 +02:00
parent e2699554b8
commit 8184c46bae

View File

@ -78,7 +78,11 @@ class ResourceProgramTransformer {
private void removeCastToResource(CastInstruction cast) { private void removeCastToResource(CastInstruction cast) {
if (!cast.isWeak() && hierarchy.isSuperType(RESOURCE, cast.getTargetType(), false)) { if (!cast.isWeak() && hierarchy.isSuperType(RESOURCE, cast.getTargetType(), false)) {
cast.setWeak(true); AssignInstruction assign = new AssignInstruction();
assign.setReceiver(cast.getReceiver());
assign.setAssignee(cast.getValue());
assign.setLocation(cast.getLocation());
cast.replace(assign);
} }
} }