home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / dev / ppcsmalleiffel / lib_se / call_infix_le.e < prev    next >
Encoding:
Text File  |  1998-01-16  |  2.5 KB  |  101 lines

  1. --          This file is part of SmallEiffel The GNU Eiffel Compiler.
  2. --          Copyright (C) 1994-98 LORIA - UHP - CRIN - INRIA - FRANCE
  3. --            Dominique COLNET and Suzanne COLLIN - colnet@loria.fr 
  4. --                       http://www.loria.fr/SmallEiffel
  5. -- SmallEiffel is  free  software;  you can  redistribute it and/or modify it 
  6. -- under the terms of the GNU General Public License as published by the Free
  7. -- Software  Foundation;  either  version  2, or (at your option)  any  later 
  8. -- version. SmallEiffel is distributed in the hope that it will be useful,but
  9. -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  10. -- or  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU General Public License 
  11. -- for  more  details.  You  should  have  received a copy of the GNU General 
  12. -- Public  License  along  with  SmallEiffel;  see the file COPYING.  If not,
  13. -- write to the  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  14. -- Boston, MA 02111-1307, USA.
  15. --
  16. class CALL_INFIX_LE
  17.    --   
  18.    --   Infix operator : "<=".
  19.    --      
  20.  
  21. inherit 
  22.    CALL_INFIX
  23.       redefine compile_to_c
  24.       end;
  25.    
  26. creation make
  27.    
  28. feature 
  29.    
  30.    precedence: INTEGER is 6;
  31.    
  32.    operator: STRING is
  33.       do
  34.      Result := us_le;
  35.       end;
  36.    
  37.    isa_dca_inline_argument: INTEGER is
  38.      -- *** FAIRE ***
  39.       do
  40.       end;
  41.  
  42.    dca_inline_argument(formal_arg_type: TYPE) is
  43.      -- *** FAIRE ***
  44.       do
  45.       end;
  46.  
  47.    is_static: BOOLEAN is
  48.       do
  49.      if target.result_type.is_integer then
  50.         if target.is_static and then arg1.is_static then
  51.            Result := true;
  52.            if target.static_value <= arg1.static_value then
  53.           static_value_mem := 1;
  54.            else
  55.           static_value_mem := 0;
  56.            end;
  57.         end;
  58.      end;
  59.       end;
  60.  
  61.    compile_to_c is
  62.       do
  63.      if run_control.boost and then
  64.         target.result_type.run_type.is_character 
  65.       then
  66.         c2c_cast_op(fz_unsigned,us_le);
  67.      else
  68.         call_proc_call_c2c;
  69.      end;
  70.       end;
  71.  
  72.    compile_to_jvm is
  73.       do
  74.      call_proc_call_c2jvm;
  75.       end;
  76.    
  77.    jvm_branch_if_false: INTEGER is
  78.       do
  79.      if current_type.is_integer then
  80.         target.compile_to_jvm;
  81.         arg1.compile_to_jvm;
  82.         Result := code_attribute.opcode_if_icmpgt;
  83.      else
  84.         Result := jvm_standard_branch_if_false;
  85.      end;
  86.       end;
  87.  
  88.    jvm_branch_if_true: INTEGER is
  89.       do
  90.      if current_type.is_integer then
  91.         target.compile_to_jvm;
  92.         arg1.compile_to_jvm;
  93.         Result := code_attribute.opcode_if_icmple;
  94.      else
  95.         Result := jvm_standard_branch_if_true;
  96.      end;
  97.       end;
  98.  
  99. end -- CALL_INFIX_LE
  100.  
  101.