if (methods != null) {
int n = methods.length;
if (n>3) {
code.aload(l_attr);
code.invokevirtual(pool.addMethodRef("java/lang/String", "hashCode", "()I"));
Source notfound = code.getSource();
Switch select = code.select();
for(int i=0; i<n; i++) {
select.addCase(methods[i].getName().substring(prefixLength).hashCode());
}
select.end();
Iterator iter = select.getCases();
while(iter.hasNext()) {
Switch.Case kase = (Switch.Case)iter.next();
kase.bind();
for(int i=0; i<n; i++) {
MethodStatement target = methods[i];
String name = target.getName().substring(prefixLength);
if (name.hashCode() == kase.getKey()) {
code.aload(l_attr);
code.astring(name);
code.invokevirtual(sig_equals);
Source isfalse = code.if_eq();
code.self();
context.compileArgumentList(target, nodes1, l_context);
code.invokevirtual(target.getTypeRef(pool));
if (castToBoolean) {
code.invokevirtual(sig_toBoolean);
code.ireturn();
} else {
code.areturn();
}
isfalse.bind();
}
}
code.go_to(notfound);
}
select.bindDefault();
notfound.bind();
} else {
for(int i=0; i<n; i++) {
MethodStatement target = methods[i];
code.aload(l_attr);
code.astring(target.getName().substring(prefixLength));
code.invokevirtual(sig_equals);
Source isfalse = code.if_eq();
code.self();
context.compileArgumentList(target, nodes1, l_context);
code.invokevirtual(target.getTypeRef(pool));
if (castToBoolean) {
code.invokevirtual(sig_toBoolean);
code.ireturn();
} else {
code.areturn();
}
isfalse.bind();
}
}
}
if (callback != null) {