home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / dev / ppcsmalleiffel / lib_se / native_jvm.e < prev    next >
Encoding:
Text File  |  1998-01-16  |  2.6 KB  |  105 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://www.loria.fr/SmallEiffel
  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 NATIVE_JVM
  17.  
  18. inherit NATIVE;
  19.  
  20. feature
  21.  
  22.    frozen c_define_procedure(rf7: RUN_FEATURE_7; bcn, name: STRING) is
  23.       do
  24.      fe_c2c(rf7)
  25.       end;
  26.  
  27.    frozen c_mapping_procedure(rf7: RUN_FEATURE_7; bcn, name: STRING) is
  28.       do
  29.      fe_c2c(rf7)
  30.       end;
  31.  
  32.    frozen c_define_function(rf8: RUN_FEATURE_8; bcn, name: STRING) is
  33.       do
  34.      fe_c2c(rf8)
  35.       end;
  36.  
  37.    frozen c_mapping_function(rf8: RUN_FEATURE_8; bcn, name: STRING) is
  38.       do
  39.      fe_c2c(rf8)
  40.       end;
  41.  
  42. feature {NONE}
  43.  
  44.    idx_methodref(er: EXTERNAL_ROUTINE): INTEGER is
  45.       local
  46.      i: integer;
  47.      alias_string: STRING;
  48.      cp: like constant_pool;
  49.       do
  50.      cp := constant_pool;
  51.      alias_string := er.alias_string;
  52.      if alias_string = Void then
  53.         eh.add_position(er.start_position);
  54.         fatal_error(
  55.              "Missing %"alias%" field description (see %
  56.          %external.html documentation).");
  57.      end;
  58.      from
  59.         i := 1;
  60.         tmp_class.clear;
  61.      until
  62.         alias_string.item(i) = '.'
  63.      loop
  64.         tmp_class.extend(alias_string.item(i));
  65.         i := i + 1;
  66.      end;
  67.      from
  68.         i := i + 1;
  69.         tmp_name.clear;
  70.      until
  71.         alias_string.item(i) = ' '
  72.      loop
  73.         tmp_name.extend(alias_string.item(i));
  74.         i := i + 1;
  75.      end;
  76.      from
  77.         i := i + 1;
  78.         tmp_descriptor.clear;
  79.      until
  80.         i > alias_string.count
  81.      loop
  82.         tmp_descriptor.extend(alias_string.item(i));
  83.         i := i + 1;
  84.      end;
  85.      Result := cp.idx_methodref3(tmp_class,tmp_name,tmp_descriptor);
  86.       end;
  87.  
  88.    tmp_class: STRING is
  89.       once
  90.      !!Result.make(32);
  91.       end;
  92.  
  93.    tmp_name: STRING is
  94.       once
  95.      !!Result.make(32);
  96.       end;
  97.  
  98.    tmp_descriptor: STRING is
  99.       once
  100.      !!Result.make(32);
  101.       end;
  102.  
  103. end -- NATIVE_JVM
  104.  
  105.