View Issue Details

IDProjectCategoryView StatusLast Update
0037394pas2jsrtlpublic2020-07-21 00:18
ReporterLuiz Henrique Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionwon't fix 
Summary0037394: Delphi Compatibility Mode
DescriptionAdjusted the project for compatibility with Delphi
TagsNo tags attached.
Fixed in Revision
Attached Files

Activities

Luiz Henrique

2020-07-20 21:34

reporter  

0001-Delphi-compatibility-mode.patch (122,564 bytes)   
From 8f956b1dd8b011b6eb8895a9be6e45ad9046ec7f Mon Sep 17 00:00:00 2001
From: Luiz Henrique <luiz.henrique@atslogistica.com>
Date: Mon, 20 Jul 2020 16:20:51 -0300
Subject: [PATCH] Delphi compatibility mode

---
 packages/rtl/Rtl.TemplateLoader.pas |   2 +-
 packages/rtl/browserconsole.pas     |   2 -
 packages/rtl/class2pas.pas          |   2 +-
 packages/rtl/classes.pas            |  71 +++++--
 packages/rtl/contnrs.pas            |  26 ++-
 packages/rtl/hotreloadclient.pas    |   6 +-
 packages/rtl/js.pas                 | 253 +++++++++++-----------
 packages/rtl/libjquery.pas          | 109 +++++-----
 packages/rtl/math.pas               |  22 +-
 packages/rtl/nodejs.pas             |   1 -
 packages/rtl/objpas.pas             |   2 -
 packages/rtl/pas2js_rtl.lpk         | 316 ++++++++++++++--------------
 packages/rtl/pas2js_rtl.pas         |   2 +-
 packages/rtl/rtti.pas               |   1 -
 packages/rtl/strutils.pas           |  41 ++--
 packages/rtl/system.pas             |  28 ++-
 packages/rtl/sysutils.pas           |  63 +++---
 packages/rtl/timer.pas              |   2 -
 packages/rtl/types.pas              |   6 +-
 packages/rtl/typinfo.pas            | 179 ++++++++--------
 packages/rtl/web.pas                | 126 ++++++-----
 packages/rtl/webaudio.pas           |  15 +-
 packages/rtl/webbluetooth.pas       |   1 -
 packages/rtl/webgl.pas              |   9 +-
 packages/rtl/webrouter.pp           |  13 +-
 packages/rtl/websvg.pas             |   3 +-
 26 files changed, 655 insertions(+), 646 deletions(-)

diff --git a/packages/rtl/Rtl.TemplateLoader.pas b/packages/rtl/Rtl.TemplateLoader.pas
index d10793b..927a602 100644
--- a/packages/rtl/Rtl.TemplateLoader.pas
+++ b/packages/rtl/Rtl.TemplateLoader.pas
@@ -14,7 +14,7 @@
  **********************************************************************}
 unit Rtl.TemplateLoader;
 
-{$mode objfpc}
+//{$mode objfpc}
 
 interface
 
diff --git a/packages/rtl/browserconsole.pas b/packages/rtl/browserconsole.pas
index 498004e..001afc4 100644
--- a/packages/rtl/browserconsole.pas
+++ b/packages/rtl/browserconsole.pas
@@ -21,8 +21,6 @@
 }
 unit browserconsole;
 
-{$mode objfpc}
-
 interface
 
 uses
diff --git a/packages/rtl/class2pas.pas b/packages/rtl/class2pas.pas
index 5fc7c8b..1c3cf0c 100644
--- a/packages/rtl/class2pas.pas
+++ b/packages/rtl/class2pas.pas
@@ -12,7 +12,7 @@
  **********************************************************************}
 unit class2pas;
 
-{$mode objfpc}{$H+}
+{$H+}
 
 interface
 
diff --git a/packages/rtl/classes.pas b/packages/rtl/classes.pas
index e69fc84..4310083 100644
--- a/packages/rtl/classes.pas
+++ b/packages/rtl/classes.pas
@@ -12,8 +12,6 @@
  **********************************************************************}
 unit Classes;
 
-{$mode objfpc}
-
 interface
 
 uses
@@ -114,8 +112,8 @@ type
     procedure Pack;
     procedure Sort(const Compare: TListSortCompare);
     procedure SortList(const Compare: TListSortCompareFunc);
-    procedure ForEachCall(const proc2call: TListCallback; const arg: JSValue);
-    procedure ForEachCall(const proc2call: TListStaticCallback; const arg: JSValue);
+    procedure ForEachCall(const proc2call: TListCallback; const arg: JSValue); overload;
+    procedure ForEachCall(const proc2call: TListStaticCallback; const arg: JSValue); overload;
     property Capacity: Integer read FCapacity write SetCapacity;
     property Count: Integer read FCount write SetCount;
     property Items[Index: Integer]: JSValue read Get write Put; default;
@@ -389,8 +387,8 @@ type
     procedure PutObject(Index: Integer; AObject: TObject); override;
     procedure SetCapacity(NewCapacity: Integer); override;
     procedure SetUpdateState(Updating: Boolean); override;
-    procedure InsertItem(Index: Integer; const S: string); virtual;
-    procedure InsertItem(Index: Integer; const S: string; O: TObject); virtual;
+    procedure InsertItem(Index: Integer; const S: string); virtual; overload;
+    procedure InsertItem(Index: Integer; const S: string; O: TObject); virtual; overload;
     Function DoCompareText(const s1,s2 : string) : PtrInt; override;
     function CompareStrings(const s1,s2 : string) : Integer; virtual;
   public
@@ -679,6 +677,8 @@ type
     function ReadData(var Buffer: NativeLargeUInt; Count: NativeInt): NativeInt; overload;
     function ReadData(var Buffer: Double): NativeInt; overload;
     function ReadData(var Buffer: Double; Count: NativeInt): NativeInt; overload;
+    function ReadData(var Buffer: Extended): NativeInt; overload;
+    function ReadData(var Buffer: Extended; Count: NativeInt): NativeInt; overload;
     procedure ReadBuffer(var Buffer: TBytes; Count: NativeInt); overload;
     procedure ReadBuffer(var Buffer: TBytes; Offset, Count: NativeInt); overload;
 
@@ -705,6 +705,8 @@ type
     procedure ReadBufferData(var Buffer: NativeLargeUInt; Count: NativeInt); overload;
     procedure ReadBufferData(var Buffer: Double); overload;
     procedure ReadBufferData(var Buffer: Double; Count: NativeInt); overload;
+    procedure ReadBufferData(var Buffer: Extended); overload;
+    procedure ReadBufferData(var Buffer: Extended; Count: NativeInt); overload;
     procedure WriteBuffer(const Buffer: TBytes; Count: NativeInt); overload;
     procedure WriteBuffer(const Buffer: TBytes; Offset, Count: NativeInt); overload;
 
@@ -1177,8 +1179,8 @@ type
     procedure WriteChildren(Component: TComponent);
     function CreateDriver(Stream: TStream): TAbstractObjectWriter; virtual;
   public
-    constructor Create(ADriver: TAbstractObjectWriter);
-    constructor Create(Stream: TStream);
+    constructor Create(ADriver: TAbstractObjectWriter); overload;
+    constructor Create(Stream: TStream); overload;
     destructor Destroy; override;
     procedure DefineProperty(const Name: string;
       ReadData: TReaderProc; AWriteData: TWriterProc;
@@ -1315,8 +1317,8 @@ type
      function ReadWord: word;
      function ReadDWord: longword;
      function ReadDouble: Double;
-     function ReadInt(ValueType: TValueType): NativeInt;
-     function ReadInt: NativeInt;
+     function ReadInt(ValueType: TValueType): NativeInt; overload;
+     function ReadInt: NativeInt; overload;
      function ReadNativeInt: NativeInt;
      function ReadStr: String;
      function ReadString(StringType: TValueType): String; virtual;
@@ -1326,8 +1328,8 @@ type
      procedure ReadObject(indent: String); virtual;
      procedure ReadPropList(indent: String); virtual;
    Public
-     procedure ObjectBinaryToText(aInput, aOutput: TStream);
-     procedure ObjectBinaryToText(aInput, aOutput: TStream; aEncoding: TObjectTextEncoding);
+     procedure ObjectBinaryToText(aInput, aOutput: TStream); overload;
+     procedure ObjectBinaryToText(aInput, aOutput: TStream; aEncoding: TObjectTextEncoding); overload;
      Procedure Execute;
      Property Input : TStream Read FInput Write FInput;
      Property Output : TStream Read Foutput Write FOutput;
@@ -1390,12 +1392,12 @@ function IntToIdent(Int: Longint; var Ident: string; const Map: array of TIdentM
 function FindIntToIdent(AIntegerType: Pointer): TIntToIdent;
 function FindIdentToInt(AIntegerType: Pointer): TIdentToInt;
 function FindClass(const AClassName: string): TPersistentClass;
-function CollectionsEqual(C1, C2: TCollection): Boolean;
-function CollectionsEqual(C1, C2: TCollection; Owner1, Owner2: TComponent): Boolean;
+function CollectionsEqual(C1, C2: TCollection): Boolean; overload;
+function CollectionsEqual(C1, C2: TCollection; Owner1, Owner2: TComponent): Boolean; overload;
 procedure GetFixupReferenceNames(Root: TComponent; Names: TStrings);
 procedure GetFixupInstanceNames(Root: TComponent; const ReferenceRootName: string; Names: TStrings);
-procedure ObjectBinaryToText(aInput, aOutput: TStream);
-procedure ObjectBinaryToText(aInput, aOutput: TStream; aEncoding: TObjectTextEncoding);
+procedure ObjectBinaryToText(aInput, aOutput: TStream); overload;
+procedure ObjectBinaryToText(aInput, aOutput: TStream; aEncoding: TObjectTextEncoding); overload;
 procedure ObjectTextToBinary(aInput, aOutput: TStream);
 
 Const
@@ -5257,6 +5259,32 @@ begin
     end;
 end;
 
+function TStream.ReadData(var Buffer: Extended): NativeInt;
+begin
+  Result:=ReadData(Buffer,8);
+end;
+
+function TStream.ReadData(var Buffer: Extended; Count: NativeInt): NativeInt;
+
+Var
+  B : TBytes;
+  Mem : TJSArrayBuffer;
+  A : TJSUInt8Array;
+  D : TJSDataView;
+
+begin
+  SetLength(B,Count);
+  Result:=ReadMaxSizeData(B,8,Count);
+  if Result>=8 then
+    begin
+    Mem:=TJSArrayBuffer.New(8);
+    A:=TJSUInt8Array.new(Mem);
+    A._set(B);
+    D:=TJSDataView.New(Mem);
+    Buffer:=D.getFloat64(0);
+    end;
+end;
+
 procedure TStream.ReadBuffer(var Buffer: TBytes; Count: NativeInt);
 begin
   ReadBuffer(Buffer,0,Count);
@@ -5390,6 +5418,17 @@ begin
     Raise EStreamError.Create(SReadError);
 end;
 
+procedure TStream.ReadBufferData(var Buffer: Extended);
+begin
+  ReadBufferData(Buffer,8);
+end;
+
+procedure TStream.ReadBufferData(var Buffer: Extended; Count: NativeInt);
+begin
+  if (ReadData(Buffer,Count)<>Count) then
+    Raise EStreamError.Create(SReadError);
+end;
+
 procedure TStream.WriteBuffer(const Buffer: TBytes; Count: NativeInt);
 begin
   WriteBuffer(Buffer,0,Count);
diff --git a/packages/rtl/contnrs.pas b/packages/rtl/contnrs.pas
index afa3c0c..3022384 100644
--- a/packages/rtl/contnrs.pas
+++ b/packages/rtl/contnrs.pas
@@ -10,8 +10,6 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
-{$mode objfpc}
-
 unit contnrs;
 
 interface
@@ -35,8 +33,8 @@ Type
     Procedure SetCapacity(NewCapacity: Integer);
     Function GetCapacity: integer;
   public
-    constructor Create; reintroduce;
-    constructor Create(FreeObjects : Boolean);
+    constructor Create; reintroduce; overload;
+    constructor Create(FreeObjects : Boolean); overload;
     destructor Destroy; override;
     Procedure Clear;
     Function Add(AObject: TObject): Integer;
@@ -73,8 +71,8 @@ Type
     Function GetItem(Index: Integer): TObject;
     Procedure SetItem(Index: Integer; AObject: TObject);
   public
-    constructor Create; reintroduce;
-    constructor Create(FreeObjects : boolean);
+    constructor Create; reintroduce; overload;
+    constructor Create(FreeObjects : boolean); overload;
     Function Add(AObject: TObject): Integer; reintroduce;
     Function Extract(Item: TObject): TObject; reintroduce;
     Function Remove(AObject: TObject): Integer; reintroduce;
@@ -268,8 +266,8 @@ Type
     Function GetData(const index: string):JSValue; virtual;
     Function ForEachCall(aMethod: TDataIteratorMethod): THTDataNode; virtual;
   Public
-    Function Iterate(aMethod: TDataIteratorMethod): JSValue; virtual;
-    Function Iterate(aMethod: TDataIteratorCallBack): JSValue; virtual;
+    Function Iterate(aMethod: TDataIteratorMethod): JSValue; virtual; overload;
+    Function Iterate(aMethod: TDataIteratorCallBack): JSValue; virtual; overload;
     Procedure Add(const aKey: string; AItem: JSValue); virtual;
     property Items[const index: string]: JSValue read GetData write SetData; default;
   end;
@@ -296,8 +294,8 @@ Type
     Function GetData(const index: string): String; virtual;
     Function ForEachCall(aMethod: TStringIteratorMethod): THTStringNode; virtual;
   Public
-    Function Iterate(aMethod: TStringIteratorMethod): String; virtual;
-    Function Iterate(aMethod: TStringIteratorCallback): String; virtual;
+    Function Iterate(aMethod: TStringIteratorMethod): String; virtual; overload;
+    Function Iterate(aMethod: TStringIteratorCallback): String; virtual; overload;
     Procedure Add(const aKey,aItem: string); virtual;
     property Items[const index: string]: String read GetData write SetData; default;
   end;
@@ -334,8 +332,8 @@ Type
   Public
     constructor Create(AOwnsObjects : Boolean = True); reintroduce;
     constructor CreateWith(AHashTableSize: Longword; aHashFunc: THashFunction; AOwnsObjects : Boolean = True); reintroduce;
-    Function Iterate(aMethod: TObjectIteratorMethod): TObject; virtual;
-    Function Iterate(aMethod: TObjectIteratorCallback): TObject; virtual;
+    Function Iterate(aMethod: TObjectIteratorMethod): TObject; virtual; overload;
+    Function Iterate(aMethod: TObjectIteratorCallback): TObject; virtual; overload;
     Procedure Add(const aKey: string; AItem : TObject); virtual;
     property Items[const index: string]: TObject read GetData write SetData; default;
     Property OwnsObjects : Boolean Read FOwnsObjects;
@@ -394,8 +392,8 @@ Type
     Procedure Assign(AList: TCustomBucketList);
     Function Exists(AItem: JSValue): Boolean;
     Function Find(AItem: JSValue; out AData: JSValue): Boolean;
-    Function ForEach(AProc: TBucketProc; AInfo: JSValue): Boolean;
-    Function ForEach(AProc: TBucketProc): Boolean;
+    Function ForEach(AProc: TBucketProc; AInfo: JSValue): Boolean; overload;
+    Function ForEach(AProc: TBucketProc): Boolean; overload;
     Function Remove(AItem: JSValue): JSValue;
     property Data[AItem: JSValue]: JSValue read GetData write SetData; default;
   end;
diff --git a/packages/rtl/hotreloadclient.pas b/packages/rtl/hotreloadclient.pas
index 15828a1..5290af2 100644
--- a/packages/rtl/hotreloadclient.pas
+++ b/packages/rtl/hotreloadclient.pas
@@ -1,7 +1,5 @@
 unit hotreloadclient;
 
-{$mode objfpc}
-
 interface
 
 uses sysutils, types, js, web;
@@ -47,8 +45,8 @@ Type
     class var Global : THotReload;
     procedure OnTick; virtual;
   public
-    Constructor Create; reintroduce;
-    Constructor Create(AOptions : THotReloadOptions);
+    Constructor Create; reintroduce; overload;
+    Constructor Create(AOptions : THotReloadOptions); overload;
     Class Procedure StartHotReload;
     Class Procedure StopHotReload;
     class function getGlobal : THotReload;
diff --git a/packages/rtl/js.pas b/packages/rtl/js.pas
index 9c5bc48..2a27ac1 100644
--- a/packages/rtl/js.pas
+++ b/packages/rtl/js.pas
@@ -12,7 +12,6 @@
  **********************************************************************}
 unit JS;
 
-{$mode objfpc}
 {$modeswitch externalclass}
 
 interface
@@ -45,8 +44,8 @@ type
     procedure SetProperties(Name: String; const AValue: JSValue); external name '[]';
   public
     constructor new;
-    class function create(const proto: TJSObject): TJSObject;
-    class function create(const proto, propertiesObject: TJSObject): TJSObject;
+    class function create(const proto: TJSObject): TJSObject; overload;
+    class function create(const proto, propertiesObject: TJSObject): TJSObject; overload;
     class function assign(const Target, Source1: TJSObject): TJSObject; varargs;
     class procedure defineProperty(const obj: TJSObject; propname: String; const descriptor: TJSObjectPropertyDescriptor);
     //class procedure defineProperties
@@ -198,12 +197,12 @@ type
     procedure setUTCMonth(const AValue: NativeInt);
     procedure setUTCSeconds(const AValue: NativeInt);
   public
-    constructor New; reintroduce;
-    constructor New(const MilliSecsSince1970: NativeInt); // milliseconds since 1 January 1970 00:00:00 UTC, with leap seconds ignored
-    constructor New(const aDateString: String); // RFC 2822, ISO8601
+    constructor New; reintroduce;  overload;
+    constructor New(const MilliSecsSince1970: NativeInt); overload;
+    constructor New(const aDateString: String); overload;
     constructor New(aYear: NativeInt; aMonth: NativeInt; aDayOfMonth: NativeInt = 1;
-      TheHours: NativeInt = 0; TheMinutes: NativeInt = 0; TheSeconds: NativeInt = 0;
-      TheMilliseconds: NativeInt = 0);
+                    TheHours: NativeInt = 0; TheMinutes: NativeInt = 0;
+                    TheSeconds: NativeInt = 0; TheMilliseconds: NativeInt = 0);  overload;
     class function now: NativeInt; // current date and time in milliseconds since 1 January 1970 00:00:00 UTC, with leap seconds ignored
     class function parse(const aDateString: string): NativeInt; // format depends on browser
     class function UTC(aYear: NativeInt; aMonth: NativeInt = 0; aDayOfMonth: NativeInt = 1;
@@ -261,8 +260,8 @@ type
     fsource : string; external name 'source';
     funicode : boolean; external name 'unicode';
   public
-    Constructor New(Pattern : string);
-    Constructor New(Pattern, Flags : string);
+    Constructor New(Pattern : string); overload;
+    Constructor New(Pattern, Flags : string); overload;
     lastIndex: NativeInt;
     function exec(aString : string): TStringDynArray;
     function test(aString : string) : boolean;
@@ -289,9 +288,9 @@ type
   private
     flength : NativeInt; external name 'length';
   public 
-    constructor New(Const S : String);
-    constructor New(Const I : NativeInt);
-    constructor New(Const D : double);
+    constructor New(Const S : String); overload;
+    constructor New(Const I : NativeInt); overload;
+    constructor New(Const D : double); overload;
     property length : NativeInt read flength; 
     class function fromCharCode() : string; varargs;
     class function fromCodePoint() : string; varargs;
@@ -511,10 +510,10 @@ type
     function reduceRight(const aCallBack : TJSTypedArrayReduceCallBack) : JSValue; overload;
     function reduceRight(const aCallBack : TJSTypedArrayReduceCallBack; initialValue : JSValue) : JSValue; overload;
     Function reverse : TJSTypedArray;
-    procedure _set(anArray : TJSArray); external name 'set';
-    procedure _set(anArray : TJSArray; anOffset : NativeInt); external name 'set';
-    procedure _set(anArray : TJSTypedArray); external name 'set';
-    procedure _set(anArray : TJSTypedArray; anOffset : NativeInt); external name 'set';
+    procedure _set(anArray : TJSArray); external name 'set'; overload;
+    procedure _set(anArray : TJSArray; anOffset : NativeInt); external name 'set'; overload;
+    procedure _set(anArray : TJSTypedArray); external name 'set'; overload;
+    procedure _set(anArray : TJSTypedArray; anOffset : NativeInt); external name 'set'; overload;
     Function slice : TJSTypedArray; overload;
     function slice(aBegin : NativeInt) : TJSTypedArray; overload;
     function slice(aBegin,aEnd : NativeInt) : TJSTypedArray; overload;
@@ -546,21 +545,21 @@ type
 {$IFDEF JAVASCRIPT2017}
     constructor new; // new in ES2017
 {$ENDIF}
-    constructor new (length : NativeInt);
-    constructor new (atypedArray : TJSTypedArray);
-    constructor new (aObject : TJSObject);
-    constructor new (buffer : TJSArrayBuffer);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);
-    class function from(aValue : jsValue) : TJSInt8Array; reintroduce;
-    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSInt8Array; reintroduce;
-    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSInt8Array; reintroduce;
-    class function _of(aValue : jsValue) : TJSInt8Array; varargs; external name 'of'; reintroduce;overload;
+    constructor new (length : NativeInt); overload;
+    constructor new (atypedArray : TJSTypedArray); overload;
+    constructor new (aObject : TJSObject); overload;
+    constructor new (buffer : TJSArrayBuffer); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt); overload;
+    class function from(aValue : jsValue) : TJSInt8Array; reintroduce; overload;
+    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSInt8Array; reintroduce; overload;
+    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSInt8Array; reintroduce; overload;
+    class function _of(aValue : jsValue) : TJSInt8Array; varargs; external name 'of'; reintroduce; overload;
     class function _of(aValue : TJSValueDynArray) : TJSInt8Array; varargs; external name 'of'; reintroduce; overload;
     function subarray(aBegin, aEnd: Integer): TJSInt8Array;  overload;
     function subarray(aBegin: Integer): TJSInt8Array; overload;
     procedure _set(anArray : Array of ShortInt); external name 'set'; reintroduce; overload;
-    procedure _set(anArray : Array of ShortInt; anOffset : NativeInt); external name 'set';
+    procedure _set(anArray : Array of ShortInt; anOffset : NativeInt); external name 'set'; overload;
     property values[Index : NativeInt] : Shortint Read getTypedValue Write setTypedValue; default;
   end;
 
@@ -569,15 +568,15 @@ type
     function getTypedValue(Index : NativeInt): Byte; external name '[]';
     procedure setTypedValue(Index : NativeInt; AValue: Byte);external name '[]';
   public
-    constructor new (length : NativeInt);
-    constructor new (atypedArray : TJSTypedArray);
-    constructor new (aObject : TJSObject);
-    constructor new (buffer : TJSArrayBuffer);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);
+    constructor new (length : NativeInt); overload;
+    constructor new (atypedArray : TJSTypedArray); overload;
+    constructor new (aObject : TJSObject); overload;
+    constructor new (buffer : TJSArrayBuffer); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt); overload;
     class function from(aValue : jsValue) : TJSUInt8Array; reintroduce; overload;
-    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSUInt8Array; reintroduce;overload;
-    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSUInt8Array; reintroduce;overload;
+    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSUInt8Array; reintroduce; overload;
+    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSUInt8Array; reintroduce; overload;
     class function _of(aValue : jsValue) : TJSUInt8Array; varargs; external name 'of'; reintroduce; overload;
     function subarray(aBegin, aEnd: Integer): TJSUInt8Array;  overload;
     function subarray(aBegin: Integer): TJSUInt8Array; overload;
@@ -591,18 +590,18 @@ type
     function getTypedValue(Index : NativeInt): Byte; external name '[]';
     procedure setTypedValue(Index : NativeInt; AValue: Byte);external name '[]';
   public
-    constructor new (length : NativeInt);
-    constructor new (atypedArray : TJSTypedArray);
-    constructor new (aObject : TJSObject);
-    constructor new (buffer : TJSArrayBuffer);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);
-    class function from(aValue : jsValue) : TJSUInt8ClampedArray; reintroduce;
-    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSUInt8ClampedArray; reintroduce;overload;
-    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSUInt8ClampedArray; reintroduce;overload;
-    class function _of(aValue : jsValue) : TJSUInt8ClampedArray; varargs; external name 'of'; reintroduce;overload;
-    procedure _set(anArray : Array of Byte); external name 'set'; reintroduce;overload;
-    procedure _set(anArray : Array of Byte; anOffset : NativeInt); external name 'set';overload;
+    constructor new (length : NativeInt); overload;
+    constructor new (atypedArray : TJSTypedArray); overload;
+    constructor new (aObject : TJSObject); overload;
+    constructor new (buffer : TJSArrayBuffer); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt); overload;
+    class function from(aValue : jsValue) : TJSUInt8ClampedArray; reintroduce; overload;
+    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSUInt8ClampedArray; reintroduce; overload;
+    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSUInt8ClampedArray; reintroduce; overload;
+    class function _of(aValue : jsValue) : TJSUInt8ClampedArray; varargs; external name 'of'; reintroduce; overload;
+    procedure _set(anArray : Array of Byte); external name 'set'; reintroduce; overload;
+    procedure _set(anArray : Array of Byte; anOffset : NativeInt); external name 'set'; overload;
     function subarray(aBegin, aEnd: Integer): TJSUInt8ClampedArray;  overload;
     function subarray(aBegin: Integer): TJSUInt8ClampedArray; overload;
     Property values[Index : NativeInt] : Byte Read getTypedValue Write setTypedValue; default;
@@ -613,18 +612,18 @@ type
     function getTypedValue(Index : NativeInt): smallint; external name '[]';
     procedure setTypedValue(Index : NativeInt; AValue: Smallint);external name '[]';
   public
-    constructor new (length : NativeInt);
-    constructor new (atypedArray : TJSTypedArray);
-    constructor new (aObject : TJSObject);
-    constructor new (buffer : TJSArrayBuffer);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);
-    class function from(aValue : jsValue) : TJSInt16Array; reintroduce;
-    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSInt16Array; reintroduce;overload;
-    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSInt16Array; reintroduce;overload;
-    class function _of(aValue : jsValue) : TJSInt16Array; varargs; external name 'of'; reintroduce;overload;
-    procedure _set(anArray : Array of SmallInt); external name 'set'; reintroduce;overload;
-    procedure _set(anArray : Array of SmallInt; anOffset : NativeInt); external name 'set';overload;
+    constructor new (length : NativeInt); overload;
+    constructor new (atypedArray : TJSTypedArray); overload;
+    constructor new (aObject : TJSObject); overload;
+    constructor new (buffer : TJSArrayBuffer); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt); overload;
+    class function from(aValue : jsValue) : TJSInt16Array; reintroduce; overload;
+    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSInt16Array; reintroduce; overload;
+    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSInt16Array; reintroduce; overload;
+    class function _of(aValue : jsValue) : TJSInt16Array; varargs; external name 'of'; reintroduce; overload;
+    procedure _set(anArray : Array of SmallInt); external name 'set'; reintroduce; overload;
+    procedure _set(anArray : Array of SmallInt; anOffset : NativeInt); external name 'set'; overload;
     function subarray(aBegin, aEnd: Integer): TJSInt16Array;  overload;
     function subarray(aBegin: Integer): TJSInt16Array; overload;
     Property values[Index : NativeInt] : SmallInt Read getTypedValue Write setTypedValue; default;
@@ -635,18 +634,18 @@ type
     function getTypedValue(Index : NativeInt): Word; external name '[]';
     procedure setTypedValue(Index : NativeInt; AValue: Word);external name '[]';
   public
-    constructor new (length : NativeInt);
-    constructor new (atypedArray : TJSTypedArray);
-    constructor new (aObject : TJSObject);
-    constructor new (buffer : TJSArrayBuffer);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);
-    class function from(aValue : jsValue) : TJSUInt16Array; reintroduce;
-    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSUInt16Array; reintroduce;
-    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSUInt16Array; reintroduce;
+    constructor new (length : NativeInt); overload;
+    constructor new (atypedArray : TJSTypedArray); overload;
+    constructor new (aObject : TJSObject); overload;
+    constructor new (buffer : TJSArrayBuffer); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt); overload;
+    class function from(aValue : jsValue) : TJSUInt16Array; reintroduce; overload;
+    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSUInt16Array; reintroduce; overload;
+    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSUInt16Array; reintroduce; overload;
     class function _of(aValue : jsValue) : TJSUInt16Array; varargs; external name 'of'; reintroduce;
-    procedure _set(anArray : Array of Word); external name 'set'; reintroduce;
-    procedure _set(anArray : Array of Word; anOffset : NativeInt); external name 'set';
+    procedure _set(anArray : Array of Word); external name 'set'; reintroduce; overload;
+    procedure _set(anArray : Array of Word; anOffset : NativeInt); external name 'set'; overload;
     function subarray(aBegin, aEnd: Integer): TJSUInt16Array;  overload;
     function subarray(aBegin: Integer): TJSUInt16Array; overload;
     Property values[Index : NativeInt] : Word Read getTypedValue Write setTypedValue; default;
@@ -657,18 +656,18 @@ type
     function getTypedValue(Index : NativeInt): longint; external name '[]';
     procedure setTypedValue(Index : NativeInt; AValue: longint);external name '[]';
   public
-    constructor new (length : NativeInt);
-    constructor new (atypedArray : TJSTypedArray);
-    constructor new (aObject : TJSObject);
-    constructor new (buffer : TJSArrayBuffer);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);
-    class function from(aValue : jsValue) : TJSInt32Array; reintroduce;
-    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSInt32Array; reintroduce;
-    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSInt32Array; reintroduce;
+    constructor new (length : NativeInt); overload;
+    constructor new (atypedArray : TJSTypedArray); overload;
+    constructor new (aObject : TJSObject); overload;
+    constructor new (buffer : TJSArrayBuffer); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt); overload;
+    class function from(aValue : jsValue) : TJSInt32Array; reintroduce; overload;
+    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSInt32Array; reintroduce; overload;
+    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSInt32Array; reintroduce; overload;
     class function _of(aValue : jsValue) : TJSInt32Array; varargs;external name 'of'; reintroduce;
-    procedure _set(anArray : Array of LongInt); external name 'set'; reintroduce;
-    procedure _set(anArray : Array of LongInt; anOffset : NativeInt); external name 'set';
+    procedure _set(anArray : Array of LongInt); external name 'set'; reintroduce; overload;
+    procedure _set(anArray : Array of LongInt; anOffset : NativeInt); external name 'set'; overload;
     function subarray(aBegin, aEnd: Integer): TJSInt32Array;  overload;
     function subarray(aBegin: Integer): TJSInt32Array; overload;
     Property values[Index : NativeInt] : longint Read getTypedValue Write setTypedValue; default;
@@ -679,18 +678,18 @@ type
     function getTypedValue(Index : NativeInt): LongWord; external name '[]';
     procedure setTypedValue(Index : NativeInt; AValue: LongWord);external name '[]';
   public
-    constructor new (length : NativeInt);
-    constructor new (atypedArray : TJSTypedArray);
-    constructor new (aObject : TJSObject);
-    constructor new (buffer : TJSArrayBuffer);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);
-    class function from(aValue : jsValue) : TJSUInt32Array; reintroduce;
-    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSUInt32Array; reintroduce;
-    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSUInt32Array; reintroduce;
+    constructor new (length : NativeInt); overload;
+    constructor new (atypedArray : TJSTypedArray); overload;
+    constructor new (aObject : TJSObject); overload;
+    constructor new (buffer : TJSArrayBuffer); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt); overload;
+    class function from(aValue : jsValue) : TJSUInt32Array; reintroduce; overload;
+    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSUInt32Array; reintroduce; overload;
+    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSUInt32Array; reintroduce; overload;
     class function _of(aValue : jsValue) : TJSUInt32Array; varargs; external name 'of'; reintroduce;
-    procedure _set(anArray : Array of Cardinal); external name 'set'; reintroduce;
-    procedure _set(anArray : Array of Cardinal; anOffset : NativeInt); external name 'set';
+    procedure _set(anArray : Array of Cardinal); external name 'set'; reintroduce; overload;
+    procedure _set(anArray : Array of Cardinal; anOffset : NativeInt); external name 'set'; overload;
     function subarray(aBegin, aEnd: Integer): TJSUInt32Array;  overload;
     function subarray(aBegin: Integer): TJSUInt32Array; overload;
     Property values[Index : NativeInt] : LongWord Read getTypedValue Write setTypedValue; default;
@@ -701,18 +700,18 @@ type
     function getTypedValue(Index : NativeInt): Float32; external name '[]';
     procedure setTypedValue(Index : NativeInt; AValue: Float32);external name '[]';
   public
-    constructor new (length : NativeInt);
-    constructor new (atypedArray : TJSTypedArray);
-    constructor new (aObject : TJSObject);
-    constructor new (buffer : TJSArrayBuffer);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);
-    class function from(aValue : jsValue) : TJSFloat32Array; reintroduce;
-    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSFloat32Array; reintroduce;
-    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSFloat32Array; reintroduce;
+    constructor new (length : NativeInt); overload;
+    constructor new (atypedArray : TJSTypedArray); overload;
+    constructor new (aObject : TJSObject); overload;
+    constructor new (buffer : TJSArrayBuffer); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt); overload;
+    class function from(aValue : jsValue) : TJSFloat32Array; reintroduce; overload;
+    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSFloat32Array; reintroduce; overload;
+    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSFloat32Array; reintroduce; overload;
     class function _of(aValue : jsValue) : TJSFloat32Array; varargs; reintroduce;
-    procedure _set(anArray : Array of Double); external name 'set'; reintroduce;
-    procedure _set(anArray : Array of Double; anOffset : NativeInt); external name 'set'; reintroduce;
+    procedure _set(anArray : Array of Double); external name 'set'; reintroduce; overload;
+    procedure _set(anArray : Array of Double; anOffset : NativeInt); external name 'set'; reintroduce; overload;
     function subarray(aBegin, aEnd: Integer): TJSFloat32Array;  overload;
     function subarray(aBegin: Integer): TJSFloat32Array; overload;
     Property values[Index : NativeInt] : Float32 Read getTypedValue Write setTypedValue; default;
@@ -723,18 +722,18 @@ type
     function getTypedValue(Index : NativeInt): Float64; external name '[]';
     procedure setTypedValue(Index : NativeInt; AValue: Float64);external name '[]';
   public
-    constructor new (length : NativeInt);
-    constructor new (atypedArray : TJSTypedArray);
-    constructor new (aObject : TJSObject);
-    constructor new (buffer : TJSArrayBuffer);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt);
-    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt);
-    class function from(aValue : jsValue) : TJSFloat64Array; reintroduce;
-    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSFloat64Array; reintroduce;
-    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSFloat64Array; reintroduce;
+    constructor new (length : NativeInt); overload;
+    constructor new (atypedArray : TJSTypedArray); overload;
+    constructor new (aObject : TJSObject); overload;
+    constructor new (buffer : TJSArrayBuffer); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset: NativeInt); overload;
+    constructor new (buffer : TJSArrayBuffer; aByteOffset, aLength: NativeInt); overload;
+    class function from(aValue : jsValue) : TJSFloat64Array; reintroduce; overload;
+    class function from(aValue : jsValue; Map : TJSTypedArrayMapCallBack) : TJSFloat64Array; reintroduce; overload;
+    class function from(aValue : jsValue; aMap : TJSTypedArrayMapEvent) : TJSFloat64Array; reintroduce; overload;
     class function _of(aValue : jsValue) : TJSFloat64Array; varargs; reintroduce;
-    procedure _set(anArray : Array of Double); external name 'set'; reintroduce;
-    procedure _set(anArray : Array of Double; anOffset : NativeInt); external name 'set'; reintroduce;
+    procedure _set(anArray : Array of Double); external name 'set'; reintroduce; overload;
+    procedure _set(anArray : Array of Double; anOffset : NativeInt); external name 'set'; reintroduce; overload;
     function subarray(aBegin, aEnd: Integer): TJSFloat64Array;  overload;
     function subarray(aBegin: Integer): TJSFloat64Array; overload;
     Property values[Index : NativeInt] : Float64 Read getTypedValue Write setTypedValue; default;
@@ -788,10 +787,10 @@ type
     class function parse(aJSON : String) : JSValue;
     // Use this only when you are sure you will get an object, no checking is done.
     class function parseObject(aJSON : String) : TJSObject; external name 'parse';
-    class function stringify(aValue : JSValue) : string;
-    class function stringify(aValue,aReplacer : JSValue) : string;
-    class function stringify(aValue,aReplacer : JSValue; space:  NativeInt) : string;
-    class function stringify(aValue,aReplacer : JSValue; space:  String) : string;
+    class function stringify(aValue : JSValue) : string; overload;
+    class function stringify(aValue,aReplacer : JSValue) : string; overload;
+    class function stringify(aValue,aReplacer : JSValue; space:  NativeInt) : string; overload;
+    class function stringify(aValue,aReplacer : JSValue; space:  String) : string; overload;
   end;
 
   { TJSError }
@@ -803,10 +802,10 @@ type
     FStack: JSValue; external name 'stack';
     {$endif}
   Public
-    Constructor new;
-    Constructor new(Const aMessage : string);
-    Constructor new(Const aMessage,aFileName : string);
-    Constructor new(Const aMessage,aFileName : string; aLineNumber : NativeInt);
+    Constructor new; overload;
+    Constructor new(Const aMessage : string); overload;
+    Constructor new(Const aMessage,aFileName : string); overload;
+    Constructor new(Const aMessage,aFileName : string; aLineNumber : NativeInt); overload;
     Property Message : String Read FMessage;
     {$ifdef NodeJS}
     Property Stack: JSValue read FStack;
@@ -831,8 +830,8 @@ type
     class function reject(reason : JSValue) : TJSPromise;
     class function resolve(value : JSValue): TJSPromise; overload;
     class function resolve : TJSPromise; overload;
-    function _then (onAccepted : TJSPromiseResolver) : TJSPromise; external name 'then';
-    function _then (onAccepted,OnRejected: TJSPromiseResolver) : TJSPromise; external name 'then';
+    function _then (onAccepted : TJSPromiseResolver) : TJSPromise; external name 'then'; overload;
+    function _then (onAccepted,OnRejected: TJSPromiseResolver) : TJSPromise; external name 'then'; overload;
     function catch (onRejected : TJSPromiseResolver) : TJSPromise;
     function _finally(value : TJSPromiseFinallyHandler): TJSPromise;
   end;
@@ -910,7 +909,7 @@ function toInteger(const v: JSValue): NativeInt; // if v is not an integer, retu
 function toObject(Value: JSValue): TJSObject; // If Value is not a Javascript object, returns Nil
 function toArray(Value: JSValue): TJSArray; // If Value is not a Javascript array, returns Nil
 function toBoolean(Value: JSValue): Boolean; // If Value is not a Boolean, returns False
-function toString(Value: JSValue): String; // If Value is not a string, returns ''
+function toString(Value: JSValue): String; overload; // If Value is not a string, returns ''
 
 Type
   TJSValueType = (jvtNull,jvtBoolean,jvtInteger,jvtFloat,jvtString,jvtObject,jvtArray);
@@ -925,7 +924,7 @@ implementation
 
 function new(aElements: TJSValueDynArray): TJSObject;
 
-  function toString(I : Integer): string; external name 'String';
+  function toString(I : Integer): string; external name 'String'; overload;
 
 Var
   L,I : integer;
diff --git a/packages/rtl/libjquery.pas b/packages/rtl/libjquery.pas
index 395f180..fccc051 100644
--- a/packages/rtl/libjquery.pas
+++ b/packages/rtl/libjquery.pas
@@ -1,6 +1,5 @@
 unit libjquery;
 
-{$mode objfpc}
 {$modeswitch externalclass}
 
 interface
@@ -19,24 +18,24 @@ Type
 
   TCallbacks = class external name 'Callbacks'
   Public
-    function add(aCallBack : TCallBack) : TCallbacks;
-    function add(aCallBack : Array of TCallBack) : TCallbacks;
-    function add(aCallBack : TCallBackEvent) : TCallbacks;
-    function add(aCallBack : Array of TCallBackEvent) : TCallbacks;
-    function disable : TCallBacks;
-    function disabled : Boolean;
+    function add(aCallBack : TCallBack) : TCallbacks; overload;
+    function add(aCallBack : Array of TCallBack) : TCallbacks; overload;
+    function add(aCallBack : TCallBackEvent) : TCallbacks; overload;
+    function add(aCallBack : Array of TCallBackEvent) : TCallbacks; overload;
+    function disable : TCallBacks; overload;
+    function disabled : Boolean; overload;
     function empty : TCallBacks;
     function fire(arguments : JSValue) : TCallbacks; varargs;
     function fired : Boolean;
     function fireWith(context : JSValue; arguments : JSValue) : TCallbacks;
-    function has(aCallBack : TCallBack) : Boolean;
-    function has(aCallBack : TCallBackEvent) : Boolean;
+    function has(aCallBack : TCallBack) : Boolean; overload;
+    function has(aCallBack : TCallBackEvent) : Boolean; overload;
     function lock : TCallBacks;
     function locked : boolean;
-    function remove(aCallBack : TCallBack) : TCallbacks;
-    function remove(aCallBack : Array of TCallBack) : TCallbacks;
-    function remove(aCallBack : TCallBackEvent) : TCallbacks;
-    function remove(aCallBack : Array of TCallBackEvent) : TCallbacks;
+    function remove(aCallBack : TCallBack) : TCallbacks; overload;
+    function remove(aCallBack : Array of TCallBack) : TCallbacks; overload;
+    function remove(aCallBack : TCallBackEvent) : TCallbacks; overload;
+    function remove(aCallBack : Array of TCallBackEvent) : TCallbacks; overload;
   end;
 
   { TJQuery }
@@ -94,8 +93,8 @@ Type
     procedure always(aHandler : TJQXHRAlwaysHandler); overload;
     procedure fail(aHandler : TJQXHRFailHandler); overload;
     procedure _then(aSuccess : TJQXHRDoneHandler; aFail : TJQXHRFailHandler); overload;
-    procedure abort;
-    procedure abort(AStatusText : String);
+    procedure abort; overload;
+    procedure abort(AStatusText : String); overload;
     property readyState : NativeInt read FReadyState;
     property ResponseHeaders[aName : string] : string Read getResponseHeader;
     property responseXML : TJSDocument read FresponseXML;
@@ -264,30 +263,30 @@ Type
     class function getScript(url : String) : TJQXHR;overload;
     class function getScript(url : String; aSuccess : TJQueryAjaxScriptHandler) : TJQXHR;overload;
 
-    function has(Const aSelector : String) : TJQuery;
-    function has(Const aQuery : TJQuery) : TJQuery;
+    function has(Const aSelector : String) : TJQuery; overload;
+    function has(Const aQuery : TJQuery) : TJQuery; overload;
     function hasClass(Const aClassName : String) : Boolean;
     class function hasData(aElement : TJSElement) : Boolean;
-    function height: Integer;
-    function height(aValue: Integer) : TJQuery;
-    function height(aValue: String) : TJQuery;
-    function height(aHandler: TJQueryHeightHandler) : TJQuery;
-    function html : String;
-    function html(Const aHTML : String) : TJQuery;
-    function html(Const aHandler : TJQueryHTMLHandler) : TJQuery;
-    function innerHeight: Integer;
-    function innerHeight(aValue: Integer) : TJQuery;
-    function innerHeight(aValue: String) : TJQuery;
-    function innerHeight(aHandler: TJQueryHeightHandler) : TJQuery;
-    function innerWidth: Integer;
-    function innerWidth(aValue: Integer) : TJQuery;
-    function innerWidth(aValue: String) : TJQuery;
-    function innerWidth(aHandler: TJQueryWidthHandler) : TJQuery;
-    function _is(Const aSelector : String) : TJQuery; external name 'is';
-    function _is(Const aQuery : TJQuery) : TJQuery; external name 'is';
-    function _is(aHandler : TJQueryFilterHandler) : TJQuery; external name 'is';
-    function _is(Const aElement : TJSElement) : TJQuery; external name 'is';
-    function _is(Const aElements : Array of TJSElement) : TJQuery; external name 'is';
+    function height: Integer; overload;
+    function height(aValue: Integer) : TJQuery; overload;
+    function height(aValue: String) : TJQuery; overload;
+    function height(aHandler: TJQueryHeightHandler) : TJQuery; overload;
+    function html : String; overload;
+    function html(Const aHTML : String) : TJQuery; overload;
+    function html(Const aHandler : TJQueryHTMLHandler) : TJQuery; overload;
+    function innerHeight: Integer; overload;
+    function innerHeight(aValue: Integer) : TJQuery; overload;
+    function innerHeight(aValue: String) : TJQuery; overload;
+    function innerHeight(aHandler: TJQueryHeightHandler) : TJQuery; overload;
+    function innerWidth: Integer; overload;
+    function innerWidth(aValue: Integer) : TJQuery; overload;
+    function innerWidth(aValue: String) : TJQuery; overload;
+    function innerWidth(aHandler: TJQueryWidthHandler) : TJQuery; overload;
+    function _is(Const aSelector : String) : TJQuery; external name 'is'; overload;
+    function _is(Const aQuery : TJQuery) : TJQuery; external name 'is'; overload;
+    function _is(aHandler : TJQueryFilterHandler) : TJQuery; external name 'is'; overload;
+    function _is(Const aElement : TJSElement) : TJQuery; external name 'is'; overload;
+    function _is(Const aElements : Array of TJSElement) : TJQuery; external name 'is'; overload;
     function last : TJQuery;
     class function load(url : String) : TJQXHR;overload;
     class function load(url,Data : String) : TJQXHR;overload;
@@ -340,17 +339,17 @@ Type
     class function param (aObject : TJSObject; traditional : Boolean) : String;overload;
     class function param (aObject : TJQuery; traditional : Boolean) : String;overload;
 
-    Function parent : TJQuery;
-    Function parent (const ASelector: String) : TJQuery;
-    Function parents : TJQuery;
-    Function parents (const ASelector: String) : TJQuery;
-    function parentsUntil : TJQuery;
-    function parentsUntil(const aSelector : String) : TJQuery;
-    function parentsUntil(const aSelector,aFilter : String) : TJQuery;
-    function parentsUntil(const aElement : TJSElement) : TJQuery;
-    function parentsUntil(const aElement : TJSElement; aFilter : String) : TJQuery;
-    function parentsUntil(const aQuery : TJQuery) : TJQuery;
-    function parentsUntil(const aQuery : TJQuery; aFilter : String) : TJQuery;
+    Function parent : TJQuery; overload;
+    Function parent (const ASelector: String) : TJQuery; overload;
+    Function parents : TJQuery; overload;
+    Function parents (const ASelector: String) : TJQuery; overload;
+    function parentsUntil : TJQuery; overload;
+    function parentsUntil(const aSelector : String) : TJQuery; overload;
+    function parentsUntil(const aSelector,aFilter : String) : TJQuery; overload;
+    function parentsUntil(const aElement : TJSElement) : TJQuery; overload;
+    function parentsUntil(const aElement : TJSElement; aFilter : String) : TJQuery; overload;
+    function parentsUntil(const aQuery : TJQuery) : TJQuery; overload;
+    function parentsUntil(const aQuery : TJQuery; aFilter : String) : TJQuery; overload;
     function position : TJQueryTopLeft;
     class function post(url : String) : TJQXHR;overload;
     class function post(url,Data : String) : TJQXHR;overload;
@@ -439,13 +438,13 @@ Type
   end;
 
 
-Function JQuery(Const aSelector :  String) : TJQuery; external name 'jQuery';
-Function JQuery(Const aSelector :  String; Context : TJSElement) : TJQuery; external name 'jQuery';
-Function JQuery(Const aElement : TJSElement) : TJQuery; external name 'jQuery';
-Function JQuery(Const aElement : Array of TJSElement) : TJQuery; external name 'jQuery';
-Function JQuery(Const aElement : TJSObject) : TJQuery; external name 'jQuery';
-Function JQuery(Const aQuery : TJQuery) : TJQuery; external name 'jQuery';
-Function JQuery() : TJQuery; external name 'jQuery';
+Function JQuery(Const aSelector :  String) : TJQuery; external name 'jQuery'; overload;
+Function JQuery(Const aSelector :  String; Context : TJSElement) : TJQuery; external name 'jQuery'; overload;
+Function JQuery(Const aElement : TJSElement) : TJQuery; external name 'jQuery'; overload;
+Function JQuery(Const aElement : Array of TJSElement) : TJQuery; external name 'jQuery'; overload;
+Function JQuery(Const aElement : TJSObject) : TJQuery; external name 'jQuery'; overload;
+Function JQuery(Const aQuery : TJQuery) : TJQuery; external name 'jQuery'; overload;
+Function JQuery() : TJQuery; external name 'jQuery'; overload;
 
 Var
   gJQuery : TJQuery; external name 'jQuery';
diff --git a/packages/rtl/math.pas b/packages/rtl/math.pas
index 1236c54..f8a10de 100644
--- a/packages/rtl/math.pas
+++ b/packages/rtl/math.pas
@@ -12,8 +12,6 @@
  **********************************************************************}
 unit Math;
 
-{$mode objfpc}
-
 interface
 
 const
@@ -54,8 +52,8 @@ function RoundTo(const AValue: Double; const Digits: TRoundToRange): Double;
 function SimpleRoundTo(const AValue: Double; const Digits: TRoundToRange = -2): Double;
 
 function randg(mean,stddev : float) : float;
-function RandomRange(const aFrom, aTo: Integer): Integer;
-function RandomRange(const aFrom, aTo: NativeLargeInt): NativeLargeInt;
+function RandomRange(const aFrom, aTo: Integer): Integer; overload;
+function RandomRange(const aFrom, aTo: NativeLargeInt): NativeLargeInt; overload;
 
 const
   NegativeValue = -1;
@@ -106,10 +104,10 @@ function lnxp1(x : double) : double;
 
 function IntPower(base : float;const exponent : Integer) : double;
 
-procedure DivMod(Dividend: LongInt; Divisor: Word; out Result, Remainder: Word);
-procedure DivMod(Dividend: LongInt; Divisor: Word; out Result, Remainder: SmallInt);
-procedure DivMod(Dividend: DWord; Divisor: DWord; out Result, Remainder: DWord);
-procedure DivMod(Dividend: LongInt; Divisor: LongInt; out Result, Remainder: LongInt);
+procedure DivMod(Dividend: LongInt; Divisor: Word; out Result, Remainder: Word); overload;
+procedure DivMod(Dividend: LongInt; Divisor: Word; out Result, Remainder: SmallInt); overload;
+procedure DivMod(Dividend: DWord; Divisor: DWord; out Result, Remainder: DWord); overload;
+procedure DivMod(Dividend: LongInt; Divisor: LongInt; out Result, Remainder: LongInt); overload;
 
 { Angle conversion }
 function DegToRad(deg : double) : double;
@@ -171,10 +169,10 @@ const
   LessThanValue = Low(TValueRelationship);
   GreaterThanValue = High(TValueRelationship);
 
-function CompareValue ( const A, B  : Integer) : TValueRelationship;
-function CompareValue ( const A, B  : NativeLargeInt) : TValueRelationship;
-function CompareValue ( const A, B  : NativeLargeUInt) : TValueRelationship;
-function CompareValue ( const A, B : Double; delta : Double = 0.0) : TValueRelationship;
+function CompareValue ( const A, B  : Integer) : TValueRelationship; overload;
+function CompareValue ( const A, B  : NativeLargeInt) : TValueRelationship; overload;
+function CompareValue ( const A, B  : NativeLargeUInt) : TValueRelationship; overload;
+function CompareValue ( const A, B : Double; delta : Double = 0.0) : TValueRelationship; overload;
 
 implementation
 
diff --git a/packages/rtl/nodejs.pas b/packages/rtl/nodejs.pas
index 4ac907b..a861877 100644
--- a/packages/rtl/nodejs.pas
+++ b/packages/rtl/nodejs.pas
@@ -12,7 +12,6 @@
  **********************************************************************}
 unit NodeJS;
 
-{$mode objfpc}
 {$ModeSwitch externalclass}
 
 interface
diff --git a/packages/rtl/objpas.pas b/packages/rtl/objpas.pas
index b2319e4..8581308 100644
--- a/packages/rtl/objpas.pas
+++ b/packages/rtl/objpas.pas
@@ -12,8 +12,6 @@
  **********************************************************************}
 unit ObjPas;
 
-{$mode objfpc}
-
 interface
 
 const
diff --git a/packages/rtl/pas2js_rtl.lpk b/packages/rtl/pas2js_rtl.lpk
index 352932b..04b2118 100644
--- a/packages/rtl/pas2js_rtl.lpk
+++ b/packages/rtl/pas2js_rtl.lpk
@@ -1,158 +1,158 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<CONFIG>
-  <Package Version="4">
-    <Name Value="pas2js_rtl"/>
-    <Type Value="RunTimeOnly"/>
-    <Author Value="Mattias Gaertner"/>
-    <AutoUpdate Value="Manually"/>
-    <CompilerOptions>
-      <Version Value="11"/>
-      <SearchPaths>
-        <UnitOutputDirectory Value="."/>
-      </SearchPaths>
-      <Parsing>
-        <SyntaxOptions>
-          <AllowLabel Value="False"/>
-          <CPPInline Value="False"/>
-          <UseAnsiStrings Value="False"/>
-        </SyntaxOptions>
-      </Parsing>
-      <CodeGeneration>
-        <Optimizations>
-          <OptimizationLevel Value="0"/>
-        </Optimizations>
-      </CodeGeneration>
-      <Linking>
-        <Debugging>
-          <GenerateDebugInfo Value="False"/>
-        </Debugging>
-      </Linking>
-      <Other>
-        <CustomOptions Value="-dPas2js -O- -Jc"/>
-        <CompilerPath Value="pas2js"/>
-        <ExecuteBefore>
-          <Command Value="$MakeExe(IDE,pas2js) -O- -Jc -vbq pas2js_rtl.pas"/>
-          <ScanForFPCMsgs Value="True"/>
-        </ExecuteBefore>
-      </Other>
-      <SkipCompiler Value="True"/>
-    </CompilerOptions>
-    <Description Value="pas2js RTL - Run Time Library"/>
-    <License Value="Modified LGPL2 as the FPC packages."/>
-    <Version Major="1"/>
-    <Files Count="26">
-      <Item1>
-        <HasRegisterProc Value="True"/>
-      </Item1>
-      <Item2>
-        <Filename Value="classes.pas"/>
-        <UnitName Value="Classes"/>
-      </Item2>
-      <Item3>
-        <Filename Value="js.pas"/>
-        <UnitName Value="JS"/>
-      </Item3>
-      <Item4>
-        <Filename Value="math.pas"/>
-        <UnitName Value="Math"/>
-      </Item4>
-      <Item5>
-        <Filename Value="nodejs.pas"/>
-        <AddToUsesPkgSection Value="False"/>
-        <UnitName Value="NodeJS"/>
-      </Item5>
-      <Item6>
-        <Filename Value="objpas.pas"/>
-        <UnitName Value="ObjPas"/>
-      </Item6>
-      <Item7>
-        <Filename Value="rtlconsts.pas"/>
-        <UnitName Value="RTLConsts"/>
-      </Item7>
-      <Item8>
-        <Filename Value="system.pas"/>
-        <AddToUsesPkgSection Value="False"/>
-        <UnitName Value="System"/>
-      </Item8>
-      <Item9>
-        <Filename Value="sysutils.pas"/>
-        <UnitName Value="SysUtils"/>
-      </Item9>
-      <Item10>
-        <Filename Value="types.pas"/>
-        <UnitName Value="Types"/>
-      </Item10>
-      <Item11>
-        <Filename Value="typinfo.pas"/>
-        <UnitName Value="TypInfo"/>
-      </Item11>
-      <Item12>
-        <Filename Value="web.pas"/>
-        <UnitName Value="Web"/>
-      </Item12>
-      <Item13>
-        <Filename Value="hotreloadclient.pas"/>
-        <UnitName Value="hotreloadclient"/>
-      </Item13>
-      <Item14>
-        <Filename Value="dateutils.pas"/>
-        <UnitName Value="DateUtils"/>
-      </Item14>
-      <Item15>
-        <Filename Value="strutils.pas"/>
-        <UnitName Value="strutils"/>
-      </Item15>
-      <Item16>
-        <Filename Value="contnrs.pas"/>
-        <UnitName Value="contnrs"/>
-      </Item16>
-      <Item17>
-        <Filename Value="browserconsole.pas"/>
-        <UnitName Value="browserconsole"/>
-      </Item17>
-      <Item18>
-        <Filename Value="webrouter.pp"/>
-        <UnitName Value="webrouter"/>
-      </Item18>
-      <Item19>
-        <Filename Value="rtti.pas"/>
-        <UnitName Value="RTTI"/>
-      </Item19>
-      <Item20>
-        <Filename Value="webgl.pas"/>
-        <UnitName Value="webgl"/>
-      </Item20>
-      <Item21>
-        <Filename Value="class2pas.pas"/>
-        <UnitName Value="class2pas"/>
-      </Item21>
-      <Item22>
-        <Filename Value="libjquery.pas"/>
-        <UnitName Value="libjquery"/>
-      </Item22>
-      <Item23>
-        <Filename Value="timer.pas"/>
-        <UnitName Value="timer"/>
-      </Item23>
-      <Item24>
-        <Filename Value="webaudio.pas"/>
-        <UnitName Value="webaudio"/>
-      </Item24>
-      <Item25>
-        <Filename Value="webbluetooth.pas"/>
-        <UnitName Value="webbluetooth"/>
-      </Item25>
-      <Item26>
-        <Filename Value="websvg.pas"/>
-        <UnitName Value="websvg"/>
-      </Item26>
-    </Files>
-    <UsageOptions>
-      <CustomOptions Value="-dPas2js"/>
-      <UnitPath Value="$(PkgOutDir)"/>
-    </UsageOptions>
-    <PublishOptions>
-      <Version Value="2"/>
-    </PublishOptions>
-  </Package>
-</CONFIG>
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+  <Package Version="4">
+    <Name Value="pas2js_rtl"/>
+    <Type Value="RunTimeOnly"/>
+    <Author Value="Mattias Gaertner"/>
+    <AutoUpdate Value="Manually"/>
+    <CompilerOptions>
+      <Version Value="11"/>
+      <SearchPaths>
+        <UnitOutputDirectory Value="."/>
+      </SearchPaths>
+      <Parsing>
+        <SyntaxOptions>
+          <AllowLabel Value="False"/>
+          <CPPInline Value="False"/>
+          <UseAnsiStrings Value="False"/>
+        </SyntaxOptions>
+      </Parsing>
+      <CodeGeneration>
+        <Optimizations>
+          <OptimizationLevel Value="0"/>
+        </Optimizations>
+      </CodeGeneration>
+      <Linking>
+        <Debugging>
+          <GenerateDebugInfo Value="False"/>
+        </Debugging>
+      </Linking>
+      <Other>
+        <CustomOptions Value="-dPas2js -O- -Jc"/>
+        <CompilerPath Value="C:/Projetos/pas2js/bin/i386-win32/pas2js.exe"/>
+        <ExecuteBefore>
+          <Command Value="C:/Projetos/pas2js/bin/i386-win32/pas2js.exe -O- -Jc -vbq -MDelphi pas2js_rtl.pas"/>
+          <ScanForFPCMsgs Value="True"/>
+        </ExecuteBefore>
+      </Other>
+      <SkipCompiler Value="True"/>
+    </CompilerOptions>
+    <Description Value="pas2js RTL - Run Time Library"/>
+    <License Value="Modified LGPL2 as the FPC packages."/>
+    <Version Major="1"/>
+    <Files Count="26">
+      <Item1>
+        <HasRegisterProc Value="True"/>
+      </Item1>
+      <Item2>
+        <Filename Value="classes.pas"/>
+        <UnitName Value="Classes"/>
+      </Item2>
+      <Item3>
+        <Filename Value="js.pas"/>
+        <UnitName Value="JS"/>
+      </Item3>
+      <Item4>
+        <Filename Value="math.pas"/>
+        <UnitName Value="Math"/>
+      </Item4>
+      <Item5>
+        <Filename Value="nodejs.pas"/>
+        <AddToUsesPkgSection Value="False"/>
+        <UnitName Value="NodeJS"/>
+      </Item5>
+      <Item6>
+        <Filename Value="objpas.pas"/>
+        <UnitName Value="ObjPas"/>
+      </Item6>
+      <Item7>
+        <Filename Value="rtlconsts.pas"/>
+        <UnitName Value="RTLConsts"/>
+      </Item7>
+      <Item8>
+        <Filename Value="system.pas"/>
+        <AddToUsesPkgSection Value="False"/>
+        <UnitName Value="System"/>
+      </Item8>
+      <Item9>
+        <Filename Value="sysutils.pas"/>
+        <UnitName Value="SysUtils"/>
+      </Item9>
+      <Item10>
+        <Filename Value="types.pas"/>
+        <UnitName Value="Types"/>
+      </Item10>
+      <Item11>
+        <Filename Value="typinfo.pas"/>
+        <UnitName Value="TypInfo"/>
+      </Item11>
+      <Item12>
+        <Filename Value="web.pas"/>
+        <UnitName Value="Web"/>
+      </Item12>
+      <Item13>
+        <Filename Value="hotreloadclient.pas"/>
+        <UnitName Value="hotreloadclient"/>
+      </Item13>
+      <Item14>
+        <Filename Value="dateutils.pas"/>
+        <UnitName Value="DateUtils"/>
+      </Item14>
+      <Item15>
+        <Filename Value="strutils.pas"/>
+        <UnitName Value="strutils"/>
+      </Item15>
+      <Item16>
+        <Filename Value="contnrs.pas"/>
+        <UnitName Value="contnrs"/>
+      </Item16>
+      <Item17>
+        <Filename Value="browserconsole.pas"/>
+        <UnitName Value="browserconsole"/>
+      </Item17>
+      <Item18>
+        <Filename Value="webrouter.pp"/>
+        <UnitName Value="webrouter"/>
+      </Item18>
+      <Item19>
+        <Filename Value="rtti.pas"/>
+        <UnitName Value="RTTI"/>
+      </Item19>
+      <Item20>
+        <Filename Value="webgl.pas"/>
+        <UnitName Value="webgl"/>
+      </Item20>
+      <Item21>
+        <Filename Value="class2pas.pas"/>
+        <UnitName Value="class2pas"/>
+      </Item21>
+      <Item22>
+        <Filename Value="libjquery.pas"/>
+        <UnitName Value="libjquery"/>
+      </Item22>
+      <Item23>
+        <Filename Value="timer.pas"/>
+        <UnitName Value="timer"/>
+      </Item23>
+      <Item24>
+        <Filename Value="webaudio.pas"/>
+        <UnitName Value="webaudio"/>
+      </Item24>
+      <Item25>
+        <Filename Value="webbluetooth.pas"/>
+        <UnitName Value="webbluetooth"/>
+      </Item25>
+      <Item26>
+        <Filename Value="websvg.pas"/>
+        <UnitName Value="websvg"/>
+      </Item26>
+    </Files>
+    <UsageOptions>
+      <CustomOptions Value="-dPas2js"/>
+      <UnitPath Value="$(PkgOutDir)"/>
+    </UsageOptions>
+    <PublishOptions>
+      <Version Value="2"/>
+    </PublishOptions>
+  </Package>
+</CONFIG>
diff --git a/packages/rtl/pas2js_rtl.pas b/packages/rtl/pas2js_rtl.pas
index 4a42c4c..c2a4129 100644
--- a/packages/rtl/pas2js_rtl.pas
+++ b/packages/rtl/pas2js_rtl.pas
@@ -10,7 +10,7 @@ interface
 uses
   Classes, JS, Math, ObjPas, RTLConsts, SysUtils, Types, TypInfo, Web, 
   hotreloadclient, DateUtils, strutils, contnrs, browserconsole, webrouter, 
-  RTTI, webgl;
+  RTTI, webgl, class2pas, libjquery, timer, webaudio, webbluetooth, websvg;
 
 implementation
 
diff --git a/packages/rtl/rtti.pas b/packages/rtl/rtti.pas
index 8ef2cf7..ff9da1a 100644
--- a/packages/rtl/rtti.pas
+++ b/packages/rtl/rtti.pas
@@ -12,7 +12,6 @@
  **********************************************************************}
 unit RTTI;
 
-{$mode objfpc}
 {$ModeSwitch advancedrecords}
 
 interface
diff --git a/packages/rtl/strutils.pas b/packages/rtl/strutils.pas
index 1941fd5..f8e5296 100644
--- a/packages/rtl/strutils.pas
+++ b/packages/rtl/strutils.pas
@@ -12,7 +12,6 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
-{$mode objfpc}
 
 {$inline on}
 unit strutils;
@@ -68,8 +67,8 @@ Function AnsiReverseString(const AText: String): String;
 Function StuffString(const AText: string; AStart, ALength: Cardinal;  const ASubText: string): string;
 Function RandomFrom(const AValues: array of string): string; overload;
 Function IfThen(AValue: Boolean; const ATrue: string; const AFalse: string = ''): string; overload;
-function NaturalCompareText (const S1 , S2 : string ): Integer ;
-function NaturalCompareText(const Str1, Str2: string; const ADecSeparator, AThousandSeparator: String): Integer;
+function NaturalCompareText (const S1 , S2 : string ): Integer ; overload;
+function NaturalCompareText(const Str1, Str2: string; const ADecSeparator, AThousandSeparator: String): Integer; overload;
 
 
 { ---------------------------------------------------------------------
@@ -103,9 +102,9 @@ type
   TStringSearchOptions = set of TStringSearchOption;
   TStringSeachOption = TStringSearchOption;
 
-Function PosEx(const SubStr, S: string; Offset: SizeUint): SizeInt;
-Function PosEx(const SubStr, S: string): SizeInt; // Offset: Cardinal = 1
-Function PosEx(c:char; const S: string; Offset: SizeUint): SizeInt;
+Function PosEx(const SubStr, S: string; Offset: SizeUint): SizeInt; overload;
+Function PosEx(const SubStr, S: string): SizeInt; overload; // Offset: Cardinal = 1
+Function PosEx(c:char; const S: string; Offset: SizeUint): SizeInt; overload;
 function StringsReplace(const S: string; OldPattern, NewPattern: array of string;  Flags: TReplaceFlags): string;
 
 { ---------------------------------------------------------------------
@@ -122,21 +121,21 @@ Function ReplaceText(const AText, AFromText, AToText: string): string;
 type
   TSoundexLength = 1..MaxInt;
 
-Function Soundex(const AText: string; ALength: TSoundexLength): string;
-Function Soundex(const AText: string): string; // ; ALength: TSoundexLength = 4
+Function Soundex(const AText: string; ALength: TSoundexLength): string; overload;
+Function Soundex(const AText: string): string; overload; // ; ALength: TSoundexLength = 4
 
 type
   TSoundexIntLength = 1..8;
 
-Function SoundexInt(const AText: string; ALength: TSoundexIntLength): Integer;
-Function SoundexInt(const AText: string): Integer; //; ALength: TSoundexIntLength = 4
+Function SoundexInt(const AText: string; ALength: TSoundexIntLength): Integer; overload;
+Function SoundexInt(const AText: string): Integer; overload; //; ALength: TSoundexIntLength = 4
 Function DecodeSoundexInt(AValue: Integer): string;
 Function SoundexWord(const AText: string): Word;
 Function DecodeSoundexWord(AValue: Word): string;
-Function SoundexSimilar(const AText, AOther: string; ALength: TSoundexLength): Boolean;
-Function SoundexSimilar(const AText, AOther: string): Boolean; //; ALength: TSoundexLength = 4
-Function SoundexCompare(const AText, AOther: string; ALength: TSoundexLength): Integer;
-Function SoundexCompare(const AText, AOther: string): Integer; //; ALength: TSoundexLength = 4
+Function SoundexSimilar(const AText, AOther: string; ALength: TSoundexLength): Boolean; overload;
+Function SoundexSimilar(const AText, AOther: string): Boolean; overload; //; ALength: TSoundexLength = 4
+Function SoundexCompare(const AText, AOther: string; ALength: TSoundexLength): Integer; overload;
+Function SoundexCompare(const AText, AOther: string): Integer; overload; //; ALength: TSoundexLength = 4
 Function SoundexProc(const AText, AOther: string): Boolean;
 
 type
@@ -190,9 +189,9 @@ function Numb2USA(const S: string): string;
 function Hex2Dec(const S: string): Longint;
 function Dec2Numb(N: Longint; Len, Base: Byte): string;
 function Numb2Dec(S: string; Base: Byte): Longint;
-function IntToBin(Value: Longint; Digits, Spaces: Integer): string;
-function IntToBin(Value: Longint; Digits: Integer): string;
-function IntToBin(Value: NativeInt; Digits:integer): string;
+function IntToBin(Value: Longint; Digits, Spaces: Integer): string;  overload;
+function IntToBin(Value: Longint; Digits: Integer): string; overload;
+function IntToBin(Value: NativeInt; Digits:integer): string; overload;
 function IntToRoman(Value: Longint): string;
 function TryRomanToInt(S: String; out N: LongInt; Strictness: TRomanConversionStrictness = rcsRelaxed): Boolean;
 function RomanToInt(const S: string; Strictness: TRomanConversionStrictness = rcsRelaxed): Longint;
@@ -204,10 +203,10 @@ const
   StdWordDelims = [#0..' ',',','.',';','/','\',':','''','"','`'] + Brackets;
   StdSwitchChars = ['-','/'];
 
-function PosSet (const c:Array of char;const s : String ):SizeInt;
-function PosSet (const c:string;const s : String ):SizeInt;
-function PosSetEx (const c:Array of char;const s : String;count:Integer ):SizeInt;
-function PosSetEx (const c:string;const s : String;count:Integer ):SizeInt;
+function PosSet (const c:Array of char;const s : String ):SizeInt; overload;
+function PosSet (const c:string;const s : String ):SizeInt; overload;
+function PosSetEx (const c:Array of char;const s : String;count:Integer ):SizeInt; overload;
+function PosSetEx (const c:string;const s : String;count:Integer ):SizeInt; overload;
 
 Procedure Removeleadingchars(VAR S : String; Const CSet:Array of char);
 Procedure RemoveTrailingChars(VAR S : String;Const CSet:Array of char);
diff --git a/packages/rtl/system.pas b/packages/rtl/system.pas
index f8376af..5d7117e 100644
--- a/packages/rtl/system.pas
+++ b/packages/rtl/system.pas
@@ -12,7 +12,6 @@
  **********************************************************************}
 unit System;
 
-{$mode objfpc}
 {$modeswitch externalclass}
 
 interface
@@ -157,8 +156,8 @@ type
     procedure DefaultHandler(var aMessage); virtual;
     procedure DefaultHandlerStr(var aMessage); virtual;
 
-    function GetInterface(const iid: TGuid; out obj): boolean;
-    function GetInterface(const iidstr: String; out obj): boolean; inline;
+    function GetInterface(const iid: TGuid; out obj): boolean; overload;
+    function GetInterface(const iidstr: String; out obj): boolean; inline; overload;
     function GetInterfaceByStr(const iidstr: String; out obj): boolean;
     function GetInterfaceWeak(const iid: TGuid; out obj): boolean; // equal to GetInterface but the interface returned is not referenced
 
@@ -182,13 +181,12 @@ const
 
 type
   {$Interfaces COM}
-  IUnknown = interface
+  IInterface = interface
     ['{00000000-0000-0000-C000-000000000046}']
     function QueryInterface(const iid: TGuid; out obj): Integer;
     function _AddRef: Integer;
     function _Release: Integer;
   end;
-  IInterface = IUnknown;
 
   {$M+}
   IInvokable = interface(IInterface)
@@ -209,7 +207,7 @@ type
 
   { TInterfacedObject }
 
-  TInterfacedObject = class(TObject,IUnknown)
+  TInterfacedObject = class(TObject,IInterface)
   protected
     fRefCount: Integer;
     { implement methods of IUnknown }
@@ -227,15 +225,15 @@ type
   TAggregatedObject = class(TObject)
   private
     fController: Pointer;
-    function GetController: IUnknown;
+    function GetController: IInterface;
   protected
     { implement methods of IUnknown }
     function QueryInterface(const iid: TGuid; out obj): Integer; virtual;
     function _AddRef: Integer; virtual;
     function _Release: Integer; virtual;
   public
-    constructor Create(const aController: IUnknown); reintroduce;
-    property Controller: IUnknown read GetController;
+    constructor Create(const aController: IInterface); reintroduce;
+    property Controller: IInterface read GetController;
   end;
 
   { TContainedObject }
@@ -771,27 +769,27 @@ end;
 
 { TAggregatedObject }
 
-function TAggregatedObject.GetController: IUnknown;
+function TAggregatedObject.GetController: IInterface;
 begin
-  Result := IUnknown(fController);
+  Result := IInterface(fController);
 end;
 
 function TAggregatedObject.QueryInterface(const iid: TGuid; out obj): Integer;
 begin
-  Result := IUnknown(fController).QueryInterface(iid, obj);
+  Result := IInterface(fController).QueryInterface(iid, obj);
 end;
 
 function TAggregatedObject._AddRef: Integer;
 begin
-  Result := IUnknown(fController)._AddRef;
+  Result := IInterface(fController)._AddRef;
 end;
 
 function TAggregatedObject._Release: Integer;
 begin
-  Result := IUnknown(fController)._Release;
+  Result := IInterface(fController)._Release;
 end;
 
-constructor TAggregatedObject.Create(const aController: IUnknown);
+constructor TAggregatedObject.Create(const aController: IInterface);
 begin
   inherited Create;
   { do not keep a counted reference to the controller! }
diff --git a/packages/rtl/sysutils.pas b/packages/rtl/sysutils.pas
index c902ce5..20c9157 100644
--- a/packages/rtl/sysutils.pas
+++ b/packages/rtl/sysutils.pas
@@ -12,7 +12,6 @@
  **********************************************************************}
 unit SysUtils;
 
-{$mode objfpc}
 {$modeswitch typehelpers}
 {$modeswitch advancedrecords}
 
@@ -186,7 +185,7 @@ Const
   HexDisplayPrefix: string = '$';
   LeadBytes = [] unimplemented;
 
-Function CharInSet(Ch: Char;Const CSet : array of char) : Boolean;
+Function CharInSet(Ch: Char;Const CSet : array of char) : Boolean; overload;
 
 function LeftStr(const S: string; Count: Integer): String; assembler;
 function RightStr(const S: string; Count: Integer): String; assembler;
@@ -230,20 +229,20 @@ function QuotedStr(const s: string; QuoteChar: Char = ''''): string;
 function DeQuoteString(aQuoted: String; AQuote: Char): String;
 Function LastDelimiter(const Delimiters, S: string): SizeInt;
 function IsDelimiter(const Delimiters, S: string; Index: Integer): Boolean;
-function AdjustLineBreaks(const S: string): string;
-function AdjustLineBreaks(const S: string; Style: TTextLineBreakStyle): string;
-function WrapText(const Line, BreakStr: string; const BreakChars: Array of char;  MaxCol: Integer): string;
-function WrapText(const Line: string; MaxCol: Integer): string;
+function AdjustLineBreaks(const S: string): string; overload;
+function AdjustLineBreaks(const S: string; Style: TTextLineBreakStyle): string; overload;
+function WrapText(const Line, BreakStr: string; const BreakChars: Array of char;  MaxCol: Integer): string; overload;
+function WrapText(const Line: string; MaxCol: Integer): string; overload;
 
 { *****************************************************************************
   Integer conversions
   *****************************************************************************}
 
 function IntToStr(const Value: Integer): string;
-Function TryStrToInt(const S : String; Out res : Integer) : Boolean;
-Function TryStrToInt(const S : String; Out res : NativeInt) : Boolean;
-Function StrToIntDef(const S : String; Const aDef : Integer) : Integer;
-Function StrToIntDef(const S : String; Const aDef : NativeInt) : NativeInt;
+Function TryStrToInt(const S : String; Out res : Integer) : Boolean; overload;
+Function TryStrToInt(const S : String; Out res : NativeInt) : Boolean; overload;
+Function StrToIntDef(const S : String; Const aDef : Integer) : Integer; overload;
+Function StrToIntDef(const S : String; Const aDef : NativeInt) : NativeInt; overload;
 Function StrToInt(const S : String) : Integer;
 Function StrToNativeInt(const S : String) : NativeInt;
 // For compatibility
@@ -285,8 +284,8 @@ Function TryStrToFloat(const S : String; Out res : Double) : Boolean; overload;
 Function StrToFloatDef(const S : String; Const aDef : Double) : Double;
 Function StrToFloat(const S : String) : Double;
 Function FormatFloat (Fmt : String; aValue : Double) : String;
-Function SwapEndian(W : Word) : Word;
-Function SwapEndian(C : Cardinal) : Cardinal;
+Function SwapEndian(W : Word) : Word; overload;
+Function SwapEndian(C : Cardinal) : Cardinal; overload;
 
 { *****************************************************************************
   Boolean conversions
@@ -296,8 +295,8 @@ Var
   TrueBoolStrs, FalseBoolStrs : Array of String;
 
 function StrToBool(const S: String): Boolean;
-function BoolToStr(B: Boolean; UseBoolStrs:Boolean=False): string;
-function BoolToStr(B: Boolean; const TrueS, FalseS: String): string;
+function BoolToStr(B: Boolean; UseBoolStrs:Boolean=False): string; overload;
+function BoolToStr(B: Boolean; const TrueS, FalseS: String): string; overload;
 function StrToBoolDef(const S: String; Default: Boolean): Boolean;
 function TryStrToBool(const S: String; out Value: Boolean): Boolean;
 
@@ -327,8 +326,8 @@ var
 
 // Set handlers for uncaught exceptions. These will call HookUncaughtExceptions
 // They return the old exception handler, if there was any.
-Function SetOnUnCaughtExceptionHandler(aValue : TUncaughtPascalExceptionHandler) : TUncaughtPascalExceptionHandler;
-Function SetOnUnCaughtExceptionHandler(aValue : TUncaughtJSExceptionHandler) : TUncaughtJSExceptionHandler;
+Function SetOnUnCaughtExceptionHandler(aValue : TUncaughtPascalExceptionHandler) : TUncaughtPascalExceptionHandler; overload;
+Function SetOnUnCaughtExceptionHandler(aValue : TUncaughtJSExceptionHandler) : TUncaughtJSExceptionHandler; overload;
 // Hook the rtl handler for uncaught exceptions. If any exception handlers were set, they will be called.
 // If none were set, the exceptions will be displayed using ShowException.
 Procedure HookUncaughtExceptions;
@@ -546,30 +545,30 @@ function TimeToStr(Time: TDateTime): string;
 // function TimeToStr(Time: TDateTime; const FormatSettings: TFormatSettings): string;
 function DateTimeToStr(DateTime: TDateTime; ForceTimeIfZero : Boolean = False): string;
 // function DateTimeToStr(DateTime: TDateTime; const FormatSettings: TFormatSettings; ForceTimeIfZero : Boolean = False): string;
-function StrToDate(const S: String): TDateTime;
-function StrToDate(const S: String; separator : char): TDateTime;
-function StrToDate(const S: String; const useformat : string; separator : char): TDateTime;
+function StrToDate(const S: String): TDateTime; overload;
+function StrToDate(const S: String; separator : char): TDateTime; overload;
+function StrToDate(const S: String; const useformat : string; separator : char): TDateTime; overload;
 //function StrToDate(const S: string; FormatSettings : TFormatSettings): TDateTime;
-function StrToTime(const S: String): TDateTime;
-function StrToTime(const S: String; separator : char): TDateTime;
+function StrToTime(const S: String): TDateTime; overload;
+function StrToTime(const S: String; separator : char): TDateTime; overload;
 // function StrToTime(const S: string; FormatSettings : TFormatSettings): TDateTime;
 function StrToDateTime(const S: String): TDateTime;
 //function StrToDateTime(const s: ShortString; const FormatSettings : TFormatSettings): TDateTime;
 function FormatDateTime(const FormatStr: string; const DateTime: TDateTime): string;
 // function FormatDateTime(const FormatStr: string; DateTime: TDateTime; const FormatSettings: TFormatSettings; Options : TFormatDateTimeOptions = []): string;
-function TryStrToDate(const S: String; out Value: TDateTime): Boolean;
-function TryStrToDate(const S: String; out Value: TDateTime; separator : char): Boolean;
-function TryStrToDate(const S: String; out Value: TDateTime; const useformat : string; separator : char): Boolean;
+function TryStrToDate(const S: String; out Value: TDateTime): Boolean; overload;
+function TryStrToDate(const S: String; out Value: TDateTime; separator : char): Boolean; overload;
+function TryStrToDate(const S: String; out Value: TDateTime; const useformat : string; separator : char): Boolean; overload;
 // function TryStrToDate(const S: string; out Value: TDateTime; const FormatSettings: TFormatSettings): Boolean;
-function TryStrToTime(const S: String; out Value: TDateTime): Boolean;
-function TryStrToTime(const S: String; out Value: TDateTime; separator : char): Boolean;
+function TryStrToTime(const S: String; out Value: TDateTime): Boolean; overload;
+function TryStrToTime(const S: String; out Value: TDateTime; separator : char): Boolean; overload;
 function TryStrToDateTime(const S: String; out Value: TDateTime): Boolean;
 // function TryStrToTime(const S: string; out Value: TDateTime; const FormatSettings: TFormatSettings): Boolean;
 // function TryStrToDateTime(const S: string; out Value: TDateTime; const FormatSettings: TFormatSettings): Boolean;
-function StrToDateDef(const S: String; const Defvalue : TDateTime): TDateTime;
-function StrToDateDef(const S: String; const Defvalue : TDateTime; separator : char): TDateTime;
-function StrToTimeDef(const S: String; const Defvalue : TDateTime): TDateTime;
-function StrToTimeDef(const S: String; const Defvalue : TDateTime; separator : char): TDateTime;
+function StrToDateDef(const S: String; const Defvalue : TDateTime): TDateTime; overload;
+function StrToDateDef(const S: String; const Defvalue : TDateTime; separator : char): TDateTime; overload;
+function StrToTimeDef(const S: String; const Defvalue : TDateTime): TDateTime; overload;
+function StrToTimeDef(const S: String; const Defvalue : TDateTime; separator : char): TDateTime; overload;
 function StrToDateTimeDef(const S: String; const Defvalue : TDateTime): TDateTime;
 function CurrentYear:Word;
 procedure ReplaceTime(var dati: TDateTime; NewTime : TDateTime);
@@ -742,7 +741,7 @@ Type
     Class Function ToNativeInt(const S: string): NativeInt; overload; static; inline;
     Class Function ToInteger(const S: string): Integer; overload; static; inline;
     Class Function UpperCase(const S: string): string; overload; static; inline;
-    Class Function ToCharArray(const S : String) : TCharArray; static;
+    Class Function ToCharArray(const S : String) : TCharArray; static; overload;
     Function CompareTo(const B: string): Integer;
     Function Contains(const AValue: string): Boolean;
     Function CountChar(const C: Char): SizeInt;
@@ -1261,7 +1260,7 @@ end;
 Type
   TCharSet = Set of Char;
 
-Function CharInSet(Ch: Char;Const CSet : TCharSet) : Boolean;
+Function CharInSet(Ch: Char;Const CSet : TCharSet) : Boolean; overload;
 
 begin
   Result:=Ch in CSet;
diff --git a/packages/rtl/timer.pas b/packages/rtl/timer.pas
index 33b47e9..8d82ceb 100644
--- a/packages/rtl/timer.pas
+++ b/packages/rtl/timer.pas
@@ -11,8 +11,6 @@
 
  **********************************************************************}
 
-{$mode objfpc}
-
 unit timer;
 
 Interface
diff --git a/packages/rtl/types.pas b/packages/rtl/types.pas
index bc20f09..411cdf0 100644
--- a/packages/rtl/types.pas
+++ b/packages/rtl/types.pas
@@ -12,8 +12,6 @@
  **********************************************************************}
 unit Types;
 
-{$mode objfpc}
-
 interface
 
 type
@@ -56,8 +54,8 @@ function IsRectEmpty(const aRect: TRect) : Boolean;
 function OffsetRect(var aRect: TRect; DX, DY: Integer) : Boolean;
 function CenterPoint(const aRect: TRect): TPoint;
 function InflateRect(var aRect: TRect; dx, dy: Integer): Boolean;
-function Size(AWidth, AHeight: Integer): TSize;
-function Size(const aRect: TRect): TSize;
+function Size(AWidth, AHeight: Integer): TSize; overload;
+function Size(const aRect: TRect): TSize; overload;
 
 implementation
 
diff --git a/packages/rtl/typinfo.pas b/packages/rtl/typinfo.pas
index 0deb86b..0eeff3b 100644
--- a/packages/rtl/typinfo.pas
+++ b/packages/rtl/typinfo.pas
@@ -12,7 +12,6 @@
  **********************************************************************}
 unit TypInfo;
 
-{$mode objfpc}
 {$modeswitch externalclass}
 
 interface
@@ -387,56 +386,56 @@ function GetInterfaceMethods(aTIInterface: TTypeInfoInterface): TTypeMemberMetho
 function GetRTTIAttributes(const Attributes: TTypeInfoAttributes): TCustomAttributeArray;
 
 function GetPropInfos(aTIStruct: TTypeInfoStruct): TTypeMemberPropertyDynArray;
-function GetPropList(aTIStruct: TTypeInfoStruct; TypeKinds: TTypeKinds; Sorted: boolean = true): TTypeMemberPropertyDynArray;
-function GetPropList(aTIStruct: TTypeInfoStruct): TTypeMemberPropertyDynArray;
-function GetPropList(AClass: TClass): TTypeMemberPropertyDynArray;
-function GetPropList(Instance: TObject): TTypeMemberPropertyDynArray;
-
-function GetPropInfo(TI: TTypeInfoStruct; const PropName: String): TTypeMemberProperty;
-function GetPropInfo(TI: TTypeInfoStruct; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty;
-function GetPropInfo(Instance: TObject; const PropName: String): TTypeMemberProperty;
-function GetPropInfo(Instance: TObject; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty;
-function GetPropInfo(aClass: TClass; const PropName: String): TTypeMemberProperty;
-function GetPropInfo(aClass: TClass; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty;
-
-function FindPropInfo(Instance: TObject; const PropName: String): TTypeMemberProperty;
-function FindPropInfo(Instance: TObject; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty;
-function FindPropInfo(aClass: TClass; const PropName: String): TTypeMemberProperty;
-function FindPropInfo(aClass: TClass; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty;
+function GetPropList(aTIStruct: TTypeInfoStruct; TypeKinds: TTypeKinds; Sorted: boolean = true): TTypeMemberPropertyDynArray; overload;
+function GetPropList(aTIStruct: TTypeInfoStruct): TTypeMemberPropertyDynArray; overload;
+function GetPropList(AClass: TClass): TTypeMemberPropertyDynArray; overload;
+function GetPropList(Instance: TObject): TTypeMemberPropertyDynArray; overload;
+
+function GetPropInfo(TI: TTypeInfoStruct; const PropName: String): TTypeMemberProperty; overload;
+function GetPropInfo(TI: TTypeInfoStruct; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty; overload;
+function GetPropInfo(Instance: TObject; const PropName: String): TTypeMemberProperty; overload;
+function GetPropInfo(Instance: TObject; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty; overload;
+function GetPropInfo(aClass: TClass; const PropName: String): TTypeMemberProperty; overload;
+function GetPropInfo(aClass: TClass; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty; overload;
+
+function FindPropInfo(Instance: TObject; const PropName: String): TTypeMemberProperty; overload;
+function FindPropInfo(Instance: TObject; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty; overload;
+function FindPropInfo(aClass: TClass; const PropName: String): TTypeMemberProperty; overload;
+function FindPropInfo(aClass: TClass; const PropName: String; const Kinds: TTypeKinds): TTypeMemberProperty; overload;
 
 // Property information routines.
-Function IsStoredProp(Instance: TObject; const PropInfo: TTypeMemberProperty): Boolean;
-Function IsStoredProp(Instance: TObject; const PropName: string): Boolean;
-function IsPublishedProp(Instance: TObject; const PropName: String): Boolean;
-function IsPublishedProp(aClass: TClass; const PropName: String): Boolean;
-function PropType(Instance: TObject; const PropName: string): TTypeKind;
-function PropType(aClass: TClass; const PropName: string): TTypeKind;
-function PropIsType(Instance: TObject; const PropName: string; const TypeKind: TTypeKind): Boolean;
-function PropIsType(aClass: TClass; const PropName: string; const TypeKind: TTypeKind): Boolean;
-
-function GetJSValueProp(Instance: TJSObject; TI: TTypeInfoStruct; const PropName: String): JSValue;
-function GetJSValueProp(Instance: TJSObject; const PropInfo: TTypeMemberProperty): JSValue;
-function GetJSValueProp(Instance: TObject; const PropName: String): JSValue;
-function GetJSValueProp(Instance: TObject; const PropInfo: TTypeMemberProperty): JSValue;
-procedure SetJSValueProp(Instance: TJSObject; TI: TTypeInfoStruct; const PropName: String; Value: JSValue);
-procedure SetJSValueProp(Instance: TJSObject; const PropInfo: TTypeMemberProperty; Value: JSValue);
-procedure SetJSValueProp(Instance: TObject; const PropName: String; Value: JSValue);
-procedure SetJSValueProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: JSValue);
-
-function GetNativeIntProp(Instance: TObject; const PropName: String): NativeInt;
-function GetNativeIntProp(Instance: TObject; const PropInfo: TTypeMemberProperty): NativeInt;
-procedure SetNativeIntProp(Instance: TObject; const PropName: String; Value: NativeInt);
-procedure SetNativeIntProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: NativeInt);
-
-function GetOrdProp(Instance: TObject; const PropName: String): longint;
-function GetOrdProp(Instance: TObject; const PropInfo: TTypeMemberProperty): longint;
-procedure SetOrdProp(Instance: TObject; const PropName: String; Value: longint);
-procedure SetOrdProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: longint);
-
-function GetEnumProp(Instance: TObject; const PropName: String): String;
-function GetEnumProp(Instance: TObject; const PropInfo: TTypeMemberProperty): String;
-procedure SetEnumProp(Instance: TObject; const PropName: String; const Value: String);
-procedure SetEnumProp(Instance: TObject; const PropInfo: TTypeMemberProperty; const Value: String);
+Function IsStoredProp(Instance: TObject; const PropInfo: TTypeMemberProperty): Boolean; overload;
+Function IsStoredProp(Instance: TObject; const PropName: string): Boolean; overload;
+function IsPublishedProp(Instance: TObject; const PropName: String): Boolean; overload;
+function IsPublishedProp(aClass: TClass; const PropName: String): Boolean; overload;
+function PropType(Instance: TObject; const PropName: string): TTypeKind; overload;
+function PropType(aClass: TClass; const PropName: string): TTypeKind; overload;
+function PropIsType(Instance: TObject; const PropName: string; const TypeKind: TTypeKind): Boolean; overload;
+function PropIsType(aClass: TClass; const PropName: string; const TypeKind: TTypeKind): Boolean; overload;
+
+function GetJSValueProp(Instance: TJSObject; TI: TTypeInfoStruct; const PropName: String): JSValue; overload;
+function GetJSValueProp(Instance: TJSObject; const PropInfo: TTypeMemberProperty): JSValue; overload;
+function GetJSValueProp(Instance: TObject; const PropName: String): JSValue; overload;
+function GetJSValueProp(Instance: TObject; const PropInfo: TTypeMemberProperty): JSValue; overload;
+procedure SetJSValueProp(Instance: TJSObject; TI: TTypeInfoStruct; const PropName: String; Value: JSValue); overload;
+procedure SetJSValueProp(Instance: TJSObject; const PropInfo: TTypeMemberProperty; Value: JSValue); overload;
+procedure SetJSValueProp(Instance: TObject; const PropName: String; Value: JSValue); overload;
+procedure SetJSValueProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: JSValue); overload;
+
+function GetNativeIntProp(Instance: TObject; const PropName: String): NativeInt; overload;
+function GetNativeIntProp(Instance: TObject; const PropInfo: TTypeMemberProperty): NativeInt; overload;
+procedure SetNativeIntProp(Instance: TObject; const PropName: String; Value: NativeInt); overload;
+procedure SetNativeIntProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: NativeInt); overload;
+
+function GetOrdProp(Instance: TObject; const PropName: String): longint; overload;
+function GetOrdProp(Instance: TObject; const PropInfo: TTypeMemberProperty): longint; overload;
+procedure SetOrdProp(Instance: TObject; const PropName: String; Value: longint); overload;
+procedure SetOrdProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: longint); overload;
+
+function GetEnumProp(Instance: TObject; const PropName: String): String; overload;
+function GetEnumProp(Instance: TObject; const PropInfo: TTypeMemberProperty): String; overload;
+procedure SetEnumProp(Instance: TObject; const PropName: String; const Value: String); overload;
+procedure SetEnumProp(Instance: TObject; const PropInfo: TTypeMemberProperty; const Value: String); overload;
 // Auxiliary routines, which may be useful
 function GetEnumName(TypeInfo: TTypeInfoEnum; Value: Integer): String;
 function GetEnumValue(TypeInfo: TTypeInfoEnum; const Name: string): Longint;
@@ -449,47 +448,47 @@ function GetSetPropArray(Instance: TObject; const PropInfo: TTypeMemberProperty)
 procedure SetSetPropArray(Instance: TObject; const PropName: String; const Arr: TIntegerDynArray); overload;
 procedure SetSetPropArray(Instance: TObject; const PropInfo: TTypeMemberProperty; const Arr: TIntegerDynArray); overload;
 
-function GetBoolProp(Instance: TObject; const PropName: String): boolean;
-function GetBoolProp(Instance: TObject; const PropInfo: TTypeMemberProperty): boolean;
-procedure SetBoolProp(Instance: TObject; const PropName: String; Value: boolean);
-procedure SetBoolProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: boolean);
-
-function GetStrProp(Instance: TObject; const PropName: String): String;
-function GetStrProp(Instance: TObject; const PropInfo: TTypeMemberProperty): String;
-procedure SetStrProp(Instance: TObject; const PropName: String; Value: String);
-procedure SetStrProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: String);
-
-function GetStringProp(Instance: TObject; const PropName: String): String; deprecated; // use GetStrProp
-function GetStringProp(Instance: TObject; const PropInfo: TTypeMemberProperty): String; deprecated; // use GetStrProp
-procedure SetStringProp(Instance: TObject; const PropName: String; Value: String); deprecated; // use GetStrProp
-procedure SetStringProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: String); deprecated; // use GetStrProp
-
-function  GetFloatProp(Instance: TObject; const PropName: string): Double;
-function  GetFloatProp(Instance: TObject; PropInfo : TTypeMemberProperty) : Double;
-procedure SetFloatProp(Instance: TObject; const PropName: string; Value: Double);
-procedure SetFloatProp(Instance: TObject; PropInfo : TTypeMemberProperty;  Value : Double);
-
-function GetObjectProp(Instance: TObject; const PropName: String): TObject;
-function GetObjectProp(Instance: TObject; const PropName: String; MinClass: TClass): TObject;
-function GetObjectProp(Instance: TObject; const PropInfo: TTypeMemberProperty):  TObject;
-function GetObjectProp(Instance: TObject; const PropInfo: TTypeMemberProperty; MinClass: TClass):  TObject;
-procedure SetObjectProp(Instance: TObject; const PropName: String; Value: TObject) ;
-procedure SetObjectProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: TObject);
-
-function GetMethodProp(Instance: TObject; PropInfo: TTypeMemberProperty): TMethod;
-function GetMethodProp(Instance: TObject; const PropName: string): TMethod;
-procedure SetMethodProp(Instance: TObject; PropInfo: TTypeMemberProperty;  const Value : TMethod);
-procedure SetMethodProp(Instance: TObject; const PropName: string; const Value: TMethod);
-
-function GetInterfaceProp(Instance: TObject; const PropName: string): IInterface;
-function GetInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty): IInterface;
-procedure SetInterfaceProp(Instance: TObject; const PropName: string; const Value: IInterface);
-procedure SetInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty; const Value: IInterface);
-
-function GetRawInterfaceProp(Instance: TObject; const PropName: string): Pointer;
-function GetRawInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty): Pointer;
-procedure SetRawInterfaceProp(Instance: TObject; const PropName: string; const Value: Pointer);
-procedure SetRawInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty; const Value: Pointer);
+function GetBoolProp(Instance: TObject; const PropName: String): boolean; overload;
+function GetBoolProp(Instance: TObject; const PropInfo: TTypeMemberProperty): boolean; overload;
+procedure SetBoolProp(Instance: TObject; const PropName: String; Value: boolean); overload;
+procedure SetBoolProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: boolean); overload;
+
+function GetStrProp(Instance: TObject; const PropName: String): String; overload;
+function GetStrProp(Instance: TObject; const PropInfo: TTypeMemberProperty): String; overload;
+procedure SetStrProp(Instance: TObject; const PropName: String; Value: String); overload;
+procedure SetStrProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: String); overload;
+
+function GetStringProp(Instance: TObject; const PropName: String): String; deprecated; overload; // use GetStrProp
+function GetStringProp(Instance: TObject; const PropInfo: TTypeMemberProperty): String; deprecated; overload; // use GetStrProp
+procedure SetStringProp(Instance: TObject; const PropName: String; Value: String); deprecated; overload; // use GetStrProp
+procedure SetStringProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: String); deprecated; overload; // use GetStrProp
+
+function  GetFloatProp(Instance: TObject; const PropName: string): Double; overload;
+function  GetFloatProp(Instance: TObject; PropInfo : TTypeMemberProperty) : Double; overload;
+procedure SetFloatProp(Instance: TObject; const PropName: string; Value: Double); overload;
+procedure SetFloatProp(Instance: TObject; PropInfo : TTypeMemberProperty;  Value : Double); overload;
+
+function GetObjectProp(Instance: TObject; const PropName: String): TObject; overload;
+function GetObjectProp(Instance: TObject; const PropName: String; MinClass: TClass): TObject; overload;
+function GetObjectProp(Instance: TObject; const PropInfo: TTypeMemberProperty):  TObject; overload;
+function GetObjectProp(Instance: TObject; const PropInfo: TTypeMemberProperty; MinClass: TClass):  TObject; overload;
+procedure SetObjectProp(Instance: TObject; const PropName: String; Value: TObject); overload;
+procedure SetObjectProp(Instance: TObject; const PropInfo: TTypeMemberProperty; Value: TObject); overload;
+
+function GetMethodProp(Instance: TObject; PropInfo: TTypeMemberProperty): TMethod; overload;
+function GetMethodProp(Instance: TObject; const PropName: string): TMethod; overload;
+procedure SetMethodProp(Instance: TObject; PropInfo: TTypeMemberProperty;  const Value : TMethod); overload;
+procedure SetMethodProp(Instance: TObject; const PropName: string; const Value: TMethod); overload;
+
+function GetInterfaceProp(Instance: TObject; const PropName: string): IInterface; overload;
+function GetInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty): IInterface; overload;
+procedure SetInterfaceProp(Instance: TObject; const PropName: string; const Value: IInterface); overload;
+procedure SetInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty; const Value: IInterface); overload;
+
+function GetRawInterfaceProp(Instance: TObject; const PropName: string): Pointer; overload;
+function GetRawInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty): Pointer; overload;
+procedure SetRawInterfaceProp(Instance: TObject; const PropName: string; const Value: Pointer); overload;
+procedure SetRawInterfaceProp(Instance: TObject; PropInfo: TTypeMemberProperty; const Value: Pointer); overload;
 
 implementation
 
diff --git a/packages/rtl/web.pas b/packages/rtl/web.pas
index b5e224f..3e08bc6 100644
--- a/packages/rtl/web.pas
+++ b/packages/rtl/web.pas
@@ -10,8 +10,6 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
-
-{$mode objfpc}
 {$modeswitch externalclass}
 
 unit Web;
@@ -60,13 +58,13 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
 
   TJSEventTarget = class external name 'EventTarget' (TJSObject)
   public
-    procedure addEventListener(aname : string; aListener : TJSEventHandler);
-    procedure addEventListener(aname : string; aListener : TJSRawEventHandler);
-    procedure addEventListener(aname : string; aListener : JSValue);
+    procedure addEventListener(aname : string; aListener : TJSEventHandler); overload;
+    procedure addEventListener(aname : string; aListener : TJSRawEventHandler); overload;
+    procedure addEventListener(aname : string; aListener : JSValue); overload;
     function dispatchEvent(event : JSValue) : Boolean;
-    procedure removeEventListener(aname : string; aListener : TJSEventHandler);
-    procedure removeEventListener(aname : string; aListener : TJSRawEventHandler);
-    procedure removeEventListener(aname : string; aListener : JSValue);
+    procedure removeEventListener(aname : string; aListener : TJSEventHandler); overload;
+    procedure removeEventListener(aname : string; aListener : TJSRawEventHandler); overload;
+    procedure removeEventListener(aname : string; aListener : JSValue); overload;
   end;
 
   TJSNode = class external name 'Node' (TJSEventTarget)
@@ -135,8 +133,8 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
   Private
     FLength : NativeInt; external name 'length';
   Public
-    procedure forEach(const aCallBack : TJSNodeListCallBack);
-    procedure forEach(const aCallBack : TJSNodeListEvent);
+    procedure forEach(const aCallBack : TJSNodeListCallBack); overload;
+    procedure forEach(const aCallBack : TJSNodeListEvent); overload;
     function item(aIndex : NativeInt) : TJSNode;
     Property length : NativeInt Read FLength;
     Property Nodes [aIndex : NativeInt] : TJSNode Read item; default;
@@ -185,7 +183,7 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
   Private
     FLength : NativeInt; external name 'length';
   public
-    Procedure add(aToken : TJSDOMString); varargs;
+    Procedure add(aToken : TJSDOMString); varargs;  overload;
     Procedure remove(aToken : TJSDOMString); varargs;
     function item(aIndex : NativeInt) : String;
     function contains(aToken : TJSDOMString) : Boolean;
@@ -1003,7 +1001,7 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
     procedure assert(anAssertion : string; Obj1 : JSValue); varargs;
     Procedure clear;  
     procedure count; overload;
-    procedure count(aCounter : String);
+    procedure count(aCounter : String); overload;
     procedure debug(Obj1 : JSValue); varargs of JSValue;
     procedure error(Obj1 : JSValue); varargs of JSValue;
     procedure group; overload;
@@ -1014,7 +1012,7 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
     procedure info(Obj1 : JSValue); varargs of JSValue;
     procedure log(Obj1 : JSValue); varargs of JSValue;
     procedure table(args: array of JSValue); overload;
-    procedure table(args: array of JSValue; Columns : Array of string);
+    procedure table(args: array of JSValue; Columns : Array of string); overload;
     procedure table(args: TJSObject); overload;
     procedure table(args: TJSObject; Columns : Array of string); overload;
     procedure time(aName : string);
@@ -1331,13 +1329,13 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
   Public
     procedure back;
     procedure forward;
-    procedure go(aIndex : NativeInt);
-    procedure go;
-    procedure pushState(aState : jsValue; aTitle : String; AURL : String);
-    procedure pushState(aState : jsValue; aTitle : String);
-    procedure replaceState(aState : jsValue; aTitle : String; AURL : String);
-    procedure replaceState(aState : jsValue; aTitle : String);
-    procedure replaceState(aState : jsValue);
+    procedure go(aIndex : NativeInt); overload;
+    procedure go; overload;
+    procedure pushState(aState : jsValue; aTitle : String; AURL : String); overload;
+    procedure pushState(aState : jsValue; aTitle : String); overload;
+    procedure replaceState(aState : jsValue; aTitle : String; AURL : String); overload;
+    procedure replaceState(aState : jsValue; aTitle : String); overload;
+    procedure replaceState(aState : jsValue); overload;
 {$IFDEF FIREFOX}
     property state : JSValue read FState;
 {$ENDIF}
@@ -1475,11 +1473,11 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
 
   TJSIDBObjectStore = class external name 'IDBObjectStore'  (TJSEventTarget)
   public
-    function add(aValue : JSValue; aKey : String) : TJSIDBRequest;
-    function add(aValue : JSValue) : TJSIDBRequest;
+    function add(aValue : JSValue; aKey : String) : TJSIDBRequest; overload;
+    function add(aValue : JSValue) : TJSIDBRequest; overload;
     function clear : TJSIDBRequest;
-    function delete(aKey : string) : TJSIDBRequest;
-    function delete(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest;
+    function delete(aKey : string) : TJSIDBRequest; overload;
+    function delete(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest; overload;
     function get(aKey : string) : TJSIDBRequest; overload;
     function get(aKeyRange : TJSIDBKeyRange) : TJSIDBRequest; overload;
     function getKey(aKey : string) : TJSIDBRequest; overload;
@@ -1587,8 +1585,8 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
 
   TJSIDBFactory = class external name 'IDBFactory' (TJSEventTarget)
   public
-    function open(aName : string) : TJSIDBOpenDBRequest;
-    function open(aName : string; aVersion : Integer) : TJSIDBOpenDBRequest;
+    function open(aName : string) : TJSIDBOpenDBRequest; overload;
+    function open(aName : string; aVersion : Integer) : TJSIDBOpenDBRequest; overload;
     function deleteDatabase(aName : string) : TJSIDBOpenDBRequest;
     function cmp (a,b : jsValue) : NativeInt;
   end;
@@ -1674,15 +1672,15 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
   TJSWorker = class external name 'Worker' (TJSEventTarget)
   public
     constructor new(aURL : string);
-    procedure postMessage(aValue : JSValue);
-    procedure postMessage(aValue : JSValue; aList : TJSValueDynArray);
+    procedure postMessage(aValue : JSValue); overload;
+    procedure postMessage(aValue : JSValue; aList : TJSValueDynArray); overload;
   end;
 
   TJSMessagePort = class external name 'MessagePort' (TJSEventTarget)
   Public
     procedure close;
-    procedure postMessage(aValue : JSValue);
-    procedure postMessage(aValue : JSValue; aList : TJSValueDynArray);
+    procedure postMessage(aValue : JSValue); overload;
+    procedure postMessage(aValue : JSValue; aList : TJSValueDynArray); overload;
     procedure start;
   end;
 
@@ -1770,8 +1768,8 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
     function requestMediaKeySystemAccess(aKeySystem : String; supportedConfigurations : TJSValueDynArray) : TJSPromise;
     Procedure registerContentHandler(aMimeType,aURI,aTitle : string);
     Procedure registerProtocolHandler(aProtocol,aURI,aTitle : string);
-    Procedure vibrate(aPattern : NativeInt);
-    Procedure vibrate(aPattern : Array of NativeInt);
+    Procedure vibrate(aPattern : NativeInt); overload;
+    Procedure vibrate(aPattern : Array of NativeInt); overload;
 {$IFDEF FIREFOX}
     property buildID : String read FBuildID;
     property oscpu : string read FOSCPU;
@@ -1880,8 +1878,8 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
     protocol : string;
     search : string;
     username : string;
-    constructor new(aURL : String);
-    constructor new(aURL,aBase : String);
+    constructor new(aURL : String); overload;
+    constructor new(aURL,aBase : String); overload;
     class function createObjectURL(const v: JSValue): string;
     class function revokeObjectURL(const S : String): string;
     function toJSON : String;
@@ -1926,8 +1924,8 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
     flocked: Boolean; external name 'locked';
   public
     property locked: Boolean read flocked;
-    constructor new(underlyingSource: TJSObject);
-    constructor new(underlyingSource, queueingStrategy: TJSObject);
+    constructor new(underlyingSource: TJSObject); overload;
+    constructor new(underlyingSource, queueingStrategy: TJSObject); overload;
     function cancel(reason: TJSDOMString): TJSPromise;
     function getReader(): TJSObject; overload;
     function getReader(mode: TJSObject): TJSObject; overload;
@@ -2088,8 +2086,8 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
     touchend : TJSTouchEventHandler;
     touchmove : TJSTouchEventHandler;
     touchcancel : TJSTouchEventHandler;
-    procedure addEventListener(aname : string; aListener : TJSEventHandler);
-    procedure addEventListener(aname : string; aListener : JSValue);
+    procedure addEventListener(aname : string; aListener : TJSEventHandler); overload;
+    procedure addEventListener(aname : string; aListener : JSValue); overload;
     Procedure alert(Const Msg : String);
     Function atob(Const aValue : string) : string;
     procedure blur;
@@ -2110,28 +2108,28 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
     function matchMedia(aQuery : String) : TJSMediaQueryList;
     procedure moveBy(x,y : NativeInt);
     procedure moveTo(x,y : NativeInt);
-    function open : TJSWindow;
+    function open : TJSWindow; overload;
     function open(Const aURL : String) : TJSWindow; overload;
     function open(Const aURL,aTarget : String) : TJSWindow; overload;
     function open(Const aURL,aTarget : String; AOptions : TJSObject) : TJSWindow; overload;
-    procedure postMessage(aMessage : JSValue);
-    procedure postMessage(aMessage : JSValue; aOptions : TJSPostMessageOptions);
-    procedure postMessage(aMessage : JSValue; aTransfer : TJSValueDynArray);
-    procedure postMessage(aMessage : JSValue; aTarget : string);
-    procedure postMessage(aMessage : JSValue; aTarget : string; aTransfer : TJSValueDynArray);
+    procedure postMessage(aMessage : JSValue); overload;
+    procedure postMessage(aMessage : JSValue; aOptions : TJSPostMessageOptions); overload;
+    procedure postMessage(aMessage : JSValue; aTransfer : TJSValueDynArray); overload;
+    procedure postMessage(aMessage : JSValue; aTarget : string); overload;
+    procedure postMessage(aMessage : JSValue; aTarget : string; aTransfer : TJSValueDynArray); overload;
     procedure print;
     function prompt(const aMessage : String) : String; overload;
     function prompt(const aMessage,aDefault : String) : String; overload;
-    procedure removeEventListener(aname : string; aListener : TJSEventHandler);
-    procedure removeEventListener(aname : string; aListener : JSValue);
+    procedure removeEventListener(aname : string; aListener : TJSEventHandler); overload;
+    procedure removeEventListener(aname : string; aListener : JSValue); overload;
     function requestAnimationFrame(aCallback: TFrameRequestCallback): Integer;
     procedure resizeBy(aWidth,aHeight : NativeInt);
     procedure resizeTo(aWidth,aHeight : NativeInt);
     procedure scrollBy(x,y : NativeInt);
     procedure scrollTo(x,y : NativeInt);
     Function setInterval(ahandler : TJSTimerCallBack; aInterval : NativeUInt) : NativeInt; varargs;
-    Function setTimeout(ahandler : TJSTimerCallBack; aTimeout : NativeUInt) : NativeInt; varargs;
-    Function setTimeout(ahandler : TJSTimerCallBack) : NativeInt;
+    Function setTimeout(ahandler : TJSTimerCallBack; aTimeout : NativeUInt) : NativeInt; varargs; overload;
+    Function setTimeout(ahandler : TJSTimerCallBack) : NativeInt; overload;
     procedure stop;
     { public properties }
     property console : TJSConsole Read FConsole;
@@ -2894,10 +2892,10 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
   Public
     height : integer;
     width : integer;
-    Function getContext(contextType : string) : TJSObject;
-    Function getContext(contextType : string; contextAttributes : TJSObject) : TJSObject;
-    Function getContextAs2DContext(contextType : string; contextAttributes : TJSObject) : TJSCanvasRenderingContext2D; external name 'getContext';
-    Function getContextAs2DContext(contextType : string) : TJSCanvasRenderingContext2D; external name 'getContext';
+    Function getContext(contextType : string) : TJSObject; overload;
+    Function getContext(contextType : string; contextAttributes : TJSObject) : TJSObject; overload;
+    Function getContextAs2DContext(contextType : string; contextAttributes : TJSObject) : TJSCanvasRenderingContext2D; external name 'getContext'; overload;
+    Function getContextAs2DContext(contextType : string) : TJSCanvasRenderingContext2D; external name 'getContext'; overload;
     Procedure toBlob (aCallBack : THTMLCanvasToBlobCallback; aMimeType : String); overload;
     Procedure toBlob (aCallBack : THTMLCanvasToBlobCallback; aMimeType : String; aQuality : Double); overload;
     Function toDataURL : String; overload;
@@ -2954,8 +2952,8 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
     procedure readAsArrayBuffer(Blob: TJSBlob);
     procedure readAsBinaryString(Blob: TJSBlob);
     procedure readAsDataURL(Blob: TJSBlob);
-    procedure readAsText(Blob: TJSBlob; encoding : string);
-    procedure readAsText(Blob: TJSBlob);
+    procedure readAsText(Blob: TJSBlob; encoding : string); overload;
+    procedure readAsText(Blob: TJSBlob); overload;
     property Error : TJSDOMException read FError;
     Property readyState : Integer Read fReadyState;
     property Result : JSValue Read FResult;
@@ -3577,10 +3575,10 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
     Procedure close; overload;
     Procedure close(code : Cardinal); overload;
     Procedure close(code : Cardinal; reason : String); overload;
-    Procedure send(data : String);
-    Procedure send(data : TJSBlob);
-    Procedure send(data : TJSArrayBuffer);
-    Procedure send(data : TJSTypedArray);
+    Procedure send(data : String); overload;
+    Procedure send(data : TJSBlob); overload;
+    Procedure send(data : TJSArrayBuffer); overload;
+    Procedure send(data : TJSTypedArray); overload;
     Property url : String Read Furl;
     Property readyState : Cardinal Read FreadyState;
     Property bufferedAmount : NativeInt Read FbufferedAmount;
@@ -3705,17 +3703,17 @@ TEventListenerEvent = class external name 'EventListener_Event' (TJSObject)
   TJSFormDataEntryValueArray = Array of TJSFormDataEntryValue;
 
   TJSFormData = Class external name 'FormData' (TJSObject)
-    constructor new;
-    constructor new(aForm : TJSHTMLElement);
-    Procedure append(const aName,aValue : String);
-    Procedure append(const aName : String; aBlob : TJSBlob);
+    constructor new; overload;
+    constructor new(aForm : TJSHTMLElement); overload;
+    Procedure append(const aName,aValue : String); overload;
+    Procedure append(const aName : String; aBlob : TJSBlob); overload;
     Procedure delete(const aName : String);
     Function entries : TJSFormDataEntryValueArray;
     Function get(const aName : String): TJSFormDataEntryValue;
     function has(const aName : String): Boolean;
     Function keys : TStringDynArray; reintroduce;
-    Procedure set_(const aName,aValue : String); external name 'set';
-    Procedure set_(const aName : String; aBlob : TJSBlob); external name 'set';
+    Procedure set_(const aName,aValue : String); external name 'set'; overload;
+    Procedure set_(const aName : String; aBlob : TJSBlob); external name 'set'; overload;
     Function getAll(const aName : String) : TJSFormDataEntryValueArray;
     Function values : TJSValueDynArray; reintroduce;
     Property Entry[aIndex : String] : TJSFormDataEntryValue read Get;
diff --git a/packages/rtl/webaudio.pas b/packages/rtl/webaudio.pas
index 941c953..f2e4692 100644
--- a/packages/rtl/webaudio.pas
+++ b/packages/rtl/webaudio.pas
@@ -1,6 +1,5 @@
 Unit webaudio;
 
-{$MODE ObjFPC}
 {$H+}
 {$modeswitch externalclass}
 
@@ -553,13 +552,13 @@ Type
     function connect(destinationNode : TJSAudioNode; output : NativeInt): TJSAudioNode; overload;
     Procedure connect(destinationParam : TJSAudioParam; output : NativeInt); overload;
     Procedure connect(destinationParam : TJSAudioParam); overload;
-    Procedure disconnect;
-    Procedure disconnect(output : NativeInt);
-    Procedure disconnect(destinationNode : TJSAudioNode);
-    Procedure disconnect(destinationNode : TJSAudioNode; output : NativeInt);
-    Procedure disconnect(destinationNode : TJSAudioNode; output : NativeInt; input : NativeInt);
-    Procedure disconnect(destinationParam : TJSAudioParam);
-    Procedure disconnect(destinationParam : TJSAudioParam; output : NativeInt);
+    Procedure disconnect; overload;
+    Procedure disconnect(output : NativeInt); overload;
+    Procedure disconnect(destinationNode : TJSAudioNode); overload;
+    Procedure disconnect(destinationNode : TJSAudioNode; output : NativeInt); overload;
+    Procedure disconnect(destinationNode : TJSAudioNode; output : NativeInt; input : NativeInt); overload;
+    Procedure disconnect(destinationParam : TJSAudioParam); overload;
+    Procedure disconnect(destinationParam : TJSAudioParam; output : NativeInt); overload;
     Property context : TJSBaseAudioContext Read Fcontext; 
     Property numberOfInputs : NativeInt Read FnumberOfInputs; 
     Property numberOfOutputs : NativeInt Read FnumberOfOutputs; 
diff --git a/packages/rtl/webbluetooth.pas b/packages/rtl/webbluetooth.pas
index bda3166..3c52949 100644
--- a/packages/rtl/webbluetooth.pas
+++ b/packages/rtl/webbluetooth.pas
@@ -1,6 +1,5 @@
 Unit webbluetooth;
 
-{$MODE ObjFPC}
 {$H+}
 {$modeswitch externalclass}
 
diff --git a/packages/rtl/webgl.pas b/packages/rtl/webgl.pas
index 8d8675c..7d7b46c 100644
--- a/packages/rtl/webgl.pas
+++ b/packages/rtl/webgl.pas
@@ -1,6 +1,5 @@
 Unit webgl;
 
-{$MODE ObjFPC}
 {$H+}
 {$modeswitch externalclass}
 
@@ -630,12 +629,12 @@ Type
     Procedure stencilMaskSeparate(face : GLenum; mask : GLuint);
     Procedure stencilOp(fail : GLenum; zfail : GLenum; zpass : GLenum);
     Procedure stencilOpSeparate(face : GLenum; fail : GLenum; zfail : GLenum; zpass : GLenum);
-    Procedure texImage2D(target : GLenum; level : GLint; internalformat : GLint; width : GLsizei; height : GLsizei; border : GLint; format : GLenum; type_ : GLenum; pixels : TJSTypedArray);
-    Procedure texImage2D(target : GLenum; level : GLint; internalformat : GLint; format : GLenum; type_ : GLenum; source : TexImageSource);
+    Procedure texImage2D(target : GLenum; level : GLint; internalformat : GLint; width : GLsizei; height : GLsizei; border : GLint; format : GLenum; type_ : GLenum; pixels : TJSTypedArray); overload;
+    Procedure texImage2D(target : GLenum; level : GLint; internalformat : GLint; format : GLenum; type_ : GLenum; source : TexImageSource); overload;
     Procedure texParameterf(target : GLenum; pname : GLenum; param : GLfloat);
     Procedure texParameteri(target : GLenum; pname : GLenum; param : GLint);
-    Procedure texSubImage2D(target : GLenum; level : GLint; xoffset : GLint; yoffset : GLint; width : GLsizei; height : GLsizei; format : GLenum; type_ : GLenum; pixels : TJSTypedArray);
-    Procedure texSubImage2D(target : GLenum; level : GLint; xoffset : GLint; yoffset : GLint; format : GLenum; type_ : GLenum; source : TexImageSource);
+    Procedure texSubImage2D(target : GLenum; level : GLint; xoffset : GLint; yoffset : GLint; width : GLsizei; height : GLsizei; format : GLenum; type_ : GLenum; pixels : TJSTypedArray); overload;
+    Procedure texSubImage2D(target : GLenum; level : GLint; xoffset : GLint; yoffset : GLint; format : GLenum; type_ : GLenum; source : TexImageSource); overload;
     Procedure uniform1f(location : TJSWebGLUniformLocation; x : GLfloat);
     Procedure uniform2f(location : TJSWebGLUniformLocation; x : GLfloat; y : GLfloat);
     Procedure uniform3f(location : TJSWebGLUniformLocation; x : GLfloat; y : GLfloat; z : GLfloat);
diff --git a/packages/rtl/webrouter.pp b/packages/rtl/webrouter.pp
index 92c2eae..f0c250d 100644
--- a/packages/rtl/webrouter.pp
+++ b/packages/rtl/webrouter.pp
@@ -17,7 +17,6 @@
   The MatchPattern routine was taken from Brook Framework's router unit, by Silvio Clecio.
 }
 
-{$mode objfpc}
 // Define this to output some debugging output
 { $DEFINE DEBUGROUTER }
 unit webrouter;
@@ -68,8 +67,8 @@ Type
     function doGo(N: integer): TTransitionResult; virtual; abstract;
     procedure ensureURL (push : boolean = false); virtual; abstract;
   Public
-    Constructor Create(aRouter : TRouter); reintroduce;
-    Constructor Create(aRouter : TRouter; aBase : String); virtual;
+    Constructor Create(aRouter : TRouter); reintroduce; overload;
+    Constructor Create(aRouter : TRouter; aBase : String); virtual; overload;
     Class Function NormalizeHash(aHash : String) : string;
     Procedure UpdateRoute (aRoute : TRoute);
     Destructor Destroy; override;
@@ -225,18 +224,18 @@ Type
     Function CreateRouteList : TRouteList; virtual;
     Procedure CheckDuplicate(APattern : String; isDefault : Boolean);
     // Actually route request. Override this for customized behaviour.
-    function DoRouteRequest(ARoute : TRoute; Const AURL : String; AParams : TStrings) : TRoute; virtual;
-    function DoRouteRequest(AURL : String; DoPush : Boolean = False) : TRoute;
+    function DoRouteRequest(ARoute : TRoute; Const AURL : String; AParams : TStrings) : TRoute; virtual; overload;
+    function DoRouteRequest(AURL : String; DoPush : Boolean = False) : TRoute; overload;
   Public
     Constructor Create(AOwner: TComponent); override;
     Destructor Destroy; override;
     Procedure InitHistory(aKind : THistoryKind; aBase : String = '');
     // Delete given route by index.
-    Procedure DeleteRoute(AIndex : Integer);
+    Procedure DeleteRoute(AIndex : Integer); overload;
     // Delete given route by index.
     Procedure DeleteRouteByID(AID : Integer);
     // Delete given route by index. The route object will be freed.
-    Procedure DeleteRoute(ARoute : TRoute);
+    Procedure DeleteRoute(ARoute : TRoute); overload;
     // Sanitize route path. Strips of query parameters and makes sure it ends in /
     class function SanitizeRoute(const Path: String): String;
     // Global instance.
diff --git a/packages/rtl/websvg.pas b/packages/rtl/websvg.pas
index 48c5fc1..de2a000 100644
--- a/packages/rtl/websvg.pas
+++ b/packages/rtl/websvg.pas
@@ -1,6 +1,5 @@
 unit websvg;
 
-{$MODE ObjFPC}
 {$H+}
 {$MODESWITCH externalclass}
 
@@ -1750,4 +1749,4 @@ type
 
 implementation
 
-end.
\ No newline at end of file
+end.
-- 
2.24.1.windows.2

Michael Van Canneyt

2020-07-21 00:18

administrator   ~0124196

Sorry, but these units are compiled in ObjFPC mode for a reason. ObjFPC mode is more strict.
So I will not apply this patch.

Before doing such extensive changes, maybe first ask opinions on the mailing list.

Issue History

Date Modified Username Field Change
2020-07-20 21:34 Luiz Henrique New Issue
2020-07-20 21:34 Luiz Henrique File Added: 0001-Delphi-compatibility-mode.patch
2020-07-21 00:18 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-07-21 00:18 Michael Van Canneyt Status new => resolved
2020-07-21 00:18 Michael Van Canneyt Resolution open => won't fix
2020-07-21 00:18 Michael Van Canneyt Note Added: 0124196