src/share/vm/interpreter/bytecode.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6893081 Sdiff src/share/vm/interpreter

src/share/vm/interpreter/bytecode.hpp

Print this page
rev 1081 : imported patch indy-cleanup-6893081.patch


 193   symbolOop    signature() const;                // returns the signature of the invoked method
 194   BasicType    result_type(Thread *thread) const; // returns the result type of the invoke
 195 
 196   Bytecodes::Code code() const                   { return Bytecodes::code_at(bcp(), _method()); }
 197   Bytecodes::Code adjusted_invoke_code() const   { return Bytecodes::java_code(code()); }
 198 
 199   methodHandle static_target(TRAPS);             // "specified" method   (from constant pool)
 200 
 201   // Testers
 202   bool is_invokeinterface() const                { return adjusted_invoke_code() == Bytecodes::_invokeinterface; }
 203   bool is_invokevirtual() const                  { return adjusted_invoke_code() == Bytecodes::_invokevirtual; }
 204   bool is_invokestatic() const                   { return adjusted_invoke_code() == Bytecodes::_invokestatic; }
 205   bool is_invokespecial() const                  { return adjusted_invoke_code() == Bytecodes::_invokespecial; }
 206   bool is_invokedynamic() const                  { return adjusted_invoke_code() == Bytecodes::_invokedynamic; }
 207 
 208   bool has_giant_index() const                   { return is_invokedynamic(); }
 209 
 210   bool is_valid() const                          { return is_invokeinterface() ||
 211                                                           is_invokevirtual()   ||
 212                                                           is_invokestatic()    ||
 213                                                           is_invokespecial();     }

 214 
 215   // Creation
 216   inline friend Bytecode_invoke* Bytecode_invoke_at(methodHandle method, int bci);
 217 
 218   // Like Bytecode_invoke_at. Instead it returns NULL if the bci is not at an invoke.
 219   inline friend Bytecode_invoke* Bytecode_invoke_at_check(methodHandle method, int bci);
 220 };
 221 
 222 inline Bytecode_invoke* Bytecode_invoke_at(methodHandle method, int bci) {
 223   Bytecode_invoke* b = new Bytecode_invoke(method, bci);
 224   debug_only(b->verify());
 225   return b;
 226 }
 227 
 228 inline Bytecode_invoke* Bytecode_invoke_at_check(methodHandle method, int bci) {
 229   Bytecode_invoke* b = new Bytecode_invoke(method, bci);
 230   return b->is_valid() ? b : NULL;
 231 }
 232 
 233 




 193   symbolOop    signature() const;                // returns the signature of the invoked method
 194   BasicType    result_type(Thread *thread) const; // returns the result type of the invoke
 195 
 196   Bytecodes::Code code() const                   { return Bytecodes::code_at(bcp(), _method()); }
 197   Bytecodes::Code adjusted_invoke_code() const   { return Bytecodes::java_code(code()); }
 198 
 199   methodHandle static_target(TRAPS);             // "specified" method   (from constant pool)
 200 
 201   // Testers
 202   bool is_invokeinterface() const                { return adjusted_invoke_code() == Bytecodes::_invokeinterface; }
 203   bool is_invokevirtual() const                  { return adjusted_invoke_code() == Bytecodes::_invokevirtual; }
 204   bool is_invokestatic() const                   { return adjusted_invoke_code() == Bytecodes::_invokestatic; }
 205   bool is_invokespecial() const                  { return adjusted_invoke_code() == Bytecodes::_invokespecial; }
 206   bool is_invokedynamic() const                  { return adjusted_invoke_code() == Bytecodes::_invokedynamic; }
 207 
 208   bool has_giant_index() const                   { return is_invokedynamic(); }
 209 
 210   bool is_valid() const                          { return is_invokeinterface() ||
 211                                                           is_invokevirtual()   ||
 212                                                           is_invokestatic()    ||
 213                                                           is_invokespecial()   ||
 214                                                           is_invokedynamic(); }
 215 
 216   // Creation
 217   inline friend Bytecode_invoke* Bytecode_invoke_at(methodHandle method, int bci);
 218 
 219   // Like Bytecode_invoke_at. Instead it returns NULL if the bci is not at an invoke.
 220   inline friend Bytecode_invoke* Bytecode_invoke_at_check(methodHandle method, int bci);
 221 };
 222 
 223 inline Bytecode_invoke* Bytecode_invoke_at(methodHandle method, int bci) {
 224   Bytecode_invoke* b = new Bytecode_invoke(method, bci);
 225   debug_only(b->verify());
 226   return b;
 227 }
 228 
 229 inline Bytecode_invoke* Bytecode_invoke_at_check(methodHandle method, int bci) {
 230   Bytecode_invoke* b = new Bytecode_invoke(method, bci);
 231   return b->is_valid() ? b : NULL;
 232 }
 233 
 234 


src/share/vm/interpreter/bytecode.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File