Changeset 13946
- Timestamp:
- 2012-11-18T05:39:44+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/FrontEnd/Absyn.mo
r13930 r13946 2641 2641 Option<ArrayDim> oad1,oad2; 2642 2642 list<TypeSpec> lst1,lst2; 2643 Ident i1, i2; 2644 Integer pos1, pos2; 2645 2646 // first try full equality 2643 2647 case(TPATH(p1,oad1), TPATH(p2,oad2)) 2644 2648 equation 2645 true = Flags.isSet(Flags.SCODE_INST_SHORTCUT); 2649 true = pathEqual(p1,p2); 2650 true = optArrayDimEqual(oad1,oad2); 2651 then true; 2652 2653 // if that didn't work try for different last ident due to +d=scodeInstShortcut 2654 // first element is: .Modelica.Fluid.Interfaces.FluidPort_a__OMC__70 port_a; 2655 // second element is: .Modelica.Fluid.Interfaces.FluidPort_a__OMC__88 port_a; 2656 case(TPATH(p1,oad1), TPATH(p2,oad2)) 2657 equation 2658 i1 = pathLastIdent(p1); 2659 i2 = pathLastIdent(p2); 2660 pos1 = System.stringFind(i1, "__OMC__"); 2661 true = intNe(pos1, -1); 2662 pos2 = System.stringFind(i2, "__OMC__"); 2663 true = intNe(pos2, -1); 2664 true = intEq(pos1, pos2); 2665 0 = System.strncmp(i1, i2, pos1); 2646 2666 p1 = stripLast(p1); 2647 2667 p2 = stripLast(p2); 2648 2668 true = pathEqual(p1,p2); 2649 2669 true = optArrayDimEqual(oad1,oad2); 2650 then2651 true;2652 case(TPATH(p1,oad1), TPATH(p2,oad2))2653 equation2654 true = pathEqual(p1,p2);2655 true = optArrayDimEqual(oad1,oad2);2656 2670 then true; 2671 2657 2672 case(TCOMPLEX(p1,lst1,oad1),TCOMPLEX(p2,lst2,oad2)) 2658 2673 equation
Note: See TracChangeset
for help on using the changeset viewer.