Compiling exception-free ATS code

39 views
Skip to first unread message

gmhwxi

unread,
Dec 26, 2013, 3:01:03 AM12/26/13
to ats-lan...@googlegroups.com

If your ATS code does not make use of exceptions, then you can add the following flag
when compiling the code:

-D_ATS_EXCEPTION_NONE

This will make the generated object code even more compact.

Let hello.dats be a file containing the following line:

implement main0 () = print "Hello, world!\n"

patscc -o hello1 hello.dats
size hello1
   text    data     bss     dec     hex filename
   3434     668      40    4142    102e hello1

patscc -D_ATS_EXCEPTION_NONE -o hello2 hello.dats
size hello2
   text    data     bss     dec     hex filename
   1787     512      32    2331     91b hello2




Reply all
Reply to author
Forward
0 new messages