home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / lib_se / e_void.e < prev    next >
Text File  |  1999-06-05  |  3KB  |  176 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 E_VOID
  17.    --
  18.    -- Handling of the Eiffel `Void'.
  19.    --
  20.  
  21. inherit EXPRESSION;
  22.  
  23. creation make
  24.  
  25. feature
  26.  
  27.    start_position: POSITION;
  28.  
  29.    is_void: BOOLEAN is true;
  30.  
  31.    is_writable: BOOLEAN is false;
  32.  
  33.    is_current: BOOLEAN is false;
  34.  
  35.    is_result: BOOLEAN is false;
  36.  
  37.    is_static: BOOLEAN is true;
  38.  
  39.    static_value: INTEGER is 0;
  40.  
  41.    is_pre_computable: BOOLEAN is true;
  42.  
  43.    is_manifest_string: BOOLEAN is false;
  44.  
  45.    can_be_dropped: BOOLEAN is true;
  46.  
  47.    use_current: BOOLEAN is false;
  48.  
  49.    isa_dca_inline_argument: INTEGER is -1;
  50.  
  51.    c_simple: BOOLEAN is true;
  52.  
  53.    static_result_base_class: BASE_CLASS is
  54.       do
  55.       end;
  56.  
  57.    bracketed_pretty_print, pretty_print is
  58.       do
  59.          fmt.put_string(as_void);
  60.       end;
  61.  
  62.    to_string, to_key: STRING is
  63.       do
  64.          Result := as_void;
  65.       end;
  66.  
  67.    dca_inline_argument(formal_arg_type: TYPE) is
  68.       do
  69.          mapping_c_arg(formal_arg_type);
  70.       end;
  71.  
  72.    assertion_check(tag: CHARACTER) is
  73.       do
  74.       end;
  75.  
  76.    afd_check is
  77.       do
  78.       end;
  79.  
  80.    mapping_c_target(target_type: TYPE) is
  81.       do
  82.       end;
  83.  
  84.    mapping_c_arg(formal_arg_type: TYPE) is
  85.       do
  86.          compile_to_c;
  87.       end;
  88.  
  89.    short is
  90.       do
  91.          short_print.hook_or(as_void,as_void);
  92.       end;
  93.  
  94.    short_target is
  95.       do
  96.          short;
  97.          short_print.a_dot;
  98.       end;
  99.  
  100.    collect_c_tmp is
  101.       do
  102.       end;
  103.  
  104.    compile_to_c is
  105.       do
  106.          cpp.put_string(fz_null);
  107.       end;
  108.  
  109.    c_declare_for_old is
  110.       do
  111.       end;
  112.  
  113.    compile_to_c_old is
  114.       do
  115.       end;
  116.  
  117.    compile_to_jvm_old is
  118.       do
  119.       end;
  120.  
  121.    compile_target_to_jvm, compile_to_jvm is
  122.       do
  123.          code_attribute.opcode_aconst_null;
  124.       end;
  125.  
  126.    jvm_branch_if_false: INTEGER is
  127.       do
  128.       end;
  129.  
  130.    jvm_branch_if_true: INTEGER is
  131.       do
  132.       end;
  133.  
  134.    compile_to_jvm_into(dest: TYPE): INTEGER is
  135.       do
  136.          Result := 1;
  137.          compile_to_jvm;
  138.       end;
  139.  
  140.    result_type: TYPE_NONE is
  141.       once
  142.          !!Result.make(Void);
  143.       end;
  144.  
  145.    to_runnable(ct: TYPE): like Current is
  146.       do
  147.          Result := Current;
  148.       end;
  149.  
  150.    print_as_target is
  151.       do
  152.       end;
  153.  
  154.    precedence: INTEGER is
  155.       do
  156.          Result := atomic_precedence;
  157.       end;
  158.  
  159.    jvm_assign is
  160.       do
  161.       end;
  162.  
  163. feature {NONE}
  164.  
  165.    make(sp: like start_position) is
  166.       require
  167.          sp /= Void
  168.       do
  169.          start_position := sp;
  170.       ensure
  171.          sp /= Void
  172.       end;
  173.  
  174. end -- E_VOID
  175.  
  176.