Skip to content

Commit

Permalink
Rename ByteCode to Bytecode in class names
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Dec 30, 2015
1 parent 36a72a8 commit 1ccfd7e
Show file tree
Hide file tree
Showing 98 changed files with 1,453 additions and 1,453 deletions.

Large diffs are not rendered by default.

Expand Up @@ -17,11 +17,11 @@

import java.util.List;

public interface ByteCodeNode
public interface BytecodeNode
{
List<ByteCodeNode> getChildNodes();
List<BytecodeNode> getChildNodes();

void accept(MethodVisitor visitor, MethodGenerationContext generationContext);

<T> T accept(ByteCodeNode parent, ByteCodeVisitor<T> visitor);
<T> T accept(BytecodeNode parent, BytecodeVisitor<T> visitor);
}
Expand Up @@ -23,7 +23,7 @@
import com.facebook.presto.bytecode.debug.DebugNode;
import com.facebook.presto.bytecode.debug.LineNumberNode;
import com.facebook.presto.bytecode.debug.LocalVariableNode;
import com.facebook.presto.bytecode.expression.ByteCodeExpression;
import com.facebook.presto.bytecode.expression.BytecodeExpression;
import com.facebook.presto.bytecode.instruction.Constant;
import com.facebook.presto.bytecode.instruction.Constant.BooleanConstant;
import com.facebook.presto.bytecode.instruction.Constant.BoxedBooleanConstant;
Expand All @@ -50,7 +50,7 @@
import com.facebook.presto.bytecode.instruction.VariableInstruction.LoadVariableInstruction;
import com.facebook.presto.bytecode.instruction.VariableInstruction.StoreVariableInstruction;

