922
923 //=============================================================================
924 uint CallStaticJavaNode::size_of() const { return sizeof(*this); }
925 uint CallStaticJavaNode::cmp( const Node &n ) const {
926 CallStaticJavaNode &call = (CallStaticJavaNode&)n;
927 return CallJavaNode::cmp(call);
928 }
929
930 //----------------------------uncommon_trap_request----------------------------
931 // If this is an uncommon trap, return the request code, else zero.
932 int CallStaticJavaNode::uncommon_trap_request() const {
933 if (_name != NULL && !strcmp(_name, "uncommon_trap")) {
934 return extract_uncommon_trap_request(this);
935 }
936 return 0;
937 }
938 int CallStaticJavaNode::extract_uncommon_trap_request(const Node* call) {
939 #ifndef PRODUCT
940 if (!(call->req() > TypeFunc::Parms &&
941 call->in(TypeFunc::Parms) != NULL &&
942 call->in(TypeFunc::Parms)->is_Con())) {
943 assert(in_dump() != 0, "OK if dumping");
944 tty->print("[bad uncommon trap]");
945 return 0;
946 }
947 #endif
948 return call->in(TypeFunc::Parms)->bottom_type()->is_int()->get_con();
949 }
950
951 #ifndef PRODUCT
952 void CallStaticJavaNode::dump_spec(outputStream *st) const {
953 st->print("# Static ");
954 if (_name != NULL) {
955 st->print("%s", _name);
956 int trap_req = uncommon_trap_request();
957 if (trap_req != 0) {
958 char buf[100];
959 st->print("(%s)",
960 Deoptimization::format_trap_request(buf, sizeof(buf),
961 trap_req));
962 }
|
922
923 //=============================================================================
924 uint CallStaticJavaNode::size_of() const { return sizeof(*this); }
925 uint CallStaticJavaNode::cmp( const Node &n ) const {
926 CallStaticJavaNode &call = (CallStaticJavaNode&)n;
927 return CallJavaNode::cmp(call);
928 }
929
930 //----------------------------uncommon_trap_request----------------------------
931 // If this is an uncommon trap, return the request code, else zero.
932 int CallStaticJavaNode::uncommon_trap_request() const {
933 if (_name != NULL && !strcmp(_name, "uncommon_trap")) {
934 return extract_uncommon_trap_request(this);
935 }
936 return 0;
937 }
938 int CallStaticJavaNode::extract_uncommon_trap_request(const Node* call) {
939 #ifndef PRODUCT
940 if (!(call->req() > TypeFunc::Parms &&
941 call->in(TypeFunc::Parms) != NULL &&
942 call->in(TypeFunc::Parms)->is_Con() &&
943 call->in(TypeFunc::Parms)->bottom_type()->isa_int())) {
944 assert(in_dump() != 0, "OK if dumping");
945 tty->print("[bad uncommon trap]");
946 return 0;
947 }
948 #endif
949 return call->in(TypeFunc::Parms)->bottom_type()->is_int()->get_con();
950 }
951
952 #ifndef PRODUCT
953 void CallStaticJavaNode::dump_spec(outputStream *st) const {
954 st->print("# Static ");
955 if (_name != NULL) {
956 st->print("%s", _name);
957 int trap_req = uncommon_trap_request();
958 if (trap_req != 0) {
959 char buf[100];
960 st->print("(%s)",
961 Deoptimization::format_trap_request(buf, sizeof(buf),
962 trap_req));
963 }
|