Changeset 211 for branches/interpreter2/UOptimizer.pas
- Timestamp:
- Apr 22, 2020, 9:00:02 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/interpreter2/UOptimizer.pas
r208 r211 58 58 WhileDo := TWhileDo.Create; 59 59 WhileDo.Command := TBeginEnd.Create; 60 WhileDo.Parent := TRepeatUntil(SourceNode).Parent; 60 61 TBeginEnd(WhileDo.Command).Commands := TRepeatUntil(SourceNode).Commands; 62 TBeginEnd(WhileDo.Command).Parent := WhileDo; 61 63 TRepeatUntil(SourceNode).Commands := TCommands.Create; 62 64 WhileDo.Expression := TExpressionOperand.Create; 65 WhileDo.Expression.Parent := WhileDo; 63 66 TExpressionOperand(WhileDo.Expression).OperandType := otConstantDirect; 64 67 TExpressionOperand(WhileDo.Expression).ConstantDirect := TConstant.Create; … … 68 71 // Add final if 69 72 Condition := TIfThenElse.Create; 73 Condition.Parent := WhileDo; 70 74 Condition.Expression := TRepeatUntil(SourceNode).Expression; 71 75 Condition.CommandThen := TBreak.Create; 76 Condition.CommandThen.Parent := Condition; 72 77 TRepeatUntil(SourceNode).Expression := TExpression.Create; 73 78 TBeginEnd(WhileDo.Command).Commands.Add(Condition);
Note:
See TracChangeset
for help on using the changeset viewer.