public class ByteCodeVisitor<T>
public class BytecodeVisitor<T>
{
public T visitClass(ClassDefinition classDefinition)
{
Expand Down Expand Up @@ -88,9 +88,9 @@ public T visitMethod(ClassDefinition classDefinition, MethodDefinition methodDef
return null;
}

public T visitNode(ByteCodeNode parent, ByteCodeNode node)
public T visitNode(BytecodeNode parent, BytecodeNode node)
{
for (ByteCodeNode byteCodeNode : node.getChildNodes()) {
for (BytecodeNode byteCodeNode : node.getChildNodes()) {
byteCodeNode.accept(node, this);
}
return null;
Expand All @@ -100,7 +100,7 @@ public T visitNode(ByteCodeNode parent, ByteCodeNode node)
// Comment
//

public T visitComment(ByteCodeNode parent, Comment node)
public T visitComment(BytecodeNode parent, Comment node)
{
return visitNode(parent, node);
}
Expand All @@ -109,54 +109,54 @@ public T visitComment(ByteCodeNode parent, Comment node)
// Block
//

public T visitBlock(ByteCodeNode parent, ByteCodeBlock block)
public T visitBlock(BytecodeNode parent, BytecodeBlock block)
{
return visitNode(parent, block);
}

//
// Byte Code Expression
//
public T visitByteCodeExpression(ByteCodeNode parent, ByteCodeExpression byteCodeExpression)
public T visitByteCodeExpression(BytecodeNode parent, BytecodeExpression expression)
{
return visitNode(parent, byteCodeExpression);
return visitNode(parent, expression);
}

//
// Flow Control
//

public T visitFlowControl(ByteCodeNode parent, FlowControl flowControl)
public T visitFlowControl(BytecodeNode parent, FlowControl flowControl)
{
return visitNode(parent, flowControl);
}

public T visitTryCatch(ByteCodeNode parent, TryCatch tryCatch)
public T visitTryCatch(BytecodeNode parent, TryCatch tryCatch)
{
return visitFlowControl(parent, tryCatch);
}

public T visitIf(ByteCodeNode parent, IfStatement ifStatement)
public T visitIf(BytecodeNode parent, IfStatement ifStatement)
{
return visitFlowControl(parent, ifStatement);
}

public T visitFor(ByteCodeNode parent, ForLoop forLoop)
public T visitFor(BytecodeNode parent, ForLoop forLoop)
{
return visitFlowControl(parent, forLoop);
}

public T visitWhile(ByteCodeNode parent, WhileLoop whileLoop)
public T visitWhile(BytecodeNode parent, WhileLoop whileLoop)
{
return visitFlowControl(parent, whileLoop);
}

public T visitDoWhile(ByteCodeNode parent, DoWhileLoop doWhileLoop)
public T visitDoWhile(BytecodeNode parent, DoWhileLoop doWhileLoop)
{
return visitFlowControl(parent, doWhileLoop);
}

public T visitLookupSwitch(ByteCodeNode parent, LookupSwitch lookupSwitch)
public T visitLookupSwitch(BytecodeNode parent, LookupSwitch lookupSwitch)
{
return visitFlowControl(parent, lookupSwitch);
}
Expand All @@ -165,17 +165,17 @@ public T visitLookupSwitch(ByteCodeNode parent, LookupSwitch lookupSwitch)
// Instructions
//

public T visitInstruction(ByteCodeNode parent, InstructionNode node)
public T visitInstruction(BytecodeNode parent, InstructionNode node)
{
return visitNode(parent, node);
}

public T visitLabel(ByteCodeNode parent, LabelNode labelNode)
public T visitLabel(BytecodeNode parent, LabelNode labelNode)
{
return visitInstruction(parent, labelNode);
}

public T visitJumpInstruction(ByteCodeNode parent, JumpInstruction jumpInstruction)
public T visitJumpInstruction(BytecodeNode parent, JumpInstruction jumpInstruction)
{
return visitInstruction(parent, jumpInstruction);
}
Expand All @@ -184,67 +184,67 @@ public T visitJumpInstruction(ByteCodeNode parent, JumpInstruction jumpInstructi
// Constants
//

public T visitConstant(ByteCodeNode parent, Constant constant)
public T visitConstant(BytecodeNode parent, Constant constant)
{
return visitInstruction(parent, constant);
}

public T visitBoxedBooleanConstant(ByteCodeNode parent, BoxedBooleanConstant boxedBooleanConstant)
public T visitBoxedBooleanConstant(BytecodeNode parent, BoxedBooleanConstant boxedBooleanConstant)
{
return visitConstant(parent, boxedBooleanConstant);
}

public T visitBooleanConstant(ByteCodeNode parent, BooleanConstant booleanConstant)
public T visitBooleanConstant(BytecodeNode parent, BooleanConstant booleanConstant)
{
return visitConstant(parent, booleanConstant);
}

public T visitIntConstant(ByteCodeNode parent, IntConstant intConstant)
public T visitIntConstant(BytecodeNode parent, IntConstant intConstant)
{
return visitConstant(parent, intConstant);
}

public T visitBoxedIntegerConstant(ByteCodeNode parent, BoxedIntegerConstant boxedIntegerConstant)
public T visitBoxedIntegerConstant(BytecodeNode parent, BoxedIntegerConstant boxedIntegerConstant)
{
return visitConstant(parent, boxedIntegerConstant);
}

public T visitFloatConstant(ByteCodeNode parent, FloatConstant floatConstant)
public T visitFloatConstant(BytecodeNode parent, FloatConstant floatConstant)
{
return visitConstant(parent, floatConstant);
}

public T visitBoxedFloatConstant(ByteCodeNode parent, BoxedFloatConstant boxedFloatConstant)
public T visitBoxedFloatConstant(BytecodeNode parent, BoxedFloatConstant boxedFloatConstant)
{
return visitConstant(parent, boxedFloatConstant);
}

public T visitLongConstant(ByteCodeNode parent, LongConstant longConstant)
public T visitLongConstant(BytecodeNode parent, LongConstant longConstant)
{
return visitConstant(parent, longConstant);
}

public T visitBoxedLongConstant(ByteCodeNode parent, BoxedLongConstant boxedLongConstant)
public T visitBoxedLongConstant(BytecodeNode parent, BoxedLongConstant boxedLongConstant)
{
return visitConstant(parent, boxedLongConstant);
}

public T visitDoubleConstant(ByteCodeNode parent, DoubleConstant doubleConstant)
public T visitDoubleConstant(BytecodeNode parent, DoubleConstant doubleConstant)
{
return visitConstant(parent, doubleConstant);
}

public T visitBoxedDoubleConstant(ByteCodeNode parent, BoxedDoubleConstant boxedDoubleConstant)
public T visitBoxedDoubleConstant(BytecodeNode parent, BoxedDoubleConstant boxedDoubleConstant)
{
return visitConstant(parent, boxedDoubleConstant);
}

public T visitStringConstant(ByteCodeNode parent, StringConstant stringConstant)
public T visitStringConstant(BytecodeNode parent, StringConstant stringConstant)
{
return visitConstant(parent, stringConstant);
}

public T visitClassConstant(ByteCodeNode parent, ClassConstant classConstant)
public T visitClassConstant(BytecodeNode parent, ClassConstant classConstant)
{
return visitConstant(parent, classConstant);
}
Expand All @@ -253,22 +253,22 @@ public T visitClassConstant(ByteCodeNode parent, ClassConstant classConstant)
// Local Variable Instructions
//

public T visitVariableInstruction(ByteCodeNode parent, VariableInstruction variableInstruction)
public T visitVariableInstruction(BytecodeNode parent, VariableInstruction variableInstruction)
{
return visitInstruction(parent, variableInstruction);
}

public T visitLoadVariable(ByteCodeNode parent, LoadVariableInstruction loadVariableInstruction)
public T visitLoadVariable(BytecodeNode parent, LoadVariableInstruction loadVariableInstruction)
{
return visitVariableInstruction(parent, loadVariableInstruction);
}

public T visitStoreVariable(ByteCodeNode parent, StoreVariableInstruction storeVariableInstruction)
public T visitStoreVariable(BytecodeNode parent, StoreVariableInstruction storeVariableInstruction)
{
return visitVariableInstruction(parent, storeVariableInstruction);
}

public T visitIncrementVariable(ByteCodeNode parent, IncrementVariableInstruction incrementVariableInstruction)
public T visitIncrementVariable(BytecodeNode parent, IncrementVariableInstruction incrementVariableInstruction)
{
return visitVariableInstruction(parent, incrementVariableInstruction);
}
Expand All @@ -277,17 +277,17 @@ public T visitIncrementVariable(ByteCodeNode parent, IncrementVariableInstructio
// Field Instructions
//

public T visitFieldInstruction(ByteCodeNode parent, FieldInstruction fieldInstruction)
public T visitFieldInstruction(BytecodeNode parent, FieldInstruction fieldInstruction)
{
return visitInstruction(parent, fieldInstruction);
}

public T visitGetField(ByteCodeNode parent, GetFieldInstruction getFieldInstruction)
public T visitGetField(BytecodeNode parent, GetFieldInstruction getFieldInstruction)
{
return visitFieldInstruction(parent, getFieldInstruction);
}

public T visitPutField(ByteCodeNode parent, PutFieldInstruction putFieldInstruction)
public T visitPutField(BytecodeNode parent, PutFieldInstruction putFieldInstruction)
{
return visitFieldInstruction(parent, putFieldInstruction);
}
Expand All @@ -296,12 +296,12 @@ public T visitPutField(ByteCodeNode parent, PutFieldInstruction putFieldInstruct
// Invoke
//

public T visitInvoke(ByteCodeNode parent, InvokeInstruction invokeInstruction)
public T visitInvoke(BytecodeNode parent, InvokeInstruction invokeInstruction)
{
return visitInstruction(parent, invokeInstruction);
}

public T visitInvokeDynamic(ByteCodeNode parent, InvokeDynamicInstruction invokeDynamicInstruction)
public T visitInvokeDynamic(BytecodeNode parent, InvokeDynamicInstruction invokeDynamicInstruction)
{
return visitInvoke(parent, invokeDynamicInstruction);
}
Expand All @@ -310,17 +310,17 @@ public T visitInvokeDynamic(ByteCodeNode parent, InvokeDynamicInstruction invoke
// Debug
//

public T visitDebug(ByteCodeNode parent, DebugNode debugNode)
public T visitDebug(BytecodeNode parent, DebugNode debugNode)
{
return visitNode(parent, debugNode);
}

public T visitLineNumber(ByteCodeNode parent, LineNumberNode lineNumberNode)
public T visitLineNumber(BytecodeNode parent, LineNumberNode lineNumberNode)
{
return visitDebug(parent, lineNumberNode);
}

public T visitLocalVariable(ByteCodeNode parent, LocalVariableNode localVariableNode)
public T visitLocalVariable(BytecodeNode parent, LocalVariableNode localVariableNode)
{
return visitDebug(parent, localVariableNode);
}
Expand Down
Expand Up @@ -50,13 +50,13 @@ public String toString()
}

@Override
public List<ByteCodeNode> getChildNodes()
public List<BytecodeNode> getChildNodes()
{
return ImmutableList.of();
}

@Override
public <T> T accept(ByteCodeNode parent, ByteCodeVisitor<T> visitor)
public <T> T accept(BytecodeNode parent, BytecodeVisitor<T> visitor)
{
return visitor.visitComment(parent, this);
}
Expand Down

0 comments on commit 1ccfd7e

Please sign in to comment.