home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_se / proc_call.e < prev    next >
Text File  |  1999-06-05  |  2KB  |  86 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. deferred class PROC_CALL
  17.    --
  18.    -- For all sort of procedure calls.
  19.    -- Does not include function calls (see CALL).
  20.    --
  21.    -- Classification: E_PROC_0 when 0 argument, PROC_CALL_1 when
  22.    -- 1 argument and PROC_CALL_N when N arguments.
  23.    --
  24.  
  25. inherit CALL_PROC_CALL; INSTRUCTION;
  26.  
  27. feature
  28.  
  29.    run_feature: RUN_FEATURE;
  30.  
  31. feature {RUN_FEATURE_3,RUN_FEATURE_4}
  32.  
  33.    finalize is
  34.       local
  35.          rc: RUN_CLASS;
  36.          rf: RUN_FEATURE;
  37.       do
  38.          rf := run_feature;
  39.          rc := rf.current_type.run_class;
  40.          run_feature := rc.running.first.dynamic(rf);
  41.       end;
  42.  
  43. feature
  44.  
  45.    is_pre_computable: BOOLEAN is false;
  46.  
  47.    end_mark_comment: BOOLEAN is false;
  48.  
  49.    frozen compile_to_c is
  50.       do
  51.          cpp.se_trace_ins(start_position);
  52.          call_proc_call_c2c;
  53.       end;
  54.  
  55. feature {CREATION_CALL}
  56.  
  57.    make_runnable(w: like target; a: like arguments;
  58.                  rf: RUN_FEATURE): like Current is
  59.       require
  60.          w /= Void
  61.       deferred
  62.       end;
  63.  
  64. feature {PROC_CALL}
  65.  
  66.    set_run_feature(rf: like run_feature) is
  67.       do
  68.          run_feature := rf;
  69.       ensure
  70.          run_feature = rf
  71.       end;
  72.  
  73. feature {NONE}
  74.  
  75.    frozen run_feature_has_no_result is
  76.       do
  77.          if run_feature.result_type /= Void then
  78.             eh.add_position(run_feature.start_position);
  79.             eh.add_position(feature_name.start_position);
  80.             fatal_error("Feature found is not a procedure.");
  81.          end;
  82.       end;
  83.  
  84. end -- PROC_CALL
  85.  
  86.