(C context, ObjExpr objx, GeneratorAdapter gen)
| 5603 | } |
| 5604 | |
| 5605 | public void emit(C context, ObjExpr objx, GeneratorAdapter gen){ |
| 5606 | //emitting a Fn means constructing an instance, feeding closed-overs from enclosing scope, if any |
| 5607 | //objx arg is enclosing objx, not this |
| 5608 | // getCompiledClass(); |
| 5609 | if(isDeftype()) |
| 5610 | { |
| 5611 | gen.visitInsn(Opcodes.ACONST_NULL); |
| 5612 | } |
| 5613 | else |
| 5614 | { |
| 5615 | gen.newInstance(objtype); |
| 5616 | gen.dup(); |
| 5617 | if(supportsMeta()) |
| 5618 | gen.visitInsn(Opcodes.ACONST_NULL); |
| 5619 | for(ISeq s = RT.seq(closesExprs); s != null; s = s.next()) |
| 5620 | { |
| 5621 | LocalBindingExpr lbe = (LocalBindingExpr) s.first(); |
| 5622 | LocalBinding lb = lbe.b; |
| 5623 | if(lb.getPrimitiveType() != null) |
| 5624 | objx.emitUnboxedLocal(gen, lb); |
| 5625 | else |
| 5626 | objx.emitLocal(gen, lb, lbe.shouldClear); |
| 5627 | } |
| 5628 | gen.invokeConstructor(objtype, new Method("<init>", Type.VOID_TYPE, ctorTypes())); |
| 5629 | } |
| 5630 | if(context == C.STATEMENT) |
| 5631 | gen.pop(); |
| 5632 | } |
| 5633 | |
| 5634 | public boolean hasJavaClass() { |
| 5635 | return true; |
nothing calls this directly
no test coverage detected