#51 2014-03-23 00:55:30

warleyalex
Member
From: Sete Lagoas-MG, Brasil
Registered: 2013-01-20
Posts: 250

Re: Smart Mobile Studio mORMot class server

You should set "Optimization" to OFF and "No RTTI information" to OFF, to work as expected. Unfortunately, the new release SmartMS version 2.0.1 (build 741) on march 18th, 2014 - didn't fix an issue related to SHIFT operation (bitwise) used to perform mORMot authentication at CRC32 and SHA-256 modules. When optimization is turned off,  the javascript generated is approximately 1.08% bigger.

Last edited by warleyalex (2014-03-23 01:02:06)

Offline

#52 2014-03-23 21:33:00

warleyalex
Member
From: Sete Lagoas-MG, Brasil
Registered: 2013-01-20
Posts: 250

Re: Smart Mobile Studio mORMot class server

I have found a workaround to fix 'Optimization ON' issue.
In computation.pas, just create shr0 function

function shr0(a:variant) : variant;
begin
 asm
  return @a >>> 0;
 end;
end;

function crc32(aCRC32: integer; const data: string): integer;
  .... 
  result := shr0(not result);
end;


procedure TSHA256.Compress;
  ...
  Hash.A := shr0(Hash.A+H.A);
  Hash.B := shr0(Hash.B+H.B);
  Hash.C := shr0(Hash.C+H.C);
  Hash.D := shr0(Hash.D+H.D);
  Hash.E := shr0(Hash.E+H.E);
  Hash.F := shr0(Hash.F+H.F);
  Hash.G := shr0(Hash.G+H.G);
  Hash.H := shr0(Hash.H+H.H);
end;

Now you can compile SMS with Optimization config set to ON!

Offline

#53 2014-03-24 17:17:24

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: Smart Mobile Studio mORMot class server

Indeed.
This is a good workaround, even if the bug itself is identified as "fixed" within SMS.

I'll investigate further and awake the bug if in order to be really fixed.

Thanks for the feedback!

Offline

#54 2014-04-08 20:07:00

dfobare
Member
Registered: 2014-04-01
Posts: 5

Re: Smart Mobile Studio mORMot class server

Where do I get the latest version of this class? The files on the first page of this post are a year old.

Offline

#55 2014-04-19 06:47:29

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: Smart Mobile Studio mORMot class server

There is no "official" port of this code for SMS 2 yet.
Stay tuned: we will soon post some updated code.

Offline

#56 2014-07-30 08:51:49

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: Smart Mobile Studio mORMot class server

We are currently finalizing official cross-platform client generation.
It allows wrappers generation for ORM and Service client access for simple Smart Mobile Studio clients.
See http://synopse.info/fossil/tktview?name=d7e5521da5
It expects SMS 2.1 at least!

The SMS IDE and compiler is getting better and better at each release.
I do not have issue any more spending hours within the SMS IDE.
And use Chrome as debugger (including source code map to debug directly within the object pascal source code, not the javascript!).
smile

Offline

#57 2014-07-30 18:22:04

warleyalex
Member
From: Sete Lagoas-MG, Brasil
Registered: 2013-01-20
Posts: 250

Re: Smart Mobile Studio mORMot class server

SMSC 2.1 (smart command line compiler) is free for the comunity. Now you can compile .pas to .js. In my tests, you use this JS generated code in other framework. This is awesome!

Offline

#58 2014-07-30 18:30:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: Smart Mobile Studio mORMot class server

AFAIK the Smart RTL is not included...
Our units rely on this set of units...

We should be able to use a sub-set of the Smart RTL to work with our wrappers.

I'm currently working on interface-based services clients generation.

Offline

Board footer

Powered by FluxBB