home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_se / call_prefix_freeop.e < prev    next >
Text File  |  1999-06-05  |  3KB  |  104 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 CALL_PREFIX_FREEOP
  17.    --
  18.    --   Prefix free operator : "@...", "#...", "|...", "&..."
  19.    --
  20.  
  21. inherit CALL_PREFIX;
  22.  
  23. creation make, with
  24.  
  25. feature
  26.  
  27.    precedence: INTEGER is 11;
  28.  
  29. feature {NONE}
  30.  
  31.    make(t: like target; pn: like feature_name)is
  32.       require
  33.          t /= Void;
  34.          pn.is_freeop
  35.       do
  36.          target := t;
  37.          feature_name := pn;
  38.       ensure
  39.          target = t;
  40.          feature_name = pn
  41.       end;
  42.  
  43. feature
  44.  
  45.    operator: STRING is
  46.       do
  47.          Result := feature_name.to_string;
  48.       end;
  49.  
  50.    isa_dca_inline_argument: INTEGER is
  51.       do
  52.       end;
  53.  
  54.    dca_inline_argument(formal_arg_type: TYPE) is
  55.       do
  56.       end;
  57.  
  58.    is_static: BOOLEAN is
  59.       local
  60.          running: ARRAY[RUN_CLASS];
  61.          rf: like run_feature;
  62.       do
  63.          running := run_feature.run_class.running;
  64.          if running /= Void and then running.count = 1 then
  65.             rf := running.first.dynamic(run_feature);
  66.             if rf.is_static then
  67.                Result := true;
  68.             end;
  69.          end;
  70.       end;
  71.  
  72.    static_value: INTEGER is
  73.       local
  74.          running: ARRAY[RUN_CLASS];
  75.          rf: like run_feature;
  76.       do
  77.          running := run_feature.run_class.running;
  78.          if running /= Void and then running.count = 1 then
  79.             rf := running.first.dynamic(run_feature);
  80.             if rf.is_static then
  81.                Result := rf.static_value_mem;
  82.             end;
  83.          end;
  84.       end;
  85.  
  86.    compile_to_jvm is
  87.       do
  88.          call_proc_call_c2jvm;
  89.       end;
  90.  
  91.    jvm_branch_if_false: INTEGER is
  92.       do
  93.          Result := jvm_standard_branch_if_false;
  94.       end;
  95.  
  96.    jvm_branch_if_true: INTEGER is
  97.       do
  98.          Result := jvm_standard_branch_if_true;
  99.       end;
  100.  
  101. end -- CALL_PREFIX_FREEOP
  102.  
  103.  
  104.