src/share/vm/opto/graphKit.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/graphKit.hpp

Print this page
rev 5100 : 8024067: Missing replace_in_map() calls following null checks
Summary: add replace_in_map() calls following some null checks in type checks
Reviewed-by:


 361   Node* zero_check_int(Node* value) {
 362     assert(value->bottom_type()->basic_type() == T_INT,
 363         err_msg_res("wrong type: %s", type2name(value->bottom_type()->basic_type())));
 364     return null_check_common(value, T_INT);
 365   }
 366   Node* zero_check_long(Node* value) {
 367     assert(value->bottom_type()->basic_type() == T_LONG,
 368         err_msg_res("wrong type: %s", type2name(value->bottom_type()->basic_type())));
 369     return null_check_common(value, T_LONG);
 370   }
 371   // Throw an uncommon trap if a given value is __not__ null.
 372   // Return the value cast to null, and be clever about dominating checks.
 373   Node* null_assert(Node* value, BasicType type = T_OBJECT) {
 374     return null_check_common(value, type, true);
 375   }
 376 
 377   // Null check oop.  Return null-path control into (*null_control).
 378   // Return a cast-not-null node which depends on the not-null control.
 379   // If never_see_null, use an uncommon trap (*null_control sees a top).
 380   // The cast is not valid along the null path; keep a copy of the original.


 381   Node* null_check_oop(Node* value, Node* *null_control,
 382                        bool never_see_null = false);
 383 
 384   // Check the null_seen bit.
 385   bool seems_never_null(Node* obj, ciProfileData* data);
 386 
 387   // Use the type profile to narrow an object type.
 388   Node* maybe_cast_profiled_receiver(Node* not_null_obj,
 389                                      ciProfileData* data,
 390                                      ciKlass* require_klass);
 391 
 392   // Cast obj to not-null on this path
 393   Node* cast_not_null(Node* obj, bool do_replace_in_map = true);
 394   // Replace all occurrences of one node by another.
 395   void replace_in_map(Node* old, Node* neww);
 396 
 397   void  push(Node* n)     { map_not_null();        _map->set_stack(_map->_jvms,   _sp++        , n); }
 398   Node* pop()             { map_not_null(); return _map->stack(    _map->_jvms, --_sp             ); }
 399   Node* peek(int off = 0) { map_not_null(); return _map->stack(    _map->_jvms,   _sp - off - 1   ); }
 400 
 401   void push_pair(Node* ldval) {
 402     push(ldval);




 361   Node* zero_check_int(Node* value) {
 362     assert(value->bottom_type()->basic_type() == T_INT,
 363         err_msg_res("wrong type: %s", type2name(value->bottom_type()->basic_type())));
 364     return null_check_common(value, T_INT);
 365   }
 366   Node* zero_check_long(Node* value) {
 367     assert(value->bottom_type()->basic_type() == T_LONG,
 368         err_msg_res("wrong type: %s", type2name(value->bottom_type()->basic_type())));
 369     return null_check_common(value, T_LONG);
 370   }
 371   // Throw an uncommon trap if a given value is __not__ null.
 372   // Return the value cast to null, and be clever about dominating checks.
 373   Node* null_assert(Node* value, BasicType type = T_OBJECT) {
 374     return null_check_common(value, type, true);
 375   }
 376 
 377   // Null check oop.  Return null-path control into (*null_control).
 378   // Return a cast-not-null node which depends on the not-null control.
 379   // If never_see_null, use an uncommon trap (*null_control sees a top).
 380   // The cast is not valid along the null path; keep a copy of the original.
 381   // If safe_for_replace, then we can call replace the value with the
 382   // cast in the map (the cast is guaranteed to dominate the map)
 383   Node* null_check_oop(Node* value, Node* *null_control,
 384                        bool never_see_null = false, bool safe_for_replace = false);
 385 
 386   // Check the null_seen bit.
 387   bool seems_never_null(Node* obj, ciProfileData* data);
 388 
 389   // Use the type profile to narrow an object type.
 390   Node* maybe_cast_profiled_receiver(Node* not_null_obj,
 391                                      ciProfileData* data,
 392                                      ciKlass* require_klass);
 393 
 394   // Cast obj to not-null on this path
 395   Node* cast_not_null(Node* obj, bool do_replace_in_map = true);
 396   // Replace all occurrences of one node by another.
 397   void replace_in_map(Node* old, Node* neww);
 398 
 399   void  push(Node* n)     { map_not_null();        _map->set_stack(_map->_jvms,   _sp++        , n); }
 400   Node* pop()             { map_not_null(); return _map->stack(    _map->_jvms, --_sp             ); }
 401   Node* peek(int off = 0) { map_not_null(); return _map->stack(    _map->_jvms,   _sp - off - 1   ); }
 402 
 403   void push_pair(Node* ldval) {
 404     push(ldval);


src/share/vm/opto/graphKit.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File