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

Method visitFieldInsn

src/jvm/clojure/asm/MethodWriter.java:991–1026  ·  view source on GitHub ↗
(
      final int opcode, final String owner, final String name, final String descriptor)

Source from the content-addressed store, hash-verified

989 }
990
991 @Override
992 public void visitFieldInsn(
993 final int opcode, final String owner, final String name, final String descriptor) {
994 lastBytecodeOffset = code.length;
995 // Add the instruction to the bytecode of the method.
996 Symbol fieldrefSymbol = symbolTable.addConstantFieldref(owner, name, descriptor);
997 code.put12(opcode, fieldrefSymbol.index);
998 // If needed, update the maximum stack size and number of locals, and stack map frames.
999 if (currentBasicBlock != null) {
1000 if (compute == COMPUTE_ALL_FRAMES || compute == COMPUTE_INSERTED_FRAMES) {
1001 currentBasicBlock.frame.execute(opcode, 0, fieldrefSymbol, symbolTable);
1002 } else {
1003 int size;
1004 char firstDescChar = descriptor.charAt(0);
1005 switch (opcode) {
1006 case Opcodes.GETSTATIC:
1007 size = relativeStackSize + (firstDescChar == 'D' || firstDescChar == 'J' ? 2 : 1);
1008 break;
1009 case Opcodes.PUTSTATIC:
1010 size = relativeStackSize + (firstDescChar == 'D' || firstDescChar == 'J' ? -2 : -1);
1011 break;
1012 case Opcodes.GETFIELD:
1013 size = relativeStackSize + (firstDescChar == 'D' || firstDescChar == 'J' ? 1 : 0);
1014 break;
1015 case Opcodes.PUTFIELD:
1016 default:
1017 size = relativeStackSize + (firstDescChar == 'D' || firstDescChar == 'J' ? -3 : -2);
1018 break;
1019 }
1020 if (size > maxRelativeStackSize) {
1021 maxRelativeStackSize = size;
1022 }
1023 relativeStackSize = size;
1024 }
1025 }
1026 }
1027
1028 @Override
1029 public void visitMethodInsn(

Callers 3

readCodeMethod · 0.45
pushMethod · 0.45
fieldInsnMethod · 0.45

Calls 3

addConstantFieldrefMethod · 0.80
put12Method · 0.80
executeMethod · 0.45

Tested by

no test coverage detected