home *** CD-ROM | disk | FTP | other *** search
/ Hacker / Hacker.iso / HACKER / DECOMP / DECAF / atlovata.ads < prev    next >
Encoding:
Text File  |  1996-09-19  |  2.9 KB  |  85 lines

  1. --
  2. -- Copyright (C) 1996 Ada Resource Association (ARA), Columbus, Ohio.
  3. -- Author: Gilles Demailly
  4. --
  5. --
  6. -- Permission to use, copy, modify, and distribute this software and its
  7. -- documentation for any purpose and without fee is hereby granted,
  8. -- provided that the above copyright and authorship notice appear in all
  9. -- copies and that both that copyright notice and this permission notice
  10. -- appear in supporting documentation.
  11. -- 
  12. -- The ARA makes no representations about the suitability of this software
  13. -- for any purpose.  It is provided "as is" without express
  14. -- or implied warranty.
  15. -- 
  16.  
  17.  
  18. -- This child package provides the class Local_Variable_Table_Attribute :
  19. --  this attribute is used by debuggers to determine the value of the
  20. --  local variables during execution.
  21. --
  22. -- For more information about Java Class file format check :
  23. --    The Java Virtual Machine Specification
  24. --    (Release 1.0 Beta - Draft - August 21, 1995)
  25.  
  26. with Basic_Definitions;
  27. use Basic_Definitions;
  28.  
  29. with Byte_Utilities;
  30.  
  31. with CP;
  32.  
  33.  
  34. package Attribute.Local_Variable_Table is
  35.  
  36.    -- This class attribute name in Java files
  37.    ------------------------------------------
  38.    C_Class_Name : constant Wide_String := "LocalVariableTable";
  39.   
  40.    -- type Local_Variable_Table_Attribute (subclass of Attribute)
  41.    --------------------------------------------------------------
  42.    type Local_Variable_Table_Attribute is new Attribute with private;
  43.       
  44.    -- Access to Local_Variable_Table_Attribute
  45.    -------------------------------------------
  46.    type Acc_Local_Variable_Table_Attribute is access all Local_Variable_Table_Attribute'Class;
  47.      
  48.    -- Decode informations of the attribute from a file
  49.    ---------------------------------------------------
  50.    procedure Decode (This      : access Local_Variable_Table_Attribute;
  51.                      From_File : in Byte_Utilities.File_Type;
  52.                      Context   : in CP.Acc_CP_Infos);
  53.  
  54.    -- Display the attribute
  55.    ------------------------
  56.    procedure Display (This    : access Local_Variable_Table_Attribute;
  57.                       Context : in CP.Acc_CP_Infos);
  58.  
  59. private
  60.  
  61.    -- informations for one local variable
  62.    --------------------------------------
  63.    type Variable_Info is
  64.       record
  65.          Start_Pc        : Unsigned_16;
  66.          Length          : Unsigned_16;
  67.          Name_Index      : Unsigned_16;
  68.          Signature_Index : Unsigned_16;
  69.          Slot            : Unsigned_16;
  70.       end record;
  71.  
  72.    type Variable_Infos is array (Unsigned_16 range <>) of Variable_Info;
  73.  
  74.    type Acc_Variable_Infos is access Variable_Infos;
  75.    
  76.    -- adds a table of informations on local variables
  77.    --------------------------------------------------
  78.    type Local_Variable_Table_Attribute is new Attribute with
  79.       record
  80.          Local_Variable_Table_Length : Unsigned_16;
  81.          Local_Variable_Table        : Acc_Variable_Infos;
  82.       end record;
  83.       
  84. end Attribute.Local_Variable_Table;
  85.