902 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later 903 return iff; 904 } 905 906 IfNode* create_and_xform_if(Node* ctrl, Node* tst, float prob, float cnt) { 907 IfNode* iff = new IfNode(ctrl, tst, prob, cnt);// New IfNode's 908 _gvn.transform(iff); // Value may be known at parse-time 909 // Place 'if' on worklist if it will be in graph 910 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later 911 return iff; 912 } 913 914 // Insert a loop predicate into the graph 915 void add_predicate(int nargs = 0); 916 void add_predicate_impl(Deoptimization::DeoptReason reason, int nargs); 917 918 Node* make_constant_from_field(ciField* field, Node* obj); 919 920 // Produce new array node of stable type 921 Node* cast_array_to_stable(Node* ary, const TypeAryPtr* ary_type); 922 }; 923 924 // Helper class to support building of control flow branches. Upon 925 // creation the map and sp at bci are cloned and restored upon de- 926 // struction. Typical use: 927 // 928 // { PreserveJVMState pjvms(this); 929 // // code of new branch 930 // } 931 // // here the JVM state at bci is established 932 933 class PreserveJVMState: public StackObj { 934 protected: 935 GraphKit* _kit; 936 #ifdef ASSERT 937 int _block; // PO of current block, if a Parse 938 int _bci; 939 #endif 940 SafePointNode* _map; 941 uint _sp; | 902 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later 903 return iff; 904 } 905 906 IfNode* create_and_xform_if(Node* ctrl, Node* tst, float prob, float cnt) { 907 IfNode* iff = new IfNode(ctrl, tst, prob, cnt);// New IfNode's 908 _gvn.transform(iff); // Value may be known at parse-time 909 // Place 'if' on worklist if it will be in graph 910 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later 911 return iff; 912 } 913 914 // Insert a loop predicate into the graph 915 void add_predicate(int nargs = 0); 916 void add_predicate_impl(Deoptimization::DeoptReason reason, int nargs); 917 918 Node* make_constant_from_field(ciField* field, Node* obj); 919 920 // Produce new array node of stable type 921 Node* cast_array_to_stable(Node* ary, const TypeAryPtr* ary_type); 922 923 Node* acmp(Node* a, Node* b); 924 }; 925 926 // Helper class to support building of control flow branches. Upon 927 // creation the map and sp at bci are cloned and restored upon de- 928 // struction. Typical use: 929 // 930 // { PreserveJVMState pjvms(this); 931 // // code of new branch 932 // } 933 // // here the JVM state at bci is established 934 935 class PreserveJVMState: public StackObj { 936 protected: 937 GraphKit* _kit; 938 #ifdef ASSERT 939 int _block; // PO of current block, if a Parse 940 int _bci; 941 #endif 942 SafePointNode* _map; 943 uint _sp; |