396 return null_check_common(value, type, true, nullptr, _gvn.type(value)->speculative_always_null());
397 }
398
399 // Check if value is null and abort if it is
400 Node* must_be_not_null(Node* value, bool do_replace_in_map);
401
402 // Null check oop. Return null-path control into (*null_control).
403 // Return a cast-not-null node which depends on the not-null control.
404 // If never_see_null, use an uncommon trap (*null_control sees a top).
405 // The cast is not valid along the null path; keep a copy of the original.
406 // If safe_for_replace, then we can replace the value with the cast
407 // in the parsing map (the cast is guaranteed to dominate the map)
408 Node* null_check_oop(Node* value, Node* *null_control,
409 bool never_see_null = false,
410 bool safe_for_replace = false,
411 bool speculative = false);
412
413 // Check the null_seen bit.
414 bool seems_never_null(Node* obj, ciProfileData* data, bool& speculating);
415
416 void guard_klass_being_initialized(Node* klass);
417 void guard_init_thread(Node* klass);
418
419 void clinit_barrier(ciInstanceKlass* ik, ciMethod* context);
420
421 // Check for unique class for receiver at call
422 ciKlass* profile_has_unique_klass() {
423 ciCallProfile profile = method()->call_profile_at_bci(bci());
424 if (profile.count() >= 0 && // no cast failures here
425 profile.has_receiver(0) &&
426 profile.morphism() == 1) {
427 return profile.receiver(0);
428 }
429 return nullptr;
430 }
431
432 // record type from profiling with the type system
433 Node* record_profile_for_speculation(Node* n, ciKlass* exact_kls, ProfilePtrKind ptr_kind);
434 void record_profiled_arguments_for_speculation(ciMethod* dest_method, Bytecodes::Code bc);
435 void record_profiled_parameters_for_speculation();
626 Node* adr,
627 const TypePtr* adr_type,
628 int alias_idx,
629 Node* new_val,
630 const Type* value_type,
631 BasicType bt,
632 DecoratorSet decorators);
633
634 void access_clone(Node* src, Node* dst, Node* size, bool is_array);
635
636 // Return addressing for an array element.
637 Node* array_element_address(Node* ary, Node* idx, BasicType elembt,
638 // Optional constraint on the array size:
639 const TypeInt* sizetype = nullptr,
640 // Optional control dependency (for example, on range check)
641 Node* ctrl = nullptr);
642
643 // Return a load of array element at idx.
644 Node* load_array_element(Node* ary, Node* idx, const TypeAryPtr* arytype, bool set_ctrl);
645
646 //---------------- Dtrace support --------------------
647 void make_dtrace_method_entry_exit(ciMethod* method, bool is_entry);
648 void make_dtrace_method_entry(ciMethod* method) {
649 make_dtrace_method_entry_exit(method, true);
650 }
651 void make_dtrace_method_exit(ciMethod* method) {
652 make_dtrace_method_entry_exit(method, false);
653 }
654
655 //--------------- stub generation -------------------
656 public:
657 void gen_stub(address C_function,
658 const char *name,
659 int is_fancy_jump,
660 bool pass_tls,
661 bool return_pc);
662
663 //---------- help for generating calls --------------
664
665 // Do a null check on the receiver as it would happen before the call to
|
396 return null_check_common(value, type, true, nullptr, _gvn.type(value)->speculative_always_null());
397 }
398
399 // Check if value is null and abort if it is
400 Node* must_be_not_null(Node* value, bool do_replace_in_map);
401
402 // Null check oop. Return null-path control into (*null_control).
403 // Return a cast-not-null node which depends on the not-null control.
404 // If never_see_null, use an uncommon trap (*null_control sees a top).
405 // The cast is not valid along the null path; keep a copy of the original.
406 // If safe_for_replace, then we can replace the value with the cast
407 // in the parsing map (the cast is guaranteed to dominate the map)
408 Node* null_check_oop(Node* value, Node* *null_control,
409 bool never_see_null = false,
410 bool safe_for_replace = false,
411 bool speculative = false);
412
413 // Check the null_seen bit.
414 bool seems_never_null(Node* obj, ciProfileData* data, bool& speculating);
415
416 void guard_klass_is_initialized(Node* klass);
417 void guard_klass_being_initialized(Node* klass);
418 void guard_init_thread(Node* klass);
419
420 void clinit_barrier(ciInstanceKlass* ik, ciMethod* context);
421
422 // Check for unique class for receiver at call
423 ciKlass* profile_has_unique_klass() {
424 ciCallProfile profile = method()->call_profile_at_bci(bci());
425 if (profile.count() >= 0 && // no cast failures here
426 profile.has_receiver(0) &&
427 profile.morphism() == 1) {
428 return profile.receiver(0);
429 }
430 return nullptr;
431 }
432
433 // record type from profiling with the type system
434 Node* record_profile_for_speculation(Node* n, ciKlass* exact_kls, ProfilePtrKind ptr_kind);
435 void record_profiled_arguments_for_speculation(ciMethod* dest_method, Bytecodes::Code bc);
436 void record_profiled_parameters_for_speculation();
627 Node* adr,
628 const TypePtr* adr_type,
629 int alias_idx,
630 Node* new_val,
631 const Type* value_type,
632 BasicType bt,
633 DecoratorSet decorators);
634
635 void access_clone(Node* src, Node* dst, Node* size, bool is_array);
636
637 // Return addressing for an array element.
638 Node* array_element_address(Node* ary, Node* idx, BasicType elembt,
639 // Optional constraint on the array size:
640 const TypeInt* sizetype = nullptr,
641 // Optional control dependency (for example, on range check)
642 Node* ctrl = nullptr);
643
644 // Return a load of array element at idx.
645 Node* load_array_element(Node* ary, Node* idx, const TypeAryPtr* arytype, bool set_ctrl);
646
647 //----------- runtime upcalls support ----------------
648 void install_on_method_entry_runtime_upcalls(ciMethod* method);
649
650 //---------------- Dtrace support --------------------
651 void make_dtrace_method_entry_exit(ciMethod* method, bool is_entry);
652 void make_dtrace_method_entry(ciMethod* method) {
653 make_dtrace_method_entry_exit(method, true);
654 }
655 void make_dtrace_method_exit(ciMethod* method) {
656 make_dtrace_method_entry_exit(method, false);
657 }
658
659 //--------------- stub generation -------------------
660 public:
661 void gen_stub(address C_function,
662 const char *name,
663 int is_fancy_jump,
664 bool pass_tls,
665 bool return_pc);
666
667 //---------- help for generating calls --------------
668
669 // Do a null check on the receiver as it would happen before the call to
|