883 class MachCallJavaNode : public MachCallNode { |
883 class MachCallJavaNode : public MachCallNode { |
884 protected: |
884 protected: |
885 virtual uint cmp( const Node &n ) const; |
885 virtual uint cmp( const Node &n ) const; |
886 virtual uint size_of() const; // Size is bigger |
886 virtual uint size_of() const; // Size is bigger |
887 public: |
887 public: |
888 ciMethod* _method; // Method being direct called |
888 ciMethod* _method; // Method being direct called |
889 int _bci; // Byte Code index of call byte code |
889 bool _override_symbolic_info; // Override symbolic call site info from bytecode |
890 bool _optimized_virtual; // Tells if node is a static call or an optimized virtual |
890 int _bci; // Byte Code index of call byte code |
891 bool _method_handle_invoke; // Tells if the call has to preserve SP |
891 bool _optimized_virtual; // Tells if node is a static call or an optimized virtual |
892 MachCallJavaNode() : MachCallNode() { |
892 bool _method_handle_invoke; // Tells if the call has to preserve SP |
|
893 MachCallJavaNode() : MachCallNode(), _override_symbolic_info(false) { |
893 init_class_id(Class_MachCallJava); |
894 init_class_id(Class_MachCallJava); |
894 } |
895 } |
895 |
896 |
896 virtual const RegMask &in_RegMask(uint) const; |
897 virtual const RegMask &in_RegMask(uint) const; |
|
898 |
|
899 int resolved_method_index(CodeBuffer &cbuf) const { |
|
900 if (_override_symbolic_info) { |
|
901 // Attach corresponding Method* to the call site, so VM can use it during resolution |
|
902 // instead of querying symbolic info from bytecode. |
|
903 assert(_method != NULL, "method should be set"); |
|
904 assert(_method->constant_encoding()->is_method(), "should point to a Method"); |
|
905 return cbuf.oop_recorder()->find_index(_method->constant_encoding()); |
|
906 } |
|
907 return 0; // Use symbolic info from bytecode (resolved_method == NULL). |
|
908 } |
897 |
909 |
898 #ifndef PRODUCT |
910 #ifndef PRODUCT |
899 virtual void dump_spec(outputStream *st) const; |
911 virtual void dump_spec(outputStream *st) const; |
900 #endif |
912 #endif |
901 }; |
913 }; |