public JimpleExpr marshall(FunctionContext context, ImExpr expr) {
// EXPERIMENT:
// Allow implicit referencing of pointers to pass arguments by value
if(expr instanceof ImIndirectExpr) {
ImIndirectExpr ptr = (ImIndirectExpr) expr;
return context.declareTemp(targetType.asJimple(),
ptr.memref().translateToPrimitive(context, targetType));
}
// TODO: casting
return expr.translateToPrimitive(context, targetType);
}