home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_se / call_prefix_plus.e < prev    next >
Text File  |  1999-06-05  |  3KB  |  97 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_PLUS
  17.    --
  18.    --   Prefix 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(operator_position: POSITION; rp: like target) is
  32.       require
  33.          operator_position /= Void;
  34.          rp /= Void
  35.       do
  36.          !!feature_name.make(operator,operator_position);
  37.          target := rp;
  38.       ensure
  39.          start_position = operator_position;
  40.          target = rp
  41.       end;
  42.  
  43. feature
  44.  
  45.    operator: STRING is
  46.       do
  47.          Result := as_plus;
  48.       end;
  49.  
  50.    isa_dca_inline_argument: INTEGER is
  51.       do
  52.          if result_type.is_integer then
  53.             Result := target.isa_dca_inline_argument;
  54.          end;
  55.       end;
  56.  
  57.    dca_inline_argument(formal_arg_type: TYPE) is
  58.       do
  59.          target.dca_inline_argument(formal_arg_type)
  60.       end;
  61.  
  62.    is_static: BOOLEAN is
  63.       do
  64.          if target.result_type.is_integer then
  65.             if target.is_static then
  66.                Result := true;
  67.             end;
  68.          end;
  69.       end;
  70.  
  71.    static_value: INTEGER is
  72.       do
  73.          if target.result_type.is_integer then
  74.             if target.is_static then
  75.                Result := target.static_value;
  76.             end;
  77.          end;
  78.       end;
  79.  
  80.    compile_to_jvm is
  81.       do
  82.          call_proc_call_c2jvm;
  83.       end;
  84.  
  85.    jvm_branch_if_false: INTEGER is
  86.       do
  87.          Result := jvm_standard_branch_if_false;
  88.       end;
  89.  
  90.    jvm_branch_if_true: INTEGER is
  91.       do
  92.          Result := jvm_standard_branch_if_true;
  93.       end;
  94.  
  95. end -- CALL_PREFIX_PLUS
  96.  
  97.