hotspot/src/share/vm/runtime/signature.hpp
changeset 31382 8d526a6991e1
parent 27471 6e56277909f1
child 33593 60764a78fa5c
equal deleted inserted replaced
31380:b2b399eeb3b1 31382:8d526a6991e1
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    61   // Definitions used in generating and iterating the
    61   // Definitions used in generating and iterating the
    62   // bit field form of the signature generated by the
    62   // bit field form of the signature generated by the
    63   // Fingerprinter.
    63   // Fingerprinter.
    64   enum {
    64   enum {
    65     static_feature_size    = 1,
    65     static_feature_size    = 1,
       
    66     is_static_bit          = 1,
       
    67 
    66     result_feature_size    = 4,
    68     result_feature_size    = 4,
    67     result_feature_mask    = 0xF,
    69     result_feature_mask    = 0xF,
    68     parameter_feature_size = 4,
    70     parameter_feature_size = 4,
    69     parameter_feature_mask = 0xF,
    71     parameter_feature_mask = 0xF,
    70 
    72 
   112   virtual void do_void  ()             = 0;
   114   virtual void do_void  ()             = 0;
   113 
   115 
   114   // Object types (begin indexes the first character of the entry, end indexes the first character after the entry)
   116   // Object types (begin indexes the first character of the entry, end indexes the first character after the entry)
   115   virtual void do_object(int begin, int end) = 0;
   117   virtual void do_object(int begin, int end) = 0;
   116   virtual void do_array (int begin, int end) = 0;
   118   virtual void do_array (int begin, int end) = 0;
       
   119 
       
   120   static bool is_static(uint64_t fingerprint) {
       
   121     assert(fingerprint != (uint64_t)CONST64(-1), "invalid fingerprint");
       
   122     return fingerprint & is_static_bit;
       
   123   }
       
   124   static BasicType return_type(uint64_t fingerprint) {
       
   125     assert(fingerprint != (uint64_t)CONST64(-1), "invalid fingerprint");
       
   126     return (BasicType) ((fingerprint >> static_feature_size) & result_feature_mask);
       
   127   }
   117 };
   128 };
   118 
   129 
   119 
   130 
   120 // Specialized SignatureIterators: Used to compute signature specific values.
   131 // Specialized SignatureIterators: Used to compute signature specific values.
   121 
   132