You are not logged in.
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
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
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
Where do I get the latest version of this class? The files on the first page of this post are a year old.
Offline
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!).
Offline
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
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