MCPcopy Index your code
hub / github.com/airlift/bytecode / accept

Method accept

src/main/java/io/airlift/bytecode/control/ForLoop.java:115–144  ·  view source on GitHub ↗
(MethodVisitor visitor, MethodGenerationContext generationContext)

Source from the content-addressed store, hash-verified

113 }
114
115 @Override
116 public void accept(MethodVisitor visitor, MethodGenerationContext generationContext)
117 {
118 checkState(!condition.isEmpty(), "ForLoop does not have a condition set");
119
120 BytecodeBlock block = new BytecodeBlock();
121
122 block.append(new BytecodeBlock()
123 .setDescription("initialize")
124 .append(initialize));
125
126 block.visitLabel(beginLabel)
127 .append(new BytecodeBlock()
128 .setDescription("condition")
129 .append(condition))
130 .ifFalseGoto(endLabel);
131
132 block.append(new BytecodeBlock()
133 .setDescription("body")
134 .append(body));
135
136 block.visitLabel(continueLabel)
137 .append(new BytecodeBlock()
138 .setDescription("update")
139 .append(update))
140 .gotoLabel(beginLabel)
141 .visitLabel(endLabel);
142
143 block.accept(visitor, generationContext);
144 }
145
146 @Override
147 public List<BytecodeNode> getChildNodes()

Callers

nothing calls this directly

Calls 8

appendMethod · 0.95
visitLabelMethod · 0.95
acceptMethod · 0.95
isEmptyMethod · 0.80
setDescriptionMethod · 0.80
ifFalseGotoMethod · 0.80
gotoLabelMethod · 0.80
visitForMethod · 0.45

Tested by

no test coverage detected