home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / dev / ppcsmalleiffel / lib_se / e_strip.e < prev    next >
Encoding:
Text File  |  1998-01-16  |  3.5 KB  |  178 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 E_STRIP
  17. --   
  18. -- To store a instruction strip :
  19. --                                 strip(foo, bar)
  20. --
  21.  
  22. inherit EXPRESSION;
  23.       
  24. creation make
  25.    
  26. feature {NONE}
  27.    
  28.    list: FEATURE_NAME_LIST;
  29.    
  30. feature {ANY}
  31.    
  32.    make(sp: like start_position; l: ARRAY[FEATURE_NAME]) is
  33.       do
  34.      if l /= Void then
  35.         !!list.make(l);
  36.      end;
  37.       end;
  38.    
  39.    use_current: BOOLEAN is true;
  40.       
  41.    can_be_dropped, c_simple: BOOLEAN is false;
  42.    
  43. feature
  44.  
  45.    is_static: BOOLEAN is false;
  46.  
  47.    is_pre_computable: BOOLEAN is false;
  48.  
  49.    isa_dca_inline_argument: INTEGER is
  50.       -- *** A FAIRE ??? ***
  51.       do
  52.       end;
  53.  
  54.    dca_inline_argument(formal_arg_type: TYPE) is
  55.      -- *** FAIRE ***
  56.       do
  57.       end;
  58.  
  59.    frozen mapping_c_target(target_type: TYPE) is
  60.       do
  61.      compile_to_c;
  62.       end;
  63.  
  64.    frozen mapping_c_arg(formal_arg_type: TYPE) is
  65.       do
  66.      compile_to_c;
  67.       end;
  68.  
  69.    afd_check, compile_to_c is
  70.       do
  71.      error(start_position,"strip is not yet implemented.");
  72.       end;
  73.    
  74.    compile_to_c_old is 
  75.       do 
  76.       end;
  77.  
  78.    compile_to_jvm_old is 
  79.       do 
  80.       end;
  81.  
  82.    compile_to_jvm is 
  83.       do 
  84.       end;
  85.    
  86.    compile_target_to_jvm is 
  87.       do 
  88.       end;
  89.    
  90.    compile_to_jvm_assignment(a: ASSIGNMENT) is
  91.       do
  92.       end;
  93.    
  94.    jvm_branch_if_false: INTEGER is
  95.       do
  96.       end;
  97.  
  98.    jvm_branch_if_true: INTEGER is
  99.       do
  100.       end;
  101.    
  102.    compile_to_jvm_into(dest: TYPE): INTEGER is
  103.       do
  104.      Result := 1;
  105.      compile_to_jvm;
  106.       end;
  107.  
  108.    result_type: TYPE_ARRAY is
  109.       once
  110.      !!Result.make(Void,type_any);
  111.       end;
  112.    
  113.    to_runnable(rt: TYPE): like Current is
  114.       do
  115.      error(start_position,"strip is not yet implemented.");
  116.       end;
  117.    
  118.    pretty_print is
  119.       do
  120.      fmt.put_string("strip (");
  121.      fmt.level_incr;
  122.      if list /= Void then
  123.         list.pretty_print;
  124.      end;
  125.      fmt.put_string(")");
  126.      fmt.level_decr;
  127.       end;
  128.    
  129.    print_as_target is
  130.       do
  131.      pretty_print;
  132.      fmt.put_character('.');
  133.       end;
  134.    
  135.    bracketed_pretty_print is
  136.       do
  137.      fmt.put_character('(');
  138.      pretty_print;
  139.      fmt.put_character(')');
  140.       end;
  141.  
  142.    short is
  143.       do
  144.      short_print.hook_or("op_strip","strip (");
  145.      if list /= Void then
  146.         list.short;
  147.      end;
  148.      short_print.hook_or("cl_strip",")");
  149.       end;
  150.    
  151.    short_target is
  152.       do
  153.      short;
  154.      short_print.a_dot;
  155.       end;
  156.    
  157.    start_position: POSITION is
  158.       do
  159.      if list /= Void then
  160.         Result := list.item(1).start_position;
  161.      end;
  162.       end;
  163.    
  164.    precedence: INTEGER is
  165.       do
  166.      Result := 11;
  167.       end;
  168.    
  169. feature {CREATION_CALL,EXPRESSION_WITH_COMMENT}
  170.       
  171.    jvm_assign is
  172.       do
  173.       end;
  174.  
  175. end -- E_STRIP
  176.  
  177.  
  178.