682
683 // Static parse-time type checking logic for gen_subtype_check:
684 enum { SSC_always_false, SSC_always_true, SSC_easy_test, SSC_full_test };
685 int static_subtype_check(ciKlass* superk, ciKlass* subk);
686
687 // Exact type check used for predicted calls and casts.
688 // Rewrites (*casted_receiver) to be casted to the stronger type.
689 // (Caller is responsible for doing replace_in_map.)
690 Node* type_check_receiver(Node* receiver, ciKlass* klass, float prob,
691 Node* *casted_receiver);
692
693 // implementation of object creation
694 Node* set_output_for_allocation(AllocateNode* alloc,
695 const TypeOopPtr* oop_type,
696 bool raw_mem_only);
697 Node* get_layout_helper(Node* klass_node, jint& constant_value);
698 Node* new_instance(Node* klass_node,
699 Node* slow_test = NULL,
700 bool raw_mem_only = false,
701 Node* *return_size_val = NULL);
702 Node* new_array(Node* klass_node, Node* count_val,
703 bool raw_mem_only = false, Node* *return_size_val = NULL);
704
705 // Handy for making control flow
706 IfNode* create_and_map_if(Node* ctrl, Node* tst, float prob, float cnt) {
707 IfNode* iff = new (C, 2) IfNode(ctrl, tst, prob, cnt);// New IfNode's
708 _gvn.set_type(iff, iff->Value(&_gvn)); // Value may be known at parse-time
709 // Place 'if' on worklist if it will be in graph
710 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later
711 return iff;
712 }
713
714 IfNode* create_and_xform_if(Node* ctrl, Node* tst, float prob, float cnt) {
715 IfNode* iff = new (C, 2) IfNode(ctrl, tst, prob, cnt);// New IfNode's
716 _gvn.transform(iff); // Value may be known at parse-time
717 // Place 'if' on worklist if it will be in graph
718 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later
719 return iff;
720 }
721 };
722
|
682
683 // Static parse-time type checking logic for gen_subtype_check:
684 enum { SSC_always_false, SSC_always_true, SSC_easy_test, SSC_full_test };
685 int static_subtype_check(ciKlass* superk, ciKlass* subk);
686
687 // Exact type check used for predicted calls and casts.
688 // Rewrites (*casted_receiver) to be casted to the stronger type.
689 // (Caller is responsible for doing replace_in_map.)
690 Node* type_check_receiver(Node* receiver, ciKlass* klass, float prob,
691 Node* *casted_receiver);
692
693 // implementation of object creation
694 Node* set_output_for_allocation(AllocateNode* alloc,
695 const TypeOopPtr* oop_type,
696 bool raw_mem_only);
697 Node* get_layout_helper(Node* klass_node, jint& constant_value);
698 Node* new_instance(Node* klass_node,
699 Node* slow_test = NULL,
700 bool raw_mem_only = false,
701 Node* *return_size_val = NULL);
702 Node* new_array(Node* klass_node, Node* count_val, int nargs,
703 bool raw_mem_only = false, Node* *return_size_val = NULL);
704
705 // Handy for making control flow
706 IfNode* create_and_map_if(Node* ctrl, Node* tst, float prob, float cnt) {
707 IfNode* iff = new (C, 2) IfNode(ctrl, tst, prob, cnt);// New IfNode's
708 _gvn.set_type(iff, iff->Value(&_gvn)); // Value may be known at parse-time
709 // Place 'if' on worklist if it will be in graph
710 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later
711 return iff;
712 }
713
714 IfNode* create_and_xform_if(Node* ctrl, Node* tst, float prob, float cnt) {
715 IfNode* iff = new (C, 2) IfNode(ctrl, tst, prob, cnt);// New IfNode's
716 _gvn.transform(iff); // Value may be known at parse-time
717 // Place 'if' on worklist if it will be in graph
718 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later
719 return iff;
720 }
721 };
722
|