Skip to content

Commit

Permalink
Trivial refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Gene Gleyzer committed Sep 6, 2023
1 parent 16fc22a commit 8b01a5d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion javatools/src/main/java/org/xvm/asm/MethodStructure.java
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,6 @@ public BinaryAST<Constant> getAst()
Constant[] aconstLocal = m_aconstLocal;
assert aconstLocal != null;

// REVIEW GG the ConstantRegistry should pull the data from the method
ConstantResolver<Constant> res = new ConstantRegistry(this, pool);
DataInput in = new DataInputStream(new ByteArrayInputStream(abAst));
try
Expand Down
4 changes: 2 additions & 2 deletions javatools/src/main/java/org/xvm/asm/ast/IsExprAST.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class IsExprAST<C>

IsExprAST() {}

public IsExprAST(C typeOfType, ExprAST<C> expr1, ExprAST<C> expr2) {
public IsExprAST(ExprAST<C> expr1, ExprAST<C> expr2, C typeOfType) {
super(expr1, Operator.Is, expr2);

this.typeOfType = typeOfType;
Expand Down Expand Up @@ -59,7 +59,7 @@ protected void readBody(DataInput in, ConstantResolver<C> res)
super.readBody(in, res);

if (readMagnitude(in) != 0) {
typeOfType = res.getConstant(readMagnitude(in));
typeOfType = res.getConstant(readMagnitude(in));
}
booleanType = res.typeForName("Boolean");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import org.xvm.asm.Register;

import org.xvm.asm.ast.ConstantExprAST;
import org.xvm.asm.ast.NotImplAST;
import org.xvm.asm.ast.ExprAST;
import org.xvm.asm.ast.NotImplAST;

import org.xvm.asm.constants.ConditionalConstant;
import org.xvm.asm.constants.IdentityConstant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
import org.xvm.asm.Register;
import org.xvm.asm.Version;

import org.xvm.asm.ast.BinaryAST;
import org.xvm.asm.ast.BindFunctionAST;
import org.xvm.asm.ast.BindMethodAST;
import org.xvm.asm.ast.CallExprAST;
import org.xvm.asm.ast.ConstantExprAST;
import org.xvm.asm.ast.ConvertExprAST;
import org.xvm.asm.ast.InvokeExprAST;
import org.xvm.asm.ast.BinaryAST;
import org.xvm.asm.ast.ExprAST;
import org.xvm.asm.ast.InvokeExprAST;
import org.xvm.asm.ast.OuterExprAST;
import org.xvm.asm.ast.RegisterAST;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ public void generateConditionalJump(
public ExprAST<Constant> getExprAST()
{
TypeConstant[] atypeRet = getTypes();
return new IsExprAST<>(atypeRet.length == 1 ? null : atypeRet[1],
expr1.getExprAST(), expr2.getExprAST());
return new IsExprAST<>(expr1.getExprAST(), expr2.getExprAST(),
atypeRet.length == 1 ? null : atypeRet[1]);
}


Expand Down

0 comments on commit 8b01a5d

Please sign in to comment.