MCPcopy Index your code
hub / github.com/clojure/clojure / emitClearLocalsOld

Method emitClearLocalsOld

src/jvm/clojure/lang/Compiler.java:6487–6518  ·  view source on GitHub ↗
(GeneratorAdapter gen)

Source from the content-addressed store, hash-verified

6485 }
6486
6487 void emitClearLocalsOld(GeneratorAdapter gen){
6488 for(int i=0;i<argLocals.count();i++)
6489 {
6490 LocalBinding lb = (LocalBinding) argLocals.nth(i);
6491 if(!localsUsedInCatchFinally.contains(lb.idx) && lb.getPrimitiveType() == null)
6492 {
6493 gen.visitInsn(Opcodes.ACONST_NULL);
6494 gen.storeArg(lb.idx - 1);
6495 }
6496
6497 }
6498// for(int i = 1; i < numParams() + 1; i++)
6499// {
6500// if(!localsUsedInCatchFinally.contains(i))
6501// {
6502// gen.visitInsn(Opcodes.ACONST_NULL);
6503// gen.visitVarInsn(OBJECT_TYPE.getOpcode(Opcodes.ISTORE), i);
6504// }
6505// }
6506 for(int i = numParams() + 1; i < maxLocal + 1; i++)
6507 {
6508 if(!localsUsedInCatchFinally.contains(i))
6509 {
6510 LocalBinding b = (LocalBinding) RT.get(indexlocals, i);
6511 if(b == null || maybePrimitiveType(b.init) == null)
6512 {
6513 gen.visitInsn(Opcodes.ACONST_NULL);
6514 gen.visitVarInsn(OBJECT_TYPE.getOpcode(Opcodes.ISTORE), i);
6515 }
6516 }
6517 }
6518 }
6519
6520 void emitClearThis(GeneratorAdapter gen) {
6521 gen.visitInsn(Opcodes.ACONST_NULL);

Callers

nothing calls this directly

Calls 11

getPrimitiveTypeMethod · 0.95
numParamsMethod · 0.95
getMethod · 0.95
storeArgMethod · 0.80
maybePrimitiveTypeMethod · 0.80
getOpcodeMethod · 0.80
countMethod · 0.65
nthMethod · 0.65
containsMethod · 0.65
visitInsnMethod · 0.45
visitVarInsnMethod · 0.45

Tested by

no test coverage detected