Mercurial > hg > graal-compiler
comparison src/share/vm/opto/matcher.cpp @ 163:885ed790ecf0
6695810: null oop passed to encode_heap_oop_not_null
Summary: fix several problems in C2 related to Escape Analysis and Compressed Oops.
Reviewed-by: never, jrose
author | kvn |
---|---|
date | Wed, 21 May 2008 10:45:07 -0700 |
parents | ba764ed4b6f2 |
children | c436414a719e |
comparison
equal
deleted
inserted
replaced
162:8aa010f60e0f | 163:885ed790ecf0 |
---|---|
878 // Monitor boxes are also represented directly. | 878 // Monitor boxes are also represented directly. |
879 for (i = cnt - 1; i >= debug_cnt; --i) { // For all debug inputs do | 879 for (i = cnt - 1; i >= debug_cnt; --i) { // For all debug inputs do |
880 Node *m = n->in(i); // Get input | 880 Node *m = n->in(i); // Get input |
881 int op = m->Opcode(); | 881 int op = m->Opcode(); |
882 assert((op == Op_BoxLock) == jvms->is_monitor_use(i), "boxes only at monitor sites"); | 882 assert((op == Op_BoxLock) == jvms->is_monitor_use(i), "boxes only at monitor sites"); |
883 if( op == Op_ConI || op == Op_ConP || | 883 if( op == Op_ConI || op == Op_ConP || op == Op_ConN || |
884 op == Op_ConF || op == Op_ConD || op == Op_ConL | 884 op == Op_ConF || op == Op_ConD || op == Op_ConL |
885 // || op == Op_BoxLock // %%%% enable this and remove (+++) in chaitin.cpp | 885 // || op == Op_BoxLock // %%%% enable this and remove (+++) in chaitin.cpp |
886 ) { | 886 ) { |
887 m = m->clone(); | 887 m = m->clone(); |
888 mstack.push(m, Post_Visit, n, i); // Don't neet to visit | 888 mstack.push(m, Post_Visit, n, i); // Don't neet to visit |
1721 case Op_ConP: { // Convert pointers above the centerline to NUL | 1721 case Op_ConP: { // Convert pointers above the centerline to NUL |
1722 TypeNode *tn = n->as_Type(); // Constants derive from type nodes | 1722 TypeNode *tn = n->as_Type(); // Constants derive from type nodes |
1723 const TypePtr* tp = tn->type()->is_ptr(); | 1723 const TypePtr* tp = tn->type()->is_ptr(); |
1724 if (tp->_ptr == TypePtr::AnyNull) { | 1724 if (tp->_ptr == TypePtr::AnyNull) { |
1725 tn->set_type(TypePtr::NULL_PTR); | 1725 tn->set_type(TypePtr::NULL_PTR); |
1726 } | |
1727 break; | |
1728 } | |
1729 case Op_ConN: { // Convert narrow pointers above the centerline to NUL | |
1730 TypeNode *tn = n->as_Type(); // Constants derive from type nodes | |
1731 const TypePtr* tp = tn->type()->is_narrowoop()->make_oopptr(); | |
1732 if (tp->_ptr == TypePtr::AnyNull) { | |
1733 tn->set_type(TypeNarrowOop::NULL_PTR); | |
1726 } | 1734 } |
1727 break; | 1735 break; |
1728 } | 1736 } |
1729 case Op_Binary: // These are introduced in the Post_Visit state. | 1737 case Op_Binary: // These are introduced in the Post_Visit state. |
1730 ShouldNotReachHere(); | 1738 ShouldNotReachHere(); |