860 }
861
862 // Exact type check used for predicted calls and casts.
863 // Rewrites (*casted_receiver) to be casted to the stronger type.
864 // (Caller is responsible for doing replace_in_map.)
865 Node* type_check_receiver(Node* receiver, ciKlass* klass, float prob,
866 Node* *casted_receiver);
867
868 // implementation of object creation
869 Node* set_output_for_allocation(AllocateNode* alloc,
870 const TypeOopPtr* oop_type,
871 bool deoptimize_on_exception=false);
872 Node* get_layout_helper(Node* klass_node, jint& constant_value);
873 Node* new_instance(Node* klass_node,
874 Node* slow_test = NULL,
875 Node* *return_size_val = NULL,
876 bool deoptimize_on_exception = false);
877 Node* new_array(Node* klass_node, Node* count_val, int nargs,
878 Node* *return_size_val = NULL,
879 bool deoptimize_on_exception = false);
880
881 // java.lang.String helpers
882 Node* load_String_length(Node* ctrl, Node* str);
883 Node* load_String_value(Node* ctrl, Node* str);
884 Node* load_String_coder(Node* ctrl, Node* str);
885 void store_String_value(Node* ctrl, Node* str, Node* value);
886 void store_String_coder(Node* ctrl, Node* str, Node* value);
887 Node* capture_memory(const TypePtr* src_type, const TypePtr* dst_type);
888 Node* compress_string(Node* src, const TypeAryPtr* src_type, Node* dst, Node* count);
889 void inflate_string(Node* src, Node* dst, const TypeAryPtr* dst_type, Node* count);
890 void inflate_string_slow(Node* src, Node* dst, Node* start, Node* count);
891
892 // Handy for making control flow
893 IfNode* create_and_map_if(Node* ctrl, Node* tst, float prob, float cnt) {
894 IfNode* iff = new IfNode(ctrl, tst, prob, cnt);// New IfNode's
895 _gvn.set_type(iff, iff->Value(&_gvn)); // Value may be known at parse-time
896 // Place 'if' on worklist if it will be in graph
897 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later
898 return iff;
899 }
|
860 }
861
862 // Exact type check used for predicted calls and casts.
863 // Rewrites (*casted_receiver) to be casted to the stronger type.
864 // (Caller is responsible for doing replace_in_map.)
865 Node* type_check_receiver(Node* receiver, ciKlass* klass, float prob,
866 Node* *casted_receiver);
867
868 // implementation of object creation
869 Node* set_output_for_allocation(AllocateNode* alloc,
870 const TypeOopPtr* oop_type,
871 bool deoptimize_on_exception=false);
872 Node* get_layout_helper(Node* klass_node, jint& constant_value);
873 Node* new_instance(Node* klass_node,
874 Node* slow_test = NULL,
875 Node* *return_size_val = NULL,
876 bool deoptimize_on_exception = false);
877 Node* new_array(Node* klass_node, Node* count_val, int nargs,
878 Node* *return_size_val = NULL,
879 bool deoptimize_on_exception = false);
880 void initialize_value_type_array(Node* array, Node* length, ciValueKlass* vk, int nargs);
881
882 // java.lang.String helpers
883 Node* load_String_length(Node* ctrl, Node* str);
884 Node* load_String_value(Node* ctrl, Node* str);
885 Node* load_String_coder(Node* ctrl, Node* str);
886 void store_String_value(Node* ctrl, Node* str, Node* value);
887 void store_String_coder(Node* ctrl, Node* str, Node* value);
888 Node* capture_memory(const TypePtr* src_type, const TypePtr* dst_type);
889 Node* compress_string(Node* src, const TypeAryPtr* src_type, Node* dst, Node* count);
890 void inflate_string(Node* src, Node* dst, const TypeAryPtr* dst_type, Node* count);
891 void inflate_string_slow(Node* src, Node* dst, Node* start, Node* count);
892
893 // Handy for making control flow
894 IfNode* create_and_map_if(Node* ctrl, Node* tst, float prob, float cnt) {
895 IfNode* iff = new IfNode(ctrl, tst, prob, cnt);// New IfNode's
896 _gvn.set_type(iff, iff->Value(&_gvn)); // Value may be known at parse-time
897 // Place 'if' on worklist if it will be in graph
898 if (!tst->is_Con()) record_for_igvn(iff); // Range-check and Null-check removal is later
899 return iff;
900 }
|