home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / dev / ppcsmalleiffel / lib_se / run_feature_1.e < prev    next >
Encoding:
Text File  |  1998-01-16  |  2.6 KB  |  119 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 RUN_FEATURE_1
  17.    
  18. inherit RUN_FEATURE redefine base_feature, address_of end;
  19.    
  20. creation {CST_ATT} make
  21.    
  22. feature 
  23.  
  24.    base_feature: CST_ATT;
  25.    
  26.    value: EXPRESSION;
  27.    
  28.    local_vars: LOCAL_VAR_LIST is do end;
  29.    
  30.    is_static: BOOLEAN is 
  31.       do 
  32.      Result := value.is_static;
  33.       end;
  34.    
  35.    static_value_mem: INTEGER is
  36.       do
  37.      Result := value.static_value;
  38.       end;
  39.  
  40.    can_be_dropped: BOOLEAN is true;
  41.  
  42.    afd_check is do end;
  43.  
  44.    mapping_c is
  45.       local
  46.      real_constant: REAL_CONSTANT;
  47.       do
  48.      if result_type.is_double then
  49.         real_constant ?= value;
  50.         check
  51.            real_constant /= Void;
  52.         end;
  53.         cpp.put_string(real_constant.to_string);
  54.      else
  55.         value.compile_to_c;
  56.      end;
  57.       end;
  58.    
  59.    c_define is 
  60.       do 
  61.      nothing_comment;
  62.       end;
  63.    
  64.    address_of is
  65.       do
  66.      eh.add_position(start_position);
  67.      fatal_error("Cannot access address of a constant (VZAA).");
  68.       end;
  69.  
  70.    compute_use_current is
  71.       do
  72.      std_compute_use_current;
  73.       end;
  74.    
  75.    is_pre_computable: BOOLEAN is true;
  76.    
  77. feature {NONE}   
  78.    
  79.    initialize is
  80.       local      
  81.      i: INTEGER;
  82.       do
  83.      i := base_feature.names.index_of(name);
  84.      value := base_feature.value(i);
  85.      value := value.to_runnable(current_type);
  86.      result_type := base_feature.result_type.to_runnable(current_type);
  87.       end;
  88.    
  89. feature {RUN_FEATURE}
  90.  
  91.    jvm_field_or_method is
  92.       do
  93.       end;
  94.  
  95. feature
  96.  
  97.    mapping_jvm is
  98.       local
  99.      space: INTEGER;
  100.       do
  101.      jvm.drop_target;
  102.      space := value.compile_to_jvm_into(result_type);
  103.       end;
  104.  
  105. feature {JVM}
  106.  
  107.    jvm_define is
  108.       do
  109.       end;
  110.    
  111. feature {NONE}
  112.  
  113.    update_tmp_jvm_descriptor is
  114.       do
  115.       end;
  116.  
  117. end -- RUN_FEATURE_1
  118.  
  119.