Tamarin:Porting

From MozillaWiki
Revision as of 17:31, 9 July 2008 by Borcic (talk | contribs) (New page: = Goals = A goal of Tamarin is to allow it to run on any platform, to this end we wish to create a standardized porting layer that is: * lightweight * simple = Details = An abstraction la...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Goals

A goal of Tamarin is to allow it to run on any platform, to this end we wish to create a standardized porting layer that is:

  • lightweight
  • simple

Details

An abstraction layer can solve the portability issue, but at the cost of speed, stack and code size. In order to avoid this overhead, we usually add platform specific ifdefs, e.g.

 #if defined(WIN32)
  #if defined(UNDER_CE)
    WindowsCEAPIFunction();
  #else
    WindowsAPIFunction();
 #elsif defined(MAC)
   MacOSAPIFunction();
 #endif