src/share/vm/runtime/signature.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/signature.hpp

Print this page
rev 5349 : 8023657: New type profiling points: arguments to call
Summary: x86 interpreter and c1 type profiling for arguments at calls
Reviewed-by:


 384                 return;
 385     }
 386     _end++;
 387   }
 388 
 389   SignatureStream(Symbol* signature, bool is_method = true);
 390   ~SignatureStream();
 391 
 392   bool is_object() const;                        // True if this argument is an object
 393   bool is_array() const;                         // True if this argument is an array
 394   BasicType type() const                         { return _type; }
 395   Symbol* as_symbol(TRAPS);
 396   enum FailureMode { ReturnNull, CNFException, NCDFError };
 397   Klass* as_klass(Handle class_loader, Handle protection_domain, FailureMode failure_mode, TRAPS);
 398   oop as_java_mirror(Handle class_loader, Handle protection_domain, FailureMode failure_mode, TRAPS);
 399   const jbyte* raw_bytes()  { return _signature->bytes() + _begin; }
 400   int          raw_length() { return _end - _begin; }
 401 
 402   // return same as_symbol except allocation of new symbols is avoided.
 403   Symbol* as_symbol_or_null();



 404 };
 405 
 406 class SignatureVerifier : public StackObj {
 407   public:
 408     // Returns true if the symbol is valid method or type signature
 409     static bool is_valid_signature(Symbol* sig);
 410 
 411     static bool is_valid_method_signature(Symbol* sig);
 412     static bool is_valid_type_signature(Symbol* sig);
 413   private:
 414 
 415     static ssize_t is_valid_type(const char*, ssize_t);
 416     static bool invalid_name_char(char);
 417 };
 418 
 419 #endif // SHARE_VM_RUNTIME_SIGNATURE_HPP


 384                 return;
 385     }
 386     _end++;
 387   }
 388 
 389   SignatureStream(Symbol* signature, bool is_method = true);
 390   ~SignatureStream();
 391 
 392   bool is_object() const;                        // True if this argument is an object
 393   bool is_array() const;                         // True if this argument is an array
 394   BasicType type() const                         { return _type; }
 395   Symbol* as_symbol(TRAPS);
 396   enum FailureMode { ReturnNull, CNFException, NCDFError };
 397   Klass* as_klass(Handle class_loader, Handle protection_domain, FailureMode failure_mode, TRAPS);
 398   oop as_java_mirror(Handle class_loader, Handle protection_domain, FailureMode failure_mode, TRAPS);
 399   const jbyte* raw_bytes()  { return _signature->bytes() + _begin; }
 400   int          raw_length() { return _end - _begin; }
 401 
 402   // return same as_symbol except allocation of new symbols is avoided.
 403   Symbol* as_symbol_or_null();
 404 
 405   // count the number of references in the signature
 406   int reference_parameter_count();
 407 };
 408 
 409 class SignatureVerifier : public StackObj {
 410   public:
 411     // Returns true if the symbol is valid method or type signature
 412     static bool is_valid_signature(Symbol* sig);
 413 
 414     static bool is_valid_method_signature(Symbol* sig);
 415     static bool is_valid_type_signature(Symbol* sig);
 416   private:
 417 
 418     static ssize_t is_valid_type(const char*, ssize_t);
 419     static bool invalid_name_char(char);
 420 };
 421 
 422 #endif // SHARE_VM_RUNTIME_SIGNATURE_HPP
src/share/vm/runtime/signature.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File