Skip to content
Permalink
Browse files

deep refactoring of class properties RTTI access

- to be 100% cross-compiler without any use of the TypInfo unit
  • Loading branch information...
Arnaud Bouchez
Arnaud Bouchez committed Sep 20, 2019
1 parent 01a85de commit 4d8d5685504f75b36ae4994577ac351213755b2d
Showing with 625 additions and 919 deletions.
  1. +7 −5 CrossPlatform/SynCrossPlatformJSON.pas
  2. +1 −1 SQLite3/DDD/dom/dddDomAuthInterfaces.pas
  3. +1 −1 SQLite3/DDD/dom/dddDomUserCQRS.pas
  4. +1 −1 SQLite3/DDD/dom/dddDomUserInterfaces.pas
  5. +1 −1 SQLite3/DDD/dom/dddDomUserTypes.pas
  6. +1 −1 SQLite3/DDD/infra/dddInfraApps.pas
  7. +1 −1 SQLite3/DDD/infra/dddInfraAuthRest.pas
  8. +1 −1 SQLite3/DDD/infra/dddInfraEmail.pas
  9. +1 −1 SQLite3/DDD/infra/dddInfraEmailer.pas
  10. +1 −1 SQLite3/DDD/infra/dddInfraRepoUser.pas
  11. +1 −1 SQLite3/DDD/tools/dddToolsAdminMain.pas
  12. +1 −1 SQLite3/Samples/08 - TaskDialog/TaskDialogTest.dpr
  13. +1 −1 SQLite3/Samples/12 - SynDB Explorer/SynDBExplorerFrame.pas
  14. +1 −1 SQLite3/Samples/12 - SynDB Explorer/SynDBExplorerMain.pas
  15. +1 −1 SQLite3/Samples/23 - JavaScript Tests/SynSMSelfTest.pas
  16. +1 −1 SQLite3/Samples/23 - JavaScript Tests/TestMustacheUnit.pas
  17. +1 −1 SQLite3/Samples/24 - MongoDB/MongoDBTestCases.pas
  18. +1 −1 SQLite3/Samples/24 - MongoDB/MongoDBTests.dpr
  19. +1 −1 SQLite3/Samples/37 - FishShop Service/ServFishShopMain.pas
  20. +1 −1 SQLite3/Samples/37 - FishShop Service/ServFishShopTests.pas
  21. +1 −1 SQLite3/Samples/37 - FishShop Service/ServFishShopTypes.pas
  22. +1 −1 SQLite3/Samples/MainDemo/FileClient.pas
  23. +1 −1 SQLite3/Samples/MainDemo/FileServer.pas
  24. +1 −1 SQLite3/Samples/MainDemo/FileTables.pas
  25. +1 −1 SQLite3/Samples/MainDemo/SynFile.dpr
  26. +1 −1 SQLite3/Samples/ThirdPartyDemos/EMartin/SynJSONTreeview/SynJSONTreeView.pas
  27. +1 −1 SQLite3/Samples/ThirdPartyDemos/EMartin/TSynRestDataset/SynRestMidasVCL.pas
  28. +1 −1 SQLite3/Samples/ThirdPartyDemos/EMartin/TSynRestDataset/SynRestVCL.pas
  29. +1 −1 SQLite3/Samples/ThirdPartyDemos/Migajek/synopse-sqlite-demo/Project1.dpr
  30. +1 −1 SQLite3/TestSQL3.dpr
  31. +552 −842 SQLite3/mORMot.pas
  32. +1 −1 SQLite3/mORMotBigTable.pas
  33. +1 −1 SQLite3/mORMotDB.pas
  34. +1 −1 SQLite3/mORMotDDD.pas
  35. +1 −1 SQLite3/mORMotHttpClient.pas
  36. +1 −1 SQLite3/mORMotMVC.pas
  37. +1 −1 SQLite3/mORMotMidasVCL.pas
  38. +1 −1 SQLite3/mORMotMongoDB.pas
  39. +1 −1 SQLite3/mORMotReport.pas
  40. +1 −1 SQLite3/mORMotSelfTests.pas
  41. +2 −2 SQLite3/mORMotUILogin.pas
  42. +2 −2 SQLite3/mORMotUIOptions.pas
  43. +1 −1 SQLite3/mORMotVCL.pas
  44. +1 −1 SQLite3/mORMotWrappers.pas
  45. +2 −2 SQLite3/mORMoti18n.pas
  46. +1 −1 SyNode/SpiderMonkey.pas
  47. +1 −1 SyNode/SyNode.pas
  48. +4 −4 SyNode/SyNodeNewProto.pas
  49. +9 −15 SyNode/SyNodeSimpleProto.pas
  50. +1 −1 SynDBDataset/SynDBBDE.pas
  51. +1 −1 SynDBDataset/SynDBFireDAC.pas
  52. +1 −1 SynDBDataset/SynDBNexusDB.pas
  53. +1 −1 SynDBDataset/SynDBUniDAC.pas
  54. +1 −1 SynopseCommit.inc
