sys.sa


Generated by gen_html_sa_files from ICSI. Contact gomes@icsi.berkeley.edu for details
 
---------------------------> Sather 1.1 source file <--------------------------
-- Copyright (C) International Computer Science Institute, 1994.  COPYRIGHT  --
-- NOTICE: This code is provided "AS IS" WITHOUT ANY WARRANTY and is subject --
-- to the terms of the SATHER LIBRARY GENERAL PUBLIC LICENSE contained in    --
-- the file "Doc/License" of the Sather distribution.  The license is also   --
-- available from ICSI, 1947 Center St., Suite 600, Berkeley CA 94704, USA.  --
--------> Please email comments to sather-bugs@icsi.berkeley.edu. <----------

-- sys.sa: System related information.


class SYS

class SYS is -- System related information. const char_size:=8; -- Number of bits in a CHAR. destroy(o:$OB) is builtin SYS_DESTROY; end; is_eq(ob1,ob2:$OB): BOOL is return ob_eq(ob1,ob2); end; is_lt(ob1,ob2: $OB): BOOL is return id(ob1) < id(ob2); end; hash(ob1: $OB): INT is return id(ob1).hash; end; id(o:$OB):INT is builtin SYS_ID; end; tp(o:$OB):INT is builtin SYS_TP; end; str_for_tp(i:INT):STR is builtin SYS_STR_FOR_TP; end; ob_eq(o1,o2:$OB):BOOL is builtin SYS_OB_EQ; end; ext_ob_for(o:$OB):EXT_OB is builtin SYS_EXT_OB_FOR; end; -- Generate some inline C. The argument has to be a STR literal. The -- '#' character followed by an identifier substitutes the C variable -- corresponding to the Sather argument or local. When there is more -- than one variable with the given name, one will be chosen randomly. -- This routine is not intended for general use, and is most -- emphatically NOT in the Sather language spec. You have been -- warned! inlined_C(s:STR) is raise "SYS::inlined_C undefined"; end; -- These indicate if any of the IEEE exceptions transpired. -- They may be set/cleared by the programmer. These are broken. ieee_invalid_operation(v:BOOL) is raise "undefined IEEE op"; end; ieee_division_by_zero(v:BOOL) is raise "undefined IEEE op"; end; ieee_overflow(v:BOOL) is raise "undefined IEEE op"; end; ieee_underflow(v:BOOL) is raise "undefined IEEE op"; end; ieee_inexact(v:BOOL) is raise "undefined IEEE op"; end; ieee_invalid_operation:BOOL is raise "undefined IEEE op"; end; ieee_division_by_zero:BOOL is raise "undefined IEEE op"; end; ieee_overflow:BOOL is raise "undefined IEEE op"; end; ieee_underflow:BOOL is raise "undefined IEEE op"; end; ieee_inexact:BOOL is raise "undefined IEEE op"; end; -- If an IEEE exception occurs while the corresponding ieee_trap_on -- BOOL is set, then an exception will be generated. These are broken. ieee_trap_on_invalid_operation(v:BOOL) is raise "undefined IEEE op"; end; ieee_trap_on_division_by_zero(v:BOOL) is raise "undefined IEEE op"; end; ieee_trap_on_overflow(v:BOOL) is raise "undefined IEEE op"; end; ieee_trap_on_underflow(v:BOOL) is raise "undefined IEEE op"; end; ieee_trap_on_inexact(v:BOOL) is raise "undefined IEEE op"; end; ieee_trap_on_invalid_operation:BOOL is raise "undefined IEEE op"; end; ieee_trap_on_division_by_zero:BOOL is raise "undefined IEEE op"; end; ieee_trap_on_trap_on_overflow:BOOL is raise "undefined IEEE op"; end; ieee_trap_on_underflow:BOOL is raise "undefined IEEE op"; end; ieee_trap_on_inexact:BOOL is raise "undefined IEEE op"; end; -- These are used by psather. defer is builtin SYS_DEFER; end; import is builtin SYS_IMPORT; end; export is builtin SYS_EXPORT; end; builtin_clusters!:INT is -- calls to clusters! will be translated to this. loop yield clusters.times! end; end; psather_statistics(b:BOOL) is builtin SYS_PSATHER_STATISTICS; end; psather_trace(b:BOOL) is builtin SYS_PSATHER_TRACE; end; end; -- class SYS