(ObjExpr fn, ClassVisitor cv)
| 6446 | abstract Type[] getArgTypes(); |
| 6447 | |
| 6448 | public void emit(ObjExpr fn, ClassVisitor cv){ |
| 6449 | Method m = new Method(getMethodName(), getReturnType(), getArgTypes()); |
| 6450 | |
| 6451 | GeneratorAdapter gen = new GeneratorAdapter(ACC_PUBLIC, |
| 6452 | m, |
| 6453 | null, |
| 6454 | //todo don't hardwire this |
| 6455 | EXCEPTION_TYPES, |
| 6456 | cv); |
| 6457 | gen.visitCode(); |
| 6458 | |
| 6459 | Label loopLabel = gen.mark(); |
| 6460 | gen.visitLineNumber(line, loopLabel); |
| 6461 | try |
| 6462 | { |
| 6463 | Var.pushThreadBindings(RT.map(LOOP_LABEL, loopLabel, METHOD, this)); |
| 6464 | |
| 6465 | body.emit(C.RETURN, fn, gen); |
| 6466 | Label end = gen.mark(); |
| 6467 | gen.visitLocalVariable("this", "Ljava/lang/Object;", null, loopLabel, end, 0); |
| 6468 | for(ISeq lbs = argLocals.seq(); lbs != null; lbs = lbs.next()) |
| 6469 | { |
| 6470 | LocalBinding lb = (LocalBinding) lbs.first(); |
| 6471 | gen.visitLocalVariable(lb.name, "Ljava/lang/Object;", null, loopLabel, end, lb.idx); |
| 6472 | } |
| 6473 | } |
| 6474 | finally |
| 6475 | { |
| 6476 | Var.popThreadBindings(); |
| 6477 | } |
| 6478 | |
| 6479 | gen.returnValue(); |
| 6480 | //gen.visitMaxs(1, 1); |
| 6481 | gen.endMethod(); |
| 6482 | } |
| 6483 | |
| 6484 | void emitClearLocals(GeneratorAdapter gen){ |
| 6485 | } |
no test coverage detected