Browse Source

* Fixes so job_web.webidl compiles again with new dictionary conversion

Michaël Van Canneyt 1 year ago
parent
commit
3605b80f58

+ 136 - 8
packages/webidl/src/webidlparser.pp

@@ -63,6 +63,7 @@ Type
     Procedure AppendPartials; virtual;
     Procedure AppendIncludes; virtual;
     Function GetInterfacesTopologically: TIDLDefinitionList; virtual;
+    function GetDictionariesTopologically: TIDLDefinitionList; virtual;
     Procedure ResolveTypes; virtual;
     procedure ResolveCallbackInterfaces; virtual;
     function CreateCallBackFromInterface(aDef: TIDLInterfaceDefinition): TIDLCallBackDefinition;
@@ -1142,7 +1143,9 @@ begin
         begin
         M.Attributes:=Attrs;
         Attrs:=Nil; // So it does not get freed in except
-        end;
+        end
+      else
+        FreeAndNil(Attrs);
       if not SemicolonSeen then
         GetToken;
       CheckCurrentToken(tkSemicolon);
@@ -1863,17 +1866,25 @@ begin
 end;
 
 type
-  TTopologicalIntf = class
-    Intf: TIDLInterfaceDefinition;
-    Parent: TIDLInterfaceDefinition;
+  TTopologicalDef = class
     Level: integer;
     SrcPos: integer;
   end;
 
-function CompareTopologicalIntfWithLevelAndSrcPos(Data1, Data2: Pointer): integer;
+  TTopologicalIntf = class (TTopologicalDef)
+    Intf: TIDLInterfaceDefinition;
+    Parent: TIDLInterfaceDefinition;
+  end;
+
+  TTopologicalDict = class (TTopologicalDef)
+    Dict: TIDLDictionaryDefinition;
+    Parent: TIDLDictionaryDefinition;
+  end;
+
+function CompareTopologicalDefWithLevelAndSrcPos(Data1, Data2: Pointer): integer;
 var
-  A: TTopologicalIntf absolute Data1;
-  B: TTopologicalIntf absolute Data2;
+  A: TTopologicalDef absolute Data1;
+  B: TTopologicalDef absolute Data2;
 begin
   if A.Level<B.Level then
     Result:=-1
@@ -1965,6 +1976,7 @@ var
   Top: TTopologicalIntf;
   i: Integer;
 begin
+  Writeln('Getting interfaces topologically');
   Result:=nil;
   List:=TFPList.Create;
   try
@@ -1987,19 +1999,135 @@ begin
     // sort topologically (keeping source order)
     for i:=0 to List.Count-1 do
       GetTopologicalLevel(TTopologicalIntf(List[i]));
-    MergeSort(List,@CompareTopologicalIntfWithLevelAndSrcPos);
+    MergeSort(List,@CompareTopologicalDefWithLevelAndSrcPos);
 
     Result:=TIDLDefinitionList.Create(nil,false);
     for i:=0 to List.Count-1 do
       begin
       Top:=TTopologicalIntf(List[i]);
       Result.Add(Top.Intf);
+      Top.Free;
+      end;
+  finally
+    List.Free;
+  end;
+end;
+
+function TWebIDLContext.GetDictionariesTopologically: TIDLDefinitionList;
+var
+  List: TFPList; // list of TTopologicalIntf
+
+  function FindDict(Dict: TIDLDictionaryDefinition): TTopologicalDict;
+  var
+    i: Integer;
+  begin
+    for i:=0 to List.Count-1 do
+      if TTopologicalDict(List[i]).Dict=Dict then
+        exit(TTopologicalDict(List[i]));
+    Result:=nil;
+  end;
+
+  function FindParent(Top: TTopologicalDict): TIDLDictionaryDefinition;
+  var
+    ParentDict, DictDef: TIDLDictionaryDefinition;
+    Def: TIDLDefinition;
+  begin
+    DictDef:=Top.Dict;
+    if (Top.Parent=nil) and (DictDef.ParentName<>'') then
+      begin
+      ParentDict:=DictDef.ParentDictionary;
+      if ParentDict<>nil then
+        Top.Parent:=ParentDict
+      else
+        begin
+        Def:=FindDefinition(DictDef.ParentName);
+        if Def is TIDLDictionaryDefinition then
+          Top.Parent:=TIDLDictionaryDefinition(Def)
+        else if Def=nil then
+          begin
+          raise EConvertError.Create('[20220725182112] Dictionary "'+DictDef.Name+'" at '+GetDefPos(DictDef)+', parent "'+DictDef.ParentName+'" not found');
+          end
+        else
+          raise EConvertError.Create('[20220725182109] [TWebIDLContext.GetDictionarysTopologically] Dictionary "'+DictDef.Name+'" at '+GetDefPos(DictDef)+', parent "'+DictDef.ParentName+'" is not a Dictionary at '+GetDefPos(Def));
+        end;
+      end;
+    Result:=Top.Parent;
+  end;
+
+  function GetTopologicalLevel(Top: TTopologicalDict): integer;
+  var
+    ParentTop: TTopologicalDict;
+    {$IFDEF VerboseWebIDLParser}
+    IntfDef: TIDLDictionaryDefinition;
+    {$ENDIF}
+  begin
+    {$IFDEF VerboseWebIDLParser}
+    IntfDef:=Top.Intf;
+    {$ENDIF}
+    if Top.Level<0 then
+      begin
+      if Top.Parent=nil then
+        Top.Level:=0
+      else
+        begin
+        ParentTop:=FindDict(Top.Parent);
+        if ParentTop=nil then
+          begin
+          {$IFDEF VerboseWebIDLParser}
+          Log('Warning: [20220725182101] [TWebIDLContext.GetDictionarysTopologically] Dictionary "'+IntfDef.Name+'" at '+GetDefPos(IntfDef)+', parent "'+Top.Parent.Name+'" at '+GetDefPos(Top.Parent)+' not in definition list');
+          {$ENDIF}
+          Top.Level:=0;
+          end
+        else
+          Top.Level:=GetTopologicalLevel(ParentTop)+1;
+        end;
+      end;
+    Result:=Top.Level;
+  end;
+
+var
+  D: TIDLDefinition;
+  DictDef: TIDLDictionaryDefinition;
+  Top: TTopologicalDict;
+  i: Integer;
+begin
+  Result:=nil;
+  List:=TFPList.Create;
+  try
+    // collect all Dictionarys
+    for D in Definitions do
+      if D is TIDLDictionaryDefinition then
+        begin
+        DictDef:=TIDLDictionaryDefinition(D);
+        if DictDef.IsPartial then continue;
+        Top:=TTopologicalDict.Create;
+        Top.Dict:=DictDef;
+        Top.Level:=-1;
+        Top.SrcPos:=List.Count;
+        List.Add(Top);
+        end;
+    // set parent Dictionarys
+    for i:=0 to List.Count-1 do
+      FindParent(TTopologicalDict(List[i]));
+
+    // sort topologically (keeping source order)
+    for i:=0 to List.Count-1 do
+      GetTopologicalLevel(TTopologicalDict(List[i]));
+    MergeSort(List,@CompareTopologicalDefWithLevelAndSrcPos);
+
+    Result:=TIDLDefinitionList.Create(nil,false);
+    for i:=0 to List.Count-1 do
+      begin
+      Top:=TTopologicalDict(List[i]);
+      Result.Add(Top.Dict);
+      Top.Free;
       end;
   finally
     List.Free;
   end;
 end;
 
+
 procedure TWebIDLContext.ResolveParentTypes;
 
 Var

+ 28 - 5
packages/webidl/src/webidltopas.pp

@@ -132,6 +132,7 @@ type
     FContext: TWebIDLContext;
     FDictionaryClassParent: String;
     FFieldPrefix: String;
+    FGeneratingImplementation: Boolean;
     FGlobalVars: TStrings;
     FInputStream: TStream;
     FOutputStream: TStream;
@@ -293,6 +294,7 @@ type
     procedure Execute; virtual;
     procedure WriteOptions; virtual;
     function IsKeyWord(const S: String): Boolean; override;
+    Property GeneratingImplementation : Boolean Read FGeneratingImplementation;
   Public
     Property InputFileName: String Read FInputFileName Write FInputFileName;
     Property InputStream: TStream Read FInputStream Write FInputStream;
@@ -1222,6 +1224,7 @@ Var
   Msg : String;
 
 begin
+  FGeneratingImplementation:=True;
   Msg:='';
   DoLog('Writing implementation section');
   Addln('');
@@ -1245,6 +1248,7 @@ begin
       Msg:=SErrBeforeException;
     DoLog('Wrote %d of %d definitions%s',[Cnt,Context.Definitions.Count,Msg]);
   end;
+  FGeneratingImplementation:=False;
 end;
 
 procedure TBaseWebIDLToPas.WriteDefinitionImplementation(D: TIDLDefinition);
@@ -1709,8 +1713,7 @@ begin
           Inc(Result);
 end;
 
-function TBaseWebIDLToPas.GetArguments(aList: TIDLDefinitionList;
-  ForceBrackets: Boolean): String;
+function TBaseWebIDLToPas.GetArguments(aList: TIDLDefinitionList; ForceBrackets: Boolean): String;
 
 Var
   I, ArgType: TIDLDefinition;
@@ -2173,6 +2176,8 @@ procedure TBaseWebIDLToPas.WritePascal;
 var
   i: Integer;
   Line: String;
+  aList : TIDLDefinitionList;
+
 begin
   CreateUnitClause;
   CreateHeader;
@@ -2191,9 +2196,19 @@ begin
   DoLog('Generating typedefs and callback definitions');
   WriteTypeDefsAndCallbacks(Context.Definitions);
   DoLog('Generating dictionary definitions');
-  WriteDictionaryDefs(Context.Definitions);
+  aList:=Context.GetDictionariesTopologically;
+  try
+    WriteDictionaryDefs(aList);
+  finally
+    aList.Free;
+  end;
   DoLog('Generating interface definitions');
-  WriteInterfaceDefs(Context.GetInterfacesTopologically);
+  aList:=Context.GetInterfacesTopologically;
+  try
+    WriteInterfaceDefs(aList);
+  finally
+    aList.Free;
+  end;
   DoLog('Generating namespace definitions');
   WriteNamespaceDefs(Context.Definitions);
   Undent;
@@ -3100,17 +3115,25 @@ var
   D : TIDLDefinition;
 
 begin
+  DoLog('Resolving callback interfaces.');
   ResolveCallbackInterfaces;
+  DoLog('Removing interface forwards.');
   RemoveInterfaceForwards(FContext.Definitions);
+  DoLog('Appending partials to interfaces.');
   FContext.AppendPartials;
+  DoLog('Appending includes to interfaces.');
   FContext.AppendIncludes;
+  DoLog('Adding global identifiers.');
   For D in FContext.Definitions do
     if D.Name<>'' then
     AddGlobalJSIdentifier(D);
+  DoLog('Allocating pascal names.');
   AllocatePasNames(FContext.Definitions);
+  DoLog('Resolving parent interfaces.');
   ResolveParentInterfaces(FContext.Definitions);
+  DoLog('Resolving type definitions.');
   ResolveTypeDefs(FContext.Definitions);
-
+  DoLog('Done processing definitions.');
 end;
 
 procedure TBaseWebIDLToPas.Execute;

+ 26 - 12
packages/webidl/src/webidltowasmjob.pp

@@ -223,7 +223,7 @@ implementation
 
 function TWebIDLToPasWasmJob.BaseUnits: String;
 begin
-  Result:='SysUtils, JOB_JS';
+  Result:='SysUtils, Job.JS';
 end;
 
 function TWebIDLToPasWasmJob.GetAliasPascalType(D: TIDLDefinition; out PascalTypeName: string): TPascalNativeType;
@@ -910,11 +910,13 @@ var
   AD : TIDLPropertyDefinition absolute MD;
 
 begin
+  DoLog('Allocating property getters and setters');
   For D in Context.Definitions do
     if D is TIDLStructuredDefinition then
       For MD in GetFullMemberList(SD) do
         if MD is TIDLPropertyDefinition then
           AllocatePropertyGetterSetter(SD,AD);
+  DoLog('Done allocating property getters and setters');
 end;
 
 procedure TWebIDLToPasWasmJob.ProcessDefinitions;
@@ -1047,17 +1049,19 @@ begin
             end;
           Args:=Args+ArgName;
           end;
-        Args:=',['+Args+']';
+
 
         if foConstructor in aDef.Options then
-          InvokeCode:=InvokeCode+MethodInfo.InvokeName+'('''+aParent.Name+''''+Args
+          InvokeCode:=InvokeCode+MethodInfo.InvokeName+'(['+Args+'])'
         else
+          begin
+          Args:=',['+Args+']';
           InvokeCode:=InvokeCode+MethodInfo.InvokeName+'('''+aDef.Name+''''+Args;
-        if MethodInfo.InvokeClassName<>'' then
-          InvokeCode:=InvokeCode+','+MethodInfo.InvokeClassName+') as '+MethodInfo.ReturnTypeName
-        else
-          InvokeCode:=InvokeCode+')';
-
+          if MethodInfo.InvokeClassName<>'' then
+            InvokeCode:=InvokeCode+','+MethodInfo.InvokeClassName+') as '+MethodInfo.ReturnTypeName
+          else
+            InvokeCode:=InvokeCode+')';
+          end;
         if Length(VarSection)>0 then
           begin
           AddLn('var');
@@ -1100,7 +1104,7 @@ begin
   if (aDef.Arguments.Count>0)
       and aDef.Argument[aDef.Arguments.Count-1].HasEllipsis then
     Result:='{; ToDo:varargs}';
-  if Overloads.Count>1 then
+  if not (FGeneratingInterface or GeneratingImplementation)  then
     Result:=Result+'; overload';
 end;
 
@@ -1133,8 +1137,6 @@ begin
       begin
       ArgDefList:=TIDLDefinitionList(Overloads[i]);
       Sig:=GetFunctionSignature(aDef,MethodInfo,Suff,ArgDefList,ProcKind);
-      if not FGeneratingInterface then
-        Sig:=Sig; // +' overload;';
       AddLn(ProcKind+' '+Sig);
       end;
   finally
@@ -1423,17 +1425,21 @@ begin
     undent;
     AddLn('end;');
   finally
+    ArgNames.Free;
   end;
 end;
 
 function TWebIDLToPasWasmJob.GetReadPropertyCall(aInfo : TAccessorInfo; aMemberName: String): string;
 
 var
+  TypeName,
   ObjClassName,
   ReadFuncName : string;
 
 begin
   Result:='';
+  if aMemberName='publicExponent' then
+    Writeln('so');
   Case aInfo.NativeType of
 
 
@@ -1463,7 +1469,15 @@ begin
       begin
       ObjClassName:=GetPasName(aInfo.PropType);
       if (ObjClassName='') or (Pos(PasInterfacePrefix,ObjClassName)=1) then
-        ObjClassName:=IntfToPasClassName(ObjClassName);
+        ObjClassName:=IntfToPasClassName(ObjClassName)
+      else if (aInfo.PropType is TIDLTypeDefDefinition) then
+        begin
+        TypeName:=TIDLTypeDefDefinition(aInfo.PropType).TypeName;
+        TypeName:=TypeAliases.Values[TypeName];
+        if TypeName<>'' then
+          ObjClassName:=IntfToPasClassName(TypeName)
+        end;
+
       end;
     Result:='ReadJSPropertyObject('''+aMemberName+''','+ObjClassName+') as '+aInfo.NativeTypeName;
   end;

+ 32 - 31
packages/webidl/tests/tcwebidl2wasmjob.pas

@@ -257,6 +257,7 @@ var
 begin
   Result:=true;
   Msg:='';
+  Writeln('Actual :',ACtual);
   if Expected='' then Expected:=' ';
   if Actual='' then Actual:=' ';
   ExpectedP:=PChar(Expected);
@@ -369,7 +370,7 @@ begin
     '{$H+}',
     'interface',
     '',
-    'uses SysUtils, JOB_JS;',
+    'uses SysUtils, Job.JS;',
     '']);
 end;
 
@@ -1025,7 +1026,7 @@ begin
   '  TJSAttr = class(TJSObject,IJSAttr)',
   '  Private',
   '  Public',
-  '    procedure append(aNode: IJSAttr);',
+  '    procedure append(aNode: IJSAttr); overload;',
   '    class function JSClassName: UnicodeString; override;',
   '    class function Cast(const Intf: IJSObject): IJSAttr;',
   '  end;',
@@ -1081,7 +1082,7 @@ begin
   '  TJSAttr = class(TJSObject,IJSAttr)',
   '  Private',
   '  Public',
-  '    procedure setEventHandler(const aHandler: TEventHandler);',
+  '    procedure setEventHandler(const aHandler: TEventHandler); overload;',
   '    class function JSClassName: UnicodeString; override;',
   '    class function Cast(const Intf: IJSObject): IJSAttr;',
   '  end;',
@@ -1150,9 +1151,9 @@ begin
   '  TJSAttr = class(TJSObject,IJSAttr)',
   '  Private',
   '  Public',
-  '    function exitFullscreen: IJSPromise; // Promise<void>',
-  '    function addCertException(aIsTemporary: Boolean): IJSPromise; // Promise<any>',
-  '    function fly: IJSPromise; // Promise<Attr>',
+  '    function exitFullscreen: IJSPromise; overload; // Promise<void>',
+  '    function addCertException(aIsTemporary: Boolean): IJSPromise; overload; // Promise<any>',
+  '    function fly: IJSPromise; overload; // Promise<Attr>',
   '    class function JSClassName: UnicodeString; override;',
   '    class function Cast(const Intf: IJSObject): IJSAttr;',
   '  end;',
@@ -1211,7 +1212,7 @@ begin
   '  TJSAttr = class(TJSObject,IJSAttr)',
   '  Private',
   '  Public',
-  '    procedure append(const aNode: Variant);',
+  '    procedure append(const aNode: Variant); overload;',
   '    class function JSClassName: UnicodeString; override;',
   '    class function Cast(const Intf: IJSObject): IJSAttr;',
   '  end;',
@@ -1264,7 +1265,7 @@ begin
     '  TJSIE = class(TJSObject,IJSIE)',
     '  Private',
     '  Public',
-    '    function get(aA: LongInt) : TE;',
+    '    function get(aA: LongInt) : TE; overload;',
     '    class function JSClassName: UnicodeString; override;',
     '    class function Cast(const Intf: IJSObject): IJSIE;',
     '  end;',
@@ -1318,7 +1319,7 @@ begin
    '  TJSAttr = class(TJSObject,IJSAttr)',
    '  Private',
    '  Public',
-   '     function vibrate(const aPattern: TLongIntDynArray): Boolean;',
+   '     function vibrate(const aPattern: TLongIntDynArray): Boolean; overload;',
    '     class function JSClassName: UnicodeString; override;',
    '     class function Cast(const Intf: IJSObject): IJSAttr;',
    '  end;',
@@ -1374,8 +1375,8 @@ begin
    '  TJSAttr = class(TJSObject,IJSAttr)',
    '  Private',
    '  Public',
-   '     function vibrate(const aPattern: TLongIntDynArray): Boolean;',
-   '     function beep(const aPattern: TLongIntDynArray): Boolean;',
+   '     function vibrate(const aPattern: TLongIntDynArray): Boolean; overload;',
+   '     function beep(const aPattern: TLongIntDynArray): Boolean; overload;',
    '     class function JSClassName: UnicodeString; override;',
    '     class function Cast(const Intf: IJSObject): IJSAttr;',
    '  end;',
@@ -1428,7 +1429,7 @@ begin
   '  TJSAttr = class(TJSObject,IJSAttr)',
   '  Private',
   '  Public',
-  '    constructor Create(aOptions: LongInt);',
+  '    constructor Create(aOptions: LongInt); overload;',
   '    class function JSClassName: UnicodeString; override;',
   '    class function Cast(const Intf: IJSObject): IJSAttr;',
   '  end;',
@@ -1437,7 +1438,7 @@ begin
   '',
   'constructor TJSAttr.Create(aOptions: LongInt);',
   'begin',
-  '  JOBCreate(''Attr'',[aOptions]);',
+  '  JOBCreate([aOptions]);',
   'end;',
   '',
   'class function TJSAttr.JSClassName: UnicodeString;',
@@ -1477,7 +1478,7 @@ begin
     '  TJSAttr = class(TJSObject,IJSAttr)',
     '  Private',
     '  Public',
-    '    procedure appendBuffer(aData: IJSArrayBuffer);',
+    '    procedure appendBuffer(aData: IJSArrayBuffer); overload;',
     '    class function JSClassName: UnicodeString; override;',
     '    class function Cast(const Intf: IJSObject): IJSAttr;',
     '  end;',
@@ -1527,7 +1528,7 @@ begin
     '  TJSAttr = class(TJSObject,IJSAttr)',
     '  Private',
     '  Public',
-    '    procedure appendBuffer(aData: IJSArrayBufferView);',
+    '    procedure appendBuffer(aData: IJSArrayBufferView); overload;',
     '    class function JSClassName: UnicodeString; override;',
     '    class function Cast(const Intf: IJSObject): IJSAttr;',
     '  end;',
@@ -1581,7 +1582,7 @@ begin
    '  TJSAttr = class(TJSObject,IJSAttr)',
    '  Private',
    '  Public',
-   '    function vibrate: TLongIntDynArray;',
+   '    function vibrate: TLongIntDynArray; overload;',
    '    class function JSClassName: UnicodeString; override;',
    '    class function Cast(const Intf: IJSObject): IJSAttr;',
    '  end;',
@@ -1635,7 +1636,7 @@ begin
    '  TJSAttr = class(TJSObject,IJSAttr)',
    '  Private',
    '  Public',
-   '    function vibrate: TLongSeqDynArray;',
+   '    function vibrate: TLongSeqDynArray; overload;',
    '    class function JSClassName: UnicodeString; override;',
    '    class function Cast(const Intf: IJSObject): IJSAttr;',
    '  end;',
@@ -1808,7 +1809,7 @@ begin
    '  TJSAttr = class(TJSObject,IJSAttr)',
    '  Private',
    '  Public',
-   '    function get: TJSMyDict;',
+   '    function get: TJSMyDict; overload;',
    '    class function JSClassName: UnicodeString; override;',
    '    class function Cast(const Intf: IJSObject): IJSAttr;',
    '  end;',
@@ -1882,7 +1883,7 @@ begin
  '  TJSAttr = class(TJSObject,IJSAttr)',
  '  Private',
  '  Public',
- '    function vibrate: IJSFloat32Array;',
+ '    function vibrate: IJSFloat32Array; overload;',
  '    class function JSClassName: UnicodeString; override;',
  '    class function Cast(const Intf: IJSObject): IJSAttr;',
  '  end;',
@@ -1931,8 +1932,8 @@ begin
  '  TunionDynArray = IJSArray; // array of union',
  '  IJSAttr = interface(IJSObject)',
  '    ['''+FixedGUID+''']',
- '    function roundRect(aRadii: Double): LongInt; overload;',
- '    function roundRect(const aRadii: TunionDynArray): LongInt; overload;',
+ '    function roundRect(aRadii: Double): LongInt;',
+ '    function roundRect(const aRadii: TunionDynArray): LongInt;',
  '  end;',
  '',
  '  TJSAttr = class(TJSObject,IJSAttr)',
@@ -1946,12 +1947,12 @@ begin
  '',
  'implementation',
  '',
- 'function TJSAttr.roundRect(aRadii: Double): LongInt; overload;',
+ 'function TJSAttr.roundRect(aRadii: Double): LongInt;',
  'begin',
  '  Result:=InvokeJSLongIntResult(''roundRect'',[aRadii]);',
  'end;',
  '',
- 'function TJSAttr.roundRect(const aRadii: TunionDynArray): LongInt; overload;',
+ 'function TJSAttr.roundRect(const aRadii: TunionDynArray): LongInt;',
  'begin',
  '  Result:=InvokeJSLongIntResult(''roundRect'',[aRadii]);',
  'end;',
@@ -1991,10 +1992,10 @@ begin
   '  TUnicodeStringDynArray = IJSArray; // array of DOMString',
   '  IJSAttr = interface(IJSObject)',
   '    ['''+FixedGUID+''']',
-  '    procedure roundRect(const aA: UnicodeString; aB: LongInt); overload;',
-  '    procedure roundRect(const aA: TUnicodeStringDynArray; aB: LongInt); overload;',
-  '    procedure roundRect(const aA: TUnicodeStringDynArray); overload;',
-  '    procedure roundRect(const aA: UnicodeString); overload;',
+  '    procedure roundRect(const aA: UnicodeString; aB: LongInt);',
+  '    procedure roundRect(const aA: TUnicodeStringDynArray; aB: LongInt);',
+  '    procedure roundRect(const aA: TUnicodeStringDynArray);',
+  '    procedure roundRect(const aA: UnicodeString);',
   '  end;',
   '',
   '  TJSAttr = class(TJSObject,IJSAttr)',
@@ -2010,22 +2011,22 @@ begin
   '',
   'implementation',
   '',
-  'procedure TJSAttr.roundRect(const aA: UnicodeString; aB: LongInt); overload;',
+  'procedure TJSAttr.roundRect(const aA: UnicodeString; aB: LongInt);',
   'begin',
   '  InvokeJSNoResult(''roundRect'',[aA,aB]);',
   'end;',
   '',
-  'procedure TJSAttr.roundRect(const aA: TUnicodeStringDynArray; aB: LongInt); overload;',
+  'procedure TJSAttr.roundRect(const aA: TUnicodeStringDynArray; aB: LongInt);',
   'begin',
   '  InvokeJSNoResult(''roundRect'',[aA,aB]);',
   'end;',
   '',
-  'procedure TJSAttr.roundRect(const aA: TUnicodeStringDynArray); overload;',
+  'procedure TJSAttr.roundRect(const aA: TUnicodeStringDynArray);',
   'begin',
   '  InvokeJSNoResult(''roundRect'',[aA]);',
   'end;',
   '',
-  'procedure TJSAttr.roundRect(const aA: UnicodeString); overload;',
+  'procedure TJSAttr.roundRect(const aA: UnicodeString);',
   'begin',
   '  InvokeJSNoResult(''roundRect'',[aA]);',
   'end;',