home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_se / run_feature_1.e < prev    next >
Text File  |  1999-06-05  |  3KB  |  166 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://SmallEiffel.loria.fr
  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 end;
  19.  
  20. creation make
  21.  
  22. feature
  23.  
  24.    base_feature: CST_ATT;
  25.  
  26.    value: EXPRESSION;
  27.  
  28.    result_type: TYPE;
  29.  
  30. feature
  31.  
  32.    is_pre_computable: BOOLEAN is true;
  33.  
  34.    can_be_dropped: BOOLEAN is true;
  35.  
  36.    is_once_function: BOOLEAN is false;
  37.  
  38. feature
  39.  
  40.    arguments: FORMAL_ARG_LIST is
  41.       do
  42.       end;
  43.  
  44.    require_assertion: RUN_REQUIRE is
  45.       do
  46.       end;
  47.  
  48.    local_vars: LOCAL_VAR_LIST is
  49.       do
  50.       end;
  51.  
  52.    routine_body: COMPOUND is
  53.       do
  54.       end;
  55.  
  56.    ensure_assertion: E_ENSURE is
  57.       do
  58.       end;
  59.  
  60.    rescue_compound: COMPOUND is
  61.       do
  62.       end;
  63.  
  64.    is_static: BOOLEAN is
  65.       do
  66.          Result := value.is_static;
  67.       end;
  68.  
  69.    static_value_mem: INTEGER is
  70.       do
  71.          Result := value.static_value;
  72.       end;
  73.  
  74.    afd_check is
  75.       do
  76.       end;
  77.  
  78.    mapping_c is
  79.       local
  80.          real_constant: REAL_CONSTANT;
  81.       do
  82.          if result_type.is_double then
  83.             real_constant ?= value;
  84.             check
  85.                real_constant /= Void;
  86.             end;
  87.             cpp.put_string(real_constant.to_string);
  88.          else
  89.             value.compile_to_c;
  90.          end;
  91.       end;
  92.  
  93.    c_define is
  94.       do
  95.          nothing_comment;
  96.       end;
  97.  
  98. feature {ADDRESS_OF_POOL}
  99.  
  100.    address_of_c_define(caller: ADDRESS_OF) is
  101.       do
  102.          eh.add_position(caller.start_position);
  103.          eh.add_position(start_position);
  104.          fatal_error("Cannot access address of a constant (VZAA).");
  105.       end;
  106.  
  107. feature {ADDRESS_OF}
  108.  
  109.    address_of_c_mapping is
  110.       do
  111.       end;
  112.  
  113. feature {CALL_PROC_CALL}
  114.  
  115.    collect_c_tmp is
  116.       do
  117.       end;
  118.  
  119. feature {NONE}
  120.  
  121.    initialize is
  122.       local
  123.          i: INTEGER;
  124.       do
  125.          result_type := base_feature.result_type;
  126.          result_type := result_type.to_runnable(current_type);
  127.          i := base_feature.names.index_of(name);
  128.          value := base_feature.value(i);
  129.          value := value.to_runnable(current_type);
  130.       end;
  131.  
  132. feature {RUN_FEATURE}
  133.  
  134.    compute_use_current is
  135.       do
  136.          std_compute_use_current;
  137.       end;
  138.  
  139.    jvm_field_or_method is
  140.       do
  141.       end;
  142.  
  143. feature
  144.  
  145.    mapping_jvm is
  146.       local
  147.          space: INTEGER;
  148.       do
  149.          jvm.drop_target;
  150.          space := value.compile_to_jvm_into(result_type);
  151.       end;
  152.  
  153. feature {JVM}
  154.  
  155.    jvm_define is
  156.       do
  157.       end;
  158.  
  159. feature {NONE}
  160.  
  161.    update_tmp_jvm_descriptor is
  162.       do
  163.       end;
  164.  
  165. end -- RUN_FEATURE_1
  166.