@@ -891,7 +891,7 @@ procedure DoubleQuoteStr(var text: string);
TJSONParserKind = (
kNone, kNull, kFalse, kTrue, kString, kInteger, kFloat, kObject, kArray);

/// used to parse any JSON content
/// SAX parser for any JSON content
{$ifdef USEOBJECTINSTEADOFRECORD}
TJSONParser = object
{$else}
@@ -911,7 +911,7 @@ TJSONParser = record
function GetNextAlphaPropName(out fieldName: string): boolean;
function ParseJSONObject(var Data: TJSONVariantData): boolean;
function ParseJSONArray(var Data: TJSONVariantData): boolean;
procedure GetNextStringUnEscape(var str: string);
procedure AppendNextStringUnEscape(var str: string);
end;

procedure TJSONParser.Init(const aJSON: string; aIndex: integer);
@@ -959,7 +959,7 @@ function TJSONParser.CheckNextNonWhiteChar(aChar: char): boolean;
result := false;
end;

procedure TJSONParser.GetNextStringUnEscape(var str: string);
procedure TJSONParser.AppendNextStringUnEscape(var str: string);
var c: char;
u: string;
unicode,err: integer;
@@ -1010,7 +1010,7 @@ function TJSONParser.GetNextString(out str: string): boolean;
'\': begin // need unescaping
str := copy(JSON,Index,i-Index);
Index := i;
GetNextStringUnEscape(str);
AppendNextStringUnEscape(str);
result := true;
exit;
end;
@@ -1316,13 +1316,15 @@ function IsDateTime(PropInfo: TRTTIPropInfo): boolean;
result := PropInfo^.PropType{$ifndef FPC}^{$endif}=TypeInfo(TDateTime);
end;

{$ifndef FPC}
type
// used to map a TPropInfo.GetProc/SetProc and retrieve its kind
// used to map a TPropInfo.GetProc/SetProc and retrieve its kind on Delphi
PropWrap = packed record
FillBytes: array [0..SizeOf(Pointer)-2] of byte;
/// = $ff for a field address, or =$fe for a virtual method
Kind: byte;
end;
{$endif FPC}

function IsBlob(PropInfo: TRTTIPropInfo): boolean;
{$ifdef HASINLINE}inline;{$endif}
@@ -50,7 +50,7 @@
}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -50,7 +50,7 @@
}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -50,7 +50,7 @@
}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -50,7 +50,7 @@
}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -54,7 +54,7 @@
}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -53,7 +53,7 @@
}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -50,7 +50,7 @@
}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -50,7 +50,7 @@
}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -50,7 +50,7 @@
}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -1,6 +1,6 @@
unit dddToolsAdminMain;

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -1,6 +1,6 @@
program TaskDialogTest;

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64
{$I Synopse.inc} // define HASINLINE CPU32 CPU64

uses
{$ifdef FPC}
@@ -1,6 +1,6 @@
unit SynDBExplorerFrame;

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -1,6 +1,6 @@
unit SynDBExplorerMain;

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -51,7 +51,7 @@

interface

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64
{$I Synopse.inc} // define HASINLINE CPU32 CPU64
{$I SynSM.inc} // define SM_DEBUG JS_THREADSAFE CONSIDER_TIME_IN_Z

/// this is the main entry point of the tests
@@ -2,7 +2,7 @@

interface

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
@@ -1,6 +1,6 @@
unit MongoDBTestCases;

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -3,7 +3,7 @@ program MongoDBTests;

{$APPTYPE CONSOLE}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

uses
{$I SynDprUses.inc}
@@ -1,6 +1,6 @@
unit ServFishShopMain;

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -1,6 +1,6 @@
unit ServFishShopTests;

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -1,7 +1,7 @@
// type definitions shared by the Clients and Servers
unit ServFishShopTypes;

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -3,7 +3,7 @@

interface

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

uses
Windows,
@@ -3,7 +3,7 @@

interface

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

uses
SysUtils,
@@ -3,7 +3,7 @@

interface

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

uses
SysUtils,
@@ -1,6 +1,6 @@
program SynFile;

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

// first line of uses clause must be {$I SynDprUses.inc}
uses
@@ -54,7 +54,7 @@
- Developed with Delphi 7, not tested with other Delphi versions
}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -58,7 +58,7 @@
}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -58,7 +58,7 @@
}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

interface

@@ -4,7 +4,7 @@

program Project1;

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 OWNNORMTOUPPER

// first line of uses clause must be {$I SynDprUses.inc}
uses
@@ -85,7 +85,7 @@ program TestSQL3;
{$endif}
{$endif}

{$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 USELIBCURL
{$I Synopse.inc} // define HASINLINE CPU32 CPU64 USELIBCURL

{.$define ForceFastMM4}
// for debug/tests purposes

0 comments on commit 4d8d568

Please sign in to comment.
You can’t perform that action at this time.