Changeset 208 for branches/interpreter2/UOptimizer.pas
- Timestamp:
- Apr 22, 2020, 12:02:17 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/interpreter2/UOptimizer.pas
r207 r208 46 46 WhileDo: TWhileDo; 47 47 Condition: TIfThenElse; 48 Field: TField; 49 Obj: TObject; 48 50 begin 49 51 NewNode := nil; … … 73 75 end else 74 76 if SourceNode is TSourceNode then begin 75 for I := 0 to SourceNode.NodesCount - 1 do begin 76 OptimizeNode(TSourceNode(SourceNode.Nodes[I]), NewNode); 77 if Assigned(NewNode) and (NewNode <> TSourceNode(SourceNode.Nodes[I])) then begin 78 SourceNode.Nodes[I] := NewNode; 77 for I := 0 to SourceNode.FieldsCount - 1 do begin 78 Field := SourceNode.GetField(I); 79 if Field.DataType = dtObject then begin 80 SourceNode.GetValue(I, Obj); 81 if Obj is TSourceNode then begin 82 OptimizeNode(TSourceNode(Obj), NewNode); 83 if Assigned(NewNode) and (NewNode <> TSourceNode(Obj)) then begin 84 SourceNode.SetValueObject(I, NewNode); 85 end; 86 end; 79 87 end; 88 Field.Free; 80 89 end; 81 90 end else
Note:
See TracChangeset
for help on using the changeset viewer.