cw.visitField(ACC_PRIVATE | ACC_FINAL, "function_name", EATOM_DESC, null, null)
.visitEnd();
// make constructor
MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "<init>", "("
+ EFUNHANDLER_TYPE.getDescriptor()
+ EATOM_DESC
+ EATOM_DESC
+ ")V", null, null);
mv.visitCode();
mv.visitVarInsn(ALOAD, 0);
mv.visitMethodInsn(INVOKESPECIAL, super_class_name, "<init>",
"()V");
mv.visitVarInsn(ALOAD, 0);
mv.visitVarInsn(ALOAD, 1);
mv.visitFieldInsn(PUTFIELD, self_type, "handler", EFUNHANDLER_TYPE
.getDescriptor());
mv.visitVarInsn(ALOAD, 0);
mv.visitVarInsn(ALOAD, 2);
mv.visitFieldInsn(PUTFIELD, self_type, "module_name", EATOM_DESC);
mv.visitVarInsn(ALOAD, 0);
mv.visitVarInsn(ALOAD, 3);
mv.visitFieldInsn(PUTFIELD, self_type, "function_name", EATOM_DESC);
mv.visitInsn(RETURN);
mv.visitMaxs(4, 4);
mv.visitEnd();
/** forward toString to handler */
mv = cw.visitMethod(ACC_PUBLIC, "toString", "()Ljava/lang/String;", null, null);
mv.visitCode();
mv.visitVarInsn(ALOAD, 0); // load self
mv.visitFieldInsn(GETFIELD, self_type, "handler", EFUNHANDLER_TYPE.getDescriptor());
mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "toString", "()Ljava/lang/String;");
mv.visitInsn(ARETURN);
mv.visitMaxs(3, 3);
mv.visitEnd();
// make invoke_tail method
//CompilerVisitor.make_invoketail_method(cw, self_type, arity, 0);
make_invoke_method(cw, self_type, arity);
make_go_method(cw, self_type, arity);