src/share/vm/opto/library_call.cpp

Print this page
rev 158 : 6709972: runThese failed with assert(false,"bad AD file")
Summary: guard AryEqNode construction with has_match_rule() test, set SpecialArraysEquals default off
Reviewed-by: kvn, never


 806   ciInstanceKlass* klass = env()->String_klass();
 807   const TypeInstPtr* string_type =
 808     TypeInstPtr::make(TypePtr::BotPTR, klass, false, NULL, 0);
 809 
 810   Node* compare =
 811     _gvn.transform(new (C, 7) StrCompNode(
 812                         control(),
 813                         memory(TypeAryPtr::CHARS),
 814                         memory(string_type->add_offset(value_offset)),
 815                         memory(string_type->add_offset(count_offset)),
 816                         memory(string_type->add_offset(offset_offset)),
 817                         receiver,
 818                         argument));
 819   push(compare);
 820   return true;
 821 }
 822 
 823 //------------------------------inline_array_equals----------------------------
 824 bool LibraryCallKit::inline_array_equals() {
 825 


 826   _sp += 2;
 827   Node *argument2 = pop();
 828   Node *argument1 = pop();
 829 
 830   Node* equals =
 831     _gvn.transform(new (C, 3) AryEqNode(control(),
 832                                         argument1,
 833                                         argument2)
 834                    );
 835   push(equals);
 836   return true;
 837 }
 838 
 839 // Java version of String.indexOf(constant string)
 840 // class StringDecl {
 841 //   StringDecl(char[] ca) {
 842 //     offset = 0;
 843 //     count = ca.length;
 844 //     value = ca;
 845 //   }




 806   ciInstanceKlass* klass = env()->String_klass();
 807   const TypeInstPtr* string_type =
 808     TypeInstPtr::make(TypePtr::BotPTR, klass, false, NULL, 0);
 809 
 810   Node* compare =
 811     _gvn.transform(new (C, 7) StrCompNode(
 812                         control(),
 813                         memory(TypeAryPtr::CHARS),
 814                         memory(string_type->add_offset(value_offset)),
 815                         memory(string_type->add_offset(count_offset)),
 816                         memory(string_type->add_offset(offset_offset)),
 817                         receiver,
 818                         argument));
 819   push(compare);
 820   return true;
 821 }
 822 
 823 //------------------------------inline_array_equals----------------------------
 824 bool LibraryCallKit::inline_array_equals() {
 825 
 826   if (!Matcher::has_match_rule(Op_AryEq)) return false;
 827 
 828   _sp += 2;
 829   Node *argument2 = pop();
 830   Node *argument1 = pop();
 831 
 832   Node* equals =
 833     _gvn.transform(new (C, 3) AryEqNode(control(),
 834                                         argument1,
 835                                         argument2)
 836                    );
 837   push(equals);
 838   return true;
 839 }
 840 
 841 // Java version of String.indexOf(constant string)
 842 // class StringDecl {
 843 //   StringDecl(char[] ca) {
 844 //     offset = 0;
 845 //     count = ca.length;
 846 //     value = ca;
 847 //   }