//}
//notice that for non-RTValue fields, we need to box
//$ec.isBreakpointEnabled($functionNameField)
JavaExpression isDebuggingNeededCheck = new MethodInvocation.Instance(SCJavaDefn.EXECUTION_CONTEXT_VAR, "isDebugProcessingNeeded", LiteralWrapper.make(dc.getName().getQualifiedName()), JavaTypeName.STRING, JavaTypeName.BOOLEAN, MethodInvocation.InvocationType.VIRTUAL);
JavaStatement.Block debuggingNeededThenBlock = new Block();
JavaStatement isDebuggingNeededIfStatement =
new JavaStatement.IfThenElseStatement(isDebuggingNeededCheck, debuggingNeededThenBlock);
final int arity = dc.getArity();
//new RTValue[]{CAL_Int.make(take$nElements$1), take$list$2}
JavaExpression[] argValues = new JavaExpression[arity];
for (int i = 0; i < arity; ++i) {
String javaArgName = argNames[i];
JavaTypeName javaArgType = argTypes[i];
JavaExpression javaArgValue = new LocalName(javaArgName, javaArgType);
if (!javaArgType.equals(JavaTypeNames.RTVALUE)) {
javaArgValue = SCJavaDefn.boxExpression(javaArgType, javaArgValue);
}
argValues[i] = javaArgValue;
}
JavaExpression argValueArrayCreation = new JavaExpression.ArrayCreationExpression(JavaTypeNames.RTVALUE, argValues);
//$ec.debugProcessing("Prelude.take",
// new RTValue[]{CAL_Int.make(take$nElements$1), take$list$2}));
JavaExpression suspend =
new MethodInvocation.Instance(
SCJavaDefn.EXECUTION_CONTEXT_VAR, "debugProcessing",
new JavaExpression[] {
LiteralWrapper.make(dc.getName().getQualifiedName()),
argValueArrayCreation },