(ObjExpr fn, ClassVisitor cv)
| 6242 | |
| 6243 | } |
| 6244 | public void doEmit(ObjExpr fn, ClassVisitor cv){ |
| 6245 | Method m = new Method(getMethodName(), getReturnType(), getArgTypes()); |
| 6246 | |
| 6247 | GeneratorAdapter gen = new GeneratorAdapter(ACC_PUBLIC, |
| 6248 | m, |
| 6249 | null, |
| 6250 | //todo don't hardwire this |
| 6251 | EXCEPTION_TYPES, |
| 6252 | cv); |
| 6253 | gen.visitCode(); |
| 6254 | |
| 6255 | Label loopLabel = gen.mark(); |
| 6256 | gen.visitLineNumber(line, loopLabel); |
| 6257 | try |
| 6258 | { |
| 6259 | Var.pushThreadBindings(RT.map(LOOP_LABEL, loopLabel, METHOD, this)); |
| 6260 | |
| 6261 | body.emit(C.RETURN, fn, gen); |
| 6262 | Label end = gen.mark(); |
| 6263 | |
| 6264 | gen.visitLocalVariable("this", "Ljava/lang/Object;", null, loopLabel, end, 0); |
| 6265 | for(ISeq lbs = argLocals.seq(); lbs != null; lbs = lbs.next()) |
| 6266 | { |
| 6267 | LocalBinding lb = (LocalBinding) lbs.first(); |
| 6268 | gen.visitLocalVariable(lb.name, "Ljava/lang/Object;", null, loopLabel, end, lb.idx); |
| 6269 | } |
| 6270 | } |
| 6271 | finally |
| 6272 | { |
| 6273 | Var.popThreadBindings(); |
| 6274 | } |
| 6275 | |
| 6276 | gen.returnValue(); |
| 6277 | //gen.visitMaxs(1, 1); |
| 6278 | gen.endMethod(); |
| 6279 | } |
| 6280 | |
| 6281 | |
| 6282 |
no test coverage detected