806 // Helper functions to build synchronizations
807 int next_monitor();
808 Node* insert_mem_bar(int opcode, Node* precedent = NULL);
809 Node* insert_mem_bar_volatile(int opcode, int alias_idx, Node* precedent = NULL);
810 // Optional 'precedent' is appended as an extra edge, to force ordering.
811 FastLockNode* shared_lock(Node* obj);
812 void shared_unlock(Node* box, Node* obj);
813
814 // helper functions for the fast path/slow path idioms
815 Node* fast_and_slow(Node* in, const Type *result_type, Node* null_result, IfNode* fast_test, Node* fast_result, address slow_call, const TypeFunc *slow_call_type, Node* slow_arg, Klass* ex_klass, Node* slow_result);
816
817 // Generate an instance-of idiom. Used by both the instance-of bytecode
818 // and the reflective instance-of call.
819 Node* gen_instanceof(Node *subobj, Node* superkls, bool safe_for_replace = false);
820
821 // Generate a check-cast idiom. Used by both the check-cast bytecode
822 // and the array-store bytecode
823 Node* gen_checkcast( Node *subobj, Node* superkls,
824 Node* *failure_control = NULL );
825
826 void gen_value_type_guard(Node* obj, int nargs = 0);
827 void gen_value_type_array_guard(Node* ary, Node* obj, Node* elem_klass = NULL);
828 void gen_flattened_array_guard(Node* ary, int nargs = 0);
829
830 Node* gen_subtype_check(Node* subklass, Node* superklass) {
831 MergeMemNode* mem = merged_memory();
832 Node* ctrl = control();
833 Node* n = Phase::gen_subtype_check(subklass, superklass, &ctrl, mem, &_gvn);
834 set_control(ctrl);
835 return n;
836 }
837
838 // Exact type check used for predicted calls and casts.
839 // Rewrites (*casted_receiver) to be casted to the stronger type.
840 // (Caller is responsible for doing replace_in_map.)
841 Node* type_check_receiver(Node* receiver, ciKlass* klass, float prob,
842 Node* *casted_receiver);
843 Node* type_check(Node* recv_klass, const TypeKlassPtr* tklass, float prob);
844
845 // implementation of object creation
|
806 // Helper functions to build synchronizations
807 int next_monitor();
808 Node* insert_mem_bar(int opcode, Node* precedent = NULL);
809 Node* insert_mem_bar_volatile(int opcode, int alias_idx, Node* precedent = NULL);
810 // Optional 'precedent' is appended as an extra edge, to force ordering.
811 FastLockNode* shared_lock(Node* obj);
812 void shared_unlock(Node* box, Node* obj);
813
814 // helper functions for the fast path/slow path idioms
815 Node* fast_and_slow(Node* in, const Type *result_type, Node* null_result, IfNode* fast_test, Node* fast_result, address slow_call, const TypeFunc *slow_call_type, Node* slow_arg, Klass* ex_klass, Node* slow_result);
816
817 // Generate an instance-of idiom. Used by both the instance-of bytecode
818 // and the reflective instance-of call.
819 Node* gen_instanceof(Node *subobj, Node* superkls, bool safe_for_replace = false);
820
821 // Generate a check-cast idiom. Used by both the check-cast bytecode
822 // and the array-store bytecode
823 Node* gen_checkcast( Node *subobj, Node* superkls,
824 Node* *failure_control = NULL );
825
826 Node* is_always_locked(Node* obj);
827 void gen_value_type_guard(Node* obj, int nargs = 0);
828 void gen_value_type_array_guard(Node* ary, Node* obj, Node* elem_klass = NULL);
829 void gen_flattened_array_guard(Node* ary, int nargs = 0);
830
831 Node* gen_subtype_check(Node* subklass, Node* superklass) {
832 MergeMemNode* mem = merged_memory();
833 Node* ctrl = control();
834 Node* n = Phase::gen_subtype_check(subklass, superklass, &ctrl, mem, &_gvn);
835 set_control(ctrl);
836 return n;
837 }
838
839 // Exact type check used for predicted calls and casts.
840 // Rewrites (*casted_receiver) to be casted to the stronger type.
841 // (Caller is responsible for doing replace_in_map.)
842 Node* type_check_receiver(Node* receiver, ciKlass* klass, float prob,
843 Node* *casted_receiver);
844 Node* type_check(Node* recv_klass, const TypeKlassPtr* tklass, float prob);
845
846 // implementation of object creation
|