public override Statement process(Registers r, Block block) { if(table.isTableLiteral()) { table.addEntry(new TableLiteral.Entry(index, @value, !isTable, timestamp)); return null; } else { return new Assignment(new TableTarget(table, index), @value); } }
public override Statement process(Registers r, Block block) { if (table.isTableLiteral()) { table.addEntry(new TableLiteral.Entry(index, @value, !isTable, timestamp)); return(null); } else { return(new Assignment(new TableTarget(table, index), @value)); } }
public override Statement process(Registers r, Block block) { //System.out.println("-- processing register set " + register + "@" + line); r.setValue(register, line, @value); // // if(value.isMultiple()) { // System.out.println("-- process multiple @" + register); // } // if(r.isAssignable(register, line)) { //System.out.println("-- assignment!"); return new Assignment(r.getTarget(register, line), @value); } else { return null; } }
public override Statement process(Registers r, Block block) { //System.out.println("-- processing register set " + register + "@" + line); r.setValue(register, line, @value); // // if(value.isMultiple()) { // System.out.println("-- process multiple @" + register); // } // if (r.isAssignable(register, line)) { //System.out.println("-- assignment!"); return(new Assignment(r.getTarget(register, line), @value)); } else { return(null); } }
public override Statement process(unluac.decompile.Registers r, unluac.decompile.block.Block block) { return(_statement); }
public override Statement process(Registers r, Block block) { return new Assignment(new GlobalTarget(global), @value); }
public override Statement process(Registers r, Block block) { return(new Assignment(target, @value)); }
public override Statement process(Registers r, Block block) { return new Return(values); }
private Assignment processOperation(Operation operation, int line, int nextLine, Block block) { Assignment assign = null; bool wasMultiple = false; Statement stmt = operation.process(r, block); if(stmt != null) { if(stmt is Assignment) { assign = (Assignment) stmt; if(!assign.getFirstValue().isMultiple()) { block.addStatement(stmt); } else { wasMultiple = true; } } else { block.addStatement(stmt); } //System.out.println("-- added statemtent @" + line); if(assign != null) { //System.out.println("-- checking for multiassign @" + nextLine); while(nextLine < block.end && isMoveIntoTarget(nextLine)) { //System.out.println("-- found multiassign @" + nextLine); Target target = getMoveIntoTargetTarget(nextLine, line + 1); Expression @value = getMoveIntoTargetValue(nextLine, line + 1); //updated? assign.addFirst(target, @value); skip[nextLine] = true; nextLine++; } if(wasMultiple && !assign.getFirstValue().isMultiple()) { block.addStatement(stmt); } } } return assign; }
public override Statement process(Registers r, Block block) { return new Assignment(target, @value); }
public override Statement process(Registers r, Block block) { return(new FunctionCallStatement(call)); }
abstract public Statement process(Registers r, Block block);
public override Statement process(Registers r, Block block) { return(new Return(values)); }
private Block enclosingBlock(Block block) { //Assumes the outer block is first Block outer = blocks[0]; Block enclosing = outer; for(int i = 1; i < blocks.Count; i++) { Block next = blocks[i]; if(next == block) continue; if(next.contains(block) && enclosing.contains(next)) { enclosing = next; } } return enclosing; }
public virtual void decompile() { r = new Registers(registers, length, declList, f); findReverseTargets(); handleBranches(true); outer = handleBranches(false); processSequence(1, length); }
public override Statement process(Registers r, Block block) { return(new Assignment(new GlobalTarget(global), @value)); }