public CompileError Expand() { try { StartMeasureTime(); ByteCode = new ByteCode.ByteCode(this); ByteCode.Proceed(); EndMeasureTime(ElapsedTimeType.Expanding); //Optimizing only main files if (!DisableOptimization && EntrypointFunction != null) { StartMeasureTime(); ByteCode.Optimize(); EndMeasureTime(ElapsedTimeType.Optimizing); } } catch (CompileException ex) { return(ex.ToError()); } return(null); }
private static void DeleteDuplicatedRegisters(ByteCode byteCode, FunctionInstructions function) { function.Registers = function.Registers.GroupBy(p => p.Index).Select(p => p.ToList()[0]).ToList(); }