
com.ibm.wala.shrike.shrikeBT.SwapInstruction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.ibm.wala.shrike Show documentation
Show all versions of com.ibm.wala.shrike Show documentation
T. J. Watson Libraries for Analysis
The newest version!
/*
* Copyright (c) 2002,2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*/
package com.ibm.wala.shrike.shrikeBT;
/**
* This instruction represents the swap instruction, which swaps the two values on top of the
* working stack.
*/
public final class SwapInstruction extends Instruction {
private SwapInstruction() {
super((short) -1);
}
private static final SwapInstruction preallocated = new SwapInstruction();
public static SwapInstruction make() {
return preallocated;
}
@Override
public boolean equals(Object o) {
if (o instanceof SwapInstruction) {
return true;
} else {
return false;
}
}
@Override
public int hashCode() {
return 84323111;
}
@Override
public int getPoppedCount() {
return 2;
}
@Override
public String toString() {
return "Swap()";
}
@Override
public void visit(IInstruction.Visitor v) throws NullPointerException {
v.visitSwap(this);
}
@Override
public boolean isPEI() {
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy