MCPcopy Create free account
hub / github.com/beanshell/beanshell / addSuccessor

Method addSuccessor

src/bsh/org/objectweb/asm/CodeWriter.java:1120–1144  ·  view source on GitHub ↗

Adds a successor to the #currentBlock currentBlock block. @param stackSize the current (relative) stack size in the current block. @param successor the successor block to be added to the current block.

(final int stackSize, final Label successor)

Source from the content-addressed store, hash-verified

1118 */
1119
1120 private void addSuccessor (final int stackSize, final Label successor) {
1121 Edge b;
1122 // creates a new Edge object or reuses one from the shared pool
1123 synchronized (SIZE) {
1124 if (pool == null) {
1125 b = new Edge();
1126 } else {
1127 b = pool;
1128 // removes b from the pool
1129 pool = pool.poolNext;
1130 }
1131 }
1132 // adds the previous Edge to the list of Edges used by this CodeWriter
1133 if (tail == null) {
1134 tail = b;
1135 }
1136 b.poolNext = head;
1137 head = b;
1138 // initializes the previous Edge object...
1139 b.stackSize = stackSize;
1140 b.successor = successor;
1141 // ...and adds it to the successor list of the currentBlock block
1142 b.next = currentBlock.successors;
1143 currentBlock.successors = b;
1144 }
1145
1146 // --------------------------------------------------------------------------
1147 // Utility methods: dump bytecode array

Callers 4

visitJumpInsnMethod · 0.95
visitLabelMethod · 0.95
visitTableSwitchInsnMethod · 0.95
visitLookupSwitchInsnMